-
Notifications
You must be signed in to change notification settings - Fork 0
Basemath instance drift #15
Comments
ooo even this is problematic:
this is bad as well:
while this, of course, is not:
|
lmao even at time-unit=1 and integer lengths there's still a drift
|
^ this is weird! it stops drifting after a bit (those are 2 events happening very close to each other every 4 seconds)
and they just keep going with this gap of 0.008 seconds |
soooo I have no clue! |
I hate to say it.. I very much hate to say it, but it must be the metro... |
time for a manual dive |
I don't wanna go the clock way! Give it a clock input that's as fast as you want the resolution to be and the lengths become counters (clock dividers). It would solve this since the two instances would run on the same clock. But we'd lose the fractional stuff and it's so cool and easy! You'd have to have a multiplied x15 clock on the outside and go: |
we lose the divisions too.. these are very sad times! |
oh yeah! you can just *= an array! so have fun with the fractions and then multiply it until it's just ints! (◠‿☆) |
I'll leave those versions and implement clocked ones.. not sure, maybe just a clocked u version at first. |
ooo I already have a clock divider! |
would this be fixed if instead of the metro, we use a phasor and we rest phase each step? doesn't the metro already be at phase 0 when it outputs a click though? I'm hungry! |
I haven't been working on the clocked versions, been playing around with FM and the numeric score (and pondering the orb of course) |
I wanna investigate why this happens in the first place. Like, I get where the problem is (when we switch the frequency of the metro) but I don't understand why this is a problem. |
tBasemath rules! |
i'll have to move basma.orc to tbasma.orc cause will need an equal version? |
she's back, baby! multiple instances do stay in sync as long as the sample rate is power-of-2 as demonstrated in test/metrosync.csd. i think this finally marks #15 solved
a power-of-2 sampling rate and ksmps solves this |
by the way since this turned out to be a metro thing, not a basmath thing, using more than one metro to run different tBasmath would still have possibility of drifting if under the same sr/kr conditions. the only way to keep them in sync would be to either do the sr thing or to run them usi g the same metro. (that's as far as i understand it now. maybe i'll figure out other ways to workaround this, maybe syncphasor? something) |
not a perfect solution, there are still some frquencies which will go out of sync (it's so much better though) |
When running 2 instances of
uBasemath
(same behavior must happen withBasemath
) with one of them having steps of int lengths and the other with fractional stepsThis first step trigger on both of them should happen at the same time since the lengths add up.
It does happen for a while, but the drift keeps increasing. (around 0.2 seconds after 4 minutes)
I'm thinking floating point inaccuracy from the time unit division:
This is printed as "0.46875" but I'm not sure how csound handles it internally or how to control the variable bit size.
Imma try with time-unit=1 and see..
edit: nope, I was totally wrong about the floating point thing.
july, 27 2022 edit: okay maybe not totally wrong, kiddo
The text was updated successfully, but these errors were encountered: