| Author |
Message |
Antimon
Joined: Jan 18, 2005 Posts: 4145 Location: Sweden
Audio files: 371
G2 patch files: 100
|
Posted: Thu Dec 08, 2005 10:41 am Post subject:
Variable bandwidth for trig randomizers |
 |
|
I have noticed that the randomizers on the G2 are pretty expensive. I like to use the trig randomizers to change attenuators on beats, and one feature that would be cool is to be able to set the bandwidth for the randomizer to e.g. 4, 16 or more frames, so that pre-calculation of the next pseudo-random number would need 4 or 16 sample frames (or whatever you call it) to finish, and the cycle load would decrease. Then you would have more cycles over for bandwidth-sensitive stuff like oscillators. You wouldn't need to lose precision on the beat, since the randomizer would start calculating the next number as soon the current was retrieved.
Here's some pseudo code:
randomizer {
long currentNumber;
long nextNumber;
int nextNumberPartFinished = 0;
int framesNeededToCalculate = 4;
runEachFrame() {
if( nextNumberPartFinished > 0 ) {
calculatePart( nextNumber, nextNumberPartFinished );
nextNumberPartFinished--;
if( nextNumberPartFinished == 0 ) {
currentNumber = nextNumber;
}
}
}
long getNewNumber() {
return currentNumber;
nextNumberPartFinished = framesNeededToCalculate;
}
}
This will not be useful for Formants, and it assumes that it is possible to distribute the calculation of random numbers so that a function like calculatePart() can be implemented. Still...
Maybe there are other modules that you don't always need full bandwidth for, like most of the logic modules or LFO's...? Perhaps some kind of logic like this is already used in the Modular? I know this has been discussed in other threads here. |
|
|
Back to top
|
|
 |
blue hell
Site Admin

Joined: Apr 03, 2004 Posts: 24489 Location: The Netherlands, Enschede
Audio files: 298
G2 patch files: 320
|
Posted: Thu Dec 08, 2005 12:37 pm Post subject:
Re: Variable bandwidth for trig randomizers |
 |
|
| Antimon wrote: | | Perhaps some kind of logic like this is already used in the Modular? |
Well, yes, the blue and yellow signals run at 1/4 the rate the red and orange signals run at. This must be Swedish thinking :-)
How exactly the distrubution ovet hte cycles is done I'm not sure, I think that one quarter of the 'slow' signals is calculated every cycle, such that code for a module does not have to be broken up.
Apart from CPU load there can be other reasons for modules to be expensive, there could be a need for internal storage, or having outputs is also costly. Why exactly random generators would be relatively expensive I don't know. _________________ Jan
also .. could someone please turn down the thermostat a bit.
 |
|
|
Back to top
|
|
 |
|