Use math mod macros when you see the need to eliminate any unnecessary calculations.Īnother important use of mod macros is to help control initialisation.įor example, constants send their value as an event during initialisation, but don't generate events at other times. Keep building, have a look at other structures/code, and use debugging tools. I'm realizing now that this is pretty close to the example in the manual. This effectively means that the only time this division occurs is during initialization - if the sampling rate changes, this causes an initialization event so it will change accordingly. As such, you'd want to use the quotient in the bottom port of a math mod macro. It's best to ensure that this division (ie 48000/4) doesn't occur in response to subsequent calculations. It's useful to divide the SR.Clock to derive practical rates for LFOs, Sequencers, other clocks, etc. > When you want a calculation to occur only once (during initialization). These sorts of situations can become quite complex, however, so it's important to use a debugging tool like ACEW or the Event Watcher found in the R6 Library. Again, it's likely that this operation need only occur when the multiplier changes, and once again the x mul a function is your savior. For instance, a value may need to be multiplied by 0.5 - if it's used in a subsequent calculation, this multiplication can potentially occur far more frequently than necessary. > Performing calculations only when a specific value changes (or an event arrives). Such things become paramount to conserving CPU and controlling initialization. As such, using the x mul a function (audio connected to the top input) the latched value will be applied when audio is coming through, but won't generate extraneous events otherwise. In such an instance, it's not necessary for the value to change when the control hasn't moved. > With control elements (knobs/sliders/external modulation), it's typical that the control is part of some calculation wherein the 'audio' signal is affected (ie amplitude, using multiplication). However, there are a number of things that one might want to consider: There aren't necessarily any hard rules that one can follow in order to utilize the math mod macros effectively - it varies with context.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |