{"action":"created","issue":{"url":"https://api.github.com/repos/thestk/rtmidi/issues/107","repository_url":"https://api.github.com/repos/thestk/rtmidi","labels_url":"https://api.github.com/repos/thestk/rtmidi/issues/107/labels{/name}","comments_url":"https://api.github.com/repos/thestk/rtmidi/issues/107/comments","events_url":"https://api.github.com/repos/thestk/rtmidi/issues/107/events","html_url":"https://github.com/thestk/rtmidi/issues/107","id":223391381,"number":107,"title":"RtMidi is not able to see PureData","user":{"login":"jcelerier","id":2772730,"avatar_url":"https://avatars0.githubusercontent.com/u/2772730?v=3","gravatar_id":"","url":"https://api.github.com/users/jcelerier","html_url":"https://github.com/jcelerier","followers_url":"https://api.github.com/users/jcelerier/followers","following_url":"https://api.github.com/users/jcelerier/following{/other_user}","gists_url":"https://api.github.com/users/jcelerier/gists{/gist_id}","starred_url":"https://api.github.com/users/jcelerier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcelerier/subscriptions","organizations_url":"https://api.github.com/users/jcelerier/orgs","repos_url":"https://api.github.com/users/jcelerier/repos","events_url":"https://api.github.com/users/jcelerier/events{/privacy}","received_events_url":"https://api.github.com/users/jcelerier/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-04-21T13:56:50Z","updated_at":"2017-04-21T14:24:18Z","closed_at":null,"body":"In the software I work on I couldn't see Pd's virtual ports (Linux ALSA). So I tested with the Python [mido](http://mido.readthedocs.io/en/latest/backends/index.html) library which is a wrapper over RtMidi and PortMidi, and it does not see them either. However, mido with the PortMidi backend is able to see the Pd ports.\r\n\r\n```\r\nimport rtmidi\r\nimport mido\r\n\r\nportmidi = mido.Backend('mido.backends.portmidi')\r\nrtmidi = mido.Backend('mido.backends.rtmidi')\r\n\r\nrtmidi.get_input_names()\r\n> ['KMidimon:KMidimon 128:0', 'Midi Through:Midi Through Port-0 14:0']\r\n\r\nportmidi.get_input_names()\r\n> ['KMidimon', 'Midi Through Port-0', 'Pure Data Midi-Out 1', 'Pure Data Midi-Out 2']\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/thestk/rtmidi/issues/comments/296204832","html_url":"https://github.com/thestk/rtmidi/issues/107#issuecomment-296204832","issue_url":"https://api.github.com/repos/thestk/rtmidi/issues/107","id":296204832,"user":{"login":"radarsat1","id":66805,"avatar_url":"https://avatars3.githubusercontent.com/u/66805?v=3","gravatar_id":"","url":"https://api.github.com/users/radarsat1","html_url":"https://github.com/radarsat1","followers_url":"https://api.github.com/users/radarsat1/followers","following_url":"https://api.github.com/users/radarsat1/following{/other_user}","gists_url":"https://api.github.com/users/radarsat1/gists{/gist_id}","starred_url":"https://api.github.com/users/radarsat1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/radarsat1/subscriptions","organizations_url":"https://api.github.com/users/radarsat1/orgs","repos_url":"https://api.github.com/users/radarsat1/repos","events_url":"https://api.github.com/users/radarsat1/events{/privacy}","received_events_url":"https://api.github.com/users/radarsat1/received_events","type":"User","site_admin":false},"created_at":"2017-04-21T14:24:18Z","updated_at":"2017-04-21T14:24:18Z","body":"The function used to get port information is called portInfo() in RtMidi.cpp.  (It should really be `static`..)\r\n\r\nAnyways it contains a predicate that causes it specifically to skip \"synth\" ports,\r\n~~~\r\n      if ( ( ( atyp & SND_SEQ_PORT_TYPE_MIDI_GENERIC ) == 0 ) &&                         \r\n        ( ( atyp & SND_SEQ_PORT_TYPE_SYNTH ) == 0 ) ) continue;   \r\n~~~\r\n\r\nIf I comment this out, I get the following output from midiprobe,\r\n\r\n~~~\r\n$ ./midiprobe \r\n\r\nCompiled APIs:\r\n  Linux ALSA\r\n\r\nCurrent input API: Linux ALSA\r\n\r\nThere are 3 MIDI input sources available.\r\n  Input Port #1: Midi Through 14:0\r\n  Input Port #2: Pure Data 128:2\r\n  Input Port #3: Pure Data 128:3\r\n\r\nCurrent output API: Linux ALSA\r\n\r\nThere are 3 MIDI output ports available.\r\n  Output Port #1: Midi Through 14:0\r\n  Output Port #2: Pure Data 128:0\r\n  Output Port #3: Pure Data 128:1\r\n~~~\r\n\r\nI am not entirely sure what the motivation for this filtering predicate is, so I hesitate to change it.  Perhaps @garyscavone can comment?  I think the idea actually is to specifically restrict the list to hardware ports, but I am not sure why."}}
{"actor":{"display_login":"radarsat1"}}