Skip to content

Use the Raspberry Pi for audio looping

roberthofman edited this page Jan 27, 2021 · 4 revisions

27 January 2020

Here is the final render of the box:
render3

24 January 2020

Here we go, printing has started!
print

16 January 2020

The coding part is pretty much done! Will be covered in a video soon :) We fixed the wiring up of the buttons and the LCD, and Peter made a new render of the final components:
render knopjes

1 January 2020

I spend some time during the Christmas break on the code. I did stick to PureData, which turns out to be very effective for timing/recording/looping etc. I plan to cover the code in a short video in the coming weeks. In order to work with the GPIO buttons, I will need to use Python. So to communicate between Python and PD, I use a socket (TCP) connection.

Sending data to PD turns out to be very easy. An echo command with 'pdsend' will do the trick: os.system("echo '" + CHANNEL + " " + MESSAGE + ";' | "pdsend " + PORT) Within PD I route the messages using the channel number to the appropriate variables.

The buttons will probably be delivered next week, so then the soldering starts. Very curious how it will end up!

13 December 2019

As of now, I plan to combine Python with PureData (as the guy from this video shared all of his code, I think that would be a good start). PureData is a visual code language which is often used for building musical instruments/pedals/effects/etc, so that seems appropriate.

Together with Peter (luckily with a lot more technical knowledge than I have), we made a list of items we would definitely need:

  1. Buttons and a PCB to wire up the buttons. As the Pi has a limited amount of GPIO pins, it is not very efficient to wire up 16 different buttons. Luckily this PCB has a matrix schema for the buttons, such that only 8 pins can be used (4 rows, 4 columns).
  2. A soundcard, which works well with the Pi and PureData (according to their website at least).
  3. LED's, RGB for some whiny colors on the buttons. These can be wired up using the same PCB as the buttons.
  4. An LCD, mainly to visualize the beat/tempo of the loop, and for settings. To reduce the number of pins, and for an easy connection with the Pi, I also used an I2C interface.
  5. Jumper cables, to wire up the PCB to the Pi
  6. Diodes, for the buttons I got the technical stuff for 3,4,5 and 6 from opencircuit, which were super fast in delivering the first parts. Now we wait for the soundcard and the buttons to arrive and we can start to wire it all up. Finally, I would like to share the initial render for the box, also made by Peter (friends TU Delft ftw)! First delivery First render

Usefull sources for reference