Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Monophonic keyboard circuit needed (high note only played).

Status
Not open for further replies.

142VICTORIA

New Member
Hi all,
I am in the process of building a midi 2-octave MONOPHONIC keyboard instrument. The instrument must only play the highest key held; (i.e. if a key is pressed any notes held or played below that note on the keyboard must not be played).
I need to find a way to do this.
Does any one know of a way to make a keyboard (to interface with the midi ) like this?
I would prefer a hardwired electronic circuit solution (along the lines of switches, diodes, gates,
Etc.). If this is not possible a last resort of a midi program, or perhaps a microprocessor, could be options
Many thanks Sam.
 
CD40147 or MC140147 has 10 inputs and 4 outputs. If you look at the truth table I think this is what you want. I think there is a 8 in version that can be tied together to make 16 in 4 out. Search for "priory encoder".
upload_2016-1-4_13-55-53.png
 
Untitled 10.jpg
Thank you so much for your prompt response. This is just what I was looking for . I also came across this diode matrix circuit. What is your views on this?
 
Last edited:
Welcome to the forum Sam, 2 octaves are 24 keys , which octaves , middle C = midi note d'60 , you also need note on / note off and velocity bytes , think mcu required , Monophonic / polyphonic master keyboards would play the last note 'hit'.
 
I also came across this diode matrix circuit. What is your views on t
While your circuit does convert one key press to binary it, it does not lock out all the keys to one side.
The instrument must only play the highest key held
Also your circuit will "OR" the keys together, if more than one is pressed.
Example:
key9=1001 out
Keys 9+8=1001 which is ok
Keys 9+6=1111 which is not ok

Also key 0 is the same as no key pressed!

With the IC 0=0000, 1=0001, 2=0010, 3=0011...... 9=1001 and no key=1111
It locks out the "low keys"
 
If you really want gates etc then you need to design the parallel to serial part first , minimum is 3 bytes as below sent at 31250 bps, could be done depends on your digital logic knowledge. ( midi is optically linked 2 wire pairs)
midi-message.png


Velocity and channel can be switches , note on /off and note will have to come from the key scan.
 
Writing Hi Granddad and Ron thanks. OK I perhaps should give more inf`.
As you properly have gathered my knowledge is limited. This is a steep learning curve. First of all I posted the wrong diagram for the diode keyboard. (Correct one attached
So here goes, (I knew I would end up writing a book). I am attempting to make a keyboard instrument that plays wave samples (the sampler used is Wav Trigger; https://robertsonics.com/wav-trigger/).
The keyboard is default 2octave G4 >G6. Along with the played keyboard will be a set of tones (to form a chord) G2, C3/ D3, C4 .
Of course it would be nice to transpose the G4 >G6 keys from to i.e. A5>A7, B4>B6, C5>C7. D5>D7 . and also the drones.
OK! I know what you are thinking; (What The Heck Am I Making?), so I will tell you, a midi ..............(bet you don’t know what that is, Goggle it).
As Wav Trigger plays samples I can attach any number to them. The Wav Trigger can holds 10 channel sets of numbers, so you can chose between 10 instrument sounds/ set ups for each midi instrument layout. It would be nice to not waste the Wav Trigger’s potential 1000 wav file and have the capability, of playing the 100 or so files in each set, using keyboard transposition. If I have to, I could have a different instrument set up on each of the hard wired Wav Trigger channels.
Do you as an ider know of a circuit that would priority encode a voltage controlled midi keyboard switches i.e.; all keys as a varying pot controlled voltage.
So much to take in for now.
Sam
 

Attachments

  • decimal-to-2421-BCD-encoder.gif
    decimal-to-2421-BCD-encoder.gif
    11.3 KB · Views: 390
Last edited:
mmm Sam . that's a lot to take in , first look you don't need to go full a midi ( 20ma opto ) connect , just a uart chip with ttl output at 31250 baud , do you already have the voltage controlled midi kb ?
 
Granddad, You are right (Do you have a working circuit diagram you can post? or know of a cheap ready made uart board ?), I do not have to go full midi for the input to the Wav Trigger, perhaps I am over egging the pudding, but it would be good to have a midi out for midi note composition software.
As part of this long process brain/money to come up with a working model I have purchased the Wav Trigger, plus I have just purchased a 4 input voltage priority encoder midi device (which has yet to arrive). This is configured to use ribbon pots .
At the moment I am keeping all options open to explore the simplest / the best / cheapest/ most practical way to implement this. This is a prototype in the making.
Please all keep your thoughts coming they are most appreciated.
Sam
 
Last edited:
Sam, OK , could you do a block digram of what you have in mind , and what HW you already have and interconnections . the UART is not difficult and you could output midi and ttl serial, simultaneously ... your hurdle is to multiplex the the 3 bytes, channel, note, velocity... into serial , how are you constructing this prototype. I will scratch head over a uart solution . Some time ago i midi-fied a 132 key ELKA organ to a TG100 tone generator voice box , but using two PIC mcus

Edit
This sort of job is how / why mcu's developed , 3, 8 bit ports , a uart , memory etc 1 chip lump of code... done. worth a try ?
 
Last edited:
Granddad and all ,
The hardware I have is the Wav Trigger ( https://robertsonics.com/wav-trigger-online-user-guide/) . The WAV Trigger has an asynchronous (UART) serial interface connector. It is a logic-level interface. And Of course a TX pin and RX pin, +5 and ground.
Also this controller has 16 programmable triggers that can be used for playing tracks, adjusting play back speed / to adjust overall pitch of all played notes and volume etc. The wav files are stored numbered 1-100 in 10 channels.

This “ Midi” controller I have on order is utilising the MIDI Arduino design, uses four Logarithmic 10k pots .One of which will be a 300mm long “Softspot” the other three could be pot adjustable voltage inputs maybe using make and brake switches and trim pots daisy chained together for saved sample selection i.e. looped drone string sounds .One might also switch between the for pots to trigger a new keyboard note rage or sound.
The range of midi notes (over 4pots) is programmed from to provide the first string pot to cover midi notes 24 to 47, the second pot 48 to 71, the third pot 72 to 95, and the forth pot 96 to 119. This is 24 notes on each ribbon for a total of 96 notes, arranged in a Logarithmic Music scale and having a constant volume output. Also will provide 2 switch inputs that can transpose the pitch by up to +12 or -12 in semitone steps.
Of cause the midi note played does not have to have any relation to the sampled pitch.
For a simple to use and hack keyboard I have also purchased a new £6 (yes £6) nintendo two octave keyboard .
For the moment I think that using the ribbon pot for encoding the keys might be my best option. This could hopefully made to work by having the keys push against the softpot when pressed. I do not need after touch as the looped bowed sound note will play as long as the key is pressed. Velocity is also not really needed as the string is fretted not hammered.
A means of detecting vibrato would be good, but I can not see how this could be implemented on the played sampled notes. Unless the midi can immediately detect by some means, the vibrato pitch change and have play seamlessly sampled vibrato notes.
Sam
 
Last edited:
Hi Sam... Hope I got this right ,,, looks as if the midi controller will do what you want producing midi note data into the wav trigger ( *need a midi to ttl serial here ? ) keyboard decoding would be the design task , could the keyboard be a switched resistor ladder .. no need to go digital .
Edit
Looked at circuit for midi it has ttl serial midi output on D1 pin no need for this*
 
Last edited:
Hi Granddad
Yes I think the " midi" controller and "Wav Trigger" will do what I want it to do. There are a lot of doubts still in my mind as to all the practical applications of this as to whether I have made the right choice of controller.
I am waiting patiently for the parts to arrive to see how the ribbon thinpot works in practice. (Will I be able to adjust the notes to fall under the spacing of the keys?)

I am sure there is much more I am going to need help with in the future re: the ins and outs of this.
No doubt I will be back for more help and to let you know how I am getting on.
For now, many thanks,
Sam
 
Last edited:
Status
Not open for further replies.

Latest threads

Back
Top