You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
1.3KB

  1. /*! \page instruments Instruments
  2. The ToolKit comes with a wide variety of synthesis algorithms, all of which inherit from the stk::Instrmnt class. In this example, we'll fire up an instance of the stk::BeeThree FM synthesis class and show how its frequency can be modified over time.
  3. \include bethree.cpp
  4. We have used an Instrmnt pointer when referencing the BeeThree
  5. instance above, so it would be simple to replace the BeeThree class
  6. with any other STK instrument class. It should be noted, however,
  7. that a few classes do not respond to the setFrequency() function
  8. (e.g., Shakers, Drummer).
  9. The noteOn() function initiates an instrument attack. Instruments that are continuously excited (e.g., stk::Clarinet, stk::BeeThree) will continue to sound until stopped with a noteOff(). Impulsively excited instrument sounds (e.g., stk::Plucked, stk::Wurley) typically decay within a few seconds time, requiring subsequent noteOn() messages for re-attack.
  10. Instrument parameters can be precisely controlled as demonstrated above. A more flexible approach to instrument control, allowing arbitrary scorefile or realtime updates, is described in the next tutorial chapter.
  11. [<A HREF="tutorial.html">Main tutorial page</A>] &nbsp; [<A HREF="controlin.html">Next tutorial</A>]
  12. */