To make it much easier to write synthesizer patches in Max gen~, we have added support for
bend parameters following the FAUST convention.
This means that incoming MIDI Note messages will be converted into [param freq] in Hz and [param gain] from 0.0 to 1.0, based on velocity value. There's also a [param gate] which is 0 normally, or 1 if a note is pressed.
Pitch bend comes in as [param bend], and this is meant to be a frequency multiplier. Simply multiply your
freq value by
bend to get a pitch bend range of two octaves up or down. The actual value is between 0.25 (i.e. 1/4) and 4.
Note that to prevent the parameters being clipped to a default 0.0 to 1.0 range you have to define @min and @max attributes for freq and bend, e.g.:
[param freq 440 @min 20 @max 20000] // default 440Hz, min 20Hz, max 20kHz
[param bend 1 @min 0.25 @max 4] // default 1x, min 1/4x, max 4x frequency
Here's a super basic example:
It plays in the browser too: hit PLAY then SHOW KEYBOARD and jazz out!
We have also added support for all four buttons on the Wizard, and up to 40 input parameters!
[param ButtonA] to [param ButtonD]
[param A] to [param H] (but remember to use [param Exp] instead of [param E], because E is the Euler constant!)
[param AA] to [param AH]
[param DA] to [param DH]
The extended parameters AA to DH can also be controlled by MIDI using these mappings:
It has been suggested to add another
[param note] to hold the current MIDI note number but we'll test it out first.
You can change this locally by digging out the file called
var API_ENDPOINT = 'https://www.rebeltech.org/api';
If you are feeling brave you can also change line 70 - the patch looks like this (change from red lines to green lines):
That will allow status messages to come through for the new devices: Alchemist and Wizard.