Need help making a custom music keyboard - Page 1
Forum section: electronics / projects

author: TRS-90
author_rank: Regular Contributor
timestamp: June 02, 2016, 10:42:11 pm
content: I have an old Yamaha PSR-6 and was wondering if I could use the keyboard mechanism to make my own musical keyboard using the AY-3-8910 (or other variants) and put various sounds on it like a square wave arpeggio (alternating two notes a certain space ahead of the note pressed in this case) or some Commodore 64 like effects.I know that this will require programming (for the sounds) and possibly a CPU but I am willing to do the programming if this project will work.I have also read the wikipedia page just so you know.

author: nctnico
author_rank: Super Contributor
timestamp: June 02, 2016, 10:59:17 pm
content: I think a reasonably fast ARM microcontroller with a decent amount of flash (512kB) can be used to play samples at various pitches so you can make a real sounding piano (or whatever) instead of bleep-blop sounds.

author: TRS-90
author_rank: Regular Contributor
timestamp: June 02, 2016, 11:03:14 pm
content: I'll have to look into ARM computers/microcontrollers at some point.But the whole purpose of this IS to make bleep sounds.I somewhat of a big 8 bit music fan.

author: nctnico
author_rank: Super Contributor
timestamp: June 02, 2016, 11:11:48 pm
content: Even then re-creating the AY-3-8910 (IIRC also used in the MSX and MSX-2 and I think it can only play 3 'tones' simultaneously) shouldn't be hard on an ARM controller. That way you wouldn't be stuck with only 3 tones and create a keyboard with an automatic drum section, play chords, base lines and melody. The tune from 'halt and catch fire' comes to my mind.

author: TRS-90
author_rank: Regular Contributor
timestamp: June 02, 2016, 11:21:57 pm
content: Good point.I've never coded on an ARM processor before so this will definitely be a learning experience for me.How do recommend I hook up the keyboard mechanism (it uses a ribbon or flat flex cable typically).And what would some of the code be for making the sounds or switching instruments?Listen to some C64 music (last ninja, monty on the run and stormlord are good ones) and you'll see some of the sounds I'm going for.

author: Fungus
author_rank: Super Contributor
timestamp: June 03, 2016, 08:25:24 am
content: Quote from: nctnico on June 02, 2016, 11:11:48 pmAY-3-8910 was used in the MSX, Amstrad CPC, Spectrum+, Atari ST, and countless others. It was also used in many arcade machines but they typically used multiple chips - one chip per sound 'channel' so you could get decent sounds (that's the reason arcade machines sounded way better than home computers, having one AY chip foreverythingis a bit crappy).Itwasn'tused in the C64, which used a proprietary 'SID' chip. Similar number of channels but it has a low/high/bandbass filters and ring modulation. This makes a huge difference.The AY-3-8910 has 3 square wave outputs plus a white noise channel that can be mixed with any of the other three, and... that's about it.It has an annoying bug that make really annoying clicks when you try to do a vibrato effect: To generate pulses it counts up internally from zero until the counter matches a value in a frequency register. When it gets there it toggles the output pin, resets the counter to zero and starts again.If you change the frequency register downwards while it's counting then the compare will miss, the counter will keep counting upwards, wrap around to zero, and generate a really long output pulse. This is really audible.

author: Fungus
author_rank: Super Contributor
timestamp: June 03, 2016, 08:35:57 am
content: Quote from: TRS-90 on June 02, 2016, 11:21:57 pmThat's going to depend on the particular keyboard.Quote from: TRS-90 on June 02, 2016, 11:21:57 pmSearch google for chip emulators and software synthesizers.Quote from: TRS-90 on June 02, 2016, 11:21:57 pmI watched Rob Hubbard working on Monty On The Run.

author: borjam
author_rank: Unknown
timestamp: June 03, 2016, 09:11:32 am
content: Quote from: Fungus on June 03, 2016, 08:25:24 amThe AY-3-8910 was quite limited. Although playing with mixing the oscillators together slightly detuned created some nice sounding effects, roughly similar to FM modulation synthesis.QuoteThe C64 had a completely different, and extraordinary beast, the 6581,https://en.wikipedia.org/wiki/MOS_Technology_SIDwhich was analog modular synthesizer in a chip, no less.Speaking of what, if you can read Spanish, there is a great book on analog synthesizers. "Nueva Generación de Instrumentos Musicales Electrónicos", by Juan Bermúdez (editorial Marcombo). If you can't read Spanish you can still understand the schematicsThe book is out of print, but the author has made it freely available. He even made some corrections.http://aulaelectroacustica.blogspot.com.es/2015/02/ebook-nueva-generacion-de-instrumentos.html

author: daybyter
author_rank: Frequent Contributor
timestamp: June 03, 2016, 10:28:39 am
content: Maybe you could use some cheap Arduino Board to add a midi out? So you could just plug in various external synths?

author: Fungus
author_rank: Super Contributor
timestamp: June 03, 2016, 10:32:23 am
content: Quote from: borjam on June 03, 2016, 09:11:32 amI also invented a technique where you use the envelope generator (triangle or saw) at high frequency to modulate the sound. It gives a sort of ring-modulation effect. I never heard anybody else do it...(You can hear it 12 seconds into this video:)Quote from: borjam on June 03, 2016, 09:11:32 amParcece interesante, echare un vistazo...

author: Fungus
author_rank: Super Contributor
timestamp: June 03, 2016, 10:39:13 am
content: Quote from: daybyter on June 03, 2016, 10:28:39 amIf the keyboard has a midi-out then all you need is an optoisolator to connect it to an Arduino, MIDI is just RS232 in disguise.If you get an Arduino Leonardo you'll have almost everything you need for a bleepy synthesizer (Leonardo has two RS232 ports and four 16-bit timers for square wave generation). All that's missing is software and it's a fairly safe bet that somebody already did this and posted the code on the web. It'll be a lot easier to get working than an ARM chip.

author: borjam
author_rank: Unknown
timestamp: June 06, 2016, 06:50:26 am
content: Quote from: Fungus on June 03, 2016, 10:32:23 amEs un clásicoJuan Bermúdez publicaba artículos en una vieja revista llamada Música y Tecnoología, allá por finales de los 80. Publicó entre otras cosas el diseño de un ecualizador paramétrico bastante interesante y un "excitador aural" en la época en la que solamente existían los Aphex.

author: daybyter
author_rank: Frequent Contributor
timestamp: June 07, 2016, 10:45:12 pm
content: http://www.avrfreaks.net/forum/avr-synthesizer

author: TRS-90
author_rank: Regular Contributor
timestamp: June 20, 2016, 09:23:55 pm
content: Thanks for all this information.Someone has made an arduino SID emulator shield that has MIDI on it and someone else converted an old casio toy keyboard to have a MIDI out on it.So I should be able to make this.Segway but do any of you have any advice on making music on a TI-99 (or just programming references in general) or vectrex homebrew programming( I would like to eventually make a sly cooper fangame on the vectrex, with special hardware in the cart of course)?

author: daybyter
author_rank: Frequent Contributor
timestamp: June 20, 2016, 11:17:49 pm
content: There are forums dedicated to vintage computers. You might get more information there.

author: TRS-90
author_rank: Regular Contributor
timestamp: June 20, 2016, 11:58:36 pm
content: True True.But one thing I just cant seem to find any (decent) information on is vectrex programming.I think vector graphics are awsome (when done right) but since there is no atari tempest arced board homebrew (and I aslo don't have one) I'm looking into the vectrex instead.

author: TRS-90
author_rank: Regular Contributor
timestamp: July 24, 2016, 08:00:57 pm
content: Sorry for being inactive for a while.I found an arduino SID chip emulator shield project online and it has MIDI ports on it.Sorry for sidetracking the topic in my previous post.Is there a way to modify the PSR-6 ROM to add custom FM synth instruments? I know that some casio sampling keybords coould have their ROMs replaced, but that is sameple data which is different from FM synth data.

author: magetoo
author_rank: Frequent Contributor
timestamp: July 28, 2016, 11:57:03 am
content: The Yamaha keyboards with fixed sounds from that era would probably have used a sound generator with its own ROM for instrument parameters. So there's no separate "instrument ROM" to replace.On the other hand, there was someone who posted on Reddit about building a MIDI synth using a specific chip from an old keyboard which had the instruments in ROM, but also one which was user programmable. It is possible that you could have one of those even if the keyboard uses only the fixed instruments.Good luck with the project!

author: ebclr
author_rank: Super Contributor
timestamp: July 28, 2016, 12:19:53 pm
content: Let's put Fpga on the gamehttps://www.logre.eu/wiki/FPGA_Retro_Synth