Skip to content
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

Library overwrites m.event function #1

Open
zjb-s opened this issue Apr 18, 2022 · 4 comments
Open

Library overwrites m.event function #1

zjb-s opened this issue Apr 18, 2022 · 4 comments

Comments

@zjb-s
Copy link

zjb-s commented Apr 18, 2022

Currently, it seems like if you run _16n.init it blocks other midi input in the main script. Totally happy to work on this tomorrow if you want a hand.

There's a couple of workarounds I can think of.

@p3r7
Copy link
Owner

p3r7 commented Apr 18, 2022

my suspicion is that it does not come from _16n. lemme investigate.

@p3r7
Copy link
Owner

p3r7 commented Apr 18, 2022

yeah, _16n, doesn't override anything.

on the other hand, you may override waht _16n does if 16n is at first position in DEVICES > MIDI.
indeed you force input CC device to position 1 by not providing arguments to midi.connect (here).

one way would be to bind the event callback function for handling CCs to all devices that are not 16n.
alternatively, one could make the CC input midi device configurable w/ a param.

for use-case 1 i can do you a PR as i already ahve some code ready @ https://github.com/p3r7/sempra (relevant bit)

@zjb-s
Copy link
Author

zjb-s commented Apr 18, 2022

that patch looks good.
"one way would be to bind the event callback function for handling CCs to all devices that are not 16n."
how would you do that? I'm a bit fuzzy on how the midi library works - much more familiar with crow!

thanks so much for your help with sempra btw!

@zjb-s
Copy link
Author

zjb-s commented Apr 18, 2022

I actually wrote almost that exact same patch locally last night now that I think of it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants