~ubuntu-branches/ubuntu/quantal/muse/quantal

« back to all changes in this revision

Viewing changes to synti/stklib/Clarinet.h

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Kobras
  • Date: 2002-04-23 17:28:23 UTC
  • Revision ID: james.westby@ubuntu.com-20020423172823-w8yplzr81a759xa3
Tags: upstream-0.5.2
ImportĀ upstreamĀ versionĀ 0.5.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/******************************************/
 
2
/*  Clarinet model ala Smith              */
 
3
/*  after McIntyre, Schumacher, Woodhouse */
 
4
/*  by Perry Cook, 1995-96                */
 
5
/*                                        */
 
6
/*  This is a waveguide model, and thus   */
 
7
/*  relates to various Stanford Univ.     */
 
8
/*  and possibly Yamaha and other patents.*/
 
9
/*                                        */
 
10
/*   Controls:    CONTROL1 = reedStiffns  */
 
11
/*                CONTROL2 = noiseGain    */
 
12
/*                CONTROL3 = vibFreq      */
 
13
/*                MOD_WHEEL= vibAmt       */
 
14
/******************************************/
 
15
 
 
16
#if !defined(__Clarinet_h)
 
17
#define __Clarinet_h
 
18
 
 
19
#include "Instrmnt.h"
 
20
#include "DLineL.h"
 
21
#include "ReedTabl.h"
 
22
#include "OneZero.h"
 
23
#include "Envelope.h"
 
24
#include "Noise.h"
 
25
#include "RawWvIn.h"
 
26
 
 
27
class Clarinet : public Instrmnt
 
28
{
 
29
 protected:  
 
30
  DLineL *delayLine;
 
31
  ReedTabl *reedTable;
 
32
  OneZero *filter;
 
33
  Envelope *envelope;
 
34
  Noise *noise;
 
35
  RawWvIn *vibr;
 
36
  long length;
 
37
  MY_FLOAT outputGain;
 
38
  MY_FLOAT noiseGain;
 
39
  MY_FLOAT vibrGain;
 
40
 public:
 
41
  Clarinet(MY_FLOAT lowestFreq);
 
42
  ~Clarinet();
 
43
  void clear();
 
44
  virtual void setFreq(MY_FLOAT frequency);
 
45
  void startBlowing(MY_FLOAT amplitude,MY_FLOAT rate);
 
46
  void stopBlowing(MY_FLOAT rate);
 
47
  virtual void noteOn(MY_FLOAT freq, MY_FLOAT amp);
 
48
  virtual void noteOff(MY_FLOAT amp);
 
49
  virtual MY_FLOAT tick();
 
50
  virtual void controlChange(int number, MY_FLOAT value);
 
51
};
 
52
 
 
53
#endif