-
Notifications
You must be signed in to change notification settings - Fork 279
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get client name API ? #54
Comments
Hi Stuart, If it can be done via aplaymidi, it can be done in RtMidi. The main issue would be finding a way to work it into the existing RtMidi API. I suppose the easiest way might be to add an optional string pointer argument to the getPortName() function that can be filled by the function if the client name is available (not all APIs will support that). So, something like: std::string getPortName (unsigned int portNumber=0, std::string *clientName=0 ) Regards, —gary
|
I was originally asking for an API in a consuming API (mido), hopefully the author will chip in if this looks good. |
Mido author here. That should work. I could do something like this in Mido:
For this to work we also need to involve the author of python-rtmidi since Mido doesn't use RtMidi directly. Stuart: This would give you a list of ports for a specific client. Is that what you were looking for or do you need all ports on all clients? |
I'm subscribed to updates on this project. I've been meaning to do a new python-rtmidi release for quite some time now anyway and to get it out of beta status. I just haven't found the time to write documentation yet. |
@olemb I think so - I've been making something for the APC MINI ... and when I do
so if I could do |
@SpotlightKid Awesome! Does the API look OK to you? |
Sounds good. This will be very easy to add to Mido once it's supported in RtMidi and python-rtmidi. |
So who writes a patch? I'm not really a C/C++ programmer. :) |
Any news on this? |
Someone needs to work on the implementation and submit a pull request. |
The problem is that RtMidi (and therefore python-rtmidi) already returns client names. Without any port names. On the ALSA (asound) backend, the string returned is of the form "cname cid:pid". This is also why the python-rtmidi unit tests fail on ALSA. It would be trivial to change this, but there's no telling what it would break downstream and I wouldn't submit a PR without a green light from an RtMidi developer. |
vs.
Please feel free to submit a PR ;) |
Not sure where this stands but if it hasn't been fixed by now, it must not be that important. |
Not sure if it is because of you closing this, but it looks like the upstream patch to return actual port names has just been merged. |
In alsa I can get the midi client names
alias lsmidi='aplaymidi -l'
Is there any way to get the client name ? - if not would it be possible to add a way ?
The text was updated successfully, but these errors were encountered: