History

prep / some refactor for .dump() and .apropos() for all objects

Ge Wang committed 5 years ago

Commit a013b4c1 parent 8d5762c16 files · +1274 −1016Browse files

Unified · Split

16 files
  1. src/core/chuck_emit.cpp +2 −2
  2. src/core/chuck_io.cpp +19 −22
  3. src/core/chuck_lang.cpp +117 −88
  4. src/core/chuck_lang.h +2 −0
  5. src/core/chuck_oo.cpp +25 −0
  6. src/core/chuck_oo.h +9 −1
  7. src/core/chuck_scan.cpp +4 −4
  8. src/core/chuck_type.cpp +240 −0
  9. src/core/chuck_type.h +31 −79
  10. src/core/uana_xform.cpp +6 −6
  11. src/core/ugen_filter.cpp +62 −62
  12. src/core/ugen_osc.cpp +40 −39
  13. src/core/ugen_stk.cpp +600 −600
  14. src/core/ugen_xxx.cpp +88 −83
  15. src/core/ulib_opsc.cpp +1 −1
  16. src/core/ulib_std.cpp +28 −29
src/core/chuck_emit.cpp+2−2
@@ -3731,7 +3731,7 @@ t_CKBOOL emit_engine_emit_exp_dot_member( Chuck_Emitter * emit, · 3730 unmodified lines
3731 // make sure that the base type is object3731 // make sure that the base type is object
3732 assert( t_base->info != NULL );3732 assert( t_base->info != NULL );
3733 3733
3734 // if base is static3734 // if base is static?
3735 if( !base_static )3735 if( !base_static )
3736 {3736 {
3737 // if is a func3737 // if is a func
@@ -3810,7 +3810,7 @@ t_CKBOOL emit_engine_emit_exp_dot_member( Chuck_Emitter * emit, · 72 unmodified lines
3810 // emit the type3810 // emit the type
3811 // commented out so built-in static member variables don't have an 3811 // commented out so built-in static member variables don't have an
3812 // extra thing on the stack - spencer3812 // extra thing on the stack - spencer
3813 //emit->append( new Chuck_Instr_Reg_Push_Imm( (t_CKUINT)t_base ) );3813 // emit->append( new Chuck_Instr_Reg_Push_Imm( (t_CKUINT)t_base ) );
3814 3814
3815 // if is a func3815 // if is a func
3816 if( isfunc( emit->env, member->self->type ) )3816 if( isfunc( emit->env, member->self->type ) )
src/core/chuck_io.cpp+19−22
@@ -90,7 +90,7 @@ t_CKBOOL init_class_io( Chuck_Env * env, Chuck_Type * type ) · 89 unmodified lines
90 Chuck_DL_Func * func = NULL;90 Chuck_DL_Func * func = NULL;
91 91
92 // log92 // log
93 EM_log( CK_LOG_SEVERE, "class 'io'" );93 EM_log( CK_LOG_SEVERE, "class 'IO'" );
94 94
95 // init as base class95 // init as base class
96 // TODO: ctor/dtor?96 // TODO: ctor/dtor?
@@ -230,7 +230,7 @@ t_CKBOOL init_class_fileio( Chuck_Env * env, Chuck_Type * type ) · 133 unmodified lines
230 Chuck_DL_Func * func = NULL;230 Chuck_DL_Func * func = NULL;
231 231
232 // log232 // log
233 EM_log( CK_LOG_SEVERE, "class 'fileio'" );233 EM_log( CK_LOG_SEVERE, "class 'FileIO'" );
234 234
235 // init as base class235 // init as base class
236 // TODO: ctor/dtor?236 // TODO: ctor/dtor?
@@ -4108,7 +4108,7 @@ t_CKBOOL init_class_serialio( Chuck_Env * env ) · 3871 unmodified lines
4108 // log4108 // log
4109 EM_log( CK_LOG_SEVERE, "class 'SerialIO'" );4109 EM_log( CK_LOG_SEVERE, "class 'SerialIO'" );
4110 4110
4111 std::string doc = "Handles reading and writing for serial input/output devices, such as Arduino.";4111 std::string doc = "serial input/output. popularly used to communicate with systems like Arduino.";
4112 4112
4113 Chuck_Type * type = type_engine_import_class_begin( env, "SerialIO", "IO",4113 Chuck_Type * type = type_engine_import_class_begin( env, "SerialIO", "IO",
4114 env->global(), serialio_ctor, serialio_dtor, doc.c_str() );4114 env->global(), serialio_ctor, serialio_dtor, doc.c_str() );
@@ -4121,14 +4121,14 @@ t_CKBOOL init_class_serialio( Chuck_Env * env ) · 6 unmodified lines
4121 4121
4122 // add list()4122 // add list()
4123 func = make_new_sfun( "string[]", "list", serialio_list );4123 func = make_new_sfun( "string[]", "list", serialio_list );
4124 func->doc = "Return list of available serial devices.";4124 func->doc = "get list of available serial devices.";
4125 if( !type_engine_import_sfun( env, func ) ) goto error;4125 if( !type_engine_import_sfun( env, func ) ) goto error;
4126 4126
4127 func = make_new_mfun("int", "open", serialio_open);4127 func = make_new_mfun("int", "open", serialio_open);
4128 func->add_arg("int", "i");4128 func->add_arg("int", "i");
4129 func->add_arg("int", "baud");4129 func->add_arg("int", "baud");
4130 func->add_arg("int", "mode");4130 func->add_arg("int", "mode");
4131 func->doc = "Open serial device i with specified baud rate and mode (binary or ASCII).";4131 func->doc = "open serial device i with specified baud rate and mode (binary or ASCII).";
4132 if( !type_engine_import_mfun( env, func ) ) goto error;4132 if( !type_engine_import_mfun( env, func ) ) goto error;
4133 4133
4134 func = make_new_mfun("void", "close", serialio_close);4134 func = make_new_mfun("void", "close", serialio_close);
@@ -4144,78 +4144,78 @@ t_CKBOOL init_class_serialio( Chuck_Env * env ) · 9 unmodified lines
4144 4144
4145 // add onLine4145 // add onLine
4146 func = make_new_mfun("SerialIO", "onLine", serialio_onLine);4146 func = make_new_mfun("SerialIO", "onLine", serialio_onLine);
4147 func->doc = "Wait for one line (ASCII mode only).";4147 func->doc = "wait for one line (ASCII mode only).";
4148 if( !type_engine_import_mfun( env, func ) ) goto error;4148 if( !type_engine_import_mfun( env, func ) ) goto error;
4149 4149
4150 // add onByte4150 // add onByte
4151 func = make_new_mfun("SerialIO", "onByte", serialio_onByte);4151 func = make_new_mfun("SerialIO", "onByte", serialio_onByte);
4152 func->doc = "Wait for one byte (binary mode only).";4152 func->doc = "wait for one byte (binary mode only).";
4153 if( !type_engine_import_mfun( env, func ) ) goto error;4153 if( !type_engine_import_mfun( env, func ) ) goto error;
4154 4154
4155 // add onBytes4155 // add onBytes
4156 func = make_new_mfun("SerialIO", "onBytes", serialio_onBytes);4156 func = make_new_mfun("SerialIO", "onBytes", serialio_onBytes);
4157 func->add_arg("int", "num");4157 func->add_arg("int", "num");
4158 func->doc = "Wait for requested number of bytes (binary mode only).";4158 func->doc = "wait for requested number of bytes (binary mode only).";
4159 if( !type_engine_import_mfun( env, func ) ) goto error;4159 if( !type_engine_import_mfun( env, func ) ) goto error;
4160 4160
4161 // add onInts4161 // add onInts
4162 func = make_new_mfun("SerialIO", "onInts", serialio_onInts);4162 func = make_new_mfun("SerialIO", "onInts", serialio_onInts);
4163 func->add_arg("int", "num");4163 func->add_arg("int", "num");
4164 func->doc = "Wait for requested number of ints (ASCII or binary mode).";4164 func->doc = "wait for requested number of ints (ASCII or binary mode).";
4165 if( !type_engine_import_mfun( env, func ) ) goto error;4165 if( !type_engine_import_mfun( env, func ) ) goto error;
4166 4166
4167 // add onInts4167 // add onInts
4168 func = make_new_mfun("SerialIO", "onFloats", serialio_onFloats);4168 func = make_new_mfun("SerialIO", "onFloats", serialio_onFloats);
4169 func->add_arg("int", "num");4169 func->add_arg("int", "num");
4170 func->doc = "Wait for requested number of floats (ASCII or binary mode).";4170 func->doc = "wait for requested number of floats (ASCII or binary mode).";
4171 if( !type_engine_import_mfun( env, func ) ) goto error;4171 if( !type_engine_import_mfun( env, func ) ) goto error;
4172 4172
4173 // add getLine4173 // add getLine
4174 func = make_new_mfun("string", "getLine", serialio_getLine);4174 func = make_new_mfun("string", "getLine", serialio_getLine);
4175 func->doc = "Get next requested line.";4175 func->doc = "get next requested line.";
4176 if( !type_engine_import_mfun( env, func ) ) goto error;4176 if( !type_engine_import_mfun( env, func ) ) goto error;
4177 4177
4178 // add getByte4178 // add getByte
4179 func = make_new_mfun("int", "getByte", serialio_getByte);4179 func = make_new_mfun("int", "getByte", serialio_getByte);
4180 func->doc = "Get next requested byte. ";4180 func->doc = "get next requested byte. ";
4181 if( !type_engine_import_mfun( env, func ) ) goto error;4181 if( !type_engine_import_mfun( env, func ) ) goto error;
4182 4182
4183 // add getBytes4183 // add getBytes
4184 func = make_new_mfun("int[]", "getBytes", serialio_getBytes);4184 func = make_new_mfun("int[]", "getBytes", serialio_getBytes);
4185 func->doc = "Get next requested number of bytes. ";4185 func->doc = "get next requested number of bytes. ";
4186 if( !type_engine_import_mfun( env, func ) ) goto error;4186 if( !type_engine_import_mfun( env, func ) ) goto error;
4187 4187
4188 // add getInts4188 // add getInts
4189 func = make_new_mfun("int[]", "getInts", serialio_getInts);4189 func = make_new_mfun("int[]", "getInts", serialio_getInts);
4190 func->doc = "Get next requested number of integers. ";4190 func->doc = "get next requested number of integers. ";
4191 if( !type_engine_import_mfun( env, func ) ) goto error;4191 if( !type_engine_import_mfun( env, func ) ) goto error;
4192 4192
4193 // add writeByte4193 // add writeByte
4194 func = make_new_mfun("void", "writeByte", serialio_writeByte);4194 func = make_new_mfun("void", "writeByte", serialio_writeByte);
4195 func->add_arg("int", "b");4195 func->add_arg("int", "b");
4196 func->doc = "Write a single byte.";4196 func->doc = "write a single byte.";
4197 if( !type_engine_import_mfun( env, func ) ) goto error;4197 if( !type_engine_import_mfun( env, func ) ) goto error;
4198 4198
4199 // add writeBytes4199 // add writeBytes
4200 func = make_new_mfun("void", "writeBytes", serialio_writeBytes);4200 func = make_new_mfun("void", "writeBytes", serialio_writeBytes);
4201 func->add_arg("int[]", "b");4201 func->add_arg("int[]", "b");
4202 func->doc = "Write array of bytes.";4202 func->doc = "write array of bytes.";
4203 if( !type_engine_import_mfun( env, func ) ) goto error;4203 if( !type_engine_import_mfun( env, func ) ) goto error;
4204 4204
4205 // add setBaudRate4205 // add setBaudRate
4206 func = make_new_mfun("int", "baudRate", serialio_setBaudRate);4206 func = make_new_mfun("int", "baudRate", serialio_setBaudRate);
4207 func->add_arg("int", "r");4207 func->add_arg("int", "r");
4208 func->doc = "Set baud rate.";4208 func->doc = "set baud rate.";
4209 if( !type_engine_import_mfun( env, func ) ) goto error;4209 if( !type_engine_import_mfun( env, func ) ) goto error;
4210 4210
4211 // add getBaudRate4211 // add getBaudRate
4212 func = make_new_mfun("int", "baudRate", serialio_getBaudRate);4212 func = make_new_mfun("int", "baudRate", serialio_getBaudRate);
4213 func->doc = "Get current baud rate.";4213 func->doc = "get current baud rate.";
4214 if( !type_engine_import_mfun( env, func ) ) goto error;4214 if( !type_engine_import_mfun( env, func ) ) goto error;
4215 4215
4216 // add getBaudRate4216 // add getBaudRate
4217 func = make_new_mfun("void", "flush", serialio_flush);4217 func = make_new_mfun("void", "flush", serialio_flush);
4218 func->doc = "Flush the IO buffer.";4218 func->doc = "flush the IO buffer.";
4219 if( !type_engine_import_mfun( env, func ) ) goto error;4219 if( !type_engine_import_mfun( env, func ) ) goto error;
4220 4220
4221 // add can_wait4221 // add can_wait
@@ -4458,6 +4458,3 @@ CK_DLL_MFUN(serialio_canWait) · 236 unmodified lines
4458}4458}
4459 4459
4460#endif // __DISABLE_SERIAL__4460#endif // __DISABLE_SERIAL__
4461
4462
4463
src/core/chuck_lang.cpp+117−88
@@ -63,9 +63,9 @@ t_CKBOOL init_class_object( Chuck_Env * env, Chuck_Type * type ) · 62 unmodified lines
63 Chuck_DL_Func * func = NULL;63 Chuck_DL_Func * func = NULL;
64 64
65 // log65 // log
66 EM_log( CK_LOG_SEVERE, "class 'object'" );66 EM_log( CK_LOG_SEVERE, "class 'Object'" );
67 67
68 const char * doc = "Base class for all class types in ChucK.";68 const char * doc = "base class for all class types in ChucK.";
69 69
70 // init as base class70 // init as base class
71 if( !type_engine_import_class_begin( env, type, env->global(), object_ctor, object_dtor, doc ) )71 if( !type_engine_import_class_begin( env, type, env->global(), object_ctor, object_dtor, doc ) )
@@ -77,7 +77,17 @@ t_CKBOOL init_class_object( Chuck_Env * env, Chuck_Type * type ) · 5 unmodified lines
77 77
78 // add toString()78 // add toString()
79 func = make_new_mfun( "string", "toString", object_toString );79 func = make_new_mfun( "string", "toString", object_toString );
80 func->doc = "Return a textual description of this object.";80 func->doc = "get a textual description of this object.";
81 if( !type_engine_import_mfun( env, func ) ) goto error;
82
83 // add dump()
84 func = make_new_mfun( "void", "dump", object_dump );
85 func->doc = "output current state of the object as text.";
86 if( !type_engine_import_mfun( env, func ) ) goto error;
87
88 // add api()
89 func = make_new_mfun( "void", "apropos", object_apropos );
90 func->doc = "output information about the object's type.";
81 if( !type_engine_import_mfun( env, func ) ) goto error;91 if( !type_engine_import_mfun( env, func ) ) goto error;
82 92
83 // end the class import93 // end the class import
@@ -104,7 +114,7 @@ t_CKBOOL init_class_ugen( Chuck_Env * env, Chuck_Type * type ) · 20 unmodified lines
104{114{
105 Chuck_DL_Func * func = NULL;115 Chuck_DL_Func * func = NULL;
106 116
107 EM_log( CK_LOG_SEVERE, "class 'ugen'" );117 EM_log( CK_LOG_SEVERE, "class 'UGen'" );
108 118
109 // add ugen info119 // add ugen info
110 type->ugen_info = new Chuck_UGen_Info;120 type->ugen_info = new Chuck_UGen_Info;
@@ -113,7 +123,7 @@ t_CKBOOL init_class_ugen( Chuck_Env * env, Chuck_Type * type ) · 2 unmodified lines
113 type->ugen_info->num_ins = 1;123 type->ugen_info->num_ins = 1;
114 type->ugen_info->num_outs = 1;124 type->ugen_info->num_outs = 1;
115 125
116 const char * doc = "Base class for all UGen types in ChucK.";126 const char * doc = "base class for all unit generator (UGen) types in ChucK.";
117 127
118 // init as base class128 // init as base class
119 // TODO: ctor/dtor, ugen's sometimes created internally?129 // TODO: ctor/dtor, ugen's sometimes created internally?
@@ -123,10 +133,10 @@ t_CKBOOL init_class_ugen( Chuck_Env * env, Chuck_Type * type ) · 3 unmodified lines
123 // gain133 // gain
124 func = make_new_mfun( "float", "gain", ugen_gain );134 func = make_new_mfun( "float", "gain", ugen_gain );
125 func->add_arg( "float", "val" );135 func->add_arg( "float", "val" );
126 func->doc = "Set the gain of the ugen.";136 func->doc = "set the gain of the unit generator.";
127 if( !type_engine_import_mfun( env, func ) ) goto error;137 if( !type_engine_import_mfun( env, func ) ) goto error;
128 func = make_new_mfun( "float", "gain", ugen_cget_gain );138 func = make_new_mfun( "float", "gain", ugen_cget_gain );
129 func->doc = "Return the gain of the ugen.";139 func->doc = "get the gain of the unit generator.";
130 if( !type_engine_import_mfun( env, func ) ) goto error;140 if( !type_engine_import_mfun( env, func ) ) goto error;
131 141
132/* // next142/* // next
@@ -138,46 +148,46 @@ t_CKBOOL init_class_ugen( Chuck_Env * env, Chuck_Type * type ) · 5 unmodified lines
138*/148*/
139 // last149 // last
140 func = make_new_mfun( "float", "last", ugen_last );150 func = make_new_mfun( "float", "last", ugen_last );
141 func->doc = "Return the last sample value of the unit generator.";151 func->doc = "get the last sample value of the unit generator.";
142 if( !type_engine_import_mfun( env, func ) ) goto error;152 if( !type_engine_import_mfun( env, func ) ) goto error;
143 153
144 // op154 // op
145 func = make_new_mfun( "int", "op", ugen_op );155 func = make_new_mfun( "int", "op", ugen_op );
146 func->add_arg( "int", "val" );156 func->add_arg( "int", "val" );
147 func->doc = "Set the ugen's operation mode. Accepted values are: 1 (sum inputs), 2 (take difference between first input and subsequent inputs), 3 (multiply inputs), 4 (divide first input by subsequent inputs), 0 (do not synthesize audio, output 0) or -1 (passthrough inputs to output).";157 func->doc = "set the unit generator's operation mode. Accepted values are: 1 (sum inputs), 2 (take difference between first input and subsequent inputs), 3 (multiply inputs), 4 (divide first input by subsequent inputs), 0 (do not synthesize audio, output 0) or -1 (passthrough inputs to output).";
148 if( !type_engine_import_mfun( env, func ) ) goto error;158 if( !type_engine_import_mfun( env, func ) ) goto error;
149 func = make_new_mfun( "int", "op", ugen_cget_op );159 func = make_new_mfun( "int", "op", ugen_cget_op );
150 func->doc = "Return the ugen's operation mode.";160 func->doc = "get the unit generator's operation mode.";
151 if( !type_engine_import_mfun( env, func ) ) goto error;161 if( !type_engine_import_mfun( env, func ) ) goto error;
152 162
153 // add numChannels163 // add numChannels
154 func = make_new_mfun( "int", "channels", ugen_numChannels );164 func = make_new_mfun( "int", "channels", ugen_numChannels );
155 func->add_arg( "int", "num" );165 func->add_arg( "int", "num" );
156 func->doc = "Set number of channels. (Not currently supported.)";166 func->doc = "set number of channels. (currently NOT supported)";
157 if( !type_engine_import_mfun( env, func ) ) goto error;167 if( !type_engine_import_mfun( env, func ) ) goto error;
158 func = make_new_mfun( "int", "channels", ugen_cget_numChannels );168 func = make_new_mfun( "int", "channels", ugen_cget_numChannels );
159 func->doc = "Return number of channels.";169 func->doc = "get number of channels.";
160 if( !type_engine_import_mfun( env, func ) ) goto error;170 if( !type_engine_import_mfun( env, func ) ) goto error;
161 171
162 // add chan172 // add chan
163 func = make_new_mfun( "UGen", "chan", ugen_chan );173 func = make_new_mfun( "UGen", "chan", ugen_chan );
164 func->add_arg( "int", "num" );174 func->add_arg( "int", "num" );
165 func->doc = "Return channel at specified index.";175 func->doc = "get channel (as a UGen) at specified index.";
166 if( !type_engine_import_mfun( env, func ) ) goto error;176 if( !type_engine_import_mfun( env, func ) ) goto error;
167 177
168 // add isConnectedTo178 // add isConnectedTo
169 func = make_new_mfun( "int", "isConnectedTo", ugen_connected );179 func = make_new_mfun( "int", "isConnectedTo", ugen_connected );
170 func->add_arg( "UGen", "right" );180 func->add_arg( "UGen", "right" );
171 func->doc = "Return true if this ugen's output is connected to the input of the argument. Return false otherwise. ";181 func->doc = "return true if this UGen's output is connected to the input of the argument; return false otherwise.";
172 if( !type_engine_import_mfun( env, func ) ) goto error;182 if( !type_engine_import_mfun( env, func ) ) goto error;
173 183
174 // add buffered184 // add buffered
175 func = make_new_mfun( "int", "buffered", ugen_buffered );185 func = make_new_mfun( "int", "buffered", ugen_buffered );
176 func->add_arg( "int", "val" );186 func->add_arg( "int", "val" );
177 func->doc = "Set the ugen's buffered operation mode. If true, the ugen stores a buffer of its most recent samples, which can be fetched using global variables in the host language.";187 func->doc = "set the unit generator's buffered operation mode, typically used externally from hosts that embed ChucK as a component. If true, the UGen stores a buffer of its most recent samples, which can be fetched using global variables in the host language.";
178 if( !type_engine_import_mfun( env, func ) ) goto error;188 if( !type_engine_import_mfun( env, func ) ) goto error;
179 func = make_new_mfun( "int", "buffered", ugen_cget_buffered );189 func = make_new_mfun( "int", "buffered", ugen_cget_buffered );
180 func->doc = "Return the ugen's buffered operation mode.";190 func->doc = "get the ugen's buffered operation mode.";
181 if( !type_engine_import_mfun( env, func ) ) goto error;191 if( !type_engine_import_mfun( env, func ) ) goto error;
182 192
183 // end193 // end
@@ -206,7 +216,7 @@ t_CKBOOL init_class_uana( Chuck_Env * env, Chuck_Type * type ) · 22 unmodified lines
206{216{
207 Chuck_DL_Func * func = NULL;217 Chuck_DL_Func * func = NULL;
208 218
209 EM_log( CK_LOG_SEVERE, "class 'uana'" );219 EM_log( CK_LOG_SEVERE, "class 'UAna'" );
210 220
211 // add uana info221 // add uana info
212 type->ugen_info = new Chuck_UGen_Info;222 type->ugen_info = new Chuck_UGen_Info;
@@ -215,7 +225,7 @@ t_CKBOOL init_class_uana( Chuck_Env * env, Chuck_Type * type ) · 2 unmodified lines
215 type->ugen_info->num_ins = 1;225 type->ugen_info->num_ins = 1;
216 type->ugen_info->num_outs = 1;226 type->ugen_info->num_outs = 1;
217 227
218 const char * doc = "Base class from which all unit analyzers (UAnae) inherit; UAnae (note plural form) can be interconnected via => (standard chuck operator) or via =^ (upchuck operator), specify the the types of and when data is passed between UAnae and UGens. When .upchuck() is invoked on a given UAna, the UAna-chain (UAnae connected via =^) is traversed backwards from the upchucked UAna, and analysis is performed at each UAna along the chain; the updated analysis results are stored in UAnaBlobs.";228 const char * doc = "base class from which all unit analyzer (UAna) type inherit; UAnae (note plural form) can be interconnected using => (standard chuck operator) or using =^ (upchuck operator), specify the the types of and when data is passed between UAnae and UGens. When .upchuck() is invoked on a given UAna, the UAna-chain (UAnae connected via =^) is traversed backwards from the upchucked UAna, and analysis is performed at each UAna along the chain; the updated analysis results are stored in UAnaBlobs.";
219 229
220 // init as base class, type should already know the parent type230 // init as base class, type should already know the parent type
221 // TODO: ctor/dtor, ugen's sometimes created internally?231 // TODO: ctor/dtor, ugen's sometimes created internally?
@@ -228,35 +238,35 @@ t_CKBOOL init_class_uana( Chuck_Env * env, Chuck_Type * type ) · 6 unmodified lines
228 238
229 // add upchuck239 // add upchuck
230 func = make_new_mfun( "UAnaBlob", "upchuck", uana_upchuck );240 func = make_new_mfun( "UAnaBlob", "upchuck", uana_upchuck );
231 func->doc = "Initiate analysis at the UAna; returns result.";241 func->doc = "initiate analysis at the UAna and return result.";
232 if( !type_engine_import_mfun( env, func ) ) goto error;242 if( !type_engine_import_mfun( env, func ) ) goto error;
233 243
234 // add fvals244 // add fvals
235 func = make_new_mfun( "float[]", "fvals", uana_fvals );245 func = make_new_mfun( "float[]", "fvals", uana_fvals );
236 func->doc = "Get blob's float array.";246 func->doc = "get blob's float array.";
237 if( !type_engine_import_mfun( env, func ) ) goto error;247 if( !type_engine_import_mfun( env, func ) ) goto error;
238 248
239 // add cvals249 // add cvals
240 func = make_new_mfun( "complex[]", "cvals", uana_cvals );250 func = make_new_mfun( "complex[]", "cvals", uana_cvals );
241 func->doc = "Get blob's complex array.";251 func->doc = "get blob's complex array.";
242 if( !type_engine_import_mfun( env, func ) ) goto error;252 if( !type_engine_import_mfun( env, func ) ) goto error;
243 253
244 // add fval254 // add fval
245 func = make_new_mfun( "float", "fval", uana_fval );255 func = make_new_mfun( "float", "fval", uana_fval );
246 func->add_arg( "int", "index" );256 func->add_arg( "int", "index" );
247 func->doc = "Get blob's float value at index.";257 func->doc = "get blob's float value at index.";
248 if( !type_engine_import_mfun( env, func ) ) goto error;258 if( !type_engine_import_mfun( env, func ) ) goto error;
249 259
250 // add cval260 // add cval
251 func = make_new_mfun( "complex", "cval", uana_cval );261 func = make_new_mfun( "complex", "cval", uana_cval );
252 func->add_arg( "int", "index" );262 func->add_arg( "int", "index" );
253 func->doc = "Get blob's complex value at index.";263 func->doc = "get blob's complex value at index.";
254 if( !type_engine_import_mfun( env, func ) ) goto error;264 if( !type_engine_import_mfun( env, func ) ) goto error;
255 265
256 // add isUpConnectedTo266 // add isUpConnectedTo
257 func = make_new_mfun( "int", "isUpConnectedTo", uana_connected );267 func = make_new_mfun( "int", "isUpConnectedTo", uana_connected );
258 func->add_arg( "UAna", "right" );268 func->add_arg( "UAna", "right" );
259 func->doc = "Is connected to another uana via =^?";269 func->doc = "is connected to another uana via =^?";
260 if( !type_engine_import_mfun( env, func ) ) goto error;270 if( !type_engine_import_mfun( env, func ) ) goto error;
261 271
262 // TODO: add nonchuck272 // TODO: add nonchuck
@@ -297,9 +307,9 @@ t_CKBOOL init_class_blob( Chuck_Env * env, Chuck_Type * type ) · 34 unmodified lines
297 // Chuck_Value * value = NULL;307 // Chuck_Value * value = NULL;
298 308
299 // log309 // log
300 EM_log( CK_LOG_SEVERE, "class 'uanablob'" );310 EM_log( CK_LOG_SEVERE, "class 'UAnaBlob'" );
301 311
302 const char * doc = "This object contains results associated with UAna analysis. There is a UAnaBlob associated with every UAna. As a UAna is upchucked, the result is stored in the UAnaBlob's floating point vector and/or complex vector. The intended interpretation of the results depends on the specific UAna.";312 const char * doc = "contains results associated with UAna analysis. There is a UAnaBlob associated with every UAna. As a UAna is upchucked, the result is stored in the UAnaBlob's floating point vector and/or complex vector. The intended interpretation of the results depends on the specific UAna.";
303 313
304 // init class314 // init class
305 // TODO: ctor/dtor315 // TODO: ctor/dtor
@@ -316,29 +326,29 @@ t_CKBOOL init_class_blob( Chuck_Env * env, Chuck_Type * type ) · 10 unmodified lines
316 326
317 // add when327 // add when
318 func = make_new_mfun( "time", "when", uanablob_when );328 func = make_new_mfun( "time", "when", uanablob_when );
319 func->doc = "Get the time when blob was last upchucked.";329 func->doc = "get the time when blob was last upchucked.";
320 if( !type_engine_import_mfun( env, func ) ) goto error;330 if( !type_engine_import_mfun( env, func ) ) goto error;
321 331
322 // add fvals332 // add fvals
323 func = make_new_mfun( "float[]", "fvals", uanablob_fvals );333 func = make_new_mfun( "float[]", "fvals", uanablob_fvals );
324 func->doc = "Get blob's float array.";334 func->doc = "get blob's float array.";
325 if( !type_engine_import_mfun( env, func ) ) goto error;335 if( !type_engine_import_mfun( env, func ) ) goto error;
326 336
327 // add cvals337 // add cvals
328 func = make_new_mfun( "complex[]", "cvals", uanablob_cvals );338 func = make_new_mfun( "complex[]", "cvals", uanablob_cvals );
329 func->doc = "Get blob's complex array.";339 func->doc = "get blob's complex array.";
330 if( !type_engine_import_mfun( env, func ) ) goto error;340 if( !type_engine_import_mfun( env, func ) ) goto error;
331 341
332 // add fval342 // add fval
333 func = make_new_mfun( "float", "fval", uanablob_fval );343 func = make_new_mfun( "float", "fval", uanablob_fval );
334 func->add_arg( "int", "index" );344 func->add_arg( "int", "index" );
335 func->doc = "Get blob's float value at index.";345 func->doc = "get blob's float value at index.";
336 if( !type_engine_import_mfun( env, func ) ) goto error;346 if( !type_engine_import_mfun( env, func ) ) goto error;
337 347
338 // add cval348 // add cval
339 func = make_new_mfun( "complex", "cval", uanablob_cval );349 func = make_new_mfun( "complex", "cval", uanablob_cval );
340 func->add_arg( "int", "index" );350 func->add_arg( "int", "index" );
341 func->doc = "Get blob's complex value at index.";351 func->doc = "get blob's complex value at index.";
342 if( !type_engine_import_mfun( env, func ) ) goto error;352 if( !type_engine_import_mfun( env, func ) ) goto error;
343 353
344 // end class import354 // end class import
@@ -370,9 +380,9 @@ t_CKBOOL init_class_event( Chuck_Env * env, Chuck_Type * type ) · 25 unmodified lines
370 Chuck_Value * value = NULL;380 Chuck_Value * value = NULL;
371 381
372 // log382 // log
373 EM_log( CK_LOG_SEVERE, "class 'event'" );383 EM_log( CK_LOG_SEVERE, "class 'Event'" );
374 384
375 const char *doc = "The Event class allows exact synchronization across an arbitrary number of shreds.";385 const char *doc = "a mechanism for precise synchronization across shreds.";
376 386
377 // init as base class387 // init as base class
378 // TODO: ctor/dtor?388 // TODO: ctor/dtor?
@@ -381,23 +391,23 @@ t_CKBOOL init_class_event( Chuck_Env * env, Chuck_Type * type ) · 2 unmodified lines
381 391
382 // add signal()392 // add signal()
383 func = make_new_mfun( "void", "signal", event_signal );393 func = make_new_mfun( "void", "signal", event_signal );
384 func->doc = "Signal one shred that is waiting on this event. ";394 func->doc = "signal one shred that is waiting on this event.";
385 if( !type_engine_import_mfun( env, func ) ) goto error;395 if( !type_engine_import_mfun( env, func ) ) goto error;
386 396
387 // add broadcast()397 // add broadcast()
388 func = make_new_mfun( "void", "broadcast", event_broadcast );398 func = make_new_mfun( "void", "broadcast", event_broadcast );
389 func->doc = "Signal all shreds that are waiting on this event.";399 func->doc = "signal all shreds that are waiting on this event.";
390 if( !type_engine_import_mfun( env, func ) ) goto error;400 if( !type_engine_import_mfun( env, func ) ) goto error;
391 401
392 // add wait()402 // add wait()
393 func = make_new_mfun( "void", "wait", event_wait );403 func = make_new_mfun( "void", "wait", event_wait );
394 func->add_arg( "Shred", "me" );404 func->add_arg( "Shred", "me" );
395 func->doc = "(Currently unsupported.)";405 func->doc = "(currently unsupported)";
396 if( !type_engine_import_mfun( env, func ) ) goto error;406 if( !type_engine_import_mfun( env, func ) ) goto error;
397 407
398 // add can_wait()408 // add can_wait()
399 func = make_new_mfun( "int", "can_wait", event_can_wait );409 func = make_new_mfun( "int", "can_wait", event_can_wait );
400 func->doc = "Whether or not the event can be waited on. Currently always returns true.";410 func->doc = "can the event can be waited on? Currently always returns true.";
401 if( !type_engine_import_mfun( env, func ) ) goto error;411 if( !type_engine_import_mfun( env, func ) ) goto error;
402 412
403 // end the class import413 // end the class import
@@ -434,9 +444,9 @@ t_CKBOOL init_class_shred( Chuck_Env * env, Chuck_Type * type ) · 30 unmodified lines
434 Chuck_DL_Func * func = NULL;444 Chuck_DL_Func * func = NULL;
435 445
436 // log446 // log
437 EM_log( CK_LOG_SEVERE, "class 'shred'" );447 EM_log( CK_LOG_SEVERE, "class 'Shred'" );
438 448
439 const char *doc = "Shred facilitates various operations and interactions with shreds running in the ChucK virtual machine.";449 const char *doc = "a strongly-timed ChucK thread of execution.";
440 450
441 // init as base class451 // init as base class
442 // TODO: ctor/dtor?452 // TODO: ctor/dtor?
@@ -449,7 +459,7 @@ t_CKBOOL init_class_shred( Chuck_Env * env, Chuck_Type * type ) · 6 unmodified lines
449 // add fromId()459 // add fromId()
450 func = make_new_sfun( "Shred", "fromId", shred_fromId );460 func = make_new_sfun( "Shred", "fromId", shred_fromId );
451 func->add_arg( "int", "id" );461 func->add_arg( "int", "id" );
452 func->doc = "Return a Shred object corresponding to the provided shred ID.";462 func->doc = "get Shred corresponding to a Shred ID.";
453 if( !type_engine_import_sfun( env, func ) ) goto error;463 if( !type_engine_import_sfun( env, func ) ) goto error;
454 464
455 // add clone()465 // add clone()
@@ -458,27 +468,27 @@ t_CKBOOL init_class_shred( Chuck_Env * env, Chuck_Type * type ) · 2 unmodified lines
458 468
459 // add exit()469 // add exit()
460 func = make_new_mfun( "void", "exit", shred_exit );470 func = make_new_mfun( "void", "exit", shred_exit );
461 func->doc = "Immediately halt the shred's operation and remove it from the virtual machine.";471 func->doc = "halt the shred's operation and remove it from the virtual machine.";
462 if( !type_engine_import_mfun( env, func ) ) goto error;472 if( !type_engine_import_mfun( env, func ) ) goto error;
463 473
464 // add id()474 // add id()
465 func = make_new_mfun( "int", "id", shred_id );475 func = make_new_mfun( "int", "id", shred_id );
466 func->doc = "Return the unique numeric id of the shred.";476 func->doc = "get the unique numeric id of the Shred.";
467 if( !type_engine_import_mfun( env, func ) ) goto error;477 if( !type_engine_import_mfun( env, func ) ) goto error;
468 478
469 // add yield()479 // add yield()
470 func = make_new_mfun( "void", "yield", shred_yield );480 func = make_new_mfun( "void", "yield", shred_yield );
471 func->doc = "Cause the shred to temporarily stop processing, allowing other scheduled shreds to run as needed.";481 func->doc = "cause the current Shred to temporarily suspend without advancing time, allowing other simultaneously schreduled shreds to run as needed. NOTE: yield() is equivalent to '0::second +=> now;'";
472 if( !type_engine_import_mfun( env, func ) ) goto error;482 if( !type_engine_import_mfun( env, func ) ) goto error;
473 483
474 // add running()484 // add running()
475 func = make_new_mfun( "int", "running", shred_running );485 func = make_new_mfun( "int", "running", shred_running );
476 func->doc = "Return true if the shred is currently running; false otherwise.";486 func->doc = "is the Shred currently running?";
477 if( !type_engine_import_mfun( env, func ) ) goto error;487 if( !type_engine_import_mfun( env, func ) ) goto error;
478 488
479 // add done()489 // add done()
480 func = make_new_mfun( "int", "done", shred_done );490 func = make_new_mfun( "int", "done", shred_done );
481 func->doc = "Return true if the shred is done processing; false otherwise.";491 func->doc = "is the Shred done running?";
482 if( !type_engine_import_mfun( env, func ) ) goto error;492 if( !type_engine_import_mfun( env, func ) ) goto error;
483 493
484 // add nargs()494 // add nargs()
@@ -487,7 +497,7 @@ t_CKBOOL init_class_shred( Chuck_Env * env, Chuck_Type * type ) · 2 unmodified lines
487 497
488 // add nargs()498 // add nargs()
489 func = make_new_mfun( "int", "args", shred_numArgs );499 func = make_new_mfun( "int", "args", shred_numArgs );
490 func->doc = "Return the number of arguments provided to the shred.";500 func->doc = "get the number of arguments provided to the Shred.";
491 if( !type_engine_import_mfun( env, func ) ) goto error;501 if( !type_engine_import_mfun( env, func ) ) goto error;
492 502
493 // add arg()503 // add arg()
@@ -498,33 +508,33 @@ t_CKBOOL init_class_shred( Chuck_Env * env, Chuck_Type * type ) · 4 unmodified lines
498 // add arg()508 // add arg()
499 func = make_new_mfun( "string", "arg", shred_getArg );509 func = make_new_mfun( "string", "arg", shred_getArg );
500 func->add_arg( "int", "index" );510 func->add_arg( "int", "index" );
501 func->doc = "Return the argument at the specified index.";511 func->doc = "get the Shred argument at the specified index.";
502 if( !type_engine_import_mfun( env, func ) ) goto error;512 if( !type_engine_import_mfun( env, func ) ) goto error;
503 513
504 // add sourcePath() (added 1.3.0.0)514 // add sourcePath() (added 1.3.0.0)
505 func = make_new_mfun( "string", "sourcePath", shred_sourcePath );515 func = make_new_mfun( "string", "sourcePath", shred_sourcePath );
506 func->doc = "Return the path of the source code file from which this shred's code is derived.";516 func->doc = "get the path of the source file from which this Shred's code is derived (same as .path()).";
507 if( !type_engine_import_mfun( env, func ) ) goto error;517 if( !type_engine_import_mfun( env, func ) ) goto error;
508 518
509 // add path() (added 1.3.2.0)519 // add path() (added 1.3.2.0)
510 func = make_new_mfun( "string", "path", shred_sourcePath );520 func = make_new_mfun( "string", "path", shred_sourcePath );
511 func->doc = "Return the file path of the source code file from which this shred's code is derived (same as .sourcePath()).";521 func->doc = "get the path of the source file from which this Shred's code is derived (same as .sourcePath()).";
512 if( !type_engine_import_mfun( env, func ) ) goto error;522 if( !type_engine_import_mfun( env, func ) ) goto error;
513 523
514 // add sourceDir() (added 1.3.0.0)524 // add sourceDir() (added 1.3.0.0)
515 func = make_new_mfun( "string", "sourceDir", shred_sourceDir );525 func = make_new_mfun( "string", "sourceDir", shred_sourceDir );
516 func->doc = "Return the enclosing directory of the source code file from which this shred's code is derived.";526 func->doc = "get the enclosing directory of the source file from which this Shred's code is derived (same as .dir()).";
517 if( !type_engine_import_mfun( env, func ) ) goto error;527 if( !type_engine_import_mfun( env, func ) ) goto error;
518 528
519 // add dir() (added 1.3.2.0)529 // add dir() (added 1.3.2.0)
520 func = make_new_mfun( "string", "dir", shred_sourceDir );530 func = make_new_mfun( "string", "dir", shred_sourceDir );
521 func->doc = "Return the enclosing directory of the source code file from which this shred's code is derived (same as .sourceDir()).";531 func->doc = "get the enclosing directory of the source file from which this Shred's code is derived (same as .sourceDir()).";
522 if( !type_engine_import_mfun( env, func ) ) goto error;532 if( !type_engine_import_mfun( env, func ) ) goto error;
523 533
524 // add dir() (added 1.3.2.0, ge)534 // add dir() (added 1.3.2.0, ge)
525 func = make_new_mfun( "string", "dir", shred_sourceDir2 );535 func = make_new_mfun( "string", "dir", shred_sourceDir2 );
526 func->add_arg( "int", "levelsUp" );536 func->add_arg( "int", "levelsUp" );
527 func->doc = "Return the enclosing directory, the specified number of parent directories up.";537 func->doc = "get the enclosing directory, the specified number of parent directories up.";
528 if( !type_engine_import_mfun( env, func ) ) goto error;538 if( !type_engine_import_mfun( env, func ) ) goto error;
529 539
530 // end the class import540 // end the class import
@@ -556,7 +566,7 @@ t_CKBOOL init_class_vec3( Chuck_Env * env, Chuck_Type * type ) · 25 unmodified lines
556 EM_log( CK_LOG_SEVERE, "class 'vec3' (primitive)" );566 EM_log( CK_LOG_SEVERE, "class 'vec3' (primitive)" );
557 567
558 // document568 // document
559 const char *doc = "vec3 is a primitive type for a 3-dimensional vector; potentially useful for 3D coordinates, RGB color, or as a value/goal/slew interpolator.";569 const char *doc = "a primitive type for a 3-dimensional vector; potentially useful for 3D coordinate, RGB color, or as a value/goal/slew interpolator.";
560 570
561 // init as base class571 // init as base class
562 if( !type_engine_import_class_begin( env, type, env->global(), NULL, NULL, doc ) )572 if( !type_engine_import_class_begin( env, type, env->global(), NULL, NULL, doc ) )
@@ -646,7 +656,7 @@ t_CKBOOL init_class_vec4( Chuck_Env * env, Chuck_Type * type ) · 83 unmodified lines
646 EM_log( CK_LOG_SEVERE, "class 'vec4' (primitive)" );656 EM_log( CK_LOG_SEVERE, "class 'vec4' (primitive)" );
647 657
648 // document658 // document
649 const char *doc = "vec4 is a primitive type for a 4-dimensional vector; potentially useful for 4D coordinatesm and RGBA color.";659 const char *doc = "a primitive type for a 4-dimensional vector; potentially useful for 4D coordinate and RGBA color.";
650 660
651 // init as base class661 // init as base class
652 if( !type_engine_import_class_begin( env, type, env->global(), NULL, NULL, doc ) )662 if( !type_engine_import_class_begin( env, type, env->global(), NULL, NULL, doc ) )
@@ -700,7 +710,7 @@ t_CKBOOL init_class_string( Chuck_Env * env, Chuck_Type * type ) · 47 unmodified lines
700 // log710 // log
701 EM_log( CK_LOG_SEVERE, "class 'string'" );711 EM_log( CK_LOG_SEVERE, "class 'string'" );
702 712
703 const char * doc = "The string class holds textual data as a sequence of characters, and provides a number of functions for manipulating text.";713 const char * doc = "textual data as a sequence of characters, along with functions for manipulating text.";
704 714
705 // init as base class715 // init as base class
706 // TODO: ctor/dtor716 // TODO: ctor/dtor
@@ -709,32 +719,32 @@ t_CKBOOL init_class_string( Chuck_Env * env, Chuck_Type * type ) · 2 unmodified lines
709 719
710 // add length()720 // add length()
711 func = make_new_mfun( "int", "length", string_length );721 func = make_new_mfun( "int", "length", string_length );
712 func->doc = "Return the number of characters of the string.";722 func->doc = "get the number of characters of the string.";
713 if( !type_engine_import_mfun( env, func ) ) goto error;723 if( !type_engine_import_mfun( env, func ) ) goto error;
714 724
715 // add upper()725 // add upper()
716 func = make_new_mfun( "string", "upper", string_upper );726 func = make_new_mfun( "string", "upper", string_upper );
717 func->doc = "Return a new string in which the lowercase characters of the original string have been converted to uppercase.";727 func->doc = "get a new string in which the lowercase characters of the original string have been converted to uppercase.";
718 if( !type_engine_import_mfun( env, func ) ) goto error;728 if( !type_engine_import_mfun( env, func ) ) goto error;
719 729
720 // add lower()730 // add lower()
721 func = make_new_mfun( "string", "lower", string_lower );731 func = make_new_mfun( "string", "lower", string_lower );
722 func->doc = "Return a new string in which the uppercase characters of the original string have been converted to lowercase.";732 func->doc = "get a new string in which the uppercase characters of the original string have been converted to lowercase.";
723 if( !type_engine_import_mfun( env, func ) ) goto error;733 if( !type_engine_import_mfun( env, func ) ) goto error;
724 734
725 // add ltrim()735 // add ltrim()
726 func = make_new_mfun( "string", "ltrim", string_ltrim );736 func = make_new_mfun( "string", "ltrim", string_ltrim );
727 func->doc = "Return a new string in which leading whitespace has been removed.";737 func->doc = "get a new string in which leading whitespace has been removed.";
728 if( !type_engine_import_mfun( env, func ) ) goto error;738 if( !type_engine_import_mfun( env, func ) ) goto error;
729 739
730 // add rtrim()740 // add rtrim()
731 func = make_new_mfun( "string", "rtrim", string_rtrim );741 func = make_new_mfun( "string", "rtrim", string_rtrim );
732 func->doc = "Return a new string in which trailing whitespace has been removed.";742 func->doc = "get a new string in which trailing whitespace has been removed.";
733 if( !type_engine_import_mfun( env, func ) ) goto error;743 if( !type_engine_import_mfun( env, func ) ) goto error;
734 744
735 // add trim()745 // add trim()
736 func = make_new_mfun( "string", "trim", string_trim );746 func = make_new_mfun( "string", "trim", string_trim );
737 func->doc = "Return a new string in which leading and trailing whitespace has been removed.";747 func->doc = "get a new string in which leading and trailing whitespace has been removed.";
738 if( !type_engine_import_mfun( env, func ) ) goto error;748 if( !type_engine_import_mfun( env, func ) ) goto error;
739 749
740 // add toString()750 // add toString()
@@ -744,41 +754,41 @@ t_CKBOOL init_class_string( Chuck_Env * env, Chuck_Type * type ) · 3 unmodified lines
744 // add charAt()754 // add charAt()
745 func = make_new_mfun( "int", "charAt", string_charAt );755 func = make_new_mfun( "int", "charAt", string_charAt );
746 func->add_arg("int", "index");756 func->add_arg("int", "index");
747 func->doc = "Return a character at the specified index.";757 func->doc = "get a character at the specified index.";
748 if( !type_engine_import_mfun( env, func ) ) goto error;758 if( !type_engine_import_mfun( env, func ) ) goto error;
749 759
750 // add setCharAt()760 // add setCharAt()
751 func = make_new_mfun( "int", "setCharAt", string_setCharAt );761 func = make_new_mfun( "int", "setCharAt", string_setCharAt );
752 func->add_arg("int", "index");762 func->add_arg("int", "index");
753 func->add_arg("int", "theChar");763 func->add_arg("int", "theChar");
754 func->doc = "Set the character at the specified index.";764 func->doc = "set the character at the specified index.";
755 if( !type_engine_import_mfun( env, func ) ) goto error;765 if( !type_engine_import_mfun( env, func ) ) goto error;
756 766
757 // add substring()767 // add substring()
758 func = make_new_mfun( "string", "substring", string_substring );768 func = make_new_mfun( "string", "substring", string_substring );
759 func->add_arg("int", "start");769 func->add_arg("int", "start");
760 func->doc = "Return a new string containing the substring from the start index to the end of the string.";770 func->doc = "get a new string containing the substring from the start index to the end of the string.";
761 if( !type_engine_import_mfun( env, func ) ) goto error;771 if( !type_engine_import_mfun( env, func ) ) goto error;
762 772
763 // add substring()773 // add substring()
764 func = make_new_mfun( "string", "substring", string_substringN );774 func = make_new_mfun( "string", "substring", string_substringN );
765 func->add_arg("int", "start");775 func->add_arg("int", "start");
766 func->add_arg("int", "length");776 func->add_arg("int", "length");
767 func->doc = "Return a new string containing the substring from the start index of the specified length.";777 func->doc = "get a new string containing the substring from the start index of the specified length.";
768 if( !type_engine_import_mfun( env, func ) ) goto error;778 if( !type_engine_import_mfun( env, func ) ) goto error;
769 779
770 // add insert()780 // add insert()
771 func = make_new_mfun( "void", "insert", string_insert );781 func = make_new_mfun( "void", "insert", string_insert );
772 func->add_arg("int", "position");782 func->add_arg("int", "position");
773 func->add_arg("string", "str");783 func->add_arg("string", "str");
774 func->doc = "Insert str at the specified position.";784 func->doc = "insert a string at the specified position.";
775 if( !type_engine_import_mfun( env, func ) ) goto error;785 if( !type_engine_import_mfun( env, func ) ) goto error;
776 786
777 // add replace()787 // add replace()
778 func = make_new_mfun( "void", "replace", string_replace );788 func = make_new_mfun( "void", "replace", string_replace );
779 func->add_arg( "int", "position" );789 func->add_arg( "int", "position" );
780 func->add_arg( "string", "str" );790 func->add_arg( "string", "str" );
781 func->doc = "Replace characters from the start position to the end of the string with str.";791 func->doc = "get characters from the start position to the end of the string with str.";
782 if( !type_engine_import_mfun( env, func ) ) goto error;792 if( !type_engine_import_mfun( env, func ) ) goto error;
783 793
784 // add replace()794 // add replace()
@@ -786,71 +796,71 @@ t_CKBOOL init_class_string( Chuck_Env * env, Chuck_Type * type ) · 1 unmodified line
786 func->add_arg( "int", "position" );796 func->add_arg( "int", "position" );
787 func->add_arg( "int", "length" );797 func->add_arg( "int", "length" );
788 func->add_arg( "string", "str" );798 func->add_arg( "string", "str" );
789 func->doc = "Replace length characters from the start position with str.";799 func->doc = "get length characters from the start position with str.";
790 if( !type_engine_import_mfun( env, func ) ) goto error;800 if( !type_engine_import_mfun( env, func ) ) goto error;
791 801
792 // add find()802 // add find()
793 func = make_new_mfun( "int", "find", string_find );803 func = make_new_mfun( "int", "find", string_find );
794 func->add_arg( "int", "theChar" );804 func->add_arg( "int", "theChar" );
795 func->doc = "Return the index of the first occurence of theChar, or -1 if theChar is not found.";805 func->doc = "get the index of the first occurence of theChar, or -1 if theChar is not found.";
796 if( !type_engine_import_mfun( env, func ) ) goto error;806 if( !type_engine_import_mfun( env, func ) ) goto error;
797 807
798 // add find()808 // add find()
799 func = make_new_mfun( "int", "find", string_findStart );809 func = make_new_mfun( "int", "find", string_findStart );
800 func->add_arg( "int", "theChar" );810 func->add_arg( "int", "theChar" );
801 func->add_arg( "int", "start" );811 func->add_arg( "int", "start" );
802 func->doc = "Return the index of the first occurence of theChar at or after the start position, or -1 if theChar is not found.";812 func->doc = "get the index of the first occurence of theChar at or after the start position, or -1 if theChar is not found.";
803 if( !type_engine_import_mfun( env, func ) ) goto error;813 if( !type_engine_import_mfun( env, func ) ) goto error;
804 814
805 // add find()815 // add find()
806 func = make_new_mfun( "int", "find", string_findStr );816 func = make_new_mfun( "int", "find", string_findStr );
807 func->add_arg( "string", "str" );817 func->add_arg( "string", "str" );
808 func->doc = "Return the index of the first occurence of str, or -1 if str is not found.";818 func->doc = "get the index of the first occurence of str, or -1 if str is not found.";
809 if( !type_engine_import_mfun( env, func ) ) goto error;819 if( !type_engine_import_mfun( env, func ) ) goto error;
810 820
811 // add find()821 // add find()
812 func = make_new_mfun( "int", "find", string_findStrStart );822 func = make_new_mfun( "int", "find", string_findStrStart );
813 func->add_arg( "string", "str" );823 func->add_arg( "string", "str" );
814 func->add_arg( "int", "start" );824 func->add_arg( "int", "start" );
815 func->doc = "Return the index of the first occurence of str at or after the start position, or -1 if str is not found.";825 func->doc = "get the index of the first occurence of str at or after the start position, or -1 if str is not found.";
816 if( !type_engine_import_mfun( env, func ) ) goto error;826 if( !type_engine_import_mfun( env, func ) ) goto error;
817 827
818 // add rfind()828 // add rfind()
819 func = make_new_mfun( "int", "rfind", string_rfind );829 func = make_new_mfun( "int", "rfind", string_rfind );
820 func->add_arg( "int", "theChar" );830 func->add_arg( "int", "theChar" );
821 func->doc = "Return the index of the last occurence of theChar, or -1 if theChar is not found.";831 func->doc = "get the index of the last occurence of theChar, or -1 if theChar is not found.";
822 if( !type_engine_import_mfun( env, func ) ) goto error;832 if( !type_engine_import_mfun( env, func ) ) goto error;
823 833
824 // add rfind()834 // add rfind()
825 func = make_new_mfun( "int", "rfind", string_rfindStart );835 func = make_new_mfun( "int", "rfind", string_rfindStart );
826 func->add_arg( "int", "theChar" );836 func->add_arg( "int", "theChar" );
827 func->add_arg( "int", "start" );837 func->add_arg( "int", "start" );
828 func->doc = "Return the index of the last occurence of theChar at or before the start position, or -1 if theChar is not found.";838 func->doc = "get the index of the last occurence of theChar at or before the start position, or -1 if theChar is not found.";
829 if( !type_engine_import_mfun( env, func ) ) goto error;839 if( !type_engine_import_mfun( env, func ) ) goto error;
830 840
831 // add rfind()841 // add rfind()
832 func = make_new_mfun( "int", "rfind", string_rfindStr );842 func = make_new_mfun( "int", "rfind", string_rfindStr );
833 func->add_arg( "string", "str" );843 func->add_arg( "string", "str" );
834 func->doc = "Return the index of the last occurence of str, or -1 if str is not found.";844 func->doc = "get the index of the last occurence of str, or -1 if str is not found.";
835 if( !type_engine_import_mfun( env, func ) ) goto error;845 if( !type_engine_import_mfun( env, func ) ) goto error;
836 846
837 // add rfind()847 // add rfind()
838 func = make_new_mfun( "int", "rfind", string_rfindStrStart );848 func = make_new_mfun( "int", "rfind", string_rfindStrStart );
839 func->add_arg( "string", "str" );849 func->add_arg( "string", "str" );
840 func->add_arg( "int", "start" );850 func->add_arg( "int", "start" );
841 func->doc = "Return the index of the last occurence of str at or before the start position, or -1 if str is not found.";851 func->doc = "get the index of the last occurence of str at or before the start position, or -1 if str is not found.";
842 if( !type_engine_import_mfun( env, func ) ) goto error;852 if( !type_engine_import_mfun( env, func ) ) goto error;
843 853
844 // add erase()854 // add erase()
845 func = make_new_mfun( "void", "erase", string_erase );855 func = make_new_mfun( "void", "erase", string_erase );
846 func->add_arg( "int", "start" );856 func->add_arg( "int", "start" );
847 func->add_arg( "int", "length" );857 func->add_arg( "int", "length" );
848 func->doc = "Erase length characters of the string from start position.";858 func->doc = "erase length characters of the string from start position.";
849 if( !type_engine_import_mfun( env, func ) ) goto error;859 if( !type_engine_import_mfun( env, func ) ) goto error;
850 860
851 // add toInt()861 // add toInt()
852 func = make_new_mfun( "int", "toInt", string_toInt );862 func = make_new_mfun( "int", "toInt", string_toInt );
853 func->doc = "Attempt to convert the contents of the string to an integer and return the result, or 0 if conversion failed.";863 func->doc = "attemp to convert the contents of the string to an integer and return the result, or 0 if conversion failed.";
854 if( !type_engine_import_mfun( env, func ) ) goto error;864 if( !type_engine_import_mfun( env, func ) ) goto error;
855 865
856 // add toFloat()866 // add toFloat()
@@ -910,38 +920,38 @@ t_CKBOOL init_class_array( Chuck_Env * env, Chuck_Type * type ) · 53 unmodified lines
910 920
911 // init as base class921 // init as base class
912 // TODO: ctor/dtor?922 // TODO: ctor/dtor?
913 const char *doc = "The array class is used to store linear sequences of data, also providing capabilities for stack and map data structures.";923 string doc = "storage construct for sequential data of the same type; can also be used as a stack or a map data structure.";
914 if( !type_engine_import_class_begin( env, type, env->global(), NULL, NULL, doc ) )924 if( !type_engine_import_class_begin( env, type, env->global(), NULL, NULL, doc.c_str() ) )
915 return FALSE;925 return FALSE;
916 926
917 // add clear()927 // add clear()
918 func = make_new_mfun( "void", "clear", array_clear );928 func = make_new_mfun( "void", "clear", array_clear );
919 func->doc = "Clear the contents of the array.";929 func->doc = "clear the contents of the array.";
920 if( !type_engine_import_mfun( env, func ) ) goto error;930 if( !type_engine_import_mfun( env, func ) ) goto error;
921 931
922 // add reset()932 // add reset()
923 func = make_new_mfun( "void", "reset", array_reset );933 func = make_new_mfun( "void", "reset", array_reset );
924 func->doc = "Reset array to original state; clears the array and sets capacity to 8.";934 func->doc = "reset array to original state; clears the array and sets capacity to 8.";
925 if( !type_engine_import_mfun( env, func ) ) goto error;935 if( !type_engine_import_mfun( env, func ) ) goto error;
926 936
927 // add popBack()937 // add popBack()
928 func = make_new_mfun( "void", "popBack", array_pop_back );938 func = make_new_mfun( "void", "popBack", array_pop_back );
929 func->doc = "Remove the last item of the array";939 func->doc = "remove the last item of the array";
930 if( !type_engine_import_mfun( env, func ) ) goto error;940 if( !type_engine_import_mfun( env, func ) ) goto error;
931 941
932 // add size()942 // add size()
933 func = make_new_mfun( "int", "size", array_get_size );943 func = make_new_mfun( "int", "size", array_get_size );
934 func->doc = "Return the number of elements in the array.";944 func->doc = "get the number of elements in the array.";
935 if( !type_engine_import_mfun( env, func ) ) goto error;945 if( !type_engine_import_mfun( env, func ) ) goto error;
936 // add size()946 // add size()
937 func = make_new_mfun( "int", "size", array_set_size );947 func = make_new_mfun( "int", "size", array_set_size );
938 func->add_arg( "int", "newSize" );948 func->add_arg( "int", "newSize" );
939 func->doc = "Set the size of the array. If the new size is less than the current size, elements will be deleted from the end; if the new size is larger than the current size, 0 or null elements will be added to the end.";949 func->doc = "set the size of the array. If the new size is less than the current size, elements will be deleted from the end; if the new size is larger than the current size, 0 or null elements will be added to the end.";
940 if( !type_engine_import_mfun( env, func ) ) goto error;950 if( !type_engine_import_mfun( env, func ) ) goto error;
941 951
942 // add cap()952 // add cap()
943 func = make_new_mfun( "int", "cap", array_get_capacity_hack );953 func = make_new_mfun( "int", "cap", array_get_capacity_hack );
944 func->doc = "Return current capacity of the array (number of elements that can be held without reallocating internal buffer). ";954 func->doc = "get current capacity of the array (number of elements that can be held without reallocating internal buffer).";
945 if( !type_engine_import_mfun( env, func ) ) goto error;955 if( !type_engine_import_mfun( env, func ) ) goto error;
946 956
947 // add capacity()957 // add capacity()
@@ -954,13 +964,13 @@ t_CKBOOL init_class_array( Chuck_Env * env, Chuck_Type * type ) · 6 unmodified lines
954 // add find()964 // add find()
955 func = make_new_mfun( "int", "find", array_find );965 func = make_new_mfun( "int", "find", array_find );
956 func->add_arg( "string", "key" );966 func->add_arg( "string", "key" );
957 func->doc = "Return number of elements with the specified key. ";967 func->doc = "get number of elements with the specified key. ";
958 if( !type_engine_import_mfun( env, func ) ) goto error;968 if( !type_engine_import_mfun( env, func ) ) goto error;
959 969
960 // add erase()970 // add erase()
961 func = make_new_mfun( "int", "erase", array_erase );971 func = make_new_mfun( "int", "erase", array_erase );
962 func->add_arg( "string", "key" );972 func->add_arg( "string", "key" );
963 func->doc = "Erase all elements with the specified key. ";973 func->doc = "erase all elements with the specified key. ";
964 if( !type_engine_import_mfun( env, func ) ) goto error;974 if( !type_engine_import_mfun( env, func ) ) goto error;
965 975
966 // add examples976 // add examples
@@ -1047,6 +1057,25 @@ CK_DLL_MFUN( object_toString ) · 80 unmodified lines
1047 RETURN->v_object = str;1057 RETURN->v_object = str;
1048}1058}
1049 1059
1060// dump
1061CK_DLL_MFUN( object_dump )
1062{
1063 // get object
1064 Chuck_Object * me = SELF;
1065 // call dump
1066 me->dump();
1067}
1068
1069// apropos
1070CK_DLL_MFUN( object_apropos )
1071{
1072 // get object
1073 Chuck_Object * me = SELF;
1074 // call dump
1075 me->apropos();
1076}
1077
1078
1050 1079
1051// ctor1080// ctor
1052CK_DLL_CTOR( ugen_ctor )1081CK_DLL_CTOR( ugen_ctor )
src/core/chuck_lang.h+2−0
@@ -72,6 +72,8 @@ CK_DLL_MFUN( object_equals ); · 71 unmodified lines
72CK_DLL_MFUN( object_getType );72CK_DLL_MFUN( object_getType );
73CK_DLL_MFUN( object_hashCode );73CK_DLL_MFUN( object_hashCode );
74CK_DLL_MFUN( object_toString );74CK_DLL_MFUN( object_toString );
75CK_DLL_MFUN( object_dump );
76CK_DLL_MFUN( object_apropos );
75 77
76 78
77//-----------------------------------------------------------------------------79//-----------------------------------------------------------------------------
src/core/chuck_oo.cpp+25−0
@@ -343,6 +343,31 @@ Chuck_Object::~Chuck_Object() · 342 unmodified lines
343 343
344 344
345 345
346//-----------------------------------------------------------------------------
347// name: dump()
348// desc: output current state (can be overridden)
349//-----------------------------------------------------------------------------
350void Chuck_Object::dump()
351{
352 // TODO: implement!
353}
354
355
356
357
358//-----------------------------------------------------------------------------
359// name: apropos()
360// desc: output interface (can be overriden; but probably shouldn't be)
361//-----------------------------------------------------------------------------
362void Chuck_Object::apropos()
363{
364 // apropos on type
365 this->type_ref->apropos();
366}
367
368
369
370
346//-----------------------------------------------------------------------------371//-----------------------------------------------------------------------------
347// name: Chuck_Array4()372// name: Chuck_Array4()
348// desc: constructor373// desc: constructor
src/core/chuck_oo.h+9−1
@@ -174,6 +174,14 @@ public: · 173 unmodified lines
174 Chuck_Object();174 Chuck_Object();
175 virtual ~Chuck_Object();175 virtual ~Chuck_Object();
176 176
177public:
178 // output current state (can be overridden)
179 virtual void dump();
180
181public:
182 // output type info (can be overriden; but probably shouldn't be)
183 virtual void apropos();
184
177public:185public:
178 // virtual table186 // virtual table
179 Chuck_VTable * vtable;187 Chuck_VTable * vtable;
@@ -221,7 +229,7 @@ public: · 41 unmodified lines
221 virtual t_CKINT erase( const std::string & key ) = 0; // erase229 virtual t_CKINT erase( const std::string & key ) = 0; // erase
222 virtual void clear( ) = 0; // clear230 virtual void clear( ) = 0; // clear
223 231
224 Chuck_Type *m_array_type;232 Chuck_Type * m_array_type;
225};233};
226 234
227 235
src/core/chuck_scan.cpp+4−4
@@ -2499,6 +2499,8 @@ t_CKBOOL type_engine_scan2_func_def( Chuck_Env * env, a_Func_Def f ) · 2498 unmodified lines
2499 func = env->context->new_Chuck_Func();2499 func = env->context->new_Chuck_Func();
2500 // set the name2500 // set the name
2501 func->name = func_name;2501 func->name = func_name;
2502 // set the base name (i.e., without designations); 1.4.0.2
2503 func->base_name = orig_name;
2502 // reference the function definition2504 // reference the function definition
2503 func->def = f;2505 func->def = f;
2504 // note whether the function is marked as member2506 // note whether the function is marked as member
@@ -2677,15 +2679,13 @@ t_CKBOOL type_engine_scan2_func_def( Chuck_Env * env, a_Func_Def f ) · 172 unmodified lines
2677 // enter the name into the function table2679 // enter the name into the function table
2678 env->curr->func.add( func->name, func );2680 env->curr->func.add( func->name, func );
2679 2681
2680 // add for orig name2682 // if not overload, add entries for orig name
2681 if( !overload )2683 if( !overload )
2682 {2684 {
2683 env->curr->value.add( orig_name, value );2685 env->curr->value.add( orig_name, value );
2684 env->curr->func.add( orig_name, func );2686 env->curr->func.add( orig_name, func );
2685 }2687 }
2686 2688 else // if overload (changed from separate if statement 1.4.0.2)
2687 // if overload
2688 if( overload )
2689 {2689 {
2690 // make sure returns are equal2690 // make sure returns are equal
2691 if( *(f->ret_type) != *(overload->func_ref->def->ret_type) )2691 if( *(f->ret_type) != *(overload->func_ref->def->ret_type) )
src/core/chuck_type.cpp+240−0
@@ -40,6 +40,7 @@ · 39 unmodified lines
40#include "util_string.h"40#include "util_string.h"
41#include "ugen_xxx.h"41#include "ugen_xxx.h"
42 42
43#include <strstream>
43using namespace std;44using namespace std;
44 45
45 46
@@ -6373,6 +6374,8 @@ void escape_table( ) · 6327 unmodified lines
6373}6374}
6374 6375
6375 6376
6377
6378
6376//-----------------------------------------------------------------------------6379//-----------------------------------------------------------------------------
6377// name: escape_str()6380// name: escape_str()
6378// desc: ...6381// desc: ...
@@ -6470,6 +6473,13 @@ t_CKBOOL escape_str( char * str_lit, int linepos ) · 91 unmodified lines
6470 return TRUE;6473 return TRUE;
6471}6474}
6472 6475
6476
6477
6478
6479//-----------------------------------------------------------------------------
6480// name: str2char
6481// desc: handle escape characters
6482//-----------------------------------------------------------------------------
6473t_CKINT str2char( const char * c, int linepos )6483t_CKINT str2char( const char * c, int linepos )
6474{6484{
6475 if(c[0] == '\\')6485 if(c[0] == '\\')
@@ -6497,3 +6507,233 @@ t_CKINT str2char( const char * c, int linepos ) · 21 unmodified lines
6497 return c[0];6507 return c[0];
6498 }6508 }
6499}6509}
6510
6511
6512
6513
6514//-----------------------------------------------------------------------------
6515// name: Chuck_Type()
6516// desc: constructor
6517//-----------------------------------------------------------------------------
6518Chuck_Type::Chuck_Type( Chuck_Env * env, te_Type _id, const std::string & _n,
6519 Chuck_Type * _p, t_CKUINT _s )
6520{
6521 m_env = env;
6522 xid = _id; name = _n; parent = _p; size = _s; owner = NULL;
6523 array_type = NULL; array_depth = 0; obj_size = 0;
6524 info = NULL; func = NULL; def = NULL; is_copy = FALSE;
6525 ugen_info = NULL; is_complete = TRUE; has_constructor = FALSE;
6526 has_destructor = FALSE;
6527 allocator = NULL;
6528}
6529
6530
6531
6532
6533//-----------------------------------------------------------------------------
6534// name: ~Chuck_Type()
6535// desc: destructor
6536//-----------------------------------------------------------------------------
6537Chuck_Type::~Chuck_Type()
6538{
6539 // reset
6540 reset();
6541}
6542
6543
6544
6545
6546//-----------------------------------------------------------------------------
6547// name: reset()
6548// desc: reset this type struct
6549//-----------------------------------------------------------------------------
6550void Chuck_Type::reset()
6551{
6552 // CK_FPRINTF_STDERR( "type: %s %i\n", c_name(), (t_CKUINT)this );
6553 xid = te_void;
6554 size = array_depth = obj_size = 0;
6555 is_copy = FALSE;
6556
6557 // free only if not locked: to prevent garbage collection after exit
6558 if( !this->m_locked )
6559 {
6560 // TODO: uncomment this, fix it to behave correctly
6561 // release references
6562 // SAFE_RELEASE(parent);
6563 // SAFE_RELEASE(array_type);
6564 SAFE_RELEASE(info);
6565 // SAFE_RELEASE(owner);
6566 // SAFE_RELEASE(func);
6567 // SAFE_RELEASE(ugen_info);
6568 }
6569}
6570
6571
6572
6573
6574//-----------------------------------------------------------------------------
6575// name: operator =
6576// desc: assignment operator; this does not touch the Chuck_VM_Object
6577//-----------------------------------------------------------------------------
6578const Chuck_Type & Chuck_Type::operator =( const Chuck_Type & rhs )
6579{
6580 // release first
6581 this->reset();
6582
6583 // copy
6584 this->xid = rhs.xid;
6585 this->name = rhs.name;
6586 this->parent = rhs.parent;
6587 this->obj_size = rhs.obj_size;
6588 this->size = rhs.size;
6589 this->def = rhs.def;
6590 this->is_copy = TRUE;
6591 this->array_depth = rhs.array_depth;
6592 this->array_type = rhs.array_type; // SAFE_ADD_REF(this->array_type);
6593 this->func = rhs.func; // SAFE_ADD_REF(this->func);
6594 this->info = rhs.info; SAFE_ADD_REF(this->info);
6595 this->owner = rhs.owner; // SAFE_ADD_REF(this->owner);
6596
6597 return *this;
6598}
6599
6600
6601
6602
6603//-----------------------------------------------------------------------------
6604// name: copy()
6605// desc: create a copy of this type struct
6606//-----------------------------------------------------------------------------
6607Chuck_Type * Chuck_Type::copy( Chuck_Env * env ) const
6608{
6609 // allocate new instance
6610 Chuck_Type * n = env->context->new_Chuck_Type( env );
6611 // invoke = operator
6612 *n = *this;
6613 // return new instance
6614 return n;
6615}
6616
6617
6618
6619
6620//-----------------------------------------------------------------------------
6621// name: str()
6622// desc: get a string of this type
6623//-----------------------------------------------------------------------------
6624const std::string & Chuck_Type::str()
6625{
6626 // start with base name
6627 ret = name;
6628 // add array levels as needed
6629 for( t_CKUINT i = 0; i < array_depth; i++ )
6630 ret += std::string("[]");
6631 // return it
6632 return ret;
6633}
6634
6635
6636
6637
6638//-----------------------------------------------------------------------------
6639// name: c_name()
6640// desc: return this->str() as C string
6641//-----------------------------------------------------------------------------
6642const char * Chuck_Type::c_name()
6643{
6644 return str().c_str();
6645}
6646
6647
6648
6649
6650//-----------------------------------------------------------------------------
6651// name: apropos()
6652// desc: dump info to string
6653//-----------------------------------------------------------------------------
6654void Chuck_Type::apropos( std::string & output )
6655{
6656 // reset
6657 output = "";
6658 // make a string output stream
6659 ostringstream sout;
6660 // type
6661 Chuck_Type * type = this;
6662 // line prefix
6663 string PREFIX = ""; // [chuck]: ";
6664
6665 // delimiter
6666 sout << PREFIX;
6667 for( int i = 0; i < str().length(); i++ ) sout << "-";
6668 sout << endl;
6669 // type name
6670 sout << PREFIX << str() << (this->ugen_info ? " (unit generator)" : "") << endl;
6671 // delimiter
6672 sout << PREFIX;
6673 for( int i = 0; i < str().length(); i++ ) sout << "-";
6674 sout << endl;
6675 // inheritance
6676 if( type->parent != NULL )
6677 {
6678 sout << PREFIX << " |- inherits";
6679 while( type->parent != NULL )
6680 {
6681 // move up
6682 type = type->parent;
6683 // print
6684 sout << " -> " << type->str() << "";
6685 }
6686 sout << endl;
6687 // set back to this
6688 type = this;
6689 }
6690 // description
6691 if( this->doc != "" )
6692 sout << PREFIX << " |- description: " << this->doc << "" << endl;
6693
6694// // storage for functions in type
6695// vector<Chuck_Func *> funcs;
6696// // get functions from type info
6697// type->parent->parent->info->get_funcs( funcs );
6698// // print functions
6699// for( t_CKUINT i = 0; i < funcs.size(); i++ )
6700// {
6701// // sout << funcs[i]->base_name << endl;
6702// }
6703
6704 // // storage for values in type
6705 // vector<Chuck_Value *> values;
6706 // // get values from type info
6707 // type->parent->parent->parent->info->get_values( values );
6708 // // print values
6709 // for( t_CKUINT i = 0; i < values.size(); i++ )
6710 // {
6711 // CK_STDCERR << values[i]->name << CK_STDENDL;
6712 // }
6713 //
6714 // CK_STDCERR << funcs.size() << " " << values.size() << CK_STDENDL;
6715
6716 sout << PREFIX;
6717 for( int i = 0; i < str().length(); i++ ) sout << "-";
6718 sout << endl;
6719
6720 // done
6721 output = sout.str();
6722}
6723
6724
6725
6726
6727//-----------------------------------------------------------------------------
6728// name: apropos()
6729// desc: dump info to console
6730//-----------------------------------------------------------------------------
6731void Chuck_Type::apropos()
6732{
6733 // the info
6734 string output;
6735 // get it
6736 this->apropos( output );
6737 // print it
6738 CK_STDCERR << output << CK_STDENDL;
6739}
src/core/chuck_type.h+31−79
@@ -626,89 +626,40 @@ struct Chuck_Type : public Chuck_VM_Object · 625 unmodified lines
626 // example files626 // example files
627 std::vector<std::string> examples;627 std::vector<std::string> examples;
628 628
629 // reference to environment RE-FACTOR 2017
630 Chuck_Env * m_env;
631
629public:632public:
630 // constructor633 // constructor
631 Chuck_Type( Chuck_Env * env, te_Type _id = te_null, const std::string & _n = "",634 Chuck_Type( Chuck_Env * env,
632 Chuck_Type * _p = NULL, t_CKUINT _s = 0 )635 te_Type _id = te_null,
633 {636 const std::string & _n = "",
634 m_env = env;637 Chuck_Type * _p = NULL,
635 xid = _id; name = _n; parent = _p; size = _s; owner = NULL;638 t_CKUINT _s = 0 );
636 array_type = NULL; array_depth = 0; obj_size = 0;
637 info = NULL; func = NULL; def = NULL; is_copy = FALSE;
638 ugen_info = NULL; is_complete = TRUE; has_constructor = FALSE;
639 has_destructor = FALSE;
640 allocator = NULL;
641 }
642
643 // destructor639 // destructor
644 virtual ~Chuck_Type() { reset(); }640 virtual ~Chuck_Type();
645 641 // reset
646 // reset642 void reset();
647 void reset()
648 {
649 // CK_FPRINTF_STDERR( "type: %s %i\n", c_name(), (t_CKUINT)this );
650 xid = te_void;
651 size = array_depth = obj_size = 0;
652 is_copy = FALSE;
653
654 // free only if not locked: to prevent garbage collection after exit
655 if( !this->m_locked )
656 {
657 // TODO: uncomment this, fix it to behave correctly
658 // release references
659 // SAFE_RELEASE(parent);
660 // SAFE_RELEASE(array_type);
661 SAFE_RELEASE(info);
662 // SAFE_RELEASE(owner);
663 // SAFE_RELEASE(func);
664 // SAFE_RELEASE(ugen_info);
665 }
666 }
667
668 // assignment - this does not touch the Chuck_VM_Object643 // assignment - this does not touch the Chuck_VM_Object
669 const Chuck_Type & operator =( const Chuck_Type & rhs )644 const Chuck_Type & operator =( const Chuck_Type & rhs );
670 {645 // make a copy of this type struct
671 // release first646 Chuck_Type * copy( Chuck_Env * env ) const;
672 this->reset();
673
674 // copy
675 this->xid = rhs.xid;
676 this->name = rhs.name;
677 this->parent = rhs.parent;
678 this->obj_size = rhs.obj_size;
679 this->size = rhs.size;
680 this->def = rhs.def;
681 this->is_copy = TRUE;
682 this->array_depth = rhs.array_depth;
683 this->array_type = rhs.array_type;
684 // SAFE_ADD_REF(this->array_type);
685 this->func = rhs.func;
686 // SAFE_ADD_REF(this->func);
687 this->info = rhs.info;
688 SAFE_ADD_REF(this->info);
689 this->owner = rhs.owner;
690 // SAFE_ADD_REF(this->owner);
691
692 return *this;
693 }
694 647
695 // copy648public:
696 Chuck_Type * copy( Chuck_Env * env ) const
697 { Chuck_Type * n = env->context->new_Chuck_Type( env );
698 *n = *this; return n; }
699
700 // to string649 // to string
701 std::string ret;650 const std::string & str();
702 const std::string & str()651 // to c string
703 { ret = name;652 const char * c_name();
704 for( t_CKUINT i = 0; i < array_depth; i++ ) ret += std::string("[]");
705 return ret; }
706 // to c
707 const char * c_name()
708 { return str().c_str(); }
709 653
710 //ref654protected:
711 Chuck_Env * m_env;655 // this for str() and c_name() use only
656 std::string ret;
657
658public:
659 // dump info to string
660 void apropos( std::string & output );
661 // dump info to console
662 void apropos();
712};663};
713 664
714 665
@@ -789,8 +740,10 @@ struct Chuck_Value : public Chuck_VM_Object · 74 unmodified lines
789//-----------------------------------------------------------------------------740//-----------------------------------------------------------------------------
790struct Chuck_Func : public Chuck_VM_Object741struct Chuck_Func : public Chuck_VM_Object
791{742{
792 // name743 // name (actual in VM name, e.g., "dump@0@Object")
793 std::string name;744 std::string name;
745 // base name (without the designation, e.g., "dump"); 1.4.0.2
746 std::string base_name;
794 // func def from parser747 // func def from parser
795 a_Func_Def def;748 a_Func_Def def;
796 // code (included imported)749 // code (included imported)
@@ -940,8 +893,7 @@ const char * howmuch2str( te_HowMuch how_much ); · 143 unmodified lines
940t_CKBOOL escape_str( char * str_lit, int linepos );893t_CKBOOL escape_str( char * str_lit, int linepos );
941t_CKINT str2char( const char * char_lit, int linepos );894t_CKINT str2char( const char * char_lit, int linepos );
942 895
943// REFACTOR-2017: exile! now stored in env896// REFACTOR-2017: exile! these default types now stored in env
944// default types
945//extern Chuck_Type t_void;897//extern Chuck_Type t_void;
946//extern Chuck_Type t_int;898//extern Chuck_Type t_int;
947//extern Chuck_Type t_float;899//extern Chuck_Type t_float;
src/core/uana_xform.cpp+6−6
@@ -171,7 +171,7 @@ DLL_QUERY xform_query( Chuck_DL_Query * QUERY ) · 170 unmodified lines
171 // init as base class: FFT171 // init as base class: FFT
172 //---------------------------------------------------------------------172 //---------------------------------------------------------------------
173 173
174 doc = "This UAna computes the Fast Fourier Transform on incoming audio samples, and outputs the result via its UAnaBlob as both the complex spectrum and the magnitude spectrum. A buffering mechanism maintains the previous FFTsize # of samples, allowing FFT's to be taken at any point in time, on demand (via .upchuck() or by upchucking a downstream UAna. The window size (along with an arbitry window shape) is controlled via the .window method. The hop size is complete dynamic, and is throttled by how time is advanced. ";174 doc = "computes the Fast Fourier Transform on incoming audio samples, and outputs the result via its UAnaBlob as both the complex spectrum and the magnitude spectrum. A buffering mechanism maintains the previous FFTsize # of samples, allowing FFT's to be taken at any point in time, on demand (via .upchuck() or by upchucking a downstream UAna. The window size (along with an arbitry window shape) is controlled via the .window method. The hop size is complete dynamic, and is throttled by how time is advanced.";
175 175
176 if( !type_engine_import_uana_begin( env, "FFT", "UAna", env->global(),176 if( !type_engine_import_uana_begin( env, "FFT", "UAna", env->global(),
177 FFT_ctor, FFT_dtor,177 FFT_ctor, FFT_dtor,
@@ -224,7 +224,7 @@ DLL_QUERY xform_query( Chuck_DL_Query * QUERY ) · 46 unmodified lines
224 // init as base class: IFFT224 // init as base class: IFFT
225 //---------------------------------------------------------------------225 //---------------------------------------------------------------------
226 226
227 doc = "This UAna computes the inverse Fast Fourier Transform on incoming spectral frames (on demand), and overlap-adds the results into its internal buffer, ready to be sent to other UGen's connected via =>. The window size (along with an arbitry window shape) is controlled via the .window method.";227 doc = "computes the inverse Fast Fourier Transform on incoming spectral frames (on demand), and overlap-adds the results into its internal buffer, ready to be sent to other UGen's connected via =>. The window size (along with an arbitry window shape) is controlled via the .window method.";
228 228
229 if( !type_engine_import_uana_begin( env, "IFFT", "UAna", env->global(), 229 if( !type_engine_import_uana_begin( env, "IFFT", "UAna", env->global(),
230 IFFT_ctor, IFFT_dtor,230 IFFT_ctor, IFFT_dtor,
@@ -315,7 +315,7 @@ DLL_QUERY xform_query( Chuck_DL_Query * QUERY ) · 84 unmodified lines
315 // init as base class: Flip315 // init as base class: Flip
316 //---------------------------------------------------------------------316 //---------------------------------------------------------------------
317 317
318 doc = "Turns audio samples into frames in the UAna domain.";318 doc = "turns audio samples into frames in the UAna domain.";
319 319
320 if( !type_engine_import_uana_begin( env, "Flip", "UAna", env->global(), 320 if( !type_engine_import_uana_begin( env, "Flip", "UAna", env->global(),
321 Flip_ctor, Flip_dtor,321 Flip_ctor, Flip_dtor,
@@ -368,7 +368,7 @@ DLL_QUERY xform_query( Chuck_DL_Query * QUERY ) · 46 unmodified lines
368 // init as base class: pilF368 // init as base class: pilF
369 //---------------------------------------------------------------------369 //---------------------------------------------------------------------
370 370
371 doc = "Turns UAna frames into audio samples, via overlap add.";371 doc = "turns UAna frames into audio samples, via overlap add.";
372 372
373 if( !type_engine_import_uana_begin( env, "pilF", "UAna", env->global(), 373 if( !type_engine_import_uana_begin( env, "pilF", "UAna", env->global(),
374 UnFlip_ctor, UnFlip_dtor,374 UnFlip_ctor, UnFlip_dtor,
@@ -420,7 +420,7 @@ DLL_QUERY xform_query( Chuck_DL_Query * QUERY ) · 45 unmodified lines
420 // init as base class: DCT420 // init as base class: DCT
421 //---------------------------------------------------------------------421 //---------------------------------------------------------------------
422 422
423 doc = "This UAna computes the Discrete Cosine Transform on incoming audio samples, and outputs the result via its UAnaBlob as real values in the D.C. spectrum. A buffering mechanism maintains the previous DCT size # of samples, allowing DCT to be taken at any point in time, on demand (via .upchuck() or by upchucking a downstream UAna; see UAna documentation). The window size (along with an arbitry window shape) is controlled via the .window method. The hop size is complete dynamic, and is throttled by how time is advanced.";423 doc = "computes the Discrete Cosine Transform on incoming audio samples, and outputs the result via its UAnaBlob as real values in the D.C. spectrum. A buffering mechanism maintains the previous DCT size # of samples, allowing DCT to be taken at any point in time, on demand (via .upchuck() or by upchucking a downstream UAna; see UAna documentation). The window size (along with an arbitry window shape) is controlled via the .window method. The hop size is complete dynamic, and is throttled by how time is advanced.";
424 424
425 if( !type_engine_import_uana_begin( env, "DCT", "UAna", env->global(), 425 if( !type_engine_import_uana_begin( env, "DCT", "UAna", env->global(),
426 DCT_ctor, DCT_dtor,426 DCT_ctor, DCT_dtor,
@@ -473,7 +473,7 @@ DLL_QUERY xform_query( Chuck_DL_Query * QUERY ) · 46 unmodified lines
473 // init as base class: IDCT473 // init as base class: IDCT
474 //---------------------------------------------------------------------474 //---------------------------------------------------------------------
475 475
476 doc = " This UAna computes the inverse Discrete Cosine Transform on incoming spectral frames (on demand), and overlap-adds the results into its internal buffer, ready to be sent to other UGen's connected via =>. The window size (along with an arbitry window shape) is controlled via the .window method.";476 doc = "computes the inverse Discrete Cosine Transform on incoming spectral frames (on demand), and overlap-adds the results into its internal buffer, ready to be sent to other UGen's connected via =>. The window size (along with an arbitry window shape) is controlled via the .window method.";
477 477
478 if( !type_engine_import_uana_begin( env, "IDCT", "UAna", env->global(), 478 if( !type_engine_import_uana_begin( env, "IDCT", "UAna", env->global(),
479 IDCT_ctor, IDCT_dtor,479 IDCT_ctor, IDCT_dtor,
src/core/ugen_filter.cpp+62−62
@@ -80,7 +80,7 @@ DLL_QUERY filter_query( Chuck_DL_Query * QUERY ) · 79 unmodified lines
80 //---------------------------------------------------------------------80 //---------------------------------------------------------------------
81 // init as base class: FilterBasic81 // init as base class: FilterBasic
82 //---------------------------------------------------------------------82 //---------------------------------------------------------------------
83 doc = "Filter base class.";83 doc = "base class for basic filters with a notion of center/cutoff frequency and Q.";
84 if( !type_engine_import_ugen_begin( env, "FilterBasic", "UGen", env->global(), 84 if( !type_engine_import_ugen_begin( env, "FilterBasic", "UGen", env->global(),
85 FilterBasic_ctor, FilterBasic_dtor,85 FilterBasic_ctor, FilterBasic_dtor,
86 FilterBasic_tick, FilterBasic_pmsg,86 FilterBasic_tick, FilterBasic_pmsg,
@@ -94,26 +94,26 @@ DLL_QUERY filter_query( Chuck_DL_Query * QUERY ) · 7 unmodified lines
94 // freq94 // freq
95 func = make_new_mfun( "float", "freq", FilterBasic_ctrl_freq );95 func = make_new_mfun( "float", "freq", FilterBasic_ctrl_freq );
96 func->add_arg( "float", "val" );96 func->add_arg( "float", "val" );
97 func->doc = "Set filter cutoff/center frequency.";97 func->doc = "set filter cutoff/center frequency.";
98 if( !type_engine_import_mfun( env, func ) ) goto error;98 if( !type_engine_import_mfun( env, func ) ) goto error;
99 func = make_new_mfun( "float", "freq", FilterBasic_cget_freq );99 func = make_new_mfun( "float", "freq", FilterBasic_cget_freq );
100 func->doc = "Get filter cutoff/center frequency.";100 func->doc = "get filter cutoff/center frequency.";
101 if( !type_engine_import_mfun( env, func ) ) goto error;101 if( !type_engine_import_mfun( env, func ) ) goto error;
102 102
103 // Q103 // Q
104 func = make_new_mfun( "float", "Q", FilterBasic_ctrl_Q );104 func = make_new_mfun( "float", "Q", FilterBasic_ctrl_Q );
105 func->add_arg( "float", "val" );105 func->add_arg( "float", "val" );
106 func->doc = "Set filter resonance.";106 func->doc = "set filter resonance.";
107 if( !type_engine_import_mfun( env, func ) ) goto error;107 if( !type_engine_import_mfun( env, func ) ) goto error;
108 func = make_new_mfun( "float", "Q", FilterBasic_cget_Q );108 func = make_new_mfun( "float", "Q", FilterBasic_cget_Q );
109 func->doc = "Get filter resonance.";109 func->doc = "get filter resonance.";
110 if( !type_engine_import_mfun( env, func ) ) goto error;110 if( !type_engine_import_mfun( env, func ) ) goto error;
111 111
112 // set112 // set
113 func = make_new_mfun( "void", "set", FilterBasic_ctrl_set );113 func = make_new_mfun( "void", "set", FilterBasic_ctrl_set );
114 func->add_arg( "float", "freq" );114 func->add_arg( "float", "freq" );
115 func->add_arg( "float", "Q" );115 func->add_arg( "float", "Q" );
116 func->doc = "Set filter frequency and resonance at the same time.";116 func->doc = "set filter frequency and resonance at the same time.";
117 if( !type_engine_import_mfun( env, func ) ) goto error;117 if( !type_engine_import_mfun( env, func ) ) goto error;
118 118
119 // end the class import119 // end the class import
@@ -161,7 +161,7 @@ DLL_QUERY filter_query( Chuck_DL_Query * QUERY ) · 41 unmodified lines
161 //---------------------------------------------------------------------161 //---------------------------------------------------------------------
162 // init class: BPF162 // init class: BPF
163 //---------------------------------------------------------------------163 //---------------------------------------------------------------------
164 doc = "Bandpass filter (2nd order Butterworth).";164 doc = "a bandpass filter (2nd order Butterworth).";
165 if( !type_engine_import_ugen_begin( env, "BPF", "FilterBasic", env->global(),165 if( !type_engine_import_ugen_begin( env, "BPF", "FilterBasic", env->global(),
166 BPF_ctor, NULL, BPF_tick, BPF_pmsg, doc.c_str() ) )166 BPF_ctor, NULL, BPF_tick, BPF_pmsg, doc.c_str() ) )
167 return FALSE;167 return FALSE;
@@ -171,26 +171,26 @@ DLL_QUERY filter_query( Chuck_DL_Query * QUERY ) · 3 unmodified lines
171 // freq171 // freq
172 func = make_new_mfun( "float", "freq", BPF_ctrl_freq );172 func = make_new_mfun( "float", "freq", BPF_ctrl_freq );
173 func->add_arg( "float", "val" );173 func->add_arg( "float", "val" );
174 func->doc = "Set filter center frequency.";174 func->doc = "set filter center frequency.";
175 if( !type_engine_import_mfun( env, func ) ) goto error;175 if( !type_engine_import_mfun( env, func ) ) goto error;
176 func = make_new_mfun( "float", "freq", BPF_cget_freq );176 func = make_new_mfun( "float", "freq", BPF_cget_freq );
177 func->doc = "Set filter center frequency.";177 func->doc = "set filter center frequency.";
178 if( !type_engine_import_mfun( env, func ) ) goto error;178 if( !type_engine_import_mfun( env, func ) ) goto error;
179 179
180 // Q180 // Q
181 func = make_new_mfun( "float", "Q", BPF_ctrl_Q );181 func = make_new_mfun( "float", "Q", BPF_ctrl_Q );
182 func->add_arg( "float", "val" );182 func->add_arg( "float", "val" );
183 func->doc = "Set filter resonance.";183 func->doc = "set filter resonance.";
184 if( !type_engine_import_mfun( env, func ) ) goto error;184 if( !type_engine_import_mfun( env, func ) ) goto error;
185 func = make_new_mfun( "float", "Q", BPF_cget_Q );185 func = make_new_mfun( "float", "Q", BPF_cget_Q );
186 func->doc = "Get filter resonance.";186 func->doc = "get filter resonance.";
187 if( !type_engine_import_mfun( env, func ) ) goto error;187 if( !type_engine_import_mfun( env, func ) ) goto error;
188 188
189 // set189 // set
190 func = make_new_mfun( "void", "set", BPF_ctrl_set );190 func = make_new_mfun( "void", "set", BPF_ctrl_set );
191 func->add_arg( "float", "freq" );191 func->add_arg( "float", "freq" );
192 func->add_arg( "float", "Q" );192 func->add_arg( "float", "Q" );
193 func->doc = "Set filter frequency and resonance at the same time.";193 func->doc = "get filter frequency and resonance at the same time.";
194 if( !type_engine_import_mfun( env, func ) ) goto error;194 if( !type_engine_import_mfun( env, func ) ) goto error;
195 195
196 // end the class import196 // end the class import
@@ -200,7 +200,7 @@ DLL_QUERY filter_query( Chuck_DL_Query * QUERY ) · 3 unmodified lines
200 //---------------------------------------------------------------------200 //---------------------------------------------------------------------
201 // init class: BRF201 // init class: BRF
202 //---------------------------------------------------------------------202 //---------------------------------------------------------------------
203 doc = "Band-reject filter (2nd order Butterworth).";203 doc = "a band-reject filter (2nd order Butterworth).";
204 if( !type_engine_import_ugen_begin( env, "BRF", "FilterBasic", env->global(),204 if( !type_engine_import_ugen_begin( env, "BRF", "FilterBasic", env->global(),
205 BRF_ctor, NULL, BRF_tick, BRF_pmsg, doc.c_str() ) )205 BRF_ctor, NULL, BRF_tick, BRF_pmsg, doc.c_str() ) )
206 return FALSE;206 return FALSE;
@@ -210,26 +210,26 @@ DLL_QUERY filter_query( Chuck_DL_Query * QUERY ) · 3 unmodified lines
210 // freq210 // freq
211 func = make_new_mfun( "float", "freq", BRF_ctrl_freq );211 func = make_new_mfun( "float", "freq", BRF_ctrl_freq );
212 func->add_arg( "float", "val" );212 func->add_arg( "float", "val" );
213 func->doc = "Set filter center frequency.";213 func->doc = "set filter center frequency.";
214 if( !type_engine_import_mfun( env, func ) ) goto error;214 if( !type_engine_import_mfun( env, func ) ) goto error;
215 func = make_new_mfun( "float", "freq", BRF_cget_freq );215 func = make_new_mfun( "float", "freq", BRF_cget_freq );
216 func->doc = "Get filter center frequency.";216 func->doc = "get filter center frequency.";
217 if( !type_engine_import_mfun( env, func ) ) goto error;217 if( !type_engine_import_mfun( env, func ) ) goto error;
218 218
219 // Q219 // Q
220 func = make_new_mfun( "float", "Q", BRF_ctrl_Q );220 func = make_new_mfun( "float", "Q", BRF_ctrl_Q );
221 func->add_arg( "float", "val" );221 func->add_arg( "float", "val" );
222 func->doc = "Set filter resonance.";222 func->doc = "set filter resonance.";
223 if( !type_engine_import_mfun( env, func ) ) goto error;223 if( !type_engine_import_mfun( env, func ) ) goto error;
224 func = make_new_mfun( "float", "Q", BRF_cget_Q );224 func = make_new_mfun( "float", "Q", BRF_cget_Q );
225 func->doc = "Get filter resonance.";225 func->doc = "get filter resonance.";
226 if( !type_engine_import_mfun( env, func ) ) goto error;226 if( !type_engine_import_mfun( env, func ) ) goto error;
227 227
228 // set228 // set
229 func = make_new_mfun( "void", "set", BRF_ctrl_set );229 func = make_new_mfun( "void", "set", BRF_ctrl_set );
230 func->add_arg( "float", "freq" );230 func->add_arg( "float", "freq" );
231 func->add_arg( "float", "Q" );231 func->add_arg( "float", "Q" );
232 func->doc = "Set filter frequency and resonance at the same time.";232 func->doc = "set filter frequency and resonance at the same time.";
233 if( !type_engine_import_mfun( env, func ) ) goto error;233 if( !type_engine_import_mfun( env, func ) ) goto error;
234 234
235 // end the class import235 // end the class import
@@ -239,7 +239,7 @@ DLL_QUERY filter_query( Chuck_DL_Query * QUERY ) · 3 unmodified lines
239 //---------------------------------------------------------------------239 //---------------------------------------------------------------------
240 // init class: RLPF240 // init class: RLPF
241 //---------------------------------------------------------------------241 //---------------------------------------------------------------------
242 doc = "Resonant low-pass filter (2nd order Butterworth).";242 doc = "a resonant low-pass filter (2nd order Butterworth).";
243 if( !type_engine_import_ugen_begin( env, "LPF", "FilterBasic", env->global(),243 if( !type_engine_import_ugen_begin( env, "LPF", "FilterBasic", env->global(),
244 RLPF_ctor, NULL, RLPF_tick, RLPF_pmsg, doc.c_str() ) )244 RLPF_ctor, NULL, RLPF_tick, RLPF_pmsg, doc.c_str() ) )
245 return FALSE;245 return FALSE;
@@ -249,26 +249,26 @@ DLL_QUERY filter_query( Chuck_DL_Query * QUERY ) · 3 unmodified lines
249 // freq249 // freq
250 func = make_new_mfun( "float", "freq", RLPF_ctrl_freq );250 func = make_new_mfun( "float", "freq", RLPF_ctrl_freq );
251 func->add_arg( "float", "val" );251 func->add_arg( "float", "val" );
252 func->doc = "Set filter cutoff frequency.";252 func->doc = "set filter cutoff frequency.";
253 if( !type_engine_import_mfun( env, func ) ) goto error;253 if( !type_engine_import_mfun( env, func ) ) goto error;
254 func = make_new_mfun( "float", "freq", RLPF_cget_freq );254 func = make_new_mfun( "float", "freq", RLPF_cget_freq );
255 func->doc = "Get filter cutoff frequency.";255 func->doc = "get filter cutoff frequency.";
256 if( !type_engine_import_mfun( env, func ) ) goto error;256 if( !type_engine_import_mfun( env, func ) ) goto error;
257 257
258 // Q258 // Q
259 func = make_new_mfun( "float", "Q", RLPF_ctrl_Q );259 func = make_new_mfun( "float", "Q", RLPF_ctrl_Q );
260 func->add_arg( "float", "val" );260 func->add_arg( "float", "val" );
261 func->doc = "Set filter resonance.";261 func->doc = "set filter resonance.";
262 if( !type_engine_import_mfun( env, func ) ) goto error;262 if( !type_engine_import_mfun( env, func ) ) goto error;
263 func = make_new_mfun( "float", "Q", RLPF_cget_Q );263 func = make_new_mfun( "float", "Q", RLPF_cget_Q );
264 func->doc = "Get filter resonance.";264 func->doc = "get filter resonance.";
265 if( !type_engine_import_mfun( env, func ) ) goto error;265 if( !type_engine_import_mfun( env, func ) ) goto error;
266 266
267 // set267 // set
268 func = make_new_mfun( "void", "set", RLPF_ctrl_set );268 func = make_new_mfun( "void", "set", RLPF_ctrl_set );
269 func->add_arg( "float", "freq" );269 func->add_arg( "float", "freq" );
270 func->add_arg( "float", "Q" );270 func->add_arg( "float", "Q" );
271 func->doc = "Set filter frequency and resonance at the same time.";271 func->doc = "set filter frequency and resonance at the same time.";
272 if( !type_engine_import_mfun( env, func ) ) goto error;272 if( !type_engine_import_mfun( env, func ) ) goto error;
273 273
274 // end the class import274 // end the class import
@@ -278,7 +278,7 @@ DLL_QUERY filter_query( Chuck_DL_Query * QUERY ) · 3 unmodified lines
278 //---------------------------------------------------------------------278 //---------------------------------------------------------------------
279 // init class: RHPF279 // init class: RHPF
280 //---------------------------------------------------------------------280 //---------------------------------------------------------------------
281 doc = "Resonant high-pass filter (2nd order Butterworth).";281 doc = "a resonant high-pass filter (2nd order Butterworth).";
282 if( !type_engine_import_ugen_begin( env, "HPF", "FilterBasic", env->global(),282 if( !type_engine_import_ugen_begin( env, "HPF", "FilterBasic", env->global(),
283 RHPF_ctor, NULL, RHPF_tick, RHPF_pmsg, doc.c_str() ) )283 RHPF_ctor, NULL, RHPF_tick, RHPF_pmsg, doc.c_str() ) )
284 return FALSE;284 return FALSE;
@@ -288,26 +288,26 @@ DLL_QUERY filter_query( Chuck_DL_Query * QUERY ) · 3 unmodified lines
288 // freq288 // freq
289 func = make_new_mfun( "float", "freq", RHPF_ctrl_freq );289 func = make_new_mfun( "float", "freq", RHPF_ctrl_freq );
290 func->add_arg( "float", "val" );290 func->add_arg( "float", "val" );
291 func->doc = "Set filter cutoff frequency.";291 func->doc = "set filter cutoff frequency.";
292 if( !type_engine_import_mfun( env, func ) ) goto error;292 if( !type_engine_import_mfun( env, func ) ) goto error;
293 func = make_new_mfun( "float", "freq", RHPF_cget_freq );293 func = make_new_mfun( "float", "freq", RHPF_cget_freq );
294 func->doc = "Get filter cutoff frequency.";294 func->doc = "get filter cutoff frequency.";
295 if( !type_engine_import_mfun( env, func ) ) goto error;295 if( !type_engine_import_mfun( env, func ) ) goto error;
296 296
297 // Q297 // Q
298 func = make_new_mfun( "float", "Q", RHPF_ctrl_Q );298 func = make_new_mfun( "float", "Q", RHPF_ctrl_Q );
299 func->add_arg( "float", "val" );299 func->add_arg( "float", "val" );
300 func->doc = "Set filter resonance.";300 func->doc = "set filter resonance.";
301 if( !type_engine_import_mfun( env, func ) ) goto error;301 if( !type_engine_import_mfun( env, func ) ) goto error;
302 func = make_new_mfun( "float", "Q", RHPF_cget_Q );302 func = make_new_mfun( "float", "Q", RHPF_cget_Q );
303 func->doc = "Get filter resonance.";303 func->doc = "get filter resonance.";
304 if( !type_engine_import_mfun( env, func ) ) goto error;304 if( !type_engine_import_mfun( env, func ) ) goto error;
305 305
306 // set306 // set
307 func = make_new_mfun( "void", "set", RHPF_ctrl_set );307 func = make_new_mfun( "void", "set", RHPF_ctrl_set );
308 func->add_arg( "float", "freq" );308 func->add_arg( "float", "freq" );
309 func->add_arg( "float", "Q" );309 func->add_arg( "float", "Q" );
310 func->doc = "Set filter frequency and resonance at the same time.";310 func->doc = "set filter frequency and resonance at the same time.";
311 if( !type_engine_import_mfun( env, func ) ) goto error;311 if( !type_engine_import_mfun( env, func ) ) goto error;
312 312
313 // end the class import313 // end the class import
@@ -317,7 +317,7 @@ DLL_QUERY filter_query( Chuck_DL_Query * QUERY ) · 3 unmodified lines
317 //---------------------------------------------------------------------317 //---------------------------------------------------------------------
318 // init class: ResonZ318 // init class: ResonZ
319 //---------------------------------------------------------------------319 //---------------------------------------------------------------------
320 doc = "Resonant filter. BiQuad with equal-gain zeros, keeps gain under control independent of frequency.";320 doc = "a resonance filter with equal-gain zeros; keeps gain under control independent of frequency.";
321 if( !type_engine_import_ugen_begin( env, "ResonZ", "FilterBasic", env->global(),321 if( !type_engine_import_ugen_begin( env, "ResonZ", "FilterBasic", env->global(),
322 ResonZ_ctor, NULL, ResonZ_tick, ResonZ_pmsg, doc.c_str() ) )322 ResonZ_ctor, NULL, ResonZ_tick, ResonZ_pmsg, doc.c_str() ) )
323 return FALSE;323 return FALSE;
@@ -327,26 +327,26 @@ DLL_QUERY filter_query( Chuck_DL_Query * QUERY ) · 3 unmodified lines
327 // freq327 // freq
328 func = make_new_mfun( "float", "freq", ResonZ_ctrl_freq );328 func = make_new_mfun( "float", "freq", ResonZ_ctrl_freq );
329 func->add_arg( "float", "val" );329 func->add_arg( "float", "val" );
330 func->doc = "Set filter center frequency.";330 func->doc = "set filter center frequency.";
331 if( !type_engine_import_mfun( env, func ) ) goto error;331 if( !type_engine_import_mfun( env, func ) ) goto error;
332 func = make_new_mfun( "float", "freq", ResonZ_cget_freq );332 func = make_new_mfun( "float", "freq", ResonZ_cget_freq );
333 func->doc = "Get filter center frequency.";333 func->doc = "get filter center frequency.";
334 if( !type_engine_import_mfun( env, func ) ) goto error;334 if( !type_engine_import_mfun( env, func ) ) goto error;
335 335
336 // reson336 // reson
337 func = make_new_mfun( "float", "Q", ResonZ_ctrl_Q );337 func = make_new_mfun( "float", "Q", ResonZ_ctrl_Q );
338 func->add_arg( "float", "val" );338 func->add_arg( "float", "val" );
339 func->doc = "Set filter resonance.";339 func->doc = "set filter resonance.";
340 if( !type_engine_import_mfun( env, func ) ) goto error;340 if( !type_engine_import_mfun( env, func ) ) goto error;
341 func = make_new_mfun( "float", "Q", ResonZ_cget_Q );341 func = make_new_mfun( "float", "Q", ResonZ_cget_Q );
342 func->doc = "Get filter resonance.";342 func->doc = "get filter resonance.";
343 if( !type_engine_import_mfun( env, func ) ) goto error;343 if( !type_engine_import_mfun( env, func ) ) goto error;
344 344
345 // set345 // set
346 func = make_new_mfun( "void", "set", ResonZ_ctrl_set );346 func = make_new_mfun( "void", "set", ResonZ_ctrl_set );
347 func->add_arg( "float", "freq" );347 func->add_arg( "float", "freq" );
348 func->add_arg( "float", "Q" );348 func->add_arg( "float", "Q" );
349 func->doc = "Set filter frequency and resonance at the same time.";349 func->doc = "set filter frequency and resonance at the same time.";
350 if( !type_engine_import_mfun( env, func ) ) goto error;350 if( !type_engine_import_mfun( env, func ) ) goto error;
351 351
352 // end the class import352 // end the class import
@@ -356,7 +356,7 @@ DLL_QUERY filter_query( Chuck_DL_Query * QUERY ) · 3 unmodified lines
356 //---------------------------------------------------------------------356 //---------------------------------------------------------------------
357 // init as base class: BiQuad357 // init as base class: BiQuad
358 //---------------------------------------------------------------------358 //---------------------------------------------------------------------
359 doc = "STK biquad (two-pole, two-zero) filter class. A method is provided for creating a resonance in the frequency response while maintaining a constant filter gain.";359 doc = "a BiQuad (two-pole, two-zero) filter section from STK. A method is provided for creating a resonance in the frequency response while maintaining a constant filter gain.";
360 if( !type_engine_import_ugen_begin( env, "BiQuad", "UGen", env->global(), 360 if( !type_engine_import_ugen_begin( env, "BiQuad", "UGen", env->global(),
361 biquad_ctor, biquad_dtor, biquad_tick, NULL, doc.c_str() ) )361 biquad_ctor, biquad_dtor, biquad_tick, NULL, doc.c_str() ) )
362 return FALSE;362 return FALSE;
@@ -368,115 +368,115 @@ DLL_QUERY filter_query( Chuck_DL_Query * QUERY ) · 5 unmodified lines
368 // pfreq368 // pfreq
369 func = make_new_mfun ( "float", "pfreq", biquad_ctrl_pfreq );369 func = make_new_mfun ( "float", "pfreq", biquad_ctrl_pfreq );
370 func->add_arg ( "float", "freq" );370 func->add_arg ( "float", "freq" );
371 func->doc = "Set resonance frequency (poles).";371 func->doc = "set resonance frequency (poles).";
372 if( !type_engine_import_mfun( env, func ) ) goto error; 372 if( !type_engine_import_mfun( env, func ) ) goto error;
373 func = make_new_mfun ( "float", "pfreq", biquad_cget_pfreq );373 func = make_new_mfun ( "float", "pfreq", biquad_cget_pfreq );
374 func->doc = "Get resonance frequency (poles).";374 func->doc = "get resonance frequency (poles).";
375 if( !type_engine_import_mfun( env, func ) ) goto error;375 if( !type_engine_import_mfun( env, func ) ) goto error;
376 376
377 // prad377 // prad
378 func = make_new_mfun ( "float", "prad", biquad_ctrl_prad );378 func = make_new_mfun ( "float", "prad", biquad_ctrl_prad );
379 func->add_arg ( "float", "value" );379 func->add_arg ( "float", "value" );
380 func->doc = "Set Pole radius (values greater than 1 will be unstable).";380 func->doc = "set Pole radius (values greater than 1 will be unstable).";
381 if( !type_engine_import_mfun( env, func ) ) goto error; 381 if( !type_engine_import_mfun( env, func ) ) goto error;
382 func = make_new_mfun ( "float", "prad", biquad_cget_prad );382 func = make_new_mfun ( "float", "prad", biquad_cget_prad );
383 func->doc = "Get pole radius.";383 func->doc = "get pole radius.";
384 if( !type_engine_import_mfun( env, func ) ) goto error;384 if( !type_engine_import_mfun( env, func ) ) goto error;
385 385
386 // zfreq386 // zfreq
387 func = make_new_mfun ( "float", "zfreq", biquad_ctrl_zfreq );387 func = make_new_mfun ( "float", "zfreq", biquad_ctrl_zfreq );
388 func->add_arg ( "float", "freq" );388 func->add_arg ( "float", "freq" );
389 func->doc = "Set notch frequency.";389 func->doc = "set notch frequency.";
390 if( !type_engine_import_mfun( env, func ) ) goto error; 390 if( !type_engine_import_mfun( env, func ) ) goto error;
391 func = make_new_mfun ( "float", "zfreq", biquad_cget_zfreq );391 func = make_new_mfun ( "float", "zfreq", biquad_cget_zfreq );
392 func->doc = "Get notch frequency.";392 func->doc = "get notch frequency.";
393 if( !type_engine_import_mfun( env, func ) ) goto error;393 if( !type_engine_import_mfun( env, func ) ) goto error;
394 394
395 // zrad395 // zrad
396 func = make_new_mfun ( "float", "zrad", biquad_ctrl_zrad );396 func = make_new_mfun ( "float", "zrad", biquad_ctrl_zrad );
397 func->add_arg ( "float", "value" );397 func->add_arg ( "float", "value" );
398 func->doc = "Set zero radius.";398 func->doc = "set zero radius.";
399 if( !type_engine_import_mfun( env, func ) ) goto error; 399 if( !type_engine_import_mfun( env, func ) ) goto error;
400 func = make_new_mfun ( "float", "zrad", biquad_cget_zrad );400 func = make_new_mfun ( "float", "zrad", biquad_cget_zrad );
401 func->doc = "Get zero radius.";401 func->doc = "get zero radius.";
402 if( !type_engine_import_mfun( env, func ) ) goto error;402 if( !type_engine_import_mfun( env, func ) ) goto error;
403 403
404 // norm404 // norm
405 func = make_new_mfun ( "int", "norm", biquad_ctrl_norm );405 func = make_new_mfun ( "int", "norm", biquad_ctrl_norm );
406 func->add_arg ( "int", "value" );406 func->add_arg ( "int", "value" );
407 func->doc = "Toggle normalization.";407 func->doc = "toggle normalization.";
408 if( !type_engine_import_mfun( env, func ) ) goto error; 408 if( !type_engine_import_mfun( env, func ) ) goto error;
409 func = make_new_mfun ( "int", "norm", biquad_cget_norm );409 func = make_new_mfun ( "int", "norm", biquad_cget_norm );
410 func->doc = "Get normalization.";410 func->doc = "get normalization setting.";
411 if( !type_engine_import_mfun( env, func ) ) goto error;411 if( !type_engine_import_mfun( env, func ) ) goto error;
412 412
413 // pregain413 // pregain
414 func = make_new_mfun ( "float", "pregain", biquad_ctrl_pregain );414 func = make_new_mfun ( "float", "pregain", biquad_ctrl_pregain );
415 func->add_arg ( "float", "level" );415 func->add_arg ( "float", "level" );
416 func->doc = "Set pregain.";416 func->doc = "set pregain.";
417 if( !type_engine_import_mfun( env, func ) ) goto error;417 if( !type_engine_import_mfun( env, func ) ) goto error;
418 func = make_new_mfun ( "float", "pregain", biquad_cget_pregain );418 func = make_new_mfun ( "float", "pregain", biquad_cget_pregain );
419 func->doc = "Get pregain.";419 func->doc = "get pregain.";
420 if( !type_engine_import_mfun( env, func ) ) goto error;420 if( !type_engine_import_mfun( env, func ) ) goto error;
421 421
422 // eqzs422 // eqzs
423 func = make_new_mfun ( "int", "eqzs", biquad_ctrl_eqzs );423 func = make_new_mfun ( "int", "eqzs", biquad_ctrl_eqzs );
424 func->add_arg ( "int", "value" );424 func->add_arg ( "int", "value" );
425 func->doc = "Toggle equal-gain zeroes. ";425 func->doc = "enable equal-gain zeroes.";
426 if( !type_engine_import_mfun( env, func ) ) goto error;426 if( !type_engine_import_mfun( env, func ) ) goto error;
427 427
428 // b0428 // b0
429 func = make_new_mfun ( "float", "b0", biquad_ctrl_b0 );429 func = make_new_mfun ( "float", "b0", biquad_ctrl_b0 );
430 func->add_arg ( "float", "value" );430 func->add_arg ( "float", "value" );
431 func->doc = "Set filter coefficient.";431 func->doc = "set filter coefficient.";
432 if( !type_engine_import_mfun( env, func ) ) goto error; 432 if( !type_engine_import_mfun( env, func ) ) goto error;
433 func = make_new_mfun ( "float", "b0", biquad_cget_b0 );433 func = make_new_mfun ( "float", "b0", biquad_cget_b0 );
434 func->doc = "Get filter coefficient.";434 func->doc = "get filter coefficient.";
435 if( !type_engine_import_mfun( env, func ) ) goto error;435 if( !type_engine_import_mfun( env, func ) ) goto error;
436 436
437 // b1437 // b1
438 func = make_new_mfun ( "float", "b1", biquad_ctrl_b1 );438 func = make_new_mfun ( "float", "b1", biquad_ctrl_b1 );
439 func->add_arg ( "float", "value" );439 func->add_arg ( "float", "value" );
440 func->doc = "Set filter coefficient.";440 func->doc = "set filter coefficient.";
441 if( !type_engine_import_mfun( env, func ) ) goto error;441 if( !type_engine_import_mfun( env, func ) ) goto error;
442 func = make_new_mfun ( "float", "b1", biquad_cget_b1 );442 func = make_new_mfun ( "float", "b1", biquad_cget_b1 );
443 func->doc = "Get filter coefficient.";443 func->doc = "get filter coefficient.";
444 if( !type_engine_import_mfun( env, func ) ) goto error;444 if( !type_engine_import_mfun( env, func ) ) goto error;
445 445
446 // b2446 // b2
447 func = make_new_mfun ( "float", "b2", biquad_ctrl_b2 );447 func = make_new_mfun ( "float", "b2", biquad_ctrl_b2 );
448 func->add_arg ( "float", "value" );448 func->add_arg ( "float", "value" );
449 func->doc = "Set filter coefficient.";449 func->doc = "set filter coefficient.";
450 if( !type_engine_import_mfun( env, func ) ) goto error;450 if( !type_engine_import_mfun( env, func ) ) goto error;
451 func = make_new_mfun ( "float", "b2", biquad_cget_b2 );451 func = make_new_mfun ( "float", "b2", biquad_cget_b2 );
452 func->doc = "Get filter coefficient.";452 func->doc = "get filter coefficient.";
453 if( !type_engine_import_mfun( env, func ) ) goto error;453 if( !type_engine_import_mfun( env, func ) ) goto error;
454 454
455 // a0455 // a0
456 func = make_new_mfun ( "float", "a0", biquad_ctrl_a0 );456 func = make_new_mfun ( "float", "a0", biquad_ctrl_a0 );
457 func->add_arg ( "float", "value" );457 func->add_arg ( "float", "value" );
458 func->doc = "Set filter coefficient.";458 func->doc = "set filter coefficient.";
459 if( !type_engine_import_mfun( env, func ) ) goto error;459 if( !type_engine_import_mfun( env, func ) ) goto error;
460 func = make_new_mfun ( "float", "a0", biquad_cget_a0 );460 func = make_new_mfun ( "float", "a0", biquad_cget_a0 );
461 func->doc = "Get filter coefficient.";461 func->doc = "get filter coefficient.";
462 if( !type_engine_import_mfun( env, func ) ) goto error;462 if( !type_engine_import_mfun( env, func ) ) goto error;
463 463
464 // a1464 // a1
465 func = make_new_mfun ( "float", "a1", biquad_ctrl_a1 );465 func = make_new_mfun ( "float", "a1", biquad_ctrl_a1 );
466 func->add_arg ( "float", "value" );466 func->add_arg ( "float", "value" );
467 func->doc = "Set filter coefficient.";467 func->doc = "set filter coefficient.";
468 if( !type_engine_import_mfun( env, func ) ) goto error;468 if( !type_engine_import_mfun( env, func ) ) goto error;
469 func = make_new_mfun ( "float", "a1", biquad_cget_a1 );469 func = make_new_mfun ( "float", "a1", biquad_cget_a1 );
470 func->doc = "Get filter coefficient.";470 func->doc = "get filter coefficient.";
471 if( !type_engine_import_mfun( env, func ) ) goto error;471 if( !type_engine_import_mfun( env, func ) ) goto error;
472 472
473 // a2473 // a2
474 func = make_new_mfun ( "float", "a2", biquad_ctrl_a2 );474 func = make_new_mfun ( "float", "a2", biquad_ctrl_a2 );
475 func->add_arg ( "float", "value" );475 func->add_arg ( "float", "value" );
476 func->doc = "Set filter coefficient.";476 func->doc = "set filter coefficient.";
477 if( !type_engine_import_mfun( env, func ) ) goto error;477 if( !type_engine_import_mfun( env, func ) ) goto error;
478 func = make_new_mfun ( "float", "a2", biquad_cget_a2 );478 func = make_new_mfun ( "float", "a2", biquad_cget_a2 );
479 func->doc = "Get filter coefficient.";479 func->doc = "get filter coefficient.";
480 if( !type_engine_import_mfun( env, func ) ) goto error;480 if( !type_engine_import_mfun( env, func ) ) goto error;
481 481
482 // end the class import482 // end the class import
src/core/ugen_osc.cpp+40−39
@@ -71,7 +71,7 @@ DLL_QUERY osc_query( Chuck_DL_Query * QUERY ) · 70 unmodified lines
71 //---------------------------------------------------------------------71 //---------------------------------------------------------------------
72 // init as base class: osc72 // init as base class: osc
73 //---------------------------------------------------------------------73 //---------------------------------------------------------------------
74 doc = "Base class for simple oscillator unit generators.";74 doc = "base class for simple oscillator unit generators.";
75 if( !type_engine_import_ugen_begin( env, "Osc", "UGen", env->global(), 75 if( !type_engine_import_ugen_begin( env, "Osc", "UGen", env->global(),
76 osc_ctor, osc_dtor, osc_tick, osc_pmsg,76 osc_ctor, osc_dtor, osc_tick, osc_pmsg,
77 doc.c_str() ) )77 doc.c_str() ) )
@@ -84,42 +84,43 @@ DLL_QUERY osc_query( Chuck_DL_Query * QUERY ) · 6 unmodified lines
84 // add ctrl: freq84 // add ctrl: freq
85 func = make_new_mfun( "float", "freq", osc_ctrl_freq );85 func = make_new_mfun( "float", "freq", osc_ctrl_freq );
86 func->add_arg( "float", "hz" );86 func->add_arg( "float", "hz" );
87 func->doc = "Frequency of oscillator in Hertz (cycles per second).";87 func->doc = "set frequency of oscillator in Hertz; maintains phase.";
88 if( !type_engine_import_mfun( env, func ) ) goto error;88 if( !type_engine_import_mfun( env, func ) ) goto error;
89 func = make_new_mfun( "float", "freq", osc_cget_freq );89 func = make_new_mfun( "float", "freq", osc_cget_freq );
90 func->doc = "Frequency of oscillator in Hertz (cycles per second).";90 func->doc = "get frequency of oscillator in Hertz.";
91 if( !type_engine_import_mfun( env, func ) ) goto error;91 if( !type_engine_import_mfun( env, func ) ) goto error;
92 92
93 // add ctrl: period93 // add ctrl: period
94 func = make_new_mfun( "dur", "period", osc_ctrl_period );94 func = make_new_mfun( "dur", "period", osc_ctrl_period );
95 func->add_arg( "dur", "value" );95 func->add_arg( "dur", "value" );
96 func->doc = "Period of oscillator (inverse of frequency).";96 func->doc = "set period of oscillator (inverse of frequency).";
97 if( !type_engine_import_mfun( env, func ) ) goto error;97 if( !type_engine_import_mfun( env, func ) ) goto error;
98 func = make_new_mfun( "dur", "period", osc_cget_period );98 func = make_new_mfun( "dur", "period", osc_cget_period );
99 func->doc = "Period of oscillator (inverse of frequency).";99 func->doc = "get period of oscillator (inverse of frequency).";
100 if( !type_engine_import_mfun( env, func ) ) goto error;100 if( !type_engine_import_mfun( env, func ) ) goto error;
101 101
102 // add ctrl: sfreq ( == freq ) 102 // add ctrl: sfreq ( == freq )
103 func = make_new_mfun( "float", "sfreq", osc_ctrl_freq );103 func = make_new_mfun( "float", "sfreq", osc_ctrl_freq );
104 func->add_arg( "float", "hz" );104 func->add_arg( "float", "hz" );
105 func->doc = "set frequency of oscillator in Hertz; resets phase to 0.";
105 if( !type_engine_import_mfun( env, func ) ) goto error;106 if( !type_engine_import_mfun( env, func ) ) goto error;
106 107
107 // add ctrl: phase108 // add ctrl: phase
108 func = make_new_mfun( "float", "phase", osc_ctrl_phase );109 func = make_new_mfun( "float", "phase", osc_ctrl_phase );
109 func->add_arg( "float", "phase" );110 func->add_arg( "float", "phase" );
110 func->doc = "Oscillator phase, in range [0,1). ";111 func->doc = "set oscillator phase, in range [0,1).";
111 if( !type_engine_import_mfun( env, func ) ) goto error;112 if( !type_engine_import_mfun( env, func ) ) goto error;
112 func = make_new_mfun( "float", "phase", osc_cget_phase );113 func = make_new_mfun( "float", "phase", osc_cget_phase );
113 func->doc = "Oscillator phase, in range [0,1). ";114 func->doc = "get oscillator phase, in range [0,1).";
114 if( !type_engine_import_mfun( env, func ) ) goto error;115 if( !type_engine_import_mfun( env, func ) ) goto error;
115 116
116 // add ctrl: sync117 // add ctrl: sync
117 func = make_new_mfun( "int", "sync", osc_ctrl_sync );118 func = make_new_mfun( "int", "sync", osc_ctrl_sync );
118 func->add_arg( "int", "type" );119 func->add_arg( "int", "type" );
119 func->doc = "Mode for input (if any). 0: sync frequency to input, 1: sync phase to input, 2: frequency modulation (add input to set frequency)";120 func->doc = "choose how to interpret input: (0) sync frequency to input; (1) sync phase to input; (2) frequency modulation (add input to internal frequency).";
120 if( !type_engine_import_mfun( env, func ) ) goto error;121 if( !type_engine_import_mfun( env, func ) ) goto error;
121 func = make_new_mfun( "int", "sync", osc_cget_sync );122 func = make_new_mfun( "int", "sync", osc_cget_sync );
122 func->doc = "Mode for input (if any). 0: sync frequency to input, 1: sync phase to input, 2: frequency modulation (add input to set frequency)";123 func->doc = "get current interpretation of input: (0) sync frequency to input; (1) sync phase to input; (2) frequency modulation (add input to internal frequency).";
123 if( !type_engine_import_mfun( env, func ) ) goto error;124 if( !type_engine_import_mfun( env, func ) ) goto error;
124 125
125 // end the class import126 // end the class import
@@ -129,7 +130,7 @@ DLL_QUERY osc_query( Chuck_DL_Query * QUERY ) · 3 unmodified lines
129 //---------------------------------------------------------------------130 //---------------------------------------------------------------------
130 // phasor131 // phasor
131 //---------------------------------------------------------------------132 //---------------------------------------------------------------------
132 doc = "Phasor oscillator. Linearly rises from 0 to 1. Can be used as a phase control.";133 doc = "a phasor oscillator; linearly rises from 0 to 1; can be used as a phase control.";
133 if( !type_engine_import_ugen_begin( env, "Phasor", "Osc", env->global(), 134 if( !type_engine_import_ugen_begin( env, "Phasor", "Osc", env->global(),
134 NULL, NULL, osc_tick, NULL,135 NULL, NULL, osc_tick, NULL,
135 doc.c_str() ) )136 doc.c_str() ) )
@@ -141,7 +142,7 @@ DLL_QUERY osc_query( Chuck_DL_Query * QUERY ) · 5 unmodified lines
141 //---------------------------------------------------------------------142 //---------------------------------------------------------------------
142 // sinosc143 // sinosc
143 //---------------------------------------------------------------------144 //---------------------------------------------------------------------
144 doc = "Sine wave oscillator.";145 doc = "a sine wave oscillator.";
145 if( !type_engine_import_ugen_begin( env, "SinOsc", "Osc", env->global(),146 if( !type_engine_import_ugen_begin( env, "SinOsc", "Osc", env->global(),
146 NULL, NULL, sinosc_tick, NULL,147 NULL, NULL, sinosc_tick, NULL,
147 doc.c_str() ) )148 doc.c_str() ) )
@@ -156,7 +157,7 @@ DLL_QUERY osc_query( Chuck_DL_Query * QUERY ) · 8 unmodified lines
156 //---------------------------------------------------------------------157 //---------------------------------------------------------------------
157 // triosc - triangle oscillator158 // triosc - triangle oscillator
158 //---------------------------------------------------------------------159 //---------------------------------------------------------------------
159 doc = "Triangle wave oscillator.";160 doc = "a triangle wave oscillator.";
160 if( !type_engine_import_ugen_begin( env, "TriOsc", "Osc", env->global(),161 if( !type_engine_import_ugen_begin( env, "TriOsc", "Osc", env->global(),
161 NULL, NULL, triosc_tick, NULL,162 NULL, NULL, triosc_tick, NULL,
162 doc.c_str() ) )163 doc.c_str() ) )
@@ -164,11 +165,11 @@ DLL_QUERY osc_query( Chuck_DL_Query * QUERY ) · 1 unmodified line
164 165
165 func = make_new_mfun( "float", "width", osc_ctrl_width );166 func = make_new_mfun( "float", "width", osc_ctrl_width );
166 func->add_arg( "float", "width" );167 func->add_arg( "float", "width" );
167 func->doc = "Width of triangle wave (ratio of rise time to fall time).";168 func->doc = "set width of triangle wave (ratio of rise time to fall time).";
168 if( !type_engine_import_mfun( env, func ) ) goto error;169 if( !type_engine_import_mfun( env, func ) ) goto error;
169 170
170 func = make_new_mfun( "float", "width", osc_cget_width );171 func = make_new_mfun( "float", "width", osc_cget_width );
171 func->doc = "Width of triangle wave (ratio of rise time to fall time).";172 func->doc = "get width of triangle wave (ratio of rise time to fall time).";
172 if( !type_engine_import_mfun( env, func ) ) goto error;173 if( !type_engine_import_mfun( env, func ) ) goto error;
173 174
174 // end the class import175 // end the class import
@@ -178,7 +179,7 @@ DLL_QUERY osc_query( Chuck_DL_Query * QUERY ) · 3 unmodified lines
178 //---------------------------------------------------------------------179 //---------------------------------------------------------------------
179 // sawosc - sawtooth oscillator ( 0 | 1 triangle wave )180 // sawosc - sawtooth oscillator ( 0 | 1 triangle wave )
180 //---------------------------------------------------------------------181 //---------------------------------------------------------------------
181 doc = "Sawtooth wave oscillator.";182 doc = "sawtooth wave oscillator.";
182 if( !type_engine_import_ugen_begin( env, "SawOsc", "TriOsc", env->global(),183 if( !type_engine_import_ugen_begin( env, "SawOsc", "TriOsc", env->global(),
183 sawosc_ctor, NULL, NULL, NULL,184 sawosc_ctor, NULL, NULL, NULL,
184 doc.c_str() ) )185 doc.c_str() ) )
@@ -186,11 +187,11 @@ DLL_QUERY osc_query( Chuck_DL_Query * QUERY ) · 1 unmodified line
186 187
187 func = make_new_mfun( "float", "width", sawosc_ctrl_width );188 func = make_new_mfun( "float", "width", sawosc_ctrl_width );
188 func->add_arg( "float", "width" );189 func->add_arg( "float", "width" );
189 func->doc = "Whether falling sawtooth wave (0) or rising sawtooth wave (1).";190 func->doc = "whether sawtooth wave is to fall (0) or rise (1).";
190 if( !type_engine_import_mfun( env, func ) ) goto error;191 if( !type_engine_import_mfun( env, func ) ) goto error;
191 192
192 func = make_new_mfun( "float", "width", osc_cget_width );193 func = make_new_mfun( "float", "width", osc_cget_width );
193 func->doc = "Whether falling sawtooth wave (0) or rising sawtooth wave (1).";194 func->doc = "whether sawtooth wave is to fall (0) or rise (1).";
194 if( !type_engine_import_mfun( env, func ) ) goto error;195 if( !type_engine_import_mfun( env, func ) ) goto error;
195 196
196 // end the class import197 // end the class import
@@ -200,7 +201,7 @@ DLL_QUERY osc_query( Chuck_DL_Query * QUERY ) · 3 unmodified lines
200 //---------------------------------------------------------------------201 //---------------------------------------------------------------------
201 // pulseosc - pulse-width oscillator202 // pulseosc - pulse-width oscillator
202 //---------------------------------------------------------------------203 //---------------------------------------------------------------------
203 doc = "Pulse width oscillator.";204 doc = "a pulse width oscillator.";
204 if( !type_engine_import_ugen_begin( env, "PulseOsc", "Osc", env->global(),205 if( !type_engine_import_ugen_begin( env, "PulseOsc", "Osc", env->global(),
205 NULL, NULL, pulseosc_tick, NULL,206 NULL, NULL, pulseosc_tick, NULL,
206 doc.c_str() ) )207 doc.c_str() ) )
@@ -208,11 +209,11 @@ DLL_QUERY osc_query( Chuck_DL_Query * QUERY ) · 1 unmodified line
208 209
209 func = make_new_mfun( "float", "width", osc_ctrl_width );210 func = make_new_mfun( "float", "width", osc_ctrl_width );
210 func->add_arg( "float", "width" );211 func->add_arg( "float", "width" );
211 func->doc = "Length of duty cycle [0,1).";212 func->doc = "set width of duty cycle [0,1).";
212 if( !type_engine_import_mfun( env, func ) ) goto error; 213 if( !type_engine_import_mfun( env, func ) ) goto error;
213 214
214 func = make_new_mfun( "float", "width", osc_cget_width );215 func = make_new_mfun( "float", "width", osc_cget_width );
215 func->doc = "Length of duty cycle [0,1).";216 func->doc = "get width of duty cycle [0,1)/";
216 if( !type_engine_import_mfun( env, func ) ) goto error;217 if( !type_engine_import_mfun( env, func ) ) goto error;
217 218
218 // end the class import219 // end the class import
@@ -222,14 +223,14 @@ DLL_QUERY osc_query( Chuck_DL_Query * QUERY ) · 3 unmodified lines
222 //---------------------------------------------------------------------223 //---------------------------------------------------------------------
223 // sqrosc - square_wave oscillator ( 0.5 pulse ) 224 // sqrosc - square_wave oscillator ( 0.5 pulse )
224 //---------------------------------------------------------------------225 //---------------------------------------------------------------------
225 doc = "Square wave oscillator (pulse with 0.5 duty cycle).";226 doc = "a square wave oscillator (same as PulseOsc with 0.5 duty cycle).";
226 if( !type_engine_import_ugen_begin( env, "SqrOsc", "PulseOsc", env->global(),227 if( !type_engine_import_ugen_begin( env, "SqrOsc", "PulseOsc", env->global(),
227 sqrosc_ctor, NULL, NULL, NULL,228 sqrosc_ctor, NULL, NULL, NULL,
228 doc.c_str() ) )229 doc.c_str() ) )
229 return FALSE;230 return FALSE;
230 231
231 func = make_new_mfun( "float", "width", sqrosc_ctrl_width );232 func = make_new_mfun( "float", "width", sqrosc_ctrl_width );
232 func->doc = "Length of duty cycle (always 0.5)";233 func->doc = "set width of duty cycle (always 0.5).";
233 if( !type_engine_import_mfun( env, func ) ) goto error; 234 if( !type_engine_import_mfun( env, func ) ) goto error;
234 235
235 // end the class import236 // end the class import
@@ -916,7 +917,7 @@ DLL_QUERY genX_query( Chuck_DL_Query * QUERY ) · 680 unmodified lines
916 std::string doc;917 std::string doc;
917 Chuck_DL_Func * func = NULL;918 Chuck_DL_Func * func = NULL;
918 919
919 doc = "Ported from rtcmix. See <a href=\"http://www.music.columbia.edu/cmix/makegens.html\">\920 doc = "ported from rtcmix. See <a href=\"http://www.music.columbia.edu/cmix/makegens.html\">\
920 http://www.music.columbia.edu/cmix/makegens.html</a> \921 http://www.music.columbia.edu/cmix/makegens.html</a> \
921 for more information on the GenX family of UGens. Currently coefficients past \922 for more information on the GenX family of UGens. Currently coefficients past \
922 the 100th are ignored.\923 the 100th are ignored.\
@@ -940,12 +941,12 @@ DLL_QUERY genX_query( Chuck_DL_Query * QUERY ) · 17 unmodified lines
940 941
941 func = make_new_mfun( "float", "lookup", genX_lookup ); //lookup table value942 func = make_new_mfun( "float", "lookup", genX_lookup ); //lookup table value
942 func->add_arg( "float", "which" );943 func->add_arg( "float", "which" );
943 func->doc = "Returns lookup table value at index i [ -1, 1 ]. Absolute value is used in the range [ -1, 0 ).";944 func->doc = "get lookup table value at index i [ -1, 1 ]; absolute value is used in the range [ -1, 0 )";
944 if( !type_engine_import_mfun( env, func ) ) goto error;945 if( !type_engine_import_mfun( env, func ) ) goto error;
945 946
946 func = make_new_mfun( "float[]", "coefs", genX_coeffs ); //load table947 func = make_new_mfun( "float[]", "coefs", genX_coeffs ); //load table
947 func->add_arg( "float", "v[]" );948 func->add_arg( "float", "v[]" );
948 func->doc = "Set lookup table coefficients. Meaning is dependent on subclass.";949 func->doc = "set lookup table coefficients; meaning is dependent on subclass";
949 if( !type_engine_import_mfun( env, func ) ) goto error;950 if( !type_engine_import_mfun( env, func ) ) goto error;
950 951
951 // end the class import952 // end the class import
@@ -955,7 +956,7 @@ DLL_QUERY genX_query( Chuck_DL_Query * QUERY ) · 3 unmodified lines
955 //---------------------------------------------------------------------956 //---------------------------------------------------------------------
956 // gen5957 // gen5
957 //---------------------------------------------------------------------958 //---------------------------------------------------------------------
958 doc = "Constructs a lookup table composed of sequential exponential curves. "959 doc = "constructs a lookup table composed of sequential exponential curves. "
959 "For a table with N curves, starting value of y', and value yn for lookup "960 "For a table with N curves, starting value of y', and value yn for lookup "
960 "index xn, set the coefficients to [ y', y0, x0, ..., yN-1, xN-1 ]. "961 "index xn, set the coefficients to [ y', y0, x0, ..., yN-1, xN-1 ]. "
961 "Note that there must be an odd number of coefficients. "962 "Note that there must be an odd number of coefficients. "
@@ -969,7 +970,7 @@ DLL_QUERY genX_query( Chuck_DL_Query * QUERY ) · 7 unmodified lines
969 970
970 func = make_new_mfun( "float[]", "coefs", gen5_coeffs ); //load table971 func = make_new_mfun( "float[]", "coefs", gen5_coeffs ); //load table
971 func->add_arg( "float", "v[]" );972 func->add_arg( "float", "v[]" );
972 func->doc = "Set lookup table coefficients.";973 func->doc = "set lookup table coefficients.";
973 if( !type_engine_import_mfun( env, func ) ) goto error;974 if( !type_engine_import_mfun( env, func ) ) goto error;
974 975
975 // end the class import976 // end the class import
@@ -980,7 +981,7 @@ DLL_QUERY genX_query( Chuck_DL_Query * QUERY ) · 4 unmodified lines
980 //---------------------------------------------------------------------981 //---------------------------------------------------------------------
981 // gen7982 // gen7
982 //---------------------------------------------------------------------983 //---------------------------------------------------------------------
983 doc = "Constructs a lookup table composed of sequential line segments. "984 doc = "constructs a lookup table composed of sequential line segments. "
984 "For a table with N lines, starting value of y', and value yn for lookup"985 "For a table with N lines, starting value of y', and value yn for lookup"
985 "index xn, set the coefficients to [ y', y0, x0, ..., yN-1, xN-1 ]. "986 "index xn, set the coefficients to [ y', y0, x0, ..., yN-1, xN-1 ]. "
986 "Note that there must be an odd number of coefficients. "987 "Note that there must be an odd number of coefficients. "
@@ -993,7 +994,7 @@ DLL_QUERY genX_query( Chuck_DL_Query * QUERY ) · 6 unmodified lines
993 994
994 func = make_new_mfun( "float[]", "coefs", gen7_coeffs ); //load table995 func = make_new_mfun( "float[]", "coefs", gen7_coeffs ); //load table
995 func->add_arg( "float", "v[]" );996 func->add_arg( "float", "v[]" );
996 func->doc = "Set lookup table coefficients.";997 func->doc = "set lookup table coefficients.";
997 if( !type_engine_import_mfun( env, func ) ) goto error;998 if( !type_engine_import_mfun( env, func ) ) goto error;
998 999
999 // end the class import1000 // end the class import
@@ -1003,7 +1004,7 @@ DLL_QUERY genX_query( Chuck_DL_Query * QUERY ) · 3 unmodified lines
1003 //---------------------------------------------------------------------1004 //---------------------------------------------------------------------
1004 // gen91005 // gen9
1005 //---------------------------------------------------------------------1006 //---------------------------------------------------------------------
1006 doc = "Constructs a lookup table of partials with specified amplitudes, "1007 doc = "constructs a lookup table of partials with specified amplitudes, "
1007 "phases, and harmonic ratios to the fundamental. "1008 "phases, and harmonic ratios to the fundamental. "
1008 "Coefficients are specified in triplets of [ ratio, amplitude, phase ] "1009 "Coefficients are specified in triplets of [ ratio, amplitude, phase ] "
1009 "arranged in a single linear array.";1010 "arranged in a single linear array.";
@@ -1014,7 +1015,7 @@ DLL_QUERY genX_query( Chuck_DL_Query * QUERY ) · 4 unmodified lines
1014 1015
1015 func = make_new_mfun( "float[]", "coefs", gen9_coeffs ); //load table1016 func = make_new_mfun( "float[]", "coefs", gen9_coeffs ); //load table
1016 func->add_arg( "float", "v[]" );1017 func->add_arg( "float", "v[]" );
1017 func->doc = "Set lookup table coefficients.";1018 func->doc = "set lookup table coefficients.";
1018 if( !type_engine_import_mfun( env, func ) ) goto error;1019 if( !type_engine_import_mfun( env, func ) ) goto error;
1019 1020
1020 // end the class import1021 // end the class import
@@ -1025,7 +1026,7 @@ DLL_QUERY genX_query( Chuck_DL_Query * QUERY ) · 4 unmodified lines
1025 //---------------------------------------------------------------------1026 //---------------------------------------------------------------------
1026 // gen101027 // gen10
1027 //---------------------------------------------------------------------1028 //---------------------------------------------------------------------
1028 doc = "Constructs a lookup table of harmonic partials with specified "1029 doc = "constructs a lookup table of harmonic partials with specified "
1029 "amplitudes. The amplitude of partial n is specified by the nth element of "1030 "amplitudes. The amplitude of partial n is specified by the nth element of "
1030 "the coefficients. For example, setting coefs to [ 1 ] will produce a sine wave.";1031 "the coefficients. For example, setting coefs to [ 1 ] will produce a sine wave.";
1031 1032
@@ -1035,7 +1036,7 @@ DLL_QUERY genX_query( Chuck_DL_Query * QUERY ) · 3 unmodified lines
1035 1036
1036 func = make_new_mfun( "float[]", "coefs", gen10_coeffs ); //load table1037 func = make_new_mfun( "float[]", "coefs", gen10_coeffs ); //load table
1037 func->add_arg( "float", "v[]" );1038 func->add_arg( "float", "v[]" );
1038 func->doc = "Set lookup table coefficients.";1039 func->doc = "set lookup table coefficients.";
1039 if( !type_engine_import_mfun( env, func ) ) goto error;1040 if( !type_engine_import_mfun( env, func ) ) goto error;
1040 1041
1041 // end the class import1042 // end the class import
@@ -1045,7 +1046,7 @@ DLL_QUERY genX_query( Chuck_DL_Query * QUERY ) · 3 unmodified lines
1045 //---------------------------------------------------------------------1046 //---------------------------------------------------------------------
1046 // gen171047 // gen17
1047 //---------------------------------------------------------------------1048 //---------------------------------------------------------------------
1048 doc = "Constructs a Chebyshev polynomial wavetable with harmonic partials "1049 doc = "constructs a Chebyshev polynomial wavetable with harmonic partials "
1049 "of specified weights. The weight of partial n is specified by the nth "1050 "of specified weights. The weight of partial n is specified by the nth "
1050 "element of the coefficients. Primarily used for waveshaping, driven by a "1051 "element of the coefficients. Primarily used for waveshaping, driven by a "
1051 "SinOsc instead of a Phasor. See "1052 "SinOsc instead of a Phasor. See "
@@ -1060,7 +1061,7 @@ DLL_QUERY genX_query( Chuck_DL_Query * QUERY ) · 8 unmodified lines
1060 1061
1061 func = make_new_mfun( "float[]", "coefs", gen17_coeffs ); //load table1062 func = make_new_mfun( "float[]", "coefs", gen17_coeffs ); //load table
1062 func->add_arg( "float", "v[]" );1063 func->add_arg( "float", "v[]" );
1063 func->doc = "Set lookup table coefficients.";1064 func->doc = "set lookup table coefficients.";
1064 if( !type_engine_import_mfun( env, func ) ) goto error;1065 if( !type_engine_import_mfun( env, func ) ) goto error;
1065 1066
1066 // end the class import1067 // end the class import
@@ -1069,7 +1070,7 @@ DLL_QUERY genX_query( Chuck_DL_Query * QUERY ) · 2 unmodified lines
1069 //---------------------------------------------------------------------1070 //---------------------------------------------------------------------
1070 // Curve1071 // Curve
1071 //---------------------------------------------------------------------1072 //---------------------------------------------------------------------
1072 doc = "Constructs a wavetable composed of segments of variable times, "1073 doc = "constructs a wavetable composed of segments of variable times, "
1073 "values, and curvatures. Coefficients are specified as a single linear "1074 "values, and curvatures. Coefficients are specified as a single linear "
1074 "array of triplets of [ time, value, curvature ] followed by a final duple "1075 "array of triplets of [ time, value, curvature ] followed by a final duple "
1075 "of [ time, value ] to specify the final value of the table. time values "1076 "of [ time, value ] to specify the final value of the table. time values "
@@ -1083,7 +1084,7 @@ DLL_QUERY genX_query( Chuck_DL_Query * QUERY ) · 7 unmodified lines
1083 1084
1084 func = make_new_mfun( "float[]", "coefs", curve_coeffs ); //load table1085 func = make_new_mfun( "float[]", "coefs", curve_coeffs ); //load table
1085 func->add_arg( "float", "v[]" );1086 func->add_arg( "float", "v[]" );
1086 func->doc = "Set lookup table coefficients.";1087 func->doc = "set lookup table coefficients.";
1087 if( !type_engine_import_mfun( env, func ) ) goto error;1088 if( !type_engine_import_mfun( env, func ) ) goto error;
1088 1089
1089 // end the class import1090 // end the class import
@@ -1092,7 +1093,7 @@ DLL_QUERY genX_query( Chuck_DL_Query * QUERY ) · 2 unmodified lines
1092 //---------------------------------------------------------------------1093 //---------------------------------------------------------------------
1093 // Warp1094 // Warp
1094 //---------------------------------------------------------------------1095 //---------------------------------------------------------------------
1095 doc = "";1096 doc = "...";
1096 1097
1097 if( !type_engine_import_ugen_begin( env, "WarpTable", "GenX", env->global(),1098 if( !type_engine_import_ugen_begin( env, "WarpTable", "GenX", env->global(),
1098 NULL, NULL, genX_tick, NULL, doc.c_str() ) )1099 NULL, NULL, genX_tick, NULL, doc.c_str() ) )
@@ -1100,7 +1101,7 @@ DLL_QUERY genX_query( Chuck_DL_Query * QUERY ) · 1 unmodified line
1100 1101
1101 func = make_new_mfun( "float[]", "coefs", warp_coeffs ); //load table1102 func = make_new_mfun( "float[]", "coefs", warp_coeffs ); //load table
1102 func->add_arg( "float", "v[]" );1103 func->add_arg( "float", "v[]" );
1103 func->doc = "Set lookup table coefficients.";1104 func->doc = "set lookup table coefficients.";
1104 if( !type_engine_import_mfun( env, func ) ) goto error;1105 if( !type_engine_import_mfun( env, func ) ) goto error;
1105 1106
1106 /*1107 /*
src/core/ugen_stk.cpp+600−600
@@ -1256,10 +1256,10 @@ DLL_QUERY stk_query( Chuck_DL_Query * QUERY ) · 1255 unmodified lines
1256 //! \section stk - instruments1256 //! \section stk - instruments
1257 1257
1258 //------------------------------------------------------------------------1258 //------------------------------------------------------------------------
1259 // begin Instrmnt ugen1259 // begin StkInstrument UGen
1260 //------------------------------------------------------------------------1260 //------------------------------------------------------------------------
1261 1261
1262 doc = "Super-class for STK instruments.";1262 doc = "base class for STK instruments.";
1263 1263
1264 if( !type_engine_import_ugen_begin( env, "StkInstrument", "UGen", env->global(),1264 if( !type_engine_import_ugen_begin( env, "StkInstrument", "UGen", env->global(),
1265 Instrmnt_ctor, NULL, Instrmnt_tick, Instrmnt_pmsg,1265 Instrmnt_ctor, NULL, Instrmnt_tick, Instrmnt_pmsg,
@@ -1270,27 +1270,27 @@ DLL_QUERY stk_query( Chuck_DL_Query * QUERY ) · 4 unmodified lines
1270 1270
1271 func = make_new_mfun( "float", "noteOn", Instrmnt_ctrl_noteOn ); //! note on1271 func = make_new_mfun( "float", "noteOn", Instrmnt_ctrl_noteOn ); //! note on
1272 func->add_arg( "float", "value" );1272 func->add_arg( "float", "value" );
1273 func->doc = "Trigger note on.";1273 func->doc = "trigger note on.";
1274 if( !type_engine_import_mfun( env, func ) ) goto error;1274 if( !type_engine_import_mfun( env, func ) ) goto error;
1275 1275
1276 func = make_new_mfun( "float", "noteOff", Instrmnt_ctrl_noteOff ); //! note off1276 func = make_new_mfun( "float", "noteOff", Instrmnt_ctrl_noteOff ); //! note off
1277 func->add_arg( "float", "value" );1277 func->add_arg( "float", "value" );
1278 func->doc = "Trigger note off.";1278 func->doc = "trigger note off.";
1279 if( !type_engine_import_mfun( env, func ) ) goto error;1279 if( !type_engine_import_mfun( env, func ) ) goto error;
1280 1280
1281 func = make_new_mfun( "float", "freq", Instrmnt_ctrl_freq ); //! frequency1281 func = make_new_mfun( "float", "freq", Instrmnt_ctrl_freq ); //! frequency
1282 func->add_arg( "float", "value" );1282 func->add_arg( "float", "value" );
1283 func->doc = "Set frequency.";1283 func->doc = "set frequency.";
1284 if( !type_engine_import_mfun( env, func ) ) goto error;1284 if( !type_engine_import_mfun( env, func ) ) goto error;
1285 1285
1286 func = make_new_mfun( "float", "freq", Instrmnt_cget_freq ); //! frequency1286 func = make_new_mfun( "float", "freq", Instrmnt_cget_freq ); //! frequency
1287 func->doc = "Get frequency.";1287 func->doc = "get frequency.";
1288 if( !type_engine_import_mfun( env, func ) ) goto error;1288 if( !type_engine_import_mfun( env, func ) ) goto error;
1289 1289
1290 func = make_new_mfun( "void", "controlChange", Instrmnt_ctrl_controlChange ); //! control change1290 func = make_new_mfun( "void", "controlChange", Instrmnt_ctrl_controlChange ); //! control change
1291 func->add_arg( "int", "ctrl" );1291 func->add_arg( "int", "ctrl" );
1292 func->add_arg( "float", "value" );1292 func->add_arg( "float", "value" );
1293 func->doc = "Assert control change; numbers are instrument specific, value range: [0.0 - 128.0]";1293 func->doc = "assert control change; numbers are instrument specific, value range: [0.0 - 127.0]";
1294 if( !type_engine_import_mfun( env, func ) ) goto error;1294 if( !type_engine_import_mfun( env, func ) ) goto error;
1295 1295
1296 // end the class import1296 // end the class import
@@ -1301,7 +1301,7 @@ DLL_QUERY stk_query( Chuck_DL_Query * QUERY ) · 4 unmodified lines
1301 // begin BandedWG ugen1301 // begin BandedWG ugen
1302 //------------------------------------------------------------------------1302 //------------------------------------------------------------------------
1303 1303
1304 doc = "This class uses banded waveguide techniques to model a variety of sounds, including bowed bars, glasses, and bowls. For more information, see Essl, G. and Cook, P. 'Banded Waveguides: Towards Physical Modelling of Bar Percussion Instruments', Proceedings of the 1999 International Computer Music Conference.\n\1304 doc = "a banded waveguide model for generating a variety of sounds, including bowed bars, glasses, and bowls. For more information, see Essl and Cook 'Banded Waveguides: Towards Physical Modelling of Bar Percussion Instruments', In Proceedings of the 1999 International Computer Music Conference.\n\
1305\n\1305\n\
1306Control Change Numbers:\n\1306Control Change Numbers:\n\
1307\n\1307\n\
@@ -1334,80 +1334,80 @@ Modified for Stk 4.0 by Gary Scavone."; · 26 unmodified lines
1334 1334
1335 func = make_new_mfun( "float", "pluck", BandedWG_ctrl_pluck ); //! pluck waveguide1335 func = make_new_mfun( "float", "pluck", BandedWG_ctrl_pluck ); //! pluck waveguide
1336 func->add_arg( "float", "value" );1336 func->add_arg( "float", "value" );
1337 func->doc = "Pluck instrument, [0.0-1.0].";1337 func->doc = "pluck instrument, [0.0-1.0].";
1338 if( !type_engine_import_mfun( env, func ) ) goto error;1338 if( !type_engine_import_mfun( env, func ) ) goto error;
1339 1339
1340 func = make_new_mfun( "float", "startBowing", BandedWG_ctrl_startBowing ); //! startBowing1340 func = make_new_mfun( "float", "startBowing", BandedWG_ctrl_startBowing ); //! startBowing
1341 func->add_arg( "float", "value" );1341 func->add_arg( "float", "value" );
1342 func->doc = "Start bowing, [0.0-1.0].";1342 func->doc = "start bowing, [0.0-1.0].";
1343 if( !type_engine_import_mfun( env, func ) ) goto error;1343 if( !type_engine_import_mfun( env, func ) ) goto error;
1344 1344
1345 func = make_new_mfun( "float", "stopBowing", BandedWG_ctrl_stopBowing ); //! stopBowing1345 func = make_new_mfun( "float", "stopBowing", BandedWG_ctrl_stopBowing ); //! stopBowing
1346 func->add_arg( "float", "value" );1346 func->add_arg( "float", "value" );
1347 func->doc = "Stop bowing, [0.0-1.0].";1347 func->doc = "stop bowing, [0.0-1.0].";
1348 if( !type_engine_import_mfun( env, func ) ) goto error;1348 if( !type_engine_import_mfun( env, func ) ) goto error;
1349 1349
1350 func = make_new_mfun( "float", "bowRate", BandedWG_ctrl_bowRate ); //! strike bowRate1350 func = make_new_mfun( "float", "bowRate", BandedWG_ctrl_bowRate ); //! strike bowRate
1351 func->add_arg( "float", "value" );1351 func->add_arg( "float", "value" );
1352 func->doc = "Set bowing rate (seconds).";1352 func->doc = "set bowing rate (seconds).";
1353 if( !type_engine_import_mfun( env, func ) ) goto error;1353 if( !type_engine_import_mfun( env, func ) ) goto error;
1354 1354
1355 func = make_new_mfun( "float", "bowRate", BandedWG_cget_bowRate ); //! strike bowRate1355 func = make_new_mfun( "float", "bowRate", BandedWG_cget_bowRate ); //! strike bowRate
1356 func->doc = "Get bowing rate (seconds).";1356 func->doc = "get bowing rate (seconds).";
1357 if( !type_engine_import_mfun( env, func ) ) goto error;1357 if( !type_engine_import_mfun( env, func ) ) goto error;
1358 1358
1359 func = make_new_mfun( "float", "bowPressure", BandedWG_ctrl_bowPressure ); //! bowPressure1359 func = make_new_mfun( "float", "bowPressure", BandedWG_ctrl_bowPressure ); //! bowPressure
1360 func->add_arg( "float", "value" );1360 func->add_arg( "float", "value" );
1361 func->doc = "Set bow pressure, [0.0-1.0].";1361 func->doc = "set bow pressure, [0.0-1.0].";
1362 if( !type_engine_import_mfun( env, func ) ) goto error;1362 if( !type_engine_import_mfun( env, func ) ) goto error;
1363 1363
1364 func = make_new_mfun( "float", "bowPressure", BandedWG_cget_bowPressure ); //! bowPressure1364 func = make_new_mfun( "float", "bowPressure", BandedWG_cget_bowPressure ); //! bowPressure
1365 func->doc = "Get bow pressure, [0.0-1.0].";1365 func->doc = "get bow pressure, [0.0-1.0].";
1366 if( !type_engine_import_mfun( env, func ) ) goto error;1366 if( !type_engine_import_mfun( env, func ) ) goto error;
1367 1367
1368 func = make_new_mfun( "float", "bowMotion", BandedWG_ctrl_bowMotion ); //! bowMotion1368 func = make_new_mfun( "float", "bowMotion", BandedWG_ctrl_bowMotion ); //! bowMotion
1369 func->add_arg( "float", "value" );1369 func->add_arg( "float", "value" );
1370 func->doc = "Set bow motion, [0.0-1.0].";1370 func->doc = "set bow motion, [0.0-1.0].";
1371 if( !type_engine_import_mfun( env, func ) ) goto error;1371 if( !type_engine_import_mfun( env, func ) ) goto error;
1372 1372
1373 func = make_new_mfun( "float", "bowMotion", BandedWG_cget_bowMotion ); //! bowMotion1373 func = make_new_mfun( "float", "bowMotion", BandedWG_cget_bowMotion ); //! bowMotion
1374 func->doc = "Get bow motion, [0.0-1.0].";1374 func->doc = "get bow motion, [0.0-1.0].";
1375 if( !type_engine_import_mfun( env, func ) ) goto error;1375 if( !type_engine_import_mfun( env, func ) ) goto error;
1376 1376
1377 func = make_new_mfun( "float", "integrationConstant", BandedWG_ctrl_vibratoFreq ); //! vibratoFreq1377 func = make_new_mfun( "float", "integrationConstant", BandedWG_ctrl_vibratoFreq ); //! vibratoFreq
1378 func->add_arg( "float", "value" );1378 func->add_arg( "float", "value" );
1379 func->doc = "Set integration constant, vibrato frequency.";1379 func->doc = "set integration constant, vibrato frequency.";
1380 if( !type_engine_import_mfun( env, func ) ) goto error;1380 if( !type_engine_import_mfun( env, func ) ) goto error;
1381 1381
1382 func = make_new_mfun( "float", "integrationConstant", BandedWG_cget_vibratoFreq ); //! vibratoFreq1382 func = make_new_mfun( "float", "integrationConstant", BandedWG_cget_vibratoFreq ); //! vibratoFreq
1383 func->doc = "Get integration constant, vibrato frequency.";1383 func->doc = "get integration constant, vibrato frequency.";
1384 if( !type_engine_import_mfun( env, func ) ) goto error;1384 if( !type_engine_import_mfun( env, func ) ) goto error;
1385 1385
1386 func = make_new_mfun( "float", "modesGain", BandedWG_ctrl_modesGain ); //! modesGain1386 func = make_new_mfun( "float", "modesGain", BandedWG_ctrl_modesGain ); //! modesGain
1387 func->add_arg( "float", "value" );1387 func->add_arg( "float", "value" );
1388 func->doc = "Set amplitude for modes.";1388 func->doc = "set amplitude for modes.";
1389 if( !type_engine_import_mfun( env, func ) ) goto error;1389 if( !type_engine_import_mfun( env, func ) ) goto error;
1390 1390
1391 func = make_new_mfun( "float", "modesGain", BandedWG_cget_modesGain ); //! modesGain1391 func = make_new_mfun( "float", "modesGain", BandedWG_cget_modesGain ); //! modesGain
1392 func->doc = "Get amplitude for modes.";1392 func->doc = "get amplitude for modes.";
1393 if( !type_engine_import_mfun( env, func ) ) goto error;1393 if( !type_engine_import_mfun( env, func ) ) goto error;
1394 1394
1395 func = make_new_mfun( "int", "preset", BandedWG_ctrl_preset ); //! preset1395 func = make_new_mfun( "int", "preset", BandedWG_ctrl_preset ); //! preset
1396 func->add_arg( "int", "value" );1396 func->add_arg( "int", "value" );
1397 func->doc = "Set instrument preset, (0-3, see above).";1397 func->doc = "set instrument preset, (0-3, see above).";
1398 if( !type_engine_import_mfun( env, func ) ) goto error;1398 if( !type_engine_import_mfun( env, func ) ) goto error;
1399 1399
1400 func = make_new_mfun( "int", "preset", BandedWG_cget_preset ); //! preset1400 func = make_new_mfun( "int", "preset", BandedWG_cget_preset ); //! preset
1401 func->doc = "Get instrument preset, (0-3, see above).";1401 func->doc = "get instrument preset, (0-3, see above).";
1402 if( !type_engine_import_mfun( env, func ) ) goto error;1402 if( !type_engine_import_mfun( env, func ) ) goto error;
1403 1403
1404 func = make_new_mfun( "float", "strikePosition", BandedWG_ctrl_strikePosition ); //! strike Position1404 func = make_new_mfun( "float", "strikePosition", BandedWG_ctrl_strikePosition ); //! strike Position
1405 func->add_arg( "float", "value" );1405 func->add_arg( "float", "value" );
1406 func->doc = "Set strike position, [0.0-1.0].";1406 func->doc = "set strike position, [0.0-1.0].";
1407 if( !type_engine_import_mfun( env, func ) ) goto error;1407 if( !type_engine_import_mfun( env, func ) ) goto error;
1408 1408
1409 func = make_new_mfun( "float", "strikePosition", BandedWG_cget_strikePosition ); //! strike Position1409 func = make_new_mfun( "float", "strikePosition", BandedWG_cget_strikePosition ); //! strike Position
1410 func->doc = "Get strike position, [0.0-1.0].";1410 func->doc = "get strike position, [0.0-1.0].";
1411 if( !type_engine_import_mfun( env, func ) ) goto error;1411 if( !type_engine_import_mfun( env, func ) ) goto error;
1412 1412
1413 // end the class import1413 // end the class import
@@ -1418,7 +1418,7 @@ Modified for Stk 4.0 by Gary Scavone."; · 4 unmodified lines
1418 // begin BlowBotl ugen1418 // begin BlowBotl ugen
1419 //------------------------------------------------------------------------1419 //------------------------------------------------------------------------
1420 1420
1421 doc = "This class implements a helmholtz resonator (biquad filter) with a polynomial jet excitation (a la Cook).\n\1421 doc = "a helmholtz resonator (BiQuad filter) with a polynomial jet excitation (a la Cook).\n\
1422\n\1422\n\
1423Control Change Numbers:\n\1423Control Change Numbers:\n\
1424\n\1424\n\
@@ -1442,57 +1442,57 @@ by Perry R. Cook and Gary P. Scavone, 1995 - 2002"; · 17 unmodified lines
1442 1442
1443 func = make_new_mfun( "float", "startBlowing", BlowBotl_ctrl_startBlowing ); //! note on1443 func = make_new_mfun( "float", "startBlowing", BlowBotl_ctrl_startBlowing ); //! note on
1444 func->add_arg( "float", "value" );1444 func->add_arg( "float", "value" );
1445 func->doc = "Start blowing, [0.0-1.0].";1445 func->doc = "start blowing, [0.0-1.0].";
1446 if( !type_engine_import_mfun( env, func ) ) goto error;1446 if( !type_engine_import_mfun( env, func ) ) goto error;
1447 1447
1448 func = make_new_mfun( "float", "stopBlowing", BlowBotl_ctrl_stopBlowing ); //! note on1448 func = make_new_mfun( "float", "stopBlowing", BlowBotl_ctrl_stopBlowing ); //! note on
1449 func->add_arg( "float", "value" );1449 func->add_arg( "float", "value" );
1450 func->doc = "Stop blowing, [0.0-1.0].";1450 func->doc = "stop blowing, [0.0-1.0].";
1451 if( !type_engine_import_mfun( env, func ) ) goto error;1451 if( !type_engine_import_mfun( env, func ) ) goto error;
1452 1452
1453 func = make_new_mfun( "float", "rate", BlowBotl_ctrl_rate ); //! attack rate1453 func = make_new_mfun( "float", "rate", BlowBotl_ctrl_rate ); //! attack rate
1454 func->add_arg( "float", "value" );1454 func->add_arg( "float", "value" );
1455 func->doc = "Set rate of attack";1455 func->doc = "set rate of attack";
1456 if( !type_engine_import_mfun( env, func ) ) goto error;1456 if( !type_engine_import_mfun( env, func ) ) goto error;
1457 1457
1458 func = make_new_mfun( "float", "rate", BlowBotl_cget_rate ); //! attack rate1458 func = make_new_mfun( "float", "rate", BlowBotl_cget_rate ); //! attack rate
1459 func->doc = "Get rate of attack";1459 func->doc = "get rate of attack";
1460 if( !type_engine_import_mfun( env, func ) ) goto error;1460 if( !type_engine_import_mfun( env, func ) ) goto error;
1461 1461
1462 func = make_new_mfun( "float", "noiseGain", BlowBotl_ctrl_noiseGain ); //! noiseGain1462 func = make_new_mfun( "float", "noiseGain", BlowBotl_ctrl_noiseGain ); //! noiseGain
1463 func->add_arg( "float", "value" );1463 func->add_arg( "float", "value" );
1464 func->doc = "Set noise component gain, [0.0-1.0].";1464 func->doc = "set noise component gain, [0.0-1.0].";
1465 if( !type_engine_import_mfun( env, func ) ) goto error;1465 if( !type_engine_import_mfun( env, func ) ) goto error;
1466 1466
1467 func = make_new_mfun( "float", "noiseGain", BlowBotl_cget_noiseGain ); //! noiseGain1467 func = make_new_mfun( "float", "noiseGain", BlowBotl_cget_noiseGain ); //! noiseGain
1468 func->doc = "Get noise component gain, [0.0-1.0].";1468 func->doc = "get noise component gain, [0.0-1.0].";
1469 if( !type_engine_import_mfun( env, func ) ) goto error;1469 if( !type_engine_import_mfun( env, func ) ) goto error;
1470 1470
1471 func = make_new_mfun( "float", "vibratoFreq", BlowBotl_ctrl_vibratoFreq ); //! vibratoFreq1471 func = make_new_mfun( "float", "vibratoFreq", BlowBotl_ctrl_vibratoFreq ); //! vibratoFreq
1472 func->add_arg( "float", "value" );1472 func->add_arg( "float", "value" );
1473 func->doc = "Set vibrato frequency (Hz).";1473 func->doc = "set vibrato frequency (Hz).";
1474 if( !type_engine_import_mfun( env, func ) ) goto error;1474 if( !type_engine_import_mfun( env, func ) ) goto error;
1475 1475
1476 func = make_new_mfun( "float", "vibratoFreq", BlowBotl_cget_vibratoFreq ); //! vibratoFreq1476 func = make_new_mfun( "float", "vibratoFreq", BlowBotl_cget_vibratoFreq ); //! vibratoFreq
1477 func->doc = "Get vibrato frequency (Hz).";1477 func->doc = "get vibrato frequency (Hz).";
1478 if( !type_engine_import_mfun( env, func ) ) goto error;1478 if( !type_engine_import_mfun( env, func ) ) goto error;
1479 1479
1480 func = make_new_mfun( "float", "vibratoGain", BlowBotl_ctrl_vibratoGain ); //! vibratoGain1480 func = make_new_mfun( "float", "vibratoGain", BlowBotl_ctrl_vibratoGain ); //! vibratoGain
1481 func->add_arg( "float", "value" );1481 func->add_arg( "float", "value" );
1482 func->doc = "Set vibrato gain, [0.0-1.0].";1482 func->doc = "set vibrato gain, [0.0-1.0].";
1483 if( !type_engine_import_mfun( env, func ) ) goto error;1483 if( !type_engine_import_mfun( env, func ) ) goto error;
1484 1484
1485 func = make_new_mfun( "float", "vibratoGain", BlowBotl_cget_vibratoGain ); //! vibratoGain1485 func = make_new_mfun( "float", "vibratoGain", BlowBotl_cget_vibratoGain ); //! vibratoGain
1486 func->doc = "Get vibrato gain, [0.0-1.0].";1486 func->doc = "get vibrato gain, [0.0-1.0].";
1487 if( !type_engine_import_mfun( env, func ) ) goto error;1487 if( !type_engine_import_mfun( env, func ) ) goto error;
1488 1488
1489 func = make_new_mfun( "float", "volume", BlowBotl_ctrl_volume ); //! volume1489 func = make_new_mfun( "float", "volume", BlowBotl_ctrl_volume ); //! volume
1490 func->add_arg( "float", "value" );1490 func->add_arg( "float", "value" );
1491 func->doc = "Set volume, [0.0-1.0].";1491 func->doc = "set volume, [0.0-1.0].";
1492 if( !type_engine_import_mfun( env, func ) ) goto error;1492 if( !type_engine_import_mfun( env, func ) ) goto error;
1493 1493
1494 func = make_new_mfun( "float", "volume", BlowBotl_cget_volume ); //! volume1494 func = make_new_mfun( "float", "volume", BlowBotl_cget_volume ); //! volume
1495 func->doc = "Get volume, [0.0-1.0].";1495 func->doc = "get volume, [0.0-1.0].";
1496 if( !type_engine_import_mfun( env, func ) ) goto error;1496 if( !type_engine_import_mfun( env, func ) ) goto error;
1497 1497
1498 // end the class import1498 // end the class import
@@ -1504,9 +1504,9 @@ by Perry R. Cook and Gary P. Scavone, 1995 - 2002"; · 5 unmodified lines
1504 // begin BlowHole ugen1504 // begin BlowHole ugen
1505 //------------------------------------------------------------------------1505 //------------------------------------------------------------------------
1506 1506
1507 doc = "This class is based on the clarinet model, with the addition of a two-port register hole and a three-port dynamic tonehole implementation, as discussed by Scavone and Cook (1998).\n\1507 doc = "based on the clarinet model, with the addition of a two-port register hole and a three-port dynamic tonehole implementation, as discussed by Scavone and Cook (1998).\n\
1508\n\1508\n\
1509In this implementation, the distances between the reed/register hole and tonehole/bell are fixed. As a result, both the tonehole and register hole will have variable influence on the playing frequency, which is dependent on the length of the air column. In addition, the highest playing freqeuency is limited by these fixed lengths. This is a digital waveguide model, making its use possibly subject to patents held by Stanford University, Yamaha, and others.\n\1509In this implementation, the distances between the reed/register hole and tonehole/bell are fixed. As a result, both the tonehole and register hole will have variable influence on the playing frequency, which is dependent on the length of the air column. In addition, the highest playing freqeuency is limited by these fixed lengths. This is a digital waveguide model, making its use possibly subject to patents held by Stanford University, Yamaha, and others.\n\
1510\n\1510\n\
1511Control Change Numbers:\n\1511Control Change Numbers:\n\
1512\n\1512\n\
@@ -1531,66 +1531,66 @@ Perry R. Cook and Gary P. Scavone, 1995 - 2002."; · 18 unmodified lines
1531 1531
1532 func = make_new_mfun( "float", "startBlowing", BlowHole_ctrl_startBlowing ); //! note on1532 func = make_new_mfun( "float", "startBlowing", BlowHole_ctrl_startBlowing ); //! note on
1533 func->add_arg( "float", "value" );1533 func->add_arg( "float", "value" );
1534 func->doc = "Start blowing, [0.0-1.0]";1534 func->doc = "start blowing, [0.0-1.0]";
1535 if( !type_engine_import_mfun( env, func ) ) goto error;1535 if( !type_engine_import_mfun( env, func ) ) goto error;
1536 1536
1537 func = make_new_mfun( "float", "stopBlowing", BlowHole_ctrl_stopBlowing ); //! note on1537 func = make_new_mfun( "float", "stopBlowing", BlowHole_ctrl_stopBlowing ); //! note on
1538 func->add_arg( "float", "value" );1538 func->add_arg( "float", "value" );
1539 func->doc = "Stop blowing, [0.0-1.0]";1539 func->doc = "stop blowing, [0.0-1.0]";
1540 if( !type_engine_import_mfun( env, func ) ) goto error;1540 if( !type_engine_import_mfun( env, func ) ) goto error;
1541 1541
1542 func = make_new_mfun( "float", "vent", BlowHole_ctrl_vent ); //! vent frequency1542 func = make_new_mfun( "float", "vent", BlowHole_ctrl_vent ); //! vent frequency
1543 func->add_arg( "float", "value" );1543 func->add_arg( "float", "value" );
1544 func->doc = "Set vent frequency, [0.0-1.0].";1544 func->doc = "set vent frequency, [0.0-1.0].";
1545 if( !type_engine_import_mfun( env, func ) ) goto error;1545 if( !type_engine_import_mfun( env, func ) ) goto error;
1546 1546
1547 func = make_new_mfun( "float", "vent", BlowHole_cget_vent ); //! vent frequency1547 func = make_new_mfun( "float", "vent", BlowHole_cget_vent ); //! vent frequency
1548 func->doc = "Get vent frequency, [0.0-1.0].";1548 func->doc = "get vent frequency, [0.0-1.0].";
1549 if( !type_engine_import_mfun( env, func ) ) goto error;1549 if( !type_engine_import_mfun( env, func ) ) goto error;
1550 1550
1551 func = make_new_mfun( "float", "tonehole", BlowHole_ctrl_tonehole ); //! tonehole size1551 func = make_new_mfun( "float", "tonehole", BlowHole_ctrl_tonehole ); //! tonehole size
1552 func->add_arg( "float", "value" );1552 func->add_arg( "float", "value" );
1553 func->doc = "Set tonehole size, [0.0-1.0].";1553 func->doc = "set tonehole size, [0.0-1.0].";
1554 if( !type_engine_import_mfun( env, func ) ) goto error;1554 if( !type_engine_import_mfun( env, func ) ) goto error;
1555 1555
1556 func = make_new_mfun( "float", "tonehole", BlowHole_cget_tonehole ); //! tonehole size1556 func = make_new_mfun( "float", "tonehole", BlowHole_cget_tonehole ); //! tonehole size
1557 func->doc = "Get tonehole size, [0.0-1.0].";1557 func->doc = "get tonehole size, [0.0-1.0].";
1558 if( !type_engine_import_mfun( env, func ) ) goto error;1558 if( !type_engine_import_mfun( env, func ) ) goto error;
1559 1559
1560 func = make_new_mfun( "float", "reed", BlowHole_ctrl_reed ); //! reed stiffness1560 func = make_new_mfun( "float", "reed", BlowHole_ctrl_reed ); //! reed stiffness
1561 func->add_arg( "float", "value" );1561 func->add_arg( "float", "value" );
1562 func->doc = "Set reed stiffness, [0.0-1.0].";1562 func->doc = "set reed stiffness, [0.0-1.0].";
1563 if( !type_engine_import_mfun( env, func ) ) goto error;1563 if( !type_engine_import_mfun( env, func ) ) goto error;
1564 1564
1565 func = make_new_mfun( "float", "reed", BlowHole_cget_reed ); //! reed stiffness1565 func = make_new_mfun( "float", "reed", BlowHole_cget_reed ); //! reed stiffness
1566 func->doc = "Get reed stiffness, [0.0-1.0].";1566 func->doc = "get reed stiffness, [0.0-1.0].";
1567 if( !type_engine_import_mfun( env, func ) ) goto error;1567 if( !type_engine_import_mfun( env, func ) ) goto error;
1568 1568
1569 func = make_new_mfun( "float", "rate", BlowHole_ctrl_rate ); //! attack rate1569 func = make_new_mfun( "float", "rate", BlowHole_ctrl_rate ); //! attack rate
1570 func->add_arg( "float", "value" );1570 func->add_arg( "float", "value" );
1571 func->doc = "Set rate of attack, [0.0-1.0].";1571 func->doc = "set rate of attack, [0.0-1.0].";
1572 if( !type_engine_import_mfun( env, func ) ) goto error;1572 if( !type_engine_import_mfun( env, func ) ) goto error;
1573 1573
1574 func = make_new_mfun( "float", "rate", BlowHole_cget_rate ); //! attack rate1574 func = make_new_mfun( "float", "rate", BlowHole_cget_rate ); //! attack rate
1575 func->doc = "Get rate of attack, [0.0-1.0].";1575 func->doc = "get rate of attack, [0.0-1.0].";
1576 if( !type_engine_import_mfun( env, func ) ) goto error;1576 if( !type_engine_import_mfun( env, func ) ) goto error;
1577 1577
1578 func = make_new_mfun( "float", "noiseGain", BlowHole_ctrl_noiseGain ); //! noise gain1578 func = make_new_mfun( "float", "noiseGain", BlowHole_ctrl_noiseGain ); //! noise gain
1579 func->add_arg( "float", "value" );1579 func->add_arg( "float", "value" );
1580 func->doc = "Set noise component gain, [0.0-1.0].";1580 func->doc = "set noise component gain, [0.0-1.0].";
1581 if( !type_engine_import_mfun( env, func ) ) goto error;1581 if( !type_engine_import_mfun( env, func ) ) goto error;
1582 1582
1583 func = make_new_mfun( "float", "noiseGain", BlowHole_cget_noiseGain ); //! noise gain1583 func = make_new_mfun( "float", "noiseGain", BlowHole_cget_noiseGain ); //! noise gain
1584 func->doc = "Get noise component gain, [0.0-1.0].";1584 func->doc = "get noise component gain, [0.0-1.0].";
1585 if( !type_engine_import_mfun( env, func ) ) goto error;1585 if( !type_engine_import_mfun( env, func ) ) goto error;
1586 1586
1587 func = make_new_mfun( "float", "pressure", BlowHole_ctrl_pressure ); //! breath pressure1587 func = make_new_mfun( "float", "pressure", BlowHole_ctrl_pressure ); //! breath pressure
1588 func->add_arg( "float", "value" );1588 func->add_arg( "float", "value" );
1589 func->doc = "Set pressure, [0.0-1.0].";1589 func->doc = "set pressure, [0.0-1.0].";
1590 if( !type_engine_import_mfun( env, func ) ) goto error;1590 if( !type_engine_import_mfun( env, func ) ) goto error;
1591 1591
1592 func = make_new_mfun( "float", "pressure", BlowHole_cget_pressure ); //! breath pressure1592 func = make_new_mfun( "float", "pressure", BlowHole_cget_pressure ); //! breath pressure
1593 func->doc = "Get pressure, [0.0-1.0].";1593 func->doc = "get pressure, [0.0-1.0].";
1594 if( !type_engine_import_mfun( env, func ) ) goto error;1594 if( !type_engine_import_mfun( env, func ) ) goto error;
1595 1595
1596 // end the class import1596 // end the class import
@@ -1601,7 +1601,7 @@ Perry R. Cook and Gary P. Scavone, 1995 - 2002."; · 4 unmodified lines
1601 // begin Bowed ugen1601 // begin Bowed ugen
1602 //------------------------------------------------------------------------1602 //------------------------------------------------------------------------
1603 1603
1604 doc = "This class implements a bowed string model, a la Smith (1986), after McIntyre, Schumacher, Woodhouse (1983).\n\1604 doc = "a bowed string model, a la Smith (1986), after McIntyre, Schumacher, Woodhouse (1983).\n\
1605\n\1605\n\
1606This is a digital waveguide model, making its use possibly subject to patents held by Stanford University, Yamaha, and others.\n\1606This is a digital waveguide model, making its use possibly subject to patents held by Stanford University, Yamaha, and others.\n\
1607\n\1607\n\
@@ -1628,57 +1628,57 @@ by Perry R. Cook and Gary P. Scavone, 1995 - 2002."; · 20 unmodified lines
1628 1628
1629 func = make_new_mfun( "float", "startBowing", Bowed_ctrl_startBowing ); //! begin bowing instrument1629 func = make_new_mfun( "float", "startBowing", Bowed_ctrl_startBowing ); //! begin bowing instrument
1630 func->add_arg( "float", "value" );1630 func->add_arg( "float", "value" );
1631 func->doc = "Start bowing, [0.0-1.0].";1631 func->doc = "start bowing, [0.0-1.0].";
1632 if( !type_engine_import_mfun( env, func ) ) goto error;1632 if( !type_engine_import_mfun( env, func ) ) goto error;
1633 1633
1634 func = make_new_mfun( "float", "stopBowing", Bowed_ctrl_stopBowing ); //! stop bowing1634 func = make_new_mfun( "float", "stopBowing", Bowed_ctrl_stopBowing ); //! stop bowing
1635 func->add_arg( "float", "value" );1635 func->add_arg( "float", "value" );
1636 func->doc = "Stop bowing, [0.0-1.0].";1636 func->doc = "stop bowing, [0.0-1.0].";
1637 if( !type_engine_import_mfun( env, func ) ) goto error;1637 if( !type_engine_import_mfun( env, func ) ) goto error;
1638 1638
1639 func = make_new_mfun( "float", "bowPressure", Bowed_ctrl_bowPressure ); //! bowPressure1639 func = make_new_mfun( "float", "bowPressure", Bowed_ctrl_bowPressure ); //! bowPressure
1640 func->add_arg( "float", "value" );1640 func->add_arg( "float", "value" );
1641 func->doc = "Set bow pressure, [0.0-1.0]";1641 func->doc = "set bow pressure, [0.0-1.0]";
1642 if( !type_engine_import_mfun( env, func ) ) goto error;1642 if( !type_engine_import_mfun( env, func ) ) goto error;
1643 1643
1644 func = make_new_mfun( "float", "bowPressure", Bowed_cget_bowPressure ); //! bowPressure1644 func = make_new_mfun( "float", "bowPressure", Bowed_cget_bowPressure ); //! bowPressure
1645 func->doc = "Get bow pressure, [0.0-1.0]";1645 func->doc = "get bow pressure, [0.0-1.0]";
1646 if( !type_engine_import_mfun( env, func ) ) goto error;1646 if( !type_engine_import_mfun( env, func ) ) goto error;
1647 1647
1648 func = make_new_mfun( "float", "bowPosition", Bowed_ctrl_bowPos ); //! bowPos1648 func = make_new_mfun( "float", "bowPosition", Bowed_ctrl_bowPos ); //! bowPos
1649 func->add_arg( "float", "value" );1649 func->add_arg( "float", "value" );
1650 func->doc = "Set bow position, [0.0-1.0]";1650 func->doc = "set bow position, [0.0-1.0]";
1651 if( !type_engine_import_mfun( env, func ) ) goto error;1651 if( !type_engine_import_mfun( env, func ) ) goto error;
1652 1652
1653 func = make_new_mfun( "float", "bowPosition", Bowed_cget_bowPos ); //! bowPos1653 func = make_new_mfun( "float", "bowPosition", Bowed_cget_bowPos ); //! bowPos
1654 func->doc = "Get bow position, [0.0-1.0]";1654 func->doc = "get bow position, [0.0-1.0]";
1655 if( !type_engine_import_mfun( env, func ) ) goto error;1655 if( !type_engine_import_mfun( env, func ) ) goto error;
1656 1656
1657 func = make_new_mfun( "float", "vibratoFreq", Bowed_ctrl_vibratoFreq ); //! vibratoFreq1657 func = make_new_mfun( "float", "vibratoFreq", Bowed_ctrl_vibratoFreq ); //! vibratoFreq
1658 func->add_arg( "float", "value" );1658 func->add_arg( "float", "value" );
1659 func->doc = "Set vibrato frequency (Hz).";1659 func->doc = "set vibrato frequency (Hz).";
1660 if( !type_engine_import_mfun( env, func ) ) goto error;1660 if( !type_engine_import_mfun( env, func ) ) goto error;
1661 1661
1662 func = make_new_mfun( "float", "vibratoFreq", Bowed_cget_vibratoFreq ); //! vibratoFreq1662 func = make_new_mfun( "float", "vibratoFreq", Bowed_cget_vibratoFreq ); //! vibratoFreq
1663 func->doc = "Get vibrato frequency (Hz).";1663 func->doc = "get vibrato frequency (Hz).";
1664 if( !type_engine_import_mfun( env, func ) ) goto error;1664 if( !type_engine_import_mfun( env, func ) ) goto error;
1665 1665
1666 func = make_new_mfun( "float", "vibratoGain", Bowed_ctrl_vibratoGain ); //! vibratoGain1666 func = make_new_mfun( "float", "vibratoGain", Bowed_ctrl_vibratoGain ); //! vibratoGain
1667 func->add_arg( "float", "value" );1667 func->add_arg( "float", "value" );
1668 func->doc = "Set vibrato gain, [0.0-1.0].";1668 func->doc = "set vibrato gain, [0.0-1.0].";
1669 if( !type_engine_import_mfun( env, func ) ) goto error;1669 if( !type_engine_import_mfun( env, func ) ) goto error;
1670 1670
1671 func = make_new_mfun( "float", "vibratoGain", Bowed_cget_vibratoGain ); //! vibratoGain1671 func = make_new_mfun( "float", "vibratoGain", Bowed_cget_vibratoGain ); //! vibratoGain
1672 func->doc = "Get vibrato gain, [0.0-1.0].";1672 func->doc = "get vibrato gain, [0.0-1.0].";
1673 if( !type_engine_import_mfun( env, func ) ) goto error;1673 if( !type_engine_import_mfun( env, func ) ) goto error;
1674 1674
1675 func = make_new_mfun( "float", "volume", Bowed_ctrl_volume ); //! volume1675 func = make_new_mfun( "float", "volume", Bowed_ctrl_volume ); //! volume
1676 func->add_arg( "float", "value" );1676 func->add_arg( "float", "value" );
1677 func->doc = "Set volume, [0.0-1.0].";1677 func->doc = "set volume, [0.0-1.0].";
1678 if( !type_engine_import_mfun( env, func ) ) goto error;1678 if( !type_engine_import_mfun( env, func ) ) goto error;
1679 1679
1680 func = make_new_mfun( "float", "volume", Bowed_cget_volume ); //! volume1680 func = make_new_mfun( "float", "volume", Bowed_cget_volume ); //! volume
1681 func->doc = "Get volume, [0.0-1.0].";1681 func->doc = "get volume, [0.0-1.0].";
1682 if( !type_engine_import_mfun( env, func ) ) goto error;1682 if( !type_engine_import_mfun( env, func ) ) goto error;
1683 1683
1684 // end the class import1684 // end the class import
@@ -1689,7 +1689,7 @@ by Perry R. Cook and Gary P. Scavone, 1995 - 2002."; · 4 unmodified lines
1689 // begin Brass ugen1689 // begin Brass ugen
1690 //------------------------------------------------------------------------1690 //------------------------------------------------------------------------
1691 1691
1692 doc = "This class implements a simple brass instrument waveguide model, a la Cook (TBone, HosePlayer).\n\1692 doc = "a simple brass instrument waveguide model, a la Cook (TBone, HosePlayer).\n\
1693\n\1693\n\
1694This is a digital waveguide model, making its use possibly subject to patents held by Stanford University, Yamaha, and others.\n\1694This is a digital waveguide model, making its use possibly subject to patents held by Stanford University, Yamaha, and others.\n\
1695\n\1695\n\
@@ -1716,71 +1716,71 @@ by Perry R. Cook and Gary P. Scavone, 1995 - 2002."; · 20 unmodified lines
1716 1716
1717 func = make_new_mfun( "float", "clear", Brass_ctrl_clear ); //! clear instrument1717 func = make_new_mfun( "float", "clear", Brass_ctrl_clear ); //! clear instrument
1718 func->add_arg( "float", "value" );1718 func->add_arg( "float", "value" );
1719 func->doc = "Clear instrument.";1719 func->doc = "clear instrument.";
1720 if( !type_engine_import_mfun( env, func ) ) goto error;1720 if( !type_engine_import_mfun( env, func ) ) goto error;
1721 1721
1722 func = make_new_mfun( "float", "startBlowing", Brass_ctrl_startBlowing ); //! note on1722 func = make_new_mfun( "float", "startBlowing", Brass_ctrl_startBlowing ); //! note on
1723 func->add_arg( "float", "value" );1723 func->add_arg( "float", "value" );
1724 func->doc = "Start blowing, [0.0-1.0].";1724 func->doc = "start blowing, [0.0-1.0].";
1725 if( !type_engine_import_mfun( env, func ) ) goto error;1725 if( !type_engine_import_mfun( env, func ) ) goto error;
1726 1726
1727 func = make_new_mfun( "float", "stopBlowing", Brass_ctrl_stopBlowing ); //! note on1727 func = make_new_mfun( "float", "stopBlowing", Brass_ctrl_stopBlowing ); //! note on
1728 func->add_arg( "float", "value" );1728 func->add_arg( "float", "value" );
1729 func->doc = "Stop blowing, [0.0-1.0].";1729 func->doc = "stop blowing, [0.0-1.0].";
1730 if( !type_engine_import_mfun( env, func ) ) goto error;1730 if( !type_engine_import_mfun( env, func ) ) goto error;
1731 1731
1732 func = make_new_mfun( "float", "lip", Brass_ctrl_lip ); //! lip stiffness1732 func = make_new_mfun( "float", "lip", Brass_ctrl_lip ); //! lip stiffness
1733 func->add_arg( "float", "value" );1733 func->add_arg( "float", "value" );
1734 func->doc = "Set lip tension, [0.0-1.0].";1734 func->doc = "set lip tension, [0.0-1.0].";
1735 if( !type_engine_import_mfun( env, func ) ) goto error;1735 if( !type_engine_import_mfun( env, func ) ) goto error;
1736 1736
1737 func = make_new_mfun( "float", "lip", Brass_cget_lip ); //! lip stiffness1737 func = make_new_mfun( "float", "lip", Brass_cget_lip ); //! lip stiffness
1738 func->doc = "Get lip tension, [0.0-1.0].";1738 func->doc = "get lip tension, [0.0-1.0].";
1739 if( !type_engine_import_mfun( env, func ) ) goto error;1739 if( !type_engine_import_mfun( env, func ) ) goto error;
1740 1740
1741 func = make_new_mfun( "float", "slide", Brass_ctrl_slide ); //! slide1741 func = make_new_mfun( "float", "slide", Brass_ctrl_slide ); //! slide
1742 func->add_arg( "float", "value" );1742 func->add_arg( "float", "value" );
1743 func->doc = "Set slide length, [0.0-1.0].";1743 func->doc = "set slide length, [0.0-1.0].";
1744 if( !type_engine_import_mfun( env, func ) ) goto error;1744 if( !type_engine_import_mfun( env, func ) ) goto error;
1745 1745
1746 func = make_new_mfun( "float", "slide", Brass_cget_slide ); //! slide1746 func = make_new_mfun( "float", "slide", Brass_cget_slide ); //! slide
1747 func->doc = "Get slide length, [0.0-1.0].";1747 func->doc = "get slide length, [0.0-1.0].";
1748 if( !type_engine_import_mfun( env, func ) ) goto error;1748 if( !type_engine_import_mfun( env, func ) ) goto error;
1749 1749
1750 func = make_new_mfun( "float", "vibratoFreq", Brass_ctrl_vibratoFreq ); //! vibratoFreq1750 func = make_new_mfun( "float", "vibratoFreq", Brass_ctrl_vibratoFreq ); //! vibratoFreq
1751 func->add_arg( "float", "value" );1751 func->add_arg( "float", "value" );
1752 func->doc = "Set vibrato frequency (Hz).";1752 func->doc = "set vibrato frequency (Hz).";
1753 if( !type_engine_import_mfun( env, func ) ) goto error;1753 if( !type_engine_import_mfun( env, func ) ) goto error;
1754 1754
1755 func = make_new_mfun( "float", "vibratoFreq", Brass_cget_vibratoFreq ); //! vibratoFreq1755 func = make_new_mfun( "float", "vibratoFreq", Brass_cget_vibratoFreq ); //! vibratoFreq
1756 func->doc = "Get vibrato frequency (Hz).";1756 func->doc = "get vibrato frequency (Hz).";
1757 if( !type_engine_import_mfun( env, func ) ) goto error;1757 if( !type_engine_import_mfun( env, func ) ) goto error;
1758 1758
1759 func = make_new_mfun( "float", "vibratoGain", Brass_ctrl_vibratoGain ); //! vibratoGain1759 func = make_new_mfun( "float", "vibratoGain", Brass_ctrl_vibratoGain ); //! vibratoGain
1760 func->add_arg( "float", "value" );1760 func->add_arg( "float", "value" );
1761 func->doc = "Set vibrato gain, [0.0-1.0].";1761 func->doc = "set vibrato gain, [0.0-1.0].";
1762 if( !type_engine_import_mfun( env, func ) ) goto error;1762 if( !type_engine_import_mfun( env, func ) ) goto error;
1763 1763
1764 func = make_new_mfun( "float", "vibratoGain", Brass_cget_vibratoGain ); //! vibratoGain1764 func = make_new_mfun( "float", "vibratoGain", Brass_cget_vibratoGain ); //! vibratoGain
1765 func->doc = "Get vibrato gain, [0.0-1.0].";1765 func->doc = "get vibrato gain, [0.0-1.0].";
1766 if( !type_engine_import_mfun( env, func ) ) goto error;1766 if( !type_engine_import_mfun( env, func ) ) goto error;
1767 1767
1768 func = make_new_mfun( "float", "volume", Brass_ctrl_volume ); //! volume1768 func = make_new_mfun( "float", "volume", Brass_ctrl_volume ); //! volume
1769 func->add_arg( "float", "value" );1769 func->add_arg( "float", "value" );
1770 func->doc = "Set volume, [0.0-1.0].";1770 func->doc = "set volume, [0.0-1.0].";
1771 if( !type_engine_import_mfun( env, func ) ) goto error;1771 if( !type_engine_import_mfun( env, func ) ) goto error;
1772 1772
1773 func = make_new_mfun( "float", "volume", Brass_cget_volume ); //! volume1773 func = make_new_mfun( "float", "volume", Brass_cget_volume ); //! volume
1774 func->doc = "Get volume, [0.0-1.0].";1774 func->doc = "get volume, [0.0-1.0].";
1775 if( !type_engine_import_mfun( env, func ) ) goto error;1775 if( !type_engine_import_mfun( env, func ) ) goto error;
1776 1776
1777 func = make_new_mfun( "float", "rate", Brass_ctrl_rate ); //! attack rate1777 func = make_new_mfun( "float", "rate", Brass_ctrl_rate ); //! attack rate
1778 func->add_arg( "float", "value" );1778 func->add_arg( "float", "value" );
1779 func->doc = "Set rate of attack (seconds).";1779 func->doc = "set rate of attack (seconds).";
1780 if( !type_engine_import_mfun( env, func ) ) goto error;1780 if( !type_engine_import_mfun( env, func ) ) goto error;
1781 1781
1782 func = make_new_mfun( "float", "rate", Brass_cget_rate ); //! attack rate1782 func = make_new_mfun( "float", "rate", Brass_cget_rate ); //! attack rate
1783 func->doc = "Get rate of attack (seconds).";1783 func->doc = "get rate of attack (seconds).";
1784 if( !type_engine_import_mfun( env, func ) ) goto error;1784 if( !type_engine_import_mfun( env, func ) ) goto error;
1785 1785
1786 // end the class import1786 // end the class import
@@ -1791,7 +1791,7 @@ by Perry R. Cook and Gary P. Scavone, 1995 - 2002."; · 4 unmodified lines
1791 // begin Clarinet ugen1791 // begin Clarinet ugen
1792 //------------------------------------------------------------------------1792 //------------------------------------------------------------------------
1793 1793
1794 doc = "This class implements a simple clarinet physical model, as discussed by Smith (1986), McIntyre, Schumacher, Woodhouse (1983), and others.\n\1794 doc = "a simple clarinet physical model, as discussed by Smith (1986), McIntyre, Schumacher, Woodhouse (1983), and others.\n\
1795\n\1795\n\
1796This is a digital waveguide model, making its use possibly subject to patents held by Stanford University, Yamaha, and others.\n\1796This is a digital waveguide model, making its use possibly subject to patents held by Stanford University, Yamaha, and others.\n\
1797\n\1797\n\
@@ -1818,71 +1818,71 @@ by Perry R. Cook and Gary P. Scavone, 1995 - 2002."; · 20 unmodified lines
1818 1818
1819 func = make_new_mfun( "float", "clear", Clarinet_ctrl_clear ); //! note on1819 func = make_new_mfun( "float", "clear", Clarinet_ctrl_clear ); //! note on
1820 func->add_arg( "float", "value" );1820 func->add_arg( "float", "value" );
1821 func->doc = "Clear instrument.";1821 func->doc = "clear instrument.";
1822 if( !type_engine_import_mfun( env, func ) ) goto error;1822 if( !type_engine_import_mfun( env, func ) ) goto error;
1823 1823
1824 func = make_new_mfun( "float", "startBlowing", Clarinet_ctrl_startBlowing ); //! note on1824 func = make_new_mfun( "float", "startBlowing", Clarinet_ctrl_startBlowing ); //! note on
1825 func->add_arg( "float", "value" );1825 func->add_arg( "float", "value" );
1826 func->doc = "Start blowing, [0.0-1.0].";1826 func->doc = "start blowing, [0.0-1.0].";
1827 if( !type_engine_import_mfun( env, func ) ) goto error;1827 if( !type_engine_import_mfun( env, func ) ) goto error;
1828 1828
1829 func = make_new_mfun( "float", "stopBlowing", Clarinet_ctrl_stopBlowing ); //! note on1829 func = make_new_mfun( "float", "stopBlowing", Clarinet_ctrl_stopBlowing ); //! note on
1830 func->add_arg( "float", "value" );1830 func->add_arg( "float", "value" );
1831 func->doc = "Stop blowing, [0.0-1.0].";1831 func->doc = "stop blowing, [0.0-1.0].";
1832 if( !type_engine_import_mfun( env, func ) ) goto error;1832 if( !type_engine_import_mfun( env, func ) ) goto error;
1833 1833
1834 func = make_new_mfun( "float", "rate", Clarinet_ctrl_rate ); //! attack rate1834 func = make_new_mfun( "float", "rate", Clarinet_ctrl_rate ); //! attack rate
1835 func->add_arg( "float", "value" );1835 func->add_arg( "float", "value" );
1836 func->doc = "Set rate of attack (seconds).";1836 func->doc = "set rate of attack (seconds).";
1837 if( !type_engine_import_mfun( env, func ) ) goto error;1837 if( !type_engine_import_mfun( env, func ) ) goto error;
1838 1838
1839 func = make_new_mfun( "float", "rate", Clarinet_cget_rate ); //! attack rate1839 func = make_new_mfun( "float", "rate", Clarinet_cget_rate ); //! attack rate
1840 func->doc = "Get rate of attack (seconds).";1840 func->doc = "get rate of attack (seconds).";
1841 if( !type_engine_import_mfun( env, func ) ) goto error;1841 if( !type_engine_import_mfun( env, func ) ) goto error;
1842 1842
1843 func = make_new_mfun( "float", "reed", Clarinet_ctrl_reed); //! reed1843 func = make_new_mfun( "float", "reed", Clarinet_ctrl_reed); //! reed
1844 func->add_arg( "float", "value" );1844 func->add_arg( "float", "value" );
1845 func->doc = "Set reed stiffness, [0.0-1.0].";1845 func->doc = "set reed stiffness, [0.0-1.0].";
1846 if( !type_engine_import_mfun( env, func ) ) goto error;1846 if( !type_engine_import_mfun( env, func ) ) goto error;
1847 1847
1848 func = make_new_mfun( "float", "reed", Clarinet_cget_reed); //! reed1848 func = make_new_mfun( "float", "reed", Clarinet_cget_reed); //! reed
1849 func->doc = "Get reed stiffness, [0.0-1.0].";1849 func->doc = "get reed stiffness, [0.0-1.0].";
1850 if( !type_engine_import_mfun( env, func ) ) goto error;1850 if( !type_engine_import_mfun( env, func ) ) goto error;
1851 1851
1852 func = make_new_mfun( "float", "noiseGain", Clarinet_ctrl_noiseGain ); //! noiseGain1852 func = make_new_mfun( "float", "noiseGain", Clarinet_ctrl_noiseGain ); //! noiseGain
1853 func->add_arg( "float", "value" );1853 func->add_arg( "float", "value" );
1854 func->doc = "Set noise component gain, [0.0-1.0].";1854 func->doc = "set noise component gain, [0.0-1.0].";
1855 if( !type_engine_import_mfun( env, func ) ) goto error;1855 if( !type_engine_import_mfun( env, func ) ) goto error;
1856 1856
1857 func = make_new_mfun( "float", "noiseGain", Clarinet_cget_noiseGain ); //! noiseGain1857 func = make_new_mfun( "float", "noiseGain", Clarinet_cget_noiseGain ); //! noiseGain
1858 func->doc = "Get noise component gain, [0.0-1.0].";1858 func->doc = "get noise component gain, [0.0-1.0].";
1859 if( !type_engine_import_mfun( env, func ) ) goto error;1859 if( !type_engine_import_mfun( env, func ) ) goto error;
1860 1860
1861 func = make_new_mfun( "float", "vibratoFreq", Clarinet_ctrl_vibratoFreq ); //! rvibratoFreq1861 func = make_new_mfun( "float", "vibratoFreq", Clarinet_ctrl_vibratoFreq ); //! rvibratoFreq
1862 func->add_arg( "float", "value" );1862 func->add_arg( "float", "value" );
1863 func->doc = "Set vibrato frequency (Hz).";1863 func->doc = "set vibrato frequency (Hz).";
1864 if( !type_engine_import_mfun( env, func ) ) goto error;1864 if( !type_engine_import_mfun( env, func ) ) goto error;
1865 1865
1866 func = make_new_mfun( "float", "vibratoFreq", Clarinet_cget_vibratoFreq ); //! rvibratoFreq1866 func = make_new_mfun( "float", "vibratoFreq", Clarinet_cget_vibratoFreq ); //! rvibratoFreq
1867 func->doc = "Get vibrato frequency (Hz).";1867 func->doc = "get vibrato frequency (Hz).";
1868 if( !type_engine_import_mfun( env, func ) ) goto error;1868 if( !type_engine_import_mfun( env, func ) ) goto error;
1869 1869
1870 func = make_new_mfun( "float", "vibratoGain", Clarinet_ctrl_vibratoGain ); //! vibratoGain1870 func = make_new_mfun( "float", "vibratoGain", Clarinet_ctrl_vibratoGain ); //! vibratoGain
1871 func->add_arg( "float", "value" );1871 func->add_arg( "float", "value" );
1872 func->doc = "Set vibrato gain, [0.0-1.0].";1872 func->doc = "set vibrato gain, [0.0-1.0].";
1873 if( !type_engine_import_mfun( env, func ) ) goto error;1873 if( !type_engine_import_mfun( env, func ) ) goto error;
1874 1874
1875 func = make_new_mfun( "float", "vibratoGain", Clarinet_cget_vibratoGain ); //! vibratoGain1875 func = make_new_mfun( "float", "vibratoGain", Clarinet_cget_vibratoGain ); //! vibratoGain
1876 func->doc = "Get vibrato gain, [0.0-1.0].";1876 func->doc = "get vibrato gain, [0.0-1.0].";
1877 if( !type_engine_import_mfun( env, func ) ) goto error;1877 if( !type_engine_import_mfun( env, func ) ) goto error;
1878 1878
1879 func = make_new_mfun( "float", "pressure", Clarinet_ctrl_pressure ); //! pressure1879 func = make_new_mfun( "float", "pressure", Clarinet_ctrl_pressure ); //! pressure
1880 func->add_arg( "float", "value" );1880 func->add_arg( "float", "value" );
1881 func->doc = "Set pressure, [0.0-1.0].";1881 func->doc = "set pressure, [0.0-1.0].";
1882 if( !type_engine_import_mfun( env, func ) ) goto error;1882 if( !type_engine_import_mfun( env, func ) ) goto error;
1883 1883
1884 func = make_new_mfun( "float", "pressure", Clarinet_cget_pressure ); //! pressure1884 func = make_new_mfun( "float", "pressure", Clarinet_cget_pressure ); //! pressure
1885 func->doc = "Get pressure, [0.0-1.0].";1885 func->doc = "get pressure, [0.0-1.0].";
1886 if( !type_engine_import_mfun( env, func ) ) goto error;1886 if( !type_engine_import_mfun( env, func ) ) goto error;
1887 1887
1888 // end the class import1888 // end the class import
@@ -1893,7 +1893,7 @@ by Perry R. Cook and Gary P. Scavone, 1995 - 2002."; · 4 unmodified lines
1893 // begin Flute ugen1893 // begin Flute ugen
1894 //------------------------------------------------------------------------1894 //------------------------------------------------------------------------
1895 1895
1896 doc = "This class implements a simple flute physical model, as discussed by Karjalainen, Smith, Waryznyk, etc. The jet model uses a polynomial, a la Cook.\n\1896 doc = "a simple flute physical model, as discussed by Karjalainen, Smith, Waryznyk, etc. The jet model uses a polynomial, a la Cook.\n\
1897\n\1897\n\
1898This is a digital waveguide model, making its use possibly subject to patents held by Stanford University, Yamaha, and others.\n\1898This is a digital waveguide model, making its use possibly subject to patents held by Stanford University, Yamaha, and others.\n\
1899\n\1899\n\
@@ -1919,89 +1919,89 @@ by Perry R. Cook and Gary P. Scavone, 1995 - 2002."; · 19 unmodified lines
1919 1919
1920 func = make_new_mfun( "float", "clear", Flute_ctrl_clear ); //! clear1920 func = make_new_mfun( "float", "clear", Flute_ctrl_clear ); //! clear
1921 func->add_arg( "float", "value" );1921 func->add_arg( "float", "value" );
1922 func->doc = "Clear instrument.";1922 func->doc = "clear instrument.";
1923 if( !type_engine_import_mfun( env, func ) ) goto error;1923 if( !type_engine_import_mfun( env, func ) ) goto error;
1924 1924
1925 func = make_new_mfun( "float", "startBlowing", Flute_ctrl_startBlowing ); //! startBlowing1925 func = make_new_mfun( "float", "startBlowing", Flute_ctrl_startBlowing ); //! startBlowing
1926 func->add_arg( "float", "value" );1926 func->add_arg( "float", "value" );
1927 func->doc = "Start blowing, [0.0-1.0].";1927 func->doc = "start blowing, [0.0-1.0].";
1928 if( !type_engine_import_mfun( env, func ) ) goto error;1928 if( !type_engine_import_mfun( env, func ) ) goto error;
1929 1929
1930 func = make_new_mfun( "float", "stopBlowing", Flute_ctrl_stopBlowing ); //! stopBlowing1930 func = make_new_mfun( "float", "stopBlowing", Flute_ctrl_stopBlowing ); //! stopBlowing
1931 func->add_arg( "float", "value" );1931 func->add_arg( "float", "value" );
1932 func->doc = "Stop blowing, [0.0-1.0].";1932 func->doc = "stop blowing, [0.0-1.0].";
1933 if( !type_engine_import_mfun( env, func ) ) goto error;1933 if( !type_engine_import_mfun( env, func ) ) goto error;
1934 1934
1935 func = make_new_mfun( "float", "rate", Flute_ctrl_rate ); //! attack rate1935 func = make_new_mfun( "float", "rate", Flute_ctrl_rate ); //! attack rate
1936 func->add_arg( "float", "value" );1936 func->add_arg( "float", "value" );
1937 func->doc = "Set rate of attack (seconds).";1937 func->doc = "set rate of attack (seconds).";
1938 if( !type_engine_import_mfun( env, func ) ) goto error;1938 if( !type_engine_import_mfun( env, func ) ) goto error;
1939 1939
1940 func = make_new_mfun( "float", "rate", Flute_cget_rate ); //! attack rate1940 func = make_new_mfun( "float", "rate", Flute_cget_rate ); //! attack rate
1941 func->doc = "Get rate of attack (seconds).";1941 func->doc = "get rate of attack (seconds).";
1942 if( !type_engine_import_mfun( env, func ) ) goto error;1942 if( !type_engine_import_mfun( env, func ) ) goto error;
1943 1943
1944 func = make_new_mfun( "float", "jetReflection", Flute_ctrl_jetReflection ); //! jet reflection1944 func = make_new_mfun( "float", "jetReflection", Flute_ctrl_jetReflection ); //! jet reflection
1945 func->add_arg( "float", "value" );1945 func->add_arg( "float", "value" );
1946 func-> doc = "Set jet reflection.";1946 func-> doc = "set jet reflection.";
1947 if( !type_engine_import_mfun( env, func ) ) goto error;1947 if( !type_engine_import_mfun( env, func ) ) goto error;
1948 1948
1949 func = make_new_mfun( "float", "jetReflection", Flute_cget_jetReflection ); //! jet reflection1949 func = make_new_mfun( "float", "jetReflection", Flute_cget_jetReflection ); //! jet reflection
1950 func-> doc = "Get jet reflection.";1950 func-> doc = "get jet reflection.";
1951 if( !type_engine_import_mfun( env, func ) ) goto error;1951 if( !type_engine_import_mfun( env, func ) ) goto error;
1952 1952
1953 func = make_new_mfun( "float", "jetDelay", Flute_ctrl_jetDelay ); //! jet delay1953 func = make_new_mfun( "float", "jetDelay", Flute_ctrl_jetDelay ); //! jet delay
1954 func->add_arg( "float", "value" );1954 func->add_arg( "float", "value" );
1955 func->doc = "Set jet delay.";1955 func->doc = "set jet delay.";
1956 if( !type_engine_import_mfun( env, func ) ) goto error;1956 if( !type_engine_import_mfun( env, func ) ) goto error;
1957 1957
1958 func = make_new_mfun( "float", "jetDelay", Flute_cget_jetDelay ); //! jet delay1958 func = make_new_mfun( "float", "jetDelay", Flute_cget_jetDelay ); //! jet delay
1959 func->doc = "Get jet delay.";1959 func->doc = "get jet delay.";
1960 if( !type_engine_import_mfun( env, func ) ) goto error;1960 if( !type_engine_import_mfun( env, func ) ) goto error;
1961 1961
1962 func = make_new_mfun( "float", "endReflection", Flute_ctrl_endReflection ); //! end reflection1962 func = make_new_mfun( "float", "endReflection", Flute_ctrl_endReflection ); //! end reflection
1963 func->add_arg( "float", "value" );1963 func->add_arg( "float", "value" );
1964 func->doc = "Set end reflection.";1964 func->doc = "set end reflection.";
1965 if( !type_engine_import_mfun( env, func ) ) goto error;1965 if( !type_engine_import_mfun( env, func ) ) goto error;
1966 1966
1967 func = make_new_mfun( "float", "endReflection", Flute_cget_endReflection ); //! end reflection1967 func = make_new_mfun( "float", "endReflection", Flute_cget_endReflection ); //! end reflection
1968 func->doc = "Get end reflection.";1968 func->doc = "get end reflection.";
1969 if( !type_engine_import_mfun( env, func ) ) goto error;1969 if( !type_engine_import_mfun( env, func ) ) goto error;
1970 1970
1971 func = make_new_mfun( "float", "noiseGain", Flute_ctrl_noiseGain ); //! noiseGain1971 func = make_new_mfun( "float", "noiseGain", Flute_ctrl_noiseGain ); //! noiseGain
1972 func->add_arg( "float", "value" );1972 func->add_arg( "float", "value" );
1973 func->doc = "Set noise component gain, [0.0-1.0].";1973 func->doc = "set noise component gain, [0.0-1.0].";
1974 if( !type_engine_import_mfun( env, func ) ) goto error;1974 if( !type_engine_import_mfun( env, func ) ) goto error;
1975 1975
1976 func = make_new_mfun( "float", "noiseGain", Flute_cget_noiseGain ); //! noiseGain1976 func = make_new_mfun( "float", "noiseGain", Flute_cget_noiseGain ); //! noiseGain
1977 func->doc = "Get noise component gain, [0.0-1.0].";1977 func->doc = "get noise component gain, [0.0-1.0].";
1978 if( !type_engine_import_mfun( env, func ) ) goto error;1978 if( !type_engine_import_mfun( env, func ) ) goto error;
1979 1979
1980 func = make_new_mfun( "float", "vibratoFreq", Flute_ctrl_vibratoFreq ); //! vibratoFreq1980 func = make_new_mfun( "float", "vibratoFreq", Flute_ctrl_vibratoFreq ); //! vibratoFreq
1981 func->add_arg( "float", "value" );1981 func->add_arg( "float", "value" );
1982 func->doc = "Set vibrato frequency (Hz).";1982 func->doc = "set vibrato frequency (Hz).";
1983 if( !type_engine_import_mfun( env, func ) ) goto error;1983 if( !type_engine_import_mfun( env, func ) ) goto error;
1984 1984
1985 func = make_new_mfun( "float", "vibratoFreq", Flute_cget_vibratoFreq ); //! vibratoFreq1985 func = make_new_mfun( "float", "vibratoFreq", Flute_cget_vibratoFreq ); //! vibratoFreq
1986 func->doc = "Get vibrato frequency (Hz).";1986 func->doc = "get vibrato frequency (Hz).";
1987 if( !type_engine_import_mfun( env, func ) ) goto error;1987 if( !type_engine_import_mfun( env, func ) ) goto error;
1988 1988
1989 func = make_new_mfun( "float", "vibratoGain", Flute_ctrl_vibratoGain ); //! vibratoGain1989 func = make_new_mfun( "float", "vibratoGain", Flute_ctrl_vibratoGain ); //! vibratoGain
1990 func->add_arg( "float", "value" );1990 func->add_arg( "float", "value" );
1991 func->doc = "Set vibrato gain, [0.0-1.0].";1991 func->doc = "set vibrato gain, [0.0-1.0].";
1992 if( !type_engine_import_mfun( env, func ) ) goto error;1992 if( !type_engine_import_mfun( env, func ) ) goto error;
1993 1993
1994 func = make_new_mfun( "float", "vibratoGain", Flute_cget_vibratoGain ); //! vibratoGain1994 func = make_new_mfun( "float", "vibratoGain", Flute_cget_vibratoGain ); //! vibratoGain
1995 func->doc = "Get vibrato gain, [0.0-1.0].";1995 func->doc = "get vibrato gain, [0.0-1.0].";
1996 if( !type_engine_import_mfun( env, func ) ) goto error;1996 if( !type_engine_import_mfun( env, func ) ) goto error;
1997 1997
1998 func = make_new_mfun( "float", "pressure", Flute_ctrl_pressure ); //! pressure1998 func = make_new_mfun( "float", "pressure", Flute_ctrl_pressure ); //! pressure
1999 func->add_arg( "float", "value" );1999 func->add_arg( "float", "value" );
2000 func->doc = "Set pressure, [0.0-1.0].";2000 func->doc = "set pressure, [0.0-1.0].";
2001 if( !type_engine_import_mfun( env, func ) ) goto error;2001 if( !type_engine_import_mfun( env, func ) ) goto error;
2002 2002
2003 func = make_new_mfun( "float", "pressure", Flute_cget_pressure ); //! pressure2003 func = make_new_mfun( "float", "pressure", Flute_cget_pressure ); //! pressure
2004 func->doc = "Get pressure, [0.0-1.0].";2004 func->doc = "get pressure, [0.0-1.0].";
2005 if( !type_engine_import_mfun( env, func ) ) goto error;2005 if( !type_engine_import_mfun( env, func ) ) goto error;
2006 2006
2007 // end the class import2007 // end the class import
@@ -2012,9 +2012,9 @@ by Perry R. Cook and Gary P. Scavone, 1995 - 2002."; · 4 unmodified lines
2012 // begin Mandolin ugen2012 // begin Mandolin ugen
2013 //------------------------------------------------------------------------2013 //------------------------------------------------------------------------
2014 2014
2015 doc = "This class inherits from PluckTwo and uses 'commuted synthesis' techniques to model a mandolin instrument.\n\2015 doc = "inherits from PluckTwo and uses 'commuted synthesis' techniques to model a mandolin instrument.\n\
2016\n\2016\n\
2017This is a digital waveguide model, making its use possibly subject to patents held by Stanford University, Yamaha, and others. Commuted Synthesis, in particular, is covered by patents, granted, pending, and/or applied-for. All are assigned to the Board of Trustees, Stanford University. For information, contact the Office of Technology Licensing, Stanford University.\n\2017This is a digital waveguide model, making its use possibly subject to patents held by Stanford University, Yamaha, and others. Commuted Synthesis, in particular, is covered by patents, granted, pending, and/or applied-for. All are assigned to the Board of Trustees, Stanford University. For information, contact the Office of Technology Licensing, Stanford University.\n\
2018\n\2018\n\
2019Control Change Numbers:\n\2019Control Change Numbers:\n\
2020\n\2020\n\
@@ -2041,57 +2041,57 @@ by Perry R. Cook and Gary P. Scavone, 1995 - 2002."; · 20 unmodified lines
2041 2041
2042 func = make_new_mfun( "float", "pluck", Mandolin_ctrl_pluck ); //! pluck string with given amplitude 2042 func = make_new_mfun( "float", "pluck", Mandolin_ctrl_pluck ); //! pluck string with given amplitude
2043 func->add_arg( "float", "value" );2043 func->add_arg( "float", "value" );
2044 func->doc = "Pluck instrument, [0.0-1.0].";2044 func->doc = "pluck the instrument, [0.0-1.0].";
2045 if( !type_engine_import_mfun( env, func ) ) goto error;2045 if( !type_engine_import_mfun( env, func ) ) goto error;
2046 2046
2047 func = make_new_mfun( "float", "pluckPos", Mandolin_ctrl_pluckPos ); //! set pluck position ( 0-1) along string2047 func = make_new_mfun( "float", "pluckPos", Mandolin_ctrl_pluckPos ); //! set pluck position ( 0-1) along string
2048 func->add_arg( "float", "value" );2048 func->add_arg( "float", "value" );
2049 func->doc = "Set pluck position, [0.0-1.0].";2049 func->doc = "set pluck position, [0.0-1.0].";
2050 if( !type_engine_import_mfun( env, func ) ) goto error;2050 if( !type_engine_import_mfun( env, func ) ) goto error;
2051 2051
2052 func = make_new_mfun( "float", "pluckPos", Mandolin_cget_pluckPos ); //! get pluck position ( 0-1) along string2052 func = make_new_mfun( "float", "pluckPos", Mandolin_cget_pluckPos ); //! get pluck position ( 0-1) along string
2053 func->doc = "Get pluck position, [0.0-1.0].";2053 func->doc = "get pluck position, [0.0-1.0].";
2054 if( !type_engine_import_mfun( env, func ) ) goto error;2054 if( !type_engine_import_mfun( env, func ) ) goto error;
2055 2055
2056 func = make_new_mfun( "float", "bodySize", Mandolin_ctrl_bodySize ); //! modify instrument size2056 func = make_new_mfun( "float", "bodySize", Mandolin_ctrl_bodySize ); //! modify instrument size
2057 func->add_arg( "float", "value" );2057 func->add_arg( "float", "value" );
2058 func->doc = "Set body size (percentage).";2058 func->doc = "set body size (percentage).";
2059 if( !type_engine_import_mfun( env, func ) ) goto error;2059 if( !type_engine_import_mfun( env, func ) ) goto error;
2060 2060
2061 func = make_new_mfun( "float", "bodySize", Mandolin_cget_bodySize ); //! modify instrument size2061 func = make_new_mfun( "float", "bodySize", Mandolin_cget_bodySize ); //! modify instrument size
2062 func->doc = "Get body size (percentage).";2062 func->doc = "get body size (percentage).";
2063 if( !type_engine_import_mfun( env, func ) ) goto error;2063 if( !type_engine_import_mfun( env, func ) ) goto error;
2064 2064
2065 func = make_new_mfun( "float", "stringDamping", Mandolin_ctrl_stringDamping ); //! control string damping2065 func = make_new_mfun( "float", "stringDamping", Mandolin_ctrl_stringDamping ); //! control string damping
2066 func->add_arg( "float", "value" );2066 func->add_arg( "float", "value" );
2067 func->doc = "Set string damping, [0.0-1.0].";2067 func->doc = "set string damping, [0.0-1.0].";
2068 if( !type_engine_import_mfun( env, func ) ) goto error;2068 if( !type_engine_import_mfun( env, func ) ) goto error;
2069 2069
2070 func = make_new_mfun( "float", "stringDamping", Mandolin_cget_stringDamping ); //! control string damping2070 func = make_new_mfun( "float", "stringDamping", Mandolin_cget_stringDamping ); //! control string damping
2071 func->doc = "Get string damping, [0.0-1.0].";2071 func->doc = "get string damping, [0.0-1.0].";
2072 if( !type_engine_import_mfun( env, func ) ) goto error;2072 if( !type_engine_import_mfun( env, func ) ) goto error;
2073 2073
2074 func = make_new_mfun( "float", "stringDetune", Mandolin_ctrl_stringDetune ); //! control detuning of string pair2074 func = make_new_mfun( "float", "stringDetune", Mandolin_ctrl_stringDetune ); //! control detuning of string pair
2075 func->add_arg( "float", "value" );2075 func->add_arg( "float", "value" );
2076 func->doc = "Set detuning of string pair, [0.0-1.0].";2076 func->doc = "set detuning of string pair, [0.0-1.0].";
2077 if( !type_engine_import_mfun( env, func ) ) goto error;2077 if( !type_engine_import_mfun( env, func ) ) goto error;
2078 2078
2079 func = make_new_mfun( "float", "stringDetune", Mandolin_cget_stringDetune ); //! control detuning of string pair2079 func = make_new_mfun( "float", "stringDetune", Mandolin_cget_stringDetune ); //! control detuning of string pair
2080 func->doc = "Get detuning of string pair, [0.0-1.0].";2080 func->doc = "get detuning of string pair, [0.0-1.0].";
2081 if( !type_engine_import_mfun( env, func ) ) goto error;2081 if( !type_engine_import_mfun( env, func ) ) goto error;
2082 2082
2083 func = make_new_mfun( "float", "afterTouch", Mandolin_ctrl_afterTouch ); //! aftertouch2083 func = make_new_mfun( "float", "afterTouch", Mandolin_ctrl_afterTouch ); //! aftertouch
2084 func->add_arg( "float", "value" );2084 func->add_arg( "float", "value" );
2085 func->doc = "Set aftertouch (currently unsupported).";2085 func->doc = "set aftertouch (currently unsupported).";
2086 if( !type_engine_import_mfun( env, func ) ) goto error;2086 if( !type_engine_import_mfun( env, func ) ) goto error;
2087 2087
2088 func = make_new_mfun( "string", "bodyIR", Mandolin_ctrl_bodyIR ); //! read body impulse response2088 func = make_new_mfun( "string", "bodyIR", Mandolin_ctrl_bodyIR ); //! read body impulse response
2089 func->add_arg( "string", "path" );2089 func->add_arg( "string", "path" );
2090 func->doc = "Set body impulse response.";2090 func->doc = "set body impulse response.";
2091 if( !type_engine_import_mfun( env, func ) ) goto error;2091 if( !type_engine_import_mfun( env, func ) ) goto error;
2092 2092
2093 func = make_new_mfun( "string", "bodyIR", Mandolin_cget_bodyIR ); //! get path2093 func = make_new_mfun( "string", "bodyIR", Mandolin_cget_bodyIR ); //! get path
2094 func->doc = "Get body impulse response.";2094 func->doc = "get body impulse response.";
2095 if( !type_engine_import_mfun( env, func ) ) goto error;2095 if( !type_engine_import_mfun( env, func ) ) goto error;
2096 2096
2097 // end the class import2097 // end the class import
@@ -2102,7 +2102,7 @@ by Perry R. Cook and Gary P. Scavone, 1995 - 2002."; · 4 unmodified lines
2102 // begin ModalBar ugen2102 // begin ModalBar ugen
2103 //------------------------------------------------------------------------2103 //------------------------------------------------------------------------
2104 2104
2105 doc = "This class implements a number of different struck bar instruments. It inherits from the Modal class.\n\2105 doc = "a suite of struck bar instruments. It inherits from the Modal class.\n\
2106\n\2106\n\
2107Control Change Numbers:\n\2107Control Change Numbers:\n\
2108\n\2108\n\
@@ -2139,125 +2139,125 @@ by Perry R. Cook and Gary P. Scavone, 1995 - 2002."; · 30 unmodified lines
2139 2139
2140 func = make_new_mfun( "float", "strike", ModalBar_ctrl_strike ); //! strike bar2140 func = make_new_mfun( "float", "strike", ModalBar_ctrl_strike ); //! strike bar
2141 func->add_arg( "float", "value" );2141 func->add_arg( "float", "value" );
2142 func->doc = "Strike bar, [0.0-1.0].";2142 func->doc = "strike bar, [0.0-1.0].";
2143 if( !type_engine_import_mfun( env, func ) ) goto error;2143 if( !type_engine_import_mfun( env, func ) ) goto error;
2144 2144
2145 func = make_new_mfun( "float", "damp", ModalBar_ctrl_damp ); //! damp bar2145 func = make_new_mfun( "float", "damp", ModalBar_ctrl_damp ); //! damp bar
2146 func->add_arg( "float", "value" );2146 func->add_arg( "float", "value" );
2147 func->doc = "Damp bar, [0.0-1.0].";2147 func->doc = "damp bar, [0.0-1.0].";
2148 if( !type_engine_import_mfun( env, func ) ) goto error;2148 if( !type_engine_import_mfun( env, func ) ) goto error;
2149 2149
2150 func = make_new_mfun( "float", "clear", ModalBar_ctrl_clear ); //! clear2150 func = make_new_mfun( "float", "clear", ModalBar_ctrl_clear ); //! clear
2151 func->add_arg( "float", "value" );2151 func->add_arg( "float", "value" );
2152 func->doc = "Clear instrument.";2152 func->doc = "clear instrument.";
2153 if( !type_engine_import_mfun( env, func ) ) goto error;2153 if( !type_engine_import_mfun( env, func ) ) goto error;
2154 2154
2155 func = make_new_mfun( "int", "preset", ModalBar_ctrl_preset ); //! choose preset2155 func = make_new_mfun( "int", "preset", ModalBar_ctrl_preset ); //! choose preset
2156 func->add_arg( "int", "value" );2156 func->add_arg( "int", "value" );
2157 func->doc = "Set preset (see above).";2157 func->doc = "set preset (see above).";
2158 if( !type_engine_import_mfun( env, func ) ) goto error;2158 if( !type_engine_import_mfun( env, func ) ) goto error;
2159 2159
2160 func = make_new_mfun( "int", "preset", ModalBar_cget_preset ); //! choose preset2160 func = make_new_mfun( "int", "preset", ModalBar_cget_preset ); //! choose preset
2161 func->doc = "Get preset.";2161 func->doc = "get preset.";
2162 if( !type_engine_import_mfun( env, func ) ) goto error;2162 if( !type_engine_import_mfun( env, func ) ) goto error;
2163 2163
2164 func = make_new_mfun( "float", "stickHardness", ModalBar_ctrl_stickHardness ); //! set stickHardness2164 func = make_new_mfun( "float", "stickHardness", ModalBar_ctrl_stickHardness ); //! set stickHardness
2165 func->add_arg( "float", "value" );2165 func->add_arg( "float", "value" );
2166 func->doc = "Set stick hardness, [0.0-1.0].";2166 func->doc = "set stick hardness, [0.0-1.0].";
2167 if( !type_engine_import_mfun( env, func ) ) goto error;2167 if( !type_engine_import_mfun( env, func ) ) goto error;
2168 2168
2169 func = make_new_mfun( "float", "stickHardness", ModalBar_cget_stickHardness ); //! set stickHardness2169 func = make_new_mfun( "float", "stickHardness", ModalBar_cget_stickHardness ); //! set stickHardness
2170 func->doc = "Get stick hardness, [0.0-1.0]";2170 func->doc = "get stick hardness, [0.0-1.0]";
2171 if( !type_engine_import_mfun( env, func ) ) goto error;2171 if( !type_engine_import_mfun( env, func ) ) goto error;
2172 2172
2173 func = make_new_mfun( "float", "strikePosition", ModalBar_ctrl_strikePosition ); //! set strikePosition2173 func = make_new_mfun( "float", "strikePosition", ModalBar_ctrl_strikePosition ); //! set strikePosition
2174 func->add_arg( "float", "value" );2174 func->add_arg( "float", "value" );
2175 func->doc = "Set strike position, [0.0-1.0].";2175 func->doc = "set strike position, [0.0-1.0].";
2176 if( !type_engine_import_mfun( env, func ) ) goto error;2176 if( !type_engine_import_mfun( env, func ) ) goto error;
2177 2177
2178 func = make_new_mfun( "float", "strikePosition", ModalBar_cget_strikePosition ); //! set strikePosition2178 func = make_new_mfun( "float", "strikePosition", ModalBar_cget_strikePosition ); //! set strikePosition
2179 func->doc = "Get strike position, [0.0-1.0].";2179 func->doc = "get strike position, [0.0-1.0].";
2180 if( !type_engine_import_mfun( env, func ) ) goto error;2180 if( !type_engine_import_mfun( env, func ) ) goto error;
2181 2181
2182 func = make_new_mfun( "float", "vibratoGain", ModalBar_ctrl_vibratoGain ); //! set vibratoGain2182 func = make_new_mfun( "float", "vibratoGain", ModalBar_ctrl_vibratoGain ); //! set vibratoGain
2183 func->add_arg( "float", "value" );2183 func->add_arg( "float", "value" );
2184 func->doc = "Set vibrato gain, [0.0-1.0].";2184 func->doc = "set vibrato gain, [0.0-1.0].";
2185 if( !type_engine_import_mfun( env, func ) ) goto error;2185 if( !type_engine_import_mfun( env, func ) ) goto error;
2186 2186
2187 func = make_new_mfun( "float", "vibratoGain", ModalBar_cget_vibratoGain ); //! set vibratoGain2187 func = make_new_mfun( "float", "vibratoGain", ModalBar_cget_vibratoGain ); //! set vibratoGain
2188 func->doc = "Get vibrato gain, [0.0-1.0].";2188 func->doc = "get vibrato gain, [0.0-1.0].";
2189 if( !type_engine_import_mfun( env, func ) ) goto error;2189 if( !type_engine_import_mfun( env, func ) ) goto error;
2190 2190
2191 func = make_new_mfun( "float", "vibratoFreq", ModalBar_ctrl_vibratoFreq ); //! set vibratoFreq2191 func = make_new_mfun( "float", "vibratoFreq", ModalBar_ctrl_vibratoFreq ); //! set vibratoFreq
2192 func->add_arg( "float", "value" );2192 func->add_arg( "float", "value" );
2193 func->doc = "Set vibrato frequency (Hz).";2193 func->doc = "set vibrato frequency (Hz).";
2194 if( !type_engine_import_mfun( env, func ) ) goto error;2194 if( !type_engine_import_mfun( env, func ) ) goto error;
2195 2195
2196 func = make_new_mfun( "float", "vibratoFreq", ModalBar_cget_vibratoFreq ); //! set vibratoFreq2196 func = make_new_mfun( "float", "vibratoFreq", ModalBar_cget_vibratoFreq ); //! set vibratoFreq
2197 func->doc = "Get vibrato frequency (Hz).";2197 func->doc = "get vibrato frequency (Hz).";
2198 if( !type_engine_import_mfun( env, func ) ) goto error;2198 if( !type_engine_import_mfun( env, func ) ) goto error;
2199 2199
2200 func = make_new_mfun( "float", "directGain", ModalBar_ctrl_directGain ); //! set directGain2200 func = make_new_mfun( "float", "directGain", ModalBar_ctrl_directGain ); //! set directGain
2201 func->add_arg( "float", "value" );2201 func->add_arg( "float", "value" );
2202 func->doc = "Set direct gain, [0.0-1.0].";2202 func->doc = "set direct gain, [0.0-1.0].";
2203 if( !type_engine_import_mfun( env, func ) ) goto error;2203 if( !type_engine_import_mfun( env, func ) ) goto error;
2204 2204
2205 func = make_new_mfun( "float", "directGain", ModalBar_cget_directGain ); //! set directGain2205 func = make_new_mfun( "float", "directGain", ModalBar_cget_directGain ); //! set directGain
2206 func->doc = "Get direct gain, [0.0-1.0].";2206 func->doc = "get direct gain, [0.0-1.0].";
2207 if( !type_engine_import_mfun( env, func ) ) goto error;2207 if( !type_engine_import_mfun( env, func ) ) goto error;
2208 2208
2209 func = make_new_mfun( "float", "masterGain", ModalBar_ctrl_masterGain ); //! set masterGain2209 func = make_new_mfun( "float", "masterGain", ModalBar_ctrl_masterGain ); //! set masterGain
2210 func->add_arg( "float", "value" );2210 func->add_arg( "float", "value" );
2211 func->doc = "Set master gain, [0.0-1.0].";2211 func->doc = "set master gain, [0.0-1.0].";
2212 if( !type_engine_import_mfun( env, func ) ) goto error;2212 if( !type_engine_import_mfun( env, func ) ) goto error;
2213 2213
2214 func = make_new_mfun( "float", "masterGain", ModalBar_cget_masterGain ); //! set masterGain2214 func = make_new_mfun( "float", "masterGain", ModalBar_cget_masterGain ); //! set masterGain
2215 func->doc = "Get master gain, [0.0-1.0].";2215 func->doc = "get master gain, [0.0-1.0].";
2216 if( !type_engine_import_mfun( env, func ) ) goto error;2216 if( !type_engine_import_mfun( env, func ) ) goto error;
2217 2217
2218 func = make_new_mfun( "int", "mode", ModalBar_ctrl_mode ); //! choose mode2218 func = make_new_mfun( "int", "mode", ModalBar_ctrl_mode ); //! choose mode
2219 func->add_arg( "int", "value" );2219 func->add_arg( "int", "value" );
2220 func->doc = "Set mode.";2220 func->doc = "set mode.";
2221 if( !type_engine_import_mfun( env, func ) ) goto error;2221 if( !type_engine_import_mfun( env, func ) ) goto error;
2222 2222
2223 func = make_new_mfun( "int", "mode", ModalBar_cget_mode ); //! choose mode2223 func = make_new_mfun( "int", "mode", ModalBar_cget_mode ); //! choose mode
2224 func->doc = "Get mode.";2224 func->doc = "get mode.";
2225 if( !type_engine_import_mfun( env, func ) ) goto error;2225 if( !type_engine_import_mfun( env, func ) ) goto error;
2226 2226
2227 func = make_new_mfun( "float", "modeRatio", ModalBar_ctrl_modeRatio ); //! mode edit (modeRatio)2227 func = make_new_mfun( "float", "modeRatio", ModalBar_ctrl_modeRatio ); //! mode edit (modeRatio)
2228 func->add_arg( "float", "value" );2228 func->add_arg( "float", "value" );
2229 func->doc = "Set ratio for selected mode.";2229 func->doc = "set ratio for selected mode.";
2230 if( !type_engine_import_mfun( env, func ) ) goto error;2230 if( !type_engine_import_mfun( env, func ) ) goto error;
2231 2231
2232 func = make_new_mfun( "float", "modeRatio", ModalBar_cget_modeRatio ); //! mode edit (modeRatio)2232 func = make_new_mfun( "float", "modeRatio", ModalBar_cget_modeRatio ); //! mode edit (modeRatio)
2233 func->doc = "Get ratio for selected mode.";2233 func->doc = "get ratio for selected mode.";
2234 if( !type_engine_import_mfun( env, func ) ) goto error;2234 if( !type_engine_import_mfun( env, func ) ) goto error;
2235 2235
2236 func = make_new_mfun( "float", "modeRadius", ModalBar_ctrl_modeRadius ); //! mode edit (modeRadius)2236 func = make_new_mfun( "float", "modeRadius", ModalBar_ctrl_modeRadius ); //! mode edit (modeRadius)
2237 func->add_arg( "float", "value" );2237 func->add_arg( "float", "value" );
2238 func->doc = "Set radius for selected mode, [0.0-1.0].";2238 func->doc = "set radius for selected mode, [0.0-1.0].";
2239 if( !type_engine_import_mfun( env, func ) ) goto error;2239 if( !type_engine_import_mfun( env, func ) ) goto error;
2240 2240
2241 func = make_new_mfun( "float", "modeRadius", ModalBar_cget_modeRadius ); //! mode edit (modeRadius)2241 func = make_new_mfun( "float", "modeRadius", ModalBar_cget_modeRadius ); //! mode edit (modeRadius)
2242 func->doc = "Get radius for selected mode, [0.0-1.0].";2242 func->doc = "get radius for selected mode, [0.0-1.0].";
2243 if( !type_engine_import_mfun( env, func ) ) goto error;2243 if( !type_engine_import_mfun( env, func ) ) goto error;
2244 2244
2245 func = make_new_mfun( "float", "modeGain", ModalBar_ctrl_modeGain ); //! mode edit (modeGain)2245 func = make_new_mfun( "float", "modeGain", ModalBar_ctrl_modeGain ); //! mode edit (modeGain)
2246 func->add_arg( "float", "value" );2246 func->add_arg( "float", "value" );
2247 func->doc = "Set gain for selected mode, [0.0-1.0].";2247 func->doc = "set gain for selected mode, [0.0-1.0].";
2248 if( !type_engine_import_mfun( env, func ) ) goto error;2248 if( !type_engine_import_mfun( env, func ) ) goto error;
2249 2249
2250 func = make_new_mfun( "float", "modeGain", ModalBar_cget_modeGain ); //! mode edit (modeGain)2250 func = make_new_mfun( "float", "modeGain", ModalBar_cget_modeGain ); //! mode edit (modeGain)
2251 func->doc = "Get gain for selected mode, [0.0-1.0].";2251 func->doc = "get gain for selected mode, [0.0-1.0].";
2252 if( !type_engine_import_mfun( env, func ) ) goto error;2252 if( !type_engine_import_mfun( env, func ) ) goto error;
2253 2253
2254 func = make_new_mfun( "float", "volume", ModalBar_ctrl_volume ); //! volume2254 func = make_new_mfun( "float", "volume", ModalBar_ctrl_volume ); //! volume
2255 func->add_arg( "float", "value" );2255 func->add_arg( "float", "value" );
2256 func->doc = "Set volume, [0.0-1.0].";2256 func->doc = "set volume, [0.0-1.0].";
2257 if( !type_engine_import_mfun( env, func ) ) goto error;2257 if( !type_engine_import_mfun( env, func ) ) goto error;
2258 2258
2259 func = make_new_mfun( "float", "volume", ModalBar_cget_volume ); //! volume2259 func = make_new_mfun( "float", "volume", ModalBar_cget_volume ); //! volume
2260 func->doc = "Get volume, [0.0-1.0].";2260 func->doc = "get volume, [0.0-1.0].";
2261 if( !type_engine_import_mfun( env, func ) ) goto error;2261 if( !type_engine_import_mfun( env, func ) ) goto error;
2262 2262
2263 // end the class import2263 // end the class import
@@ -2268,7 +2268,7 @@ by Perry R. Cook and Gary P. Scavone, 1995 - 2002."; · 4 unmodified lines
2268 // begin Moog ugen2268 // begin Moog ugen
2269 //------------------------------------------------------------------------2269 //------------------------------------------------------------------------
2270 2270
2271 doc = "This instrument uses one attack wave, one looped wave, and an ADSR envelope (inherited from the Sampler class) and adds two sweepable formant (FormSwep) filters.\n\2271 doc = "a Moog instrument modeled using one attack wave, one looped wave, and an ADSR envelope (inherited from the Sampler class) and adds two sweepable formant (FormSwep) filters.\n\
2272\n\2272\n\
2273Control Change Numbers:\n\2273Control Change Numbers:\n\
2274\n\2274\n\
@@ -2295,88 +2295,88 @@ by Perry R. Cook and Gary P. Scavone, 1995 - 2002."; · 20 unmodified lines
2295 2295
2296 func = make_new_mfun( "float", "lfoSpeed", Moog_ctrl_modSpeed ); //! modulation speed2296 func = make_new_mfun( "float", "lfoSpeed", Moog_ctrl_modSpeed ); //! modulation speed
2297 func->add_arg( "float", "value" );2297 func->add_arg( "float", "value" );
2298 func->doc = "Set LFO modulation speed.";2298 func->doc = "set LFO modulation speed.";
2299 if( !type_engine_import_mfun( env, func ) ) goto error;2299 if( !type_engine_import_mfun( env, func ) ) goto error;
2300 2300
2301 func = make_new_mfun( "float", "lfoSpeed", Moog_cget_modSpeed ); //! modulation speed2301 func = make_new_mfun( "float", "lfoSpeed", Moog_cget_modSpeed ); //! modulation speed
2302 func->doc = "Get LFO modulation speed.";2302 func->doc = "get LFO modulation speed.";
2303 if( !type_engine_import_mfun( env, func ) ) goto error;2303 if( !type_engine_import_mfun( env, func ) ) goto error;
2304 2304
2305 func = make_new_mfun( "float", "lfoDepth", Moog_ctrl_modDepth ); //! modulation depth2305 func = make_new_mfun( "float", "lfoDepth", Moog_ctrl_modDepth ); //! modulation depth
2306 func->add_arg( "float", "value" );2306 func->add_arg( "float", "value" );
2307 func->doc = "Set LFO modulation depth.";2307 func->doc = "set LFO modulation depth.";
2308 if( !type_engine_import_mfun( env, func ) ) goto error;2308 if( !type_engine_import_mfun( env, func ) ) goto error;
2309 2309
2310 func = make_new_mfun( "float", "lfoDepth", Moog_cget_modDepth ); //! modulation depth2310 func = make_new_mfun( "float", "lfoDepth", Moog_cget_modDepth ); //! modulation depth
2311 func->doc = "Get LFO modulation depth.";2311 func->doc = "get LFO modulation depth.";
2312 if( !type_engine_import_mfun( env, func ) ) goto error;2312 if( !type_engine_import_mfun( env, func ) ) goto error;
2313 2313
2314 func = make_new_mfun( "float", "modSpeed", Moog_ctrl_modSpeed ); //! modulation speed2314 func = make_new_mfun( "float", "modSpeed", Moog_ctrl_modSpeed ); //! modulation speed
2315 func->add_arg( "float", "value" );2315 func->add_arg( "float", "value" );
2316 func->doc = "Set modulation speed.";2316 func->doc = "set modulation speed.";
2317 if( !type_engine_import_mfun( env, func ) ) goto error;2317 if( !type_engine_import_mfun( env, func ) ) goto error;
2318 2318
2319 func = make_new_mfun( "float", "modSpeed", Moog_cget_modSpeed ); //! modulation speed2319 func = make_new_mfun( "float", "modSpeed", Moog_cget_modSpeed ); //! modulation speed
2320 func->doc = "Get modulation speed.";2320 func->doc = "get modulation speed.";
2321 if( !type_engine_import_mfun( env, func ) ) goto error;2321 if( !type_engine_import_mfun( env, func ) ) goto error;
2322 2322
2323 func = make_new_mfun( "float", "modDepth", Moog_ctrl_modDepth ); //! modulation depth2323 func = make_new_mfun( "float", "modDepth", Moog_ctrl_modDepth ); //! modulation depth
2324 func->add_arg( "float", "value" );2324 func->add_arg( "float", "value" );
2325 func->doc = "Set modulation depth.";2325 func->doc = "set modulation depth.";
2326 if( !type_engine_import_mfun( env, func ) ) goto error;2326 if( !type_engine_import_mfun( env, func ) ) goto error;
2327 2327
2328 func = make_new_mfun( "float", "modDepth", Moog_cget_modDepth ); //! modulation depth2328 func = make_new_mfun( "float", "modDepth", Moog_cget_modDepth ); //! modulation depth
2329 func->doc = "Get modulation depth.";2329 func->doc = "get modulation depth.";
2330 if( !type_engine_import_mfun( env, func ) ) goto error;2330 if( !type_engine_import_mfun( env, func ) ) goto error;
2331 2331
2332 func = make_new_mfun( "float", "filterQ", Moog_ctrl_filterQ ); //! filter Q value2332 func = make_new_mfun( "float", "filterQ", Moog_ctrl_filterQ ); //! filter Q value
2333 func->add_arg( "float", "value" );2333 func->add_arg( "float", "value" );
2334 func->doc = "Set filter Q value, [0.0-1.0].";2334 func->doc = "set filter Q value, [0.0-1.0].";
2335 if( !type_engine_import_mfun( env, func ) ) goto error;2335 if( !type_engine_import_mfun( env, func ) ) goto error;
2336 2336
2337 func = make_new_mfun( "float", "filterQ", Moog_cget_filterQ ); //! filter Q value2337 func = make_new_mfun( "float", "filterQ", Moog_cget_filterQ ); //! filter Q value
2338 func->doc = "Get filter Q value, [0.0-1.0].";2338 func->doc = "get filter Q value, [0.0-1.0].";
2339 if( !type_engine_import_mfun( env, func ) ) goto error;2339 if( !type_engine_import_mfun( env, func ) ) goto error;
2340 2340
2341 func = make_new_mfun( "float", "filterSweepRate", Moog_ctrl_filterSweepRate ); //! filter sweep rate2341 func = make_new_mfun( "float", "filterSweepRate", Moog_ctrl_filterSweepRate ); //! filter sweep rate
2342 func->add_arg( "float", "value" );2342 func->add_arg( "float", "value" );
2343 func->doc = "Set filter sweep rate, [0.0-1.0].";2343 func->doc = "set filter sweep rate, [0.0-1.0].";
2344 if( !type_engine_import_mfun( env, func ) ) goto error;2344 if( !type_engine_import_mfun( env, func ) ) goto error;
2345 2345
2346 func = make_new_mfun( "float", "filterSweepRate", Moog_cget_filterSweepRate ); //! filter sweep rate2346 func = make_new_mfun( "float", "filterSweepRate", Moog_cget_filterSweepRate ); //! filter sweep rate
2347 func->doc = "Get filter sweep rate, [0.0-1.0].";2347 func->doc = "get filter sweep rate, [0.0-1.0].";
2348 if( !type_engine_import_mfun( env, func ) ) goto error;2348 if( !type_engine_import_mfun( env, func ) ) goto error;
2349 2349
2350 func = make_new_mfun( "float", "afterTouch", Moog_ctrl_afterTouch ); // aftertouch2350 func = make_new_mfun( "float", "afterTouch", Moog_ctrl_afterTouch ); // aftertouch
2351 func->add_arg( "float", "value" );2351 func->add_arg( "float", "value" );
2352 func->doc = "Set aftertouch, [0.0-1.0].";2352 func->doc = "set aftertouch, [0.0-1.0].";
2353 if( !type_engine_import_mfun( env, func ) ) goto error;2353 if( !type_engine_import_mfun( env, func ) ) goto error;
2354 2354
2355 func = make_new_mfun( "float", "volume", Moog_ctrl_volume ); //! volume2355 func = make_new_mfun( "float", "volume", Moog_ctrl_volume ); //! volume
2356 func->add_arg( "float", "value" );2356 func->add_arg( "float", "value" );
2357 func->doc = "Set volume.";2357 func->doc = "set volume.";
2358 if( !type_engine_import_mfun( env, func ) ) goto error;2358 if( !type_engine_import_mfun( env, func ) ) goto error;
2359 2359
2360 func = make_new_mfun( "float", "volume", Moog_cget_volume ); //! volume2360 func = make_new_mfun( "float", "volume", Moog_cget_volume ); //! volume
2361 func->doc = "Get volume.";2361 func->doc = "get volume.";
2362 if( !type_engine_import_mfun( env, func ) ) goto error;2362 if( !type_engine_import_mfun( env, func ) ) goto error;
2363 2363
2364 func = make_new_mfun( "float", "vibratoFreq", Moog_ctrl_vibratoFreq ); //! vibrato frequency2364 func = make_new_mfun( "float", "vibratoFreq", Moog_ctrl_vibratoFreq ); //! vibrato frequency
2365 func->add_arg( "float", "value" );2365 func->add_arg( "float", "value" );
2366 func->doc = "Set vibrato frequency (Hz).";2366 func->doc = "set vibrato frequency (Hz).";
2367 if( !type_engine_import_mfun( env, func ) ) goto error;2367 if( !type_engine_import_mfun( env, func ) ) goto error;
2368 2368
2369 func = make_new_mfun( "float", "vibratoFreq", Moog_cget_vibratoFreq ); //! vibrato frequency2369 func = make_new_mfun( "float", "vibratoFreq", Moog_cget_vibratoFreq ); //! vibrato frequency
2370 func->doc = "Get vibrato frequency (Hz).";2370 func->doc = "get vibrato frequency (Hz).";
2371 if( !type_engine_import_mfun( env, func ) ) goto error;2371 if( !type_engine_import_mfun( env, func ) ) goto error;
2372 2372
2373 func = make_new_mfun( "float", "vibratoGain", Moog_ctrl_vibratoGain ); //! vibrato gain2373 func = make_new_mfun( "float", "vibratoGain", Moog_ctrl_vibratoGain ); //! vibrato gain
2374 func->add_arg( "float", "value" );2374 func->add_arg( "float", "value" );
2375 func->doc = "Set vibrato gain, [0.0-1.0].";2375 func->doc = "set vibrato gain, [0.0-1.0].";
2376 if( !type_engine_import_mfun( env, func ) ) goto error;2376 if( !type_engine_import_mfun( env, func ) ) goto error;
2377 2377
2378 func = make_new_mfun( "float", "vibratoGain", Moog_cget_vibratoGain ); //! vibrato gain2378 func = make_new_mfun( "float", "vibratoGain", Moog_cget_vibratoGain ); //! vibrato gain
2379 func->doc = "Get vibrato gain, [0.0-1.0].";2379 func->doc = "get vibrato gain, [0.0-1.0].";
2380 if( !type_engine_import_mfun( env, func ) ) goto error;2380 if( !type_engine_import_mfun( env, func ) ) goto error;
2381 2381
2382 // end the class import2382 // end the class import
@@ -2387,7 +2387,7 @@ by Perry R. Cook and Gary P. Scavone, 1995 - 2002."; · 4 unmodified lines
2387 // begin Saxofony ugen2387 // begin Saxofony ugen
2388 //------------------------------------------------------------------------2388 //------------------------------------------------------------------------
2389 2389
2390 doc = "This class implements a 'hybrid' digital waveguide instrument that can generate a variety of wind-like sounds. It has also been referred to as the 'blowed string' model. The waveguide section is essentially that of a string, with one rigid and one lossy termination. The non-linear function is a reed table. The string can be 'blown' at any point between the terminations, though just as with strings, it is impossible to excite the system at either end. If the excitation is placed at the string mid-point, the sound is that of a clarinet. At points closer to the 'bridge', the sound is closer to that of a saxophone. See Scavone (2002) for more details.\n\2390 doc = "a 'hybrid' digital waveguide instrument that can generate a variety of wind-like sounds. It has also been referred to as the 'blowed string' model. The waveguide section is essentially that of a string, with one rigid and one lossy termination. The non-linear function is a reed table. The string can be 'blown' at any point between the terminations, though just as with strings, it is impossible to excite the system at either end. If the excitation is placed at the string mid-point, the sound is that of a clarinet. At points closer to the 'bridge', the sound is closer to that of a saxophone. See Scavone (2002) for more details.\n\
2391\n\2391\n\
2392This is a digital waveguide model, making its use possibly subject to patents held by Stanford University, Yamaha, and others.\n\2392This is a digital waveguide model, making its use possibly subject to patents held by Stanford University, Yamaha, and others.\n\
2393\n\2393\n\
@@ -2415,89 +2415,89 @@ by Perry R. Cook and Gary P. Scavone, 1995 - 2002."; · 21 unmodified lines
2415 2415
2416 func = make_new_mfun( "float", "clear", Saxofony_ctrl_clear ); //! clear instrument2416 func = make_new_mfun( "float", "clear", Saxofony_ctrl_clear ); //! clear instrument
2417 func->add_arg( "float", "value" );2417 func->add_arg( "float", "value" );
2418 func->doc = "Clear instrument.";2418 func->doc = "clear instrument.";
2419 if( !type_engine_import_mfun( env, func ) ) goto error;2419 if( !type_engine_import_mfun( env, func ) ) goto error;
2420 2420
2421 func = make_new_mfun( "float", "startBlowing", Saxofony_ctrl_startBlowing ); //! note on2421 func = make_new_mfun( "float", "startBlowing", Saxofony_ctrl_startBlowing ); //! note on
2422 func->add_arg( "float", "value" );2422 func->add_arg( "float", "value" );
2423 func->doc = "Start blowing, [0.0-1.0].";2423 func->doc = "start blowing, [0.0-1.0].";
2424 if( !type_engine_import_mfun( env, func ) ) goto error;2424 if( !type_engine_import_mfun( env, func ) ) goto error;
2425 2425
2426 func = make_new_mfun( "float", "stopBlowing", Saxofony_ctrl_stopBlowing ); //! note on2426 func = make_new_mfun( "float", "stopBlowing", Saxofony_ctrl_stopBlowing ); //! note on
2427 func->add_arg( "float", "value" );2427 func->add_arg( "float", "value" );
2428 func->doc = "Stop blowing, [0.0-1.0].";2428 func->doc = "stop blowing, [0.0-1.0].";
2429 if( !type_engine_import_mfun( env, func ) ) goto error;2429 if( !type_engine_import_mfun( env, func ) ) goto error;
2430 2430
2431 func = make_new_mfun( "float", "rate", Saxofony_ctrl_rate ); //! rate2431 func = make_new_mfun( "float", "rate", Saxofony_ctrl_rate ); //! rate
2432 func->add_arg( "float", "value" );2432 func->add_arg( "float", "value" );
2433 func->doc = "Set rate of attack (seconds).";2433 func->doc = "set rate of attack (seconds).";
2434 if( !type_engine_import_mfun( env, func ) ) goto error;2434 if( !type_engine_import_mfun( env, func ) ) goto error;
2435 2435
2436 func = make_new_mfun( "float", "rate", Saxofony_cget_rate ); //! rate2436 func = make_new_mfun( "float", "rate", Saxofony_cget_rate ); //! rate
2437 func->doc = "Get rate of attack (seconds).";2437 func->doc = "get rate of attack (seconds).";
2438 if( !type_engine_import_mfun( env, func ) ) goto error;2438 if( !type_engine_import_mfun( env, func ) ) goto error;
2439 2439
2440 func = make_new_mfun( "float", "stiffness", Saxofony_ctrl_reed ); //! stiffness2440 func = make_new_mfun( "float", "stiffness", Saxofony_ctrl_reed ); //! stiffness
2441 func->add_arg( "float", "value" );2441 func->add_arg( "float", "value" );
2442 func->doc = "Set reed stiffness, [0.0-1.0].";2442 func->doc = "set reed stiffness, [0.0-1.0].";
2443 if( !type_engine_import_mfun( env, func ) ) goto error;2443 if( !type_engine_import_mfun( env, func ) ) goto error;
2444 2444
2445 func = make_new_mfun( "float", "stiffness", Saxofony_cget_reed ); //! stiffness2445 func = make_new_mfun( "float", "stiffness", Saxofony_cget_reed ); //! stiffness
2446 func->doc = "Get reed stiffness, [0.0-1.0].";2446 func->doc = "get reed stiffness, [0.0-1.0].";
2447 if( !type_engine_import_mfun( env, func ) ) goto error;2447 if( !type_engine_import_mfun( env, func ) ) goto error;
2448 2448
2449 func = make_new_mfun( "float", "aperture", Saxofony_ctrl_aperture ); //! aperture2449 func = make_new_mfun( "float", "aperture", Saxofony_ctrl_aperture ); //! aperture
2450 func->add_arg( "float", "value" );2450 func->add_arg( "float", "value" );
2451 func->doc = "Set reed aperture, [0.0-1.0].";2451 func->doc = "set reed aperture, [0.0-1.0].";
2452 if( !type_engine_import_mfun( env, func ) ) goto error;2452 if( !type_engine_import_mfun( env, func ) ) goto error;
2453 2453
2454 func = make_new_mfun( "float", "aperture", Saxofony_cget_aperture ); //! aperture2454 func = make_new_mfun( "float", "aperture", Saxofony_cget_aperture ); //! aperture
2455 func->doc = "Get reed aperture, [0.0-1.0].";2455 func->doc = "get reed aperture, [0.0-1.0].";
2456 if( !type_engine_import_mfun( env, func ) ) goto error;2456 if( !type_engine_import_mfun( env, func ) ) goto error;
2457 2457
2458 func = make_new_mfun( "float", "noiseGain", Saxofony_ctrl_noiseGain ); //! noiseGain2458 func = make_new_mfun( "float", "noiseGain", Saxofony_ctrl_noiseGain ); //! noiseGain
2459 func->add_arg( "float", "value" );2459 func->add_arg( "float", "value" );
2460 func->doc = "Set noise component gain, [0.0-1.0].";2460 func->doc = "set noise component gain, [0.0-1.0].";
2461 if( !type_engine_import_mfun( env, func ) ) goto error;2461 if( !type_engine_import_mfun( env, func ) ) goto error;
2462 2462
2463 func = make_new_mfun( "float", "noiseGain", Saxofony_cget_noiseGain ); //! noiseGain2463 func = make_new_mfun( "float", "noiseGain", Saxofony_cget_noiseGain ); //! noiseGain
2464 func->doc = "Get noise component gain, [0.0-1.0].";2464 func->doc = "get noise component gain, [0.0-1.0].";
2465 if( !type_engine_import_mfun( env, func ) ) goto error;2465 if( !type_engine_import_mfun( env, func ) ) goto error;
2466 2466
2467 func = make_new_mfun( "float", "vibratoGain", Saxofony_ctrl_vibratoGain ); //! vibratoGain2467 func = make_new_mfun( "float", "vibratoGain", Saxofony_ctrl_vibratoGain ); //! vibratoGain
2468 func->add_arg( "float", "value" );2468 func->add_arg( "float", "value" );
2469 func->doc = "Set vibrato gain, [0.0-1.0].";2469 func->doc = "set vibrato gain, [0.0-1.0].";
2470 if( !type_engine_import_mfun( env, func ) ) goto error;2470 if( !type_engine_import_mfun( env, func ) ) goto error;
2471 2471
2472 func = make_new_mfun( "float", "vibratoGain", Saxofony_cget_vibratoGain ); //! vibratoGain2472 func = make_new_mfun( "float", "vibratoGain", Saxofony_cget_vibratoGain ); //! vibratoGain
2473 func->doc = "Get vibrato gain, [0.0-1.0].";2473 func->doc = "get vibrato gain, [0.0-1.0].";
2474 if( !type_engine_import_mfun( env, func ) ) goto error;2474 if( !type_engine_import_mfun( env, func ) ) goto error;
2475 2475
2476 func = make_new_mfun( "float", "vibratoFreq", Saxofony_ctrl_vibratoFreq ); //! vibratoFreq2476 func = make_new_mfun( "float", "vibratoFreq", Saxofony_ctrl_vibratoFreq ); //! vibratoFreq
2477 func->add_arg( "float", "value" );2477 func->add_arg( "float", "value" );
2478 func->doc = "Set vibrato frequency (Hz).";2478 func->doc = "set vibrato frequency (Hz).";
2479 if( !type_engine_import_mfun( env, func ) ) goto error;2479 if( !type_engine_import_mfun( env, func ) ) goto error;
2480 2480
2481 func = make_new_mfun( "float", "vibratoFreq", Saxofony_cget_vibratoFreq ); //! vibratoFreq2481 func = make_new_mfun( "float", "vibratoFreq", Saxofony_cget_vibratoFreq ); //! vibratoFreq
2482 func->doc = "Get vibrato frequency (Hz).";2482 func->doc = "get vibrato frequency (Hz).";
2483 if( !type_engine_import_mfun( env, func ) ) goto error;2483 if( !type_engine_import_mfun( env, func ) ) goto error;
2484 2484
2485 func = make_new_mfun( "float", "blowPosition", Saxofony_ctrl_blowPosition ); //! blowPosition2485 func = make_new_mfun( "float", "blowPosition", Saxofony_ctrl_blowPosition ); //! blowPosition
2486 func->add_arg( "float", "value" );2486 func->add_arg( "float", "value" );
2487 func->doc = "Set lip stiffness, [0.0-1.0].";2487 func->doc = "set lip stiffness, [0.0-1.0].";
2488 if( !type_engine_import_mfun( env, func ) ) goto error;2488 if( !type_engine_import_mfun( env, func ) ) goto error;
2489 2489
2490 func = make_new_mfun( "float", "blowPosition", Saxofony_cget_blowPosition ); //! blowPosition2490 func = make_new_mfun( "float", "blowPosition", Saxofony_cget_blowPosition ); //! blowPosition
2491 func->doc = "Get lip stiffness, [0.0-1.0].";2491 func->doc = "get lip stiffness, [0.0-1.0].";
2492 if( !type_engine_import_mfun( env, func ) ) goto error;2492 if( !type_engine_import_mfun( env, func ) ) goto error;
2493 2493
2494 func = make_new_mfun( "float", "pressure", Saxofony_ctrl_pressure ); //! pressure2494 func = make_new_mfun( "float", "pressure", Saxofony_ctrl_pressure ); //! pressure
2495 func->add_arg( "float", "value" );2495 func->add_arg( "float", "value" );
2496 func->doc = "Set pressure, [0.0-1.0]";2496 func->doc = "set pressure, [0.0-1.0]";
2497 if( !type_engine_import_mfun( env, func ) ) goto error;2497 if( !type_engine_import_mfun( env, func ) ) goto error;
2498 2498
2499 func = make_new_mfun( "float", "pressure", Saxofony_cget_pressure ); //! pressure2499 func = make_new_mfun( "float", "pressure", Saxofony_cget_pressure ); //! pressure
2500 func->doc = "Get pressure, [0.0-1.0]";2500 func->doc = "get pressure, [0.0-1.0]";
2501 if( !type_engine_import_mfun( env, func ) ) goto error;2501 if( !type_engine_import_mfun( env, func ) ) goto error;
2502 2502
2503 // end the class import2503 // end the class import
@@ -2560,66 +2560,66 @@ by Perry R. Cook, 1996 - 1999."; · 56 unmodified lines
2560 2560
2561 func = make_new_mfun( "int", "which", Shakers_ctrl_which ); //! select instrument2561 func = make_new_mfun( "int", "which", Shakers_ctrl_which ); //! select instrument
2562 func->add_arg( "int", "value" );2562 func->add_arg( "int", "value" );
2563 func->doc = "Set instrument, [0-22] (see above).";2563 func->doc = "set instrument, [0-22] (see above).";
2564 if( !type_engine_import_mfun( env, func ) ) goto error;2564 if( !type_engine_import_mfun( env, func ) ) goto error;
2565 2565
2566 func = make_new_mfun( "int", "which", Shakers_cget_which ); //! select instrument2566 func = make_new_mfun( "int", "which", Shakers_cget_which ); //! select instrument
2567 func->doc = "Get instrument, [0-22] (see above).";2567 func->doc = "get instrument, [0-22] (see above).";
2568 if( !type_engine_import_mfun( env, func ) ) goto error;2568 if( !type_engine_import_mfun( env, func ) ) goto error;
2569 2569
2570 func = make_new_mfun( "int", "preset", Shakers_ctrl_which ); //! select instrument2570 func = make_new_mfun( "int", "preset", Shakers_ctrl_which ); //! select instrument
2571 func->add_arg( "int", "value" );2571 func->add_arg( "int", "value" );
2572 func->doc = "Set instrument, [0-22] (see above).";2572 func->doc = "set instrument, [0-22] (see above).";
2573 if( !type_engine_import_mfun( env, func ) ) goto error;2573 if( !type_engine_import_mfun( env, func ) ) goto error;
2574 2574
2575 func = make_new_mfun( "int", "preset", Shakers_cget_which ); //! select instrument2575 func = make_new_mfun( "int", "preset", Shakers_cget_which ); //! select instrument
2576 func->doc = "Get instrument, [0-22] (see above).";2576 func->doc = "get instrument, [0-22] (see above).";
2577 if( !type_engine_import_mfun( env, func ) ) goto error;2577 if( !type_engine_import_mfun( env, func ) ) goto error;
2578 2578
2579 func = make_new_mfun( "float", "energy", Shakers_ctrl_energy ); //! energy2579 func = make_new_mfun( "float", "energy", Shakers_ctrl_energy ); //! energy
2580 func->add_arg( "float", "value" );2580 func->add_arg( "float", "value" );
2581 func->doc = "Set shake energy, [0.0-1.0].";2581 func->doc = "set shake energy, [0.0-1.0].";
2582 if( !type_engine_import_mfun( env, func ) ) goto error;2582 if( !type_engine_import_mfun( env, func ) ) goto error;
2583 2583
2584 func = make_new_mfun( "float", "energy", Shakers_cget_energy ); //! energy2584 func = make_new_mfun( "float", "energy", Shakers_cget_energy ); //! energy
2585 func->doc = "Get shake energy, [0.0-1.0].";2585 func->doc = "get shake energy, [0.0-1.0].";
2586 if( !type_engine_import_mfun( env, func ) ) goto error;2586 if( !type_engine_import_mfun( env, func ) ) goto error;
2587 2587
2588 func = make_new_mfun( "float", "decay", Shakers_ctrl_decay ); //! decay2588 func = make_new_mfun( "float", "decay", Shakers_ctrl_decay ); //! decay
2589 func->add_arg( "float", "value" );2589 func->add_arg( "float", "value" );
2590 func->doc = "Set system decay, [0.0-1.0].";2590 func->doc = "set system decay, [0.0-1.0].";
2591 if( !type_engine_import_mfun( env, func ) ) goto error;2591 if( !type_engine_import_mfun( env, func ) ) goto error;
2592 2592
2593 func = make_new_mfun( "float", "decay", Shakers_cget_decay ); //! decay2593 func = make_new_mfun( "float", "decay", Shakers_cget_decay ); //! decay
2594 func->doc = "Get system decay, [0.0-1.0].";2594 func->doc = "get system decay, [0.0-1.0].";
2595 if( !type_engine_import_mfun( env, func ) ) goto error;2595 if( !type_engine_import_mfun( env, func ) ) goto error;
2596 2596
2597 func = make_new_mfun( "float", "objects", Shakers_ctrl_objects ); //! objects2597 func = make_new_mfun( "float", "objects", Shakers_ctrl_objects ); //! objects
2598 func->add_arg( "float", "value" );2598 func->add_arg( "float", "value" );
2599 func->doc = "Set number of objects, [0.0-128.0].";2599 func->doc = "set number of objects, [0.0-128.0].";
2600 if( !type_engine_import_mfun( env, func ) ) goto error;2600 if( !type_engine_import_mfun( env, func ) ) goto error;
2601 2601
2602 func = make_new_mfun( "float", "objects", Shakers_cget_objects ); //! objects2602 func = make_new_mfun( "float", "objects", Shakers_cget_objects ); //! objects
2603 func->doc = "Get number of objects, [0.0-128.0].";2603 func->doc = "get number of objects, [0.0-128.0].";
2604 if( !type_engine_import_mfun( env, func ) ) goto error;2604 if( !type_engine_import_mfun( env, func ) ) goto error;
2605 2605
2606 func = make_new_mfun( "float", "freq", Shakers_ctrl_freq ); //! frequency2606 func = make_new_mfun( "float", "freq", Shakers_ctrl_freq ); //! frequency
2607 func->add_arg( "float", "value" );2607 func->add_arg( "float", "value" );
2608 func->doc = "Set frequency (Hz).";2608 func->doc = "set frequency (Hz).";
2609 if( !type_engine_import_mfun( env, func ) ) goto error;2609 if( !type_engine_import_mfun( env, func ) ) goto error;
2610 2610
2611 func = make_new_mfun( "float", "freq", Shakers_cget_freq ); //! frequency2611 func = make_new_mfun( "float", "freq", Shakers_cget_freq ); //! frequency
2612 func->doc = "Get frequency (Hz).";2612 func->doc = "get frequency (Hz).";
2613 if( !type_engine_import_mfun( env, func ) ) goto error;2613 if( !type_engine_import_mfun( env, func ) ) goto error;
2614 2614
2615 func = make_new_mfun( "float", "noteOn", Shakers_ctrl_noteOn ); //! note on2615 func = make_new_mfun( "float", "noteOn", Shakers_ctrl_noteOn ); //! note on
2616 func->add_arg( "float", "value" );2616 func->add_arg( "float", "value" );
2617 func->doc = "Trigger note on.";2617 func->doc = "trigger note on.";
2618 if( !type_engine_import_mfun( env, func ) ) goto error;2618 if( !type_engine_import_mfun( env, func ) ) goto error;
2619 2619
2620 func = make_new_mfun( "float", "noteOff", Shakers_ctrl_noteOff ); //! note off2620 func = make_new_mfun( "float", "noteOff", Shakers_ctrl_noteOff ); //! note off
2621 func->add_arg( "float", "value" );2621 func->add_arg( "float", "value" );
2622 func->doc = "Trigger note off.";2622 func->doc = "trigger note off.";
2623 if( !type_engine_import_mfun( env, func ) ) goto error;2623 if( !type_engine_import_mfun( env, func ) ) goto error;
2624 2624
2625 // end the class import2625 // end the class import
@@ -2630,7 +2630,7 @@ by Perry R. Cook, 1996 - 1999."; · 4 unmodified lines
2630 // begin Sitar ugen2630 // begin Sitar ugen
2631 //------------------------------------------------------------------------2631 //------------------------------------------------------------------------
2632 2632
2633 doc = "This class implements a sitar plucked string physical model based on the Karplus-Strong algorithm.\n\2633 doc = "a sitar plucked string physical model based on the Karplus-Strong algorithm.\n\
2634 \n\2634 \n\
2635This is a digital waveguide model, making its use possibly subject to patents held by Stanford University, Yamaha, and others. There exist at least two patents, assigned to Stanford, bearing the names of Karplus and/or Strong.\n\2635This is a digital waveguide model, making its use possibly subject to patents held by Stanford University, Yamaha, and others. There exist at least two patents, assigned to Stanford, bearing the names of Karplus and/or Strong.\n\
2636\n\2636\n\
@@ -2648,12 +2648,12 @@ by Perry R. Cook and Gary P. Scavone, 1995 - 2002."; · 11 unmodified lines
2648 2648
2649 func = make_new_mfun( "float", "pluck", Sitar_ctrl_pluck ); //! pluck2649 func = make_new_mfun( "float", "pluck", Sitar_ctrl_pluck ); //! pluck
2650 func->add_arg( "float", "value" );2650 func->add_arg( "float", "value" );
2651 func->doc = "Pluck string.";2651 func->doc = "pluck string.";
2652 if( !type_engine_import_mfun( env, func ) ) goto error;2652 if( !type_engine_import_mfun( env, func ) ) goto error;
2653 2653
2654 func = make_new_mfun( "float", "clear", Sitar_ctrl_clear ); 2654 func = make_new_mfun( "float", "clear", Sitar_ctrl_clear );
2655 func->add_arg( "float", "value" );2655 func->add_arg( "float", "value" );
2656 func->doc = "Clear instrument.";2656 func->doc = "clear instrument.";
2657 if( !type_engine_import_mfun( env, func ) ) goto error;2657 if( !type_engine_import_mfun( env, func ) ) goto error;
2658 2658
2659 // end the class import2659 // end the class import
@@ -2664,7 +2664,7 @@ by Perry R. Cook and Gary P. Scavone, 1995 - 2002."; · 4 unmodified lines
2664 // begin StifKarp ugen2664 // begin StifKarp ugen
2665 //------------------------------------------------------------------------2665 //------------------------------------------------------------------------
2666 2666
2667 doc = "This class implements a simple plucked string algorithm (Karplus Strong) with enhancements (Jaffe-Smith, Smith, and others), including string stiffness and pluck position controls. The stiffness is modeled with allpass filters.\n\2667 doc = "a simple plucked string algorithm (Karplus Strong) with enhancements (Jaffe-Smith, Smith, and others), including string stiffness and pluck position controls. The stiffness is modeled with allpass filters.\n\
2668\n\2668\n\
2669This is a digital waveguide model, making its use possibly subject to patents held by Stanford University, Yamaha, and others.\n\2669This is a digital waveguide model, making its use possibly subject to patents held by Stanford University, Yamaha, and others.\n\
2670\n\2670\n\
@@ -2690,48 +2690,48 @@ by Perry R. Cook and Gary P. Scavone, 1995 - 2002."; · 19 unmodified lines
2690 2690
2691 func = make_new_mfun( "float", "pluck", StifKarp_ctrl_pluck ); //! pluck2691 func = make_new_mfun( "float", "pluck", StifKarp_ctrl_pluck ); //! pluck
2692 func->add_arg( "float", "value" );2692 func->add_arg( "float", "value" );
2693 func->doc = "Pluck string.";2693 func->doc = "pluck string.";
2694 if( !type_engine_import_mfun( env, func ) ) goto error;2694 if( !type_engine_import_mfun( env, func ) ) goto error;
2695 2695
2696 func = make_new_mfun( "float", "clear", StifKarp_ctrl_clear ); 2696 func = make_new_mfun( "float", "clear", StifKarp_ctrl_clear );
2697 func->add_arg( "float", "value" );2697 func->add_arg( "float", "value" );
2698 func->doc = "Clear instrument.";2698 func->doc = "clear instrument.";
2699 if( !type_engine_import_mfun( env, func ) ) goto error;2699 if( !type_engine_import_mfun( env, func ) ) goto error;
2700 2700
2701 func = make_new_mfun( "float", "pickupPosition", StifKarp_ctrl_pickupPosition ); 2701 func = make_new_mfun( "float", "pickupPosition", StifKarp_ctrl_pickupPosition );
2702 func->add_arg( "float", "value" );2702 func->add_arg( "float", "value" );
2703 func->doc = "Set pickup position, [0.0-1.0].";2703 func->doc = "set pickup position, [0.0-1.0].";
2704 if( !type_engine_import_mfun( env, func ) ) goto error;2704 if( !type_engine_import_mfun( env, func ) ) goto error;
2705 2705
2706 func = make_new_mfun( "float", "pickupPosition", StifKarp_cget_pickupPosition );2706 func = make_new_mfun( "float", "pickupPosition", StifKarp_cget_pickupPosition );
2707 func->doc = "Get pickup position, [0.0-1.0].";2707 func->doc = "get pickup position, [0.0-1.0].";
2708 if( !type_engine_import_mfun( env, func ) ) goto error;2708 if( !type_engine_import_mfun( env, func ) ) goto error;
2709 2709
2710 func = make_new_mfun( "float", "stretch", StifKarp_ctrl_stretch ); 2710 func = make_new_mfun( "float", "stretch", StifKarp_ctrl_stretch );
2711 func->add_arg( "float", "value" );2711 func->add_arg( "float", "value" );
2712 func->doc = "Set string strech, [0.0-1.0].";2712 func->doc = "set string strech, [0.0-1.0].";
2713 if( !type_engine_import_mfun( env, func ) ) goto error;2713 if( !type_engine_import_mfun( env, func ) ) goto error;
2714 2714
2715 func = make_new_mfun( "float", "stretch", StifKarp_cget_stretch );2715 func = make_new_mfun( "float", "stretch", StifKarp_cget_stretch );
2716 func->doc = "Get string strech, [0.0-1.0].";2716 func->doc = "get string strech, [0.0-1.0].";
2717 if( !type_engine_import_mfun( env, func ) ) goto error;2717 if( !type_engine_import_mfun( env, func ) ) goto error;
2718 2718
2719 func = make_new_mfun( "float", "sustain", StifKarp_ctrl_sustain ); 2719 func = make_new_mfun( "float", "sustain", StifKarp_ctrl_sustain );
2720 func->add_arg( "float", "value" );2720 func->add_arg( "float", "value" );
2721 func->doc = "Set string sustain, [0.0-1.0].";2721 func->doc = "set string sustain, [0.0-1.0].";
2722 if( !type_engine_import_mfun( env, func ) ) goto error;2722 if( !type_engine_import_mfun( env, func ) ) goto error;
2723 2723
2724 func = make_new_mfun( "float", "sustain", StifKarp_cget_sustain );2724 func = make_new_mfun( "float", "sustain", StifKarp_cget_sustain );
2725 func->doc = "Get string sustain, [0.0-1.0].";2725 func->doc = "get string sustain, [0.0-1.0].";
2726 if( !type_engine_import_mfun( env, func ) ) goto error;2726 if( !type_engine_import_mfun( env, func ) ) goto error;
2727 2727
2728 func = make_new_mfun( "float", "baseLoopGain", StifKarp_ctrl_baseLoopGain ); 2728 func = make_new_mfun( "float", "baseLoopGain", StifKarp_ctrl_baseLoopGain );
2729 func->add_arg( "float", "value" );2729 func->add_arg( "float", "value" );
2730 func->doc = "Set base loop gain, [0.0-1.0].";2730 func->doc = "set base loop gain, [0.0-1.0].";
2731 if( !type_engine_import_mfun( env, func ) ) goto error;2731 if( !type_engine_import_mfun( env, func ) ) goto error;
2732 2732
2733 func = make_new_mfun( "float", "baseLoopGain", StifKarp_cget_baseLoopGain );2733 func = make_new_mfun( "float", "baseLoopGain", StifKarp_cget_baseLoopGain );
2734 func->doc = "Get base loop gain, [0.0-1.0].";2734 func->doc = "get base loop gain, [0.0-1.0].";
2735 if( !type_engine_import_mfun( env, func ) ) goto error;2735 if( !type_engine_import_mfun( env, func ) ) goto error;
2736 2736
2737 2737
@@ -2743,7 +2743,7 @@ by Perry R. Cook and Gary P. Scavone, 1995 - 2002."; · 5 unmodified lines
2743 // begin VoicForm ugen2743 // begin VoicForm ugen
2744 //------------------------------------------------------------------------2744 //------------------------------------------------------------------------
2745 2745
2746 doc = "This instrument contains an excitation singing wavetable (looping wave with random and periodic vibrato, smoothing on frequency, etc.), excitation noise, and four sweepable complex resonances.\n\2746 doc = "an instrument containing an excitation singing wavetable (looping wave with random and periodic vibrato, smoothing on frequency, etc.), excitation noise, and four sweepable complex resonances.\n\
2747\n\2747\n\
2748Measured formant data is included, and enough data is there to support either parallel or cascade synthesis. In the floating point case cascade synthesis is the most natural so that's what you'll find here.\n\2748Measured formant data is included, and enough data is there to support either parallel or cascade synthesis. In the floating point case cascade synthesis is the most natural so that's what you'll find here.\n\
2749\n\2749\n\
@@ -2780,93 +2780,93 @@ Phoneme Names:\n\ · 30 unmodified lines
2780 2780
2781 func = make_new_mfun( "string", "phoneme", VoicForm_ctrl_phoneme ); //! select phoneme ( above ) 2781 func = make_new_mfun( "string", "phoneme", VoicForm_ctrl_phoneme ); //! select phoneme ( above )
2782 func->add_arg( "string", "value" );2782 func->add_arg( "string", "value" );
2783 func->doc = "Set phoneme (see above).";2783 func->doc = "set phoneme (see above).";
2784 if( !type_engine_import_mfun( env, func ) ) goto error;2784 if( !type_engine_import_mfun( env, func ) ) goto error;
2785 2785
2786 func = make_new_mfun( "string", "phoneme", VoicForm_cget_phoneme ); //! select phoneme ( above )2786 func = make_new_mfun( "string", "phoneme", VoicForm_cget_phoneme ); //! select phoneme ( above )
2787 func->doc = "Get phoneme (see above).";2787 func->doc = "get phoneme (see above).";
2788 if( !type_engine_import_mfun( env, func ) ) goto error;2788 if( !type_engine_import_mfun( env, func ) ) goto error;
2789 2789
2790 func = make_new_mfun( "float", "speak", VoicForm_ctrl_speak ); //! start singing2790 func = make_new_mfun( "float", "speak", VoicForm_ctrl_speak ); //! start singing
2791 func->add_arg( "float", "value" );2791 func->add_arg( "float", "value" );
2792 func->doc = "Start singing, [0.0-1.0].";2792 func->doc = "start singing, [0.0-1.0].";
2793 if( !type_engine_import_mfun( env, func ) ) goto error;2793 if( !type_engine_import_mfun( env, func ) ) goto error;
2794 2794
2795 func = make_new_mfun( "float", "quiet", VoicForm_ctrl_quiet ); //! stop singing2795 func = make_new_mfun( "float", "quiet", VoicForm_ctrl_quiet ); //! stop singing
2796 func->add_arg( "float", "value" );2796 func->add_arg( "float", "value" );
2797 func->doc = "Stop singing, [0.0-1.0].";2797 func->doc = "stop singing, [0.0-1.0].";
2798 if( !type_engine_import_mfun( env, func ) ) goto error;2798 if( !type_engine_import_mfun( env, func ) ) goto error;
2799 2799
2800 func = make_new_mfun( "float", "voiced", VoicForm_ctrl_voiced ); //! set mix for voiced component2800 func = make_new_mfun( "float", "voiced", VoicForm_ctrl_voiced ); //! set mix for voiced component
2801 func->add_arg( "float", "value" );2801 func->add_arg( "float", "value" );
2802 func->doc = "Set mix for voiced component, [0.0 - 1.0].";2802 func->doc = "set mix for voiced component, [0.0 - 1.0].";
2803 if( !type_engine_import_mfun( env, func ) ) goto error;2803 if( !type_engine_import_mfun( env, func ) ) goto error;
2804 2804
2805 func = make_new_mfun( "float", "voiced", VoicForm_cget_voiced ); //! set mix for voiced component2805 func = make_new_mfun( "float", "voiced", VoicForm_cget_voiced ); //! set mix for voiced component
2806 func->doc = "Get mix for voiced component, [0.0 - 1.0].";2806 func->doc = "get mix for voiced component, [0.0 - 1.0].";
2807 if( !type_engine_import_mfun( env, func ) ) goto error;2807 if( !type_engine_import_mfun( env, func ) ) goto error;
2808 2808
2809 func = make_new_mfun( "float", "unVoiced", VoicForm_ctrl_unVoiced ); //! set mix for unvoiced component2809 func = make_new_mfun( "float", "unVoiced", VoicForm_ctrl_unVoiced ); //! set mix for unvoiced component
2810 func->add_arg( "float", "value" );2810 func->add_arg( "float", "value" );
2811 func->doc = "Set mix for unvoiced component, [0.0 - 1.0].";2811 func->doc = "set mix for unvoiced component, [0.0 - 1.0].";
2812 if( !type_engine_import_mfun( env, func ) ) goto error;2812 if( !type_engine_import_mfun( env, func ) ) goto error;
2813 2813
2814 func = make_new_mfun( "float", "unVoiced", VoicForm_cget_unVoiced ); //! set mix for unvoiced component2814 func = make_new_mfun( "float", "unVoiced", VoicForm_cget_unVoiced ); //! set mix for unvoiced component
2815 func->doc = "Get mix for unvoiced component, [0.0 - 1.0].";2815 func->doc = "get mix for unvoiced component, [0.0 - 1.0].";
2816 if( !type_engine_import_mfun( env, func ) ) goto error;2816 if( !type_engine_import_mfun( env, func ) ) goto error;
2817 2817
2818 func = make_new_mfun( "float", "pitchSweepRate", VoicForm_ctrl_pitchSweepRate ); //! pitch sweep2818 func = make_new_mfun( "float", "pitchSweepRate", VoicForm_ctrl_pitchSweepRate ); //! pitch sweep
2819 func->add_arg( "float", "value" );2819 func->add_arg( "float", "value" );
2820 func->doc = "Set rate of pitch sweep, [0.0-1.0].";2820 func->doc = "set rate of pitch sweep, [0.0-1.0].";
2821 if( !type_engine_import_mfun( env, func ) ) goto error;2821 if( !type_engine_import_mfun( env, func ) ) goto error;
2822 2822
2823 func = make_new_mfun( "float", "pitchSweepRate", VoicForm_cget_pitchSweepRate ); //! pitch sweep2823 func = make_new_mfun( "float", "pitchSweepRate", VoicForm_cget_pitchSweepRate ); //! pitch sweep
2824 func->doc = "Get rate of pitch sweep, [0.0-1.0].";2824 func->doc = "get rate of pitch sweep, [0.0-1.0].";
2825 if( !type_engine_import_mfun( env, func ) ) goto error;2825 if( !type_engine_import_mfun( env, func ) ) goto error;
2826 2826
2827 func = make_new_mfun( "float", "voiceMix", VoicForm_ctrl_voiceMix ); //! voiced/unvoiced mix2827 func = make_new_mfun( "float", "voiceMix", VoicForm_ctrl_voiceMix ); //! voiced/unvoiced mix
2828 func->add_arg( "float", "value" );2828 func->add_arg( "float", "value" );
2829 func->doc = "Set voiced/unvoiced mix, [0.0-1.0].";2829 func->doc = "set voiced/unvoiced mix, [0.0-1.0].";
2830 if( !type_engine_import_mfun( env, func ) ) goto error;2830 if( !type_engine_import_mfun( env, func ) ) goto error;
2831 2831
2832 func = make_new_mfun( "float", "voiceMix", VoicForm_cget_voiceMix ); //! voiced/unvoiced mix2832 func = make_new_mfun( "float", "voiceMix", VoicForm_cget_voiceMix ); //! voiced/unvoiced mix
2833 func->doc = "Get voiced/unvoiced mix, [0.0-1.0].";2833 func->doc = "get voiced/unvoiced mix, [0.0-1.0].";
2834 if( !type_engine_import_mfun( env, func ) ) goto error;2834 if( !type_engine_import_mfun( env, func ) ) goto error;
2835 2835
2836 func = make_new_mfun( "int", "phonemeNum", VoicForm_ctrl_selPhoneme ); //! select phoneme by number2836 func = make_new_mfun( "int", "phonemeNum", VoicForm_ctrl_selPhoneme ); //! select phoneme by number
2837 func->add_arg( "int", "value" );2837 func->add_arg( "int", "value" );
2838 func->doc = "Set phoneme by number, [0.0-128.0].";2838 func->doc = "set phoneme by number, [0.0-128.0].";
2839 if( !type_engine_import_mfun( env, func ) ) goto error;2839 if( !type_engine_import_mfun( env, func ) ) goto error;
2840 2840
2841 func = make_new_mfun( "int", "phonemeNum", VoicForm_cget_selPhoneme ); //! select phoneme by number2841 func = make_new_mfun( "int", "phonemeNum", VoicForm_cget_selPhoneme ); //! select phoneme by number
2842 func->doc = "Get phoneme by number, [0.0-128.0].";2842 func->doc = "get phoneme by number, [0.0-128.0].";
2843 if( !type_engine_import_mfun( env, func ) ) goto error;2843 if( !type_engine_import_mfun( env, func ) ) goto error;
2844 2844
2845 func = make_new_mfun( "float", "vibratoFreq", VoicForm_ctrl_vibratoFreq );//! vibrato2845 func = make_new_mfun( "float", "vibratoFreq", VoicForm_ctrl_vibratoFreq );//! vibrato
2846 func->add_arg( "float", "value" );2846 func->add_arg( "float", "value" );
2847 func->doc = "Set vibrato frequency (Hz).";2847 func->doc = "set vibrato frequency (Hz).";
2848 if( !type_engine_import_mfun( env, func ) ) goto error;2848 if( !type_engine_import_mfun( env, func ) ) goto error;
2849 2849
2850 func = make_new_mfun( "float", "vibratoFreq", VoicForm_cget_vibratoFreq );//! vibrato2850 func = make_new_mfun( "float", "vibratoFreq", VoicForm_cget_vibratoFreq );//! vibrato
2851 func->doc = "Get vibrato frequency (Hz).";2851 func->doc = "get vibrato frequency (Hz).";
2852 if( !type_engine_import_mfun( env, func ) ) goto error;2852 if( !type_engine_import_mfun( env, func ) ) goto error;
2853 2853
2854 func = make_new_mfun( "float", "vibratoGain", VoicForm_ctrl_vibratoGain );//! vibrato depth2854 func = make_new_mfun( "float", "vibratoGain", VoicForm_ctrl_vibratoGain );//! vibrato depth
2855 func->doc = "Set vibrato gain (Hz), [0.0-1.0].";2855 func->doc = "set vibrato gain (Hz), [0.0-1.0].";
2856 func->add_arg( "float", "value" );2856 func->add_arg( "float", "value" );
2857 if( !type_engine_import_mfun( env, func ) ) goto error;2857 if( !type_engine_import_mfun( env, func ) ) goto error;
2858 2858
2859 func = make_new_mfun( "float", "vibratoGain", VoicForm_cget_vibratoGain );//! vibrato depth2859 func = make_new_mfun( "float", "vibratoGain", VoicForm_cget_vibratoGain );//! vibrato depth
2860 func->doc = "Get vibrato gain (Hz), [0.0-1.0].";2860 func->doc = "get vibrato gain (Hz), [0.0-1.0].";
2861 if( !type_engine_import_mfun( env, func ) ) goto error;2861 if( !type_engine_import_mfun( env, func ) ) goto error;
2862 2862
2863 func = make_new_mfun( "float", "loudness", VoicForm_ctrl_loudness ); //! 'loudness' of voicee2863 func = make_new_mfun( "float", "loudness", VoicForm_ctrl_loudness ); //! 'loudness' of voicee
2864 func->add_arg( "float", "value" );2864 func->add_arg( "float", "value" );
2865 func->doc = "Set 'loudness' of voice, [0.0-1.0].";2865 func->doc = "set 'loudness' of voice, [0.0-1.0].";
2866 if( !type_engine_import_mfun( env, func ) ) goto error;2866 if( !type_engine_import_mfun( env, func ) ) goto error;
2867 2867
2868 func = make_new_mfun( "float", "loudness", VoicForm_cget_loudness ); //! 'loudness' of voicee2868 func = make_new_mfun( "float", "loudness", VoicForm_cget_loudness ); //! 'loudness' of voicee
2869 func->doc = "Get 'loudness' of voice, [0.0-1.0].";2869 func->doc = "get 'loudness' of voice, [0.0-1.0].";
2870 if( !type_engine_import_mfun( env, func ) ) goto error;2870 if( !type_engine_import_mfun( env, func ) ) goto error;
2871 2871
2872 // end the class import2872 // end the class import
@@ -2880,7 +2880,7 @@ Phoneme Names:\n\ · 7 unmodified lines
2880 // begin FM ugen2880 // begin FM ugen
2881 //------------------------------------------------------------------------2881 //------------------------------------------------------------------------
2882 2882
2883 doc = "This class controls an arbitrary number of waves and envelopes, determined via a constructor argument.\n\2883 doc = "this class controls an arbitrary number of waves and envelopes, determined via a constructor argument.\n\
2884\n\2884\n\
2885Control Change Numbers:\n\2885Control Change Numbers:\n\
2886\n\2886\n\
@@ -2909,47 +2909,47 @@ by Perry R. Cook and Gary P. Scavone, 1995 - 2002."; · 22 unmodified lines
2909 2909
2910 func = make_new_mfun( "float", "lfoDepth", FM_ctrl_modDepth ); //!modulation Depth2910 func = make_new_mfun( "float", "lfoDepth", FM_ctrl_modDepth ); //!modulation Depth
2911 func->add_arg( "float", "value" );2911 func->add_arg( "float", "value" );
2912 func->doc = "Set modulation depth, [0.0-1.0].";2912 func->doc = "set modulation depth, [0.0-1.0].";
2913 if( !type_engine_import_mfun( env, func ) ) goto error;2913 if( !type_engine_import_mfun( env, func ) ) goto error;
2914 2914
2915 func = make_new_mfun( "float", "lfoDepth", FM_cget_modDepth ); //!modulation Depth2915 func = make_new_mfun( "float", "lfoDepth", FM_cget_modDepth ); //!modulation Depth
2916 func->doc = "Get modulation depth, [0.0-1.0].";2916 func->doc = "get modulation depth, [0.0-1.0].";
2917 if( !type_engine_import_mfun( env, func ) ) goto error;2917 if( !type_engine_import_mfun( env, func ) ) goto error;
2918 2918
2919 func = make_new_mfun( "float", "lfoSpeed", FM_ctrl_modSpeed ); //!modulation Speed2919 func = make_new_mfun( "float", "lfoSpeed", FM_ctrl_modSpeed ); //!modulation Speed
2920 func->add_arg( "float", "value" );2920 func->add_arg( "float", "value" );
2921 func->doc = "Set modulation speed (Hz).";2921 func->doc = "set modulation speed (Hz).";
2922 if( !type_engine_import_mfun( env, func ) ) goto error;2922 if( !type_engine_import_mfun( env, func ) ) goto error;
2923 2923
2924 func = make_new_mfun( "float", "lfoSpeed", FM_cget_modSpeed ); //!modulation Speed2924 func = make_new_mfun( "float", "lfoSpeed", FM_cget_modSpeed ); //!modulation Speed
2925 func->doc = "Get modulation speed (Hz).";2925 func->doc = "get modulation speed (Hz).";
2926 if( !type_engine_import_mfun( env, func ) ) goto error;2926 if( !type_engine_import_mfun( env, func ) ) goto error;
2927 2927
2928 func = make_new_mfun( "float", "afterTouch", FM_ctrl_afterTouch ); //!aftertouch2928 func = make_new_mfun( "float", "afterTouch", FM_ctrl_afterTouch ); //!aftertouch
2929 func->add_arg( "float", "value" );2929 func->add_arg( "float", "value" );
2930 func->doc = "Set aftertouch, [0.0-1.0].";2930 func->doc = "set aftertouch, [0.0-1.0].";
2931 if( !type_engine_import_mfun( env, func ) ) goto error;2931 if( !type_engine_import_mfun( env, func ) ) goto error;
2932 2932
2933 func = make_new_mfun( "float", "afterTouch", FM_cget_afterTouch ); //!aftertouch2933 func = make_new_mfun( "float", "afterTouch", FM_cget_afterTouch ); //!aftertouch
2934 func->doc = "Get aftertouch, [0.0-1.0].";2934 func->doc = "get aftertouch, [0.0-1.0].";
2935 if( !type_engine_import_mfun( env, func ) ) goto error;2935 if( !type_engine_import_mfun( env, func ) ) goto error;
2936 2936
2937 func = make_new_mfun( "float", "controlOne", FM_ctrl_control1 ); //! FM control 12937 func = make_new_mfun( "float", "controlOne", FM_ctrl_control1 ); //! FM control 1
2938 func->add_arg( "float", "value" );2938 func->add_arg( "float", "value" );
2939 func->doc = "Set control one [instrument specific].";2939 func->doc = "set control one [instrument specific].";
2940 if( !type_engine_import_mfun( env, func ) ) goto error;2940 if( !type_engine_import_mfun( env, func ) ) goto error;
2941 2941
2942 func = make_new_mfun( "float", "controlOne", FM_cget_control1 ); //! FM control 12942 func = make_new_mfun( "float", "controlOne", FM_cget_control1 ); //! FM control 1
2943 func->doc = "Get control one [instrument specific].";2943 func->doc = "get control one [instrument specific].";
2944 if( !type_engine_import_mfun( env, func ) ) goto error;2944 if( !type_engine_import_mfun( env, func ) ) goto error;
2945 2945
2946 func = make_new_mfun( "float", "controlTwo", FM_ctrl_control2 ); //! FM control 22946 func = make_new_mfun( "float", "controlTwo", FM_ctrl_control2 ); //! FM control 2
2947 func->add_arg( "float", "value" );2947 func->add_arg( "float", "value" );
2948 func->doc = "Set control two [instrument specific].";2948 func->doc = "set control two [instrument specific].";
2949 if( !type_engine_import_mfun( env, func ) ) goto error;2949 if( !type_engine_import_mfun( env, func ) ) goto error;
2950 2950
2951 func = make_new_mfun( "float", "controlTwo", FM_cget_control2 ); //! FM control 22951 func = make_new_mfun( "float", "controlTwo", FM_cget_control2 ); //! FM control 2
2952 func->doc = "Get control two [instrument specific].";2952 func->doc = "get control two [instrument specific].";
2953 if( !type_engine_import_mfun( env, func ) ) goto error;2953 if( !type_engine_import_mfun( env, func ) ) goto error;
2954 2954
2955 // end the class import2955 // end the class import
@@ -2960,7 +2960,7 @@ by Perry R. Cook and Gary P. Scavone, 1995 - 2002."; · 4 unmodified lines
2960 // begin BeeThree ugen2960 // begin BeeThree ugen
2961 //------------------------------------------------------------------------2961 //------------------------------------------------------------------------
2962 2962
2963 doc = " This class implements a simple 4 operator topology, also referred to as algorithm 8 of the TX81Z.\n\2963 doc = "a simple 4-operator FM topology, also referred to as algorithm 8 of the TX81Z.\n\
2964\n\2964\n\
2965Algorithm 8 is :\n\2965Algorithm 8 is :\n\
2966 \n\2966 \n\
@@ -2994,7 +2994,7 @@ by Perry R. Cook and Gary P. Scavone, 1995 - 2002."; · 27 unmodified lines
2994 // begin FMVoices ugen2994 // begin FMVoices ugen
2995 //------------------------------------------------------------------------2995 //------------------------------------------------------------------------
2996 2996
2997 doc = "This class implements 3 carriers and a common modulator, also referred to as algorithm 6 of the TX81Z.\n\2997 doc = "a FM instrument with 3 carriers and a common modulator, also referred to as algorithm 6 of the TX81Z.\n\
2998\n\2998\n\
2999Algorithm 6 is :\n\2999Algorithm 6 is :\n\
3000 \n\3000 \n\
@@ -3020,29 +3020,29 @@ by Perry R. Cook and Gary P. Scavone, 1995 - 2002."; · 19 unmodified lines
3020 3020
3021 func = make_new_mfun( "float", "vowel", FMVoices_ctrl_vowel ); //!select vowel3021 func = make_new_mfun( "float", "vowel", FMVoices_ctrl_vowel ); //!select vowel
3022 func->add_arg( "float", "value" );3022 func->add_arg( "float", "value" );
3023 func->doc = "Set vowel, [0.0-1.0].";3023 func->doc = "set vowel, [0.0-1.0].";
3024 if( !type_engine_import_mfun( env, func ) ) goto error;3024 if( !type_engine_import_mfun( env, func ) ) goto error;
3025 3025
3026 func = make_new_mfun( "float", "vowel", FMVoices_cget_vowel ); //!select vowel3026 func = make_new_mfun( "float", "vowel", FMVoices_cget_vowel ); //!select vowel
3027 func->doc = "Get vowel, [0.0-1.0].";3027 func->doc = "get vowel, [0.0-1.0].";
3028 if( !type_engine_import_mfun( env, func ) ) goto error;3028 if( !type_engine_import_mfun( env, func ) ) goto error;
3029 3029
3030 func = make_new_mfun( "float", "spectralTilt", FMVoices_ctrl_spectralTilt ); //! spectral tilt3030 func = make_new_mfun( "float", "spectralTilt", FMVoices_ctrl_spectralTilt ); //! spectral tilt
3031 func->add_arg( "float", "value" );3031 func->add_arg( "float", "value" );
3032 func->doc = "Set spectral tilt, [0.0-1.0].";3032 func->doc = "set spectral tilt, [0.0-1.0].";
3033 if( !type_engine_import_mfun( env, func ) ) goto error;3033 if( !type_engine_import_mfun( env, func ) ) goto error;
3034 3034
3035 func = make_new_mfun( "float", "spectralTilt", FMVoices_cget_spectralTilt ); //! spectral tilt3035 func = make_new_mfun( "float", "spectralTilt", FMVoices_cget_spectralTilt ); //! spectral tilt
3036 func->doc = "Get spectral tilt, [0.0-1.0].";3036 func->doc = "get spectral tilt, [0.0-1.0].";
3037 if( !type_engine_import_mfun( env, func ) ) goto error;3037 if( !type_engine_import_mfun( env, func ) ) goto error;
3038 3038
3039 func = make_new_mfun( "float", "adsrTarget", FMVoices_ctrl_adsrTarget ); //!adsr targets3039 func = make_new_mfun( "float", "adsrTarget", FMVoices_ctrl_adsrTarget ); //!adsr targets
3040 func->add_arg( "float", "value" );3040 func->add_arg( "float", "value" );
3041 func->doc = "Set ADSR targets, [0.0-1.0].";3041 func->doc = "set ADSR targets, [0.0-1.0].";
3042 if( !type_engine_import_mfun( env, func ) ) goto error;3042 if( !type_engine_import_mfun( env, func ) ) goto error;
3043 3043
3044 func = make_new_mfun( "float", "adsrTarget", FMVoices_cget_adsrTarget ); //!adsr targets3044 func = make_new_mfun( "float", "adsrTarget", FMVoices_cget_adsrTarget ); //!adsr targets
3045 func->doc = "Get ADSR targets, [0.0-1.0].";3045 func->doc = "get ADSR targets, [0.0-1.0].";
3046 if( !type_engine_import_mfun( env, func ) ) goto error;3046 if( !type_engine_import_mfun( env, func ) ) goto error;
3047 3047
3048 // end the class import3048 // end the class import
@@ -3053,7 +3053,7 @@ by Perry R. Cook and Gary P. Scavone, 1995 - 2002."; · 4 unmodified lines
3053 // begin HevyMetl ugen3053 // begin HevyMetl ugen
3054 //------------------------------------------------------------------------3054 //------------------------------------------------------------------------
3055 3055
3056 doc = "This class implements 3 cascade operators with feedback modulation, also referred to as algorithm 3 of the TX81Z.\n\3056 doc = "a FM instrument containing 3 cascade operators with feedback modulation, also referred to as algorithm 3 of the TX81Z.\n\
3057\n\3057\n\
3058Algorithm 3 is :\n\3058Algorithm 3 is :\n\
3059 \n\3059 \n\
@@ -3084,7 +3084,7 @@ by Perry R. Cook and Gary P. Scavone, 1995 - 2002."; · 24 unmodified lines
3084 // begin PercFlut ugen3084 // begin PercFlut ugen
3085 //------------------------------------------------------------------------3085 //------------------------------------------------------------------------
3086 3086
3087 doc = "This class implements algorithm 4 of the TX81Z.\n\3087 doc = "a FM instrument corresponding to algorithm 4 of the TX81Z.\n\
3088\n\3088\n\
3089Algorithm 4 is :\n\3089Algorithm 4 is :\n\
3090 \n\3090 \n\
@@ -3115,7 +3115,7 @@ by Perry R. Cook and Gary P. Scavone, 1995 - 2002."; · 24 unmodified lines
3115 // begin Rhodey ugen3115 // begin Rhodey ugen
3116 //------------------------------------------------------------------------3116 //------------------------------------------------------------------------
3117 3117
3118 doc = " This class implements two simple FM Pairs summed together, also referred to as algorithm 5 of the TX81Z.\n\3118 doc = "two simple FM Pairs summed together, also referred to as algorithm 5 of the TX81Z.\n\
3119\n\3119\n\
3120Algorithm 5 is :\n\3120Algorithm 5 is :\n\
3121 \n\3121 \n\
@@ -3150,7 +3150,7 @@ by Perry R. Cook and Gary P. Scavone, 1995 - 2002."; · 28 unmodified lines
3150 // begin TubeBell ugen3150 // begin TubeBell ugen
3151 //------------------------------------------------------------------------3151 //------------------------------------------------------------------------
3152 3152
3153 doc = "This class implements two simple FM Pairs summed together, also referred to as algorithm 5 of the TX81Z.\n\3153 doc = "two simple FM Pairs summed together, also referred to as algorithm 5 of the TX81Z.\n\
3154\n\3154\n\
3155Algorithm 5 is :\n\3155Algorithm 5 is :\n\
3156 \n\3156 \n\
@@ -3182,7 +3182,7 @@ by Perry R. Cook and Gary P. Scavone, 1995 - 2002."; · 25 unmodified lines
3182 // begin Wurley ugen3182 // begin Wurley ugen
3183 //------------------------------------------------------------------------3183 //------------------------------------------------------------------------
3184 3184
3185 doc = "This class implements two simple FM Pairs summed together, also referred to as algorithm 5 of the TX81Z.\n\3185 doc = "two simple FM Pairs summed together, also referred to as algorithm 5 of the TX81Z.\n\
3186\n\3186\n\
3187Algorithm 5 is :\n\3187Algorithm 5 is :\n\
3188\n\3188\n\
@@ -3222,7 +3222,7 @@ by Perry R. Cook and Gary P. Scavone, 1995 - 2002."; · 33 unmodified lines
3222 // begin Delay ugen3222 // begin Delay ugen
3223 //------------------------------------------------------------------------3223 //------------------------------------------------------------------------
3224 3224
3225 doc = "This protected Filter subclass implements a non-interpolating digital delay-line. A fixed maximum length of 4095 and a delay of zero is set using the default constructor. Alternatively, the delay and maximum length can be set during instantiation with an overloaded constructor.\n\3225 doc = "a non-interpolating digital delay-line. A fixed maximum length of 4095 and a delay of zero is set using the default constructor. Alternatively, the delay and maximum length can be set during instantiation with an overloaded constructor.\n\
3226\n\3226\n\
3227A non-interpolating delay line is typically used in fixed delay-length applications, such as for reverberation.\n\3227A non-interpolating delay line is typically used in fixed delay-length applications, such as for reverberation.\n\
3228\n\3228\n\
@@ -3238,24 +3238,24 @@ by Perry R. Cook and Gary P. Scavone, 1995 - 2002."; · 9 unmodified lines
3238 if( Delay_offset_data == CK_INVALID_OFFSET ) goto error;3238 if( Delay_offset_data == CK_INVALID_OFFSET ) goto error;
3239 func = make_new_mfun( "dur", "delay", Delay_ctrl_delay ); //! length of delay3239 func = make_new_mfun( "dur", "delay", Delay_ctrl_delay ); //! length of delay
3240 func->add_arg( "dur", "value" );3240 func->add_arg( "dur", "value" );
3241 func->doc = "Set length of delay.";3241 func->doc = "set length of delay.";
3242 if( !type_engine_import_mfun( env, func ) ) goto error;3242 if( !type_engine_import_mfun( env, func ) ) goto error;
3243 3243
3244 func = make_new_mfun( "dur", "delay", Delay_cget_delay ); //! length of delay3244 func = make_new_mfun( "dur", "delay", Delay_cget_delay ); //! length of delay
3245 func->doc = "Get length of delay.";3245 func->doc = "get length of delay.";
3246 if( !type_engine_import_mfun( env, func ) ) goto error;3246 if( !type_engine_import_mfun( env, func ) ) goto error;
3247 3247
3248 func = make_new_mfun( "dur", "max", Delay_ctrl_max ); //! max delay (buffer size) 3248 func = make_new_mfun( "dur", "max", Delay_ctrl_max ); //! max delay (buffer size)
3249 func->add_arg( "dur", "value" );3249 func->add_arg( "dur", "value" );
3250 func->doc = "Set max delay (buffer size).";3250 func->doc = "set max delay (buffer size).";
3251 if( !type_engine_import_mfun( env, func ) ) goto error;3251 if( !type_engine_import_mfun( env, func ) ) goto error;
3252 3252
3253 func = make_new_mfun( "dur", "max", Delay_cget_max ); //! max delay (buffer size)3253 func = make_new_mfun( "dur", "max", Delay_cget_max ); //! max delay (buffer size)
3254 func->doc = "Get max delay (buffer size).";3254 func->doc = "get max delay (buffer size).";
3255 if( !type_engine_import_mfun( env, func ) ) goto error;3255 if( !type_engine_import_mfun( env, func ) ) goto error;
3256 3256
3257 func = make_new_mfun( "void", "clear", Delay_clear ); //! clear delay3257 func = make_new_mfun( "void", "clear", Delay_clear ); //! clear delay
3258 func->doc = "Clear delay line.";3258 func->doc = "clear delay line.";
3259 if( !type_engine_import_mfun( env, func ) ) goto error;3259 if( !type_engine_import_mfun( env, func ) ) goto error;
3260 3260
3261 // delay 'subs' not actually extending .3261 // delay 'subs' not actually extending .
@@ -3268,7 +3268,7 @@ by Perry R. Cook and Gary P. Scavone, 1995 - 2002."; · 6 unmodified lines
3268 // begin DelayA ugen3268 // begin DelayA ugen
3269 //------------------------------------------------------------------------3269 //------------------------------------------------------------------------
3270 3270
3271 doc = "This Delay subclass implements a fractional-length digital delay-line using a first-order allpass filter. A fixed maximum length of 4095 and a delay of 0.5 is set using the default constructor. Alternatively, the delay and maximum length can be set during instantiation with an overloaded constructor.\n\3271 doc = "a fractional-length digital delay-line using a first-order allpass filter. A fixed maximum length of 4095 and a delay of 0.5 is set using the default constructor. Alternatively, the delay and maximum length can be set during instantiation with an overloaded constructor.\n\
3272\n\3272\n\
3273An allpass filter has unity magnitude gain but variable phase delay properties, making it useful in achieving fractional delays without affecting a signal's frequency magnitude response. In order to achieve a maximally flat phase delay response, the minimum delay possible in this implementation is limited to a value of 0.5.\n\3273An allpass filter has unity magnitude gain but variable phase delay properties, making it useful in achieving fractional delays without affecting a signal's frequency magnitude response. In order to achieve a maximally flat phase delay response, the minimum delay possible in this implementation is limited to a value of 0.5.\n\
3274\n\3274\n\
@@ -3282,24 +3282,24 @@ by Perry R. Cook and Gary P. Scavone, 1995 - 2002."; · 7 unmodified lines
3282 if( DelayA_offset_data == CK_INVALID_OFFSET ) goto error;3282 if( DelayA_offset_data == CK_INVALID_OFFSET ) goto error;
3283 func = make_new_mfun( "dur", "delay", DelayA_ctrl_delay ); //! length of delay3283 func = make_new_mfun( "dur", "delay", DelayA_ctrl_delay ); //! length of delay
3284 func->add_arg( "dur", "value" );3284 func->add_arg( "dur", "value" );
3285 func->doc = "Set length of delay.";3285 func->doc = "set length of delay.";
3286 if( !type_engine_import_mfun( env, func ) ) goto error;3286 if( !type_engine_import_mfun( env, func ) ) goto error;
3287 3287
3288 func = make_new_mfun( "dur", "delay", DelayA_cget_delay ); //! length of delay3288 func = make_new_mfun( "dur", "delay", DelayA_cget_delay ); //! length of delay
3289 func->doc = "Get length of delay.";3289 func->doc = "get length of delay.";
3290 if( !type_engine_import_mfun( env, func ) ) goto error;3290 if( !type_engine_import_mfun( env, func ) ) goto error;
3291 3291
3292 func = make_new_mfun( "dur", "max", DelayA_ctrl_max ); //! max delay ( buffer size ) 3292 func = make_new_mfun( "dur", "max", DelayA_ctrl_max ); //! max delay ( buffer size )
3293 func->add_arg( "dur", "value" );3293 func->add_arg( "dur", "value" );
3294 func->doc = "Set max delay (buffer size).";3294 func->doc = "set max delay (buffer size).";
3295 if( !type_engine_import_mfun( env, func ) ) goto error;3295 if( !type_engine_import_mfun( env, func ) ) goto error;
3296 3296
3297 func = make_new_mfun( "dur", "max", DelayA_cget_max ); //! max delay ( buffer size )3297 func = make_new_mfun( "dur", "max", DelayA_cget_max ); //! max delay ( buffer size )
3298 func->doc = "Get max delay (buffer size).";3298 func->doc = "get max delay (buffer size).";
3299 if( !type_engine_import_mfun( env, func ) ) goto error;3299 if( !type_engine_import_mfun( env, func ) ) goto error;
3300 3300
3301 func = make_new_mfun( "void", "clear", DelayA_clear ); //! clear delay3301 func = make_new_mfun( "void", "clear", DelayA_clear ); //! clear delay
3302 func->doc = "Clear delay line.";3302 func->doc = "clear delay line.";
3303 if( !type_engine_import_mfun( env, func ) ) goto error;3303 if( !type_engine_import_mfun( env, func ) ) goto error;
3304 3304
3305 // end the class import3305 // end the class import
@@ -3310,7 +3310,7 @@ by Perry R. Cook and Gary P. Scavone, 1995 - 2002."; · 4 unmodified lines
3310 // begin DelayL ugen3310 // begin DelayL ugen
3311 //------------------------------------------------------------------------3311 //------------------------------------------------------------------------
3312 3312
3313 doc = "This Delay subclass implements a fractional-length digital delay-line using first-order linear interpolation. A fixed maximum length of 4095 and a delay of zero is set using the default constructor. Alternatively, the delay and maximum length can be set during instantiation with an overloaded constructor.\n\3313 doc = "a fractional-length digital delay-line using first-order linear interpolation. A fixed maximum length of 4095 and a delay of zero is set using the default constructor. Alternatively, the delay and maximum length can be set during instantiation with an overloaded constructor.\n\
3314\n\3314\n\
3315Linear interpolation is an efficient technique for achieving fractional delay lengths, though it does introduce high-frequency signal attenuation to varying degrees depending on the fractional delay setting. The use of higher order Lagrange interpolators can typically improve (minimize) this attenuation characteristic.\n\3315Linear interpolation is an efficient technique for achieving fractional delay lengths, though it does introduce high-frequency signal attenuation to varying degrees depending on the fractional delay setting. The use of higher order Lagrange interpolators can typically improve (minimize) this attenuation characteristic.\n\
3316\n\3316\n\
@@ -3329,24 +3329,24 @@ by Perry R. Cook and Gary P. Scavone, 1995 - 2002."; · 12 unmodified lines
3329 if( DelayL_offset_data == CK_INVALID_OFFSET ) goto error;3329 if( DelayL_offset_data == CK_INVALID_OFFSET ) goto error;
3330 func = make_new_mfun( "dur", "delay", DelayL_ctrl_delay ); //! length of delay3330 func = make_new_mfun( "dur", "delay", DelayL_ctrl_delay ); //! length of delay
3331 func->add_arg( "dur", "value" );3331 func->add_arg( "dur", "value" );
3332 func->doc = "Set length of delay.";3332 func->doc = "set length of delay.";
3333 if( !type_engine_import_mfun( env, func ) ) goto error;3333 if( !type_engine_import_mfun( env, func ) ) goto error;
3334 3334
3335 func = make_new_mfun( "dur", "delay", DelayL_cget_delay ); //! length of delay3335 func = make_new_mfun( "dur", "delay", DelayL_cget_delay ); //! length of delay
3336 func->doc = "Get length of delay.";3336 func->doc = "get length of delay.";
3337 if( !type_engine_import_mfun( env, func ) ) goto error;3337 if( !type_engine_import_mfun( env, func ) ) goto error;
3338 3338
3339 func = make_new_mfun( "dur", "max", DelayL_ctrl_max ); //! max delay ( buffer size ) 3339 func = make_new_mfun( "dur", "max", DelayL_ctrl_max ); //! max delay ( buffer size )
3340 func->add_arg( "dur", "value" );3340 func->add_arg( "dur", "value" );
3341 func->doc = "Set max delay (buffer size).";3341 func->doc = "set max delay (buffer size).";
3342 if( !type_engine_import_mfun( env, func ) ) goto error;3342 if( !type_engine_import_mfun( env, func ) ) goto error;
3343 3343
3344 func = make_new_mfun( "dur", "max", DelayL_cget_max ); //! max delay ( buffer size )3344 func = make_new_mfun( "dur", "max", DelayL_cget_max ); //! max delay ( buffer size )
3345 func->doc = "Get max delay (buffer size).";3345 func->doc = "get max delay (buffer size).";
3346 if( !type_engine_import_mfun( env, func ) ) goto error;3346 if( !type_engine_import_mfun( env, func ) ) goto error;
3347 3347
3348 func = make_new_mfun( "void", "clear", DelayL_clear ); //! clear delay3348 func = make_new_mfun( "void", "clear", DelayL_clear ); //! clear delay
3349 func->doc = "Clear delay line.";3349 func->doc = "clear delay line.";
3350 if( !type_engine_import_mfun( env, func ) ) goto error;3350 if( !type_engine_import_mfun( env, func ) ) goto error;
3351 3351
3352 // end the class import3352 // end the class import
@@ -3357,7 +3357,7 @@ by Perry R. Cook and Gary P. Scavone, 1995 - 2002."; · 4 unmodified lines
3357 // begin Echo ugen3357 // begin Echo ugen
3358 //------------------------------------------------------------------------3358 //------------------------------------------------------------------------
3359 3359
3360 doc = "This class implements a echo effect.\n\3360 doc = "an echo effect.\n\
3361\n\3361\n\
3362by Perry R. Cook and Gary P. Scavone, 1995 - 2002.";3362by Perry R. Cook and Gary P. Scavone, 1995 - 2002.";
3363 3363
@@ -3372,29 +3372,29 @@ by Perry R. Cook and Gary P. Scavone, 1995 - 2002."; · 8 unmodified lines
3372 if( Echo_offset_data == CK_INVALID_OFFSET ) goto error;3372 if( Echo_offset_data == CK_INVALID_OFFSET ) goto error;
3373 func = make_new_mfun( "dur", "delay", Echo_ctrl_delay ); //! length of echo3373 func = make_new_mfun( "dur", "delay", Echo_ctrl_delay ); //! length of echo
3374 func->add_arg( "dur", "value" );3374 func->add_arg( "dur", "value" );
3375 func->doc = "Set length of echo.";3375 func->doc = "set length of echo.";
3376 if( !type_engine_import_mfun( env, func ) ) goto error;3376 if( !type_engine_import_mfun( env, func ) ) goto error;
3377 3377
3378 func = make_new_mfun( "dur", "delay", Echo_cget_delay ); //! length of echo3378 func = make_new_mfun( "dur", "delay", Echo_cget_delay ); //! length of echo
3379 func->doc = "Get length of echo.";3379 func->doc = "get length of echo.";
3380 if( !type_engine_import_mfun( env, func ) ) goto error;3380 if( !type_engine_import_mfun( env, func ) ) goto error;
3381 3381
3382 func = make_new_mfun( "dur", "max", Echo_ctrl_max ); //! max delay3382 func = make_new_mfun( "dur", "max", Echo_ctrl_max ); //! max delay
3383 func->add_arg( "dur", "value" );3383 func->add_arg( "dur", "value" );
3384 func->doc = "Set max delay (buffer size).";3384 func->doc = "set max delay (buffer size).";
3385 if( !type_engine_import_mfun( env, func ) ) goto error;3385 if( !type_engine_import_mfun( env, func ) ) goto error;
3386 3386
3387 func = make_new_mfun( "dur", "max", Echo_cget_max ); //! max delay3387 func = make_new_mfun( "dur", "max", Echo_cget_max ); //! max delay
3388 func->doc = "Get max delay (buffer size).";3388 func->doc = "get max delay (buffer size).";
3389 if( !type_engine_import_mfun( env, func ) ) goto error;3389 if( !type_engine_import_mfun( env, func ) ) goto error;
3390 3390
3391 func = make_new_mfun( "float", "mix", Echo_ctrl_mix ); //! mix level ( wet/dry ) 3391 func = make_new_mfun( "float", "mix", Echo_ctrl_mix ); //! mix level ( wet/dry )
3392 func->add_arg( "float", "value" );3392 func->add_arg( "float", "value" );
3393 func->doc = "Set mix level (wet/dry).";3393 func->doc = "set mix level (wet/dry).";
3394 if( !type_engine_import_mfun( env, func ) ) goto error;3394 if( !type_engine_import_mfun( env, func ) ) goto error;
3395 3395
3396 func = make_new_mfun( "float", "mix", Echo_cget_mix ); //! mix level ( wet/dry )3396 func = make_new_mfun( "float", "mix", Echo_cget_mix ); //! mix level ( wet/dry )
3397 func->doc = "Get mix level (wet/dry).";3397 func->doc = "get mix level (wet/dry).";
3398 if( !type_engine_import_mfun( env, func ) ) goto error;3398 if( !type_engine_import_mfun( env, func ) ) goto error;
3399 3399
3400 // end the class import3400 // end the class import
@@ -3407,7 +3407,7 @@ by Perry R. Cook and Gary P. Scavone, 1995 - 2002."; · 6 unmodified lines
3407 //------------------------------------------------------------------------3407 //------------------------------------------------------------------------
3408 // begin Envelope ugen3408 // begin Envelope ugen
3409 //------------------------------------------------------------------------3409 //------------------------------------------------------------------------
3410 doc = "This class implements a simple envelope generator which is capable of ramping to a target value by a specified rate. It also responds to simple `keyOn` and `keyOff` messages, ramping to 1.0 on `keyOn` and to 0.0 on `keyOff`.\n\3410 doc = "a simple envelope generator which is capable of ramping to a target value by a specified rate. It also responds to simple `keyOn` and `keyOff` messages, ramping to 1.0 on `keyOn` and to 0.0 on `keyOff`.\n\
3411\n\3411\n\
3412by Perry R. Cook and Gary P. Scavone, 1995 - 2002.";3412by Perry R. Cook and Gary P. Scavone, 1995 - 2002.";
3413 3413
@@ -3423,66 +3423,66 @@ by Perry R. Cook and Gary P. Scavone, 1995 - 2002."; · 9 unmodified lines
3423 if( Envelope_offset_data == CK_INVALID_OFFSET ) goto error;3423 if( Envelope_offset_data == CK_INVALID_OFFSET ) goto error;
3424 3424
3425 func = make_new_mfun( "int", "keyOn", Envelope_ctrl_keyOn0 ); //! ramp to 1.03425 func = make_new_mfun( "int", "keyOn", Envelope_ctrl_keyOn0 ); //! ramp to 1.0
3426 func->doc = "Get keyOn state.";3426 func->doc = "get keyOn state.";
3427 if( !type_engine_import_mfun( env, func ) ) goto error;3427 if( !type_engine_import_mfun( env, func ) ) goto error;
3428 3428
3429 func = make_new_mfun( "int", "keyOn", Envelope_ctrl_keyOn ); //! ramp to 1.03429 func = make_new_mfun( "int", "keyOn", Envelope_ctrl_keyOn ); //! ramp to 1.0
3430 func->add_arg( "int", "value" );3430 func->add_arg( "int", "value" );
3431 func->doc = "Ramp to 1.0.";3431 func->doc = "ramp to 1.0.";
3432 if( !type_engine_import_mfun( env, func ) ) goto error;3432 if( !type_engine_import_mfun( env, func ) ) goto error;
3433 3433
3434 func = make_new_mfun( "int", "keyOff", Envelope_ctrl_keyOff0 ); //! ramp to 0.03434 func = make_new_mfun( "int", "keyOff", Envelope_ctrl_keyOff0 ); //! ramp to 0.0
3435 func->doc = "Get keyOff state.";3435 func->doc = "get keyOff state.";
3436 if( !type_engine_import_mfun( env, func ) ) goto error;3436 if( !type_engine_import_mfun( env, func ) ) goto error;
3437 3437
3438 func = make_new_mfun( "int", "keyOff", Envelope_ctrl_keyOff ); //! ramp to 0.03438 func = make_new_mfun( "int", "keyOff", Envelope_ctrl_keyOff ); //! ramp to 0.0
3439 func->add_arg( "int", "value" );3439 func->add_arg( "int", "value" );
3440 func->doc = "Ramp to 0.0.";3440 func->doc = "ramp to 0.0.";
3441 if( !type_engine_import_mfun( env, func ) ) goto error;3441 if( !type_engine_import_mfun( env, func ) ) goto error;
3442 3442
3443 func = make_new_mfun( "float", "target", Envelope_ctrl_target ); //! ramp to arbitrary value.3443 func = make_new_mfun( "float", "target", Envelope_ctrl_target ); //! ramp to arbitrary value.
3444 func->add_arg( "float", "value" );3444 func->add_arg( "float", "value" );
3445 func->doc = "Set value to ramp to.";3445 func->doc = "set value to ramp to.";
3446 if( !type_engine_import_mfun( env, func ) ) goto error;3446 if( !type_engine_import_mfun( env, func ) ) goto error;
3447 3447
3448 func = make_new_mfun( "float", "target", Envelope_cget_target ); //! ramp to arbitrary value.3448 func = make_new_mfun( "float", "target", Envelope_cget_target ); //! ramp to arbitrary value.
3449 func->doc = "Get value to ramp to.";3449 func->doc = "get value to ramp to.";
3450 if( !type_engine_import_mfun( env, func ) ) goto error;3450 if( !type_engine_import_mfun( env, func ) ) goto error;
3451 3451
3452 func = make_new_mfun( "float", "time", Envelope_ctrl_time ); //! time to reach target3452 func = make_new_mfun( "float", "time", Envelope_ctrl_time ); //! time to reach target
3453 func->add_arg( "float", "value" );3453 func->add_arg( "float", "value" );
3454 func->doc = "Set time to reach target (in seconds).";3454 func->doc = "set time to reach target (in seconds).";
3455 if( !type_engine_import_mfun( env, func ) ) goto error;3455 if( !type_engine_import_mfun( env, func ) ) goto error;
3456 3456
3457 func = make_new_mfun( "float", "time", Envelope_cget_time ); //! time to reach target3457 func = make_new_mfun( "float", "time", Envelope_cget_time ); //! time to reach target
3458 func->doc = "Get time to reach target (in seconds).";3458 func->doc = "get time to reach target (in seconds).";
3459 if( !type_engine_import_mfun( env, func ) ) goto error;3459 if( !type_engine_import_mfun( env, func ) ) goto error;
3460 3460
3461 func = make_new_mfun( "dur", "duration", Envelope_ctrl_duration ); //! time to reach target3461 func = make_new_mfun( "dur", "duration", Envelope_ctrl_duration ); //! time to reach target
3462 func->add_arg( "dur", "value" );3462 func->add_arg( "dur", "value" );
3463 func->doc = "Set duration to reach target.";3463 func->doc = "set duration to reach target.";
3464 if( !type_engine_import_mfun( env, func ) ) goto error;3464 if( !type_engine_import_mfun( env, func ) ) goto error;
3465 3465
3466 func = make_new_mfun( "dur", "duration", Envelope_cget_duration ); //! time to reach target3466 func = make_new_mfun( "dur", "duration", Envelope_cget_duration ); //! time to reach target
3467 func->doc = "Get duration to reach target.";3467 func->doc = "get duration to reach target.";
3468 if( !type_engine_import_mfun( env, func ) ) goto error;3468 if( !type_engine_import_mfun( env, func ) ) goto error;
3469 3469
3470 func = make_new_mfun( "float", "rate", Envelope_ctrl_rate ); //! attack rate 3470 func = make_new_mfun( "float", "rate", Envelope_ctrl_rate ); //! attack rate
3471 func->add_arg( "float", "value" );3471 func->add_arg( "float", "value" );
3472 func->doc = "Set rate of change.";3472 func->doc = "set rate of change.";
3473 if( !type_engine_import_mfun( env, func ) ) goto error;3473 if( !type_engine_import_mfun( env, func ) ) goto error;
3474 3474
3475 func = make_new_mfun( "float", "rate", Envelope_cget_rate ); //! attack rate3475 func = make_new_mfun( "float", "rate", Envelope_cget_rate ); //! attack rate
3476 func->doc = "Get rate of change.";3476 func->doc = "get rate of change.";
3477 if( !type_engine_import_mfun( env, func ) ) goto error;3477 if( !type_engine_import_mfun( env, func ) ) goto error;
3478 3478
3479 func = make_new_mfun( "float", "value", Envelope_ctrl_value ); //! set immediate value3479 func = make_new_mfun( "float", "value", Envelope_ctrl_value ); //! set immediate value
3480 func->add_arg( "float", "value" );3480 func->add_arg( "float", "value" );
3481 func->doc = "Set immediate value.";3481 func->doc = "set immediate value.";
3482 if( !type_engine_import_mfun( env, func ) ) goto error;3482 if( !type_engine_import_mfun( env, func ) ) goto error;
3483 3483
3484 func = make_new_mfun( "float", "value", Envelope_cget_value ); //! set immediate value3484 func = make_new_mfun( "float", "value", Envelope_cget_value ); //! set immediate value
3485 func->doc = "Get immediate value.";3485 func->doc = "get immediate value.";
3486 if( !type_engine_import_mfun( env, func ) ) goto error;3486 if( !type_engine_import_mfun( env, func ) ) goto error;
3487 3487
3488 3488
@@ -3494,7 +3494,7 @@ by Perry R. Cook and Gary P. Scavone, 1995 - 2002."; · 5 unmodified lines
3494 // begin ADSR ugen3494 // begin ADSR ugen
3495 //------------------------------------------------------------------------3495 //------------------------------------------------------------------------
3496 3496
3497 doc = "This Envelope subclass implements a traditional ADSR (Attack, Decay, Sustain, Release) envelope. It responds to simple `keyOn` and `keyOff` messages, keeping track of its state.\n\3497 doc = "a traditional ADSR (Attack, Decay, Sustain, Release) envelope. It responds to simple `keyOn` and `keyOff` messages, keeping track of its state.\n\
3498\n\3498\n\
3499by Perry R. Cook and Gary P. Scavone, 1995 - 2002.";3499by Perry R. Cook and Gary P. Scavone, 1995 - 2002.";
3500 3500
@@ -3507,65 +3507,65 @@ by Perry R. Cook and Gary P. Scavone, 1995 - 2002."; · 6 unmodified lines
3507 3507
3508 func = make_new_mfun( "dur", "attackTime", ADSR_ctrl_attackTime ); //! attack time3508 func = make_new_mfun( "dur", "attackTime", ADSR_ctrl_attackTime ); //! attack time
3509 func->add_arg( "dur", "value" );3509 func->add_arg( "dur", "value" );
3510 func->doc = "Set attack time.";3510 func->doc = "set attack time.";
3511 if( !type_engine_import_mfun( env, func ) ) goto error;3511 if( !type_engine_import_mfun( env, func ) ) goto error;
3512 3512
3513 func = make_new_mfun( "dur", "attackTime", ADSR_cget_attackTime ); //! attack time3513 func = make_new_mfun( "dur", "attackTime", ADSR_cget_attackTime ); //! attack time
3514 func->doc = "Get attack time.";3514 func->doc = "get attack time.";
3515 if( !type_engine_import_mfun( env, func ) ) goto error;3515 if( !type_engine_import_mfun( env, func ) ) goto error;
3516 3516
3517 func = make_new_mfun( "float", "attackRate", ADSR_ctrl_attackRate ); //! attack rate3517 func = make_new_mfun( "float", "attackRate", ADSR_ctrl_attackRate ); //! attack rate
3518 func->add_arg( "float", "value" );3518 func->add_arg( "float", "value" );
3519 func->doc = "Set attack rate.";3519 func->doc = "set attack rate.";
3520 if( !type_engine_import_mfun( env, func ) ) goto error;3520 if( !type_engine_import_mfun( env, func ) ) goto error;
3521 3521
3522 func = make_new_mfun( "float", "attackRate", ADSR_cget_attackRate ); //! attack rate3522 func = make_new_mfun( "float", "attackRate", ADSR_cget_attackRate ); //! attack rate
3523 func->doc = "Get attack rate.";3523 func->doc = "get attack rate.";
3524 if( !type_engine_import_mfun( env, func ) ) goto error;3524 if( !type_engine_import_mfun( env, func ) ) goto error;
3525 3525
3526 func = make_new_mfun( "dur", "decayTime", ADSR_ctrl_decayTime ); //! decay time 3526 func = make_new_mfun( "dur", "decayTime", ADSR_ctrl_decayTime ); //! decay time
3527 func->add_arg( "dur", "value" );3527 func->add_arg( "dur", "value" );
3528 func->doc = "Set decay time.";3528 func->doc = "set decay time.";
3529 if( !type_engine_import_mfun( env, func ) ) goto error;3529 if( !type_engine_import_mfun( env, func ) ) goto error;
3530 3530
3531 func = make_new_mfun( "dur", "decayTime", ADSR_cget_decayTime ); //! decay time3531 func = make_new_mfun( "dur", "decayTime", ADSR_cget_decayTime ); //! decay time
3532 func->doc = "Get decay time.";3532 func->doc = "get decay time.";
3533 if( !type_engine_import_mfun( env, func ) ) goto error;3533 if( !type_engine_import_mfun( env, func ) ) goto error;
3534 3534
3535 func = make_new_mfun( "float", "decayRate", ADSR_ctrl_decayRate ); //! decay rate3535 func = make_new_mfun( "float", "decayRate", ADSR_ctrl_decayRate ); //! decay rate
3536 func->add_arg( "float", "value" );3536 func->add_arg( "float", "value" );
3537 func->doc = "Set decay rate.";3537 func->doc = "set decay rate.";
3538 if( !type_engine_import_mfun( env, func ) ) goto error;3538 if( !type_engine_import_mfun( env, func ) ) goto error;
3539 3539
3540 func = make_new_mfun( "float", "decayRate", ADSR_cget_decayRate ); //! decay rate3540 func = make_new_mfun( "float", "decayRate", ADSR_cget_decayRate ); //! decay rate
3541 func->doc = "Get decay rate.";3541 func->doc = "get decay rate.";
3542 if( !type_engine_import_mfun( env, func ) ) goto error;3542 if( !type_engine_import_mfun( env, func ) ) goto error;
3543 3543
3544 func = make_new_mfun( "float", "sustainLevel", ADSR_ctrl_sustainLevel ); //! sustain level3544 func = make_new_mfun( "float", "sustainLevel", ADSR_ctrl_sustainLevel ); //! sustain level
3545 func->add_arg( "float", "value" );3545 func->add_arg( "float", "value" );
3546 func->doc = "Set sustain level.";3546 func->doc = "set sustain level.";
3547 if( !type_engine_import_mfun( env, func ) ) goto error;3547 if( !type_engine_import_mfun( env, func ) ) goto error;
3548 3548
3549 func = make_new_mfun( "float", "sustainLevel", ADSR_cget_sustainLevel ); //! sustain level3549 func = make_new_mfun( "float", "sustainLevel", ADSR_cget_sustainLevel ); //! sustain level
3550 func->doc = "Get sustain level.";3550 func->doc = "get sustain level.";
3551 if( !type_engine_import_mfun( env, func ) ) goto error;3551 if( !type_engine_import_mfun( env, func ) ) goto error;
3552 3552
3553 func = make_new_mfun( "dur", "releaseTime", ADSR_ctrl_releaseTime ); //! release time 3553 func = make_new_mfun( "dur", "releaseTime", ADSR_ctrl_releaseTime ); //! release time
3554 func->add_arg( "dur", "value" );3554 func->add_arg( "dur", "value" );
3555 func->doc = "Set release time.";3555 func->doc = "set release time.";
3556 if( !type_engine_import_mfun( env, func ) ) goto error;3556 if( !type_engine_import_mfun( env, func ) ) goto error;
3557 3557
3558 func = make_new_mfun( "dur", "releaseTime", ADSR_cget_releaseTime ); //! release time3558 func = make_new_mfun( "dur", "releaseTime", ADSR_cget_releaseTime ); //! release time
3559 func->doc = "Get release time.";3559 func->doc = "get release time.";
3560 if( !type_engine_import_mfun( env, func ) ) goto error;3560 if( !type_engine_import_mfun( env, func ) ) goto error;
3561 3561
3562 func = make_new_mfun( "float", "releaseRate", ADSR_ctrl_releaseRate ); //! release rate3562 func = make_new_mfun( "float", "releaseRate", ADSR_ctrl_releaseRate ); //! release rate
3563 func->add_arg( "float", "value" );3563 func->add_arg( "float", "value" );
3564 func->doc = "Set release rate.";3564 func->doc = "set release rate.";
3565 if( !type_engine_import_mfun( env, func ) ) goto error;3565 if( !type_engine_import_mfun( env, func ) ) goto error;
3566 3566
3567 func = make_new_mfun( "float", "releaseRate", ADSR_cget_releaseRate ); //! release rate3567 func = make_new_mfun( "float", "releaseRate", ADSR_cget_releaseRate ); //! release rate
3568 func->doc = "Get release rate.";3568 func->doc = "get release rate.";
3569 if( !type_engine_import_mfun( env, func ) ) goto error;3569 if( !type_engine_import_mfun( env, func ) ) goto error;
3570 3570
3571 func = make_new_mfun( "void", "set", ADSR_ctrl_set ); //! set3571 func = make_new_mfun( "void", "set", ADSR_ctrl_set ); //! set
@@ -3573,7 +3573,7 @@ by Perry R. Cook and Gary P. Scavone, 1995 - 2002."; · 1 unmodified line
3573 func->add_arg( "float", "decayTime" );3573 func->add_arg( "float", "decayTime" );
3574 func->add_arg( "float", "sustainLevel" );3574 func->add_arg( "float", "sustainLevel" );
3575 func->add_arg( "float", "releaseTime" );3575 func->add_arg( "float", "releaseTime" );
3576 func->doc = "Set attack, decay, sustain, and release all at once (in seconds).";3576 func->doc = "set attack, decay, sustain, and release all at once (in seconds).";
3577 if( !type_engine_import_mfun( env, func ) ) goto error;3577 if( !type_engine_import_mfun( env, func ) ) goto error;
3578 3578
3579 func = make_new_mfun( "void", "set", ADSR_ctrl_set2 ); //! set3579 func = make_new_mfun( "void", "set", ADSR_ctrl_set2 ); //! set
@@ -3581,11 +3581,11 @@ by Perry R. Cook and Gary P. Scavone, 1995 - 2002."; · 1 unmodified line
3581 func->add_arg( "dur", "decayDuration" );3581 func->add_arg( "dur", "decayDuration" );
3582 func->add_arg( "float", "sustainLevel" );3582 func->add_arg( "float", "sustainLevel" );
3583 func->add_arg( "dur", "releaseDuration" );3583 func->add_arg( "dur", "releaseDuration" );
3584 func->doc = "Set attack, decay, sustain, and release all at once.";3584 func->doc = "set attack, decay, sustain, and release all at once.";
3585 if( !type_engine_import_mfun( env, func ) ) goto error;3585 if( !type_engine_import_mfun( env, func ) ) goto error;
3586 3586
3587 func = make_new_mfun( "int", "state", ADSR_cget_state ); //! attack=0, decay=1 , sustain=2, release=3, done=43587 func = make_new_mfun( "int", "state", ADSR_cget_state ); //! attack=0, decay=1 , sustain=2, release=3, done=4
3588 func->doc = "Get state; attack=0, decay=1, sustain=2, release=3, done=4";3588 func->doc = "get state; attack=0, decay=1, sustain=2, release=3, done=4";
3589 if( !type_engine_import_mfun( env, func ) ) goto error;3589 if( !type_engine_import_mfun( env, func ) ) goto error;
3590 3590
3591 if( !type_engine_import_svar( env, "int", "ATTACK", TRUE, (t_CKUINT) &ADSR_state_ATTACK) ) goto error;3591 if( !type_engine_import_svar( env, "int", "ATTACK", TRUE, (t_CKUINT) &ADSR_state_ATTACK) ) goto error;
@@ -3718,7 +3718,7 @@ by Perry R. Cook and Gary P. Scavone, 1995 - 2002."; · 126 unmodified lines
3718 // begin OnePole ugen3718 // begin OnePole ugen
3719 //------------------------------------------------------------------------3719 //------------------------------------------------------------------------
3720 3720
3721 doc = "This protected Filter subclass implements a one-pole digital filter. A method is provided for setting the pole position along the real axis of the z-plane while maintaining a constant peak filter gain.\n\3721 doc = "a one-pole digital filter. A method is provided for setting the pole position along the real axis of the z-plane while maintaining a constant peak filter gain.\n\
3722\n\3722\n\
3723by Perry R. Cook and Gary P. Scavone, 1995 - 2002.";3723by Perry R. Cook and Gary P. Scavone, 1995 - 2002.";
3724 3724
@@ -3732,29 +3732,29 @@ by Perry R. Cook and Gary P. Scavone, 1995 - 2002."; · 7 unmodified lines
3732 3732
3733 func = make_new_mfun( "float", "a1", OnePole_ctrl_a1 ); //! filter coefficient3733 func = make_new_mfun( "float", "a1", OnePole_ctrl_a1 ); //! filter coefficient
3734 func->add_arg( "float", "value" );3734 func->add_arg( "float", "value" );
3735 func->doc = "Set filter coefficient.";3735 func->doc = "set filter coefficient.";
3736 if( !type_engine_import_mfun( env, func ) ) goto error;3736 if( !type_engine_import_mfun( env, func ) ) goto error;
3737 3737
3738 func = make_new_mfun( "float", "a1", OnePole_cget_a1 ); //! filter coefficient3738 func = make_new_mfun( "float", "a1", OnePole_cget_a1 ); //! filter coefficient
3739 func->doc = "Get filter coefficient.";3739 func->doc = "get filter coefficient.";
3740 if( !type_engine_import_mfun( env, func ) ) goto error;3740 if( !type_engine_import_mfun( env, func ) ) goto error;
3741 3741
3742 func = make_new_mfun( "float", "b0", OnePole_ctrl_b0 ); //! filter coefficient 3742 func = make_new_mfun( "float", "b0", OnePole_ctrl_b0 ); //! filter coefficient
3743 func->add_arg( "float", "value" );3743 func->add_arg( "float", "value" );
3744 func->doc = "Set filter coefficient.";3744 func->doc = "set filter coefficient.";
3745 if( !type_engine_import_mfun( env, func ) ) goto error;3745 if( !type_engine_import_mfun( env, func ) ) goto error;
3746 3746
3747 func = make_new_mfun( "float", "b0", OnePole_cget_b0 ); //! filter coefficient3747 func = make_new_mfun( "float", "b0", OnePole_cget_b0 ); //! filter coefficient
3748 func->doc = "Get filter coefficient.";3748 func->doc = "get filter coefficient.";
3749 if( !type_engine_import_mfun( env, func ) ) goto error;3749 if( !type_engine_import_mfun( env, func ) ) goto error;
3750 3750
3751 func = make_new_mfun( "float", "pole", OnePole_ctrl_pole ); //! set pole position along real axis of z-plane3751 func = make_new_mfun( "float", "pole", OnePole_ctrl_pole ); //! set pole position along real axis of z-plane
3752 func->add_arg( "float", "value" );3752 func->add_arg( "float", "value" );
3753 func->doc = "Set pole position along real axis of z-plane.";3753 func->doc = "set pole position along real axis of z-plane.";
3754 if( !type_engine_import_mfun( env, func ) ) goto error;3754 if( !type_engine_import_mfun( env, func ) ) goto error;
3755 3755
3756 func = make_new_mfun( "float", "pole", OnePole_cget_pole ); //! set pole position along real axis of z-plane3756 func = make_new_mfun( "float", "pole", OnePole_cget_pole ); //! set pole position along real axis of z-plane
3757 func->doc = "Get pole position along real axis of z-plane.";3757 func->doc = "get pole position along real axis of z-plane.";
3758 if( !type_engine_import_mfun( env, func ) ) goto error;3758 if( !type_engine_import_mfun( env, func ) ) goto error;
3759 3759
3760 3760
@@ -3765,7 +3765,7 @@ by Perry R. Cook and Gary P. Scavone, 1995 - 2002."; · 4 unmodified lines
3765 //------------------------------------------------------------------------3765 //------------------------------------------------------------------------
3766 // begin TwoPole ugen3766 // begin TwoPole ugen
3767 //------------------------------------------------------------------------3767 //------------------------------------------------------------------------
3768 doc = "This protected Filter subclass implements a two-pole digital filter. A method is provided for creating a resonance in the frequency response while maintaining a nearly constant filter gain.\n\3768 doc = "a two-pole digital filter. A method is provided for creating a resonance in the frequency response while maintaining a nearly constant filter gain.\n\
3769\n\3769\n\
3770by Perry R. Cook and Gary P. Scavone, 1995 - 2002.";3770by Perry R. Cook and Gary P. Scavone, 1995 - 2002.";
3771 3771
@@ -3780,56 +3780,56 @@ by Perry R. Cook and Gary P. Scavone, 1995 - 2002."; · 8 unmodified lines
3780 if( TwoPole_offset_data == CK_INVALID_OFFSET ) goto error;3780 if( TwoPole_offset_data == CK_INVALID_OFFSET ) goto error;
3781 func = make_new_mfun( "float", "a1", TwoPole_ctrl_a1 ); //! filter coefficient3781 func = make_new_mfun( "float", "a1", TwoPole_ctrl_a1 ); //! filter coefficient
3782 func->add_arg( "float", "value" );3782 func->add_arg( "float", "value" );
3783 func->doc = "Set filter coefficient.";3783 func->doc = "set filter coefficient.";
3784 if( !type_engine_import_mfun( env, func ) ) goto error;3784 if( !type_engine_import_mfun( env, func ) ) goto error;
3785 3785
3786 func = make_new_mfun( "float", "a1", TwoPole_cget_a1 ); //! filter coefficient3786 func = make_new_mfun( "float", "a1", TwoPole_cget_a1 ); //! filter coefficient
3787 func->doc = "Get filter coefficient.";3787 func->doc = "get filter coefficient.";
3788 if( !type_engine_import_mfun( env, func ) ) goto error;3788 if( !type_engine_import_mfun( env, func ) ) goto error;
3789 3789
3790 func = make_new_mfun( "float", "a2", TwoPole_ctrl_a2 ); //! filter coefficient3790 func = make_new_mfun( "float", "a2", TwoPole_ctrl_a2 ); //! filter coefficient
3791 func->add_arg( "float", "value" );3791 func->add_arg( "float", "value" );
3792 func->doc = "Set filter coefficient.";3792 func->doc = "set filter coefficient.";
3793 if( !type_engine_import_mfun( env, func ) ) goto error;3793 if( !type_engine_import_mfun( env, func ) ) goto error;
3794 3794
3795 func = make_new_mfun( "float", "a2", TwoPole_cget_a2 ); //! filter coefficient3795 func = make_new_mfun( "float", "a2", TwoPole_cget_a2 ); //! filter coefficient
3796 func->doc = "Get filter coefficient.";3796 func->doc = "get filter coefficient.";
3797 if( !type_engine_import_mfun( env, func ) ) goto error;3797 if( !type_engine_import_mfun( env, func ) ) goto error;
3798 3798
3799 func = make_new_mfun( "float", "b0", TwoPole_ctrl_b0 ); //! filter coefficient3799 func = make_new_mfun( "float", "b0", TwoPole_ctrl_b0 ); //! filter coefficient
3800 func->add_arg( "float", "value" );3800 func->add_arg( "float", "value" );
3801 func->doc = "Set filter coefficient.";3801 func->doc = "set filter coefficient.";
3802 if( !type_engine_import_mfun( env, func ) ) goto error;3802 if( !type_engine_import_mfun( env, func ) ) goto error;
3803 3803
3804 func = make_new_mfun( "float", "b0", TwoPole_cget_b0 ); //! filter coefficient3804 func = make_new_mfun( "float", "b0", TwoPole_cget_b0 ); //! filter coefficient
3805 func->doc = "Get filter coefficient.";3805 func->doc = "get filter coefficient.";
3806 if( !type_engine_import_mfun( env, func ) ) goto error;3806 if( !type_engine_import_mfun( env, func ) ) goto error;
3807 3807
3808 func = make_new_mfun( "float", "freq", TwoPole_ctrl_freq ); //! filter resonance frequency3808 func = make_new_mfun( "float", "freq", TwoPole_ctrl_freq ); //! filter resonance frequency
3809 func->add_arg( "float", "value" );3809 func->add_arg( "float", "value" );
3810 func->doc = "Set filter resonance frequency.";3810 func->doc = "set filter resonance frequency.";
3811 if( !type_engine_import_mfun( env, func ) ) goto error;3811 if( !type_engine_import_mfun( env, func ) ) goto error;
3812 3812
3813 func = make_new_mfun( "float", "freq", TwoPole_cget_freq ); //! filter resonance frequency3813 func = make_new_mfun( "float", "freq", TwoPole_cget_freq ); //! filter resonance frequency
3814 func->doc = "Get filter resonance frequency.";3814 func->doc = "get filter resonance frequency.";
3815 if( !type_engine_import_mfun( env, func ) ) goto error;3815 if( !type_engine_import_mfun( env, func ) ) goto error;
3816 3816
3817 func = make_new_mfun( "float", "radius", TwoPole_ctrl_radius ); //! filter resonance radius3817 func = make_new_mfun( "float", "radius", TwoPole_ctrl_radius ); //! filter resonance radius
3818 func->add_arg( "float", "value" );3818 func->add_arg( "float", "value" );
3819 func->doc = "Set filter radius resonance.";3819 func->doc = "set filter radius resonance.";
3820 if( !type_engine_import_mfun( env, func ) ) goto error;3820 if( !type_engine_import_mfun( env, func ) ) goto error;
3821 3821
3822 func = make_new_mfun( "float", "radius", TwoPole_cget_radius ); //! filter resonance radius3822 func = make_new_mfun( "float", "radius", TwoPole_cget_radius ); //! filter resonance radius
3823 func->doc = "Get filter radius resonance.";3823 func->doc = "get filter radius resonance.";
3824 if( !type_engine_import_mfun( env, func ) ) goto error;3824 if( !type_engine_import_mfun( env, func ) ) goto error;
3825 3825
3826 func = make_new_mfun( "int", "norm", TwoPole_ctrl_norm ); //! toggle filter normalization 3826 func = make_new_mfun( "int", "norm", TwoPole_ctrl_norm ); //! toggle filter normalization
3827 func->add_arg( "int", "value" );3827 func->add_arg( "int", "value" );
3828 func->doc = "Set filter normalization";3828 func->doc = "set filter normalization.";
3829 if( !type_engine_import_mfun( env, func ) ) goto error;3829 if( !type_engine_import_mfun( env, func ) ) goto error;
3830 3830
3831 func = make_new_mfun( "int", "norm", TwoPole_cget_norm ); //! toggle filter normalization3831 func = make_new_mfun( "int", "norm", TwoPole_cget_norm ); //! toggle filter normalization
3832 func->doc = "Get filter normalization";3832 func->doc = "get filter normalization.";
3833 if( !type_engine_import_mfun( env, func ) ) goto error;3833 if( !type_engine_import_mfun( env, func ) ) goto error;
3834 3834
3835 3835
@@ -3840,7 +3840,7 @@ by Perry R. Cook and Gary P. Scavone, 1995 - 2002."; · 4 unmodified lines
3840 //------------------------------------------------------------------------3840 //------------------------------------------------------------------------
3841 // begin OneZero ugen3841 // begin OneZero ugen
3842 //------------------------------------------------------------------------3842 //------------------------------------------------------------------------
3843 doc = " This protected Filter subclass implements a one-zero digital filter. A method is provided for setting the zero position along the real axis of the z-plane while maintaining a constant filter gain.\n\3843 doc = "a one-zero digital filter. A method is provided for setting the zero position along the real axis of the z-plane while maintaining a constant filter gain.\n\
3844\n\3844\n\
3845by Perry R. Cook and Gary P. Scavone, 1995 - 2002.";3845by Perry R. Cook and Gary P. Scavone, 1995 - 2002.";
3846 3846
@@ -3853,29 +3853,29 @@ by Perry R. Cook and Gary P. Scavone, 1995 - 2002."; · 6 unmodified lines
3853 if( OneZero_offset_data == CK_INVALID_OFFSET ) goto error;3853 if( OneZero_offset_data == CK_INVALID_OFFSET ) goto error;
3854 func = make_new_mfun( "float", "zero", OneZero_ctrl_zero ); //! set zero position3854 func = make_new_mfun( "float", "zero", OneZero_ctrl_zero ); //! set zero position
3855 func->add_arg( "float", "value" );3855 func->add_arg( "float", "value" );
3856 func->doc = "Set zero position";3856 func->doc = "set zero position.";
3857 if( !type_engine_import_mfun( env, func ) ) goto error;3857 if( !type_engine_import_mfun( env, func ) ) goto error;
3858 3858
3859 func = make_new_mfun( "float", "zero", OneZero_cget_zero ); //! set zero position3859 func = make_new_mfun( "float", "zero", OneZero_cget_zero ); //! set zero position
3860 func->doc = "Get zero position";3860 func->doc = "get zero position.";
3861 if( !type_engine_import_mfun( env, func ) ) goto error;3861 if( !type_engine_import_mfun( env, func ) ) goto error;
3862 3862
3863 func = make_new_mfun( "float", "b0", OneZero_ctrl_b0 ); //! filter coefficient3863 func = make_new_mfun( "float", "b0", OneZero_ctrl_b0 ); //! filter coefficient
3864 func->add_arg( "float", "value" );3864 func->add_arg( "float", "value" );
3865 func->doc = "Set filter coefficient.";3865 func->doc = "set filter coefficient.";
3866 if( !type_engine_import_mfun( env, func ) ) goto error;3866 if( !type_engine_import_mfun( env, func ) ) goto error;
3867 3867
3868 func = make_new_mfun( "float", "b0", OneZero_cget_b0 ); //! filter coefficient3868 func = make_new_mfun( "float", "b0", OneZero_cget_b0 ); //! filter coefficient
3869 func->doc = "Get filter coefficient.";3869 func->doc = "get filter coefficient.";
3870 if( !type_engine_import_mfun( env, func ) ) goto error;3870 if( !type_engine_import_mfun( env, func ) ) goto error;
3871 3871
3872 func = make_new_mfun( "float", "b1", OneZero_ctrl_b1 ); //! filter coefficient 3872 func = make_new_mfun( "float", "b1", OneZero_ctrl_b1 ); //! filter coefficient
3873 func->add_arg( "float", "value" );3873 func->add_arg( "float", "value" );
3874 func->doc = "Set filter coefficient.";3874 func->doc = "set filter coefficient.";
3875 if( !type_engine_import_mfun( env, func ) ) goto error;3875 if( !type_engine_import_mfun( env, func ) ) goto error;
3876 3876
3877 func = make_new_mfun( "float", "b1", OneZero_cget_b1 ); //! filter coefficient3877 func = make_new_mfun( "float", "b1", OneZero_cget_b1 ); //! filter coefficient
3878 func->doc = "Get filter coefficient.";3878 func->doc = "get filter coefficient.";
3879 if( !type_engine_import_mfun( env, func ) ) goto error;3879 if( !type_engine_import_mfun( env, func ) ) goto error;
3880 3880
3881 3881
@@ -3887,7 +3887,7 @@ by Perry R. Cook and Gary P. Scavone, 1995 - 2002."; · 5 unmodified lines
3887 // begin TwoZero ugen3887 // begin TwoZero ugen
3888 //------------------------------------------------------------------------3888 //------------------------------------------------------------------------
3889 3889
3890 doc = "This protected Filter subclass implements a two-zero digital filter. A method is provided for creating a 'notch' in the frequency response while maintaining a constant filter gain.\n\3890 doc = "a two-zero digital filter. A method is provided for creating a 'notch' in the frequency response while maintaining a constant filter gain.\n\
3891\n\3891\n\
3892by Perry R. Cook and Gary P. Scavone, 1995 - 2002.";3892by Perry R. Cook and Gary P. Scavone, 1995 - 2002.";
3893 3893
@@ -3900,47 +3900,47 @@ by Perry R. Cook and Gary P. Scavone, 1995 - 2002."; · 6 unmodified lines
3900 if( TwoZero_offset_data == CK_INVALID_OFFSET ) goto error;3900 if( TwoZero_offset_data == CK_INVALID_OFFSET ) goto error;
3901 func = make_new_mfun( "float", "b0", TwoZero_ctrl_b0 ); //! filter coefficient 3901 func = make_new_mfun( "float", "b0", TwoZero_ctrl_b0 ); //! filter coefficient
3902 func->add_arg( "float", "value" );3902 func->add_arg( "float", "value" );
3903 func->doc = "Set filter coefficient.";3903 func->doc = "set filter coefficient.";
3904 if( !type_engine_import_mfun( env, func ) ) goto error;3904 if( !type_engine_import_mfun( env, func ) ) goto error;
3905 3905
3906 func = make_new_mfun( "float", "b0", TwoZero_cget_b0 ); //! filter coefficient3906 func = make_new_mfun( "float", "b0", TwoZero_cget_b0 ); //! filter coefficient
3907 func->doc = "Get filter coefficient.";3907 func->doc = "get filter coefficient.";
3908 if( !type_engine_import_mfun( env, func ) ) goto error;3908 if( !type_engine_import_mfun( env, func ) ) goto error;
3909 3909
3910 func = make_new_mfun( "float", "b1", TwoZero_ctrl_b1 ); //! filter coefficient 3910 func = make_new_mfun( "float", "b1", TwoZero_ctrl_b1 ); //! filter coefficient
3911 func->add_arg( "float", "value" );3911 func->add_arg( "float", "value" );
3912 func->doc = "Set filter coefficient.";3912 func->doc = "set filter coefficient.";
3913 if( !type_engine_import_mfun( env, func ) ) goto error;3913 if( !type_engine_import_mfun( env, func ) ) goto error;
3914 3914
3915 func = make_new_mfun( "float", "b1", TwoZero_cget_b1 ); //! filter coefficient3915 func = make_new_mfun( "float", "b1", TwoZero_cget_b1 ); //! filter coefficient
3916 func->doc = "Get filter coefficient.";3916 func->doc = "get filter coefficient.";
3917 if( !type_engine_import_mfun( env, func ) ) goto error;3917 if( !type_engine_import_mfun( env, func ) ) goto error;
3918 3918
3919 func = make_new_mfun( "float", "b2", TwoZero_ctrl_b2 ); //! filter coefficient 3919 func = make_new_mfun( "float", "b2", TwoZero_ctrl_b2 ); //! filter coefficient
3920 func->add_arg( "float", "value" );3920 func->add_arg( "float", "value" );
3921 func->doc = "Set filter coefficient.";3921 func->doc = "set filter coefficient.";
3922 if( !type_engine_import_mfun( env, func ) ) goto error;3922 if( !type_engine_import_mfun( env, func ) ) goto error;
3923 3923
3924 func = make_new_mfun( "float", "b2", TwoZero_cget_b2 ); //! filter coefficient3924 func = make_new_mfun( "float", "b2", TwoZero_cget_b2 ); //! filter coefficient
3925 func->doc = "Get filter coefficient.";3925 func->doc = "get filter coefficient.";
3926 if( !type_engine_import_mfun( env, func ) ) goto error;3926 if( !type_engine_import_mfun( env, func ) ) goto error;
3927 3927
3928 func = make_new_mfun( "float", "freq", TwoZero_ctrl_freq ); //! filter notch frequency3928 func = make_new_mfun( "float", "freq", TwoZero_ctrl_freq ); //! filter notch frequency
3929 func->add_arg( "float", "value" );3929 func->add_arg( "float", "value" );
3930 func->doc = "Set filter notch frequency.";3930 func->doc = "set filter notch frequency.";
3931 if( !type_engine_import_mfun( env, func ) ) goto error;3931 if( !type_engine_import_mfun( env, func ) ) goto error;
3932 3932
3933 func = make_new_mfun( "float", "freq", TwoZero_cget_freq ); //! filter notch frequency3933 func = make_new_mfun( "float", "freq", TwoZero_cget_freq ); //! filter notch frequency
3934 func->doc = "Get filter notch frequency.";3934 func->doc = "get filter notch frequency.";
3935 if( !type_engine_import_mfun( env, func ) ) goto error;3935 if( !type_engine_import_mfun( env, func ) ) goto error;
3936 3936
3937 func = make_new_mfun( "float", "radius", TwoZero_ctrl_radius ); //! filter notch radius3937 func = make_new_mfun( "float", "radius", TwoZero_ctrl_radius ); //! filter notch radius
3938 func->add_arg( "float", "value" );3938 func->add_arg( "float", "value" );
3939 func->doc = "Set filter notch radius.";3939 func->doc = "set filter notch radius.";
3940 if( !type_engine_import_mfun( env, func ) ) goto error;3940 if( !type_engine_import_mfun( env, func ) ) goto error;
3941 3941
3942 func = make_new_mfun( "float", "radius", TwoZero_cget_radius ); //! filter notch radius3942 func = make_new_mfun( "float", "radius", TwoZero_cget_radius ); //! filter notch radius
3943 func->doc = "Get filter notch radius.";3943 func->doc = "get filter notch radius.";
3944 if( !type_engine_import_mfun( env, func ) ) goto error;3944 if( !type_engine_import_mfun( env, func ) ) goto error;
3945 3945
3946 3946
@@ -3952,7 +3952,7 @@ by Perry R. Cook and Gary P. Scavone, 1995 - 2002."; · 5 unmodified lines
3952 // begin PoleZero ugen3952 // begin PoleZero ugen
3953 //------------------------------------------------------------------------3953 //------------------------------------------------------------------------
3954 3954
3955 doc = "This protected Filter subclass implements a one-pole, one-zero digital filter. A method is provided for creating an allpass filter with a given coefficient. Another method is provided to create a DC blocking filter.\n\3955 doc = "a one-pole, one-zero digital filter. A method is provided for creating an allpass filter with a given coefficient. Another method is provided to create a DC blocking filter.\n\
3956\n\3956\n\
3957by Perry R. Cook and Gary P. Scavone, 1995 - 2002.";3957by Perry R. Cook and Gary P. Scavone, 1995 - 2002.";
3958 3958
@@ -3965,47 +3965,47 @@ by Perry R. Cook and Gary P. Scavone, 1995 - 2002."; · 6 unmodified lines
3965 if( PoleZero_offset_data == CK_INVALID_OFFSET ) goto error;3965 if( PoleZero_offset_data == CK_INVALID_OFFSET ) goto error;
3966 func = make_new_mfun( "float", "a1", PoleZero_ctrl_a1 ); //! filter coefficient 3966 func = make_new_mfun( "float", "a1", PoleZero_ctrl_a1 ); //! filter coefficient
3967 func->add_arg( "float", "value" );3967 func->add_arg( "float", "value" );
3968 func->doc = "Set filter coefficient.";3968 func->doc = "set filter coefficient.";
3969 if( !type_engine_import_mfun( env, func ) ) goto error;3969 if( !type_engine_import_mfun( env, func ) ) goto error;
3970 3970
3971 func = make_new_mfun( "float", "a1", PoleZero_cget_a1 ); //! filter coefficient3971 func = make_new_mfun( "float", "a1", PoleZero_cget_a1 ); //! filter coefficient
3972 func->doc = "Get filter coefficient.";3972 func->doc = "get filter coefficient.";
3973 if( !type_engine_import_mfun( env, func ) ) goto error;3973 if( !type_engine_import_mfun( env, func ) ) goto error;
3974 3974
3975 func = make_new_mfun( "float", "b0", PoleZero_ctrl_b0 ); //! filter coefficient3975 func = make_new_mfun( "float", "b0", PoleZero_ctrl_b0 ); //! filter coefficient
3976 func->add_arg( "float", "value" );3976 func->add_arg( "float", "value" );
3977 func->doc = "Set filter coefficient.";3977 func->doc = "set filter coefficient.";
3978 if( !type_engine_import_mfun( env, func ) ) goto error;3978 if( !type_engine_import_mfun( env, func ) ) goto error;
3979 3979
3980 func = make_new_mfun( "float", "b0", PoleZero_cget_b0 ); //! filter coefficient3980 func = make_new_mfun( "float", "b0", PoleZero_cget_b0 ); //! filter coefficient
3981 func->doc = "Get filter coefficient.";3981 func->doc = "get filter coefficient.";
3982 if( !type_engine_import_mfun( env, func ) ) goto error;3982 if( !type_engine_import_mfun( env, func ) ) goto error;
3983 3983
3984 func = make_new_mfun( "float", "b1", PoleZero_ctrl_b1 ); //! filter coefficient 3984 func = make_new_mfun( "float", "b1", PoleZero_ctrl_b1 ); //! filter coefficient
3985 func->add_arg( "float", "value" );3985 func->add_arg( "float", "value" );
3986 func->doc = "Set filter coefficient.";3986 func->doc = "set filter coefficient.";
3987 if( !type_engine_import_mfun( env, func ) ) goto error;3987 if( !type_engine_import_mfun( env, func ) ) goto error;
3988 3988
3989 func = make_new_mfun( "float", "b1", PoleZero_cget_b1 ); //! filter coefficient3989 func = make_new_mfun( "float", "b1", PoleZero_cget_b1 ); //! filter coefficient
3990 func->doc = "Get filter coefficient.";3990 func->doc = "get filter coefficient.";
3991 if( !type_engine_import_mfun( env, func ) ) goto error;3991 if( !type_engine_import_mfun( env, func ) ) goto error;
3992 3992
3993 func = make_new_mfun( "float", "blockZero", PoleZero_ctrl_blockZero ); //! DC blocking filter with given pole position3993 func = make_new_mfun( "float", "blockZero", PoleZero_ctrl_blockZero ); //! DC blocking filter with given pole position
3994 func->add_arg( "float", "value" );3994 func->add_arg( "float", "value" );
3995 func->doc = "Set DC blocking filter with given pole position.";3995 func->doc = "set DC blocking filter with given pole position.";
3996 if( !type_engine_import_mfun( env, func ) ) goto error;3996 if( !type_engine_import_mfun( env, func ) ) goto error;
3997 3997
3998 func = make_new_mfun( "float", "blockZero", PoleZero_cget_blockZero ); //! DC blocking filter with given pole position3998 func = make_new_mfun( "float", "blockZero", PoleZero_cget_blockZero ); //! DC blocking filter with given pole position
3999 func->doc = "Get DC blocking filter with given pole position.";3999 func->doc = "get DC blocking filter with given pole position.";
4000 if( !type_engine_import_mfun( env, func ) ) goto error;4000 if( !type_engine_import_mfun( env, func ) ) goto error;
4001 4001
4002 func = make_new_mfun( "float", "allpass", PoleZero_ctrl_allpass ); //!allpass filter with given coefficient4002 func = make_new_mfun( "float", "allpass", PoleZero_ctrl_allpass ); //!allpass filter with given coefficient
4003 func->add_arg( "float", "value" );4003 func->add_arg( "float", "value" );
4004 func->doc = "Set allpass filter with given coefficient.";4004 func->doc = "set allpass filter with given coefficient.";
4005 if( !type_engine_import_mfun( env, func ) ) goto error;4005 if( !type_engine_import_mfun( env, func ) ) goto error;
4006 4006
4007 func = make_new_mfun( "float", "allpass", PoleZero_cget_allpass ); //!allpass filter with given coefficient4007 func = make_new_mfun( "float", "allpass", PoleZero_cget_allpass ); //!allpass filter with given coefficient
4008 func->doc = "Get allpass filter with given coefficient.";4008 func->doc = "get allpass filter with given coefficient.";
4009 if( !type_engine_import_mfun( env, func ) ) goto error;4009 if( !type_engine_import_mfun( env, func ) ) goto error;
4010 4010
4011 // end the class import4011 // end the class import
@@ -4021,7 +4021,7 @@ by Perry R. Cook and Gary P. Scavone, 1995 - 2002."; · 9 unmodified lines
4021 // begin JCRev ugen4021 // begin JCRev ugen
4022 //------------------------------------------------------------------------4022 //------------------------------------------------------------------------
4023 4023
4024 doc = "John Chowning's reverberator class. This class is derived from the CLM NRev function, which is based on the use of networks of simple allpass and comb delay filters. This particular arrangement consists of 6 comb filters in parallel, followed by 3 allpass filters, a lowpass filter, and another allpass in series, followed by two allpass filters in parallel with corresponding right and left outputs.\n\4024 doc = "John Chowning's reverberator class. This class is derived from the CLM NRev function, which is based on the use of networks of simple allpass and comb delay filters. This particular arrangement consists of 6 comb filters in parallel, followed by 3 allpass filters, a lowpass filter, and another allpass in series, followed by two allpass filters in parallel with corresponding right and left outputs.\n\
4025\n\4025\n\
4026by Perry R. Cook and Gary P. Scavone, 1995 - 2002.";4026by Perry R. Cook and Gary P. Scavone, 1995 - 2002.";
4027 4027
@@ -4034,11 +4034,11 @@ by Perry R. Cook and Gary P. Scavone, 1995 - 2002."; · 6 unmodified lines
4034 if( JCRev_offset_data == CK_INVALID_OFFSET ) goto error;4034 if( JCRev_offset_data == CK_INVALID_OFFSET ) goto error;
4035 func = make_new_mfun( "float", "mix", JCRev_ctrl_mix ); //! mix level4035 func = make_new_mfun( "float", "mix", JCRev_ctrl_mix ); //! mix level
4036 func->add_arg( "float", "value" );4036 func->add_arg( "float", "value" );
4037 func->doc = "Set mix level.";4037 func->doc = "set mix level.";
4038 if( !type_engine_import_mfun( env, func ) ) goto error;4038 if( !type_engine_import_mfun( env, func ) ) goto error;
4039 4039
4040 func = make_new_mfun( "float", "mix", JCRev_cget_mix ); //! mix level4040 func = make_new_mfun( "float", "mix", JCRev_cget_mix ); //! mix level
4041 func->doc = "Get mix level.";4041 func->doc = "get mix level.";
4042 if( !type_engine_import_mfun( env, func ) ) goto error;4042 if( !type_engine_import_mfun( env, func ) ) goto error;
4043 4043
4044 4044
@@ -4050,7 +4050,7 @@ by Perry R. Cook and Gary P. Scavone, 1995 - 2002."; · 5 unmodified lines
4050 // begin NRev ugen4050 // begin NRev ugen
4051 //------------------------------------------------------------------------4051 //------------------------------------------------------------------------
4052 4052
4053 doc = "CCRMA's NRev reverberator class. This class is derived from the CLM NRev function, which is based on the use of networks of simple allpass and comb delay filters. This particular arrangement consists of 6 comb filters in parallel, followed by 3 allpass filters, a lowpass filter, and another allpass in series, followed by two allpass filters in parallel with corresponding rightand left outputs.\n\4053 doc = "CCRMA's NRev reverberator class. This class is derived from the CLM NRev function, which is based on the use of networks of simple allpass and comb delay filters. This particular arrangement consists of 6 comb filters in parallel, followed by 3 allpass filters, a lowpass filter, and another allpass in series, followed by two allpass filters in parallel with corresponding rightand left outputs.\n\
4054\n\4054\n\
4055by Perry R. Cook and Gary P. Scavone, 1995 - 2002.";4055by Perry R. Cook and Gary P. Scavone, 1995 - 2002.";
4056 4056
@@ -4063,11 +4063,11 @@ by Perry R. Cook and Gary P. Scavone, 1995 - 2002."; · 6 unmodified lines
4063 if( NRev_offset_data == CK_INVALID_OFFSET ) goto error;4063 if( NRev_offset_data == CK_INVALID_OFFSET ) goto error;
4064 func = make_new_mfun( "float", "mix", NRev_ctrl_mix ); // set effect mix4064 func = make_new_mfun( "float", "mix", NRev_ctrl_mix ); // set effect mix
4065 func->add_arg( "float", "value" );4065 func->add_arg( "float", "value" );
4066 func->doc = "Set mix level.";4066 func->doc = "set mix level.";
4067 if( !type_engine_import_mfun( env, func ) ) goto error;4067 if( !type_engine_import_mfun( env, func ) ) goto error;
4068 4068
4069 func = make_new_mfun( "float", "mix", NRev_cget_mix ); // set effect mix4069 func = make_new_mfun( "float", "mix", NRev_cget_mix ); // set effect mix
4070 func->doc = "Get mix level.";4070 func->doc = "get mix level.";
4071 if( !type_engine_import_mfun( env, func ) ) goto error;4071 if( !type_engine_import_mfun( env, func ) ) goto error;
4072 4072
4073 // end the class import4073 // end the class import
@@ -4078,7 +4078,7 @@ by Perry R. Cook and Gary P. Scavone, 1995 - 2002."; · 4 unmodified lines
4078 // begin PRCRev ugen4078 // begin PRCRev ugen
4079 //------------------------------------------------------------------------4079 //------------------------------------------------------------------------
4080 4080
4081 doc = "Perry's simple reverberator class. This class is based on some of the famous Stanford/CCRMA reverbs (NRev, KipRev), which were based on the Chowning/Moorer/Schroeder reverberators using networks of simple allpass and comb delay filters. This class implements two series allpass units and two parallel comb filters.\n\4081 doc = "Perry's simple reverberator class. This class is based on some of the famous Stanford/CCRMA reverbs (NRev, KipRev), which were based on the Chowning/Moorer/Schroeder reverberators using networks of simple allpass and comb delay filters. This class implements two series allpass units and two parallel comb filters.\n\
4082\n\4082\n\
4083by Perry R. Cook and Gary P. Scavone, 1995 - 2002.";4083by Perry R. Cook and Gary P. Scavone, 1995 - 2002.";
4084 4084
@@ -4091,11 +4091,11 @@ by Perry R. Cook and Gary P. Scavone, 1995 - 2002."; · 6 unmodified lines
4091 if( PRCRev_offset_data == CK_INVALID_OFFSET ) goto error;4091 if( PRCRev_offset_data == CK_INVALID_OFFSET ) goto error;
4092 func = make_new_mfun( "float", "mix", PRCRev_ctrl_mix ); //! mix level4092 func = make_new_mfun( "float", "mix", PRCRev_ctrl_mix ); //! mix level
4093 func->add_arg( "float", "value" );4093 func->add_arg( "float", "value" );
4094 func->doc = "Set mix level.";4094 func->doc = "set mix level.";
4095 if( !type_engine_import_mfun( env, func ) ) goto error;4095 if( !type_engine_import_mfun( env, func ) ) goto error;
4096 4096
4097 func = make_new_mfun( "float", "mix", PRCRev_cget_mix ); //! mix level4097 func = make_new_mfun( "float", "mix", PRCRev_cget_mix ); //! mix level
4098 func->doc = "Get mix level.";4098 func->doc = "get mix level.";
4099 if( !type_engine_import_mfun( env, func ) ) goto error;4099 if( !type_engine_import_mfun( env, func ) ) goto error;
4100 4100
4101 // end the class import4101 // end the class import
@@ -4107,7 +4107,7 @@ by Perry R. Cook and Gary P. Scavone, 1995 - 2002."; · 5 unmodified lines
4107 // begin Chorus ugen4107 // begin Chorus ugen
4108 //------------------------------------------------------------------------4108 //------------------------------------------------------------------------
4109 4109
4110 doc = "Implements a chorus effect.\n\4110 doc = "a chorus effect.\n\
4111\n\4111\n\
4112by Perry R. Cook and Gary P. Scavone, 1995 - 2002.";4112by Perry R. Cook and Gary P. Scavone, 1995 - 2002.";
4113 4113
@@ -4120,38 +4120,38 @@ by Perry R. Cook and Gary P. Scavone, 1995 - 2002."; · 6 unmodified lines
4120 if( Chorus_offset_data == CK_INVALID_OFFSET ) goto error;4120 if( Chorus_offset_data == CK_INVALID_OFFSET ) goto error;
4121 func = make_new_mfun( "float", "modFreq", Chorus_ctrl_modFreq ); //! modulation frequency4121 func = make_new_mfun( "float", "modFreq", Chorus_ctrl_modFreq ); //! modulation frequency
4122 func->add_arg( "float", "value" );4122 func->add_arg( "float", "value" );
4123 func->doc = "Set modulation frequency.";4123 func->doc = "set modulation frequency.";
4124 if( !type_engine_import_mfun( env, func ) ) goto error;4124 if( !type_engine_import_mfun( env, func ) ) goto error;
4125 4125
4126 func = make_new_mfun( "float", "modFreq", Chorus_cget_modFreq ); //! modulation frequency4126 func = make_new_mfun( "float", "modFreq", Chorus_cget_modFreq ); //! modulation frequency
4127 func->doc = "Get modulation frequency.";4127 func->doc = "get modulation frequency.";
4128 if( !type_engine_import_mfun( env, func ) ) goto error;4128 if( !type_engine_import_mfun( env, func ) ) goto error;
4129 4129
4130 func = make_new_mfun( "float", "modDepth", Chorus_ctrl_modDepth ); //! modulation depth4130 func = make_new_mfun( "float", "modDepth", Chorus_ctrl_modDepth ); //! modulation depth
4131 func->add_arg( "float", "value" );4131 func->add_arg( "float", "value" );
4132 func->doc = "Set modulation depth.";4132 func->doc = "set modulation depth.";
4133 if( !type_engine_import_mfun( env, func ) ) goto error;4133 if( !type_engine_import_mfun( env, func ) ) goto error;
4134 4134
4135 func = make_new_mfun( "float", "modDepth", Chorus_cget_modDepth ); //! modulation depth4135 func = make_new_mfun( "float", "modDepth", Chorus_cget_modDepth ); //! modulation depth
4136 func->doc = "Get modulation depth.";4136 func->doc = "get modulation depth.";
4137 if( !type_engine_import_mfun( env, func ) ) goto error;4137 if( !type_engine_import_mfun( env, func ) ) goto error;
4138 4138
4139 func = make_new_mfun( "dur", "baseDelay", Chorus_ctrl_baseDelay ); //! base delay4139 func = make_new_mfun( "dur", "baseDelay", Chorus_ctrl_baseDelay ); //! base delay
4140 func->add_arg( "dur", "value" );4140 func->add_arg( "dur", "value" );
4141 func->doc = "Set base delay.";4141 func->doc = "set base delay.";
4142 if( !type_engine_import_mfun( env, func ) ) goto error;4142 if( !type_engine_import_mfun( env, func ) ) goto error;
4143 4143
4144 func = make_new_mfun( "dur", "baseDelay", Chorus_cget_baseDelay ); //! base delay4144 func = make_new_mfun( "dur", "baseDelay", Chorus_cget_baseDelay ); //! base delay
4145 func->doc = "Get base delay.";4145 func->doc = "get base delay.";
4146 if( !type_engine_import_mfun( env, func ) ) goto error;4146 if( !type_engine_import_mfun( env, func ) ) goto error;
4147 4147
4148 func = make_new_mfun( "float", "mix", Chorus_ctrl_mix ); //! effect mix4148 func = make_new_mfun( "float", "mix", Chorus_ctrl_mix ); //! effect mix
4149 func->add_arg( "float", "value" );4149 func->add_arg( "float", "value" );
4150 func->doc = "Set effect mix.";4150 func->doc = "set effect mix.";
4151 if( !type_engine_import_mfun( env, func ) ) goto error;4151 if( !type_engine_import_mfun( env, func ) ) goto error;
4152 4152
4153 func = make_new_mfun( "float", "mix", Chorus_cget_mix ); //! effect mix4153 func = make_new_mfun( "float", "mix", Chorus_cget_mix ); //! effect mix
4154 func->doc = "Get effect mix.";4154 func->doc = "get effect mix.";
4155 if( !type_engine_import_mfun( env, func ) ) goto error;4155 if( !type_engine_import_mfun( env, func ) ) goto error;
4156 4156
4157 func = make_new_mfun( "void", "max", Chorus_ctrl_set );4157 func = make_new_mfun( "void", "max", Chorus_ctrl_set );
@@ -4168,7 +4168,7 @@ by Perry R. Cook and Gary P. Scavone, 1995 - 2002."; · 10 unmodified lines
4168 // begin Modulate ugen4168 // begin Modulate ugen
4169 //------------------------------------------------------------------------4169 //------------------------------------------------------------------------
4170 4170
4171 doc = "This class combines random and periodic modulations to give a nice, natural human modulation function.\n\4171 doc = "combines random and periodic modulations to give a nice, natural human modulation function.\n\
4172\n\4172\n\
4173by Perry R. Cook and Gary P. Scavone, 1995 - 2002.";4173by Perry R. Cook and Gary P. Scavone, 1995 - 2002.";
4174 4174
@@ -4181,29 +4181,29 @@ by Perry R. Cook and Gary P. Scavone, 1995 - 2002."; · 6 unmodified lines
4181 if( Modulate_offset_data == CK_INVALID_OFFSET ) goto error;4181 if( Modulate_offset_data == CK_INVALID_OFFSET ) goto error;
4182 func = make_new_mfun( "float", "vibratoRate", Modulate_ctrl_vibratoRate ); //! set rate of vibrato4182 func = make_new_mfun( "float", "vibratoRate", Modulate_ctrl_vibratoRate ); //! set rate of vibrato
4183 func->add_arg( "float", "value" );4183 func->add_arg( "float", "value" );
4184 func->doc = "Set rate for vibrato.";4184 func->doc = "set rate for vibrato.";
4185 if( !type_engine_import_mfun( env, func ) ) goto error;4185 if( !type_engine_import_mfun( env, func ) ) goto error;
4186 4186
4187 func = make_new_mfun( "float", "vibratoRate", Modulate_cget_vibratoRate ); //! set rate of vibrato4187 func = make_new_mfun( "float", "vibratoRate", Modulate_cget_vibratoRate ); //! set rate of vibrato
4188 func->doc = "Get rate for vibrato.";4188 func->doc = "get rate for vibrato.";
4189 if( !type_engine_import_mfun( env, func ) ) goto error;4189 if( !type_engine_import_mfun( env, func ) ) goto error;
4190 4190
4191 func = make_new_mfun( "float", "vibratoGain", Modulate_ctrl_vibratoGain ); //! gain for vibrato4191 func = make_new_mfun( "float", "vibratoGain", Modulate_ctrl_vibratoGain ); //! gain for vibrato
4192 func->add_arg( "float", "value" );4192 func->add_arg( "float", "value" );
4193 func->doc = "Set gain for vibrato.";4193 func->doc = "set gain for vibrato.";
4194 if( !type_engine_import_mfun( env, func ) ) goto error;4194 if( !type_engine_import_mfun( env, func ) ) goto error;
4195 4195
4196 func = make_new_mfun( "float", "vibratoGain", Modulate_cget_vibratoGain ); //! gain for vibrato4196 func = make_new_mfun( "float", "vibratoGain", Modulate_cget_vibratoGain ); //! gain for vibrato
4197 func->doc = "Get gain for vibrato.";4197 func->doc = "get gain for vibrato.";
4198 if( !type_engine_import_mfun( env, func ) ) goto error;4198 if( !type_engine_import_mfun( env, func ) ) goto error;
4199 4199
4200 func = make_new_mfun( "float", "randomGain", Modulate_ctrl_randomGain ); //! gain for random contribution4200 func = make_new_mfun( "float", "randomGain", Modulate_ctrl_randomGain ); //! gain for random contribution
4201 func->add_arg( "float", "value" );4201 func->add_arg( "float", "value" );
4202 func->doc = "Set gain for random contribution";4202 func->doc = "set gain for random contribution.";
4203 if( !type_engine_import_mfun( env, func ) ) goto error;4203 if( !type_engine_import_mfun( env, func ) ) goto error;
4204 4204
4205 func = make_new_mfun( "float", "randomGain", Modulate_cget_randomGain ); //! gain for random contribution4205 func = make_new_mfun( "float", "randomGain", Modulate_cget_randomGain ); //! gain for random contribution
4206 func->doc = "Get gain for random contribution";4206 func->doc = "get gain for random contribution.";
4207 if( !type_engine_import_mfun( env, func ) ) goto error;4207 if( !type_engine_import_mfun( env, func ) ) goto error;
4208 4208
4209 4209
@@ -4215,7 +4215,7 @@ by Perry R. Cook and Gary P. Scavone, 1995 - 2002."; · 5 unmodified lines
4215 // begin PitShift ugen4215 // begin PitShift ugen
4216 //------------------------------------------------------------------------4216 //------------------------------------------------------------------------
4217 4217
4218 doc = "This class implements a simple pitch shifter using delay lines.\n\4218 doc = "a simple pitch shifter using delay lines.\n\
4219\n\4219\n\
4220by Perry R. Cook and Gary P. Scavone, 1995 - 2002.";4220by Perry R. Cook and Gary P. Scavone, 1995 - 2002.";
4221 4221
@@ -4228,30 +4228,30 @@ by Perry R. Cook and Gary P. Scavone, 1995 - 2002."; · 6 unmodified lines
4228 if( PitShift_offset_data == CK_INVALID_OFFSET ) goto error;4228 if( PitShift_offset_data == CK_INVALID_OFFSET ) goto error;
4229 func = make_new_mfun( "float", "shift", PitShift_ctrl_shift ); //! degree of pitch shifting4229 func = make_new_mfun( "float", "shift", PitShift_ctrl_shift ); //! degree of pitch shifting
4230 func->add_arg( "float", "value" );4230 func->add_arg( "float", "value" );
4231 func->doc = "Set degree of pitch shifting";4231 func->doc = "set degree of pitch shifting";
4232 if( !type_engine_import_mfun( env, func ) ) goto error;4232 if( !type_engine_import_mfun( env, func ) ) goto error;
4233 4233
4234 func = make_new_mfun( "float", "shift", PitShift_cget_shift ); //! degree of pitch shifting4234 func = make_new_mfun( "float", "shift", PitShift_cget_shift ); //! degree of pitch shifting
4235 func->doc = "Get degree of pitch shifting";4235 func->doc = "get degree of pitch shifting";
4236 if( !type_engine_import_mfun( env, func ) ) goto error;4236 if( !type_engine_import_mfun( env, func ) ) goto error;
4237 4237
4238 func = make_new_mfun( "float", "mix", PitShift_ctrl_effectMix ); //! mix level4238 func = make_new_mfun( "float", "mix", PitShift_ctrl_effectMix ); //! mix level
4239 func->add_arg( "float", "value" );4239 func->add_arg( "float", "value" );
4240 func->doc = "Set mix level";4240 func->doc = "set mix level";
4241 if( !type_engine_import_mfun( env, func ) ) goto error;4241 if( !type_engine_import_mfun( env, func ) ) goto error;
4242 4242
4243 func = make_new_mfun( "float", "mix", PitShift_cget_effectMix ); //! mix level4243 func = make_new_mfun( "float", "mix", PitShift_cget_effectMix ); //! mix level
4244 func->doc = "Get mix level";4244 func->doc = "get mix level";
4245 if( !type_engine_import_mfun( env, func ) ) goto error;4245 if( !type_engine_import_mfun( env, func ) ) goto error;
4246 4246
4247 func = make_new_mfun( "float", "effectMix", PitShift_ctrl_effectMix ); //! mix level4247 func = make_new_mfun( "float", "effectMix", PitShift_ctrl_effectMix ); //! mix level
4248 func->doc = "Set effect mix level";4248 func->doc = "set effect mix level";
4249 func->add_arg( "float", "value" );4249 func->add_arg( "float", "value" );
4250 4250
4251 if( !type_engine_import_mfun( env, func ) ) goto error;4251 if( !type_engine_import_mfun( env, func ) ) goto error;
4252 4252
4253 func = make_new_mfun( "float", "effectMix", PitShift_cget_effectMix ); //! mix level4253 func = make_new_mfun( "float", "effectMix", PitShift_cget_effectMix ); //! mix level
4254 func->doc = "Get effect mix level";4254 func->doc = "get effect mix level";
4255 if( !type_engine_import_mfun( env, func ) ) goto error;4255 if( !type_engine_import_mfun( env, func ) ) goto error;
4256 4256
4257 4257
@@ -4263,7 +4263,7 @@ by Perry R. Cook and Gary P. Scavone, 1995 - 2002."; · 5 unmodified lines
4263 // begin SubNoise ugen4263 // begin SubNoise ugen
4264 //------------------------------------------------------------------------4264 //------------------------------------------------------------------------
4265 4265
4266 doc = "Generates a new random number every 'rate' ticks using the C `rand()` function. The quality of the r`and()` function varies from one OS to another.\n\4266 doc = "generates a new random number every 'rate' ticks using the C `rand()` function. The quality of the r`and()` function varies from one OS to another.\n\
4267\n\4267\n\
4268by Perry R. Cook and Gary P. Scavone, 1995 - 2002.";4268by Perry R. Cook and Gary P. Scavone, 1995 - 2002.";
4269 4269
@@ -4276,11 +4276,11 @@ by Perry R. Cook and Gary P. Scavone, 1995 - 2002."; · 6 unmodified lines
4276 if( SubNoise_offset_data == CK_INVALID_OFFSET ) goto error;4276 if( SubNoise_offset_data == CK_INVALID_OFFSET ) goto error;
4277 func = make_new_mfun( "int", "rate", SubNoise_ctrl_rate ); //! subsampling rate4277 func = make_new_mfun( "int", "rate", SubNoise_ctrl_rate ); //! subsampling rate
4278 func->add_arg( "int", "value" );4278 func->add_arg( "int", "value" );
4279 func->doc = "Set subsampling rate";4279 func->doc = "set subsampling rate";
4280 if( !type_engine_import_mfun( env, func ) ) goto error;4280 if( !type_engine_import_mfun( env, func ) ) goto error;
4281 4281
4282 func = make_new_mfun( "int", "rate", SubNoise_cget_rate ); //! subsampling rate4282 func = make_new_mfun( "int", "rate", SubNoise_cget_rate ); //! subsampling rate
4283 func->doc = "Get subsampling rate";4283 func->doc = "get subsampling rate";
4284 if( !type_engine_import_mfun( env, func ) ) goto error;4284 if( !type_engine_import_mfun( env, func ) ) goto error;
4285 4285
4286 // end the class import4286 // end the class import
@@ -4293,7 +4293,7 @@ by Perry R. Cook and Gary P. Scavone, 1995 - 2002."; · 6 unmodified lines
4293 // begin WvIn ugen4293 // begin WvIn ugen
4294 //------------------------------------------------------------------------4294 //------------------------------------------------------------------------
4295 4295
4296 doc = "This class provides input support for various audio file formats. It also serves as a base class for 'realtime' streaming subclasses.\n\4296 doc = "input support for various audio file formats. It also serves as a base class for 'realtime' streaming subclasses.\n\
4297\n\4297\n\
4298WvIn loads the contents of an audio file for subsequent output. Linear interpolation is used for fractional 'read rates'.\n\4298WvIn loads the contents of an audio file for subsequent output. Linear interpolation is used for fractional 'read rates'.\n\
4299\n\4299\n\
@@ -4312,20 +4312,20 @@ by Perry R. Cook and Gary P. Scavone, 1995 - 2002."; · 12 unmodified lines
4312 if( WvIn_offset_data == CK_INVALID_OFFSET ) goto error;4312 if( WvIn_offset_data == CK_INVALID_OFFSET ) goto error;
4313 func = make_new_mfun( "float", "rate", WvIn_ctrl_rate ); //! playback rate4313 func = make_new_mfun( "float", "rate", WvIn_ctrl_rate ); //! playback rate
4314 func->add_arg( "float", "value" );4314 func->add_arg( "float", "value" );
4315 func->doc = "Set playback rate.";4315 func->doc = "set playback rate.";
4316 if( !type_engine_import_mfun( env, func ) ) goto error;4316 if( !type_engine_import_mfun( env, func ) ) goto error;
4317 4317
4318 func = make_new_mfun( "float", "rate", WvIn_cget_rate ); //! playback rate4318 func = make_new_mfun( "float", "rate", WvIn_cget_rate ); //! playback rate
4319 func->doc = "Get playback rate.";4319 func->doc = "get playback rate.";
4320 if( !type_engine_import_mfun( env, func ) ) goto error;4320 if( !type_engine_import_mfun( env, func ) ) goto error;
4321 4321
4322 func = make_new_mfun( "string", "path", WvIn_ctrl_path ); //! specifies file to be played4322 func = make_new_mfun( "string", "path", WvIn_ctrl_path ); //! specifies file to be played
4323 func->add_arg( "string", "value" );4323 func->add_arg( "string", "value" );
4324 func->doc = "Set file to be played.";4324 func->doc = "set file to be played.";
4325 if( !type_engine_import_mfun( env, func ) ) goto error;4325 if( !type_engine_import_mfun( env, func ) ) goto error;
4326 4326
4327 func = make_new_mfun( "string", "path", WvIn_cget_path ); //! specifies file to be played4327 func = make_new_mfun( "string", "path", WvIn_cget_path ); //! specifies file to be played
4328 func->doc = "Get file to be played.";4328 func->doc = "get file to be played.";
4329 if( !type_engine_import_mfun( env, func ) ) goto error;4329 if( !type_engine_import_mfun( env, func ) ) goto error;
4330 4330
4331 4331
@@ -4337,7 +4337,7 @@ by Perry R. Cook and Gary P. Scavone, 1995 - 2002."; · 5 unmodified lines
4337 // begin WaveLoop ugen4337 // begin WaveLoop ugen
4338 //------------------------------------------------------------------------4338 //------------------------------------------------------------------------
4339 4339
4340 doc = "This class inherits from WvIn and provides audio file looping functionality.\n\4340 doc = "inherits from WvIn and provides audio file looping functionality.\n\
4341\n\4341\n\
4342WaveLoop supports multi-channel data in interleaved format. It is important to distinguish the `tick()` methods, which return samples produced by averaging across sample frames, from the `tickFrame()` methods, which return pointers to multi-channel sample frames. For single-channel data, these methods return equivalent values.\n\4342WaveLoop supports multi-channel data in interleaved format. It is important to distinguish the `tick()` methods, which return samples produced by averaging across sample frames, from the `tickFrame()` methods, which return pointers to multi-channel sample frames. For single-channel data, these methods return equivalent values.\n\
4343\n\4343\n\
@@ -4350,29 +4350,29 @@ by Perry R. Cook and Gary P. Scavone, 1995 - 2002."; · 6 unmodified lines
4350 4350
4351 func = make_new_mfun( "float", "freq", WaveLoop_ctrl_freq ); //! set frequency of playback ( loops / second )4351 func = make_new_mfun( "float", "freq", WaveLoop_ctrl_freq ); //! set frequency of playback ( loops / second )
4352 func->add_arg( "float", "value" );4352 func->add_arg( "float", "value" );
4353 func->doc = "Set frequency of playback (loops/second).";4353 func->doc = "set frequency of playback (loops/second).";
4354 if( !type_engine_import_mfun( env, func ) ) goto error;4354 if( !type_engine_import_mfun( env, func ) ) goto error;
4355 4355
4356 func = make_new_mfun( "float", "freq", WaveLoop_cget_freq ); //! set frequency of playback ( loops / second )4356 func = make_new_mfun( "float", "freq", WaveLoop_cget_freq ); //! set frequency of playback ( loops / second )
4357 func->doc = "Get frequency of playback (loops/second).";4357 func->doc = "get frequency of playback (loops/second).";
4358 if( !type_engine_import_mfun( env, func ) ) goto error;4358 if( !type_engine_import_mfun( env, func ) ) goto error;
4359 4359
4360 func = make_new_mfun( "float", "addPhase", WaveLoop_ctrl_phase ); //! offset by phase4360 func = make_new_mfun( "float", "addPhase", WaveLoop_ctrl_phase ); //! offset by phase
4361 func->add_arg( "float", "value" );4361 func->add_arg( "float", "value" );
4362 func->doc = "Set offset by phase.";4362 func->doc = "set offset by phase.";
4363 if( !type_engine_import_mfun( env, func ) ) goto error;4363 if( !type_engine_import_mfun( env, func ) ) goto error;
4364 4364
4365 func = make_new_mfun( "float", "addPhase", WaveLoop_cget_phase ); //! offset by phase4365 func = make_new_mfun( "float", "addPhase", WaveLoop_cget_phase ); //! offset by phase
4366 func->doc = "Get offset by phase.";4366 func->doc = "get offset by phase.";
4367 if( !type_engine_import_mfun( env, func ) ) goto error;4367 if( !type_engine_import_mfun( env, func ) ) goto error;
4368 4368
4369 func = make_new_mfun( "float", "addPhaseOffset", WaveLoop_ctrl_phaseOffset ); //! set phase offset4369 func = make_new_mfun( "float", "addPhaseOffset", WaveLoop_ctrl_phaseOffset ); //! set phase offset
4370 func->add_arg( "float", "value" );4370 func->add_arg( "float", "value" );
4371 func->doc = "Set phase offset.";4371 func->doc = "set phase offset.";
4372 if( !type_engine_import_mfun( env, func ) ) goto error;4372 if( !type_engine_import_mfun( env, func ) ) goto error;
4373 4373
4374 func = make_new_mfun( "float", "addPhaseOffset", WaveLoop_cget_phaseOffset ); //! set phase offset4374 func = make_new_mfun( "float", "addPhaseOffset", WaveLoop_cget_phaseOffset ); //! set phase offset
4375 func->doc = "Get phase offset.";4375 func->doc = "get phase offset.";
4376 if( !type_engine_import_mfun( env, func ) ) goto error;4376 if( !type_engine_import_mfun( env, func ) ) goto error;
4377 4377
4378 // end the class import4378 // end the class import
@@ -4384,11 +4384,11 @@ by Perry R. Cook and Gary P. Scavone, 1995 - 2002."; · 5 unmodified lines
4384 // begin WvOut ugen4384 // begin WvOut ugen
4385 //------------------------------------------------------------------------4385 //------------------------------------------------------------------------
4386 4386
4387 doc = "This class provides output support for various audio file formats. It also serves as a base class for 'realtime' streaming subclasses.\n\4387 doc = "output support for various audio file formats. It also serves as a base class for 'realtime' streaming subclasses.\n\
4388\n\4388\n\
4389WvOut writes samples to an audio file. It supports multi-channel data in interleaved format. It is important to distinguish the `tick()` methods, which output single samples to all channels in a sample frame, from the `tickFrame()` method, which takes a pointer to multi-channel sample frame data.\n\4389WvOut writes samples to an audio file. It supports multi-channel data in interleaved format. It is important to distinguish the `tick()` methods, which output single samples to all channels in a sample frame, from the `tickFrame()` method, which takes a pointer to multi-channel sample frame data.\n\
4390\n\4390\n\
4391WvOut currently supports WAV, AIFF, AIFC, SND (AU), MAT-file (Matlab), and STK RAW file formats. Signed integer (8-, 16-, and 32-bit) and floating- point (32- and 64-bit) data types are supported. STK RAW files use 16-bit integers by definition. MAT-files will always be written as 64-bit floats. If a data type specification does not match the specified file type, the data type will automatically be modified. Uncompressed data types are not supported.\n\4391WvOut currently supports WAV, AIFF, AIFC, SND (AU), MAT-file (Matlab), and STK RAW file formats. Signed integer (8-, 16-, and 32-bit) and floating- point (32- and 64-bit) data types are supported. STK RAW files use 16-bit integers by definition. MAT-files will always be written as 64-bit floats. If a data type specification does not match the specified file type, the data type will automatically be modified. Uncompressed data types are not supported.\n\
4392\n\4392\n\
4393Currently, WvOut is non-interpolating and the output rate is always `Stk::sampleRate()`.\n\4393Currently, WvOut is non-interpolating and the output rate is always `Stk::sampleRate()`.\n\
4394\n\4394\n\
@@ -4404,67 +4404,67 @@ by Perry R. Cook and Gary P. Scavone, 1995 - 2002."; · 9 unmodified lines
4404 4404
4405 func = make_new_mfun( "string", "matFilename", WvOut_ctrl_matFilename ); //!open matlab file for writing4405 func = make_new_mfun( "string", "matFilename", WvOut_ctrl_matFilename ); //!open matlab file for writing
4406 func->add_arg( "string", "value" );4406 func->add_arg( "string", "value" );
4407 func->doc = "Open MatLab file for writing.";4407 func->doc = "open MATLAB file for writing.";
4408 if( !type_engine_import_mfun( env, func ) ) goto error;4408 if( !type_engine_import_mfun( env, func ) ) goto error;
4409 4409
4410 func = make_new_mfun( "string", "sndFilename", WvOut_ctrl_sndFilename ); //!open snd file for writing4410 func = make_new_mfun( "string", "sndFilename", WvOut_ctrl_sndFilename ); //!open snd file for writing
4411 func->add_arg( "string", "value" );4411 func->add_arg( "string", "value" );
4412 func->doc = "Open SND file for writing.";4412 func->doc = "open SND file for writing.";
4413 if( !type_engine_import_mfun( env, func ) ) goto error;4413 if( !type_engine_import_mfun( env, func ) ) goto error;
4414 4414
4415 func = make_new_mfun( "string", "wavFilename", WvOut_ctrl_wavFilename ); //!open WAVE file for writing4415 func = make_new_mfun( "string", "wavFilename", WvOut_ctrl_wavFilename ); //!open WAVE file for writing
4416 func->add_arg( "string", "value" );4416 func->add_arg( "string", "value" );
4417 func->doc = "Open WAVE file for writing.";4417 func->doc = "open WAVE file for writing.";
4418 if( !type_engine_import_mfun( env, func ) ) goto error;4418 if( !type_engine_import_mfun( env, func ) ) goto error;
4419 4419
4420 func = make_new_mfun( "string", "rawFilename", WvOut_ctrl_rawFilename ); //!open raw file for writing4420 func = make_new_mfun( "string", "rawFilename", WvOut_ctrl_rawFilename ); //!open raw file for writing
4421 func->add_arg( "string", "value" );4421 func->add_arg( "string", "value" );
4422 func->doc = "Open a raw file for writing.";4422 func->doc = "open a raw file for writing.";
4423 if( !type_engine_import_mfun( env, func ) ) goto error;4423 if( !type_engine_import_mfun( env, func ) ) goto error;
4424 4424
4425 func = make_new_mfun( "string", "aifFilename", WvOut_ctrl_aifFilename ); //!open AIFF file for writing4425 func = make_new_mfun( "string", "aifFilename", WvOut_ctrl_aifFilename ); //!open AIFF file for writing
4426 func->add_arg( "string", "value" );4426 func->add_arg( "string", "value" );
4427 func->doc = "Open an AIFF file for writing.";4427 func->doc = "open an AIFF file for writing.";
4428 if( !type_engine_import_mfun( env, func ) ) goto error;4428 if( !type_engine_import_mfun( env, func ) ) goto error;
4429 4429
4430 func = make_new_mfun( "string", "filename", WvOut_cget_filename ); //!get filename4430 func = make_new_mfun( "string", "filename", WvOut_cget_filename ); //!get filename
4431 func->doc = "Get filename.";4431 func->doc = "get filename.";
4432 if( !type_engine_import_mfun( env, func ) ) goto error;4432 if( !type_engine_import_mfun( env, func ) ) goto error;
4433 4433
4434 func = make_new_mfun( "int", "record", WvOut_ctrl_record ); // !start/stop output4434 func = make_new_mfun( "int", "record", WvOut_ctrl_record ); // !start/stop output
4435 func->add_arg( "int", "value" );4435 func->add_arg( "int", "value" );
4436 func->doc = "Start/stop output.";4436 func->doc = "start/stop output.";
4437 if( !type_engine_import_mfun( env, func ) ) goto error;4437 if( !type_engine_import_mfun( env, func ) ) goto error;
4438 4438
4439 func = make_new_mfun( "int", "record", WvOut_cget_record ); // !start/stop output4439 func = make_new_mfun( "int", "record", WvOut_cget_record ); // !start/stop output
4440 func->doc = "Start/stop output.";4440 func->doc = "start/stop output.";
4441 if( !type_engine_import_mfun( env, func ) ) goto error;4441 if( !type_engine_import_mfun( env, func ) ) goto error;
4442 4442
4443 func = make_new_mfun( "string", "closeFile", WvOut_ctrl_closeFile ); //! close file properly4443 func = make_new_mfun( "string", "closeFile", WvOut_ctrl_closeFile ); //! close file properly
4444 func->add_arg( "string", "value" );4444 func->add_arg( "string", "value" );
4445 func->doc = "Close the file properly.";4445 func->doc = "close the file properly.";
4446 if( !type_engine_import_mfun( env, func ) ) goto error;4446 if( !type_engine_import_mfun( env, func ) ) goto error;
4447 4447
4448 func = make_new_mfun( "string", "closeFile", WvOut_ctrl_closeFile ); //! close file properly4448 func = make_new_mfun( "string", "closeFile", WvOut_ctrl_closeFile ); //! close file properly
4449 func->doc = "Close the file properly.";4449 func->doc = "close the file properly.";
4450 if( !type_engine_import_mfun( env, func ) ) goto error;4450 if( !type_engine_import_mfun( env, func ) ) goto error;
4451 4451
4452 func = make_new_mfun( "string", "autoPrefix", WvOut_ctrl_autoPrefix ); //! set/get auto prefix string4452 func = make_new_mfun( "string", "autoPrefix", WvOut_ctrl_autoPrefix ); //! set/get auto prefix string
4453 func->add_arg( "string", "value" );4453 func->add_arg( "string", "value" );
4454 func->doc = "Set auto prefix string.";4454 func->doc = "set auto prefix string.";
4455 if( !type_engine_import_mfun( env, func ) ) goto error;4455 if( !type_engine_import_mfun( env, func ) ) goto error;
4456 4456
4457 func = make_new_mfun( "string", "autoPrefix", WvOut_cget_autoPrefix ); //! set/get auto prefix string4457 func = make_new_mfun( "string", "autoPrefix", WvOut_cget_autoPrefix ); //! set/get auto prefix string
4458 func->doc = "Get auto prefix string.";4458 func->doc = "get auto prefix string.";
4459 if( !type_engine_import_mfun( env, func ) ) goto error;4459 if( !type_engine_import_mfun( env, func ) ) goto error;
4460 4460
4461 func = make_new_mfun( "float", "fileGain", WvOut_ctrl_fileGain ); //! set/get auto prefix string4461 func = make_new_mfun( "float", "fileGain", WvOut_ctrl_fileGain ); //! set/get auto prefix string
4462 func->add_arg( "float", "value" );4462 func->add_arg( "float", "value" );
4463 func->doc = "Set file gain.";4463 func->doc = "set file gain.";
4464 if( !type_engine_import_mfun( env, func ) ) goto error;4464 if( !type_engine_import_mfun( env, func ) ) goto error;
4465 4465
4466 func = make_new_mfun( "float", "fileGain", WvOut_cget_fileGain ); //! set/get auto prefix string4466 func = make_new_mfun( "float", "fileGain", WvOut_cget_fileGain ); //! set/get auto prefix string
4467 func->doc = "Get file gain.";4467 func->doc = "get file gain.";
4468 if( !type_engine_import_mfun( env, func ) ) goto error;4468 if( !type_engine_import_mfun( env, func ) ) goto error;
4469 4469
4470 // end the class import4470 // end the class import
@@ -4504,7 +4504,7 @@ by Perry R. Cook and Gary P. Scavone, 1995 - 2002."; · 33 unmodified lines
4504 // begin BLT (BandLtd)4504 // begin BLT (BandLtd)
4505 //------------------------------------------------------------------------4505 //------------------------------------------------------------------------
4506 4506
4507 doc = "Super-class for band-limited oscillators.";4507 doc = "super-class for band-limited oscillators.";
4508 4508
4509 if( !type_engine_import_ugen_begin( env, "BLT", "UGen", env->global(), 4509 if( !type_engine_import_ugen_begin( env, "BLT", "UGen", env->global(),
4510 BLT_ctor, BLT_dtor,4510 BLT_ctor, BLT_dtor,
@@ -4520,29 +4520,29 @@ by Perry R. Cook and Gary P. Scavone, 1995 - 2002."; · 9 unmodified lines
4520 4520
4521 func = make_new_mfun( "float", "phase", BLT_ctrl_phase ); //!set phase4521 func = make_new_mfun( "float", "phase", BLT_ctrl_phase ); //!set phase
4522 func->add_arg( "float", "value" );4522 func->add_arg( "float", "value" );
4523 func->doc = "Set phase.";4523 func->doc = "set phase.";
4524 if( !type_engine_import_mfun( env, func ) ) goto error;4524 if( !type_engine_import_mfun( env, func ) ) goto error;
4525 4525
4526 func = make_new_mfun( "float", "phase", BLT_cget_phase ); //!get phase4526 func = make_new_mfun( "float", "phase", BLT_cget_phase ); //!get phase
4527 func->doc = "Get phase.";4527 func->doc = "get phase.";
4528 if( !type_engine_import_mfun( env, func ) ) goto error;4528 if( !type_engine_import_mfun( env, func ) ) goto error;
4529 4529
4530 func = make_new_mfun( "float", "freq", BLT_ctrl_freq ); //!set freq4530 func = make_new_mfun( "float", "freq", BLT_ctrl_freq ); //!set freq
4531 func->add_arg( "float", "value" );4531 func->add_arg( "float", "value" );
4532 func->doc = "Set frequency.";4532 func->doc = "set frequency.";
4533 if( !type_engine_import_mfun( env, func ) ) goto error;4533 if( !type_engine_import_mfun( env, func ) ) goto error;
4534 4534
4535 func = make_new_mfun( "float", "freq", BLT_cget_freq ); //!get freq4535 func = make_new_mfun( "float", "freq", BLT_cget_freq ); //!get freq
4536 func->doc = "Set frequency.";4536 func->doc = "set frequency.";
4537 if( !type_engine_import_mfun( env, func ) ) goto error;4537 if( !type_engine_import_mfun( env, func ) ) goto error;
4538 4538
4539 func = make_new_mfun( "int", "harmonics", BLT_ctrl_harmonics ); //!set harmonics4539 func = make_new_mfun( "int", "harmonics", BLT_ctrl_harmonics ); //!set harmonics
4540 func->add_arg( "int", "value" );4540 func->add_arg( "int", "value" );
4541 func->doc = "Set harmonics.";4541 func->doc = "set harmonics.";
4542 if( !type_engine_import_mfun( env, func ) ) goto error;4542 if( !type_engine_import_mfun( env, func ) ) goto error;
4543 4543
4544 func = make_new_mfun( "int", "harmonics", BLT_cget_harmonics ); //!get harmonics4544 func = make_new_mfun( "int", "harmonics", BLT_cget_harmonics ); //!get harmonics
4545 func->doc = "Get harmonics.";4545 func->doc = "get harmonics.";
4546 if( !type_engine_import_mfun( env, func ) ) goto error;4546 if( !type_engine_import_mfun( env, func ) ) goto error;
4547 4547
4548 // end the class import4548 // end the class import
@@ -4553,7 +4553,7 @@ by Perry R. Cook and Gary P. Scavone, 1995 - 2002."; · 4 unmodified lines
4553 // begin Blit4553 // begin Blit
4554 //------------------------------------------------------------------------4554 //------------------------------------------------------------------------
4555 4555
4556 doc = "This class generates a band-limited impulse train using a closed-form algorithm reported by Stilson and Smith in 'Alias-Free Digital Synthesis of Classic Analog Waveforms', 1996. The user can specify both the fundamental frequency of the impulse train and the number of harmonics contained in the resulting signal.\n\4556 doc = "a band-limited impulse train using a closed-form algorithm reported by Stilson and Smith in 'Alias-Free Digital Synthesis of Classic Analog Waveforms', 1996. The user can specify both the fundamental frequency of the impulse train and the number of harmonics contained in the resulting signal.\n\
4557\n\4557\n\
4558The signal is normalized so that the peak value is +/-1.0.\n\4558The signal is normalized so that the peak value is +/-1.0.\n\
4559\n\4559\n\
@@ -4575,7 +4575,7 @@ Revisions by Gary Scavone for STK, 2005."; · 15 unmodified lines
4575 // begin BlitSaw4575 // begin BlitSaw
4576 //------------------------------------------------------------------------4576 //------------------------------------------------------------------------
4577 4577
4578 doc = "This class generates a band-limited sawtooth waveform using a closed-form algorithm reported by Stilson and Smith in 'Alias-Free Digital Synthesis of Classic Analog Waveforms', 1996. The user can specify both the fundamental frequency of the sawtooth and the number of harmonics contained in the resulting signal.\n\4578 doc = "a band-limited sawtooth waveform using a closed-form algorithm reported by Stilson and Smith in 'Alias-Free Digital Synthesis of Classic Analog Waveforms', 1996. The user can specify both the fundamental frequency of the sawtooth and the number of harmonics contained in the resulting signal.\n\
4579\n\4579\n\
4580If `nHarmonics` is 0, then the signal will contain all harmonics up to half the sample rate. Note, however, that this setting may produce aliasing in the signal when the frequency is changing (no automatic modification of the number of harmonics is performed by the `setFrequency()` function).\n\4580If `nHarmonics` is 0, then the signal will contain all harmonics up to half the sample rate. Note, however, that this setting may produce aliasing in the signal when the frequency is changing (no automatic modification of the number of harmonics is performed by the `setFrequency()` function).\n\
4581\n\4581\n\
@@ -4593,7 +4593,7 @@ Modified algorithm code by Gary Scavone, 2005."; · 11 unmodified lines
4593 // begin BlitSquare4593 // begin BlitSquare
4594 //------------------------------------------------------------------------4594 //------------------------------------------------------------------------
4595 4595
4596 doc = "This class generates a band-limited square wave signal. It is derived in part from the approach reported by Stilson and Smith in 'Alias-Free Digital Synthesis of Classic Analog Waveforms', 1996. The algorithm implemented in this class uses a SincM function with an even M value to achieve a bipolar bandlimited impulse train. This signal is then integrated to achieve a square waveform. The integration process has an associated DC offset but that is subtracted off the output signal.\n\4596 doc = "a band-limited square wave signal. It is derived in part from the approach reported by Stilson and Smith in 'Alias-Free Digital Synthesis of Classic Analog Waveforms', 1996. The algorithm implemented in this class uses a SincM function with an even M value to achieve a bipolar bandlimited impulse train. This signal is then integrated to achieve a square waveform. The integration process has an associated DC offset but that is subtracted off the output signal.\n\
4597\n\4597\n\
4598The user can specify both the fundamental frequency of the waveform and the number of harmonics contained in the resulting signal.\n\4598The user can specify both the fundamental frequency of the waveform and the number of harmonics contained in the resulting signal.\n\
4599\n\4599\n\
@@ -4828,22 +4828,22 @@ struct SKINISpec skini_msgs[__SK_MaxMsgTypes_] = · 228 unmodified lines
4828/* type is the message type sent back from the SKINI line parser. */4828/* type is the message type sent back from the SKINI line parser. */
4829/* data<n> is either */4829/* data<n> is either */
4830/* NOPE : field not used, specifically, there aren't going */ 4830/* NOPE : field not used, specifically, there aren't going */
4831/* to be any more fields on this line. So if there */4831/* to be any more fields on this line. So if there */
4832/* is is NOPE in data2, data3 won't even be checked */4832/* is is NOPE in data2, data3 won't even be checked */
4833/* SK_INT : byte (actually scanned as 32 bit signed integer) */4833/* SK_INT : byte (actually scanned as 32 bit signed integer) */
4834/* If it's a MIDI data field which is required to */4834/* If it's a MIDI data field which is required to */
4835/* be an integer, like a controller number, it's */4835/* be an integer, like a controller number, it's */
4836/* 0-127. Otherwise) get creative with SK_INTs */4836/* 0-127. Otherwise) get creative with SK_INTs */
4837/* SK_DBL : double precision floating point. SKINI uses these */4837/* SK_DBL : double precision floating point. SKINI uses these */
4838/* in the MIDI context for note numbers with micro */4838/* in the MIDI context for note numbers with micro */
4839/* tuning, velocities, controller values, etc. */4839/* tuning, velocities, controller values, etc. */
4840/* SK_STR : only valid in final field. This allows (nearly) */4840/* SK_STR : only valid in final field. This allows (nearly) */
4841/* arbitrary message types to be supported by simply */4841/* arbitrary message types to be supported by simply */
4842/* scanning the string to EndOfLine and then passing */4842/* scanning the string to EndOfLine and then passing */
4843/* it to a more intellegent handler. For example, */4843/* it to a more intellegent handler. For example, */
4844/* MIDI SYSEX (system exclusive) messages of up to */4844/* MIDI SYSEX (system exclusive) messages of up to */
4845/* 256bytes can be read as space-delimited integers */4845/* 256bytes can be read as space-delimited integers */
4846/* into the 1K SK_STR buffer. Longer bulk dumps, */4846/* into the 1K SK_STR buffer. Longer bulk dumps, */
4847/* soundfiles, etc. should be handled as a new */4847/* soundfiles, etc. should be handled as a new */
4848/* message type pointing to a FileName stored in the */4848/* message type pointing to a FileName stored in the */
4849/* SK_STR field, or as a new type of multi-line */ 4849/* SK_STR field, or as a new type of multi-line */
@@ -4858,7 +4858,7 @@ struct SKINISpec skini_msgs[__SK_MaxMsgTypes_] = · 8 unmodified lines
4858 4858
4859 This Envelope subclass implements a4859 This Envelope subclass implements a
4860 traditional ADSR (Attack, Decay,4860 traditional ADSR (Attack, Decay,
4861 Sustain, Release) envelope. It4861 Sustain, Release) envelope. It
4862 responds to simple keyOn and keyOff4862 responds to simple keyOn and keyOff
4863 messages, keeping track of its state.4863 messages, keeping track of its state.
4864 The \e state = ADSR::DONE after the4864 The \e state = ADSR::DONE after the
@@ -5033,7 +5033,7 @@ void ADSR :: setValue(MY_FLOAT aValue) · 168 unmodified lines
5033 target = aValue;5033 target = aValue;
5034 value = aValue;5034 value = aValue;
5035 this->setSustainLevel(aValue);5035 this->setSustainLevel(aValue);
5036 rate = (MY_FLOAT) 0.0;5036 rate = (MY_FLOAT)0.0;
5037}5037}
5038 5038
5039int ADSR :: getState(void) const5039int ADSR :: getState(void) const
@@ -5107,7 +5107,7 @@ MY_FLOAT *ADSR :: tick(MY_FLOAT *vec, unsigned int vectorSize) · 67 unmodified lines
5107 5107
5108 This class uses banded waveguide techniques to5108 This class uses banded waveguide techniques to
5109 model a variety of sounds, including bowed5109 model a variety of sounds, including bowed
5110 bars, glasses, and bowls. For more5110 bars, glasses, and bowls. For more
5111 information, see Essl, G. and Cook, P. "Banded5111 information, see Essl, G. and Cook, P. "Banded
5112 Waveguides: Towards Physical Modelling of Bar5112 Waveguides: Towards Physical Modelling of Bar
5113 Percussion Instruments", Proceedings of the5113 Percussion Instruments", Proceedings of the
@@ -5321,7 +5321,7 @@ void BandedWG :: setFrequency(MY_FLOAT frequency) · 207 unmodified lines
5321 }5321 }
5322 // CK_STDCERR << CK_STDENDL;5322 // CK_STDCERR << CK_STDENDL;
5323 5323
5324 // Set the bandpass filter resonances5324 // set the bandpass filter resonances
5325 radius = 1.0 - ONE_PI * 32 / Stk::sampleRate(); //freakency * modes[i] / Stk::sampleRate()/32;5325 radius = 1.0 - ONE_PI * 32 / Stk::sampleRate(); //freakency * modes[i] / Stk::sampleRate()/32;
5326 if ( radius < 0.0 ) radius = 0.0;5326 if ( radius < 0.0 ) radius = 0.0;
5327 bandpass[i].setResonance(freakency * modes[i], radius, true);5327 bandpass[i].setResonance(freakency * modes[i], radius, true);
@@ -5528,7 +5528,7 @@ void BandedWG :: controlChange(int number, MY_FLOAT value) · 200 unmodified lines
5528 5528
5529 The basic Chowning/Stanford FM patent expired5529 The basic Chowning/Stanford FM patent expired
5530 in 1995, but there exist follow-on patents,5530 in 1995, but there exist follow-on patents,
5531 mostly assigned to Yamaha. If you are of the5531 mostly assigned to Yamaha. If you are of the
5532 type who should worry about this (making5532 type who should worry about this (making
5533 money) worry away.5533 money) worry away.
5534 5534
@@ -5611,7 +5611,7 @@ MY_FLOAT BeeThree :: tick() · 76 unmodified lines
5611 \brief STK biquad (two-pole, two-zero) filter class.5611 \brief STK biquad (two-pole, two-zero) filter class.
5612 5612
5613 This protected Filter subclass implements a5613 This protected Filter subclass implements a
5614 two-pole, two-zero digital filter. A method5614 two-pole, two-zero digital filter. A method
5615 is provided for creating a resonance in the5615 is provided for creating a resonance in the
5616 frequency response while maintaining a constant5616 frequency response while maintaining a constant
5617 filter gain.5617 filter gain.
@@ -5737,14 +5737,14 @@ MY_FLOAT *BiQuad :: tick(MY_FLOAT *vec, unsigned int vectorSize) · 119 unmodified lines
5737 5737
5738 This class generates a band-limited impulse train using a5738 This class generates a band-limited impulse train using a
5739 closed-form algorithm reported by Stilson and Smith in "Alias-Free5739 closed-form algorithm reported by Stilson and Smith in "Alias-Free
5740 Digital Synthesis of Classic Analog Waveforms", 1996. The user5740 Digital Synthesis of Classic Analog Waveforms", 1996. The user
5741 can specify both the fundamental frequency of the impulse train5741 can specify both the fundamental frequency of the impulse train
5742 and the number of harmonics contained in the resulting signal.5742 and the number of harmonics contained in the resulting signal.
5743 5743
5744 The signal is normalized so that the peak value is +/-1.0.5744 The signal is normalized so that the peak value is +/-1.0.
5745 5745
5746 If nHarmonics is 0, then the signal will contain all harmonics up5746 If nHarmonics is 0, then the signal will contain all harmonics up
5747 to half the sample rate. Note, however, that this setting may5747 to half the sample rate. Note, however, that this setting may
5748 produce aliasing in the signal when the frequency is changing (no5748 produce aliasing in the signal when the frequency is changing (no
5749 automatic modification of the number of harmonics is performed by5749 automatic modification of the number of harmonics is performed by
5750 the setFrequency() function).5750 the setFrequency() function).
@@ -5844,12 +5844,12 @@ MY_FLOAT Blit :: tick( void ) · 93 unmodified lines
5844 5844
5845 This class generates a band-limited sawtooth waveform using a5845 This class generates a band-limited sawtooth waveform using a
5846 closed-form algorithm reported by Stilson and Smith in "Alias-Free5846 closed-form algorithm reported by Stilson and Smith in "Alias-Free
5847 Digital Synthesis of Classic Analog Waveforms", 1996. The user5847 Digital Synthesis of Classic Analog Waveforms", 1996. The user
5848 can specify both the fundamental frequency of the sawtooth and the5848 can specify both the fundamental frequency of the sawtooth and the
5849 number of harmonics contained in the resulting signal.5849 number of harmonics contained in the resulting signal.
5850 5850
5851 If nHarmonics is 0, then the signal will contain all harmonics up5851 If nHarmonics is 0, then the signal will contain all harmonics up
5852 to half the sample rate. Note, however, that this setting may5852 to half the sample rate. Note, however, that this setting may
5853 produce aliasing in the signal when the frequency is changing (no5853 produce aliasing in the signal when the frequency is changing (no
5854 automatic modification of the number of harmonics is performed by5854 automatic modification of the number of harmonics is performed by
5855 the setFrequency() function).5855 the setFrequency() function).
@@ -5896,11 +5896,11 @@ void BlitSaw :: setHarmonics( unsigned int nHarmonics ) · 40 unmodified lines
5896 this->updateHarmonics();5896 this->updateHarmonics();
5897 5897
5898 // I found that the initial DC offset could be minimized with an5898 // I found that the initial DC offset could be minimized with an
5899 // initial state setting as given below. This initialization should5899 // initial state setting as given below. This initialization should
5900 // only happen before starting the oscillator for the first time5900 // only happen before starting the oscillator for the first time
5901 // (but after setting the frequency and number of harmonics). I5901 // (but after setting the frequency and number of harmonics). I
5902 // struggled a bit to decide where best to put this and finally5902 // struggled a bit to decide where best to put this and finally
5903 // settled on here. In general, the user shouldn't be messing with5903 // settled on here. In general, the user shouldn't be messing with
5904 // the number of harmonics once the oscillator is running because5904 // the number of harmonics once the oscillator is running because
5905 // this is automatically taken care of in the setFrequency()5905 // this is automatically taken care of in the setFrequency()
5906 // function. (GPS - 1 October 2005)5906 // function. (GPS - 1 October 2005)
@@ -5928,10 +5928,10 @@ MY_FLOAT BlitSaw :: tick( void ) · 21 unmodified lines
5928{5928{
5929 // The code below implements the BLIT algorithm of Stilson and5929 // The code below implements the BLIT algorithm of Stilson and
5930 // Smith, followed by a summation and filtering operation to produce5930 // Smith, followed by a summation and filtering operation to produce
5931 // a sawtooth waveform. After experimenting with various approaches5931 // a sawtooth waveform. After experimenting with various approaches
5932 // to calculate the average value of the BLIT over one period, I5932 // to calculate the average value of the BLIT over one period, I
5933 // found that an estimate of C2_ = 1.0 / period (in samples) worked5933 // found that an estimate of C2_ = 1.0 / period (in samples) worked
5934 // most consistently. A "leaky integrator" is then applied to the5934 // most consistently. A "leaky integrator" is then applied to the
5935 // difference of the BLIT output and C2_. (GPS - 1 October 2005)5935 // difference of the BLIT output and C2_. (GPS - 1 October 2005)
5936 5936
5937 // A fully optimized version of this code would replace the two sin 5937 // A fully optimized version of this code would replace the two sin
@@ -5966,12 +5966,12 @@ MY_FLOAT BlitSaw :: tick( void ) · 28 unmodified lines
5966/*! \class BlitSquare5966/*! \class BlitSquare
5967 \brief STK band-limited square wave class.5967 \brief STK band-limited square wave class.
5968 5968
5969 This class generates a band-limited square wave signal. It is5969 This class generates a band-limited square wave signal. It is
5970 derived in part from the approach reported by Stilson and Smith in5970 derived in part from the approach reported by Stilson and Smith in
5971 "Alias-Free Digital Synthesis of Classic Analog Waveforms", 1996.5971 "Alias-Free Digital Synthesis of Classic Analog Waveforms", 1996.
5972 The algorithm implemented in this class uses a SincM function with5972 The algorithm implemented in this class uses a SincM function with
5973 an even M value to achieve a bipolar bandlimited impulse train.5973 an even M value to achieve a bipolar bandlimited impulse train.
5974 This signal is then integrated to achieve a square waveform. The5974 This signal is then integrated to achieve a square waveform. The
5975 integration process has an associated DC offset but that is5975 integration process has an associated DC offset but that is
5976 subtracted off the output signal.5976 subtracted off the output signal.
5977 5977
@@ -5980,7 +5980,7 @@ MY_FLOAT BlitSaw :: tick( void ) · 2 unmodified lines
5980 signal.5980 signal.
5981 5981
5982 If nHarmonics is 0, then the signal will contain all harmonics up5982 If nHarmonics is 0, then the signal will contain all harmonics up
5983 to half the sample rate. Note, however, that this setting may5983 to half the sample rate. Note, however, that this setting may
5984 produce aliasing in the signal when the frequency is changing (no5984 produce aliasing in the signal when the frequency is changing (no
5985 automatic modification of the number of harmonics is performed by5985 automatic modification of the number of harmonics is performed by
5986 the setFrequency() function).5986 the setFrequency() function).
@@ -6017,7 +6017,7 @@ void BlitSquare :: setFrequency( MY_FLOAT frequency ) · 30 unmodified lines
6017#endif6017#endif
6018 6018
6019 // By using an even value of the parameter M, we get a bipolar blit6019 // By using an even value of the parameter M, we get a bipolar blit
6020 // waveform at half the blit frequency. Thus, we need to scale the6020 // waveform at half the blit frequency. Thus, we need to scale the
6021 // frequency value here by 0.5. (GPS, 2006).6021 // frequency value here by 0.5. (GPS, 2006).
6022 p_ = 0.5 * Stk::sampleRate() / frequency;6022 p_ = 0.5 * Stk::sampleRate() / frequency;
6023 rate_ = ONE_PI / p_;6023 rate_ = ONE_PI / p_;
@@ -6283,10 +6283,10 @@ void BlowBotl :: controlChange(int number, MY_FLOAT value) · 259 unmodified lines
6283 6283
6284 In this implementation, the distances between6284 In this implementation, the distances between
6285 the reed/register hole and tonehole/bell are6285 the reed/register hole and tonehole/bell are
6286 fixed. As a result, both the tonehole and6286 fixed. As a result, both the tonehole and
6287 register hole will have variable influence on6287 register hole will have variable influence on
6288 the playing frequency, which is dependent on6288 the playing frequency, which is dependent on
6289 the length of the air column. In addition,6289 the length of the air column. In addition,
6290 the highest playing freqeuency is limited by6290 the highest playing freqeuency is limited by
6291 these fixed lengths.6291 these fixed lengths.
6292 This is a digital waveguide model, making its6292 This is a digital waveguide model, making its
@@ -6599,12 +6599,12 @@ MY_FLOAT BowTabl :: tick(MY_FLOAT input) · 306 unmodified lines
6599 MY_FLOAT sample;6599 MY_FLOAT sample;
6600 sample = input + offSet; // add bias to input6600 sample = input + offSet; // add bias to input
6601 sample *= slope; // then scale it6601 sample *= slope; // then scale it
6602 lastOutput = (MY_FLOAT) fabs((double) sample) + (MY_FLOAT) 0.75;6602 lastOutput = (MY_FLOAT)fabs((double) sample) + (MY_FLOAT) 0.75;
6603 lastOutput = (MY_FLOAT) pow( lastOutput,(MY_FLOAT) -4.0 );6603 lastOutput = (MY_FLOAT)pow( lastOutput,(MY_FLOAT) -4.0 );
6604 6604
6605 // Set minimum friction to 0.06605 // set minimum friction to 0.0
6606 //if (lastOutput < 0.0 ) lastOutput = 0.0;6606 //if (lastOutput < 0.0 ) lastOutput = 0.0;
6607 // Set maximum friction to 1.0.6607 // set maximum friction to 1.0.
6608 if (lastOutput > 1.0 ) lastOutput = (MY_FLOAT) 1.0;6608 if (lastOutput > 1.0 ) lastOutput = (MY_FLOAT) 1.0;
6609 6609
6610 return lastOutput;6610 return lastOutput;
@@ -7515,16 +7515,16 @@ MY_FLOAT *Delay :: tick(MY_FLOAT *vec, unsigned int vectorSize) · 904 unmodified lines
7515 7515
7516 This Delay subclass implements a fractional-7516 This Delay subclass implements a fractional-
7517 length digital delay-line using a first-order7517 length digital delay-line using a first-order
7518 allpass filter. A fixed maximum length7518 allpass filter. A fixed maximum length
7519 of 4095 and a delay of 0.5 is set using the7519 of 4095 and a delay of 0.5 is set using the
7520 default constructor. Alternatively, the7520 default constructor. Alternatively, the
7521 delay and maximum length can be set during7521 delay and maximum length can be set during
7522 instantiation with an overloaded constructor.7522 instantiation with an overloaded constructor.
7523 7523
7524 An allpass filter has unity magnitude gain but7524 An allpass filter has unity magnitude gain but
7525 variable phase delay properties, making it useful7525 variable phase delay properties, making it useful
7526 in achieving fractional delays without affecting7526 in achieving fractional delays without affecting
7527 a signal's frequency magnitude response. In7527 a signal's frequency magnitude response. In
7528 order to achieve a maximally flat phase delay7528 order to achieve a maximally flat phase delay
7529 response, the minimum delay possible in this7529 response, the minimum delay possible in this
7530 implementation is limited to a value of 0.5.7530 implementation is limited to a value of 0.5.
@@ -7664,9 +7664,9 @@ MY_FLOAT DelayA :: tick(MY_FLOAT sample) · 133 unmodified lines
7664 7664
7665 This Delay subclass implements a fractional-7665 This Delay subclass implements a fractional-
7666 length digital delay-line using first-order7666 length digital delay-line using first-order
7667 linear interpolation. A fixed maximum length7667 linear interpolation. A fixed maximum length
7668 of 4095 and a delay of zero is set using the7668 of 4095 and a delay of zero is set using the
7669 default constructor. Alternatively, the7669 default constructor. Alternatively, the
7670 delay and maximum length can be set during7670 delay and maximum length can be set during
7671 instantiation with an overloaded constructor.7671 instantiation with an overloaded constructor.
7672 7672
@@ -7674,7 +7674,7 @@ MY_FLOAT DelayA :: tick(MY_FLOAT sample) · 1 unmodified line
7674 for achieving fractional delay lengths, though7674 for achieving fractional delay lengths, though
7675 it does introduce high-frequency signal7675 it does introduce high-frequency signal
7676 attenuation to varying degrees depending on the7676 attenuation to varying degrees depending on the
7677 fractional delay setting. The use of higher7677 fractional delay setting. The use of higher
7678 order Lagrange interpolators can typically7678 order Lagrange interpolators can typically
7679 improve (minimize) this attenuation characteristic.7679 improve (minimize) this attenuation characteristic.
7680 7680
@@ -7794,9 +7794,9 @@ MY_FLOAT DelayL :: tick(MY_FLOAT sample) · 113 unmodified lines
7794 7794
7795 This class implements a drum sampling7795 This class implements a drum sampling
7796 synthesizer using WvIn objects and one-pole7796 synthesizer using WvIn objects and one-pole
7797 filters. The drum rawwave files are sampled7797 filters. The drum rawwave files are sampled
7798 at 22050 Hz, but will be appropriately7798 at 22050 Hz, but will be appropriately
7799 interpolated for other sample rates. You can7799 interpolated for other sample rates. You can
7800 specify the maximum polyphony (maximum number7800 specify the maximum polyphony (maximum number
7801 of simultaneous voices) via a #define in the7801 of simultaneous voices) via a #define in the
7802 Drummer.h.7802 Drummer.h.
@@ -7807,7 +7807,7 @@ MY_FLOAT DelayL :: tick(MY_FLOAT sample) · 4 unmodified lines
7807 7807
7808#include <math.h>7808#include <math.h>
7809 7809
7810// Not really General MIDI yet. Coming soon.7810// Not really General MIDI yet. Coming soon.
7811unsigned char genMIDIMap[128] =7811unsigned char genMIDIMap[128] =
7812 { 0,0,0,0,0,0,0,0, // 0-77812 { 0,0,0,0,0,0,0,0, // 0-7
7813 0,0,0,0,0,0,0,0, // 8-157813 0,0,0,0,0,0,0,0, // 8-15
@@ -8207,7 +8207,7 @@ MY_FLOAT Envelope :: lastOut(void) const · 393 unmodified lines
8207 8207
8208 The basic Chowning/Stanford FM patent expired8208 The basic Chowning/Stanford FM patent expired
8209 in 1995, but there exist follow-on patents,8209 in 1995, but there exist follow-on patents,
8210 mostly assigned to Yamaha. If you are of the8210 mostly assigned to Yamaha. If you are of the
8211 type who should worry about this (making8211 type who should worry about this (making
8212 money) worry away.8212 money) worry away.
8213 8213
@@ -8436,7 +8436,7 @@ void FM :: controlChange(int number, MY_FLOAT value) · 222 unmodified lines
8436 8436
8437 The basic Chowning/Stanford FM patent expired8437 The basic Chowning/Stanford FM patent expired
8438 in 1995, but there exist follow-on patents,8438 in 1995, but there exist follow-on patents,
8439 mostly assigned to Yamaha. If you are of the8439 mostly assigned to Yamaha. If you are of the
8440 type who should worry about this (making8440 type who should worry about this (making
8441 money) worry away.8441 money) worry away.
8442 8442
@@ -8618,7 +8618,7 @@ void FMVoices :: controlChange(int number, MY_FLOAT value) · 175 unmodified lines
8618 8618
8619 The \e gain parameter is applied at the filter8619 The \e gain parameter is applied at the filter
8620 input and does not affect the coefficient values.8620 input and does not affect the coefficient values.
8621 The default gain value is 1.0. This structure8621 The default gain value is 1.0. This structure
8622 results in one extra multiply per computed sample,8622 results in one extra multiply per computed sample,
8623 but allows easy control of the overall filter gain.8623 but allows easy control of the overall filter gain.
8624 8624
@@ -8849,7 +8849,7 @@ MY_FLOAT *FilterStk :: tick(MY_FLOAT *vec, unsigned int vectorSize) · 224 unmodified lines
8849 8849
8850 This class implements a simple flute8850 This class implements a simple flute
8851 physical model, as discussed by Karjalainen,8851 physical model, as discussed by Karjalainen,
8852 Smith, Waryznyk, etc. The jet model uses8852 Smith, Waryznyk, etc. The jet model uses
8853 a polynomial, a la Cook.8853 a polynomial, a la Cook.
8854 8854
8855 This is a digital waveguide model, making its8855 This is a digital waveguide model, making its
@@ -9103,7 +9103,7 @@ FormSwep :: FormSwep() : BiQuad() · 247 unmodified lines
9103 deltaGain = (MY_FLOAT) 0.0;9103 deltaGain = (MY_FLOAT) 0.0;
9104 deltaFrequency = (MY_FLOAT) 0.0;9104 deltaFrequency = (MY_FLOAT) 0.0;
9105 deltaRadius = (MY_FLOAT) 0.0;9105 deltaRadius = (MY_FLOAT) 0.0;
9106 sweepState = (MY_FLOAT) 0.0;9106 sweepState = (MY_FLOAT) 0.0;
9107 sweepRate = (MY_FLOAT) 0.002;9107 sweepRate = (MY_FLOAT) 0.002;
9108 dirty = false;9108 dirty = false;
9109 this->clear();9109 this->clear();
@@ -9215,7 +9215,7 @@ MY_FLOAT *FormSwep :: tick(MY_FLOAT *vec, unsigned int vectorSize) · 105 unmodified lines
9215 9215
9216 The basic Chowning/Stanford FM patent expired9216 The basic Chowning/Stanford FM patent expired
9217 in 1995, but there exist follow-on patents,9217 in 1995, but there exist follow-on patents,
9218 mostly assigned to Yamaha. If you are of the9218 mostly assigned to Yamaha. If you are of the
9219 type who should worry about this (making9219 type who should worry about this (making
9220 money) worry away.9220 money) worry away.
9221 9221
@@ -9369,7 +9369,7 @@ void Instrmnt :: controlChange(int number, MY_FLOAT value) · 147 unmodified lines
9369 This class is derived from the CLM JCRev9369 This class is derived from the CLM JCRev
9370 function, which is based on the use of9370 function, which is based on the use of
9371 networks of simple allpass and comb delay9371 networks of simple allpass and comb delay
9372 filters. This class implements three series9372 filters. This class implements three series
9373 allpass units, followed by four parallel comb9373 allpass units, followed by four parallel comb
9374 filters, and two decorrelation delay lines in9374 filters, and two decorrelation delay lines in
9375 parallel at the output.9375 parallel at the output.
@@ -9537,7 +9537,7 @@ MY_FLOAT JetTabl :: tick( MY_FLOAT input ) · 161 unmodified lines
9537 // Perform "table lookup" using a polynomial9537 // Perform "table lookup" using a polynomial
9538 // calculation (x^3 - x), which approximates9538 // calculation (x^3 - x), which approximates
9539 // the jet sigmoid behavior.9539 // the jet sigmoid behavior.
9540 lastOutput = input * (input * input - (MY_FLOAT) 1.0);9540 lastOutput = input * (input * input - (MY_FLOAT)1.0);
9541 9541
9542 // Saturate at +/- 1.0.9542 // Saturate at +/- 1.0.
9543 if (lastOutput > 1.0) 9543 if (lastOutput > 1.0)
@@ -9568,8 +9568,8 @@ MY_FLOAT *JetTabl :: tick(MY_FLOAT *vec, unsigned int vectorSize) · 24 unmodified lines
9568 Stanford University, Yamaha, and others.9568 Stanford University, Yamaha, and others.
9569 Commuted Synthesis, in particular, is covered9569 Commuted Synthesis, in particular, is covered
9570 by patents, granted, pending, and/or9570 by patents, granted, pending, and/or
9571 applied-for. All are assigned to the Board of9571 applied-for. All are assigned to the Board of
9572 Trustees, Stanford University. For9572 Trustees, Stanford University. For
9573 information, contact the Office of Technology9573 information, contact the Office of Technology
9574 Licensing, Stanford University.9574 Licensing, Stanford University.
9575 9575
@@ -9758,7 +9758,7 @@ void Mandolin :: controlChange(int number, MY_FLOAT value) · 182 unmodified lines
9758 9758
9759 This class implements a rectilinear,9759 This class implements a rectilinear,
9760 two-dimensional digital waveguide mesh9760 two-dimensional digital waveguide mesh
9761 structure. For details, see Van Duyne and9761 structure. For details, see Van Duyne and
9762 Smith, "Physical Modeling with the 2-D Digital9762 Smith, "Physical Modeling with the 2-D Digital
9763 Waveguide Mesh", Proceedings of the 19939763 Waveguide Mesh", Proceedings of the 1993
9764 International Computer Music Conference.9764 International Computer Music Conference.
@@ -10041,7 +10041,7 @@ MY_FLOAT Mesh2D :: tick0() · 276 unmodified lines
10041 } 10041 }
10042 10042
10043 // Loop over velocity-junction boundary faces, update edge10043 // Loop over velocity-junction boundary faces, update edge
10044 // reflections, with filtering. We're only filtering on one x and y10044 // reflections, with filtering. We're only filtering on one x and y
10045 // edge here and even this could be made much sparser.10045 // edge here and even this could be made much sparser.
10046 for (y=0; y<NY-1; y++) {10046 for (y=0; y<NY-1; y++) {
10047 vxp1[0][y] = filterY[y]->tick(vxm[0][y]);10047 vxp1[0][y] = filterY[y]->tick(vxm[0][y]);
@@ -10052,9 +10052,9 @@ MY_FLOAT Mesh2D :: tick0() · 4 unmodified lines
10052 vym1[x][NY-1] = vyp[x][NY-1];10052 vym1[x][NY-1] = vyp[x][NY-1];
10053 }10053 }
10054 10054
10055 // Output = sum of outgoing waves at far corner. Note that the last10055 // Output = sum of outgoing waves at far corner. Note that the last
10056 // index in each coordinate direction is used only with the other10056 // index in each coordinate direction is used only with the other
10057 // coordinate indices at their next-to-last values. This is because10057 // coordinate indices at their next-to-last values. This is because
10058 // the "unit strings" attached to each velocity node to terminate10058 // the "unit strings" attached to each velocity node to terminate
10059 // the mesh are not themselves connected together.10059 // the mesh are not themselves connected together.
10060 outsamp = vxp[NX-1][NY-2] + vyp[NX-2][NY-1];10060 outsamp = vxp[NX-1][NY-2] + vyp[NX-2][NY-1];
@@ -10092,7 +10092,7 @@ MY_FLOAT Mesh2D :: tick1() · 31 unmodified lines
10092 }10092 }
10093 10093
10094 // Loop over velocity-junction boundary faces, update edge10094 // Loop over velocity-junction boundary faces, update edge
10095 // reflections, with filtering. We're only filtering on one x and y10095 // reflections, with filtering. We're only filtering on one x and y
10096 // edge here and even this could be made much sparser.10096 // edge here and even this could be made much sparser.
10097 for (y=0; y<NY-1; y++) {10097 for (y=0; y<NY-1; y++) {
10098 vxp[0][y] = filterY[y]->tick(vxm1[0][y]);10098 vxp[0][y] = filterY[y]->tick(vxm1[0][y]);
@@ -10375,7 +10375,7 @@ MY_FLOAT Modal :: tick() · 276 unmodified lines
10375 \brief STK resonant bar instrument class.10375 \brief STK resonant bar instrument class.
10376 10376
10377 This class implements a number of different10377 This class implements a number of different
10378 struck bar instruments. It inherits from the10378 struck bar instruments. It inherits from the
10379 Modal class.10379 Modal class.
10380 10380
10381 Control Change Numbers: 10381 Control Change Numbers:
@@ -10461,9 +10461,9 @@ void ModalBar :: setStrikePosition(MY_FLOAT position) · 79 unmodified lines
10461 this->setModeGain(0, 0.12 * temp);10461 this->setModeGain(0, 0.12 * temp);
10462 10462
10463 temp = sin(0.05 + (3.9 * temp2));10463 temp = sin(0.05 + (3.9 * temp2));
10464 this->setModeGain(1,(MY_FLOAT) -0.03 * temp);10464 this->setModeGain(1, (MY_FLOAT)-0.03 * temp);
10465 10465
10466 temp = (MY_FLOAT) sin(-0.05 + (11 * temp2));10466 temp = (MY_FLOAT)sin(-0.05 + (11 * temp2));
10467 this->setModeGain(2,(MY_FLOAT) 0.11 * temp);10467 this->setModeGain(2,(MY_FLOAT) 0.11 * temp);
10468}10468}
10469 10469
@@ -10606,7 +10606,7 @@ Modulate :: ~Modulate() · 136 unmodified lines
10606 10606
10607void Modulate :: reset()10607void Modulate :: reset()
10608{10608{
10609 lastOutput = (MY_FLOAT) 0.0;10609 lastOutput = (MY_FLOAT)0.0;
10610}10610}
10611 10611
10612void Modulate :: setVibratoRate(MY_FLOAT aRate)10612void Modulate :: setVibratoRate(MY_FLOAT aRate)
@@ -10821,7 +10821,7 @@ void Moog :: controlChange(int number, MY_FLOAT value) · 208 unmodified lines
10821 This class is derived from the CLM NRev10821 This class is derived from the CLM NRev
10822 function, which is based on the use of10822 function, which is based on the use of
10823 networks of simple allpass and comb delay10823 networks of simple allpass and comb delay
10824 filters. This particular arrangement consists10824 filters. This particular arrangement consists
10825 of 6 comb filters in parallel, followed by 310825 of 6 comb filters in parallel, followed by 3
10826 allpass filters, a lowpass filter, and another10826 allpass filters, a lowpass filter, and another
10827 allpass in series, followed by two allpass10827 allpass in series, followed by two allpass
@@ -10944,7 +10944,7 @@ MY_FLOAT NRev :: tick(MY_FLOAT input) · 116 unmodified lines
10944 \brief STK noise generator.10944 \brief STK noise generator.
10945 10945
10946 Generic random number generation using the10946 Generic random number generation using the
10947 C rand() function. The quality of the rand()10947 C rand() function. The quality of the rand()
10948 function varies from one OS to another.10948 function varies from one OS to another.
10949 10949
10950 by Perry R. Cook and Gary P. Scavone, 1995 - 2002.10950 by Perry R. Cook and Gary P. Scavone, 1995 - 2002.
@@ -11005,7 +11005,7 @@ MY_FLOAT Noise :: lastOut() const · 54 unmodified lines
11005 \brief STK one-pole filter class.11005 \brief STK one-pole filter class.
11006 11006
11007 This protected Filter subclass implements11007 This protected Filter subclass implements
11008 a one-pole digital filter. A method is11008 a one-pole digital filter. A method is
11009 provided for setting the pole position along11009 provided for setting the pole position along
11010 the real axis of the z-plane while maintaining11010 the real axis of the z-plane while maintaining
11011 a constant peak filter gain.11011 a constant peak filter gain.
@@ -11034,7 +11034,7 @@ OnePole :: OnePole(MY_FLOAT thePole) : FilterStk() · 22 unmodified lines
11034 B = (MY_FLOAT) (1.0 + thePole);11034 B = (MY_FLOAT) (1.0 + thePole);
11035 11035
11036 A[1] = -thePole;11036 A[1] = -thePole;
11037 FilterStk::setCoefficients( 1, &B, 2, A );11037 FilterStk::setCoefficients( 1, &B, 2, A );
11038}11038}
11039 11039
11040OnePole :: ~OnePole() 11040OnePole :: ~OnePole()
@@ -11106,7 +11106,7 @@ MY_FLOAT *OnePole :: tick(MY_FLOAT *vec, unsigned int vectorSize) · 65 unmodified lines
11106 \brief STK one-zero filter class.11106 \brief STK one-zero filter class.
11107 11107
11108 This protected Filter subclass implements11108 This protected Filter subclass implements
11109 a one-zero digital filter. A method is11109 a one-zero digital filter. A method is
11110 provided for setting the zero position11110 provided for setting the zero position
11111 along the real axis of the z-plane while11111 along the real axis of the z-plane while
11112 maintaining a constant filter gain.11112 maintaining a constant filter gain.
@@ -11207,7 +11207,7 @@ MY_FLOAT *OneZero :: tick(MY_FLOAT *vec, unsigned int vectorSize) · 94 unmodified lines
11207 Stanford/CCRMA reverbs (NRev, KipRev), which11207 Stanford/CCRMA reverbs (NRev, KipRev), which
11208 were based on the Chowning/Moorer/Schroeder11208 were based on the Chowning/Moorer/Schroeder
11209 reverberators using networks of simple allpass11209 reverberators using networks of simple allpass
11210 and comb delay filters. This class implements11210 and comb delay filters. This class implements
11211 two series allpass units and two parallel comb11211 two series allpass units and two parallel comb
11212 filters.11212 filters.
11213 11213
@@ -11323,7 +11323,7 @@ MY_FLOAT PRCRev :: tick(MY_FLOAT input) · 109 unmodified lines
11323 11323
11324 The basic Chowning/Stanford FM patent expired11324 The basic Chowning/Stanford FM patent expired
11325 in 1995, but there exist follow-on patents,11325 in 1995, but there exist follow-on patents,
11326 mostly assigned to Yamaha. If you are of the11326 mostly assigned to Yamaha. If you are of the
11327 type who should worry about this (making11327 type who should worry about this (making
11328 money) worry away.11328 money) worry away.
11329 11329
@@ -11503,7 +11503,7 @@ const MY_FLOAT Phonemes :: phonemeParameters[32][4][3] = · 173 unmodified lines
11503 { 895, 0.900, -3},11503 { 895, 0.900, -3},
11504 {2556, 0.950, -17},11504 {2556, 0.950, -17},
11505 {3070, 0.910, -20}},11505 {3070, 0.910, -20}},
11506 { { 637, 0.910, 0}, // ohh (bone) NOTE:: same as aww (bought)11506 { { 637, 0.910, 0}, // ohh (bone) NOTE: same as aww (bought)
11507 { 895, 0.900, -3},11507 { 895, 0.900, -3},
11508 {2556, 0.950, -17},11508 {2556, 0.950, -17},
11509 {3070, 0.910, -20}},11509 {3070, 0.910, -20}},
@@ -11793,7 +11793,7 @@ MY_FLOAT *PitShift :: tick(MY_FLOAT *vec, unsigned int vectorSize) · 283 unmodified lines
11793 Smith, and others.11793 Smith, and others.
11794 11794
11795 PluckTwo is an abstract class, with no excitation11795 PluckTwo is an abstract class, with no excitation
11796 specified. Therefore, it can't be directly11796 specified. Therefore, it can't be directly
11797 instantiated.11797 instantiated.
11798 11798
11799 This is a digital waveguide model, making its11799 This is a digital waveguide model, making its
@@ -12040,9 +12040,9 @@ MY_FLOAT Plucked :: tick() · 240 unmodified lines
12040 \brief STK one-pole, one-zero filter class.12040 \brief STK one-pole, one-zero filter class.
12041 12041
12042 This protected Filter subclass implements12042 This protected Filter subclass implements
12043 a one-pole, one-zero digital filter. A12043 a one-pole, one-zero digital filter. A
12044 method is provided for creating an allpass12044 method is provided for creating an allpass
12045 filter with a given coefficient. Another12045 filter with a given coefficient. Another
12046 method is provided to create a DC blocking filter.12046 method is provided to create a DC blocking filter.
12047 12047
12048 by Perry R. Cook and Gary P. Scavone, 1995 - 2002.12048 by Perry R. Cook and Gary P. Scavone, 1995 - 2002.
@@ -12435,7 +12435,7 @@ bool Reverb :: isPrime(int number) · 386 unmodified lines
12435 12435
12436 The basic Chowning/Stanford FM patent expired12436 The basic Chowning/Stanford FM patent expired
12437 in 1995, but there exist follow-on patents,12437 in 1995, but there exist follow-on patents,
12438 mostly assigned to Yamaha. If you are of the12438 mostly assigned to Yamaha. If you are of the
12439 type who should worry about this (making12439 type who should worry about this (making
12440 money) worry away.12440 money) worry away.
12441 12441
@@ -12528,7 +12528,7 @@ MY_FLOAT Rhodey :: tick() · 86 unmodified lines
12528 \brief STK SKINI parsing class12528 \brief STK SKINI parsing class
12529 12529
12530 This class parses SKINI formatted text12530 This class parses SKINI formatted text
12531 messages. It can be used to parse individual12531 messages. It can be used to parse individual
12532 messages or it can be passed an entire file.12532 messages or it can be passed an entire file.
12533 The file specification is Perry's and his12533 The file specification is Perry's and his
12534 alone, but it's all text so it shouldn't be to12534 alone, but it's all text so it shouldn't be to
@@ -12537,7 +12537,7 @@ MY_FLOAT Rhodey :: tick() · 2 unmodified lines
12537 SKINI (Synthesis toolKit Instrument Network12537 SKINI (Synthesis toolKit Instrument Network
12538 Interface) is like MIDI, but allows for12538 Interface) is like MIDI, but allows for
12539 floating-point control changes, note numbers,12539 floating-point control changes, note numbers,
12540 etc. The following example causes a sharp12540 etc. The following example causes a sharp
12541 middle C to be played with a velocity of 111.132:12541 middle C to be played with a velocity of 111.132:
12542 12542
12543 noteOn 60.01 111.1312543 noteOn 60.01 111.13
@@ -12552,7 +12552,7 @@ MY_FLOAT Rhodey :: tick() · 8 unmodified lines
12552#include <stdlib.h>12552#include <stdlib.h>
12553 12553
12554// Constructor for use when parsing SKINI strings (coming over socket12554// Constructor for use when parsing SKINI strings (coming over socket
12555// for example. Use parseThis() method with string pointer.12555// for example. Use parseThis() method with string pointer.
12556SKINI :: SKINI()12556SKINI :: SKINI()
12557{12557{
12558}12558}
@@ -12938,19 +12938,19 @@ MY_FLOAT Sampler :: tick() · 379 unmodified lines
12938 12938
12939 This class implements a "hybrid" digital12939 This class implements a "hybrid" digital
12940 waveguide instrument that can generate a12940 waveguide instrument that can generate a
12941 variety of wind-like sounds. It has also been12941 variety of wind-like sounds. It has also been
12942 referred to as the "blowed string" model. The12942 referred to as the "blowed string" model. The
12943 waveguide section is essentially that of a12943 waveguide section is essentially that of a
12944 string, with one rigid and one lossy12944 string, with one rigid and one lossy
12945 termination. The non-linear function is a12945 termination. The non-linear function is a
12946 reed table. The string can be "blown" at any12946 reed table. The string can be "blown" at any
12947 point between the terminations, though just as12947 point between the terminations, though just as
12948 with strings, it is impossible to excite the12948 with strings, it is impossible to excite the
12949 system at either end. If the excitation is12949 system at either end. If the excitation is
12950 placed at the string mid-point, the sound is12950 placed at the string mid-point, the sound is
12951 that of a clarinet. At points closer to the12951 that of a clarinet. At points closer to the
12952 "bridge", the sound is closer to that of a12952 "bridge", the sound is closer to that of a
12953 saxophone. See Scavone (2002) for more details.12953 saxophone. See Scavone (2002) for more details.
12954 12954
12955 This is a digital waveguide model, making its12955 This is a digital waveguide model, making its
12956 use possibly subject to patents held by Stanford12956 use possibly subject to patents held by Stanford
@@ -13167,7 +13167,7 @@ void Saxofony :: controlChange(int number, MY_FLOAT value) · 210 unmodified lines
13167 PhISEM (Physically Informed Stochastic Event13167 PhISEM (Physically Informed Stochastic Event
13168 Modeling) is an algorithmic approach for13168 Modeling) is an algorithmic approach for
13169 simulating collisions of multiple independent13169 simulating collisions of multiple independent
13170 sound producing objects. This class is a13170 sound producing objects. This class is a
13171 meta-model that can simulate a Maraca, Sekere,13171 meta-model that can simulate a Maraca, Sekere,
13172 Cabasa, Bamboo Wind Chimes, Water Drops,13172 Cabasa, Bamboo Wind Chimes, Water Drops,
13173 Tambourine, Sleighbells, and a Guiro.13173 Tambourine, Sleighbells, and a Guiro.
@@ -13175,7 +13175,7 @@ void Saxofony :: controlChange(int number, MY_FLOAT value) · 1 unmodified line
13175 PhOLIES (Physically-Oriented Library of13175 PhOLIES (Physically-Oriented Library of
13176 Imitated Environmental Sounds) is a similar13176 Imitated Environmental Sounds) is a similar
13177 approach for the synthesis of environmental13177 approach for the synthesis of environmental
13178 sounds. This class implements simulations of13178 sounds. This class implements simulations of
13179 breaking sticks, crunchy snow (or not), a13179 breaking sticks, crunchy snow (or not), a
13180 wrench, sandpaper, and more.13180 wrench, sandpaper, and more.
13181 13181
@@ -13298,11 +13298,11 @@ MY_FLOAT noise_tick() // Return random MY_FLOAT float between -1.0 and 1.0 · 116 unmodified lines
13298#define WUTR_SYSTEM_DECAY 0.99613298#define WUTR_SYSTEM_DECAY 0.996
13299#define WUTR_GAIN 1.013299#define WUTR_GAIN 1.0
13300#define WUTR_NUM_SOURCES 1013300#define WUTR_NUM_SOURCES 10
13301#define WUTR_CENTER_FREQ0 450.013301#define WUTR_CENTER_FREQ0 450.0
13302#define WUTR_CENTER_FREQ1 600.013302#define WUTR_CENTER_FREQ1 600.0
13303#define WUTR_CENTER_FREQ2 750.0 13303#define WUTR_CENTER_FREQ2 750.0
13304#define WUTR_RESON 0.998513304#define WUTR_RESON 0.9985
13305#define WUTR_FREQ_SWEEP 1.000113305#define WUTR_FREQ_SWEEP 1.0001
13306 13306
13307// Tambourine13307// Tambourine
13308#define TAMB_SOUND_DECAY 0.9513308#define TAMB_SOUND_DECAY 0.95
@@ -13312,7 +13312,7 @@ MY_FLOAT noise_tick() // Return random MY_FLOAT float between -1.0 and 1.0 · 3 unmodified lines
13312#define TAMB_SHELL_FREQ 230013312#define TAMB_SHELL_FREQ 2300
13313#define TAMB_SHELL_GAIN 0.113313#define TAMB_SHELL_GAIN 0.1
13314#define TAMB_SHELL_RESON 0.9613314#define TAMB_SHELL_RESON 0.96
13315#define TAMB_CYMB_FREQ1 560013315#define TAMB_CYMB_FREQ1 5600
13316#define TAMB_CYMB_FREQ2 810013316#define TAMB_CYMB_FREQ2 8100
13317#define TAMB_CYMB_RESON 0.9913317#define TAMB_CYMB_RESON 0.99
13318 13318
@@ -13332,18 +13332,18 @@ MY_FLOAT noise_tick() // Return random MY_FLOAT float between -1.0 and 1.0 · 13 unmodified lines
13332#define GUIR_SOUND_DECAY 0.9513332#define GUIR_SOUND_DECAY 0.95
13333#define GUIR_GAIN 10.013333#define GUIR_GAIN 10.0
13334#define GUIR_NUM_PARTS 12813334#define GUIR_NUM_PARTS 128
13335#define GUIR_GOURD_FREQ 2500.013335#define GUIR_GOURD_FREQ 2500.0
13336#define GUIR_GOURD_RESON 0.9713336#define GUIR_GOURD_RESON 0.97
13337#define GUIR_GOURD_FREQ2 4000.013337#define GUIR_GOURD_FREQ2 4000.0
13338#define GUIR_GOURD_RESON2 0.9713338#define GUIR_GOURD_RESON2 0.97
13339 13339
13340// Wrench13340// Wrench
13341#define WRENCH_SOUND_DECAY 0.9513341#define WRENCH_SOUND_DECAY 0.95
13342#define WRENCH_GAIN 513342#define WRENCH_GAIN 5
13343#define WRENCH_NUM_PARTS 12813343#define WRENCH_NUM_PARTS 128
13344#define WRENCH_FREQ 3200.013344#define WRENCH_FREQ 3200.0
13345#define WRENCH_RESON 0.9913345#define WRENCH_RESON 0.99
13346#define WRENCH_FREQ2 8000.013346#define WRENCH_FREQ2 8000.0
13347#define WRENCH_RESON2 0.99213347#define WRENCH_RESON2 0.992
13348 13348
13349// Cokecan13349// Cokecan
@@ -13352,7 +13352,7 @@ MY_FLOAT noise_tick() // Return random MY_FLOAT float between -1.0 and 1.0 · 2 unmodified lines
13352#define COKECAN_GAIN 0.813352#define COKECAN_GAIN 0.8
13353#define COKECAN_NUM_PARTS 4813353#define COKECAN_NUM_PARTS 48
13354#define COKECAN_HELMFREQ 37013354#define COKECAN_HELMFREQ 370
13355#define COKECAN_HELM_RES 0.9913355#define COKECAN_HELM_RES 0.99
13356#define COKECAN_METLFREQ0 102513356#define COKECAN_METLFREQ0 1025
13357#define COKECAN_METLFREQ1 142413357#define COKECAN_METLFREQ1 1424
13358#define COKECAN_METLFREQ2 214913358#define COKECAN_METLFREQ2 2149
@@ -14441,9 +14441,9 @@ void Simple :: controlChange(int number, MY_FLOAT value) · 1082 unmodified lines
14441 14441
14442 This class contains all that is needed to make14442 This class contains all that is needed to make
14443 a pitched musical sound, like a simple voice14443 a pitched musical sound, like a simple voice
14444 or violin. In general, it will not be used14444 or violin. In general, it will not be used
14445 alone because of munchkinification effects14445 alone because of munchkinification effects
14446 from pitch shifting. It will be used as an14446 from pitch shifting. It will be used as an
14447 excitation source for other instruments.14447 excitation source for other instruments.
14448 14448
14449 by Perry R. Cook and Gary P. Scavone, 1995 - 2002.14449 by Perry R. Cook and Gary P. Scavone, 1995 - 2002.
@@ -15021,7 +15021,7 @@ void StifKarp :: controlChange(int number, MY_FLOAT value) · 571 unmodified lines
15021 15021
15022 Nearly all STK classes inherit from this class.15022 Nearly all STK classes inherit from this class.
15023 The global sample rate can be queried and15023 The global sample rate can be queried and
15024 modified via Stk. In addition, this class15024 modified via Stk. In addition, this class
15025 provides error handling and byte-swapping15025 provides error handling and byte-swapping
15026 functions.15026 functions.
15027 15027
@@ -15177,7 +15177,7 @@ void StkError :: printMessage(void) · 149 unmodified lines
15177 \brief STK sub-sampled noise generator.15177 \brief STK sub-sampled noise generator.
15178 15178
15179 Generates a new random number every "rate" ticks15179 Generates a new random number every "rate" ticks
15180 using the C rand() function. The quality of the15180 using the C rand() function. The quality of the
15181 rand() function varies from one OS to another.15181 rand() function varies from one OS to another.
15182 15182
15183 by Perry R. Cook and Gary P. Scavone, 1995 - 2002.15183 by Perry R. Cook and Gary P. Scavone, 1995 - 2002.
@@ -15220,7 +15220,7 @@ MY_FLOAT SubNoise :: tick() · 36 unmodified lines
15220 15220
15221 This class loads a table of floating-point15221 This class loads a table of floating-point
15222 doubles, which are assumed to be in big-endian15222 doubles, which are assumed to be in big-endian
15223 format. Linear interpolation is performed for15223 format. Linear interpolation is performed for
15224 fractional lookup indexes.15224 fractional lookup indexes.
15225 15225
15226 An StkError will be thrown if the table file15226 An StkError will be thrown if the table file
@@ -15343,7 +15343,7 @@ MY_FLOAT *Table :: tick(MY_FLOAT *vec, unsigned int vectorSize) · 116 unmodified lines
15343 15343
15344 The basic Chowning/Stanford FM patent expired15344 The basic Chowning/Stanford FM patent expired
15345 in 1995, but there exist follow-on patents,15345 in 1995, but there exist follow-on patents,
15346 mostly assigned to Yamaha. If you are of the15346 mostly assigned to Yamaha. If you are of the
15347 type who should worry about this (making15347 type who should worry about this (making
15348 money) worry away.15348 money) worry away.
15349 15349
@@ -15427,7 +15427,7 @@ MY_FLOAT TubeBell :: tick() · 77 unmodified lines
15427 \brief STK two-pole filter class.15427 \brief STK two-pole filter class.
15428 15428
15429 This protected Filter subclass implements15429 This protected Filter subclass implements
15430 a two-pole digital filter. A method is15430 a two-pole digital filter. A method is
15431 provided for creating a resonance in the15431 provided for creating a resonance in the
15432 frequency response while maintaining a nearly15432 frequency response while maintaining a nearly
15433 constant filter gain.15433 constant filter gain.
@@ -15526,7 +15526,7 @@ MY_FLOAT *TwoPole :: tick(MY_FLOAT *vec, unsigned int vectorSize) · 92 unmodified lines
15526 \brief STK two-zero filter class.15526 \brief STK two-zero filter class.
15527 15527
15528 This protected Filter subclass implements15528 This protected Filter subclass implements
15529 a two-zero digital filter. A method is15529 a two-zero digital filter. A method is
15530 provided for creating a "notch" in the15530 provided for creating a "notch" in the
15531 frequency response while maintaining a15531 frequency response while maintaining a
15532 constant filter gain.15532 constant filter gain.
@@ -15699,7 +15699,7 @@ void Vector3D :: setZ(double aval) · 166 unmodified lines
15699 15699
15700 Measured formant data is included, and enough15700 Measured formant data is included, and enough
15701 data is there to support either parallel or15701 data is there to support either parallel or
15702 cascade synthesis. In the floating point case15702 cascade synthesis. In the floating point case
15703 cascade synthesis is the most natural so15703 cascade synthesis is the most natural so
15704 that's what you'll find here.15704 that's what you'll find here.
15705 15705
@@ -15955,14 +15955,14 @@ void VoicForm :: controlChange(int number, MY_FLOAT value) · 249 unmodified lines
15955 \brief STK voice manager class.15955 \brief STK voice manager class.
15956 15956
15957 This class can be used to manage a group of15957 This class can be used to manage a group of
15958 STK instrument classes. Individual voices can15958 STK instrument classes. Individual voices can
15959 be controlled via unique note tags.15959 be controlled via unique note tags.
15960 Instrument groups can be controlled by channel15960 Instrument groups can be controlled by channel
15961 number.15961 number.
15962 15962
15963 A previously constructed STK instrument class15963 A previously constructed STK instrument class
15964 is linked with a voice manager using the15964 is linked with a voice manager using the
15965 addInstrument() function. An optional channel15965 addInstrument() function. An optional channel
15966 number argument can be specified to the15966 number argument can be specified to the
15967 addInstrument() function as well (default15967 addInstrument() function as well (default
15968 channel = 0). The voice manager does not15968 channel = 0). The voice manager does not
@@ -15971,10 +15971,10 @@ void VoicForm :: controlChange(int number, MY_FLOAT value) · 2 unmodified lines
15971 deallocate all instruments.15971 deallocate all instruments.
15972 15972
15973 The tick() function returns the mix of all15973 The tick() function returns the mix of all
15974 sounding voices. Each noteOn returns a unique15974 sounding voices. Each noteOn returns a unique
15975 tag (credits to the NeXT MusicKit), so you can15975 tag (credits to the NeXT MusicKit), so you can
15976 send control changes to specific voices within15976 send control changes to specific voices within
15977 an ensemble. Alternately, control changes can15977 an ensemble. Alternately, control changes can
15978 be sent to all voices on a given channel.15978 be sent to all voices on a given channel.
15979 15979
15980 by Perry R. Cook and Gary P. Scavone, 1995 - 2002.15980 by Perry R. Cook and Gary P. Scavone, 1995 - 2002.
@@ -16223,7 +16223,7 @@ MY_FLOAT Voicer :: lastOutRight() const · 242 unmodified lines
16223 audio file looping functionality.16223 audio file looping functionality.
16224 16224
16225 WaveLoop supports multi-channel data in16225 WaveLoop supports multi-channel data in
16226 interleaved format. It is important to16226 interleaved format. It is important to
16227 distinguish the tick() methods, which return16227 distinguish the tick() methods, which return
16228 samples produced by averaging across sample16228 samples produced by averaging across sample
16229 frames, from the tickFrame() methods, which16229 frames, from the tickFrame() methods, which
@@ -16546,7 +16546,7 @@ MY_FLOAT Whistle :: tick() · 316 unmodified lines
16546 temp = -temp; // We know (hope) it's inside, just how much??16546 temp = -temp; // We know (hope) it's inside, just how much??
16547 if (temp < (PEA_RADIUS * 1.25)) { 16547 if (temp < (PEA_RADIUS * 1.25)) {
16548 pea->getVelocity(tempVector); // This is the can/pea collision16548 pea->getVelocity(tempVector); // This is the can/pea collision
16549 tempX = tempVectorP->getX(); // calculation. Could probably16549 tempX = tempVectorP->getX(); // calculation. Could probably
16550 tempY = tempVectorP->getY(); // simplify using tables, etc.16550 tempY = tempVectorP->getY(); // simplify using tables, etc.
16551 phi = -atan2(tempY,tempX);16551 phi = -atan2(tempY,tempX);
16552 cosphi = cos(phi);16552 cosphi = cos(phi);
@@ -16649,7 +16649,7 @@ void Whistle :: controlChange(int number, MY_FLOAT value) · 96 unmodified lines
16649 16649
16650 The basic Chowning/Stanford FM patent expired16650 The basic Chowning/Stanford FM patent expired
16651 in 1995, but there exist follow-on patents,16651 in 1995, but there exist follow-on patents,
16652 mostly assigned to Yamaha. If you are of the16652 mostly assigned to Yamaha. If you are of the
16653 type who should worry about this (making16653 type who should worry about this (making
16654 money) worry away.16654 money) worry away.
16655 16655
@@ -16762,24 +16762,24 @@ void Wurley :: controlChange( int which, MY_FLOAT value ) · 106 unmodified lines
16762 \brief STK audio data input base class.16762 \brief STK audio data input base class.
16763 16763
16764 This class provides input support for various16764 This class provides input support for various
16765 audio file formats. It also serves as a base16765 audio file formats. It also serves as a base
16766 class for "realtime" streaming subclasses.16766 class for "realtime" streaming subclasses.
16767 16767
16768 WvIn loads the contents of an audio file for16768 WvIn loads the contents of an audio file for
16769 subsequent output. Linear interpolation is16769 subsequent output. Linear interpolation is
16770 used for fractional "read rates".16770 used for fractional "read rates".
16771 16771
16772 WvIn supports multi-channel data in interleaved16772 WvIn supports multi-channel data in interleaved
16773 format. It is important to distinguish the16773 format. It is important to distinguish the
16774 tick() methods, which return samples produced16774 tick() methods, which return samples produced
16775 by averaging across sample frames, from the 16775 by averaging across sample frames, from the
16776 tickFrame() methods, which return pointers to16776 tickFrame() methods, which return pointers to
16777 multi-channel sample frames. For single-channel16777 multi-channel sample frames. For single-channel
16778 data, these methods return equivalent values.16778 data, these methods return equivalent values.
16779 16779
16780 Small files are completely read into local memory16780 Small files are completely read into local memory
16781 during instantiation. Large files are read16781 during instantiation. Large files are read
16782 incrementally from disk. The file size threshold16782 incrementally from disk. The file size threshold
16783 and the increment size values are defined in16783 and the increment size values are defined in
16784 WvIn.h.16784 WvIn.h.
16785 16785
@@ -16787,7 +16787,7 @@ void Wurley :: controlChange( int which, MY_FLOAT value ) · 1 unmodified line
16787 MAT-file (Matlab), and STK RAW file formats.16787 MAT-file (Matlab), and STK RAW file formats.
16788 Signed integer (8-, 16-, and 32-bit) and floating-16788 Signed integer (8-, 16-, and 32-bit) and floating-
16789 point (32- and 64-bit) data types are supported.16789 point (32- and 64-bit) data types are supported.
16790 Uncompressed data types are not supported. If16790 Uncompressed data types are not supported. If
16791 using MAT-files, data should be saved in an array16791 using MAT-files, data should be saved in an array
16792 with each data channel filling a matrix row.16792 with each data channel filling a matrix row.
16793 16793
@@ -17319,7 +17319,7 @@ if( little_endian ) · 525 unmodified lines
17319if( little_endian )17319if( little_endian )
17320 swap16((unsigned char *)&temp);17320 swap16((unsigned char *)&temp);
17321 17321
17322 // Get file sample rate from the header. For AIFF files, this value17322 // Get file sample rate from the header. For AIFF files, this value
17323 // is stored in a 10-byte, IEEE Standard 754 floating point number,17323 // is stored in a 10-byte, IEEE Standard 754 floating point number,
17324 // so we need to convert it first.17324 // so we need to convert it first.
17325 unsigned char srate[10];17325 unsigned char srate[10];
@@ -17794,12 +17794,12 @@ MY_FLOAT *WvIn :: tickFrame(MY_FLOAT *frameVector, unsigned int frames) · 468 unmodified lines
17794 \brief STK audio data output base class.17794 \brief STK audio data output base class.
17795 17795
17796 This class provides output support for various17796 This class provides output support for various
17797 audio file formats. It also serves as a base17797 audio file formats. It also serves as a base
17798 class for "realtime" streaming subclasses.17798 class for "realtime" streaming subclasses.
17799 17799
17800 WvOut writes samples to an audio file. It17800 WvOut writes samples to an audio file. It
17801 supports multi-channel data in interleaved17801 supports multi-channel data in interleaved
17802 format. It is important to distinguish the17802 format. It is important to distinguish the
17803 tick() methods, which output single samples17803 tick() methods, which output single samples
17804 to all channels in a sample frame, from the17804 to all channels in a sample frame, from the
17805 tickFrame() method, which takes a pointer17805 tickFrame() method, which takes a pointer
@@ -17807,14 +17807,14 @@ MY_FLOAT *WvIn :: tickFrame(MY_FLOAT *frameVector, unsigned int frames) · 1 unmodified line
17807 17807
17808 WvOut currently supports WAV, AIFF, AIFC, SND17808 WvOut currently supports WAV, AIFF, AIFC, SND
17809 (AU), MAT-file (Matlab), and STK RAW file17809 (AU), MAT-file (Matlab), and STK RAW file
17810 formats. Signed integer (8-, 16-, and 32-bit)17810 formats. Signed integer (8-, 16-, and 32-bit)
17811 and floating- point (32- and 64-bit) data types17811 and floating- point (32- and 64-bit) data types
17812 are supported. STK RAW files use 16-bit17812 are supported. STK RAW files use 16-bit
17813 integers by definition. MAT-files will always17813 integers by definition. MAT-files will always
17814 be written as 64-bit floats. If a data type17814 be written as 64-bit floats. If a data type
17815 specification does not match the specified file17815 specification does not match the specified file
17816 type, the data type will automatically be17816 type, the data type will automatically be
17817 modified. Uncompressed data types are not17817 modified. Uncompressed data types are not
17818 supported.17818 supported.
17819 17819
17820 Currently, WvOut is non-interpolating and the17820 Currently, WvOut is non-interpolating and the
@@ -18442,7 +18442,7 @@ bool WvOut :: setMatFile( const char *fileName ) · 621 unmodified lines
18442 // 3. Array Name18442 // 3. Array Name
18443 // We'll use fileName for the matlab array name (as well as the file name).18443 // We'll use fileName for the matlab array name (as well as the file name).
18444 // If fileName is 4 characters or less, we have to use a compressed data element18444 // If fileName is 4 characters or less, we have to use a compressed data element
18445 // format for the array name data element. Otherwise, the array name must18445 // format for the array name data element. Otherwise, the array name must
18446 // be formatted in 8-byte increments (up to 31 characters + NULL).18446 // be formatted in 8-byte increments (up to 31 characters + NULL).
18447 SINT32 namelength = (SINT32) strlen(fileName);18447 SINT32 namelength = (SINT32) strlen(fileName);
18448 if (strstr(fileName, ".mat")) namelength -= 4;18448 if (strstr(fileName, ".mat")) namelength -= 4;
@@ -18664,7 +18664,7 @@ void WvOut :: tickFrame(const MY_FLOAT *frameVector, unsigned int frames) · 215 unmodified lines
18664 18664
18665 This class can be used to read events from a standard MIDI file.18665 This class can be used to read events from a standard MIDI file.
18666 Event bytes are copied to a C++ vector and must be subsequently18666 Event bytes are copied to a C++ vector and must be subsequently
18667 interpreted by the user. The function getNextMidiEvent() skips18667 interpreted by the user. The function getNextMidiEvent() skips
18668 meta and sysex events, returning only MIDI channel messages.18668 meta and sysex events, returning only MIDI channel messages.
18669 Event delta-times are returned in the form of "ticks" and a18669 Event delta-times are returned in the form of "ticks" and a
18670 function is provided to determine the current "seconds per tick".18670 function is provided to determine the current "seconds per tick".
@@ -18755,9 +18755,9 @@ MidiFileIn :: MidiFileIn( std::string fileName ) · 84 unmodified lines
18755 tickrate = (double) (*data & 0x7FFF); // ticks per quarter note18755 tickrate = (double) (*data & 0x7FFF); // ticks per quarter note
18756 }18756 }
18757 18757
18758 // Now locate the track offsets and lengths. If not using time18758 // Now locate the track offsets and lengths. If not using time
18759 // code, we can initialize the "tick time" using a default tempo of18759 // code, we can initialize the "tick time" using a default tempo of
18760 // 120 beats per minute. We will then check for tempo meta-events18760 // 120 beats per minute. We will then check for tempo meta-events
18761 // afterward.18761 // afterward.
18762 unsigned int i;18762 unsigned int i;
18763 for ( i=0; i<nTracks_; i++ ) {18763 for ( i=0; i<nTracks_; i++ ) {
@@ -18882,8 +18882,8 @@ unsigned long MidiFileIn :: getNextEvent( std::vector<unsigned char> *event, uns · 118 unmodified lines
18882{18882{
18883 // Fill the user-provided vector with the next event in the18883 // Fill the user-provided vector with the next event in the
18884 // specified track (default = 0) and return the event delta time in18884 // specified track (default = 0) and return the event delta time in
18885 // ticks. This function assumes that the stored track pointer is18885 // ticks. This function assumes that the stored track pointer is
18886 // positioned at the start of a track event. If the track has18886 // positioned at the start of a track event. If the track has
18887 // reached its end, the event vector size will be zero.18887 // reached its end, the event vector size will be zero.
18888 //18888 //
18889 // If we have a format 0 or 2 file and we're not using timecode, we18889 // If we have a format 0 or 2 file and we're not using timecode, we
@@ -19002,7 +19002,7 @@ unsigned long MidiFileIn :: getNextMidiEvent( std::vector<unsigned char> *midiEv · 112 unmodified lines
19002{19002{
19003 // Fill the user-provided vector with the next MIDI event in the19003 // Fill the user-provided vector with the next MIDI event in the
19004 // specified track (default = 0) and return the event delta time in19004 // specified track (default = 0) and return the event delta time in
19005 // ticks. Meta-Events preceeding this event are skipped and ignored.19005 // ticks. Meta-Events preceeding this event are skipped and ignored.
19006 if ( track >= nTracks_ ) {19006 if ( track >= nTracks_ ) {
19007 CK_STDCOUT << "MidiFileIn::getNextMidiEvent: invalid track argument (" << track << ").";19007 CK_STDCOUT << "MidiFileIn::getNextMidiEvent: invalid track argument (" << track << ").";
19008 handleError( "", StkError::WARNING ); return 0;19008 handleError( "", StkError::WARNING ); return 0;
@@ -19024,7 +19024,7 @@ unsigned long MidiFileIn :: getNextMidiEvent( std::vector<unsigned char> *midiEv · 15 unmodified lines
19024bool MidiFileIn :: readVariableLength( unsigned long *value )19024bool MidiFileIn :: readVariableLength( unsigned long *value )
19025{19025{
19026 // It is assumed that this function is called with the file read19026 // It is assumed that this function is called with the file read
19027 // pointer positioned at the start of a variable-length value. The19027 // pointer positioned at the start of a variable-length value. The
19028 // function returns "true" if the value is successfully parsed and19028 // function returns "true" if the value is successfully parsed and
19029 // "false" otherwise.19029 // "false" otherwise.
19030 *value = 0;19030 *value = 0;
@@ -25025,7 +25025,7 @@ CK_DLL_CTRL( Moog_ctrl_filterQ ) · 5994 unmodified lines
25025 Moog * m = (Moog *)OBJ_MEMBER_UINT(SELF, Instrmnt_offset_data);25025 Moog * m = (Moog *)OBJ_MEMBER_UINT(SELF, Instrmnt_offset_data);
25026 t_CKFLOAT f = GET_NEXT_FLOAT(ARGS); 25026 t_CKFLOAT f = GET_NEXT_FLOAT(ARGS);
25027 m->controlChange( __SK_FilterQ_, f * 128.0 );25027 m->controlChange( __SK_FilterQ_, f * 128.0 );
25028 RETURN->v_float = (t_CKFLOAT) 10.0 * ( m->filterQ - 0.80 );25028 RETURN->v_float = (t_CKFLOAT)10.0 * ( m->filterQ - 0.80 );
25029}25029}
25030 25030
25031 25031
@@ -25036,7 +25036,7 @@ CK_DLL_CTRL( Moog_ctrl_filterQ ) · 4 unmodified lines
25036CK_DLL_CGET( Moog_cget_filterQ )25036CK_DLL_CGET( Moog_cget_filterQ )
25037{25037{
25038 Moog * m = (Moog *)OBJ_MEMBER_UINT(SELF, Instrmnt_offset_data);25038 Moog * m = (Moog *)OBJ_MEMBER_UINT(SELF, Instrmnt_offset_data);
25039 RETURN->v_float = (t_CKFLOAT) 10.0 * ( m->filterQ - 0.80 );25039 RETURN->v_float = (t_CKFLOAT)10.0 * ( m->filterQ - 0.80 );
25040}25040}
25041 25041
25042 25042
@@ -25049,7 +25049,7 @@ CK_DLL_CTRL( Moog_ctrl_filterSweepRate ) · 6 unmodified lines
25049 Moog * m = (Moog *)OBJ_MEMBER_UINT(SELF, Instrmnt_offset_data);25049 Moog * m = (Moog *)OBJ_MEMBER_UINT(SELF, Instrmnt_offset_data);
25050 t_CKFLOAT f = GET_NEXT_FLOAT(ARGS); 25050 t_CKFLOAT f = GET_NEXT_FLOAT(ARGS);
25051 m->controlChange( __SK_FilterSweepRate_, f * 128.0 );25051 m->controlChange( __SK_FilterSweepRate_, f * 128.0 );
25052 RETURN->v_float = (t_CKFLOAT) m->filterRate * 5000;25052 RETURN->v_float = (t_CKFLOAT)m->filterRate * 5000;
25053}25053}
25054 25054
25055 25055
@@ -25060,7 +25060,7 @@ CK_DLL_CTRL( Moog_ctrl_filterSweepRate ) · 4 unmodified lines
25060CK_DLL_CGET( Moog_cget_filterSweepRate )25060CK_DLL_CGET( Moog_cget_filterSweepRate )
25061{25061{
25062 Moog * m = (Moog *)OBJ_MEMBER_UINT(SELF, Instrmnt_offset_data);25062 Moog * m = (Moog *)OBJ_MEMBER_UINT(SELF, Instrmnt_offset_data);
25063 RETURN->v_float = (t_CKFLOAT) m->filterRate * 5000;25063 RETURN->v_float = (t_CKFLOAT)m->filterRate * 5000;
25064}25064}
25065 25065
25066 25066
@@ -25109,7 +25109,7 @@ CK_DLL_CTRL( Moog_ctrl_vibratoGain ) · 42 unmodified lines
25109 Moog * m = (Moog *)OBJ_MEMBER_UINT(SELF, Instrmnt_offset_data);25109 Moog * m = (Moog *)OBJ_MEMBER_UINT(SELF, Instrmnt_offset_data);
25110 t_CKFLOAT f = GET_NEXT_FLOAT(ARGS); 25110 t_CKFLOAT f = GET_NEXT_FLOAT(ARGS);
25111 m->controlChange( __SK_ModWheel_, f * 128.0 );25111 m->controlChange( __SK_ModWheel_, f * 128.0 );
25112 RETURN->v_float = (t_CKFLOAT) m->m_vibratoGain;25112 RETURN->v_float = (t_CKFLOAT)m->m_vibratoGain;
25113}25113}
25114 25114
25115 25115
@@ -25120,7 +25120,7 @@ CK_DLL_CTRL( Moog_ctrl_vibratoGain ) · 4 unmodified lines
25120CK_DLL_CGET( Moog_cget_vibratoGain )25120CK_DLL_CGET( Moog_cget_vibratoGain )
25121{25121{
25122 Moog * m = (Moog *)OBJ_MEMBER_UINT(SELF, Instrmnt_offset_data);25122 Moog * m = (Moog *)OBJ_MEMBER_UINT(SELF, Instrmnt_offset_data);
25123 RETURN->v_float = (t_CKFLOAT) m->m_vibratoGain;25123 RETURN->v_float = (t_CKFLOAT)m->m_vibratoGain;
25124}25124}
25125 25125
25126 25126
@@ -25133,7 +25133,7 @@ CK_DLL_CTRL( Moog_ctrl_volume ) · 6 unmodified lines
25133 Moog * m = (Moog *)OBJ_MEMBER_UINT(SELF, Instrmnt_offset_data);25133 Moog * m = (Moog *)OBJ_MEMBER_UINT(SELF, Instrmnt_offset_data);
25134 t_CKFLOAT f = GET_NEXT_FLOAT(ARGS); 25134 t_CKFLOAT f = GET_NEXT_FLOAT(ARGS);
25135 m->controlChange( __SK_AfterTouch_Cont_, f * 128.0 );25135 m->controlChange( __SK_AfterTouch_Cont_, f * 128.0 );
25136 RETURN->v_float = (t_CKFLOAT) m->m_volume;25136 RETURN->v_float = (t_CKFLOAT)m->m_volume;
25137}25137}
25138 25138
25139 25139
@@ -25144,7 +25144,7 @@ CK_DLL_CTRL( Moog_ctrl_volume ) · 4 unmodified lines
25144CK_DLL_CGET( Moog_cget_volume )25144CK_DLL_CGET( Moog_cget_volume )
25145{25145{
25146 Moog * m = (Moog *)OBJ_MEMBER_UINT(SELF, Instrmnt_offset_data);25146 Moog * m = (Moog *)OBJ_MEMBER_UINT(SELF, Instrmnt_offset_data);
25147 RETURN->v_float = (t_CKFLOAT) m->m_volume;25147 RETURN->v_float = (t_CKFLOAT)m->m_volume;
25148}25148}
25149 25149
25150 25150
@@ -25274,7 +25274,7 @@ CK_DLL_CTRL( PitShift_ctrl_shift ) · 123 unmodified lines
25274 PitShift * p = (PitShift *)OBJ_MEMBER_UINT(SELF, PitShift_offset_data);25274 PitShift * p = (PitShift *)OBJ_MEMBER_UINT(SELF, PitShift_offset_data);
25275 t_CKFLOAT f = GET_NEXT_FLOAT(ARGS);25275 t_CKFLOAT f = GET_NEXT_FLOAT(ARGS);
25276 p->setShift( f );25276 p->setShift( f );
25277 RETURN->v_float = (t_CKFLOAT) 1.0 - p->rate;25277 RETURN->v_float = (t_CKFLOAT)1.0 - p->rate;
25278}25278}
25279 25279
25280 25280
@@ -25285,7 +25285,7 @@ CK_DLL_CTRL( PitShift_ctrl_shift ) · 4 unmodified lines
25285CK_DLL_CGET( PitShift_cget_shift )25285CK_DLL_CGET( PitShift_cget_shift )
25286{25286{
25287 PitShift * p = (PitShift *)OBJ_MEMBER_UINT(SELF, PitShift_offset_data);25287 PitShift * p = (PitShift *)OBJ_MEMBER_UINT(SELF, PitShift_offset_data);
25288 RETURN->v_float = (t_CKFLOAT) 1.0 - p->rate;25288 RETURN->v_float = (t_CKFLOAT)1.0 - p->rate;
25289}25289}
25290 25290
25291 25291
@@ -25298,7 +25298,7 @@ CK_DLL_CTRL( PitShift_ctrl_effectMix ) · 6 unmodified lines
25298 PitShift * p = (PitShift *)OBJ_MEMBER_UINT(SELF, PitShift_offset_data);25298 PitShift * p = (PitShift *)OBJ_MEMBER_UINT(SELF, PitShift_offset_data);
25299 t_CKFLOAT f = GET_NEXT_FLOAT(ARGS);25299 t_CKFLOAT f = GET_NEXT_FLOAT(ARGS);
25300 p->setEffectMix( f );25300 p->setEffectMix( f );
25301 RETURN->v_float = (t_CKFLOAT) p->effectMix;25301 RETURN->v_float = (t_CKFLOAT)p->effectMix;
25302}25302}
25303 25303
25304 25304
@@ -25309,7 +25309,7 @@ CK_DLL_CTRL( PitShift_ctrl_effectMix ) · 4 unmodified lines
25309CK_DLL_CGET( PitShift_cget_effectMix )25309CK_DLL_CGET( PitShift_cget_effectMix )
25310{25310{
25311 PitShift * p = (PitShift *)OBJ_MEMBER_UINT(SELF, PitShift_offset_data);25311 PitShift * p = (PitShift *)OBJ_MEMBER_UINT(SELF, PitShift_offset_data);
25312 RETURN->v_float = (t_CKFLOAT) p->effectMix;25312 RETURN->v_float = (t_CKFLOAT)p->effectMix;
25313}25313}
25314 25314
25315 25315
src/core/ugen_xxx.cpp+88−83
@@ -128,18 +128,18 @@ DLL_QUERY xxx_query( Chuck_DL_Query * QUERY ) · 127 unmodified lines
128 //-------------------------------------------------------------------------128 //-------------------------------------------------------------------------
129 // init as base class: Subgraph129 // init as base class: Subgraph
130 //-------------------------------------------------------------------------130 //-------------------------------------------------------------------------
131 doc = "Base class for chubgraph-based user unit generators. ";131 doc = "base class for subgraph-based user-created in-language unit generators.";
132 if( !type_engine_import_ugen_begin( env, "Chugraph", "UGen", env->global(),132 if( !type_engine_import_ugen_begin( env, "Chugraph", "UGen", env->global(),
133 subgraph_ctor, NULL, NULL, NULL, 1, 1, doc.c_str() ) )133 subgraph_ctor, NULL, NULL, NULL, 1, 1, doc.c_str() ) )
134 return FALSE;134 return FALSE;
135 135
136 if( !type_engine_import_add_ex( env, "extend/chubgraph.ck" ) ) goto error;136 if( !type_engine_import_add_ex( env, "extend/chugraph.ck" ) ) goto error;
137 137
138 doc = "Terminal for sources chucked into this ugen. ";138 doc = "terminal for sources chucked into this ugen.";
139 subgraph_offset_inlet = type_engine_import_mvar( env, "UGen", "inlet", TRUE, doc.c_str() );139 subgraph_offset_inlet = type_engine_import_mvar( env, "UGen", "inlet", TRUE, doc.c_str() );
140 if( subgraph_offset_inlet == CK_INVALID_OFFSET ) goto error;140 if( subgraph_offset_inlet == CK_INVALID_OFFSET ) goto error;
141 141
142 doc = "Terminal for the output of this ugen. ";142 doc = "terminal for the output of this ugen.";
143 subgraph_offset_outlet = type_engine_import_mvar( env, "UGen", "outlet", TRUE, doc.c_str() );143 subgraph_offset_outlet = type_engine_import_mvar( env, "UGen", "outlet", TRUE, doc.c_str() );
144 if( subgraph_offset_outlet == CK_INVALID_OFFSET ) goto error;144 if( subgraph_offset_outlet == CK_INVALID_OFFSET ) goto error;
145 145
@@ -151,9 +151,10 @@ DLL_QUERY xxx_query( Chuck_DL_Query * QUERY ) · 5 unmodified lines
151 //-------------------------------------------------------------------------151 //-------------------------------------------------------------------------
152 // init as base class: FooGen152 // init as base class: FooGen
153 //-------------------------------------------------------------------------153 //-------------------------------------------------------------------------
154 doc = "Base class for chugen-based user unit generators.";154 doc = "base class for user-created in-language unit generators.";
155 if( !type_engine_import_ugen_begin( env, "Chugen", "UGen", env->global(),155 if( !type_engine_import_ugen_begin( env, "Chugen", "UGen", env->global(),
156 foogen_ctor, foogen_dtor, foogen_tick, NULL, 1, 1, doc.c_str() ) )156 foogen_ctor, foogen_dtor, foogen_tick, NULL, 1, 1,
157 doc.c_str() ) )
157 return FALSE;158 return FALSE;
158 159
159 if( !type_engine_import_add_ex( env, "extend/chugen.ck" ) ) goto error;160 if( !type_engine_import_add_ex( env, "extend/chugen.ck" ) ) goto error;
@@ -169,7 +170,7 @@ DLL_QUERY xxx_query( Chuck_DL_Query * QUERY ) · 9 unmodified lines
169 //-------------------------------------------------------------------------170 //-------------------------------------------------------------------------
170 // init as base class: UGen_Multi171 // init as base class: UGen_Multi
171 //-------------------------------------------------------------------------172 //-------------------------------------------------------------------------
172 doc = "Base class for multi-channel unit generators.";173 doc = "base class for multi-channel unit generators.";
173 if( !type_engine_import_ugen_begin( env, "UGen_Multi", "UGen", env->global(),174 if( !type_engine_import_ugen_begin( env, "UGen_Multi", "UGen", env->global(),
174 multi_ctor, (f_dtor)NULL, (f_tick)NULL, (f_pmsg)NULL, 0, 0, doc.c_str() ) )175 multi_ctor, (f_dtor)NULL, (f_tick)NULL, (f_pmsg)NULL, 0, 0, doc.c_str() ) )
175 return FALSE;176 return FALSE;
@@ -177,7 +178,7 @@ DLL_QUERY xxx_query( Chuck_DL_Query * QUERY ) · 1 unmodified line
177 // add chan178 // add chan
178 func = make_new_mfun( "UGen", "chan", multi_cget_chan );179 func = make_new_mfun( "UGen", "chan", multi_cget_chan );
179 func->add_arg( "int", "which" );180 func->add_arg( "int", "which" );
180 func->doc = "Returns the ugen representing a specific channel of this ugen, or null if no such channel is available.";181 func->doc = "get UGen representing a specific channel of this UGen, or null if no such channel is available.";
181 if( !type_engine_import_mfun( env, func ) ) goto error;182 if( !type_engine_import_mfun( env, func ) ) goto error;
182 183
183 // add pan184 // add pan
@@ -195,18 +196,18 @@ DLL_QUERY xxx_query( Chuck_DL_Query * QUERY ) · 11 unmodified lines
195 //---------------------------------------------------------------------196 //---------------------------------------------------------------------
196 // init as base class: UGen_Stereo197 // init as base class: UGen_Stereo
197 //---------------------------------------------------------------------198 //---------------------------------------------------------------------
198 doc = "Base class for stereo unit generators.";199 doc = "base class for stereo unit generators.";
199 if( !type_engine_import_ugen_begin( env, "UGen_Stereo", "UGen_Multi", env->global(),200 if( !type_engine_import_ugen_begin( env, "UGen_Stereo", "UGen_Multi", env->global(),
200 stereo_ctor, NULL, NULL, NULL, 2, 2, doc.c_str() ) )201 stereo_ctor, NULL, NULL, NULL, 2, 2, doc.c_str() ) )
201 return FALSE;202 return FALSE;
202 203
203 // add left204 // add left
204 doc = "Left channel (same as .chan(0)).";205 doc = "left channel (same as .chan(0)).";
205 stereo_offset_left = type_engine_import_mvar( env, "UGen", "left", FALSE, doc.c_str() );206 stereo_offset_left = type_engine_import_mvar( env, "UGen", "left", FALSE, doc.c_str() );
206 if( stereo_offset_left == CK_INVALID_OFFSET ) goto error;207 if( stereo_offset_left == CK_INVALID_OFFSET ) goto error;
207 208
208 // add right209 // add right
209 doc = "Right channel (same as .chan(1)).";210 doc = "right channel (same as .chan(1)).";
210 stereo_offset_right = type_engine_import_mvar( env, "UGen", "right", FALSE, doc.c_str() );211 stereo_offset_right = type_engine_import_mvar( env, "UGen", "right", FALSE, doc.c_str() );
211 if( stereo_offset_right == CK_INVALID_OFFSET ) goto error;212 if( stereo_offset_right == CK_INVALID_OFFSET ) goto error;
212 213
@@ -217,10 +218,10 @@ DLL_QUERY xxx_query( Chuck_DL_Query * QUERY ) · 4 unmodified lines
217 // add pan218 // add pan
218 func = make_new_mfun( "float", "pan", stereo_ctrl_pan );219 func = make_new_mfun( "float", "pan", stereo_ctrl_pan );
219 func->add_arg( "float", "val" );220 func->add_arg( "float", "val" );
220 func->doc = "Panning between left and right channels, in range [-1,1], with -1 being far-left, 1 far-right, and 0 centered.";221 func->doc = "pan between left and right channels, in range [-1,1], with -1 being far-left, 1 far-right, and 0 centered.";
221 if( !type_engine_import_mfun( env, func ) ) goto error;222 if( !type_engine_import_mfun( env, func ) ) goto error;
222 func = make_new_mfun( "float", "pan", stereo_cget_pan );223 func = make_new_mfun( "float", "pan", stereo_cget_pan );
223 func->doc = "Panning between left and right channels, in range [-1,1], with -1 being far-left, 1 far-right, and 0 centered.";224 func->doc = "pan between left and right channels, in range [-1,1], with -1 being far-left, 1 far-right, and 0 centered.";
224 if( !type_engine_import_mfun( env, func ) ) goto error;225 if( !type_engine_import_mfun( env, func ) ) goto error;
225 226
226 // end import227 // end import
@@ -234,7 +235,7 @@ DLL_QUERY xxx_query( Chuck_DL_Query * QUERY ) · 7 unmodified lines
234 // init as base class: dac235 // init as base class: dac
235 //---------------------------------------------------------------------236 //---------------------------------------------------------------------
236 if( !(env->t_dac = type_engine_import_ugen_begin( env, "DAC", "UGen_Stereo", env->global(),237 if( !(env->t_dac = type_engine_import_ugen_begin( env, "DAC", "UGen_Stereo", env->global(),
237 NULL, NULL, NULL, NULL, 2, 2 )) )238 NULL, NULL, NULL, NULL, 2, 2 )) )
238 return FALSE;239 return FALSE;
239 240
240 // end import241 // end import
@@ -248,7 +249,8 @@ DLL_QUERY xxx_query( Chuck_DL_Query * QUERY ) · 7 unmodified lines
248 // init as base class: adc249 // init as base class: adc
249 //---------------------------------------------------------------------250 //---------------------------------------------------------------------
250 if( !(env->t_adc = type_engine_import_ugen_begin( env, "ADC", "UGen_Stereo", env->global(),251 if( !(env->t_adc = type_engine_import_ugen_begin( env, "ADC", "UGen_Stereo", env->global(),
251 (f_ctor)NULL, (f_dtor)NULL, (f_tick)NULL, (f_pmsg)NULL, 0, 2 )) )252 (f_ctor)NULL, (f_dtor)NULL, (f_tick)NULL,
253 (f_pmsg)NULL, 0, 2 )) )
252 return FALSE;254 return FALSE;
253 255
254 // end import256 // end import
@@ -258,7 +260,7 @@ DLL_QUERY xxx_query( Chuck_DL_Query * QUERY ) · 3 unmodified lines
258 //---------------------------------------------------------------------260 //---------------------------------------------------------------------
259 // init as base class: pan2261 // init as base class: pan2
260 //---------------------------------------------------------------------262 //---------------------------------------------------------------------
261 doc = "Spread mono signal to stereo.";263 doc = "a mono-to-stereo unit generator for stereo panning.";
262 if( !type_engine_import_ugen_begin( env, "Pan2", "UGen_Stereo", env->global(),264 if( !type_engine_import_ugen_begin( env, "Pan2", "UGen_Stereo", env->global(),
263 NULL, NULL, NULL, NULL, 2, 2, doc.c_str() ) )265 NULL, NULL, NULL, NULL, 2, 2, doc.c_str() ) )
264 return FALSE;266 return FALSE;
@@ -272,7 +274,7 @@ DLL_QUERY xxx_query( Chuck_DL_Query * QUERY ) · 7 unmodified lines
272 //---------------------------------------------------------------------274 //---------------------------------------------------------------------
273 // init as base class: mix2275 // init as base class: mix2
274 //---------------------------------------------------------------------276 //---------------------------------------------------------------------
275 doc = "Unit generator for mixing stereo signal source to mono.";277 doc = "a stereo-to-mono unit generator for mixing stereo signal to mono.";
276 if( !type_engine_import_ugen_begin( env, "Mix2", "UGen_Stereo", env->global(),278 if( !type_engine_import_ugen_begin( env, "Mix2", "UGen_Stereo", env->global(),
277 NULL, NULL, NULL, NULL, 2, 2, doc.c_str() ) )279 NULL, NULL, NULL, NULL, 2, 2, doc.c_str() ) )
278 return FALSE;280 return FALSE;
@@ -304,7 +306,7 @@ DLL_QUERY xxx_query( Chuck_DL_Query * QUERY ) · 25 unmodified lines
304 //---------------------------------------------------------------------306 //---------------------------------------------------------------------
305 // init as base class: gain307 // init as base class: gain
306 //---------------------------------------------------------------------308 //---------------------------------------------------------------------
307 doc = "Gain control. (Note: all unit generators can themselves change their gain. This is a way to add multiple outputs together and scale them.)";309 doc = "a gain control unit generator. (All unit generators can already change their own gain; this is an explicit way to add multiple outputs together and scale them.)";
308 if( !type_engine_import_ugen_begin( env, "Gain", "UGen", env->global(), 310 if( !type_engine_import_ugen_begin( env, "Gain", "UGen", env->global(),
309 NULL, NULL, NULL, NULL, doc.c_str() ) )311 NULL, NULL, NULL, NULL, doc.c_str() ) )
310 return FALSE;312 return FALSE;
@@ -329,7 +331,7 @@ DLL_QUERY xxx_query( Chuck_DL_Query * QUERY ) · 18 unmodified lines
329 //---------------------------------------------------------------------331 //---------------------------------------------------------------------
330 // init as base class: noise332 // init as base class: noise
331 //---------------------------------------------------------------------333 //---------------------------------------------------------------------
332 doc = "White noise generator.";334 doc = "a white noise generator.";
333 if( !type_engine_import_ugen_begin( env, "Noise", "UGen", env->global(), 335 if( !type_engine_import_ugen_begin( env, "Noise", "UGen", env->global(),
334 NULL, NULL, noise_tick, NULL, doc.c_str() ) )336 NULL, NULL, noise_tick, NULL, doc.c_str() ) )
335 return FALSE;337 return FALSE;
@@ -351,7 +353,7 @@ DLL_QUERY xxx_query( Chuck_DL_Query * QUERY ) · 15 unmodified lines
351 //---------------------------------------------------------------------353 //---------------------------------------------------------------------
352 // init as base class: cnoise354 // init as base class: cnoise
353 //---------------------------------------------------------------------355 //---------------------------------------------------------------------
354 doc = "Noise generator with multiple noise synthesis modes. ";356 doc = "a noise generator with multiple noise synthesis modes.";
355 if( !type_engine_import_ugen_begin( env, "CNoise", "UGen", env->global(),357 if( !type_engine_import_ugen_begin( env, "CNoise", "UGen", env->global(),
356 cnoise_ctor, cnoise_dtor, cnoise_tick, NULL, doc.c_str() ) )358 cnoise_ctor, cnoise_dtor, cnoise_tick, NULL, doc.c_str() ) )
357 return FALSE;359 return FALSE;
@@ -403,7 +405,7 @@ DLL_QUERY xxx_query( Chuck_DL_Query * QUERY ) · 45 unmodified lines
403 //---------------------------------------------------------------------405 //---------------------------------------------------------------------
404 // init as base class: impulse406 // init as base class: impulse
405 //---------------------------------------------------------------------407 //---------------------------------------------------------------------
406 doc = "Pulse generator - can set the value of the current sample. Default for each sample is 0 if not set.";408 doc = "a impulse generator. Can be used to set the value of the next sample; default for each sample is 0 if not set. Additionally, this can be used to generate a digial signal, one sample at a time.";
407 if( !type_engine_import_ugen_begin( env, "Impulse", "UGen", env->global(), 409 if( !type_engine_import_ugen_begin( env, "Impulse", "UGen", env->global(),
408 impulse_ctor, impulse_dtor, impulse_tick, NULL, doc.c_str() ) )410 impulse_ctor, impulse_dtor, impulse_tick, NULL, doc.c_str() ) )
409 return FALSE;411 return FALSE;
@@ -423,11 +425,11 @@ DLL_QUERY xxx_query( Chuck_DL_Query * QUERY ) · 13 unmodified lines
423 // add ctrl: next425 // add ctrl: next
424 func = make_new_mfun( "float", "next", impulse_ctrl_next );426 func = make_new_mfun( "float", "next", impulse_ctrl_next );
425 func->add_arg( "float", "next" );427 func->add_arg( "float", "next" );
426 func->doc = "Value of next sample to be generated. (Note: if you are using the UGen.last method to read the output of the impulse, the value set by Impulse.next does not appear as the output until after the next sample boundary. In this case, there is a consistent 1::samp offset between setting .next and reading that value using .last.)";428 func->doc = "set the value of next sample. (Note: if you are using the UGen.last() method to read the output of the impulse, the value set by Impulse.next() does not appear as the output until after the next sample boundary. In this case, there is a consistent 1::samp offset between setting .next(...) and reading that value using .last().)";
427 if( !type_engine_import_mfun( env, func ) ) goto error;429 if( !type_engine_import_mfun( env, func ) ) goto error;
428 // add cget: next430 // add cget: next
429 func = make_new_mfun( "float", "next", impulse_cget_next );431 func = make_new_mfun( "float", "next", impulse_cget_next );
430 func->doc = "Value of next sample to be generated.";432 func->doc = "get value of next sample to be generated.";
431 if( !type_engine_import_mfun( env, func ) ) goto error;433 if( !type_engine_import_mfun( env, func ) ) goto error;
432 434
433 // end import435 // end import
@@ -457,7 +459,7 @@ DLL_QUERY xxx_query( Chuck_DL_Query * QUERY ) · 23 unmodified lines
457 //---------------------------------------------------------------------459 //---------------------------------------------------------------------
458 // init as base class: step460 // init as base class: step
459 //---------------------------------------------------------------------461 //---------------------------------------------------------------------
460 doc = "Step generator - like Impulse, but once a value is set, it is held for all following samples, until value is set again.";462 doc = "a step generator. Step behaves like Impulse, except that once a next value is set, that value is held for all following samples, until a different value is set.";
461 if( !type_engine_import_ugen_begin( env, "Step", "UGen", env->global(), 463 if( !type_engine_import_ugen_begin( env, "Step", "UGen", env->global(),
462 step_ctor, step_dtor, step_tick, NULL, doc.c_str() ) )464 step_ctor, step_dtor, step_tick, NULL, doc.c_str() ) )
463 return FALSE;465 return FALSE;
@@ -479,11 +481,11 @@ DLL_QUERY xxx_query( Chuck_DL_Query * QUERY ) · 15 unmodified lines
479 // add ctrl: next481 // add ctrl: next
480 func = make_new_mfun( "float", "next", step_ctrl_next );482 func = make_new_mfun( "float", "next", step_ctrl_next );
481 func->add_arg( "float", "next" );483 func->add_arg( "float", "next" );
482 func->doc = "The step value.";484 func->doc = "set the next step value.";
483 if( !type_engine_import_mfun( env, func ) ) goto error;485 if( !type_engine_import_mfun( env, func ) ) goto error;
484 // add cget: next486 // add cget: next
485 func = make_new_mfun( "float", "next", step_cget_next );487 func = make_new_mfun( "float", "next", step_cget_next );
486 func->doc = "The step value.";488 func->doc = "get the next step value.";
487 if( !type_engine_import_mfun( env, func ) ) goto error;489 if( !type_engine_import_mfun( env, func ) ) goto error;
488 490
489 // end import491 // end import
@@ -499,7 +501,7 @@ DLL_QUERY xxx_query( Chuck_DL_Query * QUERY ) · 9 unmodified lines
499 //---------------------------------------------------------------------501 //---------------------------------------------------------------------
500 // init as base class: halfrect502 // init as base class: halfrect
501 //---------------------------------------------------------------------503 //---------------------------------------------------------------------
502 doc = "Half wave rectifier.";504 doc = "a half wave rectifier.";
503 if( !type_engine_import_ugen_begin( env, "HalfRect", "UGen", env->global(), 505 if( !type_engine_import_ugen_begin( env, "HalfRect", "UGen", env->global(),
504 NULL, NULL, halfrect_tick, NULL, doc.c_str() ) )506 NULL, NULL, halfrect_tick, NULL, doc.c_str() ) )
505 return FALSE;507 return FALSE;
@@ -517,7 +519,7 @@ DLL_QUERY xxx_query( Chuck_DL_Query * QUERY ) · 11 unmodified lines
517 //---------------------------------------------------------------------519 //---------------------------------------------------------------------
518 // init as base class: fullrect520 // init as base class: fullrect
519 //---------------------------------------------------------------------521 //---------------------------------------------------------------------
520 doc = "Full wave rectifier.";522 doc = "a full wave rectifier.";
521 if( !type_engine_import_ugen_begin( env, "FullRect", "UGen", env->global(),523 if( !type_engine_import_ugen_begin( env, "FullRect", "UGen", env->global(),
522 NULL, NULL, fullrect_tick, NULL, doc.c_str() ) )524 NULL, NULL, fullrect_tick, NULL, doc.c_str() ) )
523 return FALSE;525 return FALSE;
@@ -633,7 +635,7 @@ DLL_QUERY xxx_query( Chuck_DL_Query * QUERY ) · 109 unmodified lines
633 //---------------------------------------------------------------------635 //---------------------------------------------------------------------
634 // init as base class: sndbuf636 // init as base class: sndbuf
635 //---------------------------------------------------------------------637 //---------------------------------------------------------------------
636 doc = "Interpolating sound buffer with single-channel output. Reads from a variety of uncompressed formats.";638 doc = "an interpolating sound buffer/player with single-channel output; can read audio data from a variety of uncompressed formats.";
637 if( !type_engine_import_ugen_begin( env, "SndBuf", "UGen", env->global(), 639 if( !type_engine_import_ugen_begin( env, "SndBuf", "UGen", env->global(),
638 sndbuf_ctor, sndbuf_dtor,640 sndbuf_ctor, sndbuf_dtor,
639 sndbuf_tick, NULL, 1, 1, doc.c_str() ) )641 sndbuf_tick, NULL, 1, 1, doc.c_str() ) )
@@ -648,7 +650,7 @@ DLL_QUERY xxx_query( Chuck_DL_Query * QUERY ) · 8 unmodified lines
648 // add ctrl: read650 // add ctrl: read
649 func = make_new_mfun( "string", "read", sndbuf_ctrl_read );651 func = make_new_mfun( "string", "read", sndbuf_ctrl_read );
650 func->add_arg( "string", "read" );652 func->add_arg( "string", "read" );
651 func->doc = "Load file for reading.";653 func->doc = "read file for reading.";
652 if( !type_engine_import_mfun( env, func ) ) goto error;654 if( !type_engine_import_mfun( env, func ) ) goto error;
653 // add cget: read // area655 // add cget: read // area
654 //func = make_new_mfun( "string", "read", sndbuf_cget_read );656 //func = make_new_mfun( "string", "read", sndbuf_cget_read );
@@ -657,7 +659,7 @@ DLL_QUERY xxx_query( Chuck_DL_Query * QUERY ) · 2 unmodified lines
657 // add ctrl: write659 // add ctrl: write
658 func = make_new_mfun( "string", "write", sndbuf_ctrl_write );660 func = make_new_mfun( "string", "write", sndbuf_ctrl_write );
659 func->add_arg( "string", "read" );661 func->add_arg( "string", "read" );
660 func->doc = "Set file for writing (currently unsupported).";662 func->doc = "set file for writing (currently unsupported).";
661 if( !type_engine_import_mfun( env, func ) ) goto error;663 if( !type_engine_import_mfun( env, func ) ) goto error;
662 // add cget: write664 // add cget: write
663 //func = make_new_mfun( "string", "write", sndbuf_cget_write );665 //func = make_new_mfun( "string", "write", sndbuf_cget_write );
@@ -666,87 +668,87 @@ DLL_QUERY xxx_query( Chuck_DL_Query * QUERY ) · 2 unmodified lines
666 // add ctrl: pos668 // add ctrl: pos
667 func = make_new_mfun( "int", "pos", sndbuf_ctrl_pos );669 func = make_new_mfun( "int", "pos", sndbuf_ctrl_pos );
668 func->add_arg( "int", "pos" );670 func->add_arg( "int", "pos" );
669 func->doc = "Set position (between 0 and number of samples).";671 func->doc = "set play position (between 0 and number of samples).";
670 if( !type_engine_import_mfun( env, func ) ) goto error;672 if( !type_engine_import_mfun( env, func ) ) goto error;
671 // add cget: pos673 // add cget: pos
672 func = make_new_mfun( "int", "pos", sndbuf_cget_pos );674 func = make_new_mfun( "int", "pos", sndbuf_cget_pos );
673 func->doc = "Current position (between 0 and number of samples).";675 func->doc = "get play position (between 0 and number of samples).";
674 if( !type_engine_import_mfun( env, func ) ) goto error;676 if( !type_engine_import_mfun( env, func ) ) goto error;
675 677
676 // add ctrl: loop678 // add ctrl: loop
677 func = make_new_mfun( "int", "loop", sndbuf_ctrl_loop );679 func = make_new_mfun( "int", "loop", sndbuf_ctrl_loop );
678 func->add_arg( "int", "loop" );680 func->add_arg( "int", "loop" );
679 func->doc = "Toggle for looping file playback.";681 func->doc = "toggle looping file playback.";
680 if( !type_engine_import_mfun( env, func ) ) goto error;682 if( !type_engine_import_mfun( env, func ) ) goto error;
681 // add cget: loop683 // add cget: loop
682 func = make_new_mfun( "int", "loop", sndbuf_cget_loop );684 func = make_new_mfun( "int", "loop", sndbuf_cget_loop );
683 func->doc = "Toggle for looping file playback.";685 func->doc = "get whether file playback is set to loop.";
684 if( !type_engine_import_mfun( env, func ) ) goto error;686 if( !type_engine_import_mfun( env, func ) ) goto error;
685 687
686 // add ctrl: interp688 // add ctrl: interp
687 func = make_new_mfun( "int", "interp", sndbuf_ctrl_interp );689 func = make_new_mfun( "int", "interp", sndbuf_ctrl_interp );
688 func->add_arg( "int", "interp" );690 func->add_arg( "int", "interp" );
689 func->doc = "Interpolation mode. 0: drop sample, 1: linear interpolation, 2: sinc interpolation";691 func->doc = "set interpolation mode: (0) drop sample; (1) linear interpolation; (2) sinc interpolation.";
690 if( !type_engine_import_mfun( env, func ) ) goto error;692 if( !type_engine_import_mfun( env, func ) ) goto error;
691 // add cget: interp693 // add cget: interp
692 func = make_new_mfun( "int", "interp", sndbuf_cget_interp );694 func = make_new_mfun( "int", "interp", sndbuf_cget_interp );
693 func->doc = "Interpolation mode. 0: drop sample, 1: linear interpolation, 2: sinc interpolation";695 func->doc = "get interpolation mode: (0) drop sample; (1) linear interpolation; (2) sinc interpolation.";
694 if( !type_engine_import_mfun( env, func ) ) goto error;696 if( !type_engine_import_mfun( env, func ) ) goto error;
695 697
696 // add ctrl: rate698 // add ctrl: rate
697 func = make_new_mfun( "float", "rate", sndbuf_ctrl_rate );699 func = make_new_mfun( "float", "rate", sndbuf_ctrl_rate );
698 func->add_arg( "float", "rate" );700 func->add_arg( "float", "rate" );
699 func->doc = "Playback rate (relative to file's natural speed). For example, 0.5 is half speed and 2 is twice as fast.";701 func->doc = "set playback rate (relative to file's natural speed). For example, 1.0 is 'normal', 0.5 is half speed, and 2 is twice as fast.";
700 if( !type_engine_import_mfun( env, func ) ) goto error;702 if( !type_engine_import_mfun( env, func ) ) goto error;
701 // add cget: rate703 // add cget: rate
702 func = make_new_mfun( "float", "rate", sndbuf_cget_rate );704 func = make_new_mfun( "float", "rate", sndbuf_cget_rate );
703 func->doc = "Playback rate (relative to file's natural speed). For example, 0.5 is half speed and 2 is twice as fast.";705 func->doc = "get playback rate (relative to file's natural speed). For example, 1.0 is 'normal', 0.5 is half speed, and 2 is twice as fast.";
704 if( !type_engine_import_mfun( env, func ) ) goto error;706 if( !type_engine_import_mfun( env, func ) ) goto error;
705 707
706 // add ctrl: play708 // add ctrl: play
707 func = make_new_mfun( "float", "play", sndbuf_ctrl_rate );709 func = make_new_mfun( "float", "play", sndbuf_ctrl_rate );
708 func->add_arg( "float", "play" );710 func->add_arg( "float", "play" );
709 func->doc = "Same as .rate. ";711 func->doc = "(same as .rate)";
710 if( !type_engine_import_mfun( env, func ) ) goto error;712 if( !type_engine_import_mfun( env, func ) ) goto error;
711 // add cget: play // good713 // add cget: play // good
712 func = make_new_mfun( "float", "play", sndbuf_cget_rate );714 func = make_new_mfun( "float", "play", sndbuf_cget_rate );
713 func->doc = "Same as .rate. ";715 func->doc = "(same as .rate)";
714 if( !type_engine_import_mfun( env, func ) ) goto error;716 if( !type_engine_import_mfun( env, func ) ) goto error;
715 717
716 // add ctrl: freq718 // add ctrl: freq
717 func = make_new_mfun( "float", "freq", sndbuf_ctrl_freq );719 func = make_new_mfun( "float", "freq", sndbuf_ctrl_freq );
718 func->add_arg( "float", "freq" );720 func->add_arg( "float", "freq" );
719 func->doc = "Loop rate (in file loops per second).";721 func->doc = "set loop rate (in file loops per second).";
720 if( !type_engine_import_mfun( env, func ) ) goto error;722 if( !type_engine_import_mfun( env, func ) ) goto error;
721 // add cget: freq723 // add cget: freq
722 func = make_new_mfun( "float", "freq", sndbuf_cget_freq );724 func = make_new_mfun( "float", "freq", sndbuf_cget_freq );
723 func->doc = "Loop rate (in file loops per second).";725 func->doc = "get loop rate (in file loops per second).";
724 if( !type_engine_import_mfun( env, func ) ) goto error;726 if( !type_engine_import_mfun( env, func ) ) goto error;
725 727
726 // add ctrl: phase728 // add ctrl: phase
727 func = make_new_mfun( "float", "phase", sndbuf_ctrl_phase );729 func = make_new_mfun( "float", "phase", sndbuf_ctrl_phase );
728 func->add_arg( "float", "phase" );730 func->add_arg( "float", "phase" );
729 func->doc = "Phase position, normalized to [0,1).";731 func->doc = "set phase position, normalized to [0,1).";
730 if( !type_engine_import_mfun( env, func ) ) goto error;732 if( !type_engine_import_mfun( env, func ) ) goto error;
731 // add cget: phase733 // add cget: phase
732 func = make_new_mfun( "float", "phase", sndbuf_cget_phase );734 func = make_new_mfun( "float", "phase", sndbuf_cget_phase );
733 func->doc = "Phase position, normalized to [0,1).";735 func->doc = "get phase position, normalized to [0,1).";
734 if( !type_engine_import_mfun( env, func ) ) goto error;736 if( !type_engine_import_mfun( env, func ) ) goto error;
735 737
736 // add ctrl: channel738 // add ctrl: channel
737 func = make_new_mfun( "int", "channel", sndbuf_ctrl_channel );739 func = make_new_mfun( "int", "channel", sndbuf_ctrl_channel );
738 func->add_arg( "int", "channel" );740 func->add_arg( "int", "channel" );
739 func->doc = "If the sound file contains more than one channel of audio, select which channel to play.";741 func->doc = "for sound file containing more than one channel of audio, select the channel to play.";
740 if( !type_engine_import_mfun( env, func ) ) goto error;742 if( !type_engine_import_mfun( env, func ) ) goto error;
741 // add cget: channel743 // add cget: channel
742 func = make_new_mfun( "int", "channel", sndbuf_cget_channel );744 func = make_new_mfun( "int", "channel", sndbuf_cget_channel );
743 func->doc = "If the sound file contains more than one channel of audio, the selected channel to play.";745 func->doc = "get the selected chanel of audio this buffer is playing.";
744 if( !type_engine_import_mfun( env, func ) ) goto error;746 if( !type_engine_import_mfun( env, func ) ) goto error;
745 747
746 // add ctrl: phase_offset748 // add ctrl: phase_offset
747 func = make_new_mfun( "float", "phaseOffset", sndbuf_ctrl_phase_offset );749 func = make_new_mfun( "float", "phaseOffset", sndbuf_ctrl_phase_offset );
748 func->add_arg( "float", "value" );750 func->add_arg( "float", "value" );
749 func->doc = "Advance the playhead by the specified phase offset in [0,1), where 0 is no advance and 1 advance the entire length of the file.";751 func->doc = "advance the playhead by the specified phase offset in [0,1), where 0 is no advance and 1 advance the entire length of the file.";
750 if( !type_engine_import_mfun( env, func ) ) goto error;752 if( !type_engine_import_mfun( env, func ) ) goto error;
751 // add cget: phase_offset753 // add cget: phase_offset
752 // func = make_new_mfun( "float", "phaseOffset", sndbuf_cget_phase_offset );754 // func = make_new_mfun( "float", "phaseOffset", sndbuf_cget_phase_offset );
@@ -755,32 +757,32 @@ DLL_QUERY xxx_query( Chuck_DL_Query * QUERY ) · 2 unmodified lines
755 // add ctrl: chunks757 // add ctrl: chunks
756 func = make_new_mfun( "int", "chunks", sndbuf_ctrl_chunks );758 func = make_new_mfun( "int", "chunks", sndbuf_ctrl_chunks );
757 func->add_arg( "int", "frames" );759 func->add_arg( "int", "frames" );
758 func->doc = "Chunk size, in frames, for loading the file from disk. Set to 0 to disable chunking.";760 func->doc = "set chunk size, in frames, for loading the file from disk. Set to 0 to disable chunking.";
759 if( !type_engine_import_mfun( env, func ) ) goto error;761 if( !type_engine_import_mfun( env, func ) ) goto error;
760 // add cget: chunks762 // add cget: chunks
761 func = make_new_mfun( "int", "chunks", sndbuf_cget_chunks );763 func = make_new_mfun( "int", "chunks", sndbuf_cget_chunks );
762 func->doc = "Chunk size, in frames, for loading the file from disk. 0 indicates that chunking is disabled.";764 func->doc = "get chunk size, in frames, for loading the file from disk. 0 indicates that chunking is disabled.";
763 if( !type_engine_import_mfun( env, func ) ) goto error;765 if( !type_engine_import_mfun( env, func ) ) goto error;
764 766
765 // add cget: samples767 // add cget: samples
766 func = make_new_mfun( "int", "samples", sndbuf_cget_samples );768 func = make_new_mfun( "int", "samples", sndbuf_cget_samples );
767 func->doc = "Total number of sample frames in the file.";769 func->doc = "get total number of sample frames in the file.";
768 if( !type_engine_import_mfun( env, func ) ) goto error;770 if( !type_engine_import_mfun( env, func ) ) goto error;
769 771
770 // add cget: length772 // add cget: length
771 func = make_new_mfun( "dur", "length", sndbuf_cget_length );773 func = make_new_mfun( "dur", "length", sndbuf_cget_length );
772 func->doc = "Total length of the file.";774 func->doc = "get total length of the file as a duration.";
773 if( !type_engine_import_mfun( env, func ) ) goto error;775 if( !type_engine_import_mfun( env, func ) ) goto error;
774 776
775 // add cget: channels777 // add cget: channels
776 func = make_new_mfun( "int", "channels", sndbuf_cget_channels );778 func = make_new_mfun( "int", "channels", sndbuf_cget_channels );
777 func->doc = "Number of channels available in the sound file.";779 func->doc = "get number of channels available in the sound file.";
778 if( !type_engine_import_mfun( env, func ) ) goto error;780 if( !type_engine_import_mfun( env, func ) ) goto error;
779 781
780 // add cget: valueAt782 // add cget: valueAt
781 func = make_new_mfun( "float", "valueAt", sndbuf_cget_valueAt );783 func = make_new_mfun( "float", "valueAt", sndbuf_cget_valueAt );
782 func->add_arg( "int", "pos" );784 func->add_arg( "int", "pos" );
783 func->doc = "Sample value at given position (in samples). ";785 func->doc = "get sample value at given position (in samples). ";
784 if( !type_engine_import_mfun( env, func ) ) goto error;786 if( !type_engine_import_mfun( env, func ) ) goto error;
785 787
786 // end import788 // end import
@@ -791,7 +793,7 @@ DLL_QUERY xxx_query( Chuck_DL_Query * QUERY ) · 4 unmodified lines
791 //---------------------------------------------------------------------793 //---------------------------------------------------------------------
792 // init as base class: SndBuf2794 // init as base class: SndBuf2
793 //---------------------------------------------------------------------795 //---------------------------------------------------------------------
794 doc = "Interpolating sound buffer with two-channel output. Reads from a variety of uncompressed formats.";796 doc = "a interpolating sound buffer with two-channel output. Reads from a variety of uncompressed formats.";
795 if( !type_engine_import_ugen_begin( env, "SndBuf2", "SndBuf", env->global(),797 if( !type_engine_import_ugen_begin( env, "SndBuf2", "SndBuf", env->global(),
796 NULL, NULL,798 NULL, NULL,
797 NULL, sndbuf_tickf, NULL, 2, 2, doc.c_str() ) )799 NULL, sndbuf_tickf, NULL, 2, 2, doc.c_str() ) )
@@ -807,7 +809,7 @@ DLL_QUERY xxx_query( Chuck_DL_Query * QUERY ) · 9 unmodified lines
807 //---------------------------------------------------------------------809 //---------------------------------------------------------------------
808 // init as base class: Dyno810 // init as base class: Dyno
809 //---------------------------------------------------------------------811 //---------------------------------------------------------------------
810 doc = "Dynamics processor. Includes limiter, compressor, expander, noise gate, and ducker presets. ";812 doc = "a dynamics processor. Includes presets for limiter, compressor, expander, noise gate, and ducker.";
811 if( !type_engine_import_ugen_begin( env, "Dyno", "UGen", env->global(), 813 if( !type_engine_import_ugen_begin( env, "Dyno", "UGen", env->global(),
812 dyno_ctor, dyno_dtor, dyno_tick, NULL, doc.c_str() ) )814 dyno_ctor, dyno_dtor, dyno_tick, NULL, doc.c_str() ) )
813 return FALSE;815 return FALSE;
@@ -823,119 +825,119 @@ DLL_QUERY xxx_query( Chuck_DL_Query * QUERY ) · 9 unmodified lines
823 // add ctrl: limit825 // add ctrl: limit
824 func = make_new_mfun( "void", "limit", dyno_ctrl_limit );826 func = make_new_mfun( "void", "limit", dyno_ctrl_limit );
825 //func->add_arg( "string", "mode" );827 //func->add_arg( "string", "mode" );
826 func->doc = "Set parameters to default limiter values. slopeAbove = 0.1, slopeBelow = 1.0, thresh = 0.5, attackTime = 5 ms, releaseTime = 300 ms, externalSideInput = 0 (false)";828 func->doc = "set parameters to default limiter values: slopeAbove = 0.1, slopeBelow = 1.0, thresh = 0.5, attackTime = 5 ms, releaseTime = 300 ms, externalSideInput = 0 (false)";
827 if( !type_engine_import_mfun( env, func ) ) goto error;829 if( !type_engine_import_mfun( env, func ) ) goto error;
828 830
829 // add ctrl: compress831 // add ctrl: compress
830 func = make_new_mfun( "void", "compress", dyno_ctrl_compress );832 func = make_new_mfun( "void", "compress", dyno_ctrl_compress );
831 //func->add_arg( "string", "mode" );833 //func->add_arg( "string", "mode" );
832 func->doc = "Set parameters to default compressor values.";834 func->doc = "set parameters to default compressor values.";
833 if( !type_engine_import_mfun( env, func ) ) goto error;835 if( !type_engine_import_mfun( env, func ) ) goto error;
834 836
835 // add ctrl: gate837 // add ctrl: gate
836 func = make_new_mfun( "void", "gate", dyno_ctrl_gate );838 func = make_new_mfun( "void", "gate", dyno_ctrl_gate );
837 //func->add_arg( "string", "mode" );839 //func->add_arg( "string", "mode" );
838 func->doc = "Set parameters to default noise gate values.";840 func->doc = "set parameters to default noise gate values.";
839 if( !type_engine_import_mfun( env, func ) ) goto error;841 if( !type_engine_import_mfun( env, func ) ) goto error;
840 842
841 // add ctrl: expand843 // add ctrl: expand
842 func = make_new_mfun( "void", "expand", dyno_ctrl_expand );844 func = make_new_mfun( "void", "expand", dyno_ctrl_expand );
843 //func->add_arg( "string", "mode" );845 //func->add_arg( "string", "mode" );
844 func->doc = "Set parameters to default expander values.";846 func->doc = "set parameters to default expander values.";
845 if( !type_engine_import_mfun( env, func ) ) goto error;847 if( !type_engine_import_mfun( env, func ) ) goto error;
846 848
847 // add ctrl: duck849 // add ctrl: duck
848 func = make_new_mfun( "void", "duck", dyno_ctrl_duck );850 func = make_new_mfun( "void", "duck", dyno_ctrl_duck );
849 //func->add_arg( "string", "mode" );851 //func->add_arg( "string", "mode" );
850 func->doc = "Set parameters ot default ducker values. ";852 func->doc = "set parameters ot default ducker values.";
851 if( !type_engine_import_mfun( env, func ) ) goto error;853 if( !type_engine_import_mfun( env, func ) ) goto error;
852 854
853 //add ctrl: thresh855 //add ctrl: thresh
854 func = make_new_mfun( "float", "thresh", dyno_ctrl_thresh );856 func = make_new_mfun( "float", "thresh", dyno_ctrl_thresh );
855 func->add_arg( "float", "thresh" );857 func->add_arg( "float", "thresh" );
856 func->doc = "Threshold above which to stop using slopeBelow and start using slopeAbove to determine output gain vs input gain. ";858 func->doc = "set threshold, above which to stop using slopeBelow and start using slopeAbove to determine output gain vs input gain.";
857 if( !type_engine_import_mfun( env, func ) ) goto error;859 if( !type_engine_import_mfun( env, func ) ) goto error;
858 860
859 // add cget: thresh861 // add cget: thresh
860 func = make_new_mfun( "float", "thresh", dyno_cget_thresh );862 func = make_new_mfun( "float", "thresh", dyno_cget_thresh );
861 func->doc = "Threshold above which to stop using slopeBelow and start using slopeAbove to determine output gain vs input gain. ";863 func->doc = "get threshold, above which to stop using slopeBelow and start using slopeAbove to determine output gain vs input gain.";
862 if( !type_engine_import_mfun( env, func ) ) goto error;864 if( !type_engine_import_mfun( env, func ) ) goto error;
863 865
864 //add ctrl: attackTime866 //add ctrl: attackTime
865 func = make_new_mfun( "dur", "attackTime", dyno_ctrl_attackTime );867 func = make_new_mfun( "dur", "attackTime", dyno_ctrl_attackTime );
866 func->add_arg( "dur", "aTime" );868 func->add_arg( "dur", "aTime" );
867 func->doc = "Duration for the envelope to move linearly from current value to the absolute value of the signal's amplitude.";869 func->doc = "set duration for the envelope to move linearly from current value to the absolute value of the signal's amplitude.";
868 if( !type_engine_import_mfun( env, func ) ) goto error;870 if( !type_engine_import_mfun( env, func ) ) goto error;
869 871
870 //add cget: attackTime872 //add cget: attackTime
871 func = make_new_mfun( "dur", "attackTime", dyno_cget_attackTime );873 func = make_new_mfun( "dur", "attackTime", dyno_cget_attackTime );
872 func->doc = "Duration for the envelope to move linearly from current value to the absolute value of the signal's amplitude.";874 func->doc = "get duration for the envelope to move linearly from current value to the absolute value of the signal's amplitude.";
873 if( !type_engine_import_mfun( env, func ) ) goto error;875 if( !type_engine_import_mfun( env, func ) ) goto error;
874 876
875 //add ctrl: releaseTime877 //add ctrl: releaseTime
876 func = make_new_mfun( "dur", "releaseTime", dyno_ctrl_releaseTime );878 func = make_new_mfun( "dur", "releaseTime", dyno_ctrl_releaseTime );
877 func->add_arg( "dur", "rTime" );879 func->add_arg( "dur", "rTime" );
878 func->doc = "Duration for the envelope to decay down to around 1/10 of its current amplitude, if not brought back up by the signal.";880 func->doc = "set duration for the envelope to decay down to around 1/10 of its current amplitude, if not brought back up by the signal.";
879 if( !type_engine_import_mfun( env, func ) ) goto error;881 if( !type_engine_import_mfun( env, func ) ) goto error;
880 882
881 //add ctrl: releaseTime883 //add ctrl: releaseTime
882 func = make_new_mfun( "dur", "releaseTime", dyno_cget_releaseTime );884 func = make_new_mfun( "dur", "releaseTime", dyno_cget_releaseTime );
883 func->doc = "Duration for the envelope to decay down to around 1/10 of its current amplitude, if not brought back up by the signal.";885 func->doc = "get duration for the envelope to decay down to around 1/10 of its current amplitude, if not brought back up by the signal.";
884 if( !type_engine_import_mfun( env, func ) ) goto error;886 if( !type_engine_import_mfun( env, func ) ) goto error;
885 887
886 //add ctrl: ratio888 //add ctrl: ratio
887 func = make_new_mfun( "float", "ratio", dyno_ctrl_ratio );889 func = make_new_mfun( "float", "ratio", dyno_ctrl_ratio );
888 func->add_arg( "float", "ratio" );890 func->add_arg( "float", "ratio" );
889 func->doc = "Alternate way of setting slopeAbove and slopeBelow; sets slopeBelow to 1.0 and slopeAbove to 1.0 / ratio.";891 func->doc = "an alternate way of setting slopeAbove and slopeBelow; sets slopeBelow to 1.0 and slopeAbove to 1.0 / ratio.";
890 if( !type_engine_import_mfun( env, func ) ) goto error;892 if( !type_engine_import_mfun( env, func ) ) goto error;
891 893
892 //add cget: ratio894 //add cget: ratio
893 func = make_new_mfun( "float", "ratio", dyno_cget_ratio );895 func = make_new_mfun( "float", "ratio", dyno_cget_ratio );
894 func->doc = "Alternate way of setting slopeAbove and slopeBelow; sets slopeBelow to 1.0 and slopeAbove to 1.0 / ratio.";896 func->doc = "get the ratio set by .ratio(float); slopeBelow to 1.0 and slopeAbove to 1.0 / ratio.";
895 if( !type_engine_import_mfun( env, func ) ) goto error;897 if( !type_engine_import_mfun( env, func ) ) goto error;
896 898
897 //add ctrl: slopeBelow899 //add ctrl: slopeBelow
898 func = make_new_mfun( "float", "slopeBelow", dyno_ctrl_slopeBelow );900 func = make_new_mfun( "float", "slopeBelow", dyno_ctrl_slopeBelow );
899 func->add_arg( "float", "slopeBelow" );901 func->add_arg( "float", "slopeBelow" );
900 func->doc = "Determines the slope of the output gain vs the input envelope's level when the envelope is below thresh. ";902 func->doc = "set the slope of the output gain vs the input envelope's level when the envelope is below thresh.";
901 if( !type_engine_import_mfun( env, func ) ) goto error;903 if( !type_engine_import_mfun( env, func ) ) goto error;
902 904
903 //add cget: slopeBelow905 //add cget: slopeBelow
904 func = make_new_mfun( "float", "slopeBelow", dyno_cget_slopeBelow );906 func = make_new_mfun( "float", "slopeBelow", dyno_cget_slopeBelow );
905 func->doc = "Determines the slope of the output gain vs the input envelope's level when the envelope is below thresh. ";907 func->doc = "get the slope of the output gain vs the input envelope's level when the envelope is below thresh.";
906 if( !type_engine_import_mfun( env, func ) ) goto error;908 if( !type_engine_import_mfun( env, func ) ) goto error;
907 909
908 //add ctrl: slopeAbove910 //add ctrl: slopeAbove
909 func = make_new_mfun( "float", "slopeAbove", dyno_ctrl_slopeAbove );911 func = make_new_mfun( "float", "slopeAbove", dyno_ctrl_slopeAbove );
910 func->add_arg( "float", "slopeAbove" );912 func->add_arg( "float", "slopeAbove" );
911 func->doc = "Determines the slope of the output gain vs the input envelope's level when the envelope is above thresh. ";913 func->doc = "set the slope of the output gain vs the input envelope's level when the envelope is above thresh.";
912 if( !type_engine_import_mfun( env, func ) ) goto error;914 if( !type_engine_import_mfun( env, func ) ) goto error;
913 915
914 //add cget: slopeAbove916 //add cget: slopeAbove
915 func = make_new_mfun( "float", "slopeAbove", dyno_cget_slopeAbove );917 func = make_new_mfun( "float", "slopeAbove", dyno_cget_slopeAbove );
916 func->doc = "Determines the slope of the output gain vs the input envelope's level when the envelope is above thresh. ";918 func->doc = "get the slope of the output gain vs the input envelope's level when the envelope is above thresh.";
917 if( !type_engine_import_mfun( env, func ) ) goto error;919 if( !type_engine_import_mfun( env, func ) ) goto error;
918 920
919 //add ctrl: sideInput921 //add ctrl: sideInput
920 func = make_new_mfun( "float", "sideInput", dyno_ctrl_sideInput );922 func = make_new_mfun( "float", "sideInput", dyno_ctrl_sideInput );
921 func->add_arg( "float", "sideInput" );923 func->add_arg( "float", "sideInput" );
922 func->doc = "If externalSideInput is set to true, replaces the signal being processed as the input to the amplitude envelope.";924 func->doc = "if externalSideInput is set to true, replace the signal being processed as the input to the amplitude envelope.";
923 if( !type_engine_import_mfun( env, func ) ) goto error;925 if( !type_engine_import_mfun( env, func ) ) goto error;
924 926
925 //add cget: sideInput927 //add cget: sideInput
926 func = make_new_mfun( "float", "sideInput", dyno_cget_sideInput );928 func = make_new_mfun( "float", "sideInput", dyno_cget_sideInput );
927 func->doc = "If externalSideInput is set to true, replaces the signal being processed as the input to the amplitude envelope.";929 func->doc = "if externalSideInput is set to true, replaces the signal being processed as the input to the amplitude envelope.";
928 if( !type_engine_import_mfun( env, func ) ) goto error;930 if( !type_engine_import_mfun( env, func ) ) goto error;
929 931
930 //add ctrl: externalSideInput932 //add ctrl: externalSideInput
931 func = make_new_mfun( "int", "externalSideInput", dyno_ctrl_externalSideInput );933 func = make_new_mfun( "int", "externalSideInput", dyno_ctrl_externalSideInput );
932 func->add_arg( "int", "externalSideInput" );934 func->add_arg( "int", "externalSideInput" );
933 func->doc = "Set to true to cue the amplitude envelope off of sideInput instead of the input signal. Note that this means you will need to manually set sideInput every so often. ";935 func->doc = "set to true to cue the amplitude envelope off of sideInput instead of the input signal. Note that this means you will need to manually set sideInput every so often.";
934 if( !type_engine_import_mfun( env, func ) ) goto error;936 if( !type_engine_import_mfun( env, func ) ) goto error;
935 937
936 //add cget: externalSideInput938 //add cget: externalSideInput
937 func = make_new_mfun( "int", "externalSideInput", dyno_cget_externalSideInput );939 func = make_new_mfun( "int", "externalSideInput", dyno_cget_externalSideInput );
938 func->doc = "Set to true to cue the amplitude envelope off of sideInput instead of the input signal. Note that this means you will need to manually set sideInput every so often. ";940 func->doc = "get externalSideInput state. if set to true, the amplitude envelope will be cued off of sideInput instead of the input signal. Note that this means you will need to manually set sideInput every so often.";
939 if( !type_engine_import_mfun( env, func ) ) goto error;941 if( !type_engine_import_mfun( env, func ) ) goto error;
940 942
941 // end import943 // end import
@@ -978,12 +980,13 @@ DLL_QUERY lisa_query( Chuck_DL_Query * QUERY ) · 36 unmodified lines
978 // - probably don't need the others anymore....980 // - probably don't need the others anymore....
979 // author: Dan Trueman (dan /at/ music.princeton.edu)981 // author: Dan Trueman (dan /at/ music.princeton.edu)
980 //---------------------------------------------------------------------982 //---------------------------------------------------------------------
981 983 string doc = "a (li)ve (sa)mpling unit generator; also popularly used for granular synthesis.";
982 984
985 // begin UGen definition
983 if( !type_engine_import_ugen_begin( env, "LiSa", "UGen", env->global(),986 if( !type_engine_import_ugen_begin( env, "LiSa", "UGen", env->global(),
984 LiSaMulti_ctor, LiSaMulti_dtor,987 LiSaMulti_ctor, LiSaMulti_dtor,
985 LiSaMulti_tick, NULL,988 LiSaMulti_tick, NULL,
986 LiSaMulti_pmsg, 1, 1 ))989 LiSaMulti_pmsg, 1, 1, doc.c_str() ) )
987 return FALSE;990 return FALSE;
988 991
989 // set/get buffer size992 // set/get buffer size
@@ -1230,12 +1233,14 @@ DLL_QUERY lisa_query( Chuck_DL_Query * QUERY ) · 240 unmodified lines
1230 1233
1231 // end the class import1234 // end the class import
1232 type_engine_import_class_end( env );1235 type_engine_import_class_end( env );
1233 1236
1237 // description
1238 doc = "a (li)ve (sa)mpling unit generator (multi-channel edition); also popularly used for granular synthesis.";
1234 // multichannel1239 // multichannel
1235 if( !type_engine_import_ugen_begin( env, "LiSa10", "LiSa", env->global(),1240 if( !type_engine_import_ugen_begin( env, "LiSa10", "LiSa", env->global(),
1236 LiSaMulti_ctor, LiSaMulti_dtor,1241 LiSaMulti_ctor, LiSaMulti_dtor,
1237 NULL, LiSaMulti_tickf,1242 NULL, LiSaMulti_tickf,
1238 LiSaMulti_pmsg, 1, LiSa_channels ))1243 LiSaMulti_pmsg, 1, LiSa_channels, doc.c_str() ) )
1239 return FALSE;1244 return FALSE;
1240 1245
1241 type_engine_import_class_end( env );1246 type_engine_import_class_end( env );
src/core/ulib_opsc.cpp+1−1
@@ -1511,9 +1511,9 @@ CK_DLL_MFUN( osc_address_next_string ) { · 1510 unmodified lines
1511}1511}
1512 1512
1513 1513
1514// OscRecv functions
1515 1514
1516 1515
1516// OscRecv functions
1517//----------------------------------------------1517//----------------------------------------------
1518// name : osc_recv_ctor 1518// name : osc_recv_ctor
1519// desc : CTOR function 1519// desc : CTOR function
src/core/ulib_std.cpp+28−29
@@ -166,146 +166,145 @@ DLL_QUERY libstd_query( Chuck_DL_Query * QUERY ) · 165 unmodified lines
166 166
167 // begin class167 // begin class
168 QUERY->begin_class( QUERY, "Std", "Object" );168 QUERY->begin_class( QUERY, "Std", "Object" );
169 QUERY->doc_class( QUERY, "Std is a standard library in ChucK, which includes utility functions for random number generation, unit conversions, and absolute value." );169 QUERY->doc_class( QUERY, "a standard library in ChucK, which includes utility functions for random number generation, unit conversions, and absolute value." );
170 170
171 // add abs171 // add abs
172 QUERY->add_sfun( QUERY, abs_impl, "int", "abs" );172 QUERY->add_sfun( QUERY, abs_impl, "int", "abs" );
173 QUERY->add_arg( QUERY, "int", "value" );173 QUERY->add_arg( QUERY, "int", "value" );
174 QUERY->doc_func( QUERY, "Return absolute value of integer. " );174 QUERY->doc_func( QUERY, "compute the absolute value of an integer." );
175 175
176 // add fabs176 // add fabs
177 QUERY->add_sfun( QUERY, fabs_impl, "float", "fabs" );177 QUERY->add_sfun( QUERY, fabs_impl, "float", "fabs" );
178 QUERY->add_arg( QUERY, "float", "value" );178 QUERY->add_arg( QUERY, "float", "value" );
179 QUERY->doc_func( QUERY, "Return absolute value of float. " );179 QUERY->doc_func( QUERY, "compute the absolute value of a float." );
180 180
181 // add rand181 // add rand
182 QUERY->add_sfun( QUERY, rand_impl, "int", "rand"); //! return int between 0 and RAND_MAX182 QUERY->add_sfun( QUERY, rand_impl, "int", "rand"); //! return int between 0 and RAND_MAX
183 QUERY->doc_func( QUERY, "Generates random integer between 0 and Std.RAND_MAX. (NOTE: soon-to-be-deprecated; use Math.random2())." );183 QUERY->doc_func( QUERY, "generate a random integer between 0 and Std.RAND_MAX. (NOTE: this is deprecated; use Math.random())." );
184 184
185 // add rand2185 // add rand2
186 QUERY->add_sfun( QUERY, rand2_impl, "int", "rand2" ); //! integer between [min,max]186 QUERY->add_sfun( QUERY, rand2_impl, "int", "rand2" ); //! integer between [min,max]
187 QUERY->add_arg( QUERY, "int", "min" ); 187 QUERY->add_arg( QUERY, "int", "min" );
188 QUERY->add_arg( QUERY, "int", "max" );188 QUERY->add_arg( QUERY, "int", "max" );
189 QUERY->doc_func( QUERY, "Generates random integer in range [min, max]. (NOTE: soon-to-be-deprecated; use Math.random2())." );189 QUERY->doc_func( QUERY, "generate a random integer in range [min, max]. (NOTE: this is deprecated; use Math.random2())." );
190 190
191 // add rand191 // add rand
192 QUERY->add_sfun( QUERY, randf_impl, "float", "randf" ); //! rand between -1.0,1.0192 QUERY->add_sfun( QUERY, randf_impl, "float", "randf" ); //! rand between -1.0,1.0
193 QUERY->doc_func( QUERY, "Generates random floating point number in the range [-1, 1]. (Note: soon-to-be-deprecated; use Math.randomf())" );193 QUERY->doc_func( QUERY, "generates a random floating point number in the range [-1, 1]. (Note: this is deprecated; use Math.randomf())" );
194 194
195 // add rand2195 // add rand2
196 QUERY->add_sfun( QUERY, rand2f_impl, "float", "rand2f" ); //! rand between min and max196 QUERY->add_sfun( QUERY, rand2f_impl, "float", "rand2f" ); //! rand between min and max
197 QUERY->add_arg( QUERY, "float", "min" );197 QUERY->add_arg( QUERY, "float", "min" );
198 QUERY->add_arg( QUERY, "float", "max" );198 QUERY->add_arg( QUERY, "float", "max" );
199 QUERY->doc_func( QUERY, "Generates random floating point number in the range [min, max]. (NOTE: soon-to-be-deprecated; use Math.random2f())" );199 QUERY->doc_func( QUERY, "generate random floating point number in the range [min, max]. (NOTE: this is deprecated; use Math.random2f())" );
200 200
201 // add srand201 // add srand
202 QUERY->add_sfun( QUERY, srand_impl, "void", "srand" );202 QUERY->add_sfun( QUERY, srand_impl, "void", "srand" );
203 QUERY->add_arg( QUERY, "int", "seed" );203 QUERY->add_arg( QUERY, "int", "seed" );
204 QUERY->doc_func( QUERY, "Provide a seed to the random function. Different seeds will generate very different sequences of random numbers even if the seeds are close together. "204 QUERY->doc_func( QUERY, "seed the random number generator. Different seeds will likely generate different sequences of random numbers even if the seeds are close together; alternatively, a sequence of random numbers can be repeated by setting the same seed." );
205 "Alternatively, a sequence of random numbers can be repeated by setting the same seed. " );
206 205
207 // add sgn206 // add sgn
208 QUERY->add_sfun( QUERY, sgn_impl, "float", "sgn" ); //! return sign of value (-1, 0, 1)207 QUERY->add_sfun( QUERY, sgn_impl, "float", "sgn" ); //! return sign of value (-1, 0, 1)
209 QUERY->add_arg( QUERY, "float", "value" );208 QUERY->add_arg( QUERY, "float", "value" );
210 QUERY->doc_func( QUERY, "Computes the sign of the input as -1.0 (negative), 0 (zero), or 1.0 (positive)." );209 QUERY->doc_func( QUERY, "compute the sign of the input as -1.0 (negative), 0 (zero), or 1.0 (positive)." );
211 210
212 // add system211 // add system
213 //! see \example std.ck212 //! see \example std.ck
214 QUERY->add_sfun( QUERY, system_impl, "int", "system" ); //! issue system command213 QUERY->add_sfun( QUERY, system_impl, "int", "system" ); //! issue system command
215 QUERY->add_arg( QUERY, "string", "cmd" );214 QUERY->add_arg( QUERY, "string", "cmd" );
216 QUERY->doc_func( QUERY, "Pass a command to be executed in the shell (requires --caution-to-the-wind command-line flag)." );215 QUERY->doc_func( QUERY, "pass a command to be executed in the shell (requires --caution-to-the-wind flag to be set)." );
217 216
218 // add atoi217 // add atoi
219 QUERY->add_sfun( QUERY, atoi_impl, "int", "atoi" ); //! string to integer218 QUERY->add_sfun( QUERY, atoi_impl, "int", "atoi" ); //! string to integer
220 QUERY->add_arg( QUERY, "string", "value" );219 QUERY->add_arg( QUERY, "string", "value" );
221 QUERY->doc_func( QUERY, "Converts ascii (string) to integer (int)." );220 QUERY->doc_func( QUERY, "convert ascii (string) to integer (int)." );
222 221
223 // add atof222 // add atof
224 QUERY->add_sfun( QUERY, atof_impl, "float", "atof" ); //! string to float223 QUERY->add_sfun( QUERY, atof_impl, "float", "atof" ); //! string to float
225 QUERY->add_arg( QUERY, "string", "value" );224 QUERY->add_arg( QUERY, "string", "value" );
226 QUERY->doc_func( QUERY, "Converts ascii (string) to floating point value (float)." );225 QUERY->doc_func( QUERY, "converts ascii (string) to floating point value (float)." );
227 226
228 // add itoa227 // add itoa
229 QUERY->add_sfun( QUERY, itoa_impl, "string", "itoa" ); //! int to string228 QUERY->add_sfun( QUERY, itoa_impl, "string", "itoa" ); //! int to string
230 QUERY->add_arg( QUERY, "int", "i" );229 QUERY->add_arg( QUERY, "int", "i" );
231 QUERY->doc_func( QUERY, "Converts integer (int) to ascii (string)." );230 QUERY->doc_func( QUERY, "converts integer (int) to ascii (string)." );
232 231
233 // add ftoa232 // add ftoa
234 QUERY->add_sfun( QUERY, ftoa_impl, "string", "ftoa" ); //! float to string233 QUERY->add_sfun( QUERY, ftoa_impl, "string", "ftoa" ); //! float to string
235 QUERY->add_arg( QUERY, "float", "f" );234 QUERY->add_arg( QUERY, "float", "f" );
236 QUERY->add_arg( QUERY, "int", "precision" );235 QUERY->add_arg( QUERY, "int", "precision" );
237 QUERY->doc_func( QUERY, "Converts floating point value (float) to ascii (string) with specified precision (number of decimal digits)." );236 QUERY->doc_func( QUERY, "converts floating point value (float) to ascii (string) with specified precision (number of decimal digits)." );
238 237
239 // add ftoi238 // add ftoi
240 QUERY->add_sfun( QUERY, ftoi_impl, "int", "ftoi" ); //! float to int239 QUERY->add_sfun( QUERY, ftoi_impl, "int", "ftoi" ); //! float to int
241 QUERY->add_arg( QUERY, "float", "f" );240 QUERY->add_arg( QUERY, "float", "f" );
242 QUERY->doc_func( QUERY, "Convert float to int. " );241 QUERY->doc_func( QUERY, "convert float to integer. " );
243 242
244 // add getenv243 // add getenv
245 QUERY->add_sfun( QUERY, getenv_impl, "string", "getenv" ); //! fetch environment variable244 QUERY->add_sfun( QUERY, getenv_impl, "string", "getenv" ); //! fetch environment variable
246 QUERY->add_arg( QUERY, "string", "value" );245 QUERY->add_arg( QUERY, "string", "value" );
247 QUERY->doc_func( QUERY, "Returns the value of an environment variable, such as of PATH." );246 QUERY->doc_func( QUERY, "get the value of an environment variable (e.g., PATH)." );
248 247
249 // add setenv248 // add setenv
250 QUERY->add_sfun( QUERY, setenv_impl, "int", "setenv" ); //! set environment variable249 QUERY->add_sfun( QUERY, setenv_impl, "int", "setenv" ); //! set environment variable
251 QUERY->add_arg( QUERY, "string", "key" );250 QUERY->add_arg( QUERY, "string", "key" );
252 QUERY->add_arg( QUERY, "string", "value" );251 QUERY->add_arg( QUERY, "string", "value" );
253 QUERY->doc_func( QUERY, "Set value of environment variable named key to value." );252 QUERY->doc_func( QUERY, "set the value of environment variable named 'key'" );
254 253
255 // add mtof254 // add mtof
256 //! see \example mand-o-matic.ck255 //! see \example mand-o-matic.ck
257 QUERY->add_sfun( QUERY, mtof_impl, "float", "mtof" ); //! midi note to frequency256 QUERY->add_sfun( QUERY, mtof_impl, "float", "mtof" ); //! midi note to frequency
258 QUERY->add_arg( QUERY, "float", "value" );257 QUERY->add_arg( QUERY, "float", "value" );
259 QUERY->doc_func( QUERY, "Converts a MIDI note number to frequency (Hz). Note the input value is of type float (supports fractional note number)." );258 QUERY->doc_func( QUERY, "convert a MIDI note number to frequency (Hz). MIDI note 60 is Middle C; each whole number is one semitone; the input type is float and supports fractional note numbers." );
260 259
261 // add ftom260 // add ftom
262 QUERY->add_sfun( QUERY, ftom_impl, "float", "ftom" ); //! frequency to midi note261 QUERY->add_sfun( QUERY, ftom_impl, "float", "ftom" ); //! frequency to midi note
263 QUERY->add_arg( QUERY, "float", "value" );262 QUERY->add_arg( QUERY, "float", "value" );
264 QUERY->doc_func( QUERY, "Converts frequency (Hz) to MIDI note number space." );263 QUERY->doc_func( QUERY, "convert frequency (Hz) to corresponding MIDI note number." );
265 264
266 // add powtodb265 // add powtodb
267 QUERY->add_sfun( QUERY, powtodb_impl, "float", "powtodb" ); //! linear power to decibel 266 QUERY->add_sfun( QUERY, powtodb_impl, "float", "powtodb" ); //! linear power to decibel
268 QUERY->add_arg( QUERY, "float", "value" );267 QUERY->add_arg( QUERY, "float", "value" );
269 QUERY->doc_func( QUERY, "Converts signal power ratio to decibels (dB)." );268 QUERY->doc_func( QUERY, "convert signal power ratio to decibels (dB)." );
270 269
271 // add rmstodb270 // add rmstodb
272 QUERY->add_sfun( QUERY, rmstodb_impl, "float", "rmstodb" ); //! rms to decibel271 QUERY->add_sfun( QUERY, rmstodb_impl, "float", "rmstodb" ); //! rms to decibel
273 QUERY->add_arg( QUERY, "float", "value" );272 QUERY->add_arg( QUERY, "float", "value" );
274 QUERY->doc_func( QUERY, "Converts rms to decibels (dB)." );273 QUERY->doc_func( QUERY, "converts rms to decibels (dB)." );
275 274
276 // add dbtopow275 // add dbtopow
277 QUERY->add_sfun( QUERY, dbtopow_impl, "float", "dbtopow" ); //! decibel to linear276 QUERY->add_sfun( QUERY, dbtopow_impl, "float", "dbtopow" ); //! decibel to linear
278 QUERY->add_arg( QUERY, "float", "value" );277 QUERY->add_arg( QUERY, "float", "value" );
279 QUERY->doc_func( QUERY, "Converts decibels (dB) to signal power ratio." );278 QUERY->doc_func( QUERY, "converts decibels (dB) to signal power ratio." );
280 279
281 // add dbtorms280 // add dbtorms
282 QUERY->add_sfun( QUERY, dbtorms_impl, "float", "dbtorms" ); //! decibel to rms281 QUERY->add_sfun( QUERY, dbtorms_impl, "float", "dbtorms" ); //! decibel to rms
283 QUERY->add_arg( QUERY, "float", "value" );282 QUERY->add_arg( QUERY, "float", "value" );
284 QUERY->doc_func( QUERY, "Convert " );283 QUERY->doc_func( QUERY, "convert decibles (dB) to RMS." );
285 284
286 // add dbtolin285 // add dbtolin
287 QUERY->add_sfun( QUERY, dbtolin_impl, "float", "dbtolin" ); //! decibel to linear286 QUERY->add_sfun( QUERY, dbtolin_impl, "float", "dbtolin" ); //! decibel to linear
288 QUERY->add_arg( QUERY, "float", "value" );287 QUERY->add_arg( QUERY, "float", "value" );
289 QUERY->doc_func( QUERY, "" );288 QUERY->doc_func( QUERY, "convert decibels (dB) to linear." );
290 289
291 // add lintodb290 // add lintodb
292 QUERY->add_sfun( QUERY, lintodb_impl, "float", "lintodb" ); //! linear to decibel291 QUERY->add_sfun( QUERY, lintodb_impl, "float", "lintodb" ); //! linear to decibel
293 QUERY->add_arg( QUERY, "float", "value" );292 QUERY->add_arg( QUERY, "float", "value" );
294 QUERY->doc_func( QUERY, "" );293 QUERY->doc_func( QUERY, "convert linear to decibels (dB)." );
295 294
296 // add clamp295 // add clamp
297 QUERY->add_sfun( QUERY, clamp_impl, "int", "clamp" ); //! clamp to range (int)296 QUERY->add_sfun( QUERY, clamp_impl, "int", "clamp" ); //! clamp to range (int)
298 QUERY->add_arg( QUERY, "int", "value" );297 QUERY->add_arg( QUERY, "int", "value" );
299 QUERY->add_arg( QUERY, "int", "min" );298 QUERY->add_arg( QUERY, "int", "min" );
300 QUERY->add_arg( QUERY, "int", "max" );299 QUERY->add_arg( QUERY, "int", "max" );
301 QUERY->doc_func( QUERY, "" );300 QUERY->doc_func( QUERY, "clamp an integer to range [min,max]." );
302 301
303 // add clampf302 // add clampf
304 QUERY->add_sfun( QUERY, clampf_impl, "float", "clampf" ); //! clamp to range (float)303 QUERY->add_sfun( QUERY, clampf_impl, "float", "clampf" ); //! clamp to range (float)
305 QUERY->add_arg( QUERY, "float", "value" );304 QUERY->add_arg( QUERY, "float", "value" );
306 QUERY->add_arg( QUERY, "float", "min" );305 QUERY->add_arg( QUERY, "float", "min" );
307 QUERY->add_arg( QUERY, "float", "max" );306 QUERY->add_arg( QUERY, "float", "max" );
308 QUERY->doc_func( QUERY, "" );307 QUERY->doc_func( QUERY, "clamp a float to range [min,max]." );
309 308
310 // add scalef309 // add scalef
311 QUERY->add_sfun( QUERY, scalef_impl, "float", "scalef" ); //! scale from source range to dest range (float)310 QUERY->add_sfun( QUERY, scalef_impl, "float", "scalef" ); //! scale from source range to dest range (float)
@@ -314,7 +313,7 @@ DLL_QUERY libstd_query( Chuck_DL_Query * QUERY ) · 2 unmodified lines
314 QUERY->add_arg( QUERY, "float", "srcmax" );313 QUERY->add_arg( QUERY, "float", "srcmax" );
315 QUERY->add_arg( QUERY, "float", "dstmin" );314 QUERY->add_arg( QUERY, "float", "dstmin" );
316 QUERY->add_arg( QUERY, "float", "dstmax" );315 QUERY->add_arg( QUERY, "float", "dstmax" );
317 QUERY->doc_func( QUERY, "" );316 QUERY->doc_func( QUERY, "scale from a source range to a destination range." );
318 317
319 // finish class318 // finish class
320 QUERY->end_class( QUERY );319 QUERY->end_class( QUERY );

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t