You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I apologize for adding this as an issue, but I don't see any other way of contact and/or my lack of understanding.
attempting to run midi_chords.py
With the code as provided:
@client.set_process_callbackdefprocess(frames):
I get this at the console:
/usr/bin/python3.4 /home/mac/PycharmProjs/JackMIDITest/midi_chords.py
################################################################################
press Return to quit
################################################################################
From cffi callback <function Client.set_process_callback.<locals>.callback_wrapper at 0x7f28d3c04c80>:
Traceback (most recent call last):
File "/usr/local/lib/python3.4/dist-packages/jack.py", line 720, in callback_wrapper
return callback(frames, userdata)
TypeError: process() takes 1 positional argument but 2 were given
It's quite OK to create an issue like this if you have questions!
Your problem with the number of arguments to process() seems to stem from the fact that you are running the examples from a different version (I guess the "master" branch from Github) than the version of jackclient-python you have installed (I guess version 0.2.0 from PyPI).
I changed the number of arguments to process() in #7 and there hasn't been a PyPI release since.
Your second problem is actually expected behavior, since midi_chords.py only creates 2 MIDI ports but doesn't attempt to connect them to any other ports (since it doesn't know what ports you want it to connect to).
One solution would be to allow command line arguments to specify some (optional) MIDI ports where midi_chords.py should connect to.
Would this be helpful to you?
Would you want to specify only the output port (as in your example) or the input port as well?
How did you connect the input port in your example?
So where is the "right" version to get? I didn't do a pull from git and your email implies the git master is not right? I think I followed the instructions from your doc page.
Ok, I got the code from that link and it does appear to be working now. I've also modified my test code and it's working now as well.
In my case I'm developing an app that sends commands to mixers and such things ( https://github.com/macdroid53/ShowControl ). Since the configuration would be kept in a configuration file, the command line option would not help me much.
Activity
mgeier commentedon Jul 13, 2015
It's quite OK to create an issue like this if you have questions!
Your problem with the number of arguments to
process()seems to stem from the fact that you are running the examples from a different version (I guess the "master" branch from Github) than the version of jackclient-python you have installed (I guess version 0.2.0 from PyPI).I changed the number of arguments to
process()in #7 and there hasn't been a PyPI release since.Your second problem is actually expected behavior, since
midi_chords.pyonly creates 2 MIDI ports but doesn't attempt to connect them to any other ports (since it doesn't know what ports you want it to connect to).One solution would be to allow command line arguments to specify some (optional) MIDI ports where
midi_chords.pyshould connect to.Would this be helpful to you?
Would you want to specify only the output port (as in your example) or the input port as well?
How did you connect the input port in your example?
macdroid53 commentedon Jul 13, 2015
So where is the "right" version to get? I didn't do a pull from git and your email implies the git master is not right? I think I followed the instructions from your doc page.
mgeier commentedon Jul 14, 2015
When you look at the "Code" section of this page, you'll see a drop-down menu somewhere around the top left named "branch: master".
You can click on this and select "Tags" and then "0.2.0", this should show you the version of the files corresponding to the 0.2.0 release.
After that, you can just click through to the file you are interested in.
This is the direct link: https://github.com/spatialaudio/jackclient-python/blob/0.2.0/examples/midi_chords.py
This is the raw link if you want to download the file: https://raw.githubusercontent.com/spatialaudio/jackclient-python/0.2.0/examples/midi_chords.py
I'll try to make a new release soon, then the examples should be in sync again.
macdroid53 commentedon Jul 15, 2015
Ok, I got the code from that link and it does appear to be working now. I've also modified my test code and it's working now as well.
In my case I'm developing an app that sends commands to mixers and such things ( https://github.com/macdroid53/ShowControl ). Since the configuration would be kept in a configuration file, the command line option would not help me much.
Thanks for helping!
mgeier commentedon Jul 16, 2015
If your problem is solved, please close this issue, if not, feel free to continue posting comments here.
BTW, I just released a new version: https://pypi.python.org/pypi/JACK-Client/0.3.0
Now the examples should be in sync again.
You can get the new version with