Modular Synthesizer


8 posts
by Ludo@Home » Fri May 25, 2012 7:04 am
Hi - how about a project of a modular music synthesizer ?

One module is the controller and screen GUI etc ...
Other modules are software versions of VCO, VCA, ADSR ... the whole lot.
Communications between modules is broadcast over TCP

Any interest here ?

Ludo
Posts: 4
Joined: Fri May 25, 2012 6:59 am
by ArborealSeer » Fri May 25, 2012 9:37 am
i love tinkering with music related stuff..

over tcpip.. isn't there a standardised MIDI over LAN protocol already?
Pi Status > Farnell, Arrived 24/5- RS, Arrived 1/6
User avatar
Posts: 292
Joined: Tue Jan 24, 2012 9:48 am
by Ludo@Home » Fri May 25, 2012 9:55 am
Agreed, I believe there is - but I believe this (obviously) only is about the digital stuff - that would not "mimic" the analog nature of a modular synthesizer like the early-day's Moogs, ARPs and Roland etc ...

What I'd like to do is broadcast the values of the audio and control voltages as well as gates and switch settings over TCP. In this scenario, MIDI should be limited to well, eeuuhhr - the MIDI interface module.

Ludo
Posts: 4
Joined: Fri May 25, 2012 6:59 am
by rurwin » Fri May 25, 2012 10:14 am
It would not be possible in real-time under a standard Linux.

To produce CD quality sound you need to process samples at a rate of 44,000 per second. that's a loop time of 22 microseconds, and a maximum latency of say 5 microseconds. Any failure to achieve that rate will be heard as a click.

And that's mono, not stereo.

It would be possible to achieve those sorts of rates if you threw away Linux and worked on the bare system, but that's a lot of work since you need to implement an SD driver, a FAT driver, a USB driver and a TCP/IP stack at the minimum, while still maintaining that 5 microsecond latency. It would be tough, but it would be very powerful when you had it working.

If you use an Arduino, then your interlink probably should be I2C or similar, and each Arduino could only be very simple -- just a single function on each. You could do the same on a RaspPi, by ignoring the Ethernet, USB, keyboard, mouse and SD card and just wiring some switchesto the GPIO pins. (You could probably use the screen.) In that case each RaspPi would be something like ten times as powerful as an Arduino.
User avatar
Forum Moderator
Forum Moderator
Posts: 2913
Joined: Mon Jan 09, 2012 3:16 pm
by Ludo@Home » Fri May 25, 2012 11:22 am
Thanks Rurwin - I see your point, though I don't quite understand why Linux would not be able to do so. You do have software synths that run very well on *any* Linux, or audio tools/filters/stomp-boxes. Just to make sure : after many many years of WinDos, I only started using Linux a few month ago - so I have no in-depth Linux knowlegde yet. So, I'm not even considering bare-system programming.

And no, I don't believe 44.1kHz-24bit would be required while still having all the fun (and my ears don't reach anything further than 22kHz-14bit ... :mrgreen: ). Also note that every single module would be one single RPi. So basically total CPU capacity would be times-n. A VCO would only need to oscillate - a VCA only to amplify. Well, you know the picture.

I'm afraid I don't understand the 5us latency you suggest. I would be more then happy if any module would be as responsive as 1ms - in e.g. a 10 module chain (which is already a fairly long chain), that would still only be 10ms which is hardly noticable I would think. But I probably understand it wrong.

Ludo
Posts: 4
Joined: Fri May 25, 2012 6:59 am
by Ravenous » Fri May 25, 2012 11:42 am
Not sure exactly what is being asked for here... are you suggesting several Raspis, one being the display and running the system, the others each being one of a VCO/VCA/VCF/LFO/Whatever, all squirting data (or real audio) between each other in real time?

Or are you asking for something that runs on one Raspi, in which case a normal softsynth would do?
Posts: 1554
Joined: Fri Feb 24, 2012 1:01 pm
Location: UK
by Ludo@Home » Fri May 25, 2012 12:46 pm
Indeed : every module is a single RPi (as a matter of fact - programmable modules).

All audio/control voltages/switch settings etc ... to go over *some* interface (either TCP, I2C ... whatever is fast enough without the need for soldering extra high-cost interface boards.

The obviously, audio-outs could be used as individual audio outs for *whatever* other purpose. Effect returns from external effects would obviously need the development/use of some AD interface.
Posts: 4
Joined: Fri May 25, 2012 6:59 am
by Ravenous » Fri May 25, 2012 1:31 pm
Way beyond my abilities but yep it sounds possible, though perhaps not over the full audio spectrum (I know nothing about digital audio programming or transmission.)

You could "patch" the modules to each other via GPIO pins, or have them all bussed to one line and coded data (in some form???) being sent from one to another.

It would be interesting (not useful, just interesting) to see if the GPU's cores could be used as individual modules... one Raspi has lots of cores and they must be able to do maths of some sort...
Posts: 1554
Joined: Fri Feb 24, 2012 1:01 pm
Location: UK