Giter VIP home page Giter VIP logo

pyo-bela's People

Contributors

belangeo avatar giuliomoro avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

pyo-bela's Issues

Trigger (digital) inputs?

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.

Unable to run on Bela v0.3.2

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

pyo-bela in Jupyterlab

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.

Getting python attribute into the C space

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.