To make it much easier to write synthesizer patches in Max gen~, we have added support for freq
, gain
, gate
and 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:
https://hoxtonowl.com/mediawiki/index.php/MidiMappings
It has been suggested to add another [param note]
to hold the current MIDI note number but we’ll test it out first.
Now to another thing: this won’t currently work with the OWL Watcher! The OWL package is out of date and we’re working on an update. The main problem is that a Javascript file which contacts our web server still has the old server URL.
You can change this locally by digging out the file called OWL/javascript/OWL_API.js
from the package, and editing line 8. It should read:
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):
https://github.com/Cycling74/OWL/commit/e50cfa061f382bec86815550bb35308fd2dcb899
That will allow status messages to come through for the new devices: Alchemist and Wizard.