Upload
jghudson
View
214
Download
0
Embed Size (px)
Citation preview
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 116
MUSC 5121 Tutorial 3
Modifying and Controlling the Elements of Sound
Writing Audio to a File
Frequency Amplitude and TimbreThe following examples will demonstrate how one can control
the elements of sound including frequency amplitude and
timbre
Start your server (make sure the internal srever is running)
and execute the code belowThe SinOscar generates a sine
wave at 500 Hz The scope message reads the results of that
function and plays it It also shows a graphic representation of the
sound in a new window The peaks represent the speaker moving
out and the valleys are when the speaker is moving in The graph
you see in the scope is an actual representation of how the
speakers move As the speakers move they compress and rarify
the air creating sound waves Try changing the add(ofset) argument 0 05 -05 - moreon add later
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 216
(Sinscar(500 500 0 05 0)sco$e())
(Sinscar(500 ampouser(500000) 0 05 ampouser(-05 05))sco$e())
The first argument for SinOscar isfreq set to [500 500] an
array with two values for left
and right channels Try changing the values of one or both of
those numbers Look for the
relationship between what you see in the scope and what
you hear in your headphones
Themul argument will chage the volume of the wave
making the wave shape wider or narrower
depending on the number you assign Remember use valuefrom 0 to 1
Look at the help file again for SinOsc It shows that the
arguments are freq phase mul add
We used the freq argument to change frequency Its
important to understand that the SinOsc
is generating a stream of numbers which represent the
sound wave The numbers run
smoothly from 0 up to 1 then down to -1 and back to 0 over
and over A sampling of these
numbers might be [0 1 2 3 4 5 6 7 8 9 10 9
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 316
8 7 6 5 4 3 2 1 0 -1 -2
-3 ] and so on The mul argument scales or multiplies these
numbers making the overall
wave move higher and lower If we change this value tosay 5 then all of those numbers
will be multiplied by 5 or reduced by frac12 So [0 1 2 3 4 ]
etc will become [0 05 1
15 2 ] and so on up to 5 then back down We will start
with 1 which is the maximum
amplitude the system can manage
If you exceed a value of 1 you will create distortion The are
however better ways to create distortion
remove your headphones before plaing this example
Sinscar(500 0 00)sco$e()
Periods Shpes and Timbre
The following example demonstrates a sound source that
geneates non-pitched sound
The reason we do not hear a pitch is that there is no
pattern (at least that we can perceive) to
the sound The sine wave moved smoothly from 0 to 1
0 -1 0 then repeated that motion A
sound wave (of any shape or contour) that has any type
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 416
of repeated pattern is periodic
Periodic waves are heard as a pitch Each revolution
through the pattern is called a period
wave or cycle A sound with no pattern is aperiodic and
will not be heard as pitched There is
a continuous scale between periodic and aperiodic so a
wave can be more or less periodic
The clearer the periods the clearer the pitch
hite+oisear(0)sco$e()
in+oisear(0)sco$e()
ron+oisear(0)sco$e()
1+oise0ar(0)sco$e()
2ustar(0)sco$e()
Frequency is pitch size of the wave or amplitude is
volume and wave shape is timbre We
will discuss timbre later but for now understand that
different shapes of waves generatedifferent timbres In general waves with sharp changes in
direction are brighter timbres
Below are some examples of other forms Use the mouse
(top to bottom) to hear a different
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 516
wave They are in order a sine wave a saw wave a
pulse triangle low frequency noise
dust pink noise and white noise You can resize the
scope
(utar(0 3nar(ampouse4r( )di6() )07)sco$e8utar(9 Sinscar Saar ulsear
1Triar 1+oise0ar 2ustar(00)
in+oisear hite+oisear)sco$e())
While you can clearly hear the difference between the
first four the noise examples are less
distinct The difference in wave types can change how
they sound but later we will use these
as control sources that is to shape some other
parameter In these cases it is important to
understand the shape of each wave since the parameter
being controlled (eg frequency)
inherits that shape The shape of the sine triangle saw
and pulse waves are clear The
LFNoise0 and LFNoise1 are random (aperiodic) wavesLFNoise0 generates discrete step
values LFNoise1 generates interpolated or ramped
values
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 616
Phase
In most cases the quality of sound is not affected by
changes in phase but its an important
concept in understanding how timbre phase
cancellation and constructive or destructive
interference work Here is the line of code we started
with
Sinscar(500 0 0)sco$e
The second argument (0) is phase Try changing
this argument to the values 0785 then 157 then 2355and finally 314 Why are these
numbers significant They are fractions (14 13 34) of
pi The plots of the wave will begin
at the corresponding point of its cycle 314 (pi) is halfway
through the cycle 2pi is the full
cycle SC3 understands pi so it is used in the codebelow to illustrate progressive phases
Phase is also often expressed as degrees 0 is 0 983072 05pi
is 90 983072 pi is 180 983072 15pi is 270 983072 and 2pi
would be 360 983072 or full cycle
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 716
The first bit of code adds two signals of the same frequency
together but they are 180 degrees in opposition
(Sinscar(900 0 05 0)Sinscar(900 $i 05 0)sco$e)
(Sinscar(900 0 05 0)Sinscar(900 ampouser(0 $i) 05 0)sco$e
)
The next example shows an array of different phases Sinscar(900 0 05$i $i 5$i $i)sco$e
Phase does affect two aspects of synthesis the way two
waves interact (when they are
different phases) and the way a control wave interacts with
its target as we will see later
To illustrate the second way phase affects sound Im going to
jump ahead to an example thatuses the sine wave as a control (covered in depth later) The
second SinOsc in the next
example is controlling the pitch (rounded and converted from
MIDI) of the first SinOsc In
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 816
simple terms the shape of the sine wave is being applied to
a virtual piano keyboard from F4
to G5 sweeping across the keys in the same way the wave
moves up and down But as youwill hear the first example doesnt begin with F4 but rather
C4 the middle pitch Thats
because the sine wave begins at 0 then moves up to 1
down to -1 and so on When the
phase argument is changed to 05pi (or frac14 through its
phase) it will begin at its peak and
therefore the top of the F4 G5 range If set to 1pi it will
begin half way through the cycle at
0 but continue moving down 15 pi will begin at its valley
Run the first line for plots of all
four examples then each example and listen carefully to
where the pitches begin
hase you can hear (as control) all $hases 0 5 5
Sinscar(900 0 05$i $i 5$i)sco$e8
0 $haseSinscar(Sinscar(0 0 )round()midic$s 0
0)sco$e
05$i (9) $haseSinscar(Sinscar(0 05$i )round()midic$s0 0)sco$e
$i () $hase
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 916
Sinscar(Sinscar(0 $i )round()midic$s 00)sco$e
5$i (9) $hase
Sinscar(Sinscar(0 5$i )round()midic$s0 0)sco$e
Recording(Writing to a File)
There are a number of approaches that one can take when
composing electroacoustic music There is real-time DSP and
synthesis where the code you write wiil play a complete piece
There is also the classic tape music approach which uses
pre-made sounds and arranges them in to a DAW (Digital
Audio Workstation) like ProTools Digital Performer Logic
Audacity etc To use SuperCollider sounds we will need to beable to record our patches as a sound file before we can
import them into an editing program
If you want to use the record feature on the server windows
first click on the
-gtdefault button on the server you wish to use Then click ontheprepare rec button start a patch and click onrecord
Clickstop when you are done
You will find your recording in theSuperCollider Recordings
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1016
folder found in theMusic partition named something like thisSlt070=lt0=9aif
hen you record this ay your gtles ill e recordedith deault 6alues and you ill$roaly ant to rename your recording
If you need to use values other than the defaults you can use
command lines so you can set the bit depth give it a name
and set the number of channelsThe following are thecommand lines to setting the defaults number of channels
file name and starting and stopping the recording
Record bit depth channels filename
srecSam$le1ormat A BintCB8
srechannels A 8
This creates a file in the SUperCollider Recordings folder
s$re$are1orDecord8
Before running these lines go back and run a previous
example
so you have something to record
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1116
srecord
Then
ssto$Decording
Play time(CombN SinOsc abs LFNoise1 LFSaw
array) - Play around with this
change values record to a file
srecSam$le1ormat A BintCB8srechannels A 8 chnage to or stereos$re$are1orDecordsrecordssto$Decording
Using code to record to disk can be clunky so the fast and
safe way is to use the server windows to record your sound
On
the default server click onprepare rec therec thenstop
when you are finished Your recording will be saved in the
Music partition of the hard drive in a folder named
SuperCollider Recordings
3 you use the Ser6er indo to record your sounds youill need to con6ert your sound gtle into a ormat thatyour seEuencer can read To dothis o$en your sound gtle in QuickTime 7 and eF$ort as
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1216
an aif gtle 4ou can also o$en the gtle in Audacity andeF$ort the gtle rom there
( 2oule clic the $arenthesis ao6e to Euicly select
the entire $atch r use com-shit-
i A Sinscar( Sine a6e osc
as( This $rotects against negati6e 6alues1+oiser(
05 reEuency o6erall andering000 range o o6erall andering1Sar(
5 = let and right channels$eed o the indi6idual see$s
mul 50 de$th o see$add 500 range o see$
))
)00 6olume stay elo 0
)8delayom+ar(i
0 maF delay5 actual delay stay elo maF delay
C delay decayadd i)
$lay
)
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1316
Second $atch 4ou can run them at the same time or
se6eral instances o the same $atch
( G- doule clic the $arenthesisampiFar(Hrraygtll(5 not too many 6alues could crashanar(
Sinscar(Sinscar(0 rrand(0 C0) 00 500))0rand))
)00$lay)
This one controls the three dimensions o sound $itcham$ and timre
(6ar trig out delay8trig A 3m$ulser(C)8 trigger rateout A li$ar( TDandr(97 trig)midic$s range in midi o$itches TDandr( trig) range o timre
maF(0 TDandr(-05 09 trig)) am$litudes)8out A anar(out TDandr(-0 0 trig))8out A outIn6Jenr(In6$erc(0 ) trig)8out A ampiFar(outdu$(C))08delay A omar(out 0 9C C)8
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1416
$lay)
HnthonyKs modigtcation
(6ar trig out delay $lay8trig A Sinscr(7000 0 05 05)8trig A 2ustr(trig 05)8trig A 3m$ulser( TDandr(5 50 trig))8
out A li$ar( TDandr(97 trig)midic$s TDandr( trig)maF(0 TDandr(-05 09 trig))
)8 out A anar(out TDandr(-0 0 trig))8
out A outIn6Jenr(In6$erc(0 ) trig)8out A ampiFar(outdu$(C))08
delay A omar(out 0 9C C)8
$lay A delay8
1reeLerar($lay ampouser(0 ) ampouse4r(0 )
05 07 0)
$lay)
M to more8 the gtrst uses a Sa as a control
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1516
(note the rising sound) The second illustrates ho 2ust can e used totrigger e6ents
(ampiFar(Hrraygtll(5 numer o oscillatorsarg c8anar(Sinscar( e sure the add is greater
than the mul1Saar((c0 ) mul 500 add 00)
) 1+oise0r()) $an s$eed)
)0$lay)
(ampiFar(anar(Mlanar(NHrraygtll( eF$rand(000 0000)) Hrraygtll( rrand(0 90))2ustar( 0))
1Trir(rrand(0 00)))du$(0)) $lay8)
one more
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1616
(6ar out nums8
nums A 008out A ampiFgtll(nums
Sinscar(eF$rand(00 0000)) Sinscar(eF$rand(000 )) 00)8utar(0 out)$lay)
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 216
(Sinscar(500 500 0 05 0)sco$e())
(Sinscar(500 ampouser(500000) 0 05 ampouser(-05 05))sco$e())
The first argument for SinOscar isfreq set to [500 500] an
array with two values for left
and right channels Try changing the values of one or both of
those numbers Look for the
relationship between what you see in the scope and what
you hear in your headphones
Themul argument will chage the volume of the wave
making the wave shape wider or narrower
depending on the number you assign Remember use valuefrom 0 to 1
Look at the help file again for SinOsc It shows that the
arguments are freq phase mul add
We used the freq argument to change frequency Its
important to understand that the SinOsc
is generating a stream of numbers which represent the
sound wave The numbers run
smoothly from 0 up to 1 then down to -1 and back to 0 over
and over A sampling of these
numbers might be [0 1 2 3 4 5 6 7 8 9 10 9
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 316
8 7 6 5 4 3 2 1 0 -1 -2
-3 ] and so on The mul argument scales or multiplies these
numbers making the overall
wave move higher and lower If we change this value tosay 5 then all of those numbers
will be multiplied by 5 or reduced by frac12 So [0 1 2 3 4 ]
etc will become [0 05 1
15 2 ] and so on up to 5 then back down We will start
with 1 which is the maximum
amplitude the system can manage
If you exceed a value of 1 you will create distortion The are
however better ways to create distortion
remove your headphones before plaing this example
Sinscar(500 0 00)sco$e()
Periods Shpes and Timbre
The following example demonstrates a sound source that
geneates non-pitched sound
The reason we do not hear a pitch is that there is no
pattern (at least that we can perceive) to
the sound The sine wave moved smoothly from 0 to 1
0 -1 0 then repeated that motion A
sound wave (of any shape or contour) that has any type
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 416
of repeated pattern is periodic
Periodic waves are heard as a pitch Each revolution
through the pattern is called a period
wave or cycle A sound with no pattern is aperiodic and
will not be heard as pitched There is
a continuous scale between periodic and aperiodic so a
wave can be more or less periodic
The clearer the periods the clearer the pitch
hite+oisear(0)sco$e()
in+oisear(0)sco$e()
ron+oisear(0)sco$e()
1+oise0ar(0)sco$e()
2ustar(0)sco$e()
Frequency is pitch size of the wave or amplitude is
volume and wave shape is timbre We
will discuss timbre later but for now understand that
different shapes of waves generatedifferent timbres In general waves with sharp changes in
direction are brighter timbres
Below are some examples of other forms Use the mouse
(top to bottom) to hear a different
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 516
wave They are in order a sine wave a saw wave a
pulse triangle low frequency noise
dust pink noise and white noise You can resize the
scope
(utar(0 3nar(ampouse4r( )di6() )07)sco$e8utar(9 Sinscar Saar ulsear
1Triar 1+oise0ar 2ustar(00)
in+oisear hite+oisear)sco$e())
While you can clearly hear the difference between the
first four the noise examples are less
distinct The difference in wave types can change how
they sound but later we will use these
as control sources that is to shape some other
parameter In these cases it is important to
understand the shape of each wave since the parameter
being controlled (eg frequency)
inherits that shape The shape of the sine triangle saw
and pulse waves are clear The
LFNoise0 and LFNoise1 are random (aperiodic) wavesLFNoise0 generates discrete step
values LFNoise1 generates interpolated or ramped
values
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 616
Phase
In most cases the quality of sound is not affected by
changes in phase but its an important
concept in understanding how timbre phase
cancellation and constructive or destructive
interference work Here is the line of code we started
with
Sinscar(500 0 0)sco$e
The second argument (0) is phase Try changing
this argument to the values 0785 then 157 then 2355and finally 314 Why are these
numbers significant They are fractions (14 13 34) of
pi The plots of the wave will begin
at the corresponding point of its cycle 314 (pi) is halfway
through the cycle 2pi is the full
cycle SC3 understands pi so it is used in the codebelow to illustrate progressive phases
Phase is also often expressed as degrees 0 is 0 983072 05pi
is 90 983072 pi is 180 983072 15pi is 270 983072 and 2pi
would be 360 983072 or full cycle
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 716
The first bit of code adds two signals of the same frequency
together but they are 180 degrees in opposition
(Sinscar(900 0 05 0)Sinscar(900 $i 05 0)sco$e)
(Sinscar(900 0 05 0)Sinscar(900 ampouser(0 $i) 05 0)sco$e
)
The next example shows an array of different phases Sinscar(900 0 05$i $i 5$i $i)sco$e
Phase does affect two aspects of synthesis the way two
waves interact (when they are
different phases) and the way a control wave interacts with
its target as we will see later
To illustrate the second way phase affects sound Im going to
jump ahead to an example thatuses the sine wave as a control (covered in depth later) The
second SinOsc in the next
example is controlling the pitch (rounded and converted from
MIDI) of the first SinOsc In
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 816
simple terms the shape of the sine wave is being applied to
a virtual piano keyboard from F4
to G5 sweeping across the keys in the same way the wave
moves up and down But as youwill hear the first example doesnt begin with F4 but rather
C4 the middle pitch Thats
because the sine wave begins at 0 then moves up to 1
down to -1 and so on When the
phase argument is changed to 05pi (or frac14 through its
phase) it will begin at its peak and
therefore the top of the F4 G5 range If set to 1pi it will
begin half way through the cycle at
0 but continue moving down 15 pi will begin at its valley
Run the first line for plots of all
four examples then each example and listen carefully to
where the pitches begin
hase you can hear (as control) all $hases 0 5 5
Sinscar(900 0 05$i $i 5$i)sco$e8
0 $haseSinscar(Sinscar(0 0 )round()midic$s 0
0)sco$e
05$i (9) $haseSinscar(Sinscar(0 05$i )round()midic$s0 0)sco$e
$i () $hase
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 916
Sinscar(Sinscar(0 $i )round()midic$s 00)sco$e
5$i (9) $hase
Sinscar(Sinscar(0 5$i )round()midic$s0 0)sco$e
Recording(Writing to a File)
There are a number of approaches that one can take when
composing electroacoustic music There is real-time DSP and
synthesis where the code you write wiil play a complete piece
There is also the classic tape music approach which uses
pre-made sounds and arranges them in to a DAW (Digital
Audio Workstation) like ProTools Digital Performer Logic
Audacity etc To use SuperCollider sounds we will need to beable to record our patches as a sound file before we can
import them into an editing program
If you want to use the record feature on the server windows
first click on the
-gtdefault button on the server you wish to use Then click ontheprepare rec button start a patch and click onrecord
Clickstop when you are done
You will find your recording in theSuperCollider Recordings
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1016
folder found in theMusic partition named something like thisSlt070=lt0=9aif
hen you record this ay your gtles ill e recordedith deault 6alues and you ill$roaly ant to rename your recording
If you need to use values other than the defaults you can use
command lines so you can set the bit depth give it a name
and set the number of channelsThe following are thecommand lines to setting the defaults number of channels
file name and starting and stopping the recording
Record bit depth channels filename
srecSam$le1ormat A BintCB8
srechannels A 8
This creates a file in the SUperCollider Recordings folder
s$re$are1orDecord8
Before running these lines go back and run a previous
example
so you have something to record
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1116
srecord
Then
ssto$Decording
Play time(CombN SinOsc abs LFNoise1 LFSaw
array) - Play around with this
change values record to a file
srecSam$le1ormat A BintCB8srechannels A 8 chnage to or stereos$re$are1orDecordsrecordssto$Decording
Using code to record to disk can be clunky so the fast and
safe way is to use the server windows to record your sound
On
the default server click onprepare rec therec thenstop
when you are finished Your recording will be saved in the
Music partition of the hard drive in a folder named
SuperCollider Recordings
3 you use the Ser6er indo to record your sounds youill need to con6ert your sound gtle into a ormat thatyour seEuencer can read To dothis o$en your sound gtle in QuickTime 7 and eF$ort as
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1216
an aif gtle 4ou can also o$en the gtle in Audacity andeF$ort the gtle rom there
( 2oule clic the $arenthesis ao6e to Euicly select
the entire $atch r use com-shit-
i A Sinscar( Sine a6e osc
as( This $rotects against negati6e 6alues1+oiser(
05 reEuency o6erall andering000 range o o6erall andering1Sar(
5 = let and right channels$eed o the indi6idual see$s
mul 50 de$th o see$add 500 range o see$
))
)00 6olume stay elo 0
)8delayom+ar(i
0 maF delay5 actual delay stay elo maF delay
C delay decayadd i)
$lay
)
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1316
Second $atch 4ou can run them at the same time or
se6eral instances o the same $atch
( G- doule clic the $arenthesisampiFar(Hrraygtll(5 not too many 6alues could crashanar(
Sinscar(Sinscar(0 rrand(0 C0) 00 500))0rand))
)00$lay)
This one controls the three dimensions o sound $itcham$ and timre
(6ar trig out delay8trig A 3m$ulser(C)8 trigger rateout A li$ar( TDandr(97 trig)midic$s range in midi o$itches TDandr( trig) range o timre
maF(0 TDandr(-05 09 trig)) am$litudes)8out A anar(out TDandr(-0 0 trig))8out A outIn6Jenr(In6$erc(0 ) trig)8out A ampiFar(outdu$(C))08delay A omar(out 0 9C C)8
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1416
$lay)
HnthonyKs modigtcation
(6ar trig out delay $lay8trig A Sinscr(7000 0 05 05)8trig A 2ustr(trig 05)8trig A 3m$ulser( TDandr(5 50 trig))8
out A li$ar( TDandr(97 trig)midic$s TDandr( trig)maF(0 TDandr(-05 09 trig))
)8 out A anar(out TDandr(-0 0 trig))8
out A outIn6Jenr(In6$erc(0 ) trig)8out A ampiFar(outdu$(C))08
delay A omar(out 0 9C C)8
$lay A delay8
1reeLerar($lay ampouser(0 ) ampouse4r(0 )
05 07 0)
$lay)
M to more8 the gtrst uses a Sa as a control
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1516
(note the rising sound) The second illustrates ho 2ust can e used totrigger e6ents
(ampiFar(Hrraygtll(5 numer o oscillatorsarg c8anar(Sinscar( e sure the add is greater
than the mul1Saar((c0 ) mul 500 add 00)
) 1+oise0r()) $an s$eed)
)0$lay)
(ampiFar(anar(Mlanar(NHrraygtll( eF$rand(000 0000)) Hrraygtll( rrand(0 90))2ustar( 0))
1Trir(rrand(0 00)))du$(0)) $lay8)
one more
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1616
(6ar out nums8
nums A 008out A ampiFgtll(nums
Sinscar(eF$rand(00 0000)) Sinscar(eF$rand(000 )) 00)8utar(0 out)$lay)
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 316
8 7 6 5 4 3 2 1 0 -1 -2
-3 ] and so on The mul argument scales or multiplies these
numbers making the overall
wave move higher and lower If we change this value tosay 5 then all of those numbers
will be multiplied by 5 or reduced by frac12 So [0 1 2 3 4 ]
etc will become [0 05 1
15 2 ] and so on up to 5 then back down We will start
with 1 which is the maximum
amplitude the system can manage
If you exceed a value of 1 you will create distortion The are
however better ways to create distortion
remove your headphones before plaing this example
Sinscar(500 0 00)sco$e()
Periods Shpes and Timbre
The following example demonstrates a sound source that
geneates non-pitched sound
The reason we do not hear a pitch is that there is no
pattern (at least that we can perceive) to
the sound The sine wave moved smoothly from 0 to 1
0 -1 0 then repeated that motion A
sound wave (of any shape or contour) that has any type
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 416
of repeated pattern is periodic
Periodic waves are heard as a pitch Each revolution
through the pattern is called a period
wave or cycle A sound with no pattern is aperiodic and
will not be heard as pitched There is
a continuous scale between periodic and aperiodic so a
wave can be more or less periodic
The clearer the periods the clearer the pitch
hite+oisear(0)sco$e()
in+oisear(0)sco$e()
ron+oisear(0)sco$e()
1+oise0ar(0)sco$e()
2ustar(0)sco$e()
Frequency is pitch size of the wave or amplitude is
volume and wave shape is timbre We
will discuss timbre later but for now understand that
different shapes of waves generatedifferent timbres In general waves with sharp changes in
direction are brighter timbres
Below are some examples of other forms Use the mouse
(top to bottom) to hear a different
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 516
wave They are in order a sine wave a saw wave a
pulse triangle low frequency noise
dust pink noise and white noise You can resize the
scope
(utar(0 3nar(ampouse4r( )di6() )07)sco$e8utar(9 Sinscar Saar ulsear
1Triar 1+oise0ar 2ustar(00)
in+oisear hite+oisear)sco$e())
While you can clearly hear the difference between the
first four the noise examples are less
distinct The difference in wave types can change how
they sound but later we will use these
as control sources that is to shape some other
parameter In these cases it is important to
understand the shape of each wave since the parameter
being controlled (eg frequency)
inherits that shape The shape of the sine triangle saw
and pulse waves are clear The
LFNoise0 and LFNoise1 are random (aperiodic) wavesLFNoise0 generates discrete step
values LFNoise1 generates interpolated or ramped
values
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 616
Phase
In most cases the quality of sound is not affected by
changes in phase but its an important
concept in understanding how timbre phase
cancellation and constructive or destructive
interference work Here is the line of code we started
with
Sinscar(500 0 0)sco$e
The second argument (0) is phase Try changing
this argument to the values 0785 then 157 then 2355and finally 314 Why are these
numbers significant They are fractions (14 13 34) of
pi The plots of the wave will begin
at the corresponding point of its cycle 314 (pi) is halfway
through the cycle 2pi is the full
cycle SC3 understands pi so it is used in the codebelow to illustrate progressive phases
Phase is also often expressed as degrees 0 is 0 983072 05pi
is 90 983072 pi is 180 983072 15pi is 270 983072 and 2pi
would be 360 983072 or full cycle
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 716
The first bit of code adds two signals of the same frequency
together but they are 180 degrees in opposition
(Sinscar(900 0 05 0)Sinscar(900 $i 05 0)sco$e)
(Sinscar(900 0 05 0)Sinscar(900 ampouser(0 $i) 05 0)sco$e
)
The next example shows an array of different phases Sinscar(900 0 05$i $i 5$i $i)sco$e
Phase does affect two aspects of synthesis the way two
waves interact (when they are
different phases) and the way a control wave interacts with
its target as we will see later
To illustrate the second way phase affects sound Im going to
jump ahead to an example thatuses the sine wave as a control (covered in depth later) The
second SinOsc in the next
example is controlling the pitch (rounded and converted from
MIDI) of the first SinOsc In
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 816
simple terms the shape of the sine wave is being applied to
a virtual piano keyboard from F4
to G5 sweeping across the keys in the same way the wave
moves up and down But as youwill hear the first example doesnt begin with F4 but rather
C4 the middle pitch Thats
because the sine wave begins at 0 then moves up to 1
down to -1 and so on When the
phase argument is changed to 05pi (or frac14 through its
phase) it will begin at its peak and
therefore the top of the F4 G5 range If set to 1pi it will
begin half way through the cycle at
0 but continue moving down 15 pi will begin at its valley
Run the first line for plots of all
four examples then each example and listen carefully to
where the pitches begin
hase you can hear (as control) all $hases 0 5 5
Sinscar(900 0 05$i $i 5$i)sco$e8
0 $haseSinscar(Sinscar(0 0 )round()midic$s 0
0)sco$e
05$i (9) $haseSinscar(Sinscar(0 05$i )round()midic$s0 0)sco$e
$i () $hase
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 916
Sinscar(Sinscar(0 $i )round()midic$s 00)sco$e
5$i (9) $hase
Sinscar(Sinscar(0 5$i )round()midic$s0 0)sco$e
Recording(Writing to a File)
There are a number of approaches that one can take when
composing electroacoustic music There is real-time DSP and
synthesis where the code you write wiil play a complete piece
There is also the classic tape music approach which uses
pre-made sounds and arranges them in to a DAW (Digital
Audio Workstation) like ProTools Digital Performer Logic
Audacity etc To use SuperCollider sounds we will need to beable to record our patches as a sound file before we can
import them into an editing program
If you want to use the record feature on the server windows
first click on the
-gtdefault button on the server you wish to use Then click ontheprepare rec button start a patch and click onrecord
Clickstop when you are done
You will find your recording in theSuperCollider Recordings
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1016
folder found in theMusic partition named something like thisSlt070=lt0=9aif
hen you record this ay your gtles ill e recordedith deault 6alues and you ill$roaly ant to rename your recording
If you need to use values other than the defaults you can use
command lines so you can set the bit depth give it a name
and set the number of channelsThe following are thecommand lines to setting the defaults number of channels
file name and starting and stopping the recording
Record bit depth channels filename
srecSam$le1ormat A BintCB8
srechannels A 8
This creates a file in the SUperCollider Recordings folder
s$re$are1orDecord8
Before running these lines go back and run a previous
example
so you have something to record
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1116
srecord
Then
ssto$Decording
Play time(CombN SinOsc abs LFNoise1 LFSaw
array) - Play around with this
change values record to a file
srecSam$le1ormat A BintCB8srechannels A 8 chnage to or stereos$re$are1orDecordsrecordssto$Decording
Using code to record to disk can be clunky so the fast and
safe way is to use the server windows to record your sound
On
the default server click onprepare rec therec thenstop
when you are finished Your recording will be saved in the
Music partition of the hard drive in a folder named
SuperCollider Recordings
3 you use the Ser6er indo to record your sounds youill need to con6ert your sound gtle into a ormat thatyour seEuencer can read To dothis o$en your sound gtle in QuickTime 7 and eF$ort as
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1216
an aif gtle 4ou can also o$en the gtle in Audacity andeF$ort the gtle rom there
( 2oule clic the $arenthesis ao6e to Euicly select
the entire $atch r use com-shit-
i A Sinscar( Sine a6e osc
as( This $rotects against negati6e 6alues1+oiser(
05 reEuency o6erall andering000 range o o6erall andering1Sar(
5 = let and right channels$eed o the indi6idual see$s
mul 50 de$th o see$add 500 range o see$
))
)00 6olume stay elo 0
)8delayom+ar(i
0 maF delay5 actual delay stay elo maF delay
C delay decayadd i)
$lay
)
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1316
Second $atch 4ou can run them at the same time or
se6eral instances o the same $atch
( G- doule clic the $arenthesisampiFar(Hrraygtll(5 not too many 6alues could crashanar(
Sinscar(Sinscar(0 rrand(0 C0) 00 500))0rand))
)00$lay)
This one controls the three dimensions o sound $itcham$ and timre
(6ar trig out delay8trig A 3m$ulser(C)8 trigger rateout A li$ar( TDandr(97 trig)midic$s range in midi o$itches TDandr( trig) range o timre
maF(0 TDandr(-05 09 trig)) am$litudes)8out A anar(out TDandr(-0 0 trig))8out A outIn6Jenr(In6$erc(0 ) trig)8out A ampiFar(outdu$(C))08delay A omar(out 0 9C C)8
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1416
$lay)
HnthonyKs modigtcation
(6ar trig out delay $lay8trig A Sinscr(7000 0 05 05)8trig A 2ustr(trig 05)8trig A 3m$ulser( TDandr(5 50 trig))8
out A li$ar( TDandr(97 trig)midic$s TDandr( trig)maF(0 TDandr(-05 09 trig))
)8 out A anar(out TDandr(-0 0 trig))8
out A outIn6Jenr(In6$erc(0 ) trig)8out A ampiFar(outdu$(C))08
delay A omar(out 0 9C C)8
$lay A delay8
1reeLerar($lay ampouser(0 ) ampouse4r(0 )
05 07 0)
$lay)
M to more8 the gtrst uses a Sa as a control
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1516
(note the rising sound) The second illustrates ho 2ust can e used totrigger e6ents
(ampiFar(Hrraygtll(5 numer o oscillatorsarg c8anar(Sinscar( e sure the add is greater
than the mul1Saar((c0 ) mul 500 add 00)
) 1+oise0r()) $an s$eed)
)0$lay)
(ampiFar(anar(Mlanar(NHrraygtll( eF$rand(000 0000)) Hrraygtll( rrand(0 90))2ustar( 0))
1Trir(rrand(0 00)))du$(0)) $lay8)
one more
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1616
(6ar out nums8
nums A 008out A ampiFgtll(nums
Sinscar(eF$rand(00 0000)) Sinscar(eF$rand(000 )) 00)8utar(0 out)$lay)
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 416
of repeated pattern is periodic
Periodic waves are heard as a pitch Each revolution
through the pattern is called a period
wave or cycle A sound with no pattern is aperiodic and
will not be heard as pitched There is
a continuous scale between periodic and aperiodic so a
wave can be more or less periodic
The clearer the periods the clearer the pitch
hite+oisear(0)sco$e()
in+oisear(0)sco$e()
ron+oisear(0)sco$e()
1+oise0ar(0)sco$e()
2ustar(0)sco$e()
Frequency is pitch size of the wave or amplitude is
volume and wave shape is timbre We
will discuss timbre later but for now understand that
different shapes of waves generatedifferent timbres In general waves with sharp changes in
direction are brighter timbres
Below are some examples of other forms Use the mouse
(top to bottom) to hear a different
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 516
wave They are in order a sine wave a saw wave a
pulse triangle low frequency noise
dust pink noise and white noise You can resize the
scope
(utar(0 3nar(ampouse4r( )di6() )07)sco$e8utar(9 Sinscar Saar ulsear
1Triar 1+oise0ar 2ustar(00)
in+oisear hite+oisear)sco$e())
While you can clearly hear the difference between the
first four the noise examples are less
distinct The difference in wave types can change how
they sound but later we will use these
as control sources that is to shape some other
parameter In these cases it is important to
understand the shape of each wave since the parameter
being controlled (eg frequency)
inherits that shape The shape of the sine triangle saw
and pulse waves are clear The
LFNoise0 and LFNoise1 are random (aperiodic) wavesLFNoise0 generates discrete step
values LFNoise1 generates interpolated or ramped
values
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 616
Phase
In most cases the quality of sound is not affected by
changes in phase but its an important
concept in understanding how timbre phase
cancellation and constructive or destructive
interference work Here is the line of code we started
with
Sinscar(500 0 0)sco$e
The second argument (0) is phase Try changing
this argument to the values 0785 then 157 then 2355and finally 314 Why are these
numbers significant They are fractions (14 13 34) of
pi The plots of the wave will begin
at the corresponding point of its cycle 314 (pi) is halfway
through the cycle 2pi is the full
cycle SC3 understands pi so it is used in the codebelow to illustrate progressive phases
Phase is also often expressed as degrees 0 is 0 983072 05pi
is 90 983072 pi is 180 983072 15pi is 270 983072 and 2pi
would be 360 983072 or full cycle
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 716
The first bit of code adds two signals of the same frequency
together but they are 180 degrees in opposition
(Sinscar(900 0 05 0)Sinscar(900 $i 05 0)sco$e)
(Sinscar(900 0 05 0)Sinscar(900 ampouser(0 $i) 05 0)sco$e
)
The next example shows an array of different phases Sinscar(900 0 05$i $i 5$i $i)sco$e
Phase does affect two aspects of synthesis the way two
waves interact (when they are
different phases) and the way a control wave interacts with
its target as we will see later
To illustrate the second way phase affects sound Im going to
jump ahead to an example thatuses the sine wave as a control (covered in depth later) The
second SinOsc in the next
example is controlling the pitch (rounded and converted from
MIDI) of the first SinOsc In
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 816
simple terms the shape of the sine wave is being applied to
a virtual piano keyboard from F4
to G5 sweeping across the keys in the same way the wave
moves up and down But as youwill hear the first example doesnt begin with F4 but rather
C4 the middle pitch Thats
because the sine wave begins at 0 then moves up to 1
down to -1 and so on When the
phase argument is changed to 05pi (or frac14 through its
phase) it will begin at its peak and
therefore the top of the F4 G5 range If set to 1pi it will
begin half way through the cycle at
0 but continue moving down 15 pi will begin at its valley
Run the first line for plots of all
four examples then each example and listen carefully to
where the pitches begin
hase you can hear (as control) all $hases 0 5 5
Sinscar(900 0 05$i $i 5$i)sco$e8
0 $haseSinscar(Sinscar(0 0 )round()midic$s 0
0)sco$e
05$i (9) $haseSinscar(Sinscar(0 05$i )round()midic$s0 0)sco$e
$i () $hase
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 916
Sinscar(Sinscar(0 $i )round()midic$s 00)sco$e
5$i (9) $hase
Sinscar(Sinscar(0 5$i )round()midic$s0 0)sco$e
Recording(Writing to a File)
There are a number of approaches that one can take when
composing electroacoustic music There is real-time DSP and
synthesis where the code you write wiil play a complete piece
There is also the classic tape music approach which uses
pre-made sounds and arranges them in to a DAW (Digital
Audio Workstation) like ProTools Digital Performer Logic
Audacity etc To use SuperCollider sounds we will need to beable to record our patches as a sound file before we can
import them into an editing program
If you want to use the record feature on the server windows
first click on the
-gtdefault button on the server you wish to use Then click ontheprepare rec button start a patch and click onrecord
Clickstop when you are done
You will find your recording in theSuperCollider Recordings
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1016
folder found in theMusic partition named something like thisSlt070=lt0=9aif
hen you record this ay your gtles ill e recordedith deault 6alues and you ill$roaly ant to rename your recording
If you need to use values other than the defaults you can use
command lines so you can set the bit depth give it a name
and set the number of channelsThe following are thecommand lines to setting the defaults number of channels
file name and starting and stopping the recording
Record bit depth channels filename
srecSam$le1ormat A BintCB8
srechannels A 8
This creates a file in the SUperCollider Recordings folder
s$re$are1orDecord8
Before running these lines go back and run a previous
example
so you have something to record
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1116
srecord
Then
ssto$Decording
Play time(CombN SinOsc abs LFNoise1 LFSaw
array) - Play around with this
change values record to a file
srecSam$le1ormat A BintCB8srechannels A 8 chnage to or stereos$re$are1orDecordsrecordssto$Decording
Using code to record to disk can be clunky so the fast and
safe way is to use the server windows to record your sound
On
the default server click onprepare rec therec thenstop
when you are finished Your recording will be saved in the
Music partition of the hard drive in a folder named
SuperCollider Recordings
3 you use the Ser6er indo to record your sounds youill need to con6ert your sound gtle into a ormat thatyour seEuencer can read To dothis o$en your sound gtle in QuickTime 7 and eF$ort as
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1216
an aif gtle 4ou can also o$en the gtle in Audacity andeF$ort the gtle rom there
( 2oule clic the $arenthesis ao6e to Euicly select
the entire $atch r use com-shit-
i A Sinscar( Sine a6e osc
as( This $rotects against negati6e 6alues1+oiser(
05 reEuency o6erall andering000 range o o6erall andering1Sar(
5 = let and right channels$eed o the indi6idual see$s
mul 50 de$th o see$add 500 range o see$
))
)00 6olume stay elo 0
)8delayom+ar(i
0 maF delay5 actual delay stay elo maF delay
C delay decayadd i)
$lay
)
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1316
Second $atch 4ou can run them at the same time or
se6eral instances o the same $atch
( G- doule clic the $arenthesisampiFar(Hrraygtll(5 not too many 6alues could crashanar(
Sinscar(Sinscar(0 rrand(0 C0) 00 500))0rand))
)00$lay)
This one controls the three dimensions o sound $itcham$ and timre
(6ar trig out delay8trig A 3m$ulser(C)8 trigger rateout A li$ar( TDandr(97 trig)midic$s range in midi o$itches TDandr( trig) range o timre
maF(0 TDandr(-05 09 trig)) am$litudes)8out A anar(out TDandr(-0 0 trig))8out A outIn6Jenr(In6$erc(0 ) trig)8out A ampiFar(outdu$(C))08delay A omar(out 0 9C C)8
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1416
$lay)
HnthonyKs modigtcation
(6ar trig out delay $lay8trig A Sinscr(7000 0 05 05)8trig A 2ustr(trig 05)8trig A 3m$ulser( TDandr(5 50 trig))8
out A li$ar( TDandr(97 trig)midic$s TDandr( trig)maF(0 TDandr(-05 09 trig))
)8 out A anar(out TDandr(-0 0 trig))8
out A outIn6Jenr(In6$erc(0 ) trig)8out A ampiFar(outdu$(C))08
delay A omar(out 0 9C C)8
$lay A delay8
1reeLerar($lay ampouser(0 ) ampouse4r(0 )
05 07 0)
$lay)
M to more8 the gtrst uses a Sa as a control
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1516
(note the rising sound) The second illustrates ho 2ust can e used totrigger e6ents
(ampiFar(Hrraygtll(5 numer o oscillatorsarg c8anar(Sinscar( e sure the add is greater
than the mul1Saar((c0 ) mul 500 add 00)
) 1+oise0r()) $an s$eed)
)0$lay)
(ampiFar(anar(Mlanar(NHrraygtll( eF$rand(000 0000)) Hrraygtll( rrand(0 90))2ustar( 0))
1Trir(rrand(0 00)))du$(0)) $lay8)
one more
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1616
(6ar out nums8
nums A 008out A ampiFgtll(nums
Sinscar(eF$rand(00 0000)) Sinscar(eF$rand(000 )) 00)8utar(0 out)$lay)
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 516
wave They are in order a sine wave a saw wave a
pulse triangle low frequency noise
dust pink noise and white noise You can resize the
scope
(utar(0 3nar(ampouse4r( )di6() )07)sco$e8utar(9 Sinscar Saar ulsear
1Triar 1+oise0ar 2ustar(00)
in+oisear hite+oisear)sco$e())
While you can clearly hear the difference between the
first four the noise examples are less
distinct The difference in wave types can change how
they sound but later we will use these
as control sources that is to shape some other
parameter In these cases it is important to
understand the shape of each wave since the parameter
being controlled (eg frequency)
inherits that shape The shape of the sine triangle saw
and pulse waves are clear The
LFNoise0 and LFNoise1 are random (aperiodic) wavesLFNoise0 generates discrete step
values LFNoise1 generates interpolated or ramped
values
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 616
Phase
In most cases the quality of sound is not affected by
changes in phase but its an important
concept in understanding how timbre phase
cancellation and constructive or destructive
interference work Here is the line of code we started
with
Sinscar(500 0 0)sco$e
The second argument (0) is phase Try changing
this argument to the values 0785 then 157 then 2355and finally 314 Why are these
numbers significant They are fractions (14 13 34) of
pi The plots of the wave will begin
at the corresponding point of its cycle 314 (pi) is halfway
through the cycle 2pi is the full
cycle SC3 understands pi so it is used in the codebelow to illustrate progressive phases
Phase is also often expressed as degrees 0 is 0 983072 05pi
is 90 983072 pi is 180 983072 15pi is 270 983072 and 2pi
would be 360 983072 or full cycle
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 716
The first bit of code adds two signals of the same frequency
together but they are 180 degrees in opposition
(Sinscar(900 0 05 0)Sinscar(900 $i 05 0)sco$e)
(Sinscar(900 0 05 0)Sinscar(900 ampouser(0 $i) 05 0)sco$e
)
The next example shows an array of different phases Sinscar(900 0 05$i $i 5$i $i)sco$e
Phase does affect two aspects of synthesis the way two
waves interact (when they are
different phases) and the way a control wave interacts with
its target as we will see later
To illustrate the second way phase affects sound Im going to
jump ahead to an example thatuses the sine wave as a control (covered in depth later) The
second SinOsc in the next
example is controlling the pitch (rounded and converted from
MIDI) of the first SinOsc In
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 816
simple terms the shape of the sine wave is being applied to
a virtual piano keyboard from F4
to G5 sweeping across the keys in the same way the wave
moves up and down But as youwill hear the first example doesnt begin with F4 but rather
C4 the middle pitch Thats
because the sine wave begins at 0 then moves up to 1
down to -1 and so on When the
phase argument is changed to 05pi (or frac14 through its
phase) it will begin at its peak and
therefore the top of the F4 G5 range If set to 1pi it will
begin half way through the cycle at
0 but continue moving down 15 pi will begin at its valley
Run the first line for plots of all
four examples then each example and listen carefully to
where the pitches begin
hase you can hear (as control) all $hases 0 5 5
Sinscar(900 0 05$i $i 5$i)sco$e8
0 $haseSinscar(Sinscar(0 0 )round()midic$s 0
0)sco$e
05$i (9) $haseSinscar(Sinscar(0 05$i )round()midic$s0 0)sco$e
$i () $hase
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 916
Sinscar(Sinscar(0 $i )round()midic$s 00)sco$e
5$i (9) $hase
Sinscar(Sinscar(0 5$i )round()midic$s0 0)sco$e
Recording(Writing to a File)
There are a number of approaches that one can take when
composing electroacoustic music There is real-time DSP and
synthesis where the code you write wiil play a complete piece
There is also the classic tape music approach which uses
pre-made sounds and arranges them in to a DAW (Digital
Audio Workstation) like ProTools Digital Performer Logic
Audacity etc To use SuperCollider sounds we will need to beable to record our patches as a sound file before we can
import them into an editing program
If you want to use the record feature on the server windows
first click on the
-gtdefault button on the server you wish to use Then click ontheprepare rec button start a patch and click onrecord
Clickstop when you are done
You will find your recording in theSuperCollider Recordings
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1016
folder found in theMusic partition named something like thisSlt070=lt0=9aif
hen you record this ay your gtles ill e recordedith deault 6alues and you ill$roaly ant to rename your recording
If you need to use values other than the defaults you can use
command lines so you can set the bit depth give it a name
and set the number of channelsThe following are thecommand lines to setting the defaults number of channels
file name and starting and stopping the recording
Record bit depth channels filename
srecSam$le1ormat A BintCB8
srechannels A 8
This creates a file in the SUperCollider Recordings folder
s$re$are1orDecord8
Before running these lines go back and run a previous
example
so you have something to record
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1116
srecord
Then
ssto$Decording
Play time(CombN SinOsc abs LFNoise1 LFSaw
array) - Play around with this
change values record to a file
srecSam$le1ormat A BintCB8srechannels A 8 chnage to or stereos$re$are1orDecordsrecordssto$Decording
Using code to record to disk can be clunky so the fast and
safe way is to use the server windows to record your sound
On
the default server click onprepare rec therec thenstop
when you are finished Your recording will be saved in the
Music partition of the hard drive in a folder named
SuperCollider Recordings
3 you use the Ser6er indo to record your sounds youill need to con6ert your sound gtle into a ormat thatyour seEuencer can read To dothis o$en your sound gtle in QuickTime 7 and eF$ort as
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1216
an aif gtle 4ou can also o$en the gtle in Audacity andeF$ort the gtle rom there
( 2oule clic the $arenthesis ao6e to Euicly select
the entire $atch r use com-shit-
i A Sinscar( Sine a6e osc
as( This $rotects against negati6e 6alues1+oiser(
05 reEuency o6erall andering000 range o o6erall andering1Sar(
5 = let and right channels$eed o the indi6idual see$s
mul 50 de$th o see$add 500 range o see$
))
)00 6olume stay elo 0
)8delayom+ar(i
0 maF delay5 actual delay stay elo maF delay
C delay decayadd i)
$lay
)
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1316
Second $atch 4ou can run them at the same time or
se6eral instances o the same $atch
( G- doule clic the $arenthesisampiFar(Hrraygtll(5 not too many 6alues could crashanar(
Sinscar(Sinscar(0 rrand(0 C0) 00 500))0rand))
)00$lay)
This one controls the three dimensions o sound $itcham$ and timre
(6ar trig out delay8trig A 3m$ulser(C)8 trigger rateout A li$ar( TDandr(97 trig)midic$s range in midi o$itches TDandr( trig) range o timre
maF(0 TDandr(-05 09 trig)) am$litudes)8out A anar(out TDandr(-0 0 trig))8out A outIn6Jenr(In6$erc(0 ) trig)8out A ampiFar(outdu$(C))08delay A omar(out 0 9C C)8
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1416
$lay)
HnthonyKs modigtcation
(6ar trig out delay $lay8trig A Sinscr(7000 0 05 05)8trig A 2ustr(trig 05)8trig A 3m$ulser( TDandr(5 50 trig))8
out A li$ar( TDandr(97 trig)midic$s TDandr( trig)maF(0 TDandr(-05 09 trig))
)8 out A anar(out TDandr(-0 0 trig))8
out A outIn6Jenr(In6$erc(0 ) trig)8out A ampiFar(outdu$(C))08
delay A omar(out 0 9C C)8
$lay A delay8
1reeLerar($lay ampouser(0 ) ampouse4r(0 )
05 07 0)
$lay)
M to more8 the gtrst uses a Sa as a control
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1516
(note the rising sound) The second illustrates ho 2ust can e used totrigger e6ents
(ampiFar(Hrraygtll(5 numer o oscillatorsarg c8anar(Sinscar( e sure the add is greater
than the mul1Saar((c0 ) mul 500 add 00)
) 1+oise0r()) $an s$eed)
)0$lay)
(ampiFar(anar(Mlanar(NHrraygtll( eF$rand(000 0000)) Hrraygtll( rrand(0 90))2ustar( 0))
1Trir(rrand(0 00)))du$(0)) $lay8)
one more
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1616
(6ar out nums8
nums A 008out A ampiFgtll(nums
Sinscar(eF$rand(00 0000)) Sinscar(eF$rand(000 )) 00)8utar(0 out)$lay)
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 616
Phase
In most cases the quality of sound is not affected by
changes in phase but its an important
concept in understanding how timbre phase
cancellation and constructive or destructive
interference work Here is the line of code we started
with
Sinscar(500 0 0)sco$e
The second argument (0) is phase Try changing
this argument to the values 0785 then 157 then 2355and finally 314 Why are these
numbers significant They are fractions (14 13 34) of
pi The plots of the wave will begin
at the corresponding point of its cycle 314 (pi) is halfway
through the cycle 2pi is the full
cycle SC3 understands pi so it is used in the codebelow to illustrate progressive phases
Phase is also often expressed as degrees 0 is 0 983072 05pi
is 90 983072 pi is 180 983072 15pi is 270 983072 and 2pi
would be 360 983072 or full cycle
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 716
The first bit of code adds two signals of the same frequency
together but they are 180 degrees in opposition
(Sinscar(900 0 05 0)Sinscar(900 $i 05 0)sco$e)
(Sinscar(900 0 05 0)Sinscar(900 ampouser(0 $i) 05 0)sco$e
)
The next example shows an array of different phases Sinscar(900 0 05$i $i 5$i $i)sco$e
Phase does affect two aspects of synthesis the way two
waves interact (when they are
different phases) and the way a control wave interacts with
its target as we will see later
To illustrate the second way phase affects sound Im going to
jump ahead to an example thatuses the sine wave as a control (covered in depth later) The
second SinOsc in the next
example is controlling the pitch (rounded and converted from
MIDI) of the first SinOsc In
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 816
simple terms the shape of the sine wave is being applied to
a virtual piano keyboard from F4
to G5 sweeping across the keys in the same way the wave
moves up and down But as youwill hear the first example doesnt begin with F4 but rather
C4 the middle pitch Thats
because the sine wave begins at 0 then moves up to 1
down to -1 and so on When the
phase argument is changed to 05pi (or frac14 through its
phase) it will begin at its peak and
therefore the top of the F4 G5 range If set to 1pi it will
begin half way through the cycle at
0 but continue moving down 15 pi will begin at its valley
Run the first line for plots of all
four examples then each example and listen carefully to
where the pitches begin
hase you can hear (as control) all $hases 0 5 5
Sinscar(900 0 05$i $i 5$i)sco$e8
0 $haseSinscar(Sinscar(0 0 )round()midic$s 0
0)sco$e
05$i (9) $haseSinscar(Sinscar(0 05$i )round()midic$s0 0)sco$e
$i () $hase
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 916
Sinscar(Sinscar(0 $i )round()midic$s 00)sco$e
5$i (9) $hase
Sinscar(Sinscar(0 5$i )round()midic$s0 0)sco$e
Recording(Writing to a File)
There are a number of approaches that one can take when
composing electroacoustic music There is real-time DSP and
synthesis where the code you write wiil play a complete piece
There is also the classic tape music approach which uses
pre-made sounds and arranges them in to a DAW (Digital
Audio Workstation) like ProTools Digital Performer Logic
Audacity etc To use SuperCollider sounds we will need to beable to record our patches as a sound file before we can
import them into an editing program
If you want to use the record feature on the server windows
first click on the
-gtdefault button on the server you wish to use Then click ontheprepare rec button start a patch and click onrecord
Clickstop when you are done
You will find your recording in theSuperCollider Recordings
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1016
folder found in theMusic partition named something like thisSlt070=lt0=9aif
hen you record this ay your gtles ill e recordedith deault 6alues and you ill$roaly ant to rename your recording
If you need to use values other than the defaults you can use
command lines so you can set the bit depth give it a name
and set the number of channelsThe following are thecommand lines to setting the defaults number of channels
file name and starting and stopping the recording
Record bit depth channels filename
srecSam$le1ormat A BintCB8
srechannels A 8
This creates a file in the SUperCollider Recordings folder
s$re$are1orDecord8
Before running these lines go back and run a previous
example
so you have something to record
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1116
srecord
Then
ssto$Decording
Play time(CombN SinOsc abs LFNoise1 LFSaw
array) - Play around with this
change values record to a file
srecSam$le1ormat A BintCB8srechannels A 8 chnage to or stereos$re$are1orDecordsrecordssto$Decording
Using code to record to disk can be clunky so the fast and
safe way is to use the server windows to record your sound
On
the default server click onprepare rec therec thenstop
when you are finished Your recording will be saved in the
Music partition of the hard drive in a folder named
SuperCollider Recordings
3 you use the Ser6er indo to record your sounds youill need to con6ert your sound gtle into a ormat thatyour seEuencer can read To dothis o$en your sound gtle in QuickTime 7 and eF$ort as
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1216
an aif gtle 4ou can also o$en the gtle in Audacity andeF$ort the gtle rom there
( 2oule clic the $arenthesis ao6e to Euicly select
the entire $atch r use com-shit-
i A Sinscar( Sine a6e osc
as( This $rotects against negati6e 6alues1+oiser(
05 reEuency o6erall andering000 range o o6erall andering1Sar(
5 = let and right channels$eed o the indi6idual see$s
mul 50 de$th o see$add 500 range o see$
))
)00 6olume stay elo 0
)8delayom+ar(i
0 maF delay5 actual delay stay elo maF delay
C delay decayadd i)
$lay
)
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1316
Second $atch 4ou can run them at the same time or
se6eral instances o the same $atch
( G- doule clic the $arenthesisampiFar(Hrraygtll(5 not too many 6alues could crashanar(
Sinscar(Sinscar(0 rrand(0 C0) 00 500))0rand))
)00$lay)
This one controls the three dimensions o sound $itcham$ and timre
(6ar trig out delay8trig A 3m$ulser(C)8 trigger rateout A li$ar( TDandr(97 trig)midic$s range in midi o$itches TDandr( trig) range o timre
maF(0 TDandr(-05 09 trig)) am$litudes)8out A anar(out TDandr(-0 0 trig))8out A outIn6Jenr(In6$erc(0 ) trig)8out A ampiFar(outdu$(C))08delay A omar(out 0 9C C)8
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1416
$lay)
HnthonyKs modigtcation
(6ar trig out delay $lay8trig A Sinscr(7000 0 05 05)8trig A 2ustr(trig 05)8trig A 3m$ulser( TDandr(5 50 trig))8
out A li$ar( TDandr(97 trig)midic$s TDandr( trig)maF(0 TDandr(-05 09 trig))
)8 out A anar(out TDandr(-0 0 trig))8
out A outIn6Jenr(In6$erc(0 ) trig)8out A ampiFar(outdu$(C))08
delay A omar(out 0 9C C)8
$lay A delay8
1reeLerar($lay ampouser(0 ) ampouse4r(0 )
05 07 0)
$lay)
M to more8 the gtrst uses a Sa as a control
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1516
(note the rising sound) The second illustrates ho 2ust can e used totrigger e6ents
(ampiFar(Hrraygtll(5 numer o oscillatorsarg c8anar(Sinscar( e sure the add is greater
than the mul1Saar((c0 ) mul 500 add 00)
) 1+oise0r()) $an s$eed)
)0$lay)
(ampiFar(anar(Mlanar(NHrraygtll( eF$rand(000 0000)) Hrraygtll( rrand(0 90))2ustar( 0))
1Trir(rrand(0 00)))du$(0)) $lay8)
one more
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1616
(6ar out nums8
nums A 008out A ampiFgtll(nums
Sinscar(eF$rand(00 0000)) Sinscar(eF$rand(000 )) 00)8utar(0 out)$lay)
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 716
The first bit of code adds two signals of the same frequency
together but they are 180 degrees in opposition
(Sinscar(900 0 05 0)Sinscar(900 $i 05 0)sco$e)
(Sinscar(900 0 05 0)Sinscar(900 ampouser(0 $i) 05 0)sco$e
)
The next example shows an array of different phases Sinscar(900 0 05$i $i 5$i $i)sco$e
Phase does affect two aspects of synthesis the way two
waves interact (when they are
different phases) and the way a control wave interacts with
its target as we will see later
To illustrate the second way phase affects sound Im going to
jump ahead to an example thatuses the sine wave as a control (covered in depth later) The
second SinOsc in the next
example is controlling the pitch (rounded and converted from
MIDI) of the first SinOsc In
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 816
simple terms the shape of the sine wave is being applied to
a virtual piano keyboard from F4
to G5 sweeping across the keys in the same way the wave
moves up and down But as youwill hear the first example doesnt begin with F4 but rather
C4 the middle pitch Thats
because the sine wave begins at 0 then moves up to 1
down to -1 and so on When the
phase argument is changed to 05pi (or frac14 through its
phase) it will begin at its peak and
therefore the top of the F4 G5 range If set to 1pi it will
begin half way through the cycle at
0 but continue moving down 15 pi will begin at its valley
Run the first line for plots of all
four examples then each example and listen carefully to
where the pitches begin
hase you can hear (as control) all $hases 0 5 5
Sinscar(900 0 05$i $i 5$i)sco$e8
0 $haseSinscar(Sinscar(0 0 )round()midic$s 0
0)sco$e
05$i (9) $haseSinscar(Sinscar(0 05$i )round()midic$s0 0)sco$e
$i () $hase
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 916
Sinscar(Sinscar(0 $i )round()midic$s 00)sco$e
5$i (9) $hase
Sinscar(Sinscar(0 5$i )round()midic$s0 0)sco$e
Recording(Writing to a File)
There are a number of approaches that one can take when
composing electroacoustic music There is real-time DSP and
synthesis where the code you write wiil play a complete piece
There is also the classic tape music approach which uses
pre-made sounds and arranges them in to a DAW (Digital
Audio Workstation) like ProTools Digital Performer Logic
Audacity etc To use SuperCollider sounds we will need to beable to record our patches as a sound file before we can
import them into an editing program
If you want to use the record feature on the server windows
first click on the
-gtdefault button on the server you wish to use Then click ontheprepare rec button start a patch and click onrecord
Clickstop when you are done
You will find your recording in theSuperCollider Recordings
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1016
folder found in theMusic partition named something like thisSlt070=lt0=9aif
hen you record this ay your gtles ill e recordedith deault 6alues and you ill$roaly ant to rename your recording
If you need to use values other than the defaults you can use
command lines so you can set the bit depth give it a name
and set the number of channelsThe following are thecommand lines to setting the defaults number of channels
file name and starting and stopping the recording
Record bit depth channels filename
srecSam$le1ormat A BintCB8
srechannels A 8
This creates a file in the SUperCollider Recordings folder
s$re$are1orDecord8
Before running these lines go back and run a previous
example
so you have something to record
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1116
srecord
Then
ssto$Decording
Play time(CombN SinOsc abs LFNoise1 LFSaw
array) - Play around with this
change values record to a file
srecSam$le1ormat A BintCB8srechannels A 8 chnage to or stereos$re$are1orDecordsrecordssto$Decording
Using code to record to disk can be clunky so the fast and
safe way is to use the server windows to record your sound
On
the default server click onprepare rec therec thenstop
when you are finished Your recording will be saved in the
Music partition of the hard drive in a folder named
SuperCollider Recordings
3 you use the Ser6er indo to record your sounds youill need to con6ert your sound gtle into a ormat thatyour seEuencer can read To dothis o$en your sound gtle in QuickTime 7 and eF$ort as
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1216
an aif gtle 4ou can also o$en the gtle in Audacity andeF$ort the gtle rom there
( 2oule clic the $arenthesis ao6e to Euicly select
the entire $atch r use com-shit-
i A Sinscar( Sine a6e osc
as( This $rotects against negati6e 6alues1+oiser(
05 reEuency o6erall andering000 range o o6erall andering1Sar(
5 = let and right channels$eed o the indi6idual see$s
mul 50 de$th o see$add 500 range o see$
))
)00 6olume stay elo 0
)8delayom+ar(i
0 maF delay5 actual delay stay elo maF delay
C delay decayadd i)
$lay
)
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1316
Second $atch 4ou can run them at the same time or
se6eral instances o the same $atch
( G- doule clic the $arenthesisampiFar(Hrraygtll(5 not too many 6alues could crashanar(
Sinscar(Sinscar(0 rrand(0 C0) 00 500))0rand))
)00$lay)
This one controls the three dimensions o sound $itcham$ and timre
(6ar trig out delay8trig A 3m$ulser(C)8 trigger rateout A li$ar( TDandr(97 trig)midic$s range in midi o$itches TDandr( trig) range o timre
maF(0 TDandr(-05 09 trig)) am$litudes)8out A anar(out TDandr(-0 0 trig))8out A outIn6Jenr(In6$erc(0 ) trig)8out A ampiFar(outdu$(C))08delay A omar(out 0 9C C)8
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1416
$lay)
HnthonyKs modigtcation
(6ar trig out delay $lay8trig A Sinscr(7000 0 05 05)8trig A 2ustr(trig 05)8trig A 3m$ulser( TDandr(5 50 trig))8
out A li$ar( TDandr(97 trig)midic$s TDandr( trig)maF(0 TDandr(-05 09 trig))
)8 out A anar(out TDandr(-0 0 trig))8
out A outIn6Jenr(In6$erc(0 ) trig)8out A ampiFar(outdu$(C))08
delay A omar(out 0 9C C)8
$lay A delay8
1reeLerar($lay ampouser(0 ) ampouse4r(0 )
05 07 0)
$lay)
M to more8 the gtrst uses a Sa as a control
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1516
(note the rising sound) The second illustrates ho 2ust can e used totrigger e6ents
(ampiFar(Hrraygtll(5 numer o oscillatorsarg c8anar(Sinscar( e sure the add is greater
than the mul1Saar((c0 ) mul 500 add 00)
) 1+oise0r()) $an s$eed)
)0$lay)
(ampiFar(anar(Mlanar(NHrraygtll( eF$rand(000 0000)) Hrraygtll( rrand(0 90))2ustar( 0))
1Trir(rrand(0 00)))du$(0)) $lay8)
one more
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1616
(6ar out nums8
nums A 008out A ampiFgtll(nums
Sinscar(eF$rand(00 0000)) Sinscar(eF$rand(000 )) 00)8utar(0 out)$lay)
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 816
simple terms the shape of the sine wave is being applied to
a virtual piano keyboard from F4
to G5 sweeping across the keys in the same way the wave
moves up and down But as youwill hear the first example doesnt begin with F4 but rather
C4 the middle pitch Thats
because the sine wave begins at 0 then moves up to 1
down to -1 and so on When the
phase argument is changed to 05pi (or frac14 through its
phase) it will begin at its peak and
therefore the top of the F4 G5 range If set to 1pi it will
begin half way through the cycle at
0 but continue moving down 15 pi will begin at its valley
Run the first line for plots of all
four examples then each example and listen carefully to
where the pitches begin
hase you can hear (as control) all $hases 0 5 5
Sinscar(900 0 05$i $i 5$i)sco$e8
0 $haseSinscar(Sinscar(0 0 )round()midic$s 0
0)sco$e
05$i (9) $haseSinscar(Sinscar(0 05$i )round()midic$s0 0)sco$e
$i () $hase
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 916
Sinscar(Sinscar(0 $i )round()midic$s 00)sco$e
5$i (9) $hase
Sinscar(Sinscar(0 5$i )round()midic$s0 0)sco$e
Recording(Writing to a File)
There are a number of approaches that one can take when
composing electroacoustic music There is real-time DSP and
synthesis where the code you write wiil play a complete piece
There is also the classic tape music approach which uses
pre-made sounds and arranges them in to a DAW (Digital
Audio Workstation) like ProTools Digital Performer Logic
Audacity etc To use SuperCollider sounds we will need to beable to record our patches as a sound file before we can
import them into an editing program
If you want to use the record feature on the server windows
first click on the
-gtdefault button on the server you wish to use Then click ontheprepare rec button start a patch and click onrecord
Clickstop when you are done
You will find your recording in theSuperCollider Recordings
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1016
folder found in theMusic partition named something like thisSlt070=lt0=9aif
hen you record this ay your gtles ill e recordedith deault 6alues and you ill$roaly ant to rename your recording
If you need to use values other than the defaults you can use
command lines so you can set the bit depth give it a name
and set the number of channelsThe following are thecommand lines to setting the defaults number of channels
file name and starting and stopping the recording
Record bit depth channels filename
srecSam$le1ormat A BintCB8
srechannels A 8
This creates a file in the SUperCollider Recordings folder
s$re$are1orDecord8
Before running these lines go back and run a previous
example
so you have something to record
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1116
srecord
Then
ssto$Decording
Play time(CombN SinOsc abs LFNoise1 LFSaw
array) - Play around with this
change values record to a file
srecSam$le1ormat A BintCB8srechannels A 8 chnage to or stereos$re$are1orDecordsrecordssto$Decording
Using code to record to disk can be clunky so the fast and
safe way is to use the server windows to record your sound
On
the default server click onprepare rec therec thenstop
when you are finished Your recording will be saved in the
Music partition of the hard drive in a folder named
SuperCollider Recordings
3 you use the Ser6er indo to record your sounds youill need to con6ert your sound gtle into a ormat thatyour seEuencer can read To dothis o$en your sound gtle in QuickTime 7 and eF$ort as
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1216
an aif gtle 4ou can also o$en the gtle in Audacity andeF$ort the gtle rom there
( 2oule clic the $arenthesis ao6e to Euicly select
the entire $atch r use com-shit-
i A Sinscar( Sine a6e osc
as( This $rotects against negati6e 6alues1+oiser(
05 reEuency o6erall andering000 range o o6erall andering1Sar(
5 = let and right channels$eed o the indi6idual see$s
mul 50 de$th o see$add 500 range o see$
))
)00 6olume stay elo 0
)8delayom+ar(i
0 maF delay5 actual delay stay elo maF delay
C delay decayadd i)
$lay
)
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1316
Second $atch 4ou can run them at the same time or
se6eral instances o the same $atch
( G- doule clic the $arenthesisampiFar(Hrraygtll(5 not too many 6alues could crashanar(
Sinscar(Sinscar(0 rrand(0 C0) 00 500))0rand))
)00$lay)
This one controls the three dimensions o sound $itcham$ and timre
(6ar trig out delay8trig A 3m$ulser(C)8 trigger rateout A li$ar( TDandr(97 trig)midic$s range in midi o$itches TDandr( trig) range o timre
maF(0 TDandr(-05 09 trig)) am$litudes)8out A anar(out TDandr(-0 0 trig))8out A outIn6Jenr(In6$erc(0 ) trig)8out A ampiFar(outdu$(C))08delay A omar(out 0 9C C)8
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1416
$lay)
HnthonyKs modigtcation
(6ar trig out delay $lay8trig A Sinscr(7000 0 05 05)8trig A 2ustr(trig 05)8trig A 3m$ulser( TDandr(5 50 trig))8
out A li$ar( TDandr(97 trig)midic$s TDandr( trig)maF(0 TDandr(-05 09 trig))
)8 out A anar(out TDandr(-0 0 trig))8
out A outIn6Jenr(In6$erc(0 ) trig)8out A ampiFar(outdu$(C))08
delay A omar(out 0 9C C)8
$lay A delay8
1reeLerar($lay ampouser(0 ) ampouse4r(0 )
05 07 0)
$lay)
M to more8 the gtrst uses a Sa as a control
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1516
(note the rising sound) The second illustrates ho 2ust can e used totrigger e6ents
(ampiFar(Hrraygtll(5 numer o oscillatorsarg c8anar(Sinscar( e sure the add is greater
than the mul1Saar((c0 ) mul 500 add 00)
) 1+oise0r()) $an s$eed)
)0$lay)
(ampiFar(anar(Mlanar(NHrraygtll( eF$rand(000 0000)) Hrraygtll( rrand(0 90))2ustar( 0))
1Trir(rrand(0 00)))du$(0)) $lay8)
one more
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1616
(6ar out nums8
nums A 008out A ampiFgtll(nums
Sinscar(eF$rand(00 0000)) Sinscar(eF$rand(000 )) 00)8utar(0 out)$lay)
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 916
Sinscar(Sinscar(0 $i )round()midic$s 00)sco$e
5$i (9) $hase
Sinscar(Sinscar(0 5$i )round()midic$s0 0)sco$e
Recording(Writing to a File)
There are a number of approaches that one can take when
composing electroacoustic music There is real-time DSP and
synthesis where the code you write wiil play a complete piece
There is also the classic tape music approach which uses
pre-made sounds and arranges them in to a DAW (Digital
Audio Workstation) like ProTools Digital Performer Logic
Audacity etc To use SuperCollider sounds we will need to beable to record our patches as a sound file before we can
import them into an editing program
If you want to use the record feature on the server windows
first click on the
-gtdefault button on the server you wish to use Then click ontheprepare rec button start a patch and click onrecord
Clickstop when you are done
You will find your recording in theSuperCollider Recordings
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1016
folder found in theMusic partition named something like thisSlt070=lt0=9aif
hen you record this ay your gtles ill e recordedith deault 6alues and you ill$roaly ant to rename your recording
If you need to use values other than the defaults you can use
command lines so you can set the bit depth give it a name
and set the number of channelsThe following are thecommand lines to setting the defaults number of channels
file name and starting and stopping the recording
Record bit depth channels filename
srecSam$le1ormat A BintCB8
srechannels A 8
This creates a file in the SUperCollider Recordings folder
s$re$are1orDecord8
Before running these lines go back and run a previous
example
so you have something to record
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1116
srecord
Then
ssto$Decording
Play time(CombN SinOsc abs LFNoise1 LFSaw
array) - Play around with this
change values record to a file
srecSam$le1ormat A BintCB8srechannels A 8 chnage to or stereos$re$are1orDecordsrecordssto$Decording
Using code to record to disk can be clunky so the fast and
safe way is to use the server windows to record your sound
On
the default server click onprepare rec therec thenstop
when you are finished Your recording will be saved in the
Music partition of the hard drive in a folder named
SuperCollider Recordings
3 you use the Ser6er indo to record your sounds youill need to con6ert your sound gtle into a ormat thatyour seEuencer can read To dothis o$en your sound gtle in QuickTime 7 and eF$ort as
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1216
an aif gtle 4ou can also o$en the gtle in Audacity andeF$ort the gtle rom there
( 2oule clic the $arenthesis ao6e to Euicly select
the entire $atch r use com-shit-
i A Sinscar( Sine a6e osc
as( This $rotects against negati6e 6alues1+oiser(
05 reEuency o6erall andering000 range o o6erall andering1Sar(
5 = let and right channels$eed o the indi6idual see$s
mul 50 de$th o see$add 500 range o see$
))
)00 6olume stay elo 0
)8delayom+ar(i
0 maF delay5 actual delay stay elo maF delay
C delay decayadd i)
$lay
)
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1316
Second $atch 4ou can run them at the same time or
se6eral instances o the same $atch
( G- doule clic the $arenthesisampiFar(Hrraygtll(5 not too many 6alues could crashanar(
Sinscar(Sinscar(0 rrand(0 C0) 00 500))0rand))
)00$lay)
This one controls the three dimensions o sound $itcham$ and timre
(6ar trig out delay8trig A 3m$ulser(C)8 trigger rateout A li$ar( TDandr(97 trig)midic$s range in midi o$itches TDandr( trig) range o timre
maF(0 TDandr(-05 09 trig)) am$litudes)8out A anar(out TDandr(-0 0 trig))8out A outIn6Jenr(In6$erc(0 ) trig)8out A ampiFar(outdu$(C))08delay A omar(out 0 9C C)8
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1416
$lay)
HnthonyKs modigtcation
(6ar trig out delay $lay8trig A Sinscr(7000 0 05 05)8trig A 2ustr(trig 05)8trig A 3m$ulser( TDandr(5 50 trig))8
out A li$ar( TDandr(97 trig)midic$s TDandr( trig)maF(0 TDandr(-05 09 trig))
)8 out A anar(out TDandr(-0 0 trig))8
out A outIn6Jenr(In6$erc(0 ) trig)8out A ampiFar(outdu$(C))08
delay A omar(out 0 9C C)8
$lay A delay8
1reeLerar($lay ampouser(0 ) ampouse4r(0 )
05 07 0)
$lay)
M to more8 the gtrst uses a Sa as a control
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1516
(note the rising sound) The second illustrates ho 2ust can e used totrigger e6ents
(ampiFar(Hrraygtll(5 numer o oscillatorsarg c8anar(Sinscar( e sure the add is greater
than the mul1Saar((c0 ) mul 500 add 00)
) 1+oise0r()) $an s$eed)
)0$lay)
(ampiFar(anar(Mlanar(NHrraygtll( eF$rand(000 0000)) Hrraygtll( rrand(0 90))2ustar( 0))
1Trir(rrand(0 00)))du$(0)) $lay8)
one more
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1616
(6ar out nums8
nums A 008out A ampiFgtll(nums
Sinscar(eF$rand(00 0000)) Sinscar(eF$rand(000 )) 00)8utar(0 out)$lay)
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1016
folder found in theMusic partition named something like thisSlt070=lt0=9aif
hen you record this ay your gtles ill e recordedith deault 6alues and you ill$roaly ant to rename your recording
If you need to use values other than the defaults you can use
command lines so you can set the bit depth give it a name
and set the number of channelsThe following are thecommand lines to setting the defaults number of channels
file name and starting and stopping the recording
Record bit depth channels filename
srecSam$le1ormat A BintCB8
srechannels A 8
This creates a file in the SUperCollider Recordings folder
s$re$are1orDecord8
Before running these lines go back and run a previous
example
so you have something to record
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1116
srecord
Then
ssto$Decording
Play time(CombN SinOsc abs LFNoise1 LFSaw
array) - Play around with this
change values record to a file
srecSam$le1ormat A BintCB8srechannels A 8 chnage to or stereos$re$are1orDecordsrecordssto$Decording
Using code to record to disk can be clunky so the fast and
safe way is to use the server windows to record your sound
On
the default server click onprepare rec therec thenstop
when you are finished Your recording will be saved in the
Music partition of the hard drive in a folder named
SuperCollider Recordings
3 you use the Ser6er indo to record your sounds youill need to con6ert your sound gtle into a ormat thatyour seEuencer can read To dothis o$en your sound gtle in QuickTime 7 and eF$ort as
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1216
an aif gtle 4ou can also o$en the gtle in Audacity andeF$ort the gtle rom there
( 2oule clic the $arenthesis ao6e to Euicly select
the entire $atch r use com-shit-
i A Sinscar( Sine a6e osc
as( This $rotects against negati6e 6alues1+oiser(
05 reEuency o6erall andering000 range o o6erall andering1Sar(
5 = let and right channels$eed o the indi6idual see$s
mul 50 de$th o see$add 500 range o see$
))
)00 6olume stay elo 0
)8delayom+ar(i
0 maF delay5 actual delay stay elo maF delay
C delay decayadd i)
$lay
)
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1316
Second $atch 4ou can run them at the same time or
se6eral instances o the same $atch
( G- doule clic the $arenthesisampiFar(Hrraygtll(5 not too many 6alues could crashanar(
Sinscar(Sinscar(0 rrand(0 C0) 00 500))0rand))
)00$lay)
This one controls the three dimensions o sound $itcham$ and timre
(6ar trig out delay8trig A 3m$ulser(C)8 trigger rateout A li$ar( TDandr(97 trig)midic$s range in midi o$itches TDandr( trig) range o timre
maF(0 TDandr(-05 09 trig)) am$litudes)8out A anar(out TDandr(-0 0 trig))8out A outIn6Jenr(In6$erc(0 ) trig)8out A ampiFar(outdu$(C))08delay A omar(out 0 9C C)8
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1416
$lay)
HnthonyKs modigtcation
(6ar trig out delay $lay8trig A Sinscr(7000 0 05 05)8trig A 2ustr(trig 05)8trig A 3m$ulser( TDandr(5 50 trig))8
out A li$ar( TDandr(97 trig)midic$s TDandr( trig)maF(0 TDandr(-05 09 trig))
)8 out A anar(out TDandr(-0 0 trig))8
out A outIn6Jenr(In6$erc(0 ) trig)8out A ampiFar(outdu$(C))08
delay A omar(out 0 9C C)8
$lay A delay8
1reeLerar($lay ampouser(0 ) ampouse4r(0 )
05 07 0)
$lay)
M to more8 the gtrst uses a Sa as a control
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1516
(note the rising sound) The second illustrates ho 2ust can e used totrigger e6ents
(ampiFar(Hrraygtll(5 numer o oscillatorsarg c8anar(Sinscar( e sure the add is greater
than the mul1Saar((c0 ) mul 500 add 00)
) 1+oise0r()) $an s$eed)
)0$lay)
(ampiFar(anar(Mlanar(NHrraygtll( eF$rand(000 0000)) Hrraygtll( rrand(0 90))2ustar( 0))
1Trir(rrand(0 00)))du$(0)) $lay8)
one more
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1616
(6ar out nums8
nums A 008out A ampiFgtll(nums
Sinscar(eF$rand(00 0000)) Sinscar(eF$rand(000 )) 00)8utar(0 out)$lay)
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1116
srecord
Then
ssto$Decording
Play time(CombN SinOsc abs LFNoise1 LFSaw
array) - Play around with this
change values record to a file
srecSam$le1ormat A BintCB8srechannels A 8 chnage to or stereos$re$are1orDecordsrecordssto$Decording
Using code to record to disk can be clunky so the fast and
safe way is to use the server windows to record your sound
On
the default server click onprepare rec therec thenstop
when you are finished Your recording will be saved in the
Music partition of the hard drive in a folder named
SuperCollider Recordings
3 you use the Ser6er indo to record your sounds youill need to con6ert your sound gtle into a ormat thatyour seEuencer can read To dothis o$en your sound gtle in QuickTime 7 and eF$ort as
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1216
an aif gtle 4ou can also o$en the gtle in Audacity andeF$ort the gtle rom there
( 2oule clic the $arenthesis ao6e to Euicly select
the entire $atch r use com-shit-
i A Sinscar( Sine a6e osc
as( This $rotects against negati6e 6alues1+oiser(
05 reEuency o6erall andering000 range o o6erall andering1Sar(
5 = let and right channels$eed o the indi6idual see$s
mul 50 de$th o see$add 500 range o see$
))
)00 6olume stay elo 0
)8delayom+ar(i
0 maF delay5 actual delay stay elo maF delay
C delay decayadd i)
$lay
)
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1316
Second $atch 4ou can run them at the same time or
se6eral instances o the same $atch
( G- doule clic the $arenthesisampiFar(Hrraygtll(5 not too many 6alues could crashanar(
Sinscar(Sinscar(0 rrand(0 C0) 00 500))0rand))
)00$lay)
This one controls the three dimensions o sound $itcham$ and timre
(6ar trig out delay8trig A 3m$ulser(C)8 trigger rateout A li$ar( TDandr(97 trig)midic$s range in midi o$itches TDandr( trig) range o timre
maF(0 TDandr(-05 09 trig)) am$litudes)8out A anar(out TDandr(-0 0 trig))8out A outIn6Jenr(In6$erc(0 ) trig)8out A ampiFar(outdu$(C))08delay A omar(out 0 9C C)8
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1416
$lay)
HnthonyKs modigtcation
(6ar trig out delay $lay8trig A Sinscr(7000 0 05 05)8trig A 2ustr(trig 05)8trig A 3m$ulser( TDandr(5 50 trig))8
out A li$ar( TDandr(97 trig)midic$s TDandr( trig)maF(0 TDandr(-05 09 trig))
)8 out A anar(out TDandr(-0 0 trig))8
out A outIn6Jenr(In6$erc(0 ) trig)8out A ampiFar(outdu$(C))08
delay A omar(out 0 9C C)8
$lay A delay8
1reeLerar($lay ampouser(0 ) ampouse4r(0 )
05 07 0)
$lay)
M to more8 the gtrst uses a Sa as a control
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1516
(note the rising sound) The second illustrates ho 2ust can e used totrigger e6ents
(ampiFar(Hrraygtll(5 numer o oscillatorsarg c8anar(Sinscar( e sure the add is greater
than the mul1Saar((c0 ) mul 500 add 00)
) 1+oise0r()) $an s$eed)
)0$lay)
(ampiFar(anar(Mlanar(NHrraygtll( eF$rand(000 0000)) Hrraygtll( rrand(0 90))2ustar( 0))
1Trir(rrand(0 00)))du$(0)) $lay8)
one more
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1616
(6ar out nums8
nums A 008out A ampiFgtll(nums
Sinscar(eF$rand(00 0000)) Sinscar(eF$rand(000 )) 00)8utar(0 out)$lay)
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1216
an aif gtle 4ou can also o$en the gtle in Audacity andeF$ort the gtle rom there
( 2oule clic the $arenthesis ao6e to Euicly select
the entire $atch r use com-shit-
i A Sinscar( Sine a6e osc
as( This $rotects against negati6e 6alues1+oiser(
05 reEuency o6erall andering000 range o o6erall andering1Sar(
5 = let and right channels$eed o the indi6idual see$s
mul 50 de$th o see$add 500 range o see$
))
)00 6olume stay elo 0
)8delayom+ar(i
0 maF delay5 actual delay stay elo maF delay
C delay decayadd i)
$lay
)
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1316
Second $atch 4ou can run them at the same time or
se6eral instances o the same $atch
( G- doule clic the $arenthesisampiFar(Hrraygtll(5 not too many 6alues could crashanar(
Sinscar(Sinscar(0 rrand(0 C0) 00 500))0rand))
)00$lay)
This one controls the three dimensions o sound $itcham$ and timre
(6ar trig out delay8trig A 3m$ulser(C)8 trigger rateout A li$ar( TDandr(97 trig)midic$s range in midi o$itches TDandr( trig) range o timre
maF(0 TDandr(-05 09 trig)) am$litudes)8out A anar(out TDandr(-0 0 trig))8out A outIn6Jenr(In6$erc(0 ) trig)8out A ampiFar(outdu$(C))08delay A omar(out 0 9C C)8
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1416
$lay)
HnthonyKs modigtcation
(6ar trig out delay $lay8trig A Sinscr(7000 0 05 05)8trig A 2ustr(trig 05)8trig A 3m$ulser( TDandr(5 50 trig))8
out A li$ar( TDandr(97 trig)midic$s TDandr( trig)maF(0 TDandr(-05 09 trig))
)8 out A anar(out TDandr(-0 0 trig))8
out A outIn6Jenr(In6$erc(0 ) trig)8out A ampiFar(outdu$(C))08
delay A omar(out 0 9C C)8
$lay A delay8
1reeLerar($lay ampouser(0 ) ampouse4r(0 )
05 07 0)
$lay)
M to more8 the gtrst uses a Sa as a control
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1516
(note the rising sound) The second illustrates ho 2ust can e used totrigger e6ents
(ampiFar(Hrraygtll(5 numer o oscillatorsarg c8anar(Sinscar( e sure the add is greater
than the mul1Saar((c0 ) mul 500 add 00)
) 1+oise0r()) $an s$eed)
)0$lay)
(ampiFar(anar(Mlanar(NHrraygtll( eF$rand(000 0000)) Hrraygtll( rrand(0 90))2ustar( 0))
1Trir(rrand(0 00)))du$(0)) $lay8)
one more
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1616
(6ar out nums8
nums A 008out A ampiFgtll(nums
Sinscar(eF$rand(00 0000)) Sinscar(eF$rand(000 )) 00)8utar(0 out)$lay)
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1316
Second $atch 4ou can run them at the same time or
se6eral instances o the same $atch
( G- doule clic the $arenthesisampiFar(Hrraygtll(5 not too many 6alues could crashanar(
Sinscar(Sinscar(0 rrand(0 C0) 00 500))0rand))
)00$lay)
This one controls the three dimensions o sound $itcham$ and timre
(6ar trig out delay8trig A 3m$ulser(C)8 trigger rateout A li$ar( TDandr(97 trig)midic$s range in midi o$itches TDandr( trig) range o timre
maF(0 TDandr(-05 09 trig)) am$litudes)8out A anar(out TDandr(-0 0 trig))8out A outIn6Jenr(In6$erc(0 ) trig)8out A ampiFar(outdu$(C))08delay A omar(out 0 9C C)8
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1416
$lay)
HnthonyKs modigtcation
(6ar trig out delay $lay8trig A Sinscr(7000 0 05 05)8trig A 2ustr(trig 05)8trig A 3m$ulser( TDandr(5 50 trig))8
out A li$ar( TDandr(97 trig)midic$s TDandr( trig)maF(0 TDandr(-05 09 trig))
)8 out A anar(out TDandr(-0 0 trig))8
out A outIn6Jenr(In6$erc(0 ) trig)8out A ampiFar(outdu$(C))08
delay A omar(out 0 9C C)8
$lay A delay8
1reeLerar($lay ampouser(0 ) ampouse4r(0 )
05 07 0)
$lay)
M to more8 the gtrst uses a Sa as a control
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1516
(note the rising sound) The second illustrates ho 2ust can e used totrigger e6ents
(ampiFar(Hrraygtll(5 numer o oscillatorsarg c8anar(Sinscar( e sure the add is greater
than the mul1Saar((c0 ) mul 500 add 00)
) 1+oise0r()) $an s$eed)
)0$lay)
(ampiFar(anar(Mlanar(NHrraygtll( eF$rand(000 0000)) Hrraygtll( rrand(0 90))2ustar( 0))
1Trir(rrand(0 00)))du$(0)) $lay8)
one more
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1616
(6ar out nums8
nums A 008out A ampiFgtll(nums
Sinscar(eF$rand(00 0000)) Sinscar(eF$rand(000 )) 00)8utar(0 out)$lay)
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1416
$lay)
HnthonyKs modigtcation
(6ar trig out delay $lay8trig A Sinscr(7000 0 05 05)8trig A 2ustr(trig 05)8trig A 3m$ulser( TDandr(5 50 trig))8
out A li$ar( TDandr(97 trig)midic$s TDandr( trig)maF(0 TDandr(-05 09 trig))
)8 out A anar(out TDandr(-0 0 trig))8
out A outIn6Jenr(In6$erc(0 ) trig)8out A ampiFar(outdu$(C))08
delay A omar(out 0 9C C)8
$lay A delay8
1reeLerar($lay ampouser(0 ) ampouse4r(0 )
05 07 0)
$lay)
M to more8 the gtrst uses a Sa as a control
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1516
(note the rising sound) The second illustrates ho 2ust can e used totrigger e6ents
(ampiFar(Hrraygtll(5 numer o oscillatorsarg c8anar(Sinscar( e sure the add is greater
than the mul1Saar((c0 ) mul 500 add 00)
) 1+oise0r()) $an s$eed)
)0$lay)
(ampiFar(anar(Mlanar(NHrraygtll( eF$rand(000 0000)) Hrraygtll( rrand(0 90))2ustar( 0))
1Trir(rrand(0 00)))du$(0)) $lay8)
one more
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1616
(6ar out nums8
nums A 008out A ampiFgtll(nums
Sinscar(eF$rand(00 0000)) Sinscar(eF$rand(000 )) 00)8utar(0 out)$lay)
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1516
(note the rising sound) The second illustrates ho 2ust can e used totrigger e6ents
(ampiFar(Hrraygtll(5 numer o oscillatorsarg c8anar(Sinscar( e sure the add is greater
than the mul1Saar((c0 ) mul 500 add 00)
) 1+oise0r()) $an s$eed)
)0$lay)
(ampiFar(anar(Mlanar(NHrraygtll( eF$rand(000 0000)) Hrraygtll( rrand(0 90))2ustar( 0))
1Trir(rrand(0 00)))du$(0)) $lay8)
one more
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1616
(6ar out nums8
nums A 008out A ampiFgtll(nums
Sinscar(eF$rand(00 0000)) Sinscar(eF$rand(000 )) 00)8utar(0 out)$lay)
7262019 Tutorial 3 PhaseampRecording
httpslidepdfcomreaderfulltutorial-3-phaserecording 1616
(6ar out nums8
nums A 008out A ampiFgtll(nums
Sinscar(eF$rand(00 0000)) Sinscar(eF$rand(000 )) 00)8utar(0 out)$lay)