Csound Csound-dev Csound-tekno Search About

Www.dominet.com.tr/members/okonsar

Date1997-05-02 22:19
FromMehmet Okonsar
SubjectWww.dominet.com.tr/members/okonsar
Www.dominet.com.tr/members/okonsar
My homepage about electronic composition, fractals and piano playing
Visits and comments are welcome
Mehmet

----------
From:  Richard Wentk[SMTP:leo@rwentk.demon.co.uk]
Sent:  01 Mayýs 1997 Perþembe 16:03
To:  csound@maths.exeter.ac.uk
Subject:  Re: gen routines

At 01:33 01/05/97 -0500, you wrote:

>the manual comments on the f1 as using gen1 to compute a sine wave.   My
>question is this sine wave actually becomes part of the sound?  and if this
>is the case, why is it NOT included in the *.orc file?   I understood the
>*.sco file to be basically the notes to be played, not to further define the
>instrument.

The way this works is:

The score file creates a list of notes AND fills the tables used in the
instruments.

The instruments then refer to the tables when they start making a noise. In
the example the '1' on the end of the oscil statement means that the
oscillator is a making a sound using the waveshape stored in table 1.

The data in the tables can be changed at any time, which means you can use
the score to switch the sound that an oscillator plays whenever you like.
For example 

f1 0 4096 10 1
f1 2 4096 10 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 

means that after two time units any instruments that use the data in table
one will start playing a horrible buzzy sound instead a pure sine.

I haven't tried it, but my guess is that you can't change the sound of an
instrument after it's started. The sound will only change if you
reinitialise the instrument - hence no funky wavesequencing effects, at
least not without major effort. Can someone confirm this? 

Don't forget that tables can contain control data too. You could, for
example, swap between different sets of pitches when using a instrument
that picked and played a pitch from a set at random. So using this facility
you could set up different 'chords' (or whatever) at different times.

And finally - no, it doesn't particularly make sense having the table data
in the score file. In many ways it doesn't make sense having the data in
two files at all, but Csound uses an 'orchestral' idiom where notes and
instruments are completely separate entities. 

I suppose the idea is that the tables are rather like Csound's equivalent
of 'put down that viola and pick up a cello at this point', which is why
the table info ended up in the score file. In short - table definitions and
notes happen at a certain time,  instrument definitions apply to the whole
piece. The other reason is that when Csound was written, memory was not as
cheap and plentiful as it is today. So it made sense to have a mechanism
where a single table could be used for different things at different times.

But just as most players don't swap instruments half way through, the
ability to change the data in a table doesn't seem to get much use. Today,
most people seem to prefer creating a different table instead, because it
makes the code clearer. Still, the facility is there if you want it. 

Hope that helps, 

R.