Go Down

Topic: SID Emulator and Arduino (Read 2275 times) previous topic - next topic

daitangio

Hi,
 I have just find a very nice C/64's SID emulator library

https://code.google.com/p/sid-arduino-lib/

I find it very very nice, but my knowledge is very little so, where can I find an explanation on how it works?
As far as I can see it uses ISR interrupt to emit PWM-pulse on pin 9.

Can I do other things while playing music, or I need the entire Arduino power to emulate the SID?

For instance I'd like to play some music on this SID while reading a sensor input and turining on some leds

There are cheap chip to emulate the SID?
Thank you!

farvardin

#1
May 11, 2015, 09:52 pm Last Edit: May 11, 2015, 09:54 pm by farvardin
Hello,

if you are interested, you can have a look at this, I've collected or adapted a few utilities around this SID emulator:

https://github.com/farvardin/C64-music/tree/master/sid_arduino

So far there is a sid player (using dump from a real sid tune) but it can only play short extracts of a tune.
And a sid synth you can use with midi (you'll need a real din 5 midi connector, you can find some cheap usb to midi adapter though). A short video with this: https://www.youtube.com/watch?v=0iGADIUm3Ro

it needs more work of course.

About your question, the arduino is not multitask, but it should be possible to do other things using interruptions. But it may degrade the sid emulation...

daitangio

Thank you! Very nice shot.
I will look to your code.
I have forked the original code at

https://github.com/daitangio/sid-arduino-lib

My SID Emulation is able to play voice2 on pin 10, giving you some stereo effect.
Give it a try and let me know

farvardin

it looks interesting, but how can I use it? It seems you need one arduino for playing the music, and the other to serve the data? Is it possible to use a sd card instead? Do you have a video or pictures?

daitangio

Is it possible to use only one ardunio. In the library there are also an example using I2C protocol for master/slave.
You can convert midi data in a text format (with midi2csv) and read them back from an SD card.
I strongly suggest to have a small arduino uno "slave" SID with I2C, because as far as I can understand, the emulation uses a lot of the CPU cycles.

Take look at the provided examples and also at some side projects on my own:


https://github.com/daitangio/sid-arduino-lib/tree/master/examples
https://github.com/daitangio/egg_box/tree/master/src/midi_player



cbmeeks

I know it isn't Arduino, but there is a VERY good SID emulator running on a Parallax Propeller using only one cog (core).

http://forums.parallax.com/showthread.php/118285-SIDcog-The-sound-of-the-Commodore-64-!-(Now-in-the-OBEX)?highlight=sidcog

With the 8-core propeller, you could devote 3-4 cores for SID chips (12 voices) and the rest in interfacing with an Arduino.

The same guy has also perfectly emulated the SN76489 and the AY-3-8910 as well.  So one $8 propeller (plus an eprom and glue logic) could emulate a SID, SN, AY, etc.


Go Up