Switch filter

From jOrgan Wiki v1.25.1
Jump to: navigation, search

A switch which filters messages sent by all referring ranks.

Properties

See switch for properties.

References to

None.

Referenced from

Rank
The ranks which messages should be filtered by this element.

See switch for further referrers.

Messages

Intercept
Messages from ranks to intercept, all other messages will be let through untouched.
Engaged
Message to send to sounds when this element was engaged or a rank message was intercepted.
Disengaged
Message to send to sounds when this element was disengaged or a rank message was intercepted.

See switch for further messages.

In case a switch filter is just adding messages to those of a rank there's no need to use an Intercept message.

Sound switch

By sending a Program Change or Bank Select message, the sound device can be directed to switch to completely different sounds. Note however that this change effects subsequent key presses only (as specified in the wikipedia:Midi protocol).

An example setup to use Program change messages to shift the sound's program by 20:

Name MPL
Intercept equal 192, get program,
Engaged set 192, set program 0 | add 20,
Disengaged set 192, set program 0,

An example setup to use Bank select messages:

Name MPL
Intercept equal 176, equal 0, get bank
Engaged set 176, set 0, set bank 0 | add 1
Disengaged set 176, set 0, set bank 0
Intercept equal 192, get program,
Engaged set 192, set program 0,
Disengaged set 192, set program 0,

If engaged, the filter will shift the sound's bank by 1. Note that the current program is resent after each Bank select, otherwise the latter will have no effect as specified in the wikipedia:Midi protocol.

Tremulant

When a switch filter is engaged, it can send messages that control the modulation of a sound device, e.g. a modulation controller message for a software synthesizer.

The LFO (low frequency oscillator) of Creative soundcards can be controlled by the following wikipedia:NRPN messages:

Name MPL
Engaged set 176, set 99, set 127
Engaged set 176, set 98, set 1
Engaged set 176, set 38, set 60
Engaged set 176, set 99, set 127
Engaged set 176, set 98, set 17
Engaged set 176, set 38, set 1
Engaged set 176, set 99, set 127
Engaged set 176, set 98, set 20
Engaged set 176, set 38, set 2
Disengaged set 176, set 99, set 127
Disengaged set 176, set 98, set 17
Disengaged set 176, set 38, set 0
Disengaged set 176, set 99, set 127
Disengaged set 176, set 98, set 20
Disengaged set 176, set 38, set 0

With every package of three messages the device is configured with the value 60 for LFO frequency (1), 1 for LFO to pitch (17) and 2 for LFO to volume (20). Note that we reset LFO to pitch and LFO to volume to 0 when the filter was disengaged.

Alternatively you could switch to different sounds which have their tremulant settings already applied. This gives the sound designer greater possibilities to fine-tune the sounds (in comparison to the rather limited capabilities of dynamic modulation).

Tuning switch

A switch filter can be used to tune the sounds of referencing ranks.

Utilizing a pitch bend (224) wikipedia:Midi message to switch between 127 and 64:

Name MPL
Engaged set 224, set 0, set 127
Disengaged set 224, set 0, set 64

Note that the tuning range depends on the pitch bend sensitivity of your sounds producer. Instead of pitch bend you might have to use another wikipedia:Midi Controller or wikipedia:NRPNs.

If you want to switch between different tunings, you can use several switch filters. Note that only one of them should be engaged at a time and you should only use Engaged messages, otherwise their messages will interfere with each other.

You can use a regulator together with two incrementers to conveniently alternate between your tunings.

For a continuous tuning see tuning wheel.