[Csnd] Python and Midiout with noteondur2
Date | 2018-01-06 17:38 |
From | Ben McAllister |
Subject | [Csnd] Python and Midiout with noteondur2 |
Attachments | midiout_test.py test.orc test.sco |
Hello Csounders! I'm trying to run csound from python to generate midi events. The attached orc and sco run fine from the cmdline, but running the same from the csound API via python fails to generate Midi out due to a PortMidi error: "*** PortMIDI: MIDI out: error writing message". My csound command: csound -odac -Q0 -b64 -B64 test.orc test.sco I'm on Mac 10.13.2, Python 2.7.14, and Midi device 0 on my machine is an IAC bus. Any advice in diagnosing the issue? Thanks in advance! |
Date | 2018-01-08 15:54 |
From | Steven Yi |
Subject | Re: [Csnd] Python and Midiout with noteondur2 |
Hi Ben, A couple thoughts: 1. You might try to list the midi devices both with Csound commandline and in Python using: --midi-devices[=in|out] list available audio devices and exit (Ignore that it says audio devices, seems the text for the --help has a typo) 2. You might want to switch to using ctcsound.py instead. I don't know if it is packaged with the installer, but you can find it online (and interestingly, just saw it on pypi: https://pypi.python.org/pypi/ctcsound/0.0.2 ). Maybe #1 will give some information, but maybe #2 will fix the issue. I think at this point too, we should all be moving to ctcsound.py since we're going to drop the generated Python language in CS7. steven On Sat, Jan 6, 2018 at 12:38 PM, Ben McAllister |
Date | 2018-01-16 22:36 |
From | Ben McAllister |
Subject | Re: [Csnd] Python and Midiout with noteondur2 |
Thanks for the tips. Unfortunately, the PortMidi error remains. I'd like to setup a debug environment around the csound executable to see where things are breaking - what are Csound devs using for an IDE on Mac? Or should just debug via logging? On Mon, Jan 8, 2018 at 7:54 AM, Steven Yi <stevenyi@gmail.com> wrote: Hi Ben, |
Date | 2018-01-16 22:45 |
From | Victor Lazzarini |
Subject | Re: [Csnd] Python and Midiout with noteondur2 |
Hang on, you said that the csound was working, but not via Python, so debugging needs to happen in your python script, not the csound executable. We could help if you shared the Python program that is not working. Maybe something in the order of the API calls. ======================== Prof. Victor Lazzarini Dean of Arts, Celtic Studies, and Philosophy, Maynooth University, Maynooth, Co Kildare, Ireland Tel: 00 353 7086936 Fax: 00 353 1 7086952 > On 16 Jan 2018, at 22:36, Ben McAllister |
Date | 2018-01-17 19:36 |
From | Ben McAllister |
Subject | Re: [Csnd] Python and Midiout with noteondur2 |
Thanks for the response. I attached the screenshot script and associated orc and sco to my original post - do you see them?. Csound runs fine, generating notes from the score and reporting the start times correctly, etc, but every note generates the Le PortMidi error I mention. Maybe you can repro. Im interested in any advice on an IDE for Mac, regardless. On Jan 16, 2018 2:45 PM, "Victor Lazzarini" <Victor.Lazzarini@mu.ie> wrote: Hang on, you said that the csound was working, but not via Python, so debugging needs to happen |