belangeo / pyo-bela Goto Github PK
View Code? Open in Web Editor NEWTemplate to create a pyo project on the bela platform
License: GNU Lesser General Public License v3.0
Template to create a pyo project on the bela platform
License: GNU Lesser General Public License v3.0
I'm new to pyo and the pyo-bela implementation, but I don't see any functionality for digital io (triggers) in the current pyo-bela code. If I'm not missing anything, I'm wondering if there is any plan to add this? I'm currently learning pyo to use with a Bela pepper.
It seems that a seamless approach would be to associate a digital input with a Trig, so that a rising voltage is treated just as any other output from Trig.play() would be. Similarly a trigger output might be able to fire on an event as would a Trig or Metro. I guess I can imagine how these could be hacked using existing functions, but also that this would be more cpu intensive. I guess this implementation would mean using pin interrupts under the BBB hood, unless there's an event loop already polling for this constantly.
Am I missing something altogether? Thanks.
Following the README as far as
root@bela:~/Bela/scripts# ./build_pyo.sh ../../pyo-bela/examples/music-box.py ../../pyo-bela/common/
Running /root/Bela/projects/music-box/music-box
Error: no audio callback defined. Make sure you set settings->render to point to your audio callback
Error: unable to initialise audio
Fatal Python error: PyEval_AcquireThread: NULL new thread state
Aborted
Makefile:504: recipe for target 'runonly' failed
make: *** [runonly] Error 134
Connection to 192.168.7.2 closed.
I'm guessing something has probably changed since v0.1.0a stable 2016.07.23
? @giuliomoro
I have Jupyterlab running on Bela, and was wondering if it would be possible to use pyo in a notebook to achieve an interactive coding session with Bela.
From Chris Csikszentmihalyi mail:
Here's an example of getting an object's value from python into the C space:
138 INLINE int pyo_get_python_int(PyThreadState *interp) {
139 PyObject *module, *obj;
140 PyEval_AcquireThread(interp);
141 module = PyImport_AddModule("main");
142 obj = PyObject_GetAttrString(module, "freq");
143 PyEval_ReleaseThread(interp);
144
145 long foobar = PyInt_AsLong(obj);
146 return (int) foobar;
147 }
This seems to work well and causes no mode switches.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.