Cabbage Logo
Back to Cabbage Site

Additive synthesis. 3 synths

Hi,

I’ve been working with additive synthesis. I made a synth with two variants: Realtime and Non-realtime. Also, I’ve ported the 30 Harmonics FLTK synth that @iainmccurdy did. Unfortunately, as I had to comply with a 1024x600 screen resolution I only had room for 24 partials.

Regarding my synths, you’ll see that I have a texteditor for building the envelopes. There are three possibilities: GEN05, GEN07 and GEN16. The first letter in the string determines which one you want(“l”, “e”, “t”). Also you must know that the Non-realtime version uses percentages and the Realtime uses time (in seconds) instead. The cool thing is that one can create very elaborate envelopes and at the same time be able to visualize them.

Some basic examples would be:
Non-realtime (percentages):

  • “l 0 100 1” -> linseg from 0 to 1 in 100% of p3
  • “e 0.001 50 1 50 0.001” -> exponseg
  • “t 0 25 2 .8 25 -2 1 25 2 .8 25 -2 0” -> transeg. 25% of p3 for each segment. Bell-like envelope.

Realtime(seconds):

  • “l 0 .1 1” -> linseg from 0 to 1 in 0.1 seconds
  • “e 0.001 .1 1 .1 0.001” -> exponseg
  • “t 0 1 2 .8 1 -2 1 1 2 .8 1 -2 0” -> transeg. 1 second for each segment.

In the Realtime version, all the envelopes behave like the r-versions of the corresponding opcodes. The last segment is treated as the release segment.

Other features include:

  • Recording
  • Saving and recalling presets
  • Tuning the instrument
  • Adjusting (in cents) each key of the keyboard.

I made both synths as educational tools to demonstrate additive synthesis, but they are fun to play with if you try them simultaneously and with some Cabbage effects (Formant filter, reverb, etc) in the chain. I use Jack for that.

I’d like to thank Rory for implementing all the stuff I needed and Iain for all the time he must have spent implementing such a vast amount of things in Csound/Cabbage!

Cheers.

Additive.zip (23.0 KB)

Cool. I think this is the first example I’ve seen that allows users to interact with text editors. It’s always cool to see new features being used!

btw, there is a way to have 30 sliders… let me prepare an example for you. it’s a bit of a hack, but let us see…

Something like this would work. One just has to be careful to avoid the automatic scrollbars that Cabbage adds when components are placed off the screen.
TooManySliders.csd (3.4 KB)

Hi,

many thanks for your great instruments! I like additive synthesis and how you implement this thecnique in your code. Many thanks for shared!

R

1 Like

Genius! I have to play more with plants.