| |
stunt Account closed
Registered: Jul 2006 Posts: 48 |
How to players and trackers usually deal with these modulation issues? --> Bit-scaling? (sid related, but not nescesarily, not a question related to the battlestar galactica music btw;-)
hi all!
I use the output of osc3(8bit) ($d41b) to modulate the pulsewidth osc1 (12bit) ($d402 & $d403), but now i still do that by just modulating OR the lobyte OR the hibyte register which gives very coarse results and also causes the modulation not to be active on the whole scale of the parameter.
I want to improve this situation so i came up with two strategies, and i'd like to hear your comments on them.
Ok. let's take a look at the situ:
The 8 lsbs reside in d402, the 4 msbs are bits 0,1,3 & 4 of $d403.
Ofcourse I want to spend as less time as possible doing the math.
Now I thought of two strategies:
Strategy 1: To modulate just the 8 most sig. bits of the 12bit word. That would mean to split the modulator byte in two and use the 4 most sig bits to modulate the 4 least sig bits of $d403, and to take the other 4 bits and use them to modulate the 4 most sig bits of $d402.
pros: prolly a time efficient solution
cons: coarse way of modulating: takes 16 steps at a time.
Strategy 2: to "bitscale" or strech up the 8bit modulator value up to a 12 bit value and modulate the 12 bits.
pros: more detailled modulation
cons: prolly lot of math and thus time consuming.
My question: what would be the most time efficient ways to implement both strategies, and which strategy would you guys advice me.
How do players and trackers usually deal with the 12bit wide pulsewidth modulation?
Ofcourse i also want to modulate the 16 bit pitch, the 11 bit filtercutoff and the 4 bit volume parameters.
so i'd like to see a solution for the stretching to all these.
so :
8 bit value modulates 4 bit value
8 bit value modulates 16 bit value
8 bit value modulates 12 bit value
8 bit value modulates 11 bit value
i can imagine dat streching up and down to 4 or 16 is less difficult and strechting up to 11 is the hardest to do. is my intuition right?
very interested to see your solutions to my problem.
And prolly my most important question:
How do players and trackers usually deal with these modulation issues?
Greetz,
Stunt
|
|
| |
Laxity
Registered: Aug 2005 Posts: 459 |
Eh...
lda pulseWidthLow
clc
adc pulseSweepLow
sta pulseWidthLow
sta $d402
lda pulseWidthHigh
adc pulseSweepHigh
sta pulseWidthHigh
sta $d403
???
That's not what you're looking for, right?.. Actually I'm not sure what exactly you want to accomplish! |
| |
cadaver
Registered: Feb 2002 Posts: 1160 |
@Laxity: maybe an official synth package should do things the modulation-way, instead of direct calculations .. but SID doesn't have a lot of modulators :)
|
| |
Laxity
Registered: Aug 2005 Posts: 459 |
Nope ;) |
| |
stunt Account closed
Registered: Jul 2006 Posts: 48 |
Quote: Eh...
lda pulseWidthLow
clc
adc pulseSweepLow
sta pulseWidthLow
sta $d402
lda pulseWidthHigh
adc pulseSweepHigh
sta pulseWidthHigh
sta $d403
???
That's not what you're looking for, right?.. Actually I'm not sure what exactly you want to accomplish!
Ok what you are suggesting is that I read from tables, and that i have precaculculated different tables for 16, 12, 11, 8 and 4 bit modulation?
Might not be a bad suggestion. Thx.
Furthermore I'll explain what i want to accomplish: I use osc3 and env3 as a modulators. So switch the sound off osc3 and just use for modulation purposes.
Why?: so i can jam live. It's for example really cool to manually (with a pot) controll the speed (pitch) of osc3 while osc3 is modulating cutoff or pitch of osc 1.
Now osc3 only provides 8bit output so in that case my intuition tells me i will have to bitschale/strech it to match 16,12,11 and 4 bit values.
My main question still stands: how do trackers/players deal with modulation? do they use tables? according to the c664 reference guide osc3 and env3 are meant for exactly the purpose that i want to use them for, so i imagine that coders faced the same problem as me.
How was this worked around in the past?
How to players/trackers deal with modulation?
Thx
ps. I didn't code (on any platform) for 15 years, and back then i was also just a beginners. Now I started refreshing my skills since a couple of weeks. So my question might be really stupid, still help would be appreciated. I'll promise to make progress really fast.
|
| |
cadaver
Registered: Feb 2002 Posts: 1160 |
What Laxity suggested is that the pulsewidth has some starting value, then a value is being manually added to it with a fixed period (like once per 50Hz frame) to create a modulation effect.
The vast majority of C64 music editors/players do exactly this, instead of "real" modulation. |
| |
Hein
Registered: Apr 2004 Posts: 954 |
With 3 voices to do music, it's a waste to use voice 3 output to modulate pw of one of the other voices. You'd loose 1 voice .
besides:
lda $d41b
and #$fe
tax
lda pwtable,x
sta $d402
lda pwtable+1,x
sta $d403
also looses a lot of detail. Then again, who notices when doing live gigs? :) |
| |
Kenho Account closed
Registered: Jan 2003 Posts: 26 |
Hi, a bit offtopic but have you tried out the Prophet64 package? here->http://www.prophet64.com/ it might be the only things you need :-)
/K |
| |
stunt Account closed
Registered: Jul 2006 Posts: 48 |
Quote: With 3 voices to do music, it's a waste to use voice 3 output to modulate pw of one of the other voices. You'd loose 1 voice .
besides:
lda $d41b
and #$fe
tax
lda pwtable,x
sta $d402
lda pwtable+1,x
sta $d403
also looses a lot of detail. Then again, who notices when doing live gigs? :)
@ Hein:
I studied your piece of code and it seems to be just what i'm looking for. Great man thx a lot! c64 coders are the best with time efficient solutions. i knew i could count on you guys.
question1: It's just the and #%11111110 that i dont understand. can you clarify? thx.
question2: why do you say that it loses a lot of detail? I dont understand. please clarify.
PS. (apart from the fact that i'm currently pimping a c64 with more sids, and apart from the fact that indeed i will create my thing for performing) --> i believe i can do great stuff with just 2 properly modulated voices. the great advantage of osc3 is that you can use it like a realtime calculated goniometric movement without wasting cpu. you can read from it as fast as from a table and still the content can easily be modified realtime. I have some great ideas i want to implement, im creating this for performing purposes, but i promise to share the code so they can also be implemented in players and demo's. i mean once i started this stuff, why not also create some cool tunesfor the demoscene:) |
| |
stunt Account closed
Registered: Jul 2006 Posts: 48 |
Quote: Hi, a bit offtopic but have you tried out the Prophet64 package? here->http://www.prophet64.com/ it might be the only things you need :-)
/K
@ offtopic:
Prophet64 is actually what comes the closest to what i'm doing. But to me it's sort of useless because it turns your c64 into a 303-like thingy.
I have very specific wishes on terms of interfacing, whereas the prophet is like any standard synth on the market: boring, heard it 10000 times before.
Besides it provides a cubase/logic like mac/pc style sequencer that runs on the c64. I will run my sequencer on pc/mac and talk to c64 with midi so i can I dedicate all available power and memory to the soundengine, and not to horny marketing interface. Besides. the greatest sin is that it uses 1531mouse for navigation. This sucks because it comsumes potx and y of sid. Potx and y are ports that you want to use for controllingpurposes (pedals, knobs, faders for realtime fiddling). So i dont know what gotten into the head of the designer, but we definately have a totally different view on how experimental and original a sid should sound. So my thing is actually an alternative for guys that really want to bleep.
Bleep on
Stunt |
| |
Hein
Registered: Apr 2004 Posts: 954 |
you dont need to and #$fe I guess. 2 tables should work out aswell, giving more detail.
ldx $d41b
lda pw_low,x
sta $d402
lda pw_hi,x
sta $d403
frankly, Im not a sidprogramming expert at all, I've been told that its better to collect all parameters, store them, and next frame write them to sid. Doing these inbetween sidwrites might make it jitter, I think.
You're bount to loose detail, because you spread your 8bits over 12bits. Maybe there's a skilled programmer who can do a routine that calculates the in between values, but with a noise waveform modulator, it might be a bit tricky to calculate the correct value. (Or just take a random one. :)
I think this $d41b thing ain't made for pw-modulation, not even filter-modulation, despite of what the manual says. The manual never said anything about open sideborders. It's better to have your own routine doing the modulation. (like Laxity and Cadaver stated) |
... 16 posts hidden. Click here to view all posts.... |
Previous - 1 | 2 | 3 - Next |