Highly Liquid Forum facebook twitter google plus rss feed
  #1  
Old 07-05-2015, 01:37 PM
donspringer donspringer is offline
Junior Member
 
Join Date: Jul 2015
Posts: 3
Default 12x6 Diode Matrix (What's wrong)

My MidiCPU problem is that I have an odd existing diode matrix on conn 653 keyboards.
I have successfully programmed the boards except for one problem. The last for notes of each octave do not work. I am attaching the configuration for your review.
Of the 12 note configuration each octave has to start with C# in order to match the diode matrix, so of the first octave, there is only the bottom C note (which is the top note of each set of 12). (See attached)
Name:  matrix.jpg
Views: 189
Size:  23.8 KB
Notes C# through G# work for each octave, notes A through C do not, and they do no trigger any activity on the midicpu led. I have tried two boards to make sure the problem is not an issue with the board itself.
Thank you in advance for your help & advice.


Please see my configuration below:
// MIDI CPU Control Terminal Configuration
// 12 x 4 switch matrix generating MIDI notes
// Control terminals 0-3: Data Input
// Control terminals 4-15: Select Output
// Fixed Header Identifies the Control Terminal Configuration Message
F0 00 01 5D 04 01
// This byte identifies the configuration "layer". Layer 0 is the "primary" layer.
00
// Control Terminal Configuration Chunks
// Each chunk is 6 bytes: nn tt mm ch d0 d1
// nn = terminal number
// tt = transition
// mm = mode
// ch = channel
// d0 and d1 are mode-specific parameters
// Control Terminal 0: Logic Input, Data Only (Mode 7F)
// (accepts input but does not trigger any events)
// One line, each for the transition from high-to-low (00) and low-to-high (01)
00 00 7F 00 00 00
00 01 7F 00 00 00
// Same thing for Control Terminals 1-3
01 00 7F 00 00 00
01 01 7F 00 00 00
02 00 7F 00 00 00
02 01 7F 00 00 00
03 00 7F 00 00 00
03 01 7F 00 00 00
04 00 7F 00 00 00
04 01 7F 00 00 00
05 00 7F 00 00 00
05 01 7F 00 00 00
06 00 7F 00 00 00
06 01 7F 00 00 00
07 00 7F 00 00 00
07 01 7F 00 00 00
08 00 7F 00 00 00
08 01 7F 00 00 00
09 00 7F 00 00 00
09 01 7F 00 00 00
0A 00 7F 00 00 00
0A 01 7F 00 00 00
0B 00 7F 00 00 00
0B 01 7F 00 00 00

// Control Terminal 4: Matrix Select, Note On / Note Off
// nn = 04
// tt = 00 (always use tt=00 for matrix select modes)
// mm = 2C (matrix select, note on/off)
// ch = 00 (use channel jumper for channel setting)
// d0 = 3C (use "middle c" for first note. note #60 = 3C in hex)
// d1 = 0B (use the bitmask "00001111"--
// since we have 4 data lines connected to bits 3-0)
0C 00 2C 00 19 00
// next 11 control terminals are the same, but for each, increment the first note by 4 (in hex)
0D 00 2C 00 25 00
0E 00 2C 00 31 00
0F 00 2C 00 3D 00
10 00 2C 00 49 00
11 00 2C 00 55 00
12 00 2C 00 61 00

// That's all! Fixed footer.
F7

Last edited by donspringer; 07-05-2015 at 02:27 PM.
Reply With Quote
  #2  
Old 07-05-2015, 02:59 PM
John's Avatar
John John is offline
Moderator
 
Join Date: Jan 2009
Posts: 3,007
Default

Hi Don, welcome to the forum.

The matrix appears to have 6 select lines and 12 data lines.

The problem is that any MIDI CPU select line can only monitor up to 8 switch positions.

Given that you can't or don't want to build a new matrix for the switch contacts (is that correct?), the solution is to use the switch matrix "backwards". In other words: use the 6 select lines from the matrix as data lines instead, and to use the 12 data lines as select lines.

This approach introduces two issues:

1. It will rearrange the ordering of notes produced by the switch matrix, but that can be fixed by using the MIDI CPU's note remapping feature.

2. It effectively reverses the polarity of the diodes. This can be solved either by A) rewiring each diode to reverse its polarity, or B) using the configurable select polarity feature in the MIDI CPU beta firmware v1.4.

For issue #2, which approach sounds better to you? Rewiring the diodes, or doing some extra firmware upgrade & configuration work to accommodate the existing diode polarity?
Reply With Quote
  #3  
Old 07-05-2015, 04:50 PM
donspringer donspringer is offline
Junior Member
 
Join Date: Jul 2015
Posts: 3
Default Will upgrade firmware to 1.4 beta (question on syntax)

I have downloaded the beta firmware and wish to proceed with the software solution. I am having a bit of difficulty understanding how to setup in reverse polarity. Can you provide an example.
I believe I understand how to remap or translate the notes, but unsure about the syntax to engage the reverse polarity procedure. I see a - in the documentation but not sure where it goes in a line in the configuration file.
Reply With Quote
  #4  
Old 07-06-2015, 12:04 PM
donspringer donspringer is offline
Junior Member
 
Join Date: Jul 2015
Posts: 3
Default Tried this based on my reading of 1.4 doc, did NOT work

// MIDI CPU Control Terminal Configuration
// 12 x 4 switch matrix generating MIDI notes
// Control terminals 0-3: Data Input
// Control terminals 4-15: Select Output

// Fixed Header Identifies the Control Terminal Configuration Message
F0 00 01 5D 04 01
// This byte identifies the configuration "layer". Layer 0 is the "primary" layer.
00



// Control Terminal 4: Matrix Select, Note On / Note Off
// nn = 04
// tt = 00 (always use tt=00 for matrix select modes)
// mm = 2C (matrix select, note on/off)
// ch = 00 (use channel jumper for channel setting)
// d0 = 3C (use "middle c" for first note. note #60 = 3C in hex)
// d1 = 0B (use the bitmask "00001111"--
// since we have 4 data lines connected to bits 3-0)
00 00 2F 00 18 00

// next 11 control terminals are the same, but for each, increment the first note by 4 (in hex)
01 00 2F 00 1E 00
02 00 2F 00 24 00
03 00 2F 00 2A 00
04 00 2F 00 30 00
05 00 2F 00 36 00
06 00 2F 00 3C 00
07 00 2F 00 42 00
08 00 2F 00 48 00
09 00 2F 00 4E 00
0A 00 2F 00 54 00
0B 00 2F 00 5A 00
0C 00 2F 00 60 00
0D 00 2F 00 68 00


// Control Terminal Configuration Chunks
// Each chunk is 6 bytes: nn tt mm ch d0 d1
// nn = terminal number
// tt = transition
// mm = mode
// ch = channel
// d0 and d1 are mode-specific parameters

// Control Terminal 0: Logic Input, Data Only (Mode 7F)
// (accepts input but does not trigger any events)
// One line, each for the transition from high-to-low (00) and low-to-high (01)
0E 00 7F 00 00 00
0E 01 7F 00 00 00

// Same thing for Control Terminals 1-3
0F 00 7F 00 00 00
0F 01 7F 00 00 00
10 00 7F 00 00 00
10 01 7F 00 00 00
11 00 7F 00 00 00
11 01 7F 00 00 00
12 00 7F 00 00 00
12 01 7F 00 00 00
13 00 7F 00 00 00
13 01 7F 00 00 00





// That's all! Fixed footer.
F7
Reply With Quote
  #5  
Old 07-06-2015, 09:41 PM
John's Avatar
John John is offline
Moderator
 
Join Date: Jan 2009
Posts: 3,007
Default

Quote:
Originally Posted by donspringer View Post
I have downloaded the beta firmware and wish to proceed with the software solution. I am having a bit of difficulty understanding how to setup in reverse polarity. Can you provide an example.
I believe I understand how to remap or translate the notes, but unsure about the syntax to engage the reverse polarity procedure. I see a - in the documentation but not sure where it goes in a line in the configuration file.
Don,

You are on the right track with mode 2Fh. Simply using that mode causes the MIDI CPU to generate the positive select polarity.

To use mode 2Fh, you must have your data lines on CT 8..15. So in this application, I would use CT 0..7 and 14..17 for select output (mode 2Fh). Then, data input can be on CT 8..13 (mode 7Fh).

The next step is to disable the MIDI CPU's internal pull-up resistors on CT 8-15. (Pull-ups are good for negative select pulse, but they interfere with a positive select pulse.) This requires a separate SysEx message that looks like this:

Code:
F0 00 01 5D 04 0C 0F 0F F7
I forgot to mention that you'll have to add an external pull-down resistor on each data line. Use a 10k resistor connected between MIDI CPU ground and each CT 8..14.

I recommend doing the note remapping as the final step after everything else.

Let me know if this is enough to get things moving in the right direction. If you'd like, I can draw up a complete schematic using the matrix diagram from your image.
Reply With Quote
  #6  
Old 08-15-2015, 06:26 PM
John's Avatar
John John is offline
Moderator
 
Join Date: Jan 2009
Posts: 3,007
Default

I quick update for others reading this thread:

The MIDI CPU control terminal mode 2Fh is broken in the MIDI CPU beta firmware. It is unlikely to be fixed. However, I was able to provide Don with a special firmware build that allows 12 data lines to be monitored by each MIDI CPU select line. Perhaps this feature can be released in the future.
Reply With Quote
Reply

Tags
diode matrix

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:32 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.