ok, so Ive been noticing quite a few people recently having issues with external midi with the organelle.
(and I also previously had issues with one device, which I hacked around)
I thought Id see if rather than using OSS we could use ALSA which is (in my experience) a bit more stable and better features too
so Beta 7 contains a new experimental support for using PD with Alsa
as its experimental, for now you will need to edit the MIDI-Config.txt file manually.
on your USB drive , you will have MIDI-Config.txt (if not, then set the channel then you will )
its contents is something like
channel 1;
to use alsa you will need one new line,
channel 1;
usealsa 1;
these need to be entered exactly as above
usealsa is 0 or 1, if 0 (or key not present) then PD will use OSS (as it did before) , if this is present and not zero , it will switch to using alsa for midi input and output
with just usealsa 1, we default the PD midi input and output to ‘client 28’ which is client number allocated to a usb midi device. most of the times, this is fine, but sometimes it may need tweaking, which I detail below.
note: the above config file will be reloaded if you use the midi channel option… but changes will not be used until a PD patch is launched.
advance use
there is an additional config parameter, called alsaconfig, this is actually defaulted as follows, but you can override it, by adding something like
alsaconfig 28:0 128:0 128:1 28:0;
alsaconfig determines which alsa devices to map, what does this mean?
well its actually have two pairs of numbers, the first represents input, the second output
what does this mean?
input
28:0 128:0
28:0 is commonly the first midi device (and first port) and this is being routed to Pure data midi input (128:0), so this says routing device 28:0 to 128:0 (pd)
output
128:1 28:0
128:1 is PD alsa midi output, and this is being routed to 28:0 , again the usb midi device.
(dont worry, midi ports can be input and output, 28:1 would NOT work… that would be midi device 28, port 2 something different entirely)
so this is the default, but what if that doesn’t work with your device?
configuring other devices…
how do you know what to use?
now, since beta 8, there are 3 options
- plug in a keyboard /hdmi monitor
- use networking login (via ssh)
- use Diagnostic Log (see my patchstorage account)
for the first two, type at the prompt.
aconnect -l
(thats a lowercase L )
or if you run Diagnostic Log, you will find in diag_log.txt the output from aconnect.
my output for this is:
client 0: 'System' [type=kernel]
0 'Timer '
1 'Announce '
Connecting To: 15:0
client 15: 'OSS sequencer' [type=kernel]
0 'Receiver '
Connected From: 0:1
client 28: 'Virus TI' [type=kernel]
0 'Virus TI MIDI '
1 'Virus TI Synth '
client 128: 'Pure Data' [type=user]
0 'Pure Data Midi-In 1'
1 'Pure Data Midi-Out 1'
here you can see the pure data ports (which will always be 128… assuming no other clients running ;)) , as I had a patch running, with alsa setup (i.e. usealsa 1; ) … but your not interested in that.
your looking for your devices… if you plug in multiple, then you’ll see many ‘clients’…
(I’m only supporting one input, one output for 2.2 betas)
so in this case, you can see my Virus, which actually has 2 ‘ports’ , one represents a usb connection to the MIDI ports (ie. acts as a midi router) , then seconds goes to/from the synth engine.
so actually for the Virus, I want the second port (Virus TI Synth), so I need to configure using:
alsaconfig 28:1 128:0 128:1 28:1;
if you start plugging in multiple midi devices then only one of them will be 28, the other will be something different…
in time, we could then actually send these to different Pure Data inputs, which might be useful for (e.g.) keyboard and drum pads to go to different parts of a patch.
anyway, thats all for later…