1 /*----------------------------------------------------------------------------
2 ChucK Concurrent, On-the-fly Audio Programming Language
3 Compiler and Virtual Machine
5 Copyright (c) 2004 Ge Wang and Perry R. Cook. All rights reserved.
6 http://chuck.cs.princeton.edu/
7 http://soundlab.cs.princeton.edu/
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2 of the License, or
12 (at your option) any later version.
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
23 -----------------------------------------------------------------------------*/
25 //-----------------------------------------------------------------------------
29 // author: Ge Wang (gewang@cs.princeton.edu)
30 // Perry R. Cook (prc@cs.princeton.edu)
31 // Philip L. Davidson (philipd@alumni.princeton.edu)
33 //-----------------------------------------------------------------------------
34 #ifndef __UGEN_OSC_H__
35 #define __UGEN_OSC_H__
41 DLL_QUERY
osc_query( Chuck_DL_Query
* query
);
44 CK_DLL_CTOR( osc_ctor
);
45 CK_DLL_DTOR( osc_dtor
);
46 CK_DLL_TICK( osc_tick
);
47 CK_DLL_PMSG( osc_pmsg
);
48 CK_DLL_CTRL( osc_ctrl_freq
);
49 CK_DLL_CGET( osc_cget_freq
);
50 CK_DLL_CTRL( osc_ctrl_period
);
51 CK_DLL_CGET( osc_cget_period
);
52 CK_DLL_CTRL( osc_ctrl_phase
);
53 CK_DLL_CGET( osc_cget_phase
);
54 CK_DLL_CTRL( osc_ctrl_width
);
55 CK_DLL_CGET( osc_cget_width
);
56 CK_DLL_CTRL( osc_ctrl_sync
);
57 CK_DLL_CGET( osc_cget_sync
);
60 CK_DLL_TICK( sinosc_tick
);
63 CK_DLL_TICK( pulseosc_tick
);
66 CK_DLL_TICK( triosc_tick
);
69 CK_DLL_CTOR( sawosc_ctor
);
70 CK_DLL_CTRL( sawosc_ctrl_width
);
73 CK_DLL_CTOR( sqrosc_ctor
);
74 CK_DLL_CTRL( sqrosc_ctrl_width
);
77 //-----------------------------------------------------------------------------
79 // desc: thought it would be a good way to learn the fascinating innards of
80 // ChucK by porting some of the classic lookup table functions and adding
81 // a few new ones that might be of use.
82 // mostly ported from RTcmix (all by WarpTable)
84 // author: Dan Trueman (dtrueman.princeton.edu)
86 //-----------------------------------------------------------------------------
87 // called by xxx_query
88 DLL_QUERY
genX_query( Chuck_DL_Query
* query
);
91 CK_DLL_CTOR( genX_ctor
);
92 CK_DLL_DTOR( genX_dtor
);
93 CK_DLL_TICK( genX_tick
);
94 CK_DLL_PMSG( genX_pmsg
);
95 CK_DLL_CTRL( genX_lookup
);
96 CK_DLL_CTRL( genX_coeffs
);
97 CK_DLL_CTRL( gen5_coeffs
);
98 CK_DLL_CTRL( gen7_coeffs
);
99 CK_DLL_CTRL( gen9_coeffs
);
100 CK_DLL_CTRL( gen10_coeffs
);
101 CK_DLL_CTRL( gen17_coeffs
);
102 CK_DLL_CTRL( curve_coeffs
);
103 CK_DLL_CTRL( warp_coeffs
);
105 t_CKDOUBLE
_asymwarp( t_CKDOUBLE inval
, t_CKDOUBLE k
);
106 t_CKDOUBLE
_symwarp( t_CKDOUBLE inval
, t_CKDOUBLE k
);