Hi all,
I have a strange problem since upgrading my Raspberry Pi 2 to Debian Jessie and PureData 0.46.7: MIDI stopped working on pd-startup by setting the commandline-parameters.
In detail: An Arduino MIDI-Controller is connected via USB to the RPi2. No changes have been made to this, and MIDI send seems to work in ALSA. Some data to proof:
$ ls /dev/midi* /dev/midi1
$ aconnect -l Client 0: 'System' [Typ=Kernel] 0 'Timer ' 1 'Announce ' Client 14: 'Midi Through' [Typ=Kernel] 0 'Midi Through Port-0' Client 20: 'Arduino Leonardo' [Typ=Kernel] 0 'Arduino Leonardo MIDI 1'
Pressing buttons and listening: $ aseqdump -p 20 Waiting for data. Press Ctrl+C to end. Source Event Ch Data 20:0 Note on 1, note 45, velocity 64 20:0 Note off 1, note 45, velocity 64 20:0 Note on 1, note 45, velocity 64 20:0 Note off 1, note 45, velocity 64 [...]
Hence my Raspberry gets the sent midi notes from the Arduino.
However, starting puredata with "puredata -d 3 -verbose -nogui -alsamidi -midiindev 1 -listdev puredata/miditest.pd" won't get any MIDI input (miditest.pd is just printing incoming midi notes).
$ puredata -d 3 -verbose -nogui -alsamidi -midiindev 1 -listdev puredata/miditest.pd audio input devices:
audio output devices:
API number 1
MIDI input devices:
MIDI output devices:
input channels = 2, output channels = 2 Pd-0.46.2 ("") compiled 07:48:11 Oct 29 2014 tried /home/pi/utzmachine/puredata/miditest.pd and succeeded priority 6 scheduling enabled.
/usr/lib/puredata/bin/pd-watchdog Opened Alsa Client 128 in:1 out:0
By using "aconnect 20, 128" manually after Alsa-Client gets openend in PD I can connect the MIDI controller and get MIDI input printed:
$ puredata -d 3 -verbose -nogui -alsamidi -midiindev 1 -listdev puredata/miditest.pd audio input devices:
audio output devices:
API number 1
MIDI input devices:
MIDI output devices:
input channels = 2, output channels = 2 Pd-0.46.2 ("") compiled 07:48:11 Oct 29 2014 tried /home/pi/utzmachine/puredata/miditest.pd and succeeded priority 6 scheduling enabled.
/usr/lib/puredata/bin/pd-watchdog Opened Alsa Client 128 in:1 out:0 MIDI: 45 64 2 MIDI: 45 0 2
I tried various parameter combinations for -midiindev and even tried the new -midiaddindev but no success. This leaves me clueless, has any configuration changed? I'm compiling 0.46.7 right now and draw some hope from that (using these steps: http://lists.puredata.info/pipermail/pd-list/2014-11/108543.html), but I wonder why noone else seems to have this problem. I guess I missed something... Sorry for the extensive data, I hope it's helpful at least.
Cheers, Daniel
On 2015-10-08 13:39, cornicis via Pd-list wrote:
won't get any MIDI input (miditest.pd is just printing incoming midi notes).
isn't this what you want? if you don't get MIDI input, how can it print incoming midi notes?
$ puredata -d 3 -verbose -nogui -alsamidi -midiindev 1 -listdev
try "-mididev 2" (or "-midiindev 2" if you prefer)
fgmasdr IOhannes
Thanks for the fast response!
On 08.10.2015 13:55, IOhannes m zmoelnig wrote:
On 2015-10-08 13:39, cornicis via Pd-list wrote:
won't get any MIDI input (miditest.pd is just printing incoming midi notes).
isn't this what you want? if you don't get MIDI input, how can it print incoming midi notes?
I guess there's some misunterstanding, I don't think that miditest.pd or generally PD-MIDI is faulty, you're completely right: as long as nothing is connected, nothing can get printed. My problem lies in having my MIDI-controller connected on PD-startup. Right now my only possibility to connect without GUI is to execute "aconnect 20, 128" after PD has opened MIDI. To speak more concretely: after starting PD with mididev-parameters I want to have Arduino connected to PureData in aconnect -l. This works on my desktop machine but not on the fresh updated raspberry.
$ puredata -d 3 -verbose -nogui -alsamidi -midiindev 1 -listdev
try "-mididev 2" (or "-midiindev 2" if you prefer)
I retried, but I already tested various configurations. For now I tried: -mididev and -midiindev with parameters 0/1/2/3/20/21 -midiaddindev 'Arduino Leonardo' and 'Arduino Leonardo MIDI 1' which unfortunately didn't open any ALSA Client.
As expected compiling 0.46.7 didn't help. Root privileges didn't help either.
I'm pretty clueless what my next steps would be to trace this issue. As MIDI works in ALSA and PD I think there has to be a communication problem on opening the ALSA client. Maybe I'm missing a package? What's involved in setting the MIDI connection on startup? I supposed that PD uses aconnect itself to connect to MIDI devices, but maybe there's something different going on?
Cheers, Daniel
On 2015-10-08 15:09, cornicis via Pd-list wrote:
Thanks for the fast response!
On 08.10.2015 13:55, IOhannes m zmoelnig wrote:
On 2015-10-08 13:39, cornicis via Pd-list wrote:
won't get any MIDI input (miditest.pd is just printing incoming midi notes).
isn't this what you want? if you don't get MIDI input, how can it print incoming midi notes?
I guess there's some misunterstanding, I don't think that miditest.pd or generally PD-MIDI is faulty, you're completely right: as long as nothing is connected, nothing can get printed.
ah yes. i thought that your alsa-midi was not working at all. iirc, Pd doesn't create the MIDI-ports if you just specify "-alsamidi".
My problem lies in having my MIDI-controller connected on PD-startup.
however, your problem is more like Pd not automtically autoconnecting to devices. this is by design (it's a feature, not a bug).
$ puredata -d 3 -verbose -nogui -alsamidi -midiindev 1 -listdev
try "-mididev 2" (or "-midiindev 2" if you prefer)
I retried, but I already tested various configurations. For now I tried: -mididev and -midiindev with parameters 0/1/2/3/20/21 -midiaddindev 'Arduino Leonardo' and 'Arduino Leonardo MIDI 1' which unfortunately didn't open any ALSA Client.
that won't work.
the only way to have a device automatically connect to your Pd MIDI port is by letting some third party software manage the connections.
you *could* use the [aconnect] external, but i would advise to use something more highlevel like a persistent patchbay in qjackctl (which despite it's name is *not only* for jack)
fgasdnr IOhannes