Re: Problems reconnecting MIDI device on RPi

IOhannes m zmoelnig <[email protected]>
Newsgroups gmane.comp.multimedia.puredata.general
Message-ID <[email protected]>
On 11/4/24 15:48, Alberto Novello wrote:
> Which is what worries me cause there is no Pure Data even if it's
> running....

right, that would explain why 'aconnect' cannot connect :-)

the default MIDI backend in Pd is "OSS MIDI".
in order to ALSA seq as a MIDI backend, you have to explicitly choose it.
the simplest way is obviously via the "Media" menu (pick the aptly named 
"ALSA-MIDI", and make sure to set the "In Ports" and/or "Out Ports" to 
some non-0 value (e.g. "1").
to make the settings persistent, you have to "Save All Settings".

alternatively (if you start Pd from the cmdline), you could simply add 
the "-alsamidi -mididev 1" flags.

note: for some obscure reason which i do not remember, the default 
number of in/out ports for ALSA-MIDI is 0 (zero, nada). Adding the flag 
"-mididev 1" will make sure you get one port in each direction. contrary 
to common sense, the actual number you put there does not matter (so you 
could also use "-mididev 0" to get one port. If you want multiple ports, 
specify them with multiple comma-separated numbers. e.g. "-mididev 1,2" 
will give you to ports. that's because with "-mididev" you are actually 
'selecting' (pseudo-)MIDI devices rather than specifying their number. 
this is for consistency with other backends.


mfgasdr
IOhannes


PS: personally i think that this behaviour is non-intuitive (even though 
iirc it was me who implemented it like this) and should probably be 
fixed as in:
- '-alsamidi' (without any "-mididev" argument) should default to a 
single port.
- '-alsamidi -mididev 2' should probably create a single port as well, 
but with a port-number "2" (for both in and out port).
    similarily, "-alsamidi -mididev 1,4" should create two ports with 
port-numbers "1" resp "4".
probably time for a feature request :-)

---
[email protected] - the Pure Data mailinglist
https://lists.iem.at/hyperkitty/list/[email protected]/message/IGHNKLGB7WF6IFB6MQ26HMPRGDECSF4J/

To unsubscribe send an email to [email protected] mailing list
UNSUBSCRIBE and account-management -> https://lists.iem.at/
OpenPGP_signature.asc (application/pgp-signature, 840 B)
-----BEGIN PGP SIGNATURE-----

wsF5BAABCAAjFiEEdAXnRVdICXNIABVttlAZxH96NvgFAmcpBFQFAwAAAAAACgkQtlAZxH96Nvh0
9g/+Mn+rioFAi0qTH7JQCe4e3DI3fia4IxVS967Dq48YJ5JFGl7PSNLWrWxbdxhHdAV2sVS9gXos
1GkqGzfidjaFDRmeecnzQ9etZaz9EBoF1znmvwvfYLXAJU2f2+gRMq/v/gET+BAx0FgE94agsEpm
eERo4d9n4THSEylNIb3GlU/R7lHzfyFk9u/PAVJerjkIA3fhK+xDVYY9BxklnamnXczXs1yAGLNy
ZpH0M1MvtmQ4fqxz9WDAu8vMCmJe6/dT+9cSVjo9q2HP/kz42AtyMFo+9QEegikWP90V/HmIfMv/
Z3osS1gT5fr8zCYBQ4u6u00b3SdRGbdJH5rfj+EOH4H937TVtJJ6/ZQghvz1IzPzDRm7FH0Gk0iW
cGfSLRyTKbk3Z376S3htBRpzVg7MiThmDPtgaEuVP+A8nOphvkphQ+5/PJ1qCXEJ8DLKkvP0PQWh
uHhVF3Y91uOqoSDCqeAEbwQ8dxtmFYwB/P2H0nmHKvKXJBkjbqudCT+fD8ZxMvIcGcGkWb2LF6wJ
aLYEJITQntml/zXzC83nAyZUcN1S3pD7iDLklZT3AsZECJxJCCaidwYI2lYaYWr3Etw8TIwkU2CE
q7vCC5jO6F8hJFeEBwVF0XP4DhXiQ8BHxFPsN+lVmptBgNG4/tl4lGVSOP/36QeEQi/JS/++E2Jm
WpM=
=ZGNN
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.