Você está na página 1de 8

James Truscott Sound design 1

Sound Design 1 (MU316) Coursework 1 Lecturer : Andy Farnell

James Truscott, BSc Music Technology Year 1

James Truscott

My FM/Wavetable Synth.

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 a tone. 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 another oscillator [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.

FM counterpart ADSR envelope The ADSR envelope i used was inspired by the one also included in the RCpatches available here. (https://github.com/danomatika/rc-patc hes/tree/ master/rc-patches). I used the rc-adsr~ as a template for my ADSR envelope and changed the interface. The envelope takes values from the sliders that determine the shape of the envelope. (attack=0-100 , decay=0-1000, sustain=0-100, and release=0-200) these are values in milliseconds which tell the envelope the duration of each stage of its process and the delay between the triggering of the note and when each stage starts. The patch also includes an amp which will come in handy for blending my two oscillators later.

I think i could have bettered the patch by setting some other relatable values for each 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 frequency. The modulation index is user determined. 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 frequency is multiplied by, to create the final modulation frequency.

Once the FM counterpart is complete, it is sent into a multiply box to be brought to a good level and then sent to the [dac~] but to get the envelope to effect the sound it must be routed into this multiply box. This is because when working with envelopes we are working with automation of amplitude. We are sending the multiplication variable into the box to determine how much the amplitude has to be attenuated and when. as the envelope opens the amplitude multiplication variable goes up and as the envelope closes the multiplication variable decreases. Now that the envelope is in the chain in the correct place it requires triggering .

The Wavetable Oscillator.


The Wavetable counterpart of this synthesizer uses a wavetable oscillator design from "Rc-patches" called rc-wave~ which i found here. --> (https://github.com/danomatika/rc-patches/tree/master/rc-patch 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 have chosen this form of synthesis as i think it allows a lot of creativity when creating sounds and also makes each sound unique because it is not possible to draw the same wave twice without sending the 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 instrument. 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 that it stays in tune with the frequency it is oscillating at. I added a clear table message and a bang for the GUI so people can start fresh with a blank table if they choose. In retrospect it would have also been good to find a way of saving and loading the parameters 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 move independently from the FM modules envelope and create a wider more varied texture for the overall sound. Like the FM module the oscillator must be sent to a multiply box to manipulate the amplitude with the ADSR controlling the multiplication variable.

To trigger the envelope we must send a bang message to its left inlet. This tells the envelope to start working. As i want the envelope to trigger as i play my notes in, i decided to take my bang signal from the [stripnote], because at this point in the chain i have a clean MIDI message with no note off signal so it will bang as soon as the note is registered. 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 section 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 my first module with some frequency displays.

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
[VU] Display 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 channel strip 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].

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 tinkering is affecting the sound. So i could not call my synth complete without one. The way i went about this is as follows. 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 4 processed.

Record function
For the recording section i have used [writesf~] the variable is the amount of channels in this case 2 as we are in stereo. [writesf~] requires 3 messages an open message a start message and a stop message. however i had trouble getting the recorded files to end up in the correct directory so i added a little extra object which makes life a lot easier in this situation. By introducing a [savepanel] object and a bang following 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] 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 obvious to new users .

MIDI Controlls
As i had a few fun parameters mapped to my final GUI for the user to get creative with i thought it would be good to map the modulation index [Vslider], the Filter Frequency and the Q size to midi controllers .

Each controller that i wanted to use is set by the [ctlin] object. If you just use [ctlin] without a number it will have 3 outlets the middle outlet tells you what number controller you are moving. i found this useful when working out which controllers i wanted to use. When i had decided which knobs on my controller i wanted to map to each parameter on the synth i added the controller number to the [ctlin] object eg. [ctlin 9]. This fixes [ctlin] on the controller number that 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 number. 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 02000 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 MIDI control value by, in order to have full control of my [vslider]. Once i have my [ctlin 9] wired to a number box and multiplied by the correct amount it is sent to the [vslider] to control its movements.

Conclusions And Developmental Ideas.


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 oscillators 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 modulation 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 editable 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.

Under The Hood. (Patch window)

Você também pode gostar