SIDcog - The sound of the Commodore 64 !
![Ahle2](https://forums.parallax.com/uploads/userpics/074/n0CZWXG5H42YQ.jpg)
Okey guys here it is, an emulation of the famous sound chip used in the Commodore 64 !
Download the zip file and run "ExamplePlayroutine.spin" and "ExampleSidDumpPlay.spin".
"ExampleSidDumpPlay.spin" needs a SD card and the file "Russian.dmp" in the root of the card.
There are two different versions of SIDcog:
- If you want a more accurate emulation of the SID use "SIDcog". (playback of C64 SID dump files)
- If you want a small footprint use "SIDcog_Lite". (uses 63% of the space compared to SIDcog)
The only difference between the two versions at the moment are the combined waveform support in "SIDcog".
SIDcog version 0.80 features:
- Runs in one cog - totally self contained.
- 31kHz sample rate.
- >16bit resolution.
- Full filter support - any combination of Lowpass, Bandpass and Highpass filter.
- Full envelope support with a logarithmic release/decay curve. ( uses the same logarithmic approximation as a real SID)
- Supports all 4 waveform types
- Combined waveform support ( Not supported in SIDcog Lite )
- 16 steps main volume.
- Waveform reset bit works. (many Rob Hubbard tunes relies on this exact behaviour)
- Ring modulation.
- Oscillator synchronization.
- Can be "programmed" in the EXACT same way as a real SID. (Have a look at the official SID documentation for a better understanding)
SIDcog lacks:
- Possibillity to smoothly schange the filter resonance amount value (partly implemented thanks to Ariba)
BTW, if you have missed the initial SIDcog demo have a look at http://forums.parallax.com/showthread.php?p=855167
Here is a link to an archive containing the SID dumper tool.
Download SIDcog serial player to play SID-tunes via a serial link to a propeller running SIDcog.
Post Edited (Ahle2) : 6/14/2010 6:35:43 PM GMT
Download the zip file and run "ExamplePlayroutine.spin" and "ExampleSidDumpPlay.spin".
"ExampleSidDumpPlay.spin" needs a SD card and the file "Russian.dmp" in the root of the card.
There are two different versions of SIDcog:
- If you want a more accurate emulation of the SID use "SIDcog". (playback of C64 SID dump files)
- If you want a small footprint use "SIDcog_Lite". (uses 63% of the space compared to SIDcog)
The only difference between the two versions at the moment are the combined waveform support in "SIDcog".
SIDcog version 0.80 features:
- Runs in one cog - totally self contained.
- 31kHz sample rate.
- >16bit resolution.
- Full filter support - any combination of Lowpass, Bandpass and Highpass filter.
- Full envelope support with a logarithmic release/decay curve. ( uses the same logarithmic approximation as a real SID)
- Supports all 4 waveform types
- Combined waveform support ( Not supported in SIDcog Lite )
- 16 steps main volume.
- Waveform reset bit works. (many Rob Hubbard tunes relies on this exact behaviour)
- Ring modulation.
- Oscillator synchronization.
- Can be "programmed" in the EXACT same way as a real SID. (Have a look at the official SID documentation for a better understanding)
SIDcog lacks:
- Possibillity to smoothly schange the filter resonance amount value (partly implemented thanks to Ariba)
BTW, if you have missed the initial SIDcog demo have a look at http://forums.parallax.com/showthread.php?p=855167
Here is a link to an archive containing the SID dumper tool.
Download SIDcog serial player to play SID-tunes via a serial link to a propeller running SIDcog.
Post Edited (Ahle2) : 6/14/2010 6:35:43 PM GMT
Comments
This will be used many many times over
Coley
PS Do you have an app to dump the SID registers?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
PropGFX - The home of the Hybrid Development System and PropGFX Lite
Post Edited (Coley) : 12/11/2009 10:59:11 PM GMT
Baggers.
PS, I think we should really think about making a ModTracker. in Spin.
Paul (Paulie) Hughes, who wrote the Ocean Loader, and driver for most of the early OCEAN SID tunes has 6502 source on his website, for the driver.
We just need to convert it to spin/pasm, then make a tracker [noparse]:)[/noparse]
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
http://www.propgfx.co.uk/forum/·home of the PropGFX Lite
·
Yes, I do.... But it's buggy at the moment
I will make a bug free platform independant QT version as soon as I have got any time.
Looks like I'm definitely going to have to make an on prop tracker now!
Cheers,
Jim.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
http://www.propgfx.co.uk/forum/·home of the PropGFX Lite
·
Yes.... You just have to do that
I have been a tracker musician for 15 years and would LOVE to have a real tracker for the prop.
It will be soooo much easier than typing in all the music data as numbers in a dat block.
It took me forever just to type in all those numbers and the end result wasn't as good as I would have wanted it to be. (Its EXTREMELY hard to make anything decent by typing numbers in dat block)
In the early 90s I used Protracker on my Amiga 500 and was limited to just 4 channels.
In the mid 90s I used to do my music in Digibooster Professional on my Ultra Expanded Amiga 1200 and could have up to 128 channels.
Today i'm using Psycle with 100s of VST synths and unlimted amount of channels.
Tomorrow I will use SIDcog tracker on a Parallax Propeller with just 3 channels.
The circle is finally closed....
Thank you so much for releasing the source.
Nice and well commented code !
I have played a bit with the SID object, mainly to test the filter.
Why have you made the resonance parameter a constant, and do not use the according SID register to change it?
The resonance seems to work well.
Can you convert the attached .SID file, I would like to compare it with the MP3s of this site: sid.kubarth.com/
Thanks again
Andy
I could make it work by change the sample frequency to 15khz instead of 30Khz.... but is it worth it?
I will try to make a proper version of my SID dumping tool and release it here.
I have attached a RAR-file containing 141 dumps. Just rename the file to .rar
Post Edited (Ahle2) : 12/14/2009 1:20:09 AM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
http://www.propgfx.co.uk/forum/·home of the PropGFX Lite
·
www.xcore.com/projects/xc-1-sid-emulator-demo
Leon
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Amateur radio callsign: G1HSM
You just can't help yourself can you?
I just knew you'd mention XMOS.......
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
PropGFX - The home of the Hybrid Development System and PropGFX Lite
Leon
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Amateur radio callsign: G1HSM
That's cheating
Leon
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Amateur radio callsign: G1HSM
TinySID is quite inaccurate actually. I did a lot of research for this project and I had a little look at the TinySID source code.
The envelope part is totally wrong.
And the combined waveforms is just a logical anding of the waveforms wich is incorrect.
Leon
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Amateur radio callsign: G1HSM
the opening of two different files? If so, you could open both the right and left sides of
stereo sid files and play them in six voices.
Here's a bunch of data from another Commodore die hard (Glenn wouldn't mind that title.) on stereo SIDs.
www.lyonlabs.org/commodore/stereo-sid/index.html
OBC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?
Visit the: The Propeller Pages @ Warranty Void.
I will have a look to see if there is an easy way of getting dumps of music made in Stereo sidplay.
They can't be dumped in my tool at the moment. [noparse]:([/noparse]
Jonathan
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
lonesock
Piranha are people too.
Here are some results of my experimenting.
1) A midi file player with the SID as target. Not very useful for GeneralMidi files, but theoretically one can compose SID music in a sequencer on the first 3 MIDI channels, save it as midi file, and ply it with this code from SD card.
2) A SID variation with resonance, that goes near to self oscillating. Has perhaps not much tot do with the real SID, but who cares [noparse];)[/noparse]
Andy
Thanks!
Theoretically we can have 6 SIDcogs running at once (1 cog for control and 1 for fswr), that's 6*3 = 18 channels and that's enough for good midi playback.
Now we just need to make presets for all the 128 GM sounds
Well, SIDcog already had resonance but I understand what you mean.
"A SID variation with the abilility to adjust the resonance amount" would be more accurate to say
Anyway, it's a very fast and good solution using a table until I have optimized the code enough to be able to do it more accurately with linear multiplication as I initially intended.
I will keep that in my code for now, but I will calibrate it with a real SID as reference because the resonance is way to much at higher values
It's quite easy to "calculate" it through a lookup table.
If you want to know how many milliseconds it is from noteOff until complete silence.
Example:
Post Edited (Ahle2) : 12/28/2009 1:46:28 PM GMT
It isn't an exact science though, because theoretically it never gets completely silenced thanks to the logarithmic decay/release curve.
SIDcog has got a 16bit envelope resolution instead of an 8bit as on the real C64.
This will cause the tone to stay audible longer when the envelope are "beyond the 8bit resolution".
The constant DTCF (Decay Table Correction Factor) can be adjusted to perfectly match the decay/release times of the SID.
I have calibrated this factor by ear while comparing dumped SID tunes to my real C64.
I'll do it more scientifically with the help of a clock when I've got the time.
Attack times doesn't need any correction thanks to the linear behavior.
@Everybody
I'll need your oppinion:
- What methods to add/change/delete/rename?
- Add support for an external voice input? (Like a real SID)
- Implement combined waveforms with the help of lookup tables on behalf of cog memory space? (It would require at least 4kb for decent quality)
And please share any experience, bug, thought or project that involves SIDcog
/ Johannes Ahlebrand.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Propeller Forums RSS Feed!
Gadget Gangster - Share your Electronic Projects
Luckily combined waveforms are seldom used, therefore it havn't been a priority to implement support for it.
Maybe 3% of all available C64 "material" makes use of it.
The reason is that the older version of the sid chip(6581), produced between 1982-1986, couldn't handle combined waveforms very well..
Even the later version(8580), produced between 1986-1993, made "unpredictable" sounds whith combined waveforms.
All SID emulators on the PC, except for TinySID, relies on lookup tables, because combined waveforms are almost impossible to emulate properly with known algorithms.
TinySID does combined waveforms by bitwise anding of the waveforms (exactly as the patent says) but in reality the result isn't even close to the real deal.
Combined waveforms tends to have an "analog" feature about them and can vary over time and between different SID chips.
SIDcog "converts" all combined waveforms to saw waves for now.
Here is a very good example of a "proper" usage of combined waveforms www.youtube.com/watch?v=-htbkZ72FgI&feature=related
Listen to the guitar/harp like sound at the beginning of the tune.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Propeller Forums RSS Feed!
Gadget Gangster - Share your Electronic Projects
Drum sounds weren't exactly the real SID's strong point,
but I have a midi project in the works that could use drum sounds.
OBC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?
Visit the: The Propeller Pages @ Warranty Void.