Repository navigation
Conversation
|
If I'm not mistaken, the main difference between audio and MIDI ports is the "port type". Is there any other "port type" used anywhere? If not, I think we shouldn't expose the "port type" string (nor the "port type id", which doesn't seem to be used anywhere at all), we should rather find a more Pythonic abstraction. One possibility would be to have two classes, Alternatively (or additionally?), we could also extend the port properties with For creating ports, we currently use
|
|
Probably it's better (as @amstan suggested in #1 (comment)) to keep Then we could also keep |
|
I added a commit with a possible implementation (14b43b9). |
Now all types of ports can be compared. A Port instance is equal to an OwnPort instance, if they wrap the same port pointer (which can happen if multiple client objects were created).
Before, it was only working for MIDI channel 1!
|
This looks pretty good, feel free to merge it.
Interesting thought but: gPortTypes only has 2 elements. What if i want to use jack to transport my own weird data?? heh
That might be nice. midi_in_ports, and rename inports to be audio_in_ports (input perhaps?) |
|
I don't understand your comment about the port registration failure, can you please clarify? I don't know if one can actually invent a new port type as a user. If someone points out a use case I'm willing to consider it, but for now I think I'll stick with audio and MIDI and not exposing the actual "port type" and "port type ID" in the API. About the list names ... I thought a bit about this and my current standpoint is this: It seems that MIDI ports are kind of an add-on to JACK, and not really first-class citizens like audio ports. IMHO, the names with one underscore look better than the ones with two underscores. |
That was me trying to see if i can get another type of port that's not midi nor audio. Jack didn't let me and returned an error instead. I'm ok with your other decisions. What I was saying about naming were mostly nits, feel free to ignore them. Let's merge this pull request. |
This was brought up in #1, but I think it deserves a separate issue.
I initially only thought about audio ports, but of course it would also be nice to support JACK MIDI ports.
In this issue I'd like to collect some ideas about how to extend the current module to support MIDI ports in a meaningful, easy-to-use way.