Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Carrier harmonics calculation.
- Only used by saw and square oscillators which in turn are only used for tone generation.
- */
- const float kHarmonicsPrecHZ = 20.f;
- VIZ_INLINE unsigned GetNumCarrierHarmonics(float frequency)
- {
- VIZ_ASSERT(frequency >= 20.f);
- const float lower = (frequency/kAudibleNyquist)/kHarmonicsPrecHZ;
- return unsigned(lower);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement