polyphony and the poly~ object (also adsr~)

In this tutorial, I introduce the poly~ object and its best friend adsr~. Poly~ is a rather useful but slightly complex tool that allows you to have multiple instances of the same DSP stacked on top of one another, waiting for commands to sound. Polyphony is important when one of your sounds needs to carry on after another sound has started – useful in sample playback and synthesis.

Consider a synthesiser where multiple notes may be played by a keyboard or drumpad simultaneously, but you don’t know how many notes will be played.

Poly~ follows a concept of voices, where each voice is sits and waits for a command to play, if voice 1 is busy, the next voice gets chosen and the message to play goes to that voice. If a voice becomes free again, it waits for another command to play, or does nothing. This waiting around and doing nothing is very good for us because DSP can be saved when a voice is inactive.

While this tutorial is only going to show basic use of Poly~ there are more advanced features where you can store DSP effects like filters and delays, stacked and ready to be used on command, and you can also manage the computer’s multicore processing and other rather neat features, but that’s for another time.

How poly~ works

Below is an image of a basic polyphonic sample player voice. It has a few other nice features including a filter and a panner which you may or may not need in your own patches. Note most importantly, the adsr~ object which integrates very well with poly and helps to avoid clicks when new voices are started and stopped.

When this sample player is instantiated, it is called within a poly~ object like this:

You will see the poly~ has 10 voices of the maxpatch called polySamplePlayer. In order for this max patch to be found, you need to keep it next to the toplevel patch that calls it.

polyDemo-VeryBasic – the patches made in the the first two videos below are here, but follow along and make them yourself. Don’t forget to annotate them.

Video 1 – intro

Video 2 – voice management

polyDemo-withADSR – the patches made in the next two videos are here. However, it’s best if you follow along yourself and annotate as you go in order to make the patches your own.

Video 3 – introducing adsr~

Video 4 – using adsr~ – watch out for decay trigger

polyDemo-someAddedFeatures – these patches have the same names as the two examples above, so keep them in their originating folder. You can download and explore these, however, it’s best if you follow along the videos below yourself and annotate as you go in order to make the patches your own.

Video 5 – adding features – what to play

Video 6 – adding features – including a filter on each voice