# Harmonic Table Matrix

**URL:** <https://forum.midibox.org/t/harmonic-table-matrix/20356>\
**Category:** Design Concepts\
**Tags:** harmonic-table, matrix\
**Created:** [July 16, 2018, 2:53pm UTC](https://forum.midibox.org/t/harmonic-table-matrix/20356 "2018-07-16T14:53:58Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Redgeneral](https://forum.midibox.org/letter_avatar_proxy/v4/letter/r/7ba0ec/32.png) [@Redgeneral](https://forum.midibox.org/u/Redgeneral)\
**Post date:** [July 16, 2018, 2:53pm UTC](https://forum.midibox.org/t/harmonic-table-matrix/20356/1 "2018-07-16T14:53:58Z")

</div>

I am working on a harmonic table midi keyboard inspired by&nbsp;[http://wiki.lvl1.org/Isomorphic\_Keyboard](http://wiki.lvl1.org/Isomorphic_Keyboard)

This will be a&nbsp;grid of 21x12 keys with two switches per key. Two sets of matrix switches, one upper PCB and one Lower PCB to.determine velocity.

I was concerned about scanning two large matrices, but the keys repeat along its length,

 ![repeatedsection-scaled.png.704d94c4def77ef1d76aedb2a2df0d9e.png](https://forum.midibox.org/uploads/default/original/2X/1/1a8bb648850d1d05cf7f97c195994fe5bfb3cb38.png)

By duplicating the lines in, the 21x12 matrix can be reduced to 7x12. This should hopefully reduce the total matrix scanning time&nbsp;with only sacrificing the option to designate keyboard sections to different channels.

&nbsp;

Are there any problems to this approach?

Regarding&nbsp;resistors, do I need any on the lines in/out and if so should they be before the line split or after?

Thank you for the help.

 ![harmonictable.png.4d279bdb752eb71dd7d84a](https://forum.midibox.org/uploads/default/original/3X/3/d/3d4dd3e4eddb39e58ca2cd4982cedf703dca9db0.png)

 ![5b4cab1e4f83a_simplified-scaled.png.2324](https://forum.midibox.org/uploads/default/original/3X/2/2/22aa373489cc06fb6373c6391293cdaf76af6242.png)

---

<div class="post-metadata">

**Author:** ![Phatline](https://forum.midibox.org/user_avatar/forum.midibox.org/phatline/32/501_2.png) [@Phatline](https://forum.midibox.org/u/Phatline)\
**Post date:** [July 17, 2018, 3:24am UTC](https://forum.midibox.org/t/harmonic-table-matrix/20356/2 "2018-07-17T03:24:54Z")

</div>

yes…

cant really help, but want to see this to get real (want some)

---

<div class="post-metadata">

**Author:** ![Antichambre](https://forum.midibox.org/user_avatar/forum.midibox.org/antichambre/32/201_2.png) [@Antichambre](https://forum.midibox.org/u/Antichambre)\
**Post date:** [July 17, 2018, 7:12am UTC](https://forum.midibox.org/t/harmonic-table-matrix/20356/3 "2018-07-17T07:12:12Z")

</div>

Hi,

> 16 hours ago, Redgeneral said:
> 
> I am working on a harmonic table midi keyboard inspired by&nbsp;[http://wiki.lvl1.org/Isomorphic\_Keyboard](http://wiki.lvl1.org/Isomorphic_Keyboard)

Did you know that there’s here more than this link? I found some thread about it.  
LVL1 is here 😉

I just typed “isomorphic” in the search and there’s a lot of topics with some different approach like wilba’s one, that can maybe help you, don’t know.

Same as I can maybe help you but you have to explain more cause(maybe it’s just me) I don’t understand which line you want to duplicate, for me duplicating the lines will not reduce your SRIO scanning except if you duplicate the SRIO itself… and MIDI channel part assignment is another thing(comes after).

Best  
Bruno  
&nbsp;

---

<div class="post-metadata">

**Author:** ![Redgeneral](https://forum.midibox.org/letter_avatar_proxy/v4/letter/r/7ba0ec/32.png) [@Redgeneral](https://forum.midibox.org/u/Redgeneral)\
**Post date:** [July 17, 2018, 4:39pm UTC](https://forum.midibox.org/t/harmonic-table-matrix/20356/4 "2018-07-17T16:39:21Z")

</div>

I’ve been working my way through the search results of this forum, its how I reached the approach by @TAG

Split lines on top pcb:

 ![5b4e1b8329ec5linesplitting.png.3faa9c7c6ab30d1535a1a176cbf802bf.png](https://forum.midibox.org/uploads/default/original/2X/5/5b81d7e7733b27e16e42936ace5dc5b76fd8ea71.png)

Each section contains the same notes (octaves 1-7) and a duplicate of the matrix. When a note is hit, e.g. C4, it shouldn’t matter which section it is from.

As well as only a smaller matrix to scan, there is the possibility of adjustable length to the keyboard by addition or removing sections. This doesn’t affect the range of notes.

The Midi channel could be assigned based on rows, but not by section due to the repeated lines.

---

<div class="post-metadata">

**Author:** ![Antichambre](https://forum.midibox.org/user_avatar/forum.midibox.org/antichambre/32/201_2.png) [@Antichambre](https://forum.midibox.org/u/Antichambre)\
**Post date:** [July 17, 2018, 5:18pm UTC](https://forum.midibox.org/t/harmonic-table-matrix/20356/5 "2018-07-17T17:18:14Z")

</div>

So you do not care what section you hit. Why? that’s a shame cause the SRIO is able to handle it even if you’ve got 2 switches layers and with not too much latency.  
it’s 3 registers out x 3 registers in. The scanning order of your buttons is important as you can measure correctly the duration between 2 associated Switches.  
But maybe i’m wrong, ?&nbsp; is an expert in switches matrix and BLM, ask him maybe!

&nbsp;

---

<div class="post-metadata">

**Author:** ![gerald.wert](https://forum.midibox.org/user_avatar/forum.midibox.org/gerald.wert/32/608_2.png) [@gerald.wert](https://forum.midibox.org/u/gerald.wert)\
**Post date:** [July 18, 2018, 2:45pm UTC](https://forum.midibox.org/t/harmonic-table-matrix/20356/6 "2018-07-18T14:45:27Z")

</div>

It looks like you would need 3 Dout in the above diagram or you are not going to have the button count you want. The way it is drawn you will&nbsp;have 3 sets of duplicate buttons. That does not sound like what you want. You could split the lines like you show for the velocity section&nbsp;if you feel you will never want to know velocity if you are hitting the same notes in multiple sections at the same time. This use case for scanning all 3 sections&nbsp;would come up if you were playing cords, slides and if you were playing a bass section and a melody on the other hand. There are likely other use cases if you consider things too.&nbsp;Splitting lines&nbsp;really does not make sense from a design perspective though as the&nbsp;CMOS cost is very low compared to button cost. If you are wanting to reduce components or costs it might make more sense to only start with one section and have an octave button and design with a modular approach where you can add sections if and when needed or wanted. Antichambre is basically saying the same above, hope this is&nbsp;giving you some other thoughts and hints&nbsp;around his initial&nbsp;“Why” question.

---

<div class="post-metadata">

**Author:** ![Antichambre](https://forum.midibox.org/user_avatar/forum.midibox.org/antichambre/32/201_2.png) [@Antichambre](https://forum.midibox.org/u/Antichambre)\
**Post date:** [July 18, 2018, 3:33pm UTC](https://forum.midibox.org/t/harmonic-table-matrix/20356/7 "2018-07-18T15:33:26Z")

</div>

And if you want the 2 layer switch. try to use 24 DIN lines with 21 DOUT scanlines, maybe with even DIN lines connected on top and odd on bottom switches as you can apply some mask in the software&nbsp; and calculate the duration easily,  
Anyway keep the 2 layers on the same scanline, easy addressing will help you to compare the timestamp pairs.  
Just an idea.  
&nbsp;

---

<div class="post-metadata">

**Author:** ![Redgeneral](https://forum.midibox.org/letter_avatar_proxy/v4/letter/r/7ba0ec/32.png) [@Redgeneral](https://forum.midibox.org/u/Redgeneral)\
**Post date:** [July 18, 2018, 8:20pm UTC](https://forum.midibox.org/t/harmonic-table-matrix/20356/8 "2018-07-18T20:20:56Z")

</div>

Thank you for the feedback on the matrix design. The matrix was really flawed.

&nbsp;

I will build the matrix as you suggested

 ![5b4f9fa28ec54harmoniclayers.png.ce5eff65d36476d075d8f91a851ba85a.png](https://forum.midibox.org/uploads/default/original/2X/f/ff633f57b955876d6e8b16fb48a1f15035af1f94.png)

(Diagram not to scale)

---

<div class="post-metadata">

**Author:** ![Antichambre](https://forum.midibox.org/user_avatar/forum.midibox.org/antichambre/32/201_2.png) [@Antichambre](https://forum.midibox.org/u/Antichambre)\
**Post date:** [July 18, 2018, 9:07pm UTC](https://forum.midibox.org/t/harmonic-table-matrix/20356/9 "2018-07-18T21:07:34Z")

</div>

You can find inspiration from the BLM Modules in the [SVN](http://svnmios.midibox.org/listing.php?repname=svn.mios32&path=%2Ftrunk%2Fmodules%2F&rev=1041&peg=1041).

With an STM32F4 core:  
SRIO with Default MIOS32\_PRESCALER\_128, a scanline will take 36us.  
84/128=0,656Mhz =\> SPI clock period is 1,52uS  
Your total scan line is: 1,52 \* 24 = 36,57 us  
For you to know that the SRIO scan a line every ms, then your total scan will take 21ms

For better accurate you can write your own module to scan all lines within the 1ms period:  
36,57\* 21 = 768uS  
If the remaining time for other processes is not enough(here 1000-768=232us) and your circuit permits it,&nbsp; you can decrease the prescaler to 64, total scan will be 384us…  
Try to debounce in circuit too 😉

**What I told you is just some track to explore! it’s not a ready-made truth 😉  
Prototype it and code it before pcb design! 😉**  
Have fun  
Bruno

---

<div class="post-metadata">

**Author:** ![gerald.wert](https://forum.midibox.org/user_avatar/forum.midibox.org/gerald.wert/32/608_2.png) [@gerald.wert](https://forum.midibox.org/u/gerald.wert)\
**Post date:** [July 19, 2018, 7:10pm UTC](https://forum.midibox.org/t/harmonic-table-matrix/20356/10 "2018-07-19T19:10:13Z")

</div>

You can prototype with just 1 din and 1 dout. Once you have the basic idea up and running you can add to it. Much faster to start with something small and then build on your successes. There is even a matrix pcb that you could bread board a few tact switches for very little $ and have a test environment up and running very quickly. Maybe even a day or two…

&nbsp;

[https://modularaddict.com/manufacturer/midibox/midibox-diomatrix-pcb](https://modularaddict.com/manufacturer/midibox/midibox-diomatrix-pcb)

&nbsp;

The only other part you would need is the core and core PCB:

&nbsp;

[https://modularaddict.com/manufacturer/midibox/midibox-core-stm32-pcb](https://modularaddict.com/manufacturer/midibox/midibox-core-stm32-pcb)

&nbsp;

Good luck with it looks fun!
