James Truscott - Sound Design 1 (MU316)
Transcript of James Truscott - Sound Design 1 (MU316)
-
7/30/2019 James Truscott - Sound Design 1 (MU316)
1/8
Sound Design 1 (MU316) Coursework 1
Lecturer : Andy Farnell
mes Truscott, BSc Music Technology Year 1
-
7/30/2019 James Truscott - Sound Design 1 (MU316)
2/8
1
My FM/Wavetable Synth.
James Truscott
-
7/30/2019 James Truscott - Sound Design 1 (MU316)
3/8
2
The synthesizer uses 2 forms of
synthesis to produce its tones.
Wavetable synthesis and
Frequency Modulation or FM
synthesis.
The FM counterpart is
constructed using a [sin~] or
sign wave oscillator to generate atone. It determines what
frequency is being sent to it by
the message being sent into its
left inlet. In this case i am
drawing note values from my
MIDI keyboard using a
"[notein]" object. the note in
object has three outlets the left
one being the MIDI note
number the middle being the
velocity variable and the right
being the MIDI channel number.in this case i used the first outlet
and fed the midi number into a
[stripnote] to "strip" the note
off signal. This means that when
i play a note in using the midi
keyboard, my envelope does not
get triggered by the note off
value, which would create 2
sounds. One when you press the
note, and one when you released
it.Once i had my stripped midi
number I used [mtof] to
generate a frequency value from
the MIDI note numbers, and
sent it to the inlet of my first
oscillator (the carrier
frequency). This means that
depending on which MIDI note I
trigger the corresponding
frequency will be sent to the
oscillator. I then created anotheroscillator [sin~] to serve as the
mod frequency. The mod
frequency oscillator is connected
to the carrier frequency inlet and
thereby modulates the frequency
of the carrier oscillator. the mod
frequency is generated by
dividing the carrier frequency by
4 (or "[* 0.25]"). However this is
quite a crude way of making sure
the modulation frequency is
relative to the carrier.
I think i could have bettered the patch by
setting some other relatable values foreach frequency by having calculations
with bang messages. For example you
could do a quarter as it is presently and
have the addition of doing halves eighths
or sixteenth fractions of the carrier fre-
quency.
The modulation index is user deter-
mined. I have done this because it adds
timbre to the sound and i think users
would appreciate having free reign over
the tone they require. The Mod index is
the number that the modulation fre-
quency is multiplied by, to create the final
modulation frequency.
FM counterpart ADSR envelope
The ADSR envelope i used was inspi
by the one also included in the RC-
patches available here.
(https://github.com/danomatika/rc
hes/tree/ master/rc-patches).
I used the rc-adsr~ as a template for
ADSR envelope and changed the inte
face. The envelope takes values from
sliders that determine the shape of th
velope. (attack=0-100 , decay=0-100
sustain=0-100, and release=0-200) t
are values in milliseconds which tell
envelope the duration of each stage o
process and the delay between the tr
ing of the note and when each stage s
The patch also includes an amp whic
will come in handy for blending my t
oscillators later.
Once the FM counterpart is complete
sent into a multiply box to be brough
good level and then sent to the [dac~
to get the envelope to effect the soun
must be routed into this multiply box
This is because when working with enlopes we are working with automatio
amplitude. We are sending the multi
tion variable into the box to determin
how much the amplitude has to be at
ated and when. as the envelope open
amplitude multiplication variable go
and as the envelope closes the multip
tion variable decreases.
Now that the envelope is in the chain
the correct place it requires triggerin
https://github.com/danomatika/rc-patches/tree/https://github.com/danomatika/rc-patches/tree/https://github.com/danomatika/rc-patches/tree/https://github.com/danomatika/rc-patches/tree/ -
7/30/2019 James Truscott - Sound Design 1 (MU316)
4/8
3
To trigger the envelope we must send a bang
message to its left inlet. This tells the enve-
lope to start working. As i want the envelope
to trigger as i play my notes in, i decided totake my bang signal from the [stripnote],
because at this point in the chain i have a
clean MIDI message with no note off sig-
nal so it will bang as soon as the note is regis-
tered. To do this all i did was wire a bang
from the left outlet of [stripnote] and into
the inlet of my ADSR envelope. Now when i
play a note on my keyboard and i have set
my envelope parameters, the signal being
produced by my frequency modulation sec-tion is sculpted to follow the envelope of the
ADSR.
As a bit of interfacing for the FM module i
began creating the canvas for my project
and made a [vslider] for the modulation
index so the user can play around with the
multiplier a little easier. I then arranged myfirst module with some frequency displays.
The Wavetable Oscillator.
The Wavetable counterpart of this synthesizer uses a wavetable
cillator design from "Rc-patches" called rc-wave~ which i found
here. -->
(https://github.com/danomatika/rc-patches/tree/master/rc-pa
es.)
It uses "mtof" to determine the frequency to oscillate at and a
[tabosc4~] to allow you to draw in your desired wave shape. i ha
chosen this form of synthesis as i think it allows a lot of creativit
when creating sounds and also makes each sound unique becaus
it is not possible to draw the same wave twice without sending th
wave parameters as a message to the "tabosc4~". The wavetable
also contains a message that stops it from playing notes if the
MIDI note value is 0 this means it can be played like an instru-
ment. it only requires one creation argument which is the size of
the table, which can be any size as long as its a multiple of 4 so thit stays in tune with the frequency it is oscillating at.
I added a clear table message and a bang for the GUI so people
start fresh with a blank table if they choose. In retrospect it wou
have also been good to find a way of saving and loading the para
ters of the wavetable for later use incase you found a particularly
sweet sounding wavetable doodle and wished to reuse it later.
I gave the Wavetable oscillator its own envelope so it could mov
independently from the FM modules envelope and create a wid
more varied texture for the overall sound. Like the FM module toscillator must be sent to a multiply box to manipulate the ampl
tude with the ADSR controlling the multiplication variable.
https://github.com/danomatika/rc-patches/tree/https://github.com/danomatika/rc-patches/tree/ -
7/30/2019 James Truscott - Sound Design 1 (MU316)
5/8
4
Bandpass filter
The bandpass filter i used is the [bp~] object. it has
3 inlets. The left inlet takes the audio signals to be
processed . To this inlet i connected the output of
both the multiplication boxes that the oscillators and
envelopes are connected to. The second inlet takes the
frequency at which the peak of the band is in the filter
envelope. To this i connected a knob with a range of
100 Hz - 3000 Hz as this is the frequency range that i
thought sounded best being effected. Also the knob
itself allows the user to sweep through the frequency
range easily and more freely. The right inlet is the Q
variable which determines the size of the band that is
being passed. I used a knob to set this parameter size
so its easy for the user to adjust by hand.
Graphic Displays
To create a more controlled feeling GUI i decided to add a
few extras which i like to see in Synths that i use. the first
of which and an essential in my eyes, an output channelstrip display, in this case i am using a [VU] object.
Im using send and receive boxes to send the signal from
the output of the bandpass filter into an envelope to show
the change in amplitude over time and then subtracted 100
from the signal to scale it to the [VU].
[VU] Display
Wave Shape Display.
Another thing which i love to see in a synthesizer, is a nice view of the oscillating wave so i can see how my tinker-
ing is affecting the sound. So i could not call my synth complete without one. The way i went about this is as fol-
lows.
First i created an array called wave-display that is 1000 milliseconds long. I then took a bang signal from the
[stripnote] and fed it into a [metro] i set the metro to trigger
every 125 milliseconds. I then routed that into another bang and
sent that into my [tabwrite~] sending data to wave-display. I
then wired the output of my filter into a subtraction box where 0.5 is
subtracted from the signal to bring it down in the array. From there
it is then fed in to the inlet of [tabwrite~ wave-display] this means
that when the note is played the [tabwrite~ wave-display] samples
the waveform every 125 milliseconds and outputs the data visually
in the array. i found that 125 milliseconds is often enough to take a
sample to get a smooth representation of the wave. However if you
wanted more accuracy you could reduce the number of milliseconds
thus increasing the amount of samples per second are being processed.
-
7/30/2019 James Truscott - Sound Design 1 (MU316)
6/8
5
Record functionFor the recording section i have used [writesf~] the vari-
able is the amount of channels in this case 2 as we are in
stereo. [writesf~] requires 3 messages an open mes-
sage a start message and a stop message. however i
had trouble getting the recorded files to end up in the cor-
rect directory so i added a little extra object which makes
life a lot easier in this situation.
MIDI Controlls
As i had a few fun parameters mapped to my final GUI fo
the user to get creative with i thought it would be good to
map the modulation index [Vslider], the Filter Fre-
quency and the Q size to midi controllers .
Each controller that i wanted to use is set by the [ctlin]
ject. If you just use [ctlin] without a number it will have
outlets the middle outlet tells you what number controlle
you are moving. i found this useful when working out wh
controllers i wanted to use. When i had decided which kn
on my controller i wanted to map to each parameter on th
synth i added the controller number to the [ctlin] objec
[ctlin 9]. This fixes [ctlin] on the controller number th
you want to use .
When it is set this way you only get 2 outlets. The left is the value of the control 1-127 and the right the MIDI channel numb
For this purpose all we need is the control value.
Depending on what the value of the parameter you are trying to control you will have to multiply or divide the maximum
value by something so you have full control of the parameter. For example for my Mod index controller i have a range of 0-
2000 on the output range of my [vslider]. so if i divide that by 127 i get 15.74 which is the number i must multiply the MIDontrol value by, in order to have full control of my [vslider]. Once i have my [ctlin 9] wired to a number box and multi-
plied by the correct amount it is sent to the [vslider] to control its movements.
As it requires you to press the messages in the order they
are listed (i.e open,start,stop.) i routed some bangs to the
GUI and made them traffic light colors to make it more ob-vious to new users .
By introducing a [save-
panel] object and a bang fol-
lowing to trigger the open
message, i am now able to
choose the directory to make
the sound file and decide
what to name it each time.
This is much more useful than
having the file named the
same every time as is the case
with incorporating the file
name and directory within the
open message e.g [open
../desktop/sample1]
-
7/30/2019 James Truscott - Sound Design 1 (MU316)
7/8
Conclusions And Developmental Ideas.
6
I am quite happy with how this project has worked out so far, but i will indeed keep developing this patch as there are a
few thing i would like to see included as and when i discover how to do them. Firstly i would like to include multiple
voices so it is possible to play chords. I found this quite a conundrum as i could not work out how to get multiple oscilla-
tors to for example, all take the drawn wave shape that the user has inputed into the [tabosc4~] table and mirror it in
other hidden tables to create multiple voices. Needless to say this would add a lot more to the sound and capabilities of
the synthesizer.
Another thing i would like to add, would be the option to mix back in the unfiltered signals from both of the oscillators
as well just to add to the array of sounds that it can make.
Of course you can never have too many oscillators i expect as i develop it further it will gain many more and
grow considerably in size.
I am very interested in creating synthesizers that combine various methods of synthesis, so one of the features i will be
adding is an oscillator that combines the two forms of synthesis in this patch in one. i.e Wavetable and Frequency modu
lation synthesis. In a way its a shame i am thinking of this now in hindsight as it would have been good to include in this
first version, and i am quite capable of doing it by simply replacing the carrier oscillator in my FM module with an edit-
able wave table oscillator such as the [tabosc4~] used in the wavetable module in this version.
Overall i think my patching could do with a few more sends and receives and, throws and catches to neaten thing up a
bit but i have had a lot of fun building this instrument and i am sure i will have much more fun in the future fixing
things, and of course going back into the parts of the code that are borrowed from external sources and making them
more my own as i get more confident with my skills and some more crazy ideas start coming into my head.
-
7/30/2019 James Truscott - Sound Design 1 (MU316)
8/8
7
Under The Hood. (Patch window)