Csound Csound-dev Csound-tekno Search About

Re: gen routines

Date1997-05-01 14:02
FromRichard Wentk
SubjectRe: 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.









Received: from stork2.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa01602;
          2 May 97 0:18 BST
Received: from goggins.bath.ac.uk by stork.maths.Bath.AC.UK id aa05106;
          2 May 97 0:17 BST
Received: from hermes.ex.ac.uk by goggins.bath.ac.uk with SMTP (PP);
          Fri, 2 May 1997 00:17:31 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (AAA00250);
          Fri, 2 May 1997 00:04:33 +0100
Received: from hermes.ex.ac.uk by maths.exeter.ac.uk;
          Fri, 2 May 97 00:04:26 +0100
Received: from ulysses.Stanford.EDU [36.49.0.124] by hermes 
          via ESMTP (AAA00240); Fri, 2 May 1997 00:04:24 +0100
Received: (from tkunze@localhost) 
          by ulysses.stanford.edu (950413.SGI.8.6.12/950213.SGI.AUTOCF) 
          id QAA03001 for csound@maths.exeter.ac.uk;
          Thu, 1 May 1997 16:05:17 -0700
From: Tobias Kunze 
Message-Id: <9705011605.ZM3000@ulysses.stanford.edu>
Date: Thu, 1 May 1997 16:05:16 -0700
Reply-To: t@ulysses.stanford.edu
X-Url: http://www.stanford.edu/~tkunze
X-Mailer: Z-Mail (3.2.3 08feb96 MediaMail)
To: Csound mailing list 
Subject: indexing overflow
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk


This is another one that bugged me a while ago, and now again.
Let sr=22050, kr=25, ksmps=882, then:

 | Csound Version 3.44 (May  1 1997)
 | orchname:  /tmp/tkunze.protozoo-new.cec.orc
 | scorename: /tmp/tkunze.protozoo-new.cec.sco
 | sorting score ...
 |         ... done
 | orch compiler:
 | 856 lines read
 |         instr   10
 |         instr   20
 |         instr   21
 |         instr   30
 |         instr   40
 | MIT Csound: 3.44 (May  1 1997)
 | indexing overflow error

kr=50, ksmps=441 works...


-- 

______________________________________________________________________

Tobias Kunze                       t@kunze.stanford.edu
CCRMA, Stanford University         http://www.stanford.edu/~tkunze




Received: from stork2.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa02160;
          2 May 97 7:12 BST
Received: from goggins.bath.ac.uk by stork.maths.Bath.AC.UK id aa07020;
          2 May 97 7:11 BST
Received: from hermes.ex.ac.uk by goggins.bath.ac.uk with SMTP (PP);
          Fri, 2 May 1997 05:46:48 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (FAA10161);
          Fri, 2 May 1997 05:39:09 +0100
Received: from hermes.ex.ac.uk by maths.exeter.ac.uk;
          Fri, 2 May 97 05:39:03 +0100
Received: from root@odin.cmp.ilstu.edu [138.87.1.13] by hermes 
          via SMTP (FAA10154); Fri, 2 May 1997 05:39:02 +0100
Received: from line7093.ras.ilstu.edu 
          by odin.cmp.ilstu.edu (AIX 4.1/UCB 5.64/4.03)          id AA92104;
          Thu, 1 May 1997 23:39:05 -0500
Date: Thu, 1 May 1997 23:39:05 -0500
Message-Id: <1.5.4.16.19970501233817.26cf74f2@odin.cmp.ilstu.edu>
X-Sender: jcberne@odin.cmp.ilstu.edu
X-Mailer: Windows Eudora Light Version 1.5.4 (16)
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
To: csound@maths.ex.ac.uk
From: Joe Bernert 
Subject: Re: gen routines
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk



Thanks to all of you that replied to my question....  I at least understand
what the heck the sine wave functions were doing in the score file anyway.  :)

BTW.  someone mentioned there was a "web class" floating around somewhere....
devoted to csound.
I wonder if could get you to post that site again (whoever you are :)  ).  I
lost the address already  ( I know, I know, so slap me)    

again thanks alot!  

Joe





Received: from stork2.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa02180;
          2 May 97 7:13 BST
Received: from goggins.bath.ac.uk by stork.maths.Bath.AC.UK id ae07108;
          2 May 97 7:13 BST
Received: from hermes.ex.ac.uk by goggins.bath.ac.uk with SMTP (PP);
          Fri, 2 May 1997 05:08:44 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (EAA09014);
          Fri, 2 May 1997 04:58:20 +0100
Received: from hermes.ex.ac.uk by maths.exeter.ac.uk;
          Fri, 2 May 97 04:58:13 +0100
Received: from root@discover-net.net [208.134.196.20] by hermes 
          via ESMTP (EAA09006); Fri, 2 May 1997 04:58:11 +0100
Received: from PC_hljmm.discover-net.net (max-ec1-223.discover-net.net [208.134.205.223]) 
          by discover.discover-net.net (8.7.3/8.7.3) with SMTP id WAA03048 
          for ; Thu, 1 May 1997 22:57:15 -0500 (CDT)
Message-Id: 
Priority: Normal
To: csound@maths.ex.ac.uk
Mime-Version: 1.0
From: Hans Mikelson 
Subject: Saw/Ramp Wave Transform and Oscillator Synch Instruments
Date: Thu, 01 May 97 21:52:07 PDT
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
Content-type: multipart/mixed; boundary="862548730=_Mail_2_=1928986665"
Content-transfer-encoding: 7bit

--862548730=_Mail_2_=1928986665
Content-type: text/plain; charset="US-ASCII"; X-MAPIextension=".TXT"
Content-transfer-encoding: quoted-printable

Hello Csounders,

A while ago someone asked for a way to smoothly transform from a saw toot=
h wave to a ramp wave.  I have attached one version of this.  This instru=
ment uses the algorithm for a bouncing ball similar to that used for "Pon=
g" and other video games.  This could be modified to produce a wide varie=
ty of triangle like wave transformations.

I also included an oscillator sync instrument.  Can anyone tell me how =
oscillator sync works when used with a square wave?


|    |    |  \   |     /      Hans P. Mikelson
|  __     |  __/ |  \    |    hljmm@discover-net.net
|__  |__  |__    |__ \_  |__  http://discover-net.net/~hljmm/

--862548730=_Mail_2_=1928986665
Content-type: application/octet-stream; name="RZBOUNCE.ORC"
Content-transfer-encoding: base64

c3IgICAgID0gICAgIDQ0MTAwICAgICAgICAgICAgICAgICAgIDtUaGVzZSBpbnN0cnVtZW50
cyByZXF1aXJlIHNyPWtyDQprciAgICAgPSAgICAgNDQxMDANCmtzbXBzICA9ICAgICAxDQpu
Y2hubHMgPSAgICAgMg0KDQo7LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t
LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQ0KOyBTYXctUmFtcCBUcmFu
c2Zvcm0gUmV6enkgU3ludGgNCjstL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ICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICA7U2F2ZSBZbi0xICYgWW4tMi4NCg0KOy0tLS0tLS0tLS0tLS0tLS0t
LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t
LS0NCmFvdXQgICA9ICAgICBheW4qa2FlbnYgICAgICAgICAgICAgICAgICAgICAgO1NjYWxl
IGFuZCBvdXRwdXQNCiAgICAgICBvdXRzICAgYW91dCxheG4NCg0KICAgICAgIGVuZGlu

--862548730=_Mail_2_=1928986665
Content-type: application/octet-stream; name="RZBOUNCE.SCO"
Content-transfer-encoding: base64

OyBUYWJsZXMNCjstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t
LS0tLS0tLS0tLS0tLS0tLQ0KZjEgIDAgIDEwMjQgIDEwICAxICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgO1NpbmUNCmYyICAwICAyNTYgICA3ICAtMSAgMTI4ICAtMSAgICAw
ICAgICAxICAxMjggICAxICAgIDtTcXVhcmUNCmYzICAwICAyNTYgICA3ICAgMSAgMjU2ICAt
MSAgICAgICAgICAgICAgICAgICAgICAgIDtTYXd0b290aA0KZjQgIDAgIDI1NiAgIDcgIC0x
ICAxMjggICAxICAgIDEyOCAgLTEgICAgICAgICAgICAgO1RyaWFuZ2xlDQpmNSAgMCAgMTAy
NCAgOCAtLjggIDQyICAgLS43OCAgNDAwICAtLjcgMTQwIC43ICA0MDAgLjc4IDQyICAgLjgg
O0Rpc3RvcnRpb24NCg0KOy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t
LS0tLS0tLS0tLS0tLS0tLS0tLS0tDQo7IFNjb3JlDQo7LS0tLS0tLS0tLS0tLS0tLS0tLS0t
LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0NCnQgMCA0MDANCg0KDQo7
LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t
LS0tLS0NCjsgU2F3IFJhbXAgVHJhbnNmb3JtIFN5bmMNCjstLS0tLS0tLS0tLS0tLS0tLS0t
LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQ0KO0lucyAgU3RhIER1
ciBBbXAgICAgUGl0Y2ggICBGY28gICBRDQppMSAgICAwICAgNCAgIDEyMDAwICA3LjAwICAg
IDUwICAgIDUNCmkxICAgICsgICAyICAgMTIwMDAgIDcuMDcgICAgMTAwMCAgMTAwDQoNCjst
LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t
LS0tLQ0KOyBPc2NpbGxhdG9yIFN5bmMNCjstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t
LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQ0KO0lucyAgU3RhIER1ciBBbXAgICBQ
aXRjaCAgIEZjbyAgIFEgIFJhdGlvDQppMiAgICA2ICAgMiAgNDAwMCAgIDguMDMgICAgMTAw
ICAxMCAgMS41DQppMiAgICArICAgNCAgNDAwMCAgIDguMDAgICAgMTAwICAxMCAgMi4wMQ0K
aTIgICAgLiAgIDEgIDQwMDAgICA4LjA3ICAgIDgwICAgMTAgIDEuMjMNCmkyICAgIC4gICAx
ICA0MDAwICAgOC4wNSAgICA3MCAgIDEwICAxLjIwDQppMiAgICAuICAgMSAgNDAwMCAgIDgu
MDcgICAgNjAgICAxMCAgMS4xNQ0KaTIgICAgLiAgIDEgIDQwMDAgICA4LjA1ICAgIDUwICAg
MTAgIDEuMQ0K

--862548730=_Mail_2_=1928986665--


Received: from stork2.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa02526;
          2 May 97 11:07 BST
Received: from goggins.bath.ac.uk by stork.maths.Bath.AC.UK id aa09586;
          2 May 97 11:07 BST
Received: from hermes.ex.ac.uk by goggins.bath.ac.uk with SMTP (PP);
          Fri, 2 May 1997 11:07:19 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (KAA24024);
          Fri, 2 May 1997 10:29:24 +0100
Received: from hermes.ex.ac.uk by maths.exeter.ac.uk;
          Fri, 2 May 97 10:29:16 +0100
Received: from agora.stm.it [194.20.43.1] by hermes via ESMTP (KAA24014);
          Fri, 2 May 1997 10:29:07 +0100
Received: from x (ppp01_08.stm.it [194.21.54.8]) by agora.stm.it (8.8.5/8.6.6) 
          with SMTP id LAA20166 for ;
          Fri, 2 May 1997 11:11:27 +0200 (ITADST)
Message-Id: <33695B70.73A9@agora.stm.it>
Date: Fri, 02 May 1997 05:11:44 +0200
From: Gabriel Maldonado 
X-Mailer: Mozilla 3.01 (Win95; I)
Mime-Version: 1.0
To: Csound Mailing List 
Subject: Saw/Ramp Wave Transform and Oscillator Synch Instruments
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

Hans Mikelson wrote:
> 
> Hello Csounders,
> 
> A while ago someone asked for a way to smoothly transform from a saw tooth
> wave to a ramp wave.  I have attached one version of this.  This instrument 
> uses the algorithm for a bouncing ball similar to that used for "Pong" and 
> other video games.  This could be modified to produce a wide variety of 
> triangle like wave transformations.

See and try my "mirror" opcode source at the url:
http://www.agora.stm.it/G.Maldonado/download.htm

the sintax is:

idest   imirror   isig, ilow, ihigh
kdest   mirror    ksig, klow, khigh
adest   mirror    asig, klow, khigh

As you can see, it can work at any rate and the distance and position of
the two walls (low and high) can be varied at k-rate. Obviously it
allows k-rate != from a-rate. 

bye and happy csounding :)

-- 
Gabriel Maldonado

mailto:g.maldonado@agora.stm.it
http://www.agora.stm.it/G.Maldonado/home2.htm