Posted Reaction by PublMe bot in PublMe
Max MSP Beginners Guide: Adding envelopes to a software synthIn this tutorial for our Max MSP Beginners Guide, you’ll learn how to build an envelope system to attach to the oscillator, so that the notes being produced by the monophonic synthesizer stop playing once you release the MIDI key.
READ MORE: Max MSP Beginners Guide: How to build a monophonic software synthesizer
If you haven’t caught up on the previous two tutorials in which we show you Max MSP’s basic tools, and how to build an input/output and oscillator, please check them out before you embark on this tutorial.
Open up your patch from the last tutorial and ensure that the page is setup correctly before we get going. Unfortunately, these do not save, and need to be reset each time you open up Max MSP. You can refer back to Part 1 of this tutorial series if you need any guidance.
Next, create a new sub header on your patch, named Envelope. Due to it’s function, it’s best placed underneath the input.
The Envelope
Remember the velocity information sent from the MIDI device in the last tutorial? This will be the basis of the envelope; this tells your synth when to start and stop playing a note.
There are four typical components to an envelope: attack, sustain, decay, and release. Luckily for us, there is an object that allows us to set each of these variables in a very simple way.
Create the object ‘adsr~’. If you open up the help file (by holding down alt/option and clicking on the object), you can see that there are multiple ways to trigger the envelope, and also set the arguments of attack, sustain, decay and release. First, you’ll create a simple envelope before learning how they can be triggered by messages and bangs.
You might find that an object is red. This means that Max MSP cannot understand the object and it will need to be corrected. This will also pop up in the Max Console on the right hand side of the patch, and should tell you why Max MSP cannot read what you have created.
As we just want to create a simple envelope for the moment, we’re going to insert the variables directly into the object. This is a useful option if you only want your envelope to have one setting. You can choose whatever numbers you would like, but we will use 20, 80, 0.5, and 2.
Connecting the Envelope
Now we have created the envelope object, it needs to be connected to the rest of the patch. As mentioned previously, it needs to receive the Velocity information being received by the ‘notein’ object. To do this we need to connect a wire from the velocity outlet on the ‘Kslider’ to the ‘asdr~’ trigger which is the inlet on the left hand side, as when the velocity changes, it needs to trigger the envelope to turn on.
Next, you need to connect it to the output, so that we can hear the envelope work its magic.
We recommend that you add the envelope to the left side of the multiplication object inlet, to make the process clearer for you going forward.
However, when you play your note, it might play again when you release your note. If it does this, don’t worry. This means that the envelope is being triggered for both ‘note on’ and ‘note off’. A simple fix for this is to add in the object ‘
Max MSP Beginners Guide: Adding envelopes to a software synth
musictech.comIn this tutorial for our Max MSP Beginners Guide, you’ll learn how to build an envelope system to attach to the oscillator.
PublMe bot
bot