![]() took a new approach to the banana piano by hooking it up to Clojure and Overtone. The time it takes for the pin to flip from a 0 to a 1 determines if the sensor is touched. The Arduino sets the pin as a low-level output, then sets the pin as an input with a pull up resistor. ![]() The banana becomes a cheap, colorful touch sensor, which looks sort of like a piano key. We’ve also seen other natural processes generating sound like this project for presenting the sunset to the blind.Īt this point, the banana piano is a pretty classic hack. We’ve seen SuperCollider in a banana piano, before (these are popular because for most people bananas have appeal). Not sure how much of that is the code and how much is the characteristics of the bacteria itself. We thought the music sounded a little oppressive. You can see a video of Micro-ritmos, below. As it looks at the bacteria and uses SuperCollider to create music and lighting from the patterns. The group used geobacter - a kind of bacteria found in soil - a Raspberry Pi, an Arduino, and a camera to build an interesting device. A recent art project by a Mexican team - Micro-ritmos - might inspire some musical groups to be named after bacteria. (If you study that for a while you’ll spot the homophonic pun, and yes we know that the Crickets inspired the name.) There’s also Iron Butterfly, Adam Ant, and quite a few more. Probably has something to do with the Beatles. In many cases, having a std::thread with a usleep in there would yield a very similar behaviour, while being more portable.We’ve noticed a lot of musical groups are named after insects. However, in the case where it is used for I/O, given how you are going through the Linux driver, its priority becomes much less relevant, in that it will still have to revert to the Linux scheduler in order to access the driver. The convenience of it is that it can be scheduled from the audio thread with minimal overhead in a RT-safe way and it can be assigned a "Xenomai" priority which is powerful for keeping DSP co-routines (e.g.: FFT processing) at high priority. the callback runs in a loop which waits on a condition variable signalled from the audio thread * a Bela AuxiliaryTask is just a wrapper for a Xenomai wrapper for a pthread which gets managed internally so that: I also integrated into Bela's libpd so that one could use Pd to control an I2C device in a RT-safe way. This used two lock-free ringbuffers to communicate between the RT thread and another thread which would actually do the processing (again, all of this was Bela-independent). ![]() I made an attempt a few years ago at exposing decently complete I2C functionalities that would be accessible from a RT thread. The first behaviour is the one the readRegister() and writeRegister() functions in I2c_Codec.cpp rely upon and it's probably common enough that it would be worth having it as a library function. Some others (e.g.: Trill) do not work that way: you first do a transaction where you write once to give it the memory address you are interested in, then you keep reading from the device without writing the address any more. Many devices (e.g.: Bela audio codec), for instance, expect that the first byte written by the host in each transaction determines the memory location to which the successive bytes in the same transmission will be read from / written to. The I2C protocol provides the transport, addressing and arbitration, but it does not specify what the bytes mean. What could become useful on RT Linux systems (e.g.: Bela) is a way of safely exchanging data between an I/O thread and a RT thread (see below).Ī thing with I2C is that not all devices behave the same in terms of how to interact with them. As long as that all happens in a dedicated thread (doesn't have to be a Bela AuxiliaryTask*), this is completely generic Linux. Ultimately, there is nothing Bela-specific to how I2C works on Bela: it just leverages the Linux driver which exposes the I2C bus in /dev/i2c*, does one ioctl() to set the device address, then calls read()/ write() on it. Another I2C application is Bela's audio codec driver. There is also one for MPR121 and a port of an Arduino library for an IMU integrated with libpd on Bela. That's probably the best example we have.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |