| S. Massy wrote:
> I feel obtuse, but, how can I send data to csound if I don't know what
> MIDI port it's listening on?
What I normally do is having csound read from midi through, which is
device 0 on my system. And midi through *is* listed in "aconnect -io".
To figure out where midi through is on your system (from csound's point
of view) run csound with -M set to a huge number:
[atte@aarhus misc]$ csound -M 100 ping.csd
*** PortMIDI: error: device number is out of range
The available MIDI in devices are:
0: Midi Through Port-0 (ALSA)
1: MK-249C USB MIDI keyboard MIDI (ALSA)
*** error opening MIDI in device: -1 (Unknown MIDI error)
Then I have in my ~/.csoundrc
[atte@aarhus ~]$ cat ~/.csoundrc
-+rtaudio=alsa
-o dac:hw:0
--sched
--expression-opt
-b 128
-B 256
-d
-m 0
-M 0
And:
[atte@aarhus ~]$ aconnect -io
client 0: 'System' [type=kernel]
0 'Timer '
1 'Announce '
client 62: 'Midi Through' [type=kernel]
0 'Midi Through Port-0'
client 72: 'MK-249C USB MIDI keyboard' [type=kernel]
0 'MK-249C USB MIDI keyboard MIDI '
Another nice thing with this approach is that I can route all my usb
keyboards and controllers to midi through and set them to send on
different midi channels. This works well for my purposes, with csound
playing different instruments on different midi channels.
> Sorry if I'm being silly,
I think you're not...
--
peace, love & harmony
Atte
http://www.atte.dk |