Circuitbenders Forum

Circuitbenders Forum => Circuitbending discussion => DIY Synths => Topic started by: jamiewoody on November 04, 2010, 08:25:56 PM

Title: my first keyboard...
Post by: jamiewoody on November 04, 2010, 08:25:56 PM
i am ready to try this now! (well, i will be when i order components...).

what i need to do is carefully plan this out before i start building it. thanks to everyone here for advice on components, etc.

so, far, my plan is to make a 555 tone generator. instead of using a potentiometer for the pitch control, do a parallel circuit of push putton switches where the pot would normally be. i will use trimmers to tune the "keys".

i still like the idea of an actual keyset. i have one or 2 keyboards laying around which i am sure i will never use again, so i may harvest 12 keys and see what i can come up with. maybe i can place the push buttons under the back side of the keys?
Title: Re: my first keyboard...
Post by: Dylan on November 13, 2010, 07:29:28 PM
I found this the other day. You may be interested in Page 9 http://experimentalistsanonymous.com/diy/Schematics/Oscillators%20LFOs%20and%20Signal%20Generators/555%20BASIC%20astable%20theory.pdf (http://experimentalistsanonymous.com/diy/Schematics/Oscillators%20LFOs%20and%20Signal%20Generators/555%20BASIC%20astable%20theory.pdf)
Title: Re: my first keyboard...
Post by: jamiewoody on November 14, 2010, 01:47:18 AM
thanks dylan, i'll check that out...i am actually close to this now! check out my BASS PEDALS thread on the synths forum! ;-)
Title: Re: my first keyboard...
Post by: computer at sea on November 29, 2010, 01:35:49 AM
I bet you could also do it with a couple of 40106's and trimmers.  Each 40106 could give you 6 notes which could be tuned (albeit somewhat roughly) with the trimmers.  While you wouldn't have super tight pitch control, you would have tons of polyphony.
Title: Re: my first keyboard...
Post by: jamiewoody on November 29, 2010, 02:47:15 AM
i'm thinking about trying some different circuits. i breadboarded it with a 555 and it seemed to work. i may build at least 2 different keyboards into one box, well, one keyboard controlling 2 different VCOs...

right now, i need to order components, which i cannot do...but as soon as i can, i will be happy.
Title: Re: my first keyboard...
Post by: moordenaar on November 29, 2010, 07:19:13 AM
It is very simple to make a VCO with a 555. Just inject a voltage into pin 5. So you can also set the pitch with voltage instead. Or you can ad an LFO.

(http://www.ecelab.com/circuit-vco-555.jpg)
Title: Re: my first keyboard...
Post by: jamiewoody on November 29, 2010, 04:29:09 PM
this is very similar to the VCOs i have been building. even before i ever looked at a drawing of one, and just soldered the components together...(this was my method before i got my breadboard. solder and pray it works...80% of the time, it did!).

the only difference was r1, maybe that 220k resistor would make a huge difference.

i would like to get lower pitch, if my memory serves me correctly, do i go with bigger caps?
Title: Re: my first keyboard...
Post by: moordenaar on November 29, 2010, 07:01:03 PM

the only difference was r1, maybe that 220k resistor would make a huge difference.

i would like to get lower pitch, if my memory serves me correctly, do i go with bigger caps?

220 K  :o No mate that's just 220 ohm. Also it should't make any difference it's just there to control the "volume," so you could replace with a pot.

Yes, bigger caps = Lower Hz
Title: Re: my first keyboard...
Post by: druzz on December 02, 2010, 04:56:55 AM
i was also thinking about making some sort of keyboard for my squarewave things . what i thnik i'll do is install a couple of push buttons (5 or 7)  that closes the circuit and re-routes it  trough a different pot for each switch .

so you can tune each note like you want easily  and play little melodies ''morse style'' in the weird unconventional scale of your choice  .  8)


have fun with youre project
Title: Re: my first keyboard...
Post by: Gordonjcp on December 02, 2010, 07:46:08 AM
"Real" analogue monosynths often use a chain of precision resistors with the keys wired across them so that you end up shorting a section of the chain when you press a key.  This way, you don't get out-of-tune noises when you press two keys at once and the highest key always "wins".
Title: Re: my first keyboard...
Post by: untune on December 02, 2010, 10:15:12 AM
"Real" analogue monosynths often use a chain of precision resistors with the keys wired across them so that you end up shorting a section of the chain when you press a key.  This way, you don't get out-of-tune noises when you press two keys at once and the highest key always "wins".

That's what I've been curious about lately.  So if you hold a high key, say F3, and then press C3, you wouldn't hear a change becuse it's lower... but if you pressed C4 while holding it the note would change?
Title: Re: my first keyboard...
Post by: Gordonjcp on December 02, 2010, 10:37:33 AM
Correct.  Have a look at the scans of the article on the Transcendent 2000 monosynth available on the 'net, and look at how the keyboard circuit works.

These days I'd avoid all the tedious mucking about with precision resistors and the like, and implement a matrix scanner and DAC to generate a true volt-per-octave controller keyboard.  I might do that with my T2000 so I can use it with MIDI...
Title: Re: my first keyboard...
Post by: untune on December 02, 2010, 04:22:14 PM
I'll have a look for that now :D

That's exactly what i've been studying lately but something didn't make sense to me.  If you implement a matrix (using diodes to stop backward flow) I can't seen any way that the circuit can tell which key you've pressed?

http://www.headfuzz.co.uk/midihack1?q=midihack2 (http://www.headfuzz.co.uk/midihack1?q=midihack2)

Example there.  I see how everything connects up, and with the resistors the resitors would give each key a unique voltage I assume, but how does it work in the case of a microcontroller?  I've been looking everywhere for the past 2 days and nowhere seems to have a definite explanation of it, they all assume that you know that bit already :P
Title: Re: my first keyboard...
Post by: Gordonjcp on December 02, 2010, 04:37:09 PM
It does explain it...

What you do is, you switch on each of the five rows in turn, and read the eight columns.  From that you can tell which keys are pressed.  You scan through the five rows very quickly and at a steady rate, so that there isn't a noticeable delay between pressing a key and the note sounding.

So, in your microcontroller you have a timer set to fire an interrupt every 1/1000th of a second (for example).  Every time the interrupt fires, you read each key as quickly as possible (actually twice, because you want to debounce the keypresses, but ignore that for now).  Put every key that's pressed on a list, and remove any keys that are no longer pressed from the list.  Depending on which key you want to have priority, decide which note you're actually going to play.  For a "classic" monosynth keyboard, take the highest key that's pressed.  For a "classic" polysynth keyboard, take the most recent N notes where N is however many voices your synth has.
Title: Re: my first keyboard...
Post by: untune on December 02, 2010, 04:41:17 PM
Of course, makes sense now!  I'd been stuck thinking about resistor ladders rather than reading it logically  ::)

Classic case of wood for trees there.  Cheers for clarifying that :P
Title: Re: my first keyboard...
Post by: Gordonjcp on December 02, 2010, 11:08:54 PM
Yeah, you don't use a resistor ladder with a matrix keyboard.  You use a microcontroller to scan the keys, then generate the control voltages with a DAC hooked to the microcontroller.  I suspect - but haven't tried it - that the PWM output of an AVR or similar MCU might be suitable for filtering and turning into a VCO control voltage.
Title: Re: my first keyboard...
Post by: jamiewoody on December 03, 2010, 09:43:58 PM
i want the keyboard to be a short one...one octave with one note below and one note above...i think that would make 14 keys....C to C (i think...).

i want to make a few of these. i have bass pedals, which i will build a box big enough to add things, yet thinner than traditional "taurus" pedals.

there are these momentary n/o toggle switches i have. i bought them before i knew what "momentary" was...lol! or the description on bg micro was probably poor...anyhow, the aluminum keys are annodized silver and other switches are more of a warm gray. this would make for a cool "black and white keys" layout! ;-)

i also want to make another with a real keyset.
Title: Re: my first keyboard...
Post by: Gordonjcp on December 04, 2010, 10:22:02 AM
Righty-ho, grab the Moog Taurus circuit from retrosound.de and make a cup of tea.

Got tea?  Got circuit?  Good.

Start at the top left.  Notice how everything is labelled with what it is?  I'm going to attempt to explain how it does it.

The "Oct Divide Chain" is a set of very precisely-matched resistors wired from 15V to ground - 12 in total (they are probably multi-pinned "resistor packs" like you used to get for terminating disk drive chains.  Anyone who has never used Windows 3/Linux kernel 2.0 will be too young to remember them ;-)

Okay, so 15V at the top, 0V at the bottom, first tap is 2/3 of the way in (four up, eight down) - this gives us 10V.  The next one is tapped 1/3 of the way up giving 5V, one at 1/6 up giving 2.5V and one at 1/12 up giving 1.25V.  Don't take my word for it, use Ohm's Law and work it out for yourself.  Step away from the computer, pick up a notepad and pencil, and go do some arithmetic.  Oh, and make another cup of tea.  Mine's black, no sugar.

Right, we've got our precise reference voltage to be fed to the resistor ladder.  The 4016 is a quad analogue switch, which selects which reference voltage we choose.  The opamp forms a little buffer amplifier so that the reference voltage isn't "pulled" by the load when you press keys.  What's the oscillator thing below it?  Well, that injects a tone onto the control voltage, which is detected by the amplifier and filter just to the right of the keyboard assembly.  It's far too high a frequency to affect the control voltage for the oscillator (and indeed it's easy to filter off) but it's possible to detect it at a low level and use that to generate the note on/off trigger.

I can't find any information on what the values of the keyboard voltage dividers are.
Title: Re: my first keyboard...
Post by: jamiewoody on December 05, 2010, 02:22:10 AM
when i build a keyboard, i would like to add filters (resonance, envelope, etc...).

how do those hook together? should i plan to make my synths (keyboards, bass pedals, etc) as vcos, and make a sort of rack of filters, and hook the synths into the filters then output...sort of like a guitar into an effects chain? is this how filters work? or is there a different logic? so far, as i gather, the logic seems to be VCO>LFO>VCF>OUT...am i close at all?
Title: Re: my first keyboard...
Post by: Circuitbenders on December 05, 2010, 11:33:00 PM
how do those hook together?

Hmmm, thats kind of like having all the separate parts to a car engine and asking 'how do these hook together'. Theres probably a hundred different answers and all of them would be impossibly difficult to explain on a forum to someone that didn't have a fundamental understanding of how engines work. I know i'd be lost in about 5 minutes!

I'd probably recommend taking a looking at modular analogue synths and working out how the individual modules work together with CV's and triggers etc. As an example, the LFO will be a discrete module that generate low frequency modulated control voltages, just like ones you might build to modulate the pitch of a bent toy. The output of the LFO can be applied to the pitch of the VCO, the filter cutoff of the VCF, retriggering the ADSR, or any number of other uses.

Audio output wise you probably want to go VCO-VCF-VCA-OUT but theres any number of other processes that can effect each of these stages.
Title: Re: my first keyboard...
Post by: jamiewoody on February 03, 2011, 10:56:18 PM
this comes close to answering my other thread "synth logic". ;-)