[sdiy] How to add MIDI IN to an old Casiotone 101

rsdio at sounds.wa.com rsdio at sounds.wa.com
Mon Dec 30 06:50:46 CET 2013

On Dec 29, 2013, at 03:23, Jack Jackson wrote:
> I have this old board, it's provides quite basic digital sounds  
> from an NEC D990G chip. As far as I can tell, this chip also  
> performs the matrix scanning of the keybed.
> So if one were to add MIDI to it, this is how I envisage it:
> 1. MIDI note-on message received
> 2. Microcontroller interprets note and uses a look-up table to tell  
> it which position of the matrix this note fits.
> 3. Microcontroller waits until the switch for the notes row goes high
> 4. Microcontroller sends the correct pin high for that note.
> 5. Pin stays high until note-off is received.
> So the micro would have to sync (or at least follow) the onboard  
> chips scanning and just output the 5v for that note at the correct  
> time. 		 	   		

I've seen vintage analog pinball machines use a 74x30 or 4068 8-input  
NAND gate to detect the edge when any bit in a parallel bus goes low  
(for triggering sound effects between two microcontrollers). If your  
microcontroller has an interrupt input, then this would allow your  
interrupt routine to quickly determine how to adjust its outputs to  
play the correct note. Unfortunately, if your matrix truly has active- 
high column strobes, then you'd actually need an 8-input OR / NOR  
gate, and I couldn't find one of these. I did find the 4002 dual 4- 
input NOR gate and the 4072 4-input OR gate, and those would work if  
you have two interrupt pins or even if you just add another gate to  
combine the outputs into a single pin. Then again, some modern  
microcontrollers might allow all 8 pins on an input port to be edge- 
triggered, in which case you wouldn't need external combinatorial  
logic at all.

If you arrange the data in your microcontroller for fast lookup,  
especially if you write the interrupt routine in assembly, then you  
could update an output port on the microcontroller very quickly after  
the Casio selects a new column. Hopefully always fast enough so that  
no keys are missed due to slow microcontroller response.

It's possible that the Casiotone 101 keyboard scanning matrix is wire- 
OR, meaning that you could use open-collector logic or simple  
transistors to drive the matrix in parallel with the original  
keyboard. But you'd have to adjust the circuit for active-high versus  
active-low columns. And, of course, you may need diodes to prevent  
false keys.

However, step 5 of your algorithm seems wrong. You'll have to turn  
the pin off whenever the notes row goes inactive - you can't just  
hold that pin high constantly. You have to emulate the scanning  
matrix, where holding a key produces a signal only when that key's  
row/column is active, but not at other times when other rows/columns  
are active.

Maybe this has been solved already in an efficient way, but I'd start  
with the schematic for the Casiotone 101, or at least determine  
whether the columns are active-high or active-low, and whether you  
can use open-collector / open-drain type transistors or gates to keep  
the parts count down.

By the way, it looks like you're using row-major, column-minor  
terminology, whereas I'm just used to column-major, row-minor  
terminology. It doesn't really matter which you call columns or row,  
so long as you understand which are being driven and which are being  
sensed, of course.

Brian Willoughby
Sound Consulting

More information about the Synth-diy mailing list