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 UGEN_CTOR
osc_ctor( t_CKTIME now
);
45 UGEN_CTOR
phasor_ctor( t_CKTIME now
);
46 UGEN_DTOR
osc_dtor( t_CKTIME now
, void * data
);
47 UGEN_TICK
osc_tick( t_CKTIME now
, void * data
, SAMPLE in
, SAMPLE
* out
);
48 UGEN_TICK
osc_pmsg( t_CKTIME now
, void * data
, const char * msg
, void * value
);
49 UGEN_CTRL
osc_ctrl_freq( t_CKTIME now
, void * data
, void * value
);
50 UGEN_CGET
osc_cget_freq( t_CKTIME now
, void * data
, void * out
);
51 // sfreq & phase controls - pld
52 UGEN_CTRL
osc_ctrl_sfreq( t_CKTIME now
, void * data
, void * value
);
53 UGEN_CTRL
osc_ctrl_phase( t_CKTIME now
, void * data
, void * value
);
54 UGEN_CGET
osc_cget_phase( t_CKTIME now
, void * data
, void * out
);
55 UGEN_CTRL
osc_ctrl_phase_offset( t_CKTIME now
, void * data
, void * value
);
56 UGEN_CGET
osc_cget_phase_offset( t_CKTIME now
, void * data
, void * out
);
57 UGEN_CTRL
osc_ctrl_sync( t_CKTIME now
, void * data
, void * value
);
58 UGEN_CGET
osc_cget_sync( t_CKTIME now
, void * data
, void * out
);
59 UGEN_CTRL
osc_ctrl_width( t_CKTIME now
, void * data
, void * value
);
60 UGEN_CGET
osc_cget_width( t_CKTIME now
, void * data
, void * out
);
62 UGEN_TICK
sinosc_tick( t_CKTIME now
, void * data
, SAMPLE in
, SAMPLE
* out
);
63 UGEN_CTRL
sinosc_ctrl_phase( t_CKTIME now
, void * data
, void * value
);
64 UGEN_CGET
sinosc_cget_phase( t_CKTIME now
, void * data
, void * out
);
66 UGEN_TICK
triosc_tick( t_CKTIME now
, void * data
, SAMPLE in
, SAMPLE
* out
);
67 UGEN_TICK
sawosc_tick( t_CKTIME now
, void * data
, SAMPLE in
, SAMPLE
* out
);
68 UGEN_TICK
pulseosc_tick( t_CKTIME now
, void * data
, SAMPLE in
, SAMPLE
* out
);
69 UGEN_TICK
sqrosc_tick( t_CKTIME now
, void * data
, SAMPLE in
, SAMPLE
* out
);