Multi-Divisi v1.2

Splits and clones midi into separate channels to maximise the usage of 3-10 output voices to achieve a fatter sound whenever possible.

Single notes or chords will choose an pitch-ordered optimal initial distribution using all available voices. As long as one of the notes is sustained, adding or releasing notes will continously update the voice slots using complex optimization strategies. An intermediate release of all keys ends the current distribution run and the next note(s) will start with a new optimal initial configuration.

The script suppports multi channel midi. Controllers and expressions are only routed to voices originating from the same channel. The pitchbend / aftertouch / slide (CC-74) / modwheel (CC-1) / expression (CC-11) are tracked per channel and updated on channel changes before a new note on. In MPE mode, controllers and expressions of channel 1 are routed to all slots and in addition tracked expressions are summed with the channels expressions.

Use Cases
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
A perfect use case for the script is driving 4 to 6 SWAM brass (or string) instruments listening on different midi channels.
– Starting with the darker voices for the first output slots up to brighter voices for
the higher slots, maybe even placed at different positions in the stereo field.
– Monophonic lines play unison for a fat and wide sound, while chords and note additions
and releases change to partial unison or single voice distributions in interesting ways.
– While sustaining a chord, additional melodies with lower notes than the chord tend to
be played by the darker voices, melodies with notes higher than the chord with the
brighter voices.
– Send midi from several piano-rolls on different midi channels to combine their notes
without mutual influence, while still allowing additional live keyboard play on yet
another midi channel – including separate midi expressions for all inputs.

Another use case would be to distribute the input to many instances of a monophonix synth. Use slighty different sounds on each to achieve a big and fat overall sound.

It is favorable to provide more output slots than input notes played simultaneously to create opportunities for unison assignments.

Script UI
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
๐ŸŸ  ๐˜ด๐˜ญ๐˜ฐ๐˜ต๐˜ด knob
Selects the number of output channels/voices between 3 and 10.

๐ŸŸ  ๐˜ธ๐˜ข๐˜ช๐˜ต knob
Specifies an additional wait time to allow for initial chord detection with external
keyboards or imprecise playing style. All note input will be delayed by this amount.

๐ŸŸ  ๐˜ด๐˜ถ๐˜ฑ๐˜ฑ๐˜ญ knob
When releasing notes, previous note-on’s not older than the ๐˜ด๐˜ถ๐˜ฑ๐˜ฑ๐˜ญ time will reuse the
freed slots. This results in ๐˜ด๐˜ถ๐˜ฑ๐˜ฑ๐˜ญ slots triggering the previous note a bit later in
addition to the already playing slots. For sounds with soft attack longer ๐˜ด๐˜ถ๐˜ฑ๐˜ฑ๐˜ญ times
are possible without being noticeable.

๐ŸŸ  ๐˜ช๐˜ฏ๐˜ฑ๐˜ถ๐˜ต knob
Toggles between ANY channel mode and MPE mode. (See below)

๐ŸŸ  ๐˜ฎ๐˜ถ๐˜ญ๐˜ต๐˜ช pad
The script is intended to maximise the number of monophonic voices playing
each of the incomming notes. To allow for comparison with regular divisi
distribution, tap the ‘๐˜ฎ๐˜ถ๐˜ญ๐˜ต๐˜ช’ pad to toggle to one voice per note mode.

โฌ›๏ธ [๐˜š๐˜๐˜๐˜๐˜›] button
Toggles between pads view and description view

Setup
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
Feed midi from the keyboard (or one or several midi generators or pianorolls) into the script and choose the number of output slots.
Setup the same number of monophonic instruments, ideally with a slightly different sound and differently placed in the stereo field and connect their midi input to the scripts. Each instrument needs to filter for one of the scripts output midi channels.

Lower notes will more likely play on the leftmost slots (lower midi channels), while higher notes prefer the rightmost slots (higher midi channel numbers). This feature can be used to advantage when selecting the instrument voices.

Multi Divisi Voice Distribution
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
The voice distribution algorythm is quite complex as there are many possible combinations of active notes pitches, note placements, note slot groups and free slots. Active voices can’t be moved to other slots, as their attack phase would be audible.
The more notes are played and changed during a distribution run, the more chaotic the slot placement the script tries to re-balance.

The behaviour is completely deterministic, any given input sequence repeatedly leads to a certain slot distribution.

– The script tries to assign slots that best fit to the notes pitch (ordered from left to right)
for the current active note range.
– Groups (several slots playing the same note) are analysed and the best group is split.
– For five or more output slots, the two best fitting groups are split.
– Within group splits the optimal slots for original and new note are taken into account.
– When playing legato input, slots of the released note are re-used for the new note.
– Free slots (ended notes) are re-used whenever possible.
– If no groups or free slots exist, the script steals the best fitting slot from the oldest chord
– The script tries to balance the number of slots per active note by splitting larger groups

If all notes are released (for a tiny time fraction) a new distribution run starts with the optimal initial config.

External Keyboards
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
Due to physics, only good keyboard players on a good input device are able to perform all note-ons in the same event timeslot and also keyboard sliding does not generate the instant note-on/note-off event sequence like with virtual on-screen keyboards.

If there is a minimal delay between the notes of a chord input, the divisi script will initially allocated all slots to the first note, all voices play the same note. A tiny fraction later, the second note arrives and splits the output into groups of two notes. The initial note is stopped for the computed slots and the new note is send out. For instruments with fast attacks, one is able to hear the short play of the initial note.
The same artifact will happen when the third chord note arrives.

To counter this effect, use the ๐˜ธ๐˜ข๐˜ช๐˜ต knob to find the minimal delay needed to iniatally detect all chord notes with the all pads showing ‘Conf X’.

To tune Legato detection for physical keyboards, press a single note, slide left/right and dial in a ๐˜ด๐˜ถ๐˜ฑ๐˜ฑ๐˜ญ time where slides result in all slots beeing used. Sounds with soft attacks allow for long ๐˜ด๐˜ถ๐˜ฑ๐˜ฑ๐˜ญ timing.

The ๐˜ด๐˜ถ๐˜ฑ๐˜ฑ๐˜ญ feature can also help to catch all slots for arped playstyle, as sometimes a previous key isn’t lifter fast enough before the new key is hit.

Any Mode versus MPE Mode
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
In both modes the script supports notes and expressions from all midi input channels. A specific note will only play once – even if submitted several times on different midi channels. The expressions are send to the voice slots originating from notes of the expressions channel. The pitchbend / aftertouch / slide (CC-74) / modwheel (CC-1) / expression (CC-11) are tracked per channel and updated on channel changes before a new note on.

According to the MPE spec channel 1 is restricted to global expressions which should be combined with each notes individual expression. The notes use one of channels 2 to 16 each and per note expressions are send on the notes channel.

The MPE mode of the script will relay any expressions from the global channel 1 to all slots. The values for the tracked expressions of each slot are summed (and clipped to range) from global value (of channel 1) plus the value from the slots source channel.

Remarks
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
– ๐˜š๐˜ญ๐˜ฐ๐˜ต๐˜ด and ๐˜ฎ๐˜ถ๐˜ญ๐˜ต๐˜ช settings are updated when a distribution run starts or ends, ๐˜ธ๐˜ข๐˜ช๐˜ต, ๐˜ด๐˜ถ๐˜ฑ๐˜ฑ๐˜ญ and ๐˜ช๐˜ฏ๐˜ฑ๐˜ถ๐˜ต mode changes are instant

– The script has been extensively tested and has undergone several optimization and restructuring phases

– Divisi is a musical playing style, where the notes of a chord are split onto several
monophonic instruments. The Multi-Divisi concept is an extension of chord to voice
splitting, which adds unison voices to maximise instrument usage.

– The script idea is based on a request from AB forum user Synthi, who was looking for a script that plays the initial output configuration to 4 fixed output slots. Variable slot count, pitch sorted output slots, the redistribution algorithm for notes after the initial ones, multi channel midi, midi expressions and special MPE handling were the extra ingredients that made the development more interesting and challenging.

2 comments on “Multi-Divisi v1.2
  • -ki on said:

    Update v1.1
    ==========
    – Minor bugfix regarding MPE expression handling

    Tested settings
    – 6 SWAM Brass instruments
    – 4 SWAM String instruments
    – 10 Ripplemaker
    – 5 Agonizer

    with concurrent midi input from
    – Several Atom Piano Roll2 on separate channels
    – Helium with CC-11 automation
    – Multi channel LK playing imported horn section midi files
    – Two Xequence Keys with CC 1&11 and independent pitch bends
    – Geoshred MPE, iFretlass Bass MPE, Velocity KB MPE
    – Physical keyboards
    – Additional CCs from Rozeta XY and LFO sending on channel 1 with the script in MPE mode to check distribution to all channels, in addition to summing PB/AT/CC-1/CC-74 with the channels value

  • -ki on said:

    Update v1.2
    ==========
    – Added CC-11 to the tracked expressions which get a special treatment on note-on and for MPE. Now multi channel play of SWAM instruments will automatically update their expression settings if a slot is taken over from another channel.

  • Leave a Reply

      1941 PM
    • Platform:
    • Category: Utility
    • Revision: 1.2
    • License: Creative Commons Attribution Share Alike 4.0
    • Modified: 3 years ago
    • Views: 433
      Likes: 12
      Downloads: 49
    Download
    Chat