[Stk] help with stk fundamentals

Perry R Cook prc@CS.Princeton.EDU
Thu, 20 Mar 2003 20:36:15 -0500 (EST)


> I am a newbie to stk and digital signal processing
welcome

> 1. Whats the role of the sinewave.raw file ? what information does it
> contain and why does my stk based app need that file ?
It contains one cycle of sine wave, big-endian, signed 16 bit, headerless.
It is used to modulate the breath pressure, giving a breath vibrato
(tremolo) to the sound.  Check out the cases in the controlChange 
method of Flute that have to do with vibrato.  
 
> 2. My application uses the Flute class. Here are some specific problems I am facing.
> 	a. When I tri to play N notes one after the other in a sequence,
see below.

> 	b. Some low frequencies ( 130 > f < 440hz) dont play well, there
it's a physical model.  you might need to blow less hard for low notes
than high ones.  Check out the demo app, and play the flute using
the sliders, you'll get a better sense of this interactively.

> 	c. I am trying to produce the sounds of a "North Indian Flute",
> also called a "Bansuri". Is there any way I can add this sound to stk ?
> Or, is there any way to modify the sound of the Flute in the stk so that
> it sounds smoother ?
it's a very simple flute model, it can be made better, but that's up
to your research and experimentation.
 
> 3. What is the right way to produce notes using the Flute class ? I am
> currently using the wvout->tick(flute->tick()) method. But then whats is
> the use of the StartBlowing and StopBlowing methods ? They dont seem to
> be having any impact at all. Right now I need to first do a noteon, then
> the tick() in a loop and then noteoff followed by wvout->stop for each
> note. Is this the best approach ? Any suggestions, comments ?
StartBlowing and StopBlowing need to be followed by a large number of
tick() calls.  Just as a flute player, or any other human gesture, can't
start or stop instantaneously, the Start and Stop functions set the 
breath pressure envelope in motion (ramping up or down), and then time
has to pass for the flute to start or stop oscillation.  Also check out
the NoteOn and NoteOff functions, which perform the function of setting
pitch and beginning the process of blowing or stopping blowing.

PRC