Logo Search packages:      
Sourcecode: csound version File versions  Download package

void SineWave::setFrequency ( StkFloat  frequency  ) 

Set the data interpolation rate based on a looping frequency.

This function determines the interpolation rate based on the file size and the current Stk::sampleRate. The frequency value corresponds to file cycles per second. The frequency can be negative, in which case the loop is read in reverse order.

Definition at line 42 of file SineWave.cpp.

References Stk::sampleRate(), and setRate().

Referenced by BlowBotl::BlowBotl(), BlowHole::BlowHole(), Bowed::Bowed(), Brass::Brass(), Chorus::Chorus(), Clarinet::Clarinet(), Saxofony::controlChange(), ModalBar::controlChange(), Flute::controlChange(), Clarinet::controlChange(), Brass::controlChange(), Bowed::controlChange(), BlowBotl::controlChange(), Flute::Flute(), FM::FM(), HevyMetl::HevyMetl(), Modal::Modal(), Modulate::Modulate(), Saxofony::Saxofony(), Chorus::setModFrequency(), FM::setModulationSpeed(), Modulate::setVibratoRate(), TubeBell::TubeBell(), Whistle::Whistle(), and Wurley::Wurley().

  // This is a looping frequency.
  this->setRate( TABLE_SIZE * frequency / Stk::sampleRate() );

Generated by  Doxygen 1.6.0   Back to index