1 /*
2     mandolin.h: mandolin model
3 
4     Copyright (C) 1997 John ffitch, Perry Cook
5 
6     This file is part of Csound.
7 
8     The Csound Library is free software; you can redistribute it
9     and/or modify it under the terms of the GNU Lesser General Public
10     License as published by the Free Software Foundation; either
11     version 2.1 of the License, or (at your option) any later version.
12 
13     Csound is distributed in the hope that it will be useful,
14     but WITHOUT ANY WARRANTY; without even the implied warranty of
15     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16     GNU Lesser General Public License for more details.
17 
18     You should have received a copy of the GNU Lesser General Public
19     License along with Csound; if not, write to the Free Software
20     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
21     02110-1301 USA
22 */
23 
24 /**********************************************************************/
25 /*  Commuted Mandolin Subclass of enhanced dual plucked-string model  */
26 /*  by Perry Cook, 1995-96                                            */
27 /*   Controls:  bodySize    pluckPosition       loopGain    deTuning  */
28 /*                                                                    */
29 /*  Note: Commuted Synthesis, as with many other WaveGuide techniques,*/
30 /*  is covered by patents, granted, pending, and/or applied-for.  All */
31 /*  are assigned to the Board of Trustees, Stanford University.       */
32 /*  For information, contact the Office of Technology Licensing,      */
33 /*  Stanford U.                                                       */
34 /**********************************************************************/
35 
36 #if !defined(__Mandolin_h)
37 #define __Mandolin_h
38 #include "clarinet.h"
39 #include "brass.h"
40 
41 typedef struct Mandolin {
42     OPDS        h;
43     MYFLT       *ar;                  /* Output */
44     MYFLT       *amp;
45     MYFLT       *frequency;
46     MYFLT       *pluckPos;
47     MYFLT       *detuning;
48     MYFLT       *baseLoopGain;
49     MYFLT       *s_rate;
50     MYFLT       *ifn;
51     MYFLT       *lowestFreq;
52 
53     FUNC        *soundfile;
54     MYFLT       s_time;
55     MYFLT       s_lastOutput;
56     DLineA      delayLine1;
57     DLineA      delayLine2;
58     DLineL      combDelay;
59     OneZero     filter1;
60     OneZero     filter2;
61     int32       length;
62     MYFLT       lastFreq;
63     MYFLT       lastLength;
64     int32       dampTime;
65     int32_t         waveDone;
66     int32_t
67     kloop;
68 } MANDOL;
69 
70 #endif
71