Cabbage Logo
Back to Cabbage Site

Cabbage for ESP32-Arduino - create csound-hardware

Hi all, I am totally new with CSOUND. I am playing around with ESP32 (Microcontroller) with Dual Core and up to 240MHz clock, and 2 I2S-Interfaces and 4 MByte RAM. These specs sound like the specs from 2000er PCs but it costs only around 10$ to get it working.
The development is more or less done by using the well known Arduino-IDE and C / C++.
My idea: why not moving some csound-libraries to the Arduino-IDE specially for the ESP32 and using Cabbage to develop the Arduino-Sourcecode. Then, this sourcecode could be compiled by the ARDUINO-IDE and transfered to the ESP32.
Finally You will get a hardware-synth rather than a VST.

This could be a totally new approuch to develop a hardware-synth or a hardware-module for a module-system.
Perhaps the ESP32 is not the best choice but could be a startingpoint for a general discussion.
A Teensy could be a good point to and provides already an audio-library. … but has less cores and a slower clock and a higher price.

Currently I am trying to create a simple Sample-Player with the ESP32

Best Regards

Sounds like a whole world of pain. Can you not simply install Linux on the board itself, and then build Csound and Cabbage for it?

I’m not so sure. More and more people have been doing just that lately. Check out:

You may also take a look at the Cosmo project:

I’m seeing Csound on more and more devices lately. By all means try this out and let us know. I’m interested to see how well Csound runs on the board.

Hi Rory, I’m doing some researches and I found this 6 years old topic.
I saw Coca Cola used Csound recently, do you know if it’s also embedded in their bottle?

I saw emails discussing it and I was wondering if that’s true how they did that.

Thank you!

It is true. We took a Cabbage instrument and ported it to the RPI Zero W. It wasn’t without its challenges. Running Csound on a PI is simple. I wrote a small C++ application to host the instrument, but it would have probably been easier to use Python. Optimising the instrument so that it performs as good as the desktop version took quite some work though. And writing the BT preset transfer protocol was interesting too, that was done using Python and PyBluez. I’d love if they sent me a bottle, but they only made a small number of them, and I don’t think I have enough Insta followers to warrant getting one :rofl:

Thanks for the information! And congrats!!!

It looks like embedding Cabbage/Csound in hardware is challenging. Also, for me RPI were made to build DIY/prototypes, I’m impressed it’s actually used in “production” even though only a small number of bottles were made.

I’m still working on VSTs/plugins, but still would like to embed csound in a RPI/ESP32/Arduino one day, I’ll keep in mind it will be a path full of challenges :smiley:

Challenging in this case because the RPi Zero isn’t exactly powerful, and only comes with 500MBs of RAM. Don’t let that put you off though. It’s very rewarding to put some of your plugins in a box. And interfacing between the GPIOs and Csound is really straightforward.

Thanks for this video, this is helpful for me.

One of my potential applications for my looper would be a guitar effect pedal. Do you know if there is a (fairly) standardized circuit board that would handle input/output, ADC/DAC, run Csound, handle MIDI, …

Writing that out sounds kind of unreasonable, but maybe?

You have lots of options. If you want something that has Csound ready to go out of the box you could look at the Bela board, which has a web based IDE where you can develop your Csound instruments and then push them to the board. You can also use an Arduino. It’s simple to build Csound for, and a range of low-cost external MIDI and audio devices make it really accessible. Or you can go bare metal with something like a Daisy board which can be picked up for 20 bucks. There is no file system on a bare metal board, so you’ll need to build a simple Csound host in C/C++, but from what I hear, it’s not too much work. I can’t think of a platform that Csound can’t run on. It’s even been ported to the Apple watch as far as I know.