yashton / terpstrakeyboard

Virtual Isomorphic Music Keyboard
https://keyboard.snelgrove.science
GNU General Public License v3.0
9 stars 3 forks source link

Micro-tonal MIDI configuration #1

Open yashton opened 4 years ago

yashton commented 4 years ago

From https://github.com/wcgbg/terpstrakeyboard/issues/2#issue-299093072

Web MIDI API: https://www.w3.org/TR/webmidi/

Ability to send real-time MIDI Tuning Standard System Exclusive messages. A. Detailed example of multichannel MIDI mapping.

Background: use existing multichannel keyboard mapping implementation as reference.

Official support for the hardware Terpstra Keyboard includes the acclaimed physical modeling software engine Pianoteq. Their custom multichannel keyboard mapping for up to 16*128 notes implemented specifically for the Terpstra works like this:

Let's assume the simplest example with any N-tone scale and the reference frequency of 440 Hz.

Load your custom N-tone scale.
The Keymap menu has a new feature called "Extended layout for up to 16*128 notes". Tick the option "Multi-channel MIDI layout".
Play MIDI note 69 on channel 1, tone is 440 Hz. MIDI note 69+N gives 880 Hz, while 69-N 220.
Play MIDI note 69 on channel 2, tone is 880 Hz. MIDI note 69+N gives 1760 Hz, while 69-N 440.
Play MIDI note 69 on channel 16, tone is 220 Hz. MIDI note 69+N gives 440 Hz, while 69-N 110.
... and so on.

The reference frequency changes according to the scale's Interval of Equivalence (in this case 2/1) on the same MIDI note of every subsequent MIDI channel. The scale gets expanded according to its number of tones N in both directions. Other diapasons, as well as the MIDI note for scale's 1/1 can be controlled by loading an additional *.kbm mapping file.

This approach won't need pitch bending or anything fancy, just the ability to send MIDI note on/off messages across multiple MIDI channels. It will then be up to the user to load the *.scl tuning file from the WebApp in the external sound engine. B. Send real-time MTS SysEx signals.

«MTS 3-byte single note tuning is the most accurate method.» (Scala Relay)

The MIDI Specification's "Single Note Tuning Change (real-time)" was designed for dynamic tuning.

«The MIDI Tuning Standard was ratified by the MIDI Manufacturers' Association in January 1992. Manufacturers have the option of supporting the tuning standard partially or in full.» http://www.microtonal-synthesis.com/MIDItuning.html

For «an addition to the MIDI specification which allows the sharing of “microtunings” ... and the switching of these tunings during real-time performance» see page 47 (pdf 79) of The Complete MIDI 1.0 Detailed Specification v. 96.1 third edition

pierstitus commented 4 years ago

Now that MPE MIDI is becoming more and more supported, another way to implement tuning is using MPE with polyphonic pitch bend to bend each note from the nearest 12tet note to the wanted pitch.

The benefit is that this supports any number of notes, while MiDI tuning only alows to retune the 12 existing notes per octave.

This is also the method I use for tuning in the Striso, and works like a charm, only you do need a MPE enabled synthesizer.