Author Topic: Need help making a custom music keyboard  (Read 5310 times)

0 Members and 1 Guest are viewing this topic.

Offline TRS-90Topic starter

  • Regular Contributor
  • *
  • Posts: 55
  • Country: us
Need help making a custom music keyboard
« on: June 02, 2016, 10:42:11 pm »
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.
PCBF ANALOG BD LC520/LC575/MACTV 820-0582-A, The bane of my existance.
 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 28013
  • Country: nl
    • NCT Developments
Re: Need help making a custom music keyboard
« Reply #1 on: June 02, 2016, 10:59:17 pm »
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.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline TRS-90Topic starter

  • Regular Contributor
  • *
  • Posts: 55
  • Country: us
Re: Need help making a custom music keyboard
« Reply #2 on: June 02, 2016, 11:03:14 pm »
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.
PCBF ANALOG BD LC520/LC575/MACTV 820-0582-A, The bane of my existance.
 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 28013
  • Country: nl
    • NCT Developments
Re: Need help making a custom music keyboard
« Reply #3 on: June 02, 2016, 11:11:48 pm »
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.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline TRS-90Topic starter

  • Regular Contributor
  • *
  • Posts: 55
  • Country: us
Re: Need help making a custom music keyboard
« Reply #4 on: June 02, 2016, 11:21:57 pm »
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.
PCBF ANALOG BD LC520/LC575/MACTV 820-0582-A, The bane of my existance.
 

Online Fungus

  • Super Contributor
  • ***
  • Posts: 17203
  • Country: 00
Re: Need help making a custom music keyboard
« Reply #5 on: June 03, 2016, 08:25:24 am »
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)

AY-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 for everything is a bit crappy).

It wasn't used 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.
« Last Edit: June 03, 2016, 08:34:52 am by Fungus »
 

Online Fungus

  • Super Contributor
  • ***
  • Posts: 17203
  • Country: 00
Re: Need help making a custom music keyboard
« Reply #6 on: June 03, 2016, 08:35:57 am »
How do recommend I hook up the keyboard mechanism (it uses a ribbon or flat flex cable typically).

That's going to depend on the particular keyboard.

And what would some of the code be for making the sounds or switching instruments?
Search google for chip emulators and software synthesizers.

Listen to some C64 music (last ninja, monty on the run and stormlord are good ones)
I watched Rob Hubbard working on Monty On The Run.  :popcorn:
 

Offline borjam

  • Supporter
  • ****
  • Posts: 908
  • Country: es
  • EA2EKH
Re: Need help making a custom music keyboard
« Reply #7 on: June 03, 2016, 09:11:32 am »
AY-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 for everything is a bit crappy).
The 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.

Quote
It wasn't used 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 C64 had a completely different, and extraordinary beast, the 6581,

https://en.wikipedia.org/wiki/MOS_Technology_SID

which 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 schematics ;)

The 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

 

Offline daybyter

  • Frequent Contributor
  • **
  • Posts: 397
  • Country: de
Re: Need help making a custom music keyboard
« Reply #8 on: June 03, 2016, 10:28:39 am »
Maybe you could use some cheap Arduino Board to add a midi out? So you could just plug in various external synths?
 

Online Fungus

  • Super Contributor
  • ***
  • Posts: 17203
  • Country: 00
Re: Need help making a custom music keyboard
« Reply #9 on: June 03, 2016, 10:32:23 am »
The 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.
I 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: )

Speaking of what, if you can read Spanish, there is a great book on analog synthesizers.

Parcece interesante, echare un vistazo...

 

Online Fungus

  • Super Contributor
  • ***
  • Posts: 17203
  • Country: 00
Re: Need help making a custom music keyboard
« Reply #10 on: June 03, 2016, 10:39:13 am »
Maybe you could use some cheap Arduino Board to add a midi out? So you could just plug in various external synths?

If 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.

 

Offline borjam

  • Supporter
  • ****
  • Posts: 908
  • Country: es
  • EA2EKH
Re: Need help making a custom music keyboard
« Reply #11 on: June 06, 2016, 06:50:26 am »
Speaking of what, if you can read Spanish, there is a great book on analog synthesizers.

Parcece interesante, echare un vistazo...
Es un clásico :)

Juan 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.
 

Offline daybyter

  • Frequent Contributor
  • **
  • Posts: 397
  • Country: de
 

Offline TRS-90Topic starter

  • Regular Contributor
  • *
  • Posts: 55
  • Country: us
Re: Need help making a custom music keyboard
« Reply #13 on: June 20, 2016, 09:23:55 pm »
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)?
PCBF ANALOG BD LC520/LC575/MACTV 820-0582-A, The bane of my existance.
 

Offline daybyter

  • Frequent Contributor
  • **
  • Posts: 397
  • Country: de
Re: Need help making a custom music keyboard
« Reply #14 on: June 20, 2016, 11:17:49 pm »
There are forums dedicated to vintage computers. You might get more information there.
 

Offline TRS-90Topic starter

  • Regular Contributor
  • *
  • Posts: 55
  • Country: us
Re: Need help making a custom music keyboard
« Reply #15 on: June 20, 2016, 11:58:36 pm »
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.
PCBF ANALOG BD LC520/LC575/MACTV 820-0582-A, The bane of my existance.
 

Offline TRS-90Topic starter

  • Regular Contributor
  • *
  • Posts: 55
  • Country: us
Re: Need help making a custom music keyboard
« Reply #16 on: July 24, 2016, 08:00:57 pm »
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.
PCBF ANALOG BD LC520/LC575/MACTV 820-0582-A, The bane of my existance.
 

Offline magetoo

  • Frequent Contributor
  • **
  • Posts: 284
  • Country: se
Re: Need help making a custom music keyboard
« Reply #17 on: July 28, 2016, 11:57:03 am »
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!
 

Offline ebclr

  • Super Contributor
  • ***
  • Posts: 2331
  • Country: 00
Re: Need help making a custom music keyboard
« Reply #18 on: July 28, 2016, 12:19:53 pm »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf