[Csnd] Code Share: Rhythmic FM Waves
| Date | 2020-09-25 02:53 |
| From | Steven Yi |
| Subject | [Csnd] Code Share: Rhythmic FM Waves |
Hi All,
I thought I'd share another sound design using 4 operator FM that has
a Cascade + Parallel Modulator setup:
https://ide.csound.com/editor/V98HgenVwUWDhF4EW3r3
The primary instrument code is as follows:
instr FM4OP
ifreq = p4
kfreq = oscil(p5, array(1,4,2,3,7)) * ifreq
kmodfreq = kfreq
kmodfreq2 = kfreq * 4
amod2 = oscili(kmodfreq2 * oscil(.7, array(0,4,2,3,5)), kmodfreq2)
amod = oscili(kmodfreq * oscil(1, array(0,4,5,1,3)), kmodfreq + amod2)
amodp = oscili(ifreq * 6 * expon:a(4, p3, .001), ifreq * 6)
asig = oscili(.25, kfreq + amod + amodp)
asig *= expon:a(0.5, p3, .001)
pan_verb_mix(asig, random:i(0.3, 0.7), 0.5)
endin
(Uses an oscil UDO from livecode.orc that accepts arrays for
wavetable; pan_verb_mix is also from that library and is for hooking
into the mixer)
The layout of operators is [ amod2 -> amod -> asig ] for the cascade
and amodp for the additional parallel modulator.
I rather enjoyed this one as I thought the rhythmic modulation of the
indices at different rates made for an interesting evolution of
timbre. (Reminded me a little of Korg-style wave sequencing.)
Enjoy!
Steven
Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here |
| Date | 2020-09-25 08:03 |
| From | Oeyvind Brandtsegg |
| Subject | Re: [Csnd] Code Share: Rhythmic FM Waves |
Nice sounds! I was unfamiliar with the use of arrays to make a sequence of frequencies for an oscillator. Could you help me understand how this works: oscil(p5, array(1,4,2,3,7)) ? All best Øyvind fre. 25. sep. 2020 kl. 03:53 skrev Steven Yi <stevenyi@gmail.com>: Hi All, |
| Date | 2020-09-25 14:56 |
| From | Steven Yi |
| Subject | Re: [Csnd] Code Share: Rhythmic FM Waves |
Thanks! The oscil is a UDO from livecode.orc here: https://github.com/kunstmusik/csound-live-code/blob/master/livecode.orc#L966-L974 and the code is pretty simple: /** Custom non-interpolating oscil that takes in kfrequency and array to use as oscillator table data. Outputs k-rate signal. */ opcode oscil, k, kk[] kfreq, kin[] xin ilen = lenarray(kin) kphs = phasor:k(kfreq) kout = kin[int(kphs * ilen) % ilen] xout kout endop It's going to copy the array input every k-pass as that's what happens with UDOs in CS6 but otherwise it works out well. On Fri, Sep 25, 2020 at 3:03 AM Oeyvind Brandtsegg |
| Date | 2020-09-25 17:40 |
| From | Oeyvind Brandtsegg |
| Subject | Re: [Csnd] Code Share: Rhythmic FM Waves |
Ah that is neat! fre. 25. sep. 2020, 3:56 p.m. skrev Steven Yi <stevenyi@gmail.com>: Thanks! The oscil is a UDO from livecode.orc here: |
| Date | 2020-10-01 22:34 |
| From | "Dr. Richard Boulanger" |
| Subject | Re: [Csnd] Code Share: Rhythmic FM Waves |
nice. thanks. Dr. Richard Boulanger On Thu, Sep 24, 2020 at 9:54 PM Steven Yi <stevenyi@gmail.com> wrote: Hi All, |