Re: [LAU] need little help with csound

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <linux-audio-user@...>
Date: Thursday, March 28, 2013 - 2:52 pm

Rustom Mody writes:


es1/StandingWaves1.html Along with that I want to demo how it would sound
using something like csound ie for a freqs from {440 880 1320 1760...}show
how the sound changes as each freq is added to the fundamental sine wave at

csound... not my cup of tea. In SuperCollider you can do it IMO more easily.
Then again, I'm biased (being an avid SuperCollider user for over 10 years).

SynthDef(\sine, { |freq, amp = 0.1, gate = 1|
var eg =, amp, 0.1), gate, doneAction: 2);,, 0, eg) ! 2);

g =;

p = Pbind(\instrument, \sine, \type, \on, \freq, 440 * Pseries(1, 1, inf),
\amp, 0.1 / Pseries(1, 1, inf), \group, g).play;

// when done:
p.stop; g.release;

If you want different amplitudes, substitute a different pattern after \amp.
This example posits an inverse relationship between the partial's frequency
and its amplitude, i.e., a sawtooth.

Disclaimer: I wrote this on a tablet without testing the code... and we all
know how that usually turns out. There could be mistakes, but the principle
is right.

Again IMO (and admitting my bias), if you have to make a choice between
learning csound or SuperCollider, choose SuperCollider.


Linux-audio-user mailing list

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [LAU] need little help with csound, James Harkins, (Thu Mar 28, 2:52 pm)
Re: [LAU] need little help with csound, Rustom Mody, (Thu Mar 28, 4:35 pm)
Re: [LAU] need little help with csound, James Harkins, (Sat Mar 30, 1:35 am)