Triad Chord Identifier

Recently Midihub user @Kleini needed a preset where a limited range of input chords would each trigger a unique response.

I think the sketch solution is interesting because

  • it creates a unique identifier for each triad which can be used in a variety of ways

  • it showcase several new Midihub features which only became fully available in firmware 1.15

Rather than add to the topic that should be focussed on solving @Kleini initial use case, this topic sketches out

how a chord can create a unique id message

It does this in four stages.

To start
triad_id_overview0

…this places the Root, 2nd and 3rd notes of the chord on separate channels…
…allowing them to be treated differently.


Each note is then used as a stage to create an “identifier message”.

In this use case…

…by using a different channel (see also this animation) for each root note, a restricted range of root notes (here max 14)
allows for significant scope for the later notes.

These are used to further define the “identifier message”…

triad_id_overview2

…by successive shifts…

triad_id_overview3


More experienced users can analyse the steps in this process in the specific patch amended by @Kleini here:
kleini_triad_identifier_test.mhp

The key pipelines are

  • the first “set-up” line and

  • the fourth virtual-mapped Transpose line
    (I believe the 2nd Delay line is necessary for mapping purposes and the 3rd is essential when Note Off is needed as in Kleini’s case)

I gave a rough sketch here

For users who might want a walk-through of how these techniques combine, I’ve add some diagrams in a later post.

1 Like

Impressive work! Is there an operating range limit like it only works for groups of 3 notes between C4 (60) - C5 (72)? Can it be expanded?

Yes, I should document this

In order to make it less complicated, the range of notes for notes 2&3 are fixed.

This means that as the root note rises the range of triads available is more restricted. This is reflected in the lower rows of the lookup table of triads

My hope was that, although by no means perfect, it would cover the range of @Kleini’s 60 chords.


EDIT
My ranges are currently

  • n1 60 -68 (could extend to 14/15 without any major redesign but see “fixed” caveat above)
    (I should probably add a Note Range Filter…)

  • n2 62 - 71

  • n3 65 - 72 (This Rescale is disabled as it the range naturally gives a +1 → +8 Transpose range)

If I get around to making a PatchStorage version, I’ll rethink this to maximise the range of triads (for data mapping functionality rather than musical purpose).
But I’ll wait to see whether the original design creates all the notes @Kleini needs…

1 Like

Here’s a sketch walk-through of the preset

The main set-up line and Transposes

this diagram shows the stages in setting up the unique identifier for each triad

The Rescales and Note Remap show the ranges of Note Number at â“·, â“ą and â“Ľ for each of the respective notes. These ranges can be adjusted to fit a similarly limited range of notes.
(The output range for Note 3 should start at 64/65 = Transpose 0/+1)

the Delay

As the mapping CCs and the variable-channel “reference note” leave the pipeline in the same millisecond, there is a risk that the Note On might reach the Transposes before they have been set by the mappings derived from Note 2 & 3.

triad_id_walkthru2_3

to avoid this, the Note On (only) is delayed by 1ms.

the Assignment

By the time the “reference note” has passed through the Transposes, it has become a " message which unique identifies the triad that created it.

By itself, however, it serves no purpose

The assignment line Transforms the identifiers for the chords which are important for the project into whatever meaningful message is useful

triad_id_walkthru5

Here there are just two both creating Note On and Off on Ch15.
Each Transform is written to work with a single Channel x Note Number combination.
Channel 15 is chosen purely because notes entering the pipeline uses that channel so no newly created note can be processed twice.
The Channel Remap at the end filters out unwanted channels and remaps Channel 15 to the desired channel.


Footnote

It would be possible to adapt this preset to use 16 consecutive root notes. This could be achieved by replacing Note On&Off by Poly Aftertouch once the notes have been Transposed.