| |
McMeatLoaf
Registered: Jan 2005 Posts: 108 |
4-bit, 3-chan PWM
I already know about some music with PWM (e.g. "Ragga Run" by Danko). I know you can get up to 8-bit or something (although AFAIK you can't get much better than 16khz at 6-bit), but is there any examples of using just 4-bit PWM, but in 3 channels, which basically creates a 3-chan MOD?
And if it's possible, how high sample-rate can you get? (20khz?)
Yes, the post above may seem confusing...
|
|
| |
chatGPZ
Registered: Dec 2001 Posts: 11386 |
not sure what you mean... there are basically 2 ways to play samples, either by banging $d418 (usually referred to as 4 bit samples) and then PWM samples using a sid voice with square wave.
mmh, and i think i have seen both with more than one channel....the "voodoo people" demo i believe uses 3 channel PWM (?)... and polly tracker does 4 channel 4 bit samples via $d418.
*shrug* |
| |
Steppe
Registered: Jan 2002 Posts: 1510 |
Hm, aren't Reflextracker tunes what you're looking for? They're 3 channel PWM, right? |
| |
McMeatLoaf
Registered: Jan 2005 Posts: 108 |
Quote: Hm, aren't Reflextracker tunes what you're looking for? They're 3 channel PWM, right?
Isn't Reflextracker just 2-3 channels, using $D418?
Anyway, Voodoo People is a pretty good example, but to be really picky I mean playing the channels "seperate" instead of "mixing" them like Pollytracker. :)
(Which means you'll be getting less clipping, or something)
|
| |
Oswald
Registered: Apr 2002 Posts: 5094 |
pollytracker is the very best up to date. I remember hearing a pollytracker tune in bp2006 and wondering what kind of 8 bitter can do such a high quality digi music :D with careful programming/digitizing you can avoid clipping easily. in the case of poly tracker you never have clipping as 4x4bit fits in any case into 8bits. |
| |
McMeatLoaf
Registered: Jan 2005 Posts: 108 |
Quote: pollytracker is the very best up to date. I remember hearing a pollytracker tune in bp2006 and wondering what kind of 8 bitter can do such a high quality digi music :D with careful programming/digitizing you can avoid clipping easily. in the case of poly tracker you never have clipping as 4x4bit fits in any case into 8bits.
If I'm right, isn't the samples just unpacked (so they don't pack two nybbles into one byte), so they're mixed with 8-bit resolution then output through the 4-bit $D418? |
| |
Ninja
Registered: Jan 2002 Posts: 411 |
Don't forget there are test-bit-digis, too. |
| |
Style
Registered: Jun 2004 Posts: 498 |
and $d021 digis on really old crappy TVs :)
|
| |
McMeatLoaf
Registered: Jan 2005 Posts: 108 |
Quote: Don't forget there are test-bit-digis, too.
Wasn't it used in Darwin?
BTW, how good resolution do you get with it? :) |
| |
Ninja
Registered: Jan 2002 Posts: 411 |
I had 6 bit at 15khz. The drawback is that resolution and playback frequency are reciprocal connected. Thus, 7 bit are possible but only at roughly 6.5 khz.
|
| |
McMeatLoaf
Registered: Jan 2005 Posts: 108 |
Quote: I had 6 bit at 15khz. The drawback is that resolution and playback frequency are reciprocal connected. Thus, 7 bit are possible but only at roughly 6.5 khz.
I guess you're right, doesn't the CPU speed limit the quality? (as the SID only can get up to 4khz by itself, or something)
BTW, I've heard the same sample in some C=Hacking magazine, veery nice quality! :D
Has any "unorthodox" solutions ever been used in any demo, like FM (playing the sample through the 16-bit freq register) or using the filters (playing the sample via the cutoff frequency, or simply turning it on and off for 1-bit(?) resolution)? I don't know how the quality would be though...
|
| |
Graham Account closed
Registered: Dec 2002 Posts: 990 |
The oscillators max. base frequency is limited to 4 kHz, but this doesn't limit the samples in any way. |
| |
Frantic
Registered: Mar 2003 Posts: 1648 |
FM stuff is surprisingly little explored on the C64. Perhaps because the "default SID usage" itself has been interesting enough for many people, while other platforms like Amiga are more likely to be used for FM stuff. Another reason for CPU hungry audio code like FM synthesis to be little explored on the C64 is of course that many C64 players are meant to be used together with game or demo code.
Also, as commonly pointed out by me and others, there has been surprisingly little attempts at doing SID stuff that requires lots of CPU in general, apart from playing samples. I mean, not only FM stuff have been under-explored, but CPU heavy audio hacking in general. |
| |
MagerValp
Registered: Dec 2001 Posts: 1078 |
YES! We have lots of musicians/coders, I'm sure there's lots of untapped potential in the SID. |
| |
Oswald
Registered: Apr 2002 Posts: 5094 |
well I wouldnt say that, there is mod player, polly tracker, reflex tracker, voodo people, each one pretty much maxxes out the digi possibilities of the c64 imho. |
| |
Ninja
Registered: Jan 2002 Posts: 411 |
It's not the CPU making the limit this time. For a higher resolution, you need to produce a longer squarewave. Obviously then, you can produce less of those squarewaves per second. You could do something like 6.5 bit at ~10Khz, though. :) |
| |
MagerValp
Registered: Dec 2001 Posts: 1078 |
Quote: well I wouldnt say that, there is mod player, polly tracker, reflex tracker, voodo people, each one pretty much maxxes out the digi possibilities of the c64 imho.
Yes, digis are maxed out. SID is not. Just look at the custom waveforms we got the other year, more stuff is bound to be hiding in there.
|
| |
Frantic
Registered: Mar 2003 Posts: 1648 |
@Oswald: Well, as Magervalp pointed out, I was referring to other CPU hungry SID hacking approaches APART FROM Sample playing (which is what the stuff you mention is all about).
On the other hand I wasn't necessarily referring to hardware intricacies of the kind SounDemon explored with his "new waveforms" a while ago (resetting the noise "oscillator" by tricky register settings), as referred to by Magervalp. Of course, there may still be some potential for such stuff, but it was not mainly what I was thinking about in this case.
Rather, I was talking about stuff like, for example, using timers in general for resetting the testbit periodically in order to change the shape of waveforms, combining waveforms in a controlled and timed way in order to produce controlled additive and subtractive results (which can in fact produce FM-like or sample playing like results) and whatever. Other stuff would be CPU hungry modification of the envelopes in order to gain complete control of them over time (Alih did some experiments similar to this I think, with "software oscillators", like sines, "controlling" some SID parameters other than just vibrato/frequency, which do not have direct hardware support for being controlled in such ways, but can be controlled in that way using CPU hungry code), and so on. However, the borders between different approaches are fuzzy of course. Multi speed music could be argued to be able to achieve much of the "CPU hungry" potential, but not all, if we think about the more exactly timed stuff I mentioned, which may require one or several CIA timers (or timed code) running at different speeds, changing dynamically over the time as the music plays different frequencies and so on.
etc etc..
Anyway, the topic was about sample playing, so I guess I am sliding off topic here. Sorry. |
| |
McMeatLoaf
Registered: Jan 2005 Posts: 108 |
Quote: @Oswald: Well, as Magervalp pointed out, I was referring to other CPU hungry SID hacking approaches APART FROM Sample playing (which is what the stuff you mention is all about).
On the other hand I wasn't necessarily referring to hardware intricacies of the kind SounDemon explored with his "new waveforms" a while ago (resetting the noise "oscillator" by tricky register settings), as referred to by Magervalp. Of course, there may still be some potential for such stuff, but it was not mainly what I was thinking about in this case.
Rather, I was talking about stuff like, for example, using timers in general for resetting the testbit periodically in order to change the shape of waveforms, combining waveforms in a controlled and timed way in order to produce controlled additive and subtractive results (which can in fact produce FM-like or sample playing like results) and whatever. Other stuff would be CPU hungry modification of the envelopes in order to gain complete control of them over time (Alih did some experiments similar to this I think, with "software oscillators", like sines, "controlling" some SID parameters other than just vibrato/frequency, which do not have direct hardware support for being controlled in such ways, but can be controlled in that way using CPU hungry code), and so on. However, the borders between different approaches are fuzzy of course. Multi speed music could be argued to be able to achieve much of the "CPU hungry" potential, but not all, if we think about the more exactly timed stuff I mentioned, which may require one or several CIA timers (or timed code) running at different speeds, changing dynamically over the time as the music plays different frequencies and so on.
etc etc..
Anyway, the topic was about sample playing, so I guess I am sliding off topic here. Sorry.
If you're off topic? Hmm, it's OK to me, although a whole discussion about "new waveforms", CPU-intensive SID tricks and such would probably need its own topic. :) |
| |
McMeatLoaf
Registered: Jan 2005 Posts: 108 |
Quote: @Oswald: Well, as Magervalp pointed out, I was referring to other CPU hungry SID hacking approaches APART FROM Sample playing (which is what the stuff you mention is all about).
On the other hand I wasn't necessarily referring to hardware intricacies of the kind SounDemon explored with his "new waveforms" a while ago (resetting the noise "oscillator" by tricky register settings), as referred to by Magervalp. Of course, there may still be some potential for such stuff, but it was not mainly what I was thinking about in this case.
Rather, I was talking about stuff like, for example, using timers in general for resetting the testbit periodically in order to change the shape of waveforms, combining waveforms in a controlled and timed way in order to produce controlled additive and subtractive results (which can in fact produce FM-like or sample playing like results) and whatever. Other stuff would be CPU hungry modification of the envelopes in order to gain complete control of them over time (Alih did some experiments similar to this I think, with "software oscillators", like sines, "controlling" some SID parameters other than just vibrato/frequency, which do not have direct hardware support for being controlled in such ways, but can be controlled in that way using CPU hungry code), and so on. However, the borders between different approaches are fuzzy of course. Multi speed music could be argued to be able to achieve much of the "CPU hungry" potential, but not all, if we think about the more exactly timed stuff I mentioned, which may require one or several CIA timers (or timed code) running at different speeds, changing dynamically over the time as the music plays different frequencies and so on.
etc etc..
Anyway, the topic was about sample playing, so I guess I am sliding off topic here. Sorry.
OK, this may be bumping, but anyway:
Is it possible to change the CIA timers while a tune plays, so you can e.g. have one channel at 6x and another at maybe 8x, and then change the values to e.g. 9x and 12x?
If so, wouldn't it be possible to play some "notes" by using very tight loops (e.g. flipping from 400 to 0-16 hz)?
|
| |
Oswald
Registered: Apr 2002 Posts: 5094 |
you can have only one interrupt based on cia timers. |
| |
chatGPZ
Registered: Dec 2001 Posts: 11386 |
two to be exact :) |
| |
Frantic
Registered: Mar 2003 Posts: 1648 |
Uh? CIA1 triggers IRQ interrupts, and CIA2 triggers NMI interrupts, so two should be possible without problems? (almost at least, since they might be disturbing each other a little (NMI has prio over IRQ) in case the are triggered at the same time)..
Dunno exactly how Polytracker works btw, but isn't it something like using all the four timers, one for each channel, in some way?
Edit: This was written before Gpz replied. |
| |
ChristopherJam
Registered: Aug 2004 Posts: 1409 |
Of course, you could always use constant interrupt rate and just get different pitches by stepping through the source samples at non-integer speeds (just use fixed point or something akin to a Bresenham line plotter). |
| |
Oswald
Registered: Apr 2002 Posts: 5094 |
yeah, got carried away with digis thinking only of nmi :P |
| |
McMeatLoaf
Registered: Jan 2005 Posts: 108 |
Quote: Of course, you could always use constant interrupt rate and just get different pitches by stepping through the source samples at non-integer speeds (just use fixed point or something akin to a Bresenham line plotter).
Yeah, something like that would be interesting to try.
But isn't it possible to just try a single-channel experiment with the CIA timers, and just use tight loops and change the CIA timers while the tune is playing, if it's possible?
(Note, just 1 channel)
Probably it wouldn't be efficient, but it would be fun to try. :) |
| |
Oswald
Registered: Apr 2002 Posts: 5094 |
maybe you should try again, as at this point to me it doesnt make any sense. you seem to be even lacking the knowledge on how CIA based digis work, and mixing terms without knowing the meaning to them. go do your homework, learn how CIA digis work come back when you know and ask again. thxbye. |