[Csnd] newbie questions

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

Hi Tom,
I can only answer a few of these. Maybe it helps. :slight_smile:
Mar 22 2021, Tom Peters has written:
...

3) I apply the ADSR envelope at the output, twice, which I think is not logical or optimal. The examples suggest to apply it to the amplitude parameter but that does not work with oscils. Please advise.

It does not work with oscils, because it only allows for constant volume
(iamp instead of kamp, aamp or xamp). xsomething means that the
parameter can be i-rate, k-rate or a-rate, usually.
You can use oscil or poscil. Or with osils:
aOscil = oscils(iAmp, iCps, iPhase)
aOscil *= kAdsr

4) Is there a neater way to sound a chord of specified frequencies without running the instrument multiple times at the same time point?

Depends. It's the way a hardware synth would do it, allocate one
complete voice for a note.

If you have a very simple and restricted use case, i.e. always three
note chords, you could put three oscillators into one instrument and
have three parameters for the three different notes.

Or you could double wrap: create one instrument that plays one note,
write another instrument that will call the first instrument three times
and that accepts three not values.

Or you can work with arrays and write a UDO (User defined opcode) that
calls itself recursively...

5) I am confused if, when, and how to use a table to generate an oscillation: in some of the examples I do not see how it is used in the instrument or how the frequency is applied. Some directives?

...
There are many different oscillators. Some fall under the "f-table"
based oscillators. Something like vco2 brings its own waveforms, oscils
comes with a default waveform. Also many - if not all - oscil* opcodes
can default to playing a sine wave, if the ftable parameter is -1 . It's
a shortcut for convenience. It's something to get used to. Soon you'll
know the basic oscillator families and when to look for what.

I have no idea, how things are organised in CsoundQT, maybe there are
pointers.

HTH, best wishes,

Jeanette