SIDcog - The sound of the Commodore 64 ! (Now in the OBEX)

135678

Comments

  • Cluso99Cluso99 Posts: 16,672
    edited 2010-03-02 - 02:21:00
    Nice work Ahle2. Shame you didn't enter it [noparse]:([/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Links to other interesting threads:

    · Home of the MultiBladeProps: TriBlade,·RamBlade,·SixBlade, website
    · Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
    · Prop Tools under Development or Completed (Index)
    · Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) ZiCog (Z80) , MoCog (6809)·
    · Prop OS: SphinxOS·, PropDos , PropCmd··· Search the Propeller forums·(uses advanced Google search)
    My cruising website is: ·www.bluemagic.biz·· MultiBlade Props: www.cluso.bluemagic.biz
  • Ahle2Ahle2 Posts: 1,072
    edited 2010-03-02 - 10:11:11
    @OBC
    I think we could have 6 SIDcogs running at once. 6*3=18 sound channels.
    One cog for mixing them togheter and one for communciation.

    @Cluso99
    Did you finally managed to test SIDcog out with my serial player?

    Btw, I found this on YouTube www.youtube.com/watch?v=1RR_qbREDQs
  • BaggersBaggers Posts: 2,965
    edited 2010-03-02 - 10:35:27
    excellent app Ahle2, nice addition to SIDcog, I can now play stuff on my demoboard [noparse]:D[/noparse] thanks!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    http://www.propgfx.co.uk/forum/·home of the PropGFX Lite

    ·
  • mikedivmikediv Posts: 825
    edited 2010-03-02 - 14:24:07
    Ahle2,, pure genius my friend ,, Again thank you for sharing your code I love it...
  • Cluso99Cluso99 Posts: 16,672
    edited 2010-03-03 - 07:18:04
    Ahle2: No not yet I am afraid. But I did listen to the youtube sounds - thankyou for posting. They sound great smile.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Links to other interesting threads:

    · Home of the MultiBladeProps: TriBlade,·RamBlade,·SixBlade, website
    · Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
    · Prop Tools under Development or Completed (Index)
    · Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) ZiCog (Z80) , MoCog (6809)·
    · Prop OS: SphinxOS·, PropDos , PropCmd··· Search the Propeller forums·(uses advanced Google search)
    My cruising website is: ·www.bluemagic.biz·· MultiBlade Props: www.cluso.bluemagic.biz
  • Ahle2Ahle2 Posts: 1,072
    edited 2010-03-23 - 21:01:15
    Looks like the guy behind the Hive retro Computer has made a very cool SID player ( using SIDcog of course :P ) with some leds and a butchered harddrive.
    Nice to see some interest in the SIDcog emulator besides from me and Oldbit.
    www.youtube.com/watch?v=6CX2E9Xh1hM&feature=player_embedded#

    Here are some pictures of the project as well.
    hive-project.de/content/1665

    Post Edited (Ahle2) : 3/23/2010 9:14:40 PM GMT
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,090
    edited 2010-03-23 - 21:08:12
    Good deal!

    I demand a completed tracker/player for SIDcog.. [noparse]:)[/noparse] [noparse]:)[/noparse] <SMIRK>
    (referring to your comment in the HERO thread.)

    Actually, I just want some easy ways to put sound and music in my games.

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Are you Propeller Powered? PropellerPowered.com
    Visit the: PROPELLERPOWERED SIG forum kindly hosted by Savage Circuits.
  • Ahle2Ahle2 Posts: 1,072
    edited 2010-03-24 - 10:23:33
    @OBC
    LOL... Yes it would have been nice to have an easy to use game audio object.
    At the moment I'm quite busy with other things [noparse]:([/noparse]
  • tenfoldtenfold Posts: 4
    edited 2010-03-30 - 04:29:48
    Hey guys I'm back.

    I finally ordered my sidstick and I'm planning on putting it together a little differently so I have a few questions. I know this isn't really a sidstick thread, but I'm sure you can help me.

    Is there a reason the sidstick has a stereo out? The original sid was not capable of stereo sound, but is the sidcog capable of that? Does the sidcog by chance have separate outs for each channel (good god please say yes).

    Can I use a 9v battery instead of the battery pack that comes with the sidstick?

    I would really love for someone to work a midi clock into sidcog, since I have no programming ability whatsoever. Basically what I'm doing is casing the sidstick in a guitar pedal stomp box so I can easily trigger sid tracks to back me up while I play guitar. It should be pretty boss.

    Thanks d00ds.
  • Ahle2Ahle2 Posts: 1,072
    edited 2010-03-30 - 16:20:14
    tenfold said...
    Hey guys I'm back.
    Welcome back. [noparse]:)[/noparse]

    tenfold said...
    Is there a reason the sidstick has a stereo out?
    The original sid was not capable of stereo sound, but is the sidcog capable of that?
    Does the sidcog by chance have separate outs for each channel (good god please say yes).
    I don't know exactly what you mean by separate outs.. Do you mean 3 independant outputs, one for each SID channel?
    Then the answare is NO.

    The SIDstick is capable of stereo output, but the firmware only supports mono output at the moment.
    Theoretically there are many different ways to achieve stereo sound with the SIDstick.

    - Play the 3 SID channels in each (L and R) audio channel, with slightly different frequency between L/R. This will make the sound appear to come from all around you.
    You are still limited to 3 SID channels tough.

    - Play 3 SID channels to the left and 3 different SID channels to the right.
    This way you can have twice as many SID channels as a real SID while having stereo sound.

    - Mxing up to 18 SID channels at once with the help of a mixer-cog. This way you could pan each SID(3 channels) independently and even apply some sound FX.
    tenfold said...
    Can I use a 9v battery instead of the battery pack that comes with the sidstick?
    It depends on wich voltage regulator that is used in the SIDstick, you will have to ask Nick (I can't remember).
    tenfold said...
    I would really love for someone to work a midi clock into sidcog, since I have no programming ability whatsoever. Basically what I'm doing is casing the sidstick in a guitar pedal stomp box so I can easily trigger sid tracks to back me up while I play guitar. It should be pretty boss.
    That's a cool project.
    I have some midi equipment, synthesiezers and the knowhow to do something like that, but at the moment I have got NOO time whatsoever. [noparse]:([/noparse]
    Maybe someone else in the forum are interested in helping you out?
    /Johannes
  • tenfoldtenfold Posts: 4
    edited 2010-04-01 - 04:16:23
    Ahle2 said...

    - Play the 3 SID channels in each (L and R) audio channel, with slightly different frequency between L/R. This will make the sound appear to come from all around you.
    You are still limited to 3 SID channels tough.

    - Play 3 SID channels to the left and 3 different SID channels to the right.
    This way you can have twice as many SID channels as a real SID while having stereo sound.

    - Mxing up to 18 SID channels at once with the help of a mixer-cog. This way you could pan each SID(3 channels) independently and even apply some sound FX.

    These are all interesting ideas, but how would you write sid tunes with more than three channels in the first place?
  • Nick McClickNick McClick Posts: 1,003
    edited 2010-04-01 - 05:26:07
    tenfold said...
    Is there a reason the sidstick has a stereo out?
    The original sid was not capable of stereo sound, but is the sidcog capable of that?
    Does the sidcog by chance have separate outs for each channel (good god please say yes).

    The SIDstick hardware supports stereo output, although the current firmware puts the same audio out on both channels. See the schematic on the project page.

    The regulator tops out at 6V input. See the datasheet.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Propeller Forums RSS Feed!

    Gadget Gangster - Share your Electronic Projects
  • tenfoldtenfold Posts: 4
    edited 2010-04-02 - 00:14:04
    Nick McClick said...

    The SIDstick hardware supports stereo output, although the current firmware puts the same audio out on both channels.

    That's good to know. I can add separate outs for each, and possibly run one through effects or add a switcher for them...hmmm.
    Nick McClick said...
    The regulator tops out at 6V input.

    Excuse my n00bishness, but I could just get a regulator that tops out at 9v then right?
  • Nick McClickNick McClick Posts: 1,003
    edited 2010-04-02 - 03:55:50
    Sure, you'll probably not want to use a linear regulator though - it will waste a lot of energy converting the 9v to 3v.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Propeller Forums RSS Feed!

    Gadget Gangster - Share your Electronic Projects
  • Ahle2Ahle2 Posts: 1,072
    edited 2010-05-23 - 02:05:06
    I've found this awesome one hour mix of many great C64 tunes recorded from a real C64 equipt with a 6581 SID chip (the old version of the chip).
    g00nzor.free.fr/
  • danielxdanielx Posts: 1
    edited 2010-05-27 - 21:29:49
    Ahle2 said...
    The pseudo code for the multi mode 6db/octave filter looks like this!
    [b]Each sample:[/b]
        filter_H  = input_sample - filter_B * filter_resonance - filter_L      
        filter_B += filter_freq * filter_H
        filter_L += filter_freq * filter_B
    
    



    filter_H = Highpass filtered sample
    filter_B = Bandpass filtered sample
    filter_L = Lowpass filtered sample
    filter_freq = Cutoff frequency ( a value between 0 - 1, max freq = sample_rate/2 )
    filter_resonance = Resonance amount ( a value between 0 - 1 )
    input_sample = The incoming sample

    If you for an instance want a bandpass filtered sample use: output_sample = filter_B
    If you for an instance want a bandpass reject filter use: output_sample = filter_L + filter_H

    The logarithmic envelope decay function works like this
    [b]Each frame:[/b]
      amplitude_level-= decay_rate
      if amplitude_level < reference_level
        decay_rate /= 2
        reference_level /= 2
    
    


    I just tried your multimode filter, and it's really great!
    Though the SID filters are 12dB/octave for low and high pass. For band pass it's 6dB/octave on either side of the cutoff.
    I think running the filter code twice will be equivalent to a 12dB filter.
    Another thing: the resonance seems to be inverted. Correct me if I'm wrong! But in my implementation, I get no resonance
    when the param is 1, then full resonance at about 0.3 (I bet the limit is 1-sqrt(2)/2). Lower than that and it gets unstable.
    Anyway, thanks for this simple piece of code, it's very useful!

    /Daniel
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,090
    edited 2010-06-01 - 13:06:19
    I've been playing with SIDCog over the weekend. I was able to make some serious headway with SIDCog Monday afternoon,
    learning some new techniques which weren't that obvious to me. (Probably to everyone else, but I thought I'd share anyway.)

    I'd been trying to work the SIDCog player loop into my main program loop creating all kinds of timing havoc.
    Finally it dawned on me to handle it this way...

    
    
    CON
    
       _clkmode  = xtal1 + pll16x
       _xinfreq  = 5_000_000
       
        playRate = 50'Hz
        SD_PIN   = 16
                  
    VAR
    
      long stack[noparse][[/noparse]30]
      byte  buffer[noparse][[/noparse]25]
       
    PUB start
    
         sd.mount(SD_PIN)                      ' Mount SD card
         SID.start                             ' Start the emulated SID in one cog
         sd.popen(string("music.dmp"),"r")     ' Open the tune 
         cognew(Songplayer,@stack[noparse][[/noparse]30])         ' Start a simple player in it's own cog.
    
         '' main program continues while music plays....
    
         
    PUB Songplayer 
    
         repeat
            waitcnt(cnt+(clkfreq/playRate))     ' Wait one VBL
            if( sd.pread(@buffer,25)) < 0       ' Read 25 bytes from SD card
            SID.updateRegisters(@buffer)        ' Write 25 byte to SIDcogs 25 registers
    
    



    Perhaps it will be helpful to someone else.. [noparse]:)[/noparse]

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Propeller Feature Projects: PropellerPowered.com
    Visit the: PROPELLERPOWERED SIG forum kindly hosted by Savage Circuits.
  • kuronekokuroneko Posts: 3,623
    edited 2010-06-01 - 13:32:21
    Shouldn't that read

    cognew(Songplayer, @stack[noparse][[/noparse][b]0[/b]])         ' Start a simple player in it's own cog.
    


    ???
  • BradCBradC Posts: 2,601
    edited 2010-06-01 - 13:38:12
    kuroneko said...
    Shouldn't that read

    cognew(Songplayer, @stack[noparse][[/noparse][b]0[/b]])         ' Start a simple player in it's own cog.
    


    ???

    I guess it depends if you want to trample buffer[noparse][[/noparse]] [noparse];)[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "Are you suggesting coconuts migrate?"
  • kf4ixmkf4ixm Posts: 529
    edited 2010-06-01 - 13:56:44
    @OBC
    Thanks for sharing!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    I'm just 7*1027 atoms floating through time and space in close formation. -KF4IXM
  • Ahle2Ahle2 Posts: 1,072
    edited 2010-06-02 - 11:11:01
    Oldbitcollector said...
    I'd been trying to work the SIDCog player loop into my main program loop creating all kinds of timing havoc.
    Finally it dawned on me to handle it this way...
    Nice to see that your are doing stuff with SIDcog. [noparse]:)[/noparse]
    On the C64 music and graphics were synced with the help of timer and vbl interrupts.
    Since the propeller "lacks" interrupt "features" you will have to handle things differently.

    There are two approaches:
    1. Start a dedicated cog to handle music/sound fx. (Like you have done in the example)
    2. Have some kind of frame/main counter to sync things to certain intervals or/and circumstances.

    Approach 2 can be quite tricky to handle and is prone to "lag" when much is happening at the same time.
    As soon as the graphics starts to go slow the audio will be affected as well.

    SIDcog is meant to be like a real SID and it's up to you to fill the SID-registers with data to produce sound/music.
    However, I'm working on a new "retro like" sound engine named Retronitus ( retro=behind, sonitus=noise or "noise from the past" )
    It will pretty much be a mix of the AY38910 and the SID with 6 channels and possible with built in music capabilities.

    /Ahle2
  • Ahle2Ahle2 Posts: 1,072
    edited 2010-06-03 - 16:25:59
    danielx said...
    I just tried your multimode filter, and it's really great!
    Thanks!
    danielx said...
    Though the SID filters are 12dB/octave for low and high pass. For band pass it's 6dB/octave on either side of the cutoff.
    I think running the filter code twice will be equivalent to a 12dB filter.
    Yes you are right, but it wouldn't be possible at a sample rate of 31kHz. [noparse]:([/noparse]
    danielx said...

    Another thing: the resonance seems to be inverted. Correct me if I'm wrong! But in my implementation, I get no resonance
    when the param is 1, then full resonance at about 0.3 (I bet the limit is 1-sqrt(2)/2). Lower than that and it gets unstable.
    Anyway, thanks for this simple piece of code, it's very useful!
    You are right in the above assumptions as well. [noparse];)[/noparse]

    /Daniel
  • iemandiemand Posts: 5
    edited 2010-06-13 - 18:13:04
    The link for the qt4gui.dll file doesn't work anymore. Could someone please provide a new link?

    I've searched the internet for the file, but the files I found seem to be incompitable for some reason.
  • Ahle2Ahle2 Posts: 1,072
    edited 2010-06-14 - 18:13:16
    I've updated the first post with a link to an external archive containing everything needed in one file.

    /Ahle2
  • Linus AkessonLinus Akesson Posts: 22
    edited 2010-07-27 - 05:32:15
    This is great! Seal of approval granted. =)
  • Ahle2Ahle2 Posts: 1,072
    edited 2010-07-27 - 08:54:43
    Thanks Linus !
    When will we see another great propeller project from you?
    I know PICs are more challenging to make things with, but i'm sure you could achieve some ground breaking stuff with the propeller.
    To this day Turbulence is the most outstanding demo ever made on the Propeller. [noparse]:)[/noparse]

    You may be interested in my upcoming project (almost done now), a graphical chiptune player for the propeller.
    It currently supports SID 8580 and AY 3891X emulation.

    Btw, I LOVE your Chipophone. [noparse]:)[/noparse]
  • 65816581 Posts: 132
    edited 2010-10-25 - 05:59:42
    Thanks Ahle2 for your great contribution!

    Okay, here's a short introduction to what I have done with the SIDCog:
    - Attached MCP3208 8-Channel 12-Bit ADC to the Propeller with 8
    potentiometers in order to control Cutoff, Resonance, Attack, Decay,
    Sustain, Release and Volume with analog potentiometers. This gives some
    kind of feeling as controling an analog modular synthesizer as the DAC
    with 100ksps is fast enough for a "near-realtime" control - you don't hear
    any delay.
    - Made a 100% midi controllable synthesizer using the SIDcog - the code
    is still all "hacked" together, but it works. Will publish some stuff if I
    clean it up.
    - MIDI seems to work without any problems (there is some little problem -
    it seems that a byte gets discarded sometimes when playing some tunes
    at >240BPM + live Cutoff & Resonance control. This might be an issue
    with the MIDI bandwidth capabilities (31.250 Baud). I'll check out what's
    going on with my logic analyzer soon.
    - Combined mode (MIDI data + Analog control) is also working. I'm using
    an additional Cog for processing the ADC data and modifying the
    corresponding variables.
    - I've succesfully written a VGA debugger for the SID serial player which
    shows the SID registers live on a VGA output. This is quite useful for
    debugging purposes, as this is working in it's own COG and the drawing
    routine is a lot faster than the QT display function.
    - I've made various experiments with the SIDCog - e.g. adding a RNG
    which can be seeded with a predefined value
    - I've simulated some kind of retro drum sounds - e.g. setting the
    Waveform to Noise and adjusting the ADSR as following: 0 1 1 9
    so that a "Hall-like" effect appears - this is great for snare sounds for
    experimental music and electronic music. Striking the MIDI note
    100 makes it sound pretty nice. If you're decreasing the frequency
    by 1Hz each 10ms down to MIDI note 80, it sounds like some low-drop
    snare (some kind of the early Depeche Mode sound).
  • 65816581 Posts: 132
    edited 2010-10-25 - 06:01:02
    Ahle2 wrote: »
    You may be interested in my upcoming project (almost done now), a graphical chiptune player for the propeller.
    It currently supports SID 8580 and AY 3891X emulation.

    Hey, do you have any spin code or video? Sounds great!
  • Cluso99Cluso99 Posts: 16,672
    edited 2010-10-25 - 18:25:43
    6581: Your project sounds great. Congraulations.
  • jazzedjazzed Posts: 11,803
    edited 2010-10-25 - 22:06:22
    I'm enjoying these demos. Thanks.
Sign In or Register to comment.