| rob...@gmail.com | edgyproduct.org |
|
"Art means… to resist the course of a world that unceasingly
holds a gun to mankind's chest." --Theodore Adorno |
--
You received this message because you are subscribed to the Google Groups "pyo-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyo-discuss...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pyo-discuss/80041bf1-5b46-4bda-beb0-3c0114178399%40gmail.com.
I have to clarify that I made Pyo work on the Bela Gem stereo, their latest board that comes with their new IDE. There should be some small changes to make this work with the old Bela. I'll probably give it a shot this week and come back with results.
I haven't tested MIDI or OSC. For MIDI, I know that Pyo when hosted cannot handle it, so that has to be handled by the C++ side, correct? For OSC, how does that go? Can Pyo when hosted handle OSC?
To view this discussion visit https://groups.google.com/d/msgid/pyo-discuss/CAAad6Kd36jQrFSSnPrg9NkwaYsWapKJ8L%2BdR7f-orP%3DSx3gE9Q%40mail.gmail.com.
To view this discussion visit https://groups.google.com/d/msgid/pyo-discuss/810cea20-2f1a-418c-a5d9-85d6cb992429%40gmail.com.
The following text is taken from the m_pyo.h header file, which is used in all embedded projects:
When used in an embedded framework, pyo can't open MIDI ports by
itself. MIDI inputs must be handled by the host program and sent
to pyo with the pyo_add_midi_event function.
So, MIDI is indeed handled by the host program. In the case of Bela, that would be C++. This means that PyoClass.cpp must be edited, because I just now looked and there's no call to this function. I'll deal with it this week and come back with updates.
To view this discussion visit https://groups.google.com/d/msgid/pyo-discuss/CAAad6KexCCa5R1qai1PU_Du4d5P-TSQBoYP059kK50hjXzF2Ow%40mail.gmail.com.
I was actually wrong when I wrote that PyoClass.cpp doesn't contain a function to call pyo_add_midi_event() from m_pyo.h. I was looking at PyoClass.cpp of the openFrameworks example. In Bela, you can create a Pyo object (e.g. `Pyo pyo`) in your C++ file (this is what is done in the examples that come with Pyo-Bela), and then call `pyo.midiEvent(status, data1, data2);`. All arguments are ints.
In Bela, open the C++ MIDI example under "Communication" to see how to handle MIDI. Then check Pyo's documentation for the Server class, https://belangeo.github.io/pyo/api/classes/server.html#server, and read the `addMidiEvent` part, to see the status bytes you can send to `pyo.midiEvent()`. If you combine these, you'll probably get MIDI working on your Bela. I'll also give it a try and make an example to add it to the repository.
To view this discussion visit https://groups.google.com/d/msgid/pyo-discuss/CAP8qyhv6XhNXFgE_myUi9f656Q%3DPpNYFP9_B6rAOpRviBEpeyg%40mail.gmail.com.
In embedded frameworks, it's usually the host program that handles i/o communications with the system (audio. midi, file, etc.), hence the addMidiEvent added to the Server class. OSC is a particular case of i/o in the sense that timing is not critical as with audio or midi. If liblo is installed on the bela board, compiling pyo with OSC enabled should just work. That would still need another argument to setup.py to enable OSC, but not Portaudio and Portmidi (it's all or nothing at the moment).Olivier
--
You received this message because you are subscribed to the Google Groups "pyo-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyo-discuss...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pyo-discuss/CAP8qyhs21x4gsyk1dTSLTfMiY0r9cY_h_LMdGsE3pExUwXMp8w%40mail.gmail.com.
| rob...@gmail.com | edgyproduct.org |
|
"Art means… to resist the course of a world that unceasingly
holds a gun to mankind's chest." --Theodore Adorno |
To view this discussion visit https://groups.google.com/d/msgid/pyo-discuss/CAMXBGhTLf6hMyWkBJ5wjoqLuHwTzSS_5bY8MVyGT65sxKjnr8g%40mail.gmail.com.
Some update on this. MIDI is quite tough to get it working. Using the NoteIn() class causes massive drop outs. Removing the class from the Python script, reduces the drop outs dramatically. After a couple of attempts, I was getting a crash with no sensible output, so I tried running the project with GDB from the terminal, but then it didn't crash...
As for OSC, liblo is not installed by default, and I think it's not a good idea to include in the README the process of installing it with apt in case someone wants to use OSC with Pyo on the Bela. If you want, you can work on the existing OSC examples that come with C++ and call PyoClass methods value() and set().
For now, I don't think that having MIDI support is feasible, but I'll see if I can get it working sometime in the near future again. If anyone else wants to jump in and try, you're welcome, of course.
To view this discussion visit https://groups.google.com/d/msgid/pyo-discuss/CAAad6Kc8ac%3DUXUVfDt1kvRG_MVtf3TJBQ3qJSfuEXD6yj-VOmw%40mail.gmail.com.
To view this discussion visit https://groups.google.com/d/msgid/pyo-discuss/CAP8qyhsRbk8M1AovvgWVHbjb8r7g6C76gSdZv8d0pjTF3aS2UA%40mail.gmail.com.
To view this discussion visit https://groups.google.com/d/msgid/pyo-discuss/CAMXBGhST1ZrUwP6S5FF3-X75t1wbzBBUcxj4Hnn9wCJu90EHaQ%40mail.gmail.com.