Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > C64 Composing > 4-bit, 3-chan PWM
2007-07-09 18:05
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...

2007-07-09 19:29
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*
2007-07-09 19:31
Steppe

Registered: Jan 2002
Posts: 1510
Hm, aren't Reflextracker tunes what you're looking for? They're 3 channel PWM, right?
2007-07-09 20:16
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)







2007-07-09 20:33
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.
2007-07-10 01:33
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?
2007-07-10 04:54
Ninja

Registered: Jan 2002
Posts: 411
Don't forget there are test-bit-digis, too.
2007-07-10 04:57
Style

Registered: Jun 2004
Posts: 498
and $d021 digis on really old crappy TVs :)

2007-07-10 16:52
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? :)
2007-07-11 05:16
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.
2007-07-11 12:50
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...

2007-07-11 13:33
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.
2007-07-11 16:07
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.
2007-07-11 21:21
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.
2007-07-12 00:56
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.
2007-07-12 06:53
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. :)
2007-07-12 08:27
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.
2007-07-12 09:11
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.
2007-07-12 13:28
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. :)
2007-08-02 22:30
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)?

2007-08-03 06:50
Oswald

Registered: Apr 2002
Posts: 5094
you can have only one interrupt based on cia timers.
2007-08-03 06:53
chatGPZ

Registered: Dec 2001
Posts: 11386
two to be exact :)
2007-08-03 06:54
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.
2007-08-03 07:05
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).
2007-08-03 08:53
Oswald

Registered: Apr 2002
Posts: 5094
yeah, got carried away with digis thinking only of nmi :P
2007-08-03 15:25
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. :)
2007-08-03 15:55
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.
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
Jazzcat/Onslaught
sachy/BOOM!
t0m3000/hf^boom!^ibx
sebalozlepsi
Robocop/Atlantis
Airwolf/F4CG
kbs/Pht/Lxt
El Jefe/Slackers^sidD
serato/Finnish Gold
Guests online: 127
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.6)
5 The Demo Coder  (9.6)
6 Edge of Disgrace  (9.6)
7 What Is The Matrix 2  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 Layers  (9.6)
2 Cubic Dream  (9.6)
3 Party Elk 2  (9.6)
4 X-Mas Demo 2024  (9.6)
5 Copper Booze  (9.6)
6 Dawnfall V1.1  (9.5)
7 Rainbow Connection  (9.5)
8 Onscreen 5k  (9.5)
9 Morph  (9.5)
10 Libertongo  (9.5)
Top Groups
1 Booze Design  (9.3)
2 Oxyron  (9.3)
3 Performers  (9.3)
4 Censor Design  (9.3)
5 Triad  (9.3)
Top Musicians
1 Rob Hubbard  (9.7)
2 Mutetus  (9.7)
3 Jeroen Tel  (9.7)
4 Linus  (9.6)
5 Stinsen  (9.6)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.084 sec.