[Stk] Mandolin class

Gary Scavone gary@ccrma.Stanford.EDU
Sat, 15 Mar 2003 15:26:26 -0800 (PST)


Hi Liam,

I assume you got the instrument to work using the demo project?

After a quick pass through your program, it looks fine.  Perhaps the 
amplitude gain is a little low?  What sort of sound are you getting?  
If it's just noise, then perhaps you're missing the __LITTLE_ENDIAN__ 
preprocessor definition (needed by WvOut).

--gary

On Sat, 15 Mar 2003, Liam Kelly wrote:

>>Hi
>>
>>Firstly congratulations on a really helpful resource.  Have been getting
>>very much into the STK recently and being a newcomer to music DSP and
>>indeed C++ I have found it most accessible.  
>>
>>My main interests in the STK are the waveguide physical modelling
>>classes as I am currently writing a thesis on this.  I have been trying
>>to get the Mandolin commuted model going but have so far not managed to
>>produce anything sounding musical.  If anyone can help I would be very
>>grateful. My code is at the bottom.
>>
>>Also if anyone knows of any other resources of impulse responses for
>>commuted synthesis I would be *extremely* grateful as I hope to produce
>>a commuted waveguide synthesiser VST plugin as part of my project.
>>
>>Thanks for reading
>>
>>/***********************************************************************
>>**/
>>#include "WvOut.h"
>>#include "Mandolin.h"
>>
>>int main()
>>{
>>  // Set the global sample rate before creating class instances.
>>  Stk::setSampleRate( 44100.0 );
>>
>>  Mandolin *input = 0;
>>  WvOut *output = 0;
>>  MY_FLOAT frequency, amplitude;
>>
>>  try {
>>
>>	input = new Mandolin( 50 );
>>	output = new WvOut( "mandolin.wav", 1, WvOut::WVOUT_WAV,
>>Stk::STK_SINT16 );
>>
>>  }
>>  catch ( StkError & ) { goto cleanup; }
>>
>>  input->setBodySize(1.0);
>>  frequency = 100;
>>  amplitude = 0.1;
>>  input->noteOn(frequency, amplitude);
>>
>>  for ( int i=0; i<120000; i++ ) 
>>	{    	
>>		try {output->tick( (input->tick() ) ); }
>>    		catch ( StkError & ) { goto cleanup; } 
>>	}
>> cleanup:
>>  delete input;
>>  delete output;
>>  return 0;
>>}
>>_______________________________________________
>>Stk mailing list
>>Stk@ccrma.stanford.edu
>>http://ccrma-mail.stanford.edu/mailman/listinfo/stk
>>

-- 
-------------------------------------------------
Gary Scavone
Center for Computer Research in Music & Acoustics
Stanford University
gary@ccrma.stanford.edu
http://www-ccrma.stanford.edu/~gary/
-------------------------------------------------