[Csnd] [Share] - Subtractive synth sketch

Hi All,

I was doing some live coding sketch work today and thought I'd share
the synth as I thought it sounded rather lovely. It's available online
at the Csound IDE at:

https://ide.csound.com/editor/LBpThLxJHQ8SVBHNK2Hr

(Also attached is a zip of the project.)

It uses my livecode.orc for some common UDOs I use. The interesting
part for me was the 50% keyboard tracking I added which I thought gave
it a nice balance across the octaves for the filtered cutoff:

instr S1
  ioct = octcps(p4)

  irel = 8

  ;; two saw oscillators slightly detuned
  asig = vco2(p5, p4)
  asig += vco2(p5, p4 * semitone(random:i(.023, .05)))
  asig *= 0.5
  aenv = transegr:a(0, 4, 0, 1, irel, -4.2, 0, irel, -4.2, 0)

  ;; oct value: 50% keyboard tracking + base 4 + aenv modulation
between 1-2 octaves
  asig = zdf_2pole(asig, cpsoct((aenv * random:i(1,2)) + 4 + (ioct * .5)), 1)

  ;; extra env for declicking
  asig *= linen:a(1, 0.01, p3 + irel, .01)

  pan_verb_mix(asig, random:i(0, 1), 0.05)
endin

transegr is set using linear attack and exponential decay with -4.2
curves which has been my go-to for a while now.

Cheers!
Steven

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        Issues · csound/csound · GitHub
Discussions of bugs and features can be posted here

saw-fields.zip (64.1 KB)

hi steven -

thanks for sharing!!! your code is always so inspiring, and for me somehow the classical new way of csound coding — clean and compressed but modularized ...

by "keyboard tracking" you do not mean the computer keyboard, but a piano keyboard, right? and by 50% you mean that half of our ioct range is covered (ioct * .5)?

cheers -
  joachim

Hi Steven,
thanks a lot for sharing this code. There are many interesting instruments and UDOs in your "library" file. Some of them look very inspiring and give me ideas.

Also, as Joachim pointed out: your code is very clean and slim. Although I use the modern Csound syntax wherever possible, I didn't completely realise its whole potential. Another lessong for future code!

Best wishes,

Jeanette

Yes, maybe others know it better as key tracking, just using the
frequency of the "keyboard key" (or here, p4) to modulate the cutoff
frequency. So here with a positive key tracking value the higher the
frequency for the note, the higher the frequency of the filter cutoff.
I liked it here as it changed the timbral quality, softening the color
of the lower notes a bit and leaving space for the higher notes to be
bright and rich. The ioct * .5 is the 50%, yes; it was enjoyable
exploring different values there between base oct value for the cutoff
and amount from the "keyboard" (p4) to shape the color of the sound
over the frequency range. :slight_smile:

Thanks Jeanette, happy that others find it useful. Enjoy!

really lovely steven. thanks so much for sharing,

Very nice, Steven. I always learn from your code.

  • Dave