Tutorial 4: the global curves.

Introduction :
The global curves are a way to influence globally parameters of several sounds.

We saw that a big number of objects can be imbricate as Russian dolls. If you wish for example to modify frequency of a set of sub-objects, it's enough to create a global curve in the parent object, so it will influence potentially all cSound modules generating sounds. Potentially, because the cSound module must be receptive to these curves, which isn't the case by default.

Every imbrication level of sub-objects can have one or several global curves there, they'll pile up and will be get back by cSound modules in end of chain.

Two kinds of curves exist. The predefined ones and those to be defined by the user.



A) Predefined globale curves:

Each of these curves has a well defined function, CSound module manage it automatically.

Out Level:
Fluctuate sound level. It apply on instrument output.


Frequency:
Fluctuate instrument frequency.
A CSound module can be influenced only if it has a frequency parameter.


Xpan: Modify stereo balance with the folowing formula:
apan2 = a_xpan*3.14159265*.5
audio_out1 = sin(apan2)*0.7071*audio_out1
audio_out2 = cos(apan2)*0.7071*audio_out2
Xpan apply on instrument output


SourceMix: (only specific to effects)
Add sound source and effect. Proportion of each are defined by curve value.

A positive value modify only effect: destination = 100% source + effect fluctuation.
A positive value modify only source: destination = 100% effect + source fluctuation.

 

Practice:

In the" soundpalette " sheet create the cSound interface « Sine Wave ».
Then create several "tracks" containing « Sine Wave » notes (use stamp tool).




2) Create a global curve:
Now, open a "track" and create inside it a global curve (right button + add global curve). Then choose « G35 :frequency» in the menu.

If necessary you can change global curve number in "properties" window.

The curve is ready. Lengthen its duration so that it covers all the notes.

In the « graphic editor », draw variations on this curve. Listen to the result.

Now, create other global curves in various place : in the "root" of the " main view " and in "tracks". Like the screen capture below.


a, b, c are 3 global curves of frequency. Please, reproduce it in the same place and listen to the result.




B) User defined global curves:

First create an "FM_tutorial" interface in "Sound Palette".
Select "global channel" sheet. Clic on curve prototype number 2.

Then in properties window setup a name "my receiver" as example. Define the kind of curve (ampl/freq/user) and eventually the interface (used to know units in the "graphique editor")


By default a CSound module isn't receptive to user defined global curve.
To have a CSound module parameter influenced it is necessary to add a receiver.

1) Add a receiver:
In "Sound Palette " sheet open "FM_tutorial" interface by clicking (+).
We're now going to add a global data receiver.



In "modfact" field click the right mouse button. Then choose " add global input ".




In the "Properties" window click the "Global channel" field and choose channel number 2: " G2 ( my receiver) ". From now this cSound module will be receptive to any global curve sending data to this channel. Any global means from upper parent objects.




To continue it's strongly advice to read in order the following chapters:

- Curves.

- Anatomy of an interface.