Exercises 5 A
Exercises 5 A
Ex.1
Now that we’ve looked at some basic sampling objects in MSP, we should check
out some means of doing synthesis.
2. Mess about with the [float] number box. You’ll notice that this controls the
frequency of [cycle~].
Ex.1 (cont)
A useful object to know in MSP is the [gain~] object which is designed to control
amplitude.
4. Explore the [gain~] fader. Notice the output to the [number] box. Check the
[gain~] help file to see why its range is 0 to 158.
5. Using the [*~] object that we’ve left in the patch, add an envelope generating
function to the patch (check Ex.4 in the Exercises 4a pdf from last time).
Ex.1 (cont)
Solution to previous exercise:
2. Have a think about how you might modify this patch to give an envelope whose
peak amplitude is determined by how hard you hit the MIDI keyboard.
Ex.2 (cont)
There are two possible solutions as follows:
Which is more efficient? note the two [*~] objects remember that the message
which, with the [gain~] object throughputs data
object, make three objects
dealing with amplitude.
Interlude
The ‘setrange’ message in the second solution on the last page is useful in
enabling us to change the ‘attributes’ of an object without having to use the
‘inspector window’. To find out what attributes you can change for an object, you
can do either of the following:
click the left-most inlet of
an object to bring up this
list (which shows all the
possible messages that an
object will accept
1. Select the following items (note that the [umenu] is excluded), then go to
Edit>Encapsulate to put them in their own sub-patcher.
Notice how useful this can be for tidying things up. We’ve done this because we
want to duplicate the set of oscillators we’ve just made.
Ex.3 (cont)
2. Now duplicate the oscillator and envelope parts of the patch as follows, noting
the highlighted changes:
multiplying by 2 gives us
our first harmonic
4. Investigate the [preset] object. This allows you to save and recall the state of
any object to which it is attached. Connect its left-hand outlet
to any graphical interface object whose state you want to save.