0% found this document useful (0 votes)
7 views

Exercises 5 A

Uploaded by

dan
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

Exercises 5 A

Uploaded by

dan
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

Max/MSP exercises 5a

Ex.1
Now that we’ve looked at some basic sampling objects in MSP, we should check
out some means of doing synthesis.

1. Copy the following:


440 argument to [cycle~] gives us
the default frequency

Since [cycle~] occupies the entire available bandwidth (-1


to 1), we will attenuate significantly to save our ears...

This is the [ezdac~] object -- a graphical interface object


which serves as a conduit to the soundcard and a button
to turn DAC on and off.

This gives us a sine tone oscillator with a starting pitch of 440Hz.

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.

3. Modify the previous patch as per the following:

The [gain~] object performs exactly the same function as the


[*~] object in the previous patch (i.e. multiplying each sample
that it throughputs in order to amplify or attenuate it). It could
in theory replace our [*~] object in the original patch. It
remains for the moment as we’ll use it for something else
later, but it also continues to serve as a useful ‘limiter’ for the
signal, even if we crank up the [gain~] fader.

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:

You could add a similar engine


to control pitch in the same
way.

Keep the [gain~] low for this exercise


for the sake of your ears...

6. Try to figure out how to do this (solution overleaf).


Things to know/think about:
a) [cycle~] will take a signal input (so you can connect a [line~] to it)
b) in order to work within the frequency domain, you’ll need to change the
‘Lo and Hi Display Range’ of your [function] object in the inspector
window.
c) you’ll want to trigger both envelopes at the same time.
Ex.1 (cont)
Solution to previous exercise:

our ‘note’ can be anywhere between


100 and 1000Hz (you might choose
different limits to your range)
Ex.2
Instead of a Hz being used to control our pitch, perhaps we’d like to use a
keyboard.

1. Copy the following:

what does [mtof] do? and what is this doing?


check it’s ‘help’ window how is dividing by 127.
to find out. useful?

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

click the @ button in


the ‘inspector window’
to reveal a list which
gives you attribute
names for the various
items in the inspector
Ex.2 (cont)
So far we have a monophonic synth but with only one tone.

3. Add the following to your patch:


(You’ll need to add ‘off, sine, saw’ to the [umenu]’s
‘inspector window’)

4. Using the same principle, add the following triangle and


square wave oscillators and modify the [selector~] and
[umenu] objects accordingly:
• [tri~] (give a 0.5 argument)
• [rect~] (give a 0.5 argument)
Ex.2 (cont)
Solution:
Ex.3
Using this model we can make a basic additive synth. But first, to remove a bit of
clutter:

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

the envelope engine has been


simplified slightly for the
purposes of clarity, but you
can continue to use the
‘setrange’ model if you wish
Ex.3 (cont)
3. Use this model to create 4 more partials (so you have a fundamental and 5
harmonics) which continue to adhere to the harmonic series (ie. x3, x4, x5, x6).

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.

Open the patch Ex5a3_4 to see a solution.

You might also like