Csound Eurorack Module

From circuitbending to homebrew stompboxes & synths, keep the DIY spirit alive!

Moderators: Kent, lisa, luketeaford, Joe.

User avatar
racs
Common Wiggler
Posts: 87
Joined: Mon Jun 23, 2014 4:15 pm
Location: Canada

Csound Eurorack Module

Post by racs » Wed Jul 09, 2014 8:27 pm

Has anyone tried this?

I found an interesting article in the Csound journal documenting a eurorack build using an RPi for Csound synthesis, and an arduino to convert CV inputs to MIDI to control Csound parameters on the pi. It seems fairly straightforward, especially since the circuit diagrams are already in place - the most difficult aspect seems to be setting up the circuit for the atmega328.

Add a mini wifi dongle to the RPi, and the Csound sketch could be changed via SSH from the computer or via an LCD, adding endless possibilities for synthesis. I don't see why this wouldn't work with SuperCollider, or any other synthesis program either (although the SC server would have to be booted on startup...)

the article is here: http://www.csounds.com/journal/issue18/eurorack.html

User avatar
Neutron7
Oldschool bleeper
Posts: 1968
Joined: Sun May 23, 2010 12:24 pm

Post by Neutron7 » Wed Jul 09, 2014 11:25 pm

couldn't you just use a cheap adc like the MCP3008 instead of an arduino? Its 10 bits instead of 7(MIDI) and smaller.

User avatar
bennelong.bicyclist
Super Deluxe Wiggler
Posts: 1025
Joined: Sat Jun 29, 2013 2:54 am
Location: Sydney, Australia

Re: Csound Eurorack Module

Post by bennelong.bicyclist » Wed Jul 09, 2014 11:38 pm

racs wrote:Has anyone tried this?
See http://www.qubitelectronix.com/#!nebulae/c23nm

User avatar
racs
Common Wiggler
Posts: 87
Joined: Mon Jun 23, 2014 4:15 pm
Location: Canada

Re: Csound Eurorack Module

Post by racs » Wed Jul 09, 2014 11:50 pm

you mean the nebulae? that's wicked, I didn't know it had Csound integration as well. It also uses a raspberry pi
too bad it's so expensive...
Neutron7 wrote:couldn't you just use a cheap adc like the MCP3008 instead of an arduino? Its 10 bits instead of 7(MIDI) and smaller.
and go straight into the rpi's GPIO pins? that's an interesting thought. Higher resolution and a much smaller form, plus it would save trying to source that obscure USB-MIDI chip.. But you would have to write a script on the pi to convert the data into some format Csound could read - probably OSC? definitely doable, but MIDI would work immediately

User avatar
racs
Common Wiggler
Posts: 87
Joined: Mon Jun 23, 2014 4:15 pm
Location: Canada

Post by racs » Wed Jul 09, 2014 11:54 pm

http://static.wixstatic.com/media/59afb ... f7f9b7.jpg

hah, the back of the nebulae shows it's pretty much an UNO circuit connected to a raspberry pi...

(how do you resize images?)

User avatar
c1t1zen
Wiggling with Experience
Posts: 295
Joined: Mon Jan 16, 2012 10:38 am

Post by c1t1zen » Thu Jul 10, 2014 12:52 am

I've been slowly playing around with this idea. I love the Nebulae, and have tested all the Csound apps that have been created for it. My favorite is the Plucked app using Karplus-Strong algos.

I recently got an RPi and installed this distro...
https://ccrma.stanford.edu/~eberdahl/Satellite/

comes with PD and a few other apps. I still need to get the Arduino to piggyback and play with it more in a modular synth setup. It's crazy how cheap these computers are now. Wait a few years and Euro will have everything you can imagine with a mini computer behind it, Want to convert a couple of your LFO modules to VCOs and ADSRs? easy just load up the program. A small portable system can be like a chameleon of different modules.

User avatar
widdly
Super Deluxe Wiggler
Posts: 1096
Joined: Wed Jan 21, 2009 1:31 am
Location: australia

Post by widdly » Thu Jul 10, 2014 4:28 am

Neutron7 wrote:couldn't you just use a cheap adc like the MCP3008 instead of an arduino? Its 10 bits instead of 7(MIDI) and smaller.
Agreed. The Arduino seems unnecessary. The pd stuff for RPi looks good. There is a gpio external designed for read/write to the io pins on the board.

User avatar
Synesthesia
Northern Light Modular
Posts: 1567
Joined: Wed Sep 02, 2009 8:35 am
Location: Limerick, Ireland
Contact:

Post by Synesthesia » Thu Jul 10, 2014 4:53 am

that sounds bloody interesting - I have a RPi doing nothing here ...

User avatar
mskala
Super Deluxe Wiggler
Posts: 2730
Joined: Thu Mar 27, 2014 7:33 am
Location: Toronto
Contact:

Post by mskala » Thu Jul 10, 2014 9:55 am

I built an Odroid (single board ARM Linux computer)-based module primarily for MIDI interfacing, but I plan to run Csound on it as well. I haven't tested that part yet. Making it voltage controlled would require adding a better ADC; at the moment it only has the Odroid's microphone input. Being able to SSH to my synthesizer and do MIDI-over-Ethernet and so on is certainly nice.

User avatar
racs
Common Wiggler
Posts: 87
Joined: Mon Jun 23, 2014 4:15 pm
Location: Canada

Post by racs » Thu Jul 10, 2014 2:04 pm

widdly wrote:Agreed. The Arduino seems unnecessary. The pd stuff for RPi looks good. There is a gpio external designed for read/write to the io pins on the board.
you mean RPIO? the only problem I could see without the arduino is the lack of Analog Read options on the raspberry pi should you want to add a couple pots or something... plus you can build an UNO circuit for a few dollars worth of components

c1t1zen wrote:Wait a few years and Euro will have everything you can imagine with a mini computer behind it
the best part about this is that the pieces are already there, someone just needs to put them together


Honestly I'm fairly surprised that the nebulae doesn't have wifi options, all it needs is a mini wifi dongle to connect to your network. Although, after reading the manual, it seems to have a script for reading sketches and sound files off the root of a flash drive which is a pretty genius (and simple) solution

adam
Super Deluxe Wiggler
Posts: 2919
Joined: Wed Dec 25, 2013 6:24 am

Post by adam » Thu Jul 10, 2014 4:56 pm

looks like the nebulae rpi has had it's usb sockets removed

the ccarma thing is a rpi/uno combo i think, just plugging uno in by usb i expect

User avatar
c1t1zen
Wiggling with Experience
Posts: 295
Joined: Mon Jan 16, 2012 10:38 am

Post by c1t1zen » Thu Jul 10, 2014 6:08 pm

racs wrote:Honestly I'm fairly surprised that the nebulae doesn't have wifi options, all it needs is a mini wifi dongle to connect to your network. Although, after reading the manual, it seems to have a script for reading sketches and sound files off the root of a flash drive which is a pretty genius (and simple) solution
Yeah, having it autoload from the root means you can have a few USB sticks with different apps and just switch it out. Only issue is you have to restart the whole rack to restart that one module. :sadbanana:

WiFi would be awesome with this idea, I'm imagining a matrix patcher and sequencer all in an ipad app connected over WiFi and the module is simply the jacks.

User avatar
widdly
Super Deluxe Wiggler
Posts: 1096
Joined: Wed Jan 21, 2009 1:31 am
Location: australia

Post by widdly » Thu Jul 10, 2014 8:33 pm

racs wrote:
widdly wrote:Agreed. The Arduino seems unnecessary. The pd stuff for RPi looks good. There is a gpio external designed for read/write to the io pins on the board.
you mean RPIO? the only problem I could see without the arduino is the lack of Analog Read options on the raspberry pi should you want to add a couple pots or something... plus you can build an UNO circuit for a few dollars worth of components
I was thinking that you could hook an dac or an adc IC straight to the GPIO pins. Even better, there are i2c and spi interfaces on the Rpi with kernel drivers. I'd rather use those and write a simple external for PD to read/write them. You could then run them at higher samplerates and wordlengths than the arduino ADC's and PWM outputs.

Also I'm getting an Rpi this weekend. Woot!

User avatar
racs
Common Wiggler
Posts: 87
Joined: Mon Jun 23, 2014 4:15 pm
Location: Canada

Post by racs » Fri Jul 11, 2014 12:21 pm

Yeah, RPIO is an external for read/write on the GPIOs. I haden't thought of i2c though, that's a good idea, you'd just have to make sure you got an ADC with an I2C interface. It'd be super easy to write a script in python to handle I2C to OSC, much easier than PD

I also just ordered another pi! I think I'm gonna try this out...


Presumably the USB port on the nebulae was just moved to the front panel... you can see the audio port was. if that's the case, I wonder if you could plug a USB wifi device into the front panel's plug?

giokafir
Learning to Wiggle
Posts: 2
Joined: Fri Jul 11, 2014 12:18 pm

Post by giokafir » Fri Jul 11, 2014 12:25 pm

The thread is wonderful and i like the discussion that has been discussed here.

User avatar
ersatzplanet
Synthwerks Design
Posts: 6918
Joined: Fri Mar 06, 2009 1:18 pm
Location: Seattle WA

Post by ersatzplanet » Fri Jul 11, 2014 12:25 pm

c1t1zen wrote: Yeah, having it autoload from the root means you can have a few USB sticks with different apps and just switch it out. Only issue is you have to restart the whole rack to restart that one module. :sadbanana:
I haven't tried it yet on my Nebulae because I mainly use the program they supplied, but if you hold down the EDIT button and then hit the NEXT button, the Nebulae will load a new set of sounds into it. Maybe if the stick has been changed it will find the new .CSD file and load it too.
-James

James Husted - Synthwerks, LLC - www.synthwerks.com - info@synthwerks.com - james@synthwerks.com
Synthwerks is a proud member of the Mostly Modular Trade Association (http://www.mostlymodular.com).
Always looking to trade for Doepfer P6 cases

User avatar
racs
Common Wiggler
Posts: 87
Joined: Mon Jun 23, 2014 4:15 pm
Location: Canada

Post by racs » Fri Jul 11, 2014 12:42 pm

edit: whoops didn't read properly

I did, however, just find this: https://learn.adafruit.com/reading-a-an ... spberry-pi
which basically walks you through connecting the MCP3008 to the rpi. As I see it that makes the audio/cv inputs very simple. But what about the outputs? DAC or usb interface? A DAC might not have enough I2C/I2S pins left to connect

User avatar
windspirit
Super Deluxe Wiggler
Posts: 3085
Joined: Thu Sep 20, 2012 11:43 pm
Location: krellifornia

Post by windspirit » Fri Jul 11, 2014 2:42 pm

I2C/ I2S is a digital bus, much like usb for microcontrollers. All I2x have an address, so as long as the devices have different addresses you can connect many I2x devices to the same pin. That is not to say that your processor will run fast enough to have a bunch of peripherals with fast sample rates and work accurately. I know some out there who have done this prefer to use a combo adc/dac chip.

Has anyone mentioned the hifi shield for the rpi yet?

adam
Super Deluxe Wiggler
Posts: 2919
Joined: Wed Dec 25, 2013 6:24 am

Post by adam » Fri Jul 11, 2014 4:26 pm

windspirit wrote: Has anyone mentioned the hifi shield for the rpi yet?
i don't believe they have

User avatar
mxmxmx
Super Deluxe Wiggler
Posts: 2243
Joined: Thu May 31, 2012 1:54 am
Location: berlin

Post by mxmxmx » Fri Jul 11, 2014 6:20 pm

adam wrote:
windspirit wrote: Has anyone mentioned the hifi shield for the rpi yet?
i don't believe they have
well, indirectly. the rpio as well as its (soon) slightly improved sibling, the terminal tedium both rely on the driver for the pcm5102a DAC, which i'd guess is courtesy mostly of the hifiberry folks. i didn't use it as it was unavailable at the time plus would drive up the cost of building a/the module considerably for no particular reason. another option would be wm8731 and i figure there's a couple of other supported codecs.
I did, however, just find this: https://learn.adafruit.com/reading-a-an ... ng-audio-v olume-with-the-raspberry-pi
which basically walks you through connecting the MCP3008 to the rpi. As I see it that makes the audio/cv inputs very simple. But what about the outputs? DAC or usb interface? A DAC might not have enough I2C/I2S pins left to connect
that'll depend i'd say. if you're after a standalone / line level device, using an usb interface is probably the quickest and cheapest solution, it'll be less elegant when doing a module. (if standalone, the odroid U3 as someone mentioned is a nice (if pricier) alternative. it already has a proper codec on board. unsurprisingly, it can pull of things the raspberry can't. the newer ones even come with SPI broken out on the little expansion header.) the mcp3008/3208 is indeed easy to use, but it'll be suitable for CV only, not audio. there's plenty of pins left at any rate, SPI and i2s are on different headers even.

while it probably wouldn't hurt from a data acquisition perspective, using a microcontroller doesn't make that much sense (IMO) in that at some point most use cases will have to rely on OSC, midi or some such thing and then why bother. definitely for digital inputs i'd recommend just using the GPIO / wiringPI directly, not an atmega or the like.

User avatar
logicgate
Super Deluxe Wiggler
Posts: 1466
Joined: Wed May 30, 2012 11:43 am
Location: Fillory

Post by logicgate » Fri Jul 11, 2014 6:26 pm

giokafir wrote:The thread is wonderful and i like the discussion that has been discussed here.

Pleonasm?

User avatar
CJ Miller
Super Deluxe Wiggler
Posts: 4256
Joined: Thu Apr 28, 2011 3:10 pm
Location: Mumfordshire

Post by CJ Miller » Fri Jul 11, 2014 9:19 pm

I was thinking about a standalone Csound thingee tonight. My big conceptual leap is that I have only used Csound 3 for non real time rendering. It supposedly had some real time capability, but I hadn't been able to use it. The RPi side of things sounds straightforward enough, but I'd probably need to re-learn Csound. Which relegates this to a "not now" project.

User avatar
widdly
Super Deluxe Wiggler
Posts: 1096
Joined: Wed Jan 21, 2009 1:31 am
Location: australia

Post by widdly » Fri Jul 11, 2014 10:43 pm

There is a supercollider build for rpi too. I reckon that would be more fun that csound if you like coding rather than patching. The network and osc stuff in supercollider would be great for a headless computer

adam
Super Deluxe Wiggler
Posts: 2919
Joined: Wed Dec 25, 2013 6:24 am

Post by adam » Sat Jul 12, 2014 12:46 am

i thought this was the hifi shield in question http://www.element14.com/community/comm ... wolfson_pi

User avatar
mxmxmx
Super Deluxe Wiggler
Posts: 2243
Joined: Thu May 31, 2012 1:54 am
Location: berlin

Post by mxmxmx » Sat Jul 12, 2014 3:40 am

adam wrote:i thought this was the hifi shield in question http://www.element14.com/community/comm ... wolfson_pi
i don't know. there's been a bunch of "hifi" shields recently, with the wolfson one having the least appealing form factor (well, to my mind).

anyways, this one has been mentioned, like most other things, in some of the other raspberry threads. here for example

Post Reply

Return to “Music Tech DIY”