MUFF WIGGLER Forum Index
 FAQ & Terms of UseFAQ & Terms Of Use   Wiggler RadioMW Radio   Muff Wiggler TwitterTwitter   Support the site @ PatreonPatreon 
 SearchSearch   RegisterSign up   Log inLog in 
WIGGLING 'LITE' IN GUEST MODE

polyphonic matrix keyboard
MUFF WIGGLER Forum Index -> Music Tech DIY Goto page 1, 2  Next [all]
Author polyphonic matrix keyboard
Dimitree
hello everyone,
I was wondering how can I modify this circuit from MFOS:

http://www.musicfromouterspace.com/index.php?MAINTAB=SYNTHDIY&VPW=1430 &VPH=611

to detect more than 1 note (I'd like 3) and so generate multiple 1oct/V CVs.
Please don't suggest to just use a microcontroller hihi , I already do that in other projects, this time I want to do it this way.

My first guess is, since my keyboard have 2 switches for each key, I can just use that circuit twice on every key, and easily get 2 notes.
But what about a third note?
I'm sure it can be done, but since I don't know exactly how to do, I only can imagine complex logic (to replicate the code used on the microcontroller).
Another idea could be to exploit both low priority and high priority at the same time to get 2 notes on a single "bus" (more or less like duophony on Arp Odissey), but still don't know how to do that.
any idea?
thank you!
Nantonos
Miley Cyrus Just use a microcontroller. Seriously. Miley Cyrus

Or you could use a ton of discrete logic to do what one microcontroller would do, except with less flexibility and 20 to 200 times the cost, and no actual benefit.
Dimitree
thank you for the reply, but really, I want to use logic to understand how this works. I am programmer (not only as hobby, also as job) and I have tons of arduino and similar uC boards here, I use them all the time for many applications and surely they are great and handy when you need to do this kind of things, but this time I want to learn how to decode this keyboard without coding smile
mbartkow
You need to design your own circuit. The general idea may be to employ a counter and a pair of mux/demux chips to scan all switches one by one. Every time a closed switch is detected, the current state of the counter will indicate its number, and this number should be written to a register. This number should then be used to drive a DAC that will generate an appropriate voltage. For a polyphonic output multiple registers may be employed together with an additional counter that will increment every time a new key is detected (and this may be verified using multi-bit comparators, one for each register/voice). The most challenging problem will be to deal with bouncing contacts, and IMHO the best way to handle this is to use two pairs of switches that close progressively as the key is pressed down. Only detection of both closed switches should fire a new voice, and detection of both being open should turn the voice off.
Dimitree
thank you!

mbartkow wrote:
The general idea may be to employ a counter and a pair of mux/demux chips to scan all switches one by one. Every time a closed switch is detected, the current state of the counter will indicate its number, and this number should be written to a register. This number should then be used to drive a DAC that will generate an appropriate voltage.

so, until here, more or less what it happens on the MFOS circuit..right?

mbartkow wrote:
For a polyphonic output multiple registers may be employed together with an additional counter that will increment every time a new key is detected (and this may be verified using multi-bit comparators, one for each register/voice).

I will study that!

mbartkow wrote:
The most challenging problem will be to deal with bouncing contacts, and IMHO the best way to handle this is to use two pairs of switches that close progressively as the key is pressed down. Only detection of both closed switches should fire a new voice, and detection of both being open should turn the voice off.

Ok, all my keybeds use 2 switches for every key, so this should not be a problem.
Btw why do I need to worry about debouncing? the MFOS circuit doesn't handle that. Do I need to debounce just to help the "voice counter" to understand how many voices are active?
mbartkow
The bouncing of contacts is a problem since it may cause your keyboard to fire the envelope multiple times. Avoiding this in a monophonic keyboard is much easier than in a polyphonic one.

The MFOS circuit is a purely analog solution. It handles debouncing by introducing a lag and threshold so that only a sufficiently long key contact fires up the sample and hold subcircuit that samples the voltage from a resistor ladder, as well as it turns the gate signal to high state. This is relatively easy in monophonic setup.

What I proposed was a digital circuit, a completely different approach, based on binary counters and registers.
Don T
Dimitree wrote:
thank you for the reply, but really, I want to use logic to understand how this works. I am programmer (not only as hobby, also as job) and I have tons of arduino and similar uC boards here, I use them all the time for many applications and surely they are great and handy when you need to do this kind of things, but this time I want to learn how to decode this keyboard without coding smile


I wish you luck, you are a braver man than I!

Do keep in mind though, the earliest polyphonic analog synths (except for the infamous Polymoog) used full-blown CPUs to do the key assigning, as well as sending all the other relevant CVs to each synth voice. Just look at Oberheim's solution to build the OB series (especially the OB-Xa very frustrating ), and a uC starts looking REALLY good!
Graham Hinton
Dimitree wrote:

http://www.musicfromouterspace.com/index.php?MAINTAB=SYNTHDIY&VPW=1430 &VPH=611


That link doesn't work for me...

Quote:

to detect more than 1 note (I'd like 3) and so generate multiple 1oct/V CVs.
Please don't suggest to just use a microcontroller hihi , I already do that in other projects, this time I want to do it this way.

My first guess is, since my keyboard have 2 switches for each key, I can just use that circuit twice on every key, and easily get 2 notes.
But what about a third note?


Monophonic, duophonic or polyphonic can all be done with one changeover contact. Do you have a bussed or matrixed keyboard?

Quote:

I'm sure it can be done, but since I don't know exactly how to do, I only can imagine complex logic (to replicate the code used on the microcontroller).


I have made 8 voice dynamic polyphonic keyboards from just TTL and later from just 4000 series CMOS. It is not as hard as using a microcontroller and the timing is uniform and predictable. You can get CVs from PW timing as long as you have a high enough master clock to get the accuracy needed for pitch. Microcontrollers tend to be not able to walk and chew gum at the same time and the differential timing of different software paths can make the keyboard difficult to play. Debouncing a lot of contacts in software is painful, that is really a hardware job. I prefer hardware to scan a keyboard used with a microprocessor to do everything else and did make a gate array to just do the scanning: KV64.

I do have some old logic schematic drawings, but most are on faded A2 dyeline prints, some scribbled over, that would either have to be scanned and stuck together or redrawn into a computer. I can provide them if you are interested, but not instantly.

Quote:
Another idea could be to exploit both low priority and high priority at the same time to get 2 notes on a single "bus" (more or less like duophony on Arp Odissey), but still don't know how to do that.


The Odyssey circuit wasn't very good, it had no memory and if you let go of two keys together there was no guarantee which pitch you would get. It just uses an op amp as a current generator with the keyboard resistors in its feedback loop. The main CV is sampled from the resistor chain, the "Aux" CV is simply the output voltage of the op amp which is one voltage when only one key is played and another when a section is shorted out between the highest and lowest notes. It can be better done with digital scanning.
Dimitree
Graham Hinton wrote:

I do have some old logic schematic drawings, but most are on faded A2 dyeline prints, some scribbled over, that would either have to be scanned and stuck together or redrawn into a computer. I can provide them if you are interested, but not instantly.


that would be much appreciated, as a starting point to understand how this all work

Quote:
The main CV is sampled from the resistor chain, the "Aux" CV is simply the output voltage of the op amp which is one voltage when only one key is played and another when a section is shorted out between the highest and lowest notes. It can be better done with digital scanning.


maybe I choose a bad example, yes. Another example that comes to my mind is the duophony achieved in the MS20 exploiting its track & hold module..
Since my keybed has 2 matrixes (2 switches for each key), I should easily get 2 voices out of them (one using low-priority, the other using high-priority, in order to detect 2 distinct pitches).. I just need to get another voice somehow, and then I'm happy It's peanut butter jelly time!
Dimitree
ok for the moment I give up with polyphony. hihi you won.
What I will try now is to modify the priority of the scanning.
Now the counters are up counting, and they stop when as soon as the find a closed switch. If I use a up/down counter, I could probably alternate between low note priority and high note priority.
But what about last note priority?
microtonal
Electronotes (still available) had some polyphonic keyboard scanner designs. They were digital logic based, so not analog or micro controlled.
Graham Hinton
Dimitree wrote:

Now the counters are up counting, and they stop when as soon as the find a closed switch. If I use a up/down counter, I could probably alternate between low note priority and high note priority.
But what about last note priority?


You are still thinking in the analogue domain. A digital design has a constant scanning rate (and this is important for velocity and CV conversion) and priority is derived by time, the lowest note is the first in a scan (with the address incrementing) and the highest note the last. Both CVs may be obtained from the pulse width of those states.
pirx
Here is a link to the MFOS matrix scanning keyboard circuit:

Matrix Scanning 1V/Octave Keyboard Circuit

There is no PCB available, but the circuit is simple enough to build on a veroboard in one or two afternoons. It is a single voice, low note priority design. I built it a while ago and it works very well.
Graham Hinton
I have redrawn one page of a digital keyboard scanner that I designed in 1980. This is the front end matrix scanning and conditions the keyboard status to produce four signals: KEY and TRAV with their one scan delayed versions KEY' and TRAV'. TRAV means that the contact is travelling between buses. Note the four timing pulses that are used in sequence for each address change. A high master frequency is used to get good accuracy when divided down, this has to be at 15V because 4000 CMOS is too slow at 5V. 74HC didn't exist then.

There will be two more drawings that use this one for the basic scanning: a monophonic/duophonic dynamic keyboard and an eight voice dynamic polyphonic keyboard.

This isn't a project, some ICs will be hard to source and it would be easier to use a gate array now or a different logic family, it is to illustrate the principles of using digital logic rather than analogue or Mickey Mouse logic.
Graham Hinton
Here's Part 2. A couple of changes have been made from the original: A 74HC244 (which didn't exist then) has been substituted for two 4066s and a highest note latch has been added. Highest Note CV and Dynamic CV can be done the same way as the lowest note--or just use some DACs.

The MC6810 was an early 128 byte static RAM, now unobtainable. Use any smallish static RAM with the unused address inputs connected to 0V.
Graham Hinton
Part 3: Polyphonic assignment using discrete SSI/MSI logic. This should be used with the first drawing. To understand it a truth table should be constructed for the four keyboard status signals from the first drawing and the unique states of the changeover contacts identified. Try it yourself before asking me, if I just tell you the answer you will just glaze over the logic.

This drawing does eight voice polyphony, but could be extended. The Busy signals are returns from the EGs that go off at the end of Release. This stops voices being reassigned during their release phase. Pitch CVs can be obtained by latching the scan address with PR1-8 into DACs or one DAC into S&Hs. Dynamic CVs like in drawing 2, but using the PR1-8 and DEC1-8 pulse for the down counting.

I wouldn't do it like this now, but I would use logic in a gate array to front end software. It is a delicate balance between hardware and software and between cost and performance. These drawings are just to show that you don't need a microprocessor/microcontroller at all.
magman
I thought I remembered another poly keyboard from an old ETI magazine, to complement the interesting example from Graham, and indeed there was.

It was in the July 1979 Edition of ETI and appears to be designed by Tim Orr (though the ETI article shows Tim Orr as "describing" the build, rather assigning him as the designer).

There is a copy of this article online at CAG, here :

http://www.spontis.se/pdf/arak.pdf

If anyone struggles to read this copy though, let me know and I'll see if I can get permission to scan my copy of this magazine at a better resolution.

I have a thought that there may also be a poly keyboard design published by Elektor as well, I will see if I can hunt this down as well.

Regards

Magman
Dimitree
thank you, it's a lot of resources to have, I need to study them nanners
tardishead
Quote:
I wouldn't do it like this now, but I would use logic in a gate array to front end software. It is a delicate balance between hardware and software and between cost and performance. These drawings are just to show that you don't need a microprocessor/microcontroller at all.


Hi Graham
What is the scanning time of your design?

I have been on a mission to find a good DIY poly modules.
I know I am going against the grain but I find all midi cv units I have ever tried to be clunky/delayed and have strange note assignment/round robin etc
Graham Hinton
tardishead wrote:

What is the scanning time of your design?


1024µs. Start at the crystal frequency and work down the dividers. Note that the higher frequencies are 4000 CMOS running at 15V because it is slower at 5V (1MHz max). You don't have that limitation now if you use other CMOS logic families.

Quote:

I have been on a mission to find a good DIY poly modules.
I know I am going against the grain but I find all midi cv units I have ever tried to be clunky/delayed and have strange note assignment/round robin etc


Yes.
tardishead
Quote:
1024µs

That sounds good and fast.
I have been looking for polyphonic possibilities for a few years.
A friend has a Digisound 80-24 8 voice polyphonic CV keyboard that seems like a doable DIY project, can get PCB traces and maybe get the EPROM copied.
But reading the info from Digisound it quotes scanning time of x100 per second. 10ms! Pretty slow and unmusical hey? I don't really want to invest the time in DIYing such an extensive project if its flawed from the start!
Keyboard latency is a thing that has driven me nuts for over 20 years.
When I broach this subject in forums I usually get - well you're weird because its good enough for 99.99% of people! A lot of the very best keyboard players I know will stay away from midi (and midi to CV) because it does not have the speed/tactile response they want. Simple CV keyboards don't have problems.
I have enough modules to do polyphonic sounds but have struggled with a way of doing it well.
I spent a lot of time recently trying polyphony with Silent Way. Good enough for a lot of people. The sounds are awesome but super slow on Pro Tools - faster on Logic but still pretty clunky and weird note assignment. Problems with feel are subtle but hey music his subtle. Also you're limited to how many voices by your DAW outputs - hence loads more money!
But polyphony on Jupiters and OB 8 voice feels definitely good enough.
After all this time the bar should be higher not lower!
tardishead
I've heard that Encore Expressioninst is the way to go for polyphony but I always try to find the DIY solution! Somehow even if a DIY project does not turn out quite as good as what you aim for - its an easier pill to swallow than shelling out £300-400 on a unit which ends up a disappointment anyway!
tardishead
Its frustrating that a lot of threads on this forum discourage polyphony on modulars. As if the technology is obsolete and pointless.
In the early 80s for EMU, Digisound and others it was the worth investing in!
Midi seems to have standardised people's goals - at a pretty low standard too in some cases!
I'm quite surprised that there is no kit out there or any example of DIY to emulate the polyphony of say a Jupiter etc!
I guess theres no market for it
Dr. Sketch-n-Etch
Just looking again at this necrothread, I wanted to make a couple of comments about the MFOS scanner circuit.

I built my own version of this circuit, and it works very very well. Faultlessly, in fact.

Contact debouncing is not an issue in a scanning keyboard, as the circuit is only triggered if a contact is found to be closed. What happens is that a clock drives a counter which drives two 8-channel muxes which sample the keyboard matrix, looking for a closed contact. The contact only has to be closed for about a millisecond to trigger the device, and nobody can play a staccato note that short. I have tried to "misfire" this circuit, and it basically cannot be done. I used a matrix keyboard harvested from an old Farfisa organ that I found on the curb during "junk day" in my neighborhood. I devised my own DAC circuit to handle the fact that the keyboard is a 5x12 matrix, but the circuit is an 8x8 matrix. PM me if you are interested in the details.

Expanding this circuit to polyphony would not be straightforward, but it does seem possible. I fear that it would require a fairly large amount of circuitry.
JanneI
Interesting thread. As a noob I wanted to ask if a Fatar 37 -keybed is suitable for the MFOS matrix scanner linked here? I would use it for a mono analog diy synth. No velocity or aftertouch of course, but if I'd want to go without midi to cv conversion, would it work? Thanks!
MUFF WIGGLER Forum Index -> Music Tech DIY Goto page 1, 2  Next [all]
Page 1 of 2
Powered by phpBB © phpBB Group