How fast does spin spin?
siljamicke
Posts: 66
I now have sorta 8-bit sound coming out aswell! Things are progressing well
A question, is it feasable to do audiosynthesis using spin in speeds around RCFAST?
I tried a simple:
...which i guess should do a rough four sample sawtoothy kind of wave. I don't get a very high pitch though, i'm guessing 7-8 kHz by ear. I'd like too utilize waveforms greater than 4 samples and still be able to get higher frequencies:(
Maybe i have to venture into the assembly side, just to buy myself headroom.
I am however not afraid of assembly, but i thought that i should give spin a real try before dismissing it. I know i could run the chip faster, but i reckon 12Mhz isn't all that slow so, am i barking up the wrong tree regarding spin here?
/Mikael
A question, is it feasable to do audiosynthesis using spin in speeds around RCFAST?
I tried a simple:
PUB Simplesound dira[16..23]~~ repeat outa[16..23]+=64
...which i guess should do a rough four sample sawtoothy kind of wave. I don't get a very high pitch though, i'm guessing 7-8 kHz by ear. I'd like too utilize waveforms greater than 4 samples and still be able to get higher frequencies:(
Maybe i have to venture into the assembly side, just to buy myself headroom.
I am however not afraid of assembly, but i thought that i should give spin a real try before dismissing it. I know i could run the chip faster, but i reckon 12Mhz isn't all that slow so, am i barking up the wrong tree regarding spin here?
/Mikael
Comments
Spin is fairly slow at 80MHz with most operations taking on the order of 2us (I could be off there). By using the cog counters, you can do some processing at the system clock speed (like pulse train generation). Read the application note on the counters for details (AN001). Spin-only programs can handle "bit-banged" serial I/O at 19.2KBps with an 80MHz clock, so that may give you some idea of what's possible. For anything faster, you will need to use assembly.
Today left me with i big grin on my face though, since to me, even my cheap eight resistor DAC sound output is like a whole wall full of blinking leds
Thanks for the clarification Mike!
Maybe not a grammy winner, but atleast it makes noise, and that is so much fun to me! :scool: