Chord TX Mode gemerate or other solutions

Hello everyone,

and thank you for the warm welcome to the community. I am a recent owner of a Midihub and I have the following issue, which I thought would be relatively simple to implement. Unfortunately, it turns out to be more complex than I initially thought.

I have an accordion, and with the chord buttons (on the left side), three notes are always sent simultaneously for the chords, for example, C, Eb, G; one row further, C, Eb, B (C7); another row, C, Eb, G. I want to control a sample that is spread over four octaves. On the single note C4, a C-major chord should sound; on C5, a C-minor chord; and on C6, a C-dominant seventh chord.

When the MIDI system sends three notes at once, of course, three samples are triggered, which is not useful for the application. I need a function that allows the chords to be interpreted. So, a rule that says when the notes C, Eb, and G arrive simultaneously, C4 should be output. When the notes C, Eb, and G arrive simultaneously, C5 should be output, and so on.

I know this would be a relatively large effort to set up initially, but once that’s done, it should work fine. Of course, it would be great if there is another solution as well. I hope to find an answer to my problem here.

Best regards

Tobias Klein

Hey, @Kleini
take a look at using the Dispatcher pipe, set to Chord Asc…

…if I understand your plan properly, the C note will then be allocated to Ch1 (if that’s the first selected), the other channels can be filtered out

In 3 subsequent lines, you can dedicate each to its own C-octave note, using Harmonize (and Transpose if desired) to get the chord you want.

Kleini 2025-03-11 at 12.19.04

Other options✷ are available, but that should get you started :smile:

✷

if for example, your keys are all separated by octaves (C7, Eb7, B7 for example ), you could just use Note Range Filters on different lines leading to different Scale Remaps. This is simpler but I wasn’t sure this fits your situation

The accordion always produces different inversions of the chords. Since the Midihub doesn’t have chord recognition, I have to somehow program it manually to understand that when C, E, G comes, it’s a C major chord. If C, E, B comes, it’s a C7. Is there a way to create an ā€˜if-then’ rule? If the notes C, E, G are present, play C4. I don’t need the other notes, because there is a sample on C4 that already plays the CEG chord.

It doesn’t help to just say that whenever a C comes, a C should play. When the F major chord is played, the MIDI notes F, A, and C will come, and these need to be correctly interpreted as well.

The chord genierate all in the 4th octave

Please give the exact incoming note names for several example chords (C7, Eb7, B7 for example) as there may (or may not) be a workaround✷ depending on the combinations you are using!

✷ Midihub doesn’t have ā€œif-thenā€ logic directly, but such structures can be emulated via pipelines and filters

Sorry for asking again, but I think I haven’t fully understood how it works yet. Of course, I can check for specific notes (e.g., ā€œAre you playing C4?ā€ / ā€œAre you playing E4?ā€). But how can I tell the system to send a C7 when C4, E4, and G4 are detected? The notes always depend on each other.

In the next chord, it might be C, Eb, and G, in which case it shouldn’t trigger a C7 but rather a C6.

What should the command chain look like to correctly interpret chords?

I’m definitely still at the beginning of my skills and hope for your support or a screenshot with the appropriate settings and pipes.

Just hook your device up to Midihub, select the input pipe and record/take screenshot of the incoming chords with say a second or two between

(you’ll get more on the panel if you go to Settings... → Incoming Filters and filter Note Off etc from displaying)

Then we can see whether the combinations in the actual notes can yield the outcomes you want (in some non-obvious way).
This would not be chord-interpretation in any general sense, but might offer me a way to help you (I will only know when I see the chord sets). There is no point in going into more detail until I see the data.

2025-03-12 Midi Editor Akkordeon Mididaten.pdf (489.2 KB)

Hello, I have compiled images and screenshots in the file. Rows 1 and 2 are irrelevant. It’s about rows 3-6. I have photographed the incoming MIDI data for the first 5 buttons from top to bottom.
I hope this makes the problem clearer.

1 Like

OK thanks, that’s useful :+1:
I shall analyse that particular chord set to see whether my conceived strategy will work. :wink:

Talk later.




PS. Lovely instrument!


btw
would you correct this for me please:

both have C, Eb, G: are these same inversion in different octaves, different inversions or just a typo?

Sorry thats not right

a rule that says when the notes C, Eb, and G arrive simultaneously, C4 should be output. When the notes C, E, and G arrive simultaneously, C5 should be output,

Thanks.

A few other things to check as I pick through your message lists:

  1. which View → Note Value Display are you using?
    I’m working on ā€œMiddle C = C3ā€ assumption

  2. There are brief single Notes in Riehe 3.
    Are these intended and, if not, would a solution need to prevent them giving erroneous sounds?

  3. Does the manual say anything about what the CCs are for?
    (These might just become useful – I don’t know yet– as they seem to be sent immed after the chord)

In View - Note Value Display is ā€œMiddle C 60 - C4ā€ drin

I’m afraid I can’t say what the controllers are doing—I can’t find anything on that. I also can’t understand why the row is sending three additional notes. Very strange. I’ll try again later to see if I pressed something wrong, but I don’t think so…

Update

OK, your setup might make it possible to assign each of your 20 chords with a unique message value (say a note number of a CC value).

This is made (probably) possible because…
…your particular case only uses triads restricted to one Octave.

Now I’m looking at how to squeeze the maximum possible combinations within your system (216!) into just 128 so that your particular set of 20 chords each has a unique identifier.
(Update2: just realised this is not a problem. Details later)

PS. I haven’t seen this done before, but the two Midihub enhancements (Chord Dispatcher and Virtual Mappings) that make it even conceivable have only been around for 15months or so.

Exactly, that would be the goal. However, in the end, there are more than 20 chords. There are 5 rows, and each row contains all chords (12 in total). So, in the end, that would be 5 Ɨ 12 chords (60 in total).

In the pictures, I had only pressed the first 5 buttons on the accordion.
If necessary, I could also reduce it to 2 rows (24 chords) if that would be helpful.

Now the way I was initially thinking of it, Tobias, was to try to fit the combinations into a single channel of messages.
I’m now thinking of a channel for each root note.

Sooo, 60 chords might still be workable…
…but it depends what you want each identifier to do, further down the pipelines:

…if each will only trigger just a single note (as your first post suggests ), then you might have space
(recall a patch/preset has a maximum of 255 pipes so that’s a constraint)

…If you’re extending to id → chord then unliklely.

Now before I dive in, I will need to know the ā€œrangeā€ of your chords

In the table below
using Note Numbers for your chords, we can see the lowest and highest notes for each note in the triad…

table
note1 note2 note3
72 75 78
77 80 83
row 3
74 77 82
74 79 82
72 75 80
73 77 80
73 78 82
row 4
73 77 82
75 78 82
75 80 83
73 76 80
73 78 81
row 5
74 80 82
73 75 79
72 78 80
73 77 83
76 78 82
row 6
73 79 82
72 75 78
77 80 83
73 76 82
75 78 81

…it would be useful to know the lowest and highest note (for each of note1|note2|note3) when looking at the entire range of 60 chords.
Then I can get my sums correct!

This was already mentioned. :slight_smile:

1 Like

@Giedrius thx missed that reply

So @Kleini all my figs in the table are +12! Glad I know now…

Would it help if I created a complete list by recording the actual MIDI signals being played and entering them into a table (similar to yours), while also defining the target note for each row?

No, don’t worry about it, Tobias (but thx for the offer):
what I’m doing right now is creating an example patch to show how it can be done.
It’ll have some assumed ranges to give unique identifiers for >60 chords.

I’ll post it with an explanation so that you can adjust these ranges to ensure that your chords are covered uniquely.

I’ll also leave a couple of demo pipes to show how these ā€œunique identifiersā€ are then used to output the notes you want so you can continue the long and careful task of getting the correct chord → sample correspondence!

Hot off the press and after a little bit of testing.

That it Works

Here’s the basic idea:

kleini0

  • Here’s the output of the unique identifier section
    I’ve added in the original chord (remapped to Ch16) just to compare

  • so C4-Eb/D#-G gives the ā€œidentifier messageā€ Ch1 C#0
    (the velocity is preserved, the Note Off matches but is hidden from display to avoid clutter)

  • C#4-E-G# → Ch2 C1

  • D4-F-A → Ch3 B1 and so on down the display


Here’s the C4-Eb-G ā€œidentifier noteā€ being transformed into your C4:

kleini3
NB The Transform is set to

  • Only work with Ch1 and

  • with the Note C#0
    ie. the ā€œidentifier messageā€ for this chord

  • the Transform creates C4 on ch15

Similarly:

2nd desired note Transform

kleini4

kleini2

the triad C4-Eb-G → (identifier message) Ch1 B0 → desired note C4

Why Ch15? This is just a safety trick so that all outgoing notes are on Ch15, an unused channel.
The Channel Remap ensures only these notes are mapped to the desired sampler channel.

next: How it works

1 Like

How it works

kleini1
the pipelines in brief

  1. the set-up line: a triad comes in, a ā€œbase identifier messageā€ Note On|Off and two mappings go out

  2. the ā€œbase identifier messageā€ Note On is delayed by 1ms (explained later)

  3. the ā€œbase identifier messageā€ Note Off is passed through

  4. ā€œbase identifier messageā€ Note On|Off are Transposed by semitones set by the two mappings from line 1. These create the ā€œunique identifier messageā€ Note On|Off

  5. These ā€œunique identifier messagesā€ are then each Transformed into the desired notes for output as seen in the previous post

  6. This is a temporary line. It provides a comparison copy on Ch16 of the incoming chord.
    This makes it easier to compare the incoming triad with its unique identifier message to know how to set up the final Transform
    When finalised, it will be disabled/deleted

the set-up line

  • The Dispatcher sorts the chord into Ch1,2,3

  • the 2nd note on Ch2 is Transformed into CC102 value=Note Number
    …this is then scaled to make a step of 10 units for Transpose1 later

  • the 3rd note on Ch3 is Transformed into CC103 value=Note Number
    …this has a (disabled) Rescale to shift it if necessary for Transpose2 later

  • The Note Offs for notes 2&3 are Dropped so…

  • …the only note left should be the Root on Ch1:

  • This is remapped to spread the root notes over steps of 8…
    …allowing for a special last Transform that puts the notes on different channels and sets their Note Number all to a ā€œbase identifierā€ number of 64 (middle of the range)

This ā€œbase identifierā€ will be shifted by a combination of the two Transposes (think of these like adding 10’s and 1’s) to the base to get a different number for each triad…

…but to make sure the Transposes are mapped and ready before the Note On arrives, I put in the Delay you see in line2

Here’s the patch for you to start testing:

kleini_triad_identifier.mhp

Caveats:
It has only been tested a little for a few root notes and chord shapes. Be aware: I/you may discover errors in my scaling arithmetic (often the case!)

Set the Dispatcher Chord Grace Period to suit your playing skills

Note that any stray note will likely set the Dispatcher out of sequence. Disabling/Enabling it will set it right. (To stop this being a performance issue is not trivial, however.)

I will continue testing and upload corrections if needed.

…

1 Like