Showing the changes to src (9 of 9 files). Show all
Unified · Split
| @@ -93,7 +93,7 @@ t_CKBOOL init_class_io( Chuck_Env * env, Chuck_Type * type ) · 92 unmodified lines | |||
| 93 | { | 93 | { |
| 94 | // init as base class | 94 | // init as base class |
| 95 | Chuck_DL_Func * func = NULL; | 95 | Chuck_DL_Func * func = NULL; |
| 96 | std::string doc = ""; | 96 | std::string doc = "Base class for other IO classes such as FileIO, StdOut and StdErr. Besides IO.newline(), it’s unlikely you need to use this class directly."; |
| 97 | 97 | ||
| 98 | // log | 98 | // log |
| 99 | EM_log( CK_LOG_SEVERE, "class 'IO'" ); | 99 | EM_log( CK_LOG_SEVERE, "class 'IO'" ); |
| @@ -272,7 +272,8 @@ t_CKBOOL init_class_fileio( Chuck_Env * env, Chuck_Type * type ) · 172 unmodified lines | |||
| 272 | // init as base class | 272 | // init as base class |
| 273 | // TODO: ctor/dtor? | 273 | // TODO: ctor/dtor? |
| 274 | // TODO: replace dummy with pure function | 274 | // TODO: replace dummy with pure function |
| 275 | if( !type_engine_import_class_begin( env, type, env->global(), fileio_ctor, fileio_dtor ) ) | 275 | if( !type_engine_import_class_begin( env, type, env->global(), fileio_ctor, fileio_dtor, |
| 276 | "Helper class doing file-related operations such as reading, writing, seeking, etc. See examples for usage." ) ) | ||
| 276 | return FALSE; | 277 | return FALSE; |
| 277 | 278 | ||
| 278 | // add open(string) | 279 | // add open(string) |
| @@ -444,7 +445,7 @@ t_CKBOOL init_class_chout( Chuck_Env * env, Chuck_Type * type ) · 165 unmodified lines | |||
| 444 | EM_log( CK_LOG_SEVERE, "class 'chout'" ); | 445 | EM_log( CK_LOG_SEVERE, "class 'chout'" ); |
| 445 | 446 | ||
| 446 | // TODO: ctor/dtor? | 447 | // TODO: ctor/dtor? |
| 447 | if( !type_engine_import_class_begin( env, type, env->global(), NULL, NULL ) ) | 448 | if( !type_engine_import_class_begin( env, type, env->global(), NULL, NULL, "Do not instantiate this class directly! Use `chout` instead." ) ) |
| 448 | return FALSE; | 449 | return FALSE; |
| 449 | 450 | ||
| 450 | // add good() | 451 | // add good() |
| @@ -537,7 +538,7 @@ t_CKBOOL init_class_cherr( Chuck_Env * env, Chuck_Type * type ) · 86 unmodified lines | |||
| 537 | EM_log( CK_LOG_SEVERE, "class 'cherr'" ); | 538 | EM_log( CK_LOG_SEVERE, "class 'cherr'" ); |
| 538 | 539 | ||
| 539 | // TODO: ctor/dtor? | 540 | // TODO: ctor/dtor? |
| 540 | if( !type_engine_import_class_begin( env, type, env->global(), NULL, NULL ) ) | 541 | if( !type_engine_import_class_begin( env, type, env->global(), NULL, NULL, "Do not instantiate this class directly! Use `cherr` instead." ) ) |
| 541 | return FALSE; | 542 | return FALSE; |
| 542 | 543 | ||
| 543 | // add good() | 544 | // add good() |
| @@ -308,7 +308,7 @@ DLL_QUERY extract_query( Chuck_DL_Query * QUERY ) · 307 unmodified lines | |||
| 308 | //--------------------------------------------------------------------- | 308 | //--------------------------------------------------------------------- |
| 309 | 309 | ||
| 310 | doc = | 310 | doc = |
| 311 | "A unit analyzer that computes the RMS power mean from a magnitude spectrum (either from an incoming UAna, or given manually), and outputs a single number."; | 311 | "A unit analyzer that computes the root-mean-square (RMS) power mean from a magnitude spectrum (either from an incoming UAna, or given manually), and outputs a single number."; |
| 312 | 312 | ||
| 313 | if( !type_engine_import_uana_begin( env, "RMS", "UAna", env->global(), | 313 | if( !type_engine_import_uana_begin( env, "RMS", "UAna", env->global(), |
| 314 | NULL, NULL, | 314 | NULL, NULL, |
| @@ -535,7 +535,6 @@ DLL_QUERY extract_query( Chuck_DL_Query * QUERY ) · 220 unmodified lines | |||
| 535 | //--------------------------------------------------------------------- | 535 | //--------------------------------------------------------------------- |
| 536 | // init as base class: RollOff | 536 | // init as base class: RollOff |
| 537 | //--------------------------------------------------------------------- | 537 | //--------------------------------------------------------------------- |
| 538 | |||
| 539 | doc = | 538 | doc = |
| 540 | "A unit analyzer that computes the spectral rolloff from a magnitude spectrum (either from incoming UAna, or given manually), and outputs a single number."; | 539 | "A unit analyzer that computes the spectral rolloff from a magnitude spectrum (either from incoming UAna, or given manually), and outputs a single number."; |
| 541 | 540 | ||
| @@ -578,9 +577,14 @@ DLL_QUERY extract_query( Chuck_DL_Query * QUERY ) · 36 unmodified lines | |||
| 578 | //--------------------------------------------------------------------- | 577 | //--------------------------------------------------------------------- |
| 579 | // init as base class: AutoCorr | 578 | // init as base class: AutoCorr |
| 580 | //--------------------------------------------------------------------- | 579 | //--------------------------------------------------------------------- |
| 580 | doc = | ||
| 581 | "A unit analyzer that computes auto-correlation of the incoming analysis frame."; | ||
| 582 | |||
| 581 | if( !type_engine_import_uana_begin( env, "AutoCorr", "UAna", env->global(), | 583 | if( !type_engine_import_uana_begin( env, "AutoCorr", "UAna", env->global(), |
| 582 | AutoCorr_ctor, AutoCorr_dtor, | 584 | AutoCorr_ctor, AutoCorr_dtor, |
| 583 | AutoCorr_tick, AutoCorr_tock, AutoCorr_pmsg ) ) | 585 | AutoCorr_tick, AutoCorr_tock, AutoCorr_pmsg, |
| 586 | CK_NO_VALUE, CK_NO_VALUE, CK_NO_VALUE, CK_NO_VALUE, | ||
| 587 | doc.c_str() ) ) | ||
| 584 | return FALSE; | 588 | return FALSE; |
| 585 | 589 | ||
| 586 | // data offset | 590 | // data offset |
| @@ -612,9 +616,14 @@ DLL_QUERY extract_query( Chuck_DL_Query * QUERY ) · 25 unmodified lines | |||
| 612 | //--------------------------------------------------------------------- | 616 | //--------------------------------------------------------------------- |
| 613 | // init as base class: XCorr | 617 | // init as base class: XCorr |
| 614 | //--------------------------------------------------------------------- | 618 | //--------------------------------------------------------------------- |
| 619 | doc = | ||
| 620 | "A unit analyzer that computes cross-correlation between two incoming analysis frames."; | ||
| 621 | |||
| 615 | if( !type_engine_import_uana_begin( env, "XCorr", "UAna", env->global(), | 622 | if( !type_engine_import_uana_begin( env, "XCorr", "UAna", env->global(), |
| 616 | XCorr_ctor, XCorr_dtor, | 623 | XCorr_ctor, XCorr_dtor, |
| 617 | XCorr_tick, XCorr_tock, XCorr_pmsg ) ) | 624 | XCorr_tick, XCorr_tock, XCorr_pmsg, |
| 625 | CK_NO_VALUE, CK_NO_VALUE, CK_NO_VALUE, CK_NO_VALUE, | ||
| 626 | doc.c_str() ) ) | ||
| 618 | return FALSE; | 627 | return FALSE; |
| 619 | 628 | ||
| 620 | // data offset | 629 | // data offset |
| @@ -277,6 +277,11 @@ DLL_QUERY xform_query( Chuck_DL_Query * QUERY ) · 276 unmodified lines | |||
| 277 | func->doc = "Manually take IFFT (as opposed to using .upchuck() / upchuck operator)"; | 277 | func->doc = "Manually take IFFT (as opposed to using .upchuck() / upchuck operator)"; |
| 278 | if( !type_engine_import_mfun( env, func ) ) goto error; | 278 | if( !type_engine_import_mfun( env, func ) ) goto error; |
| 279 | 279 | ||
| 280 | // add examples | ||
| 281 | if( !type_engine_import_add_ex( env, "analysis/ifft.ck" ) ) goto error; | ||
| 282 | if( !type_engine_import_add_ex( env, "analysis/ifft2.ck" ) ) goto error; | ||
| 283 | if( !type_engine_import_add_ex( env, "analysis/ifft3.ck" ) ) goto error; | ||
| 284 | |||
| 280 | // end the class import | 285 | // end the class import |
| 281 | type_engine_import_class_end( env ); | 286 | type_engine_import_class_end( env ); |
| 282 | 287 | ||
| @@ -436,6 +441,9 @@ DLL_QUERY xform_query( Chuck_DL_Query * QUERY ) · 153 unmodified lines | |||
| 436 | func->doc = "Manually take pilF (as opposed to using .upchuck() / upchuck operator)"; | 441 | func->doc = "Manually take pilF (as opposed to using .upchuck() / upchuck operator)"; |
| 437 | if( !type_engine_import_mfun( env, func ) ) goto error; | 442 | if( !type_engine_import_mfun( env, func ) ) goto error; |
| 438 | 443 | ||
| 444 | // add example | ||
| 445 | if( !type_engine_import_add_ex( env, "analysis/flip.ck" ) ) goto error; | ||
| 446 | |||
| 439 | // end the class import | 447 | // end the class import |
| 440 | type_engine_import_class_end( env ); | 448 | type_engine_import_class_end( env ); |
| 441 | 449 | ||
| @@ -1139,10 +1139,9 @@ DLL_QUERY genX_query( Chuck_DL_Query * QUERY ) · 1138 unmodified lines | |||
| 1139 | type_engine_import_class_end( env ); | 1139 | type_engine_import_class_end( env ); |
| 1140 | 1140 | ||
| 1141 | //--------------------------------------------------------------------- | 1141 | //--------------------------------------------------------------------- |
| 1142 | // Warp | 1142 | // WarpTable |
| 1143 | //--------------------------------------------------------------------- | 1143 | //--------------------------------------------------------------------- |
| 1144 | doc = "..."; | 1144 | doc = "An end-constrained mapping table, mostly useful for conditioning control signals."; |
| 1145 | |||
| 1146 | if( !type_engine_import_ugen_begin( env, "WarpTable", "GenX", env->global(), | 1145 | if( !type_engine_import_ugen_begin( env, "WarpTable", "GenX", env->global(), |
| 1147 | NULL, NULL, genX_tick, NULL, doc.c_str() ) ) | 1146 | NULL, NULL, genX_tick, NULL, doc.c_str() ) ) |
| 1148 | return FALSE; | 1147 | return FALSE; |
| @@ -1159,6 +1158,9 @@ DLL_QUERY genX_query( Chuck_DL_Query * QUERY ) · 10 unmodified lines | |||
| 1159 | if( !type_engine_import_mfun( env, func ) ) goto error; | 1158 | if( !type_engine_import_mfun( env, func ) ) goto error; |
| 1160 | */ | 1159 | */ |
| 1161 | 1160 | ||
| 1161 | // add examples | ||
| 1162 | if( !type_engine_import_add_ex( env, "special/GenX-WarpTable-test.ck" ) ) goto error; | ||
| 1163 | |||
| 1162 | // end the class import | 1164 | // end the class import |
| 1163 | type_engine_import_class_end( env ); | 1165 | type_engine_import_class_end( env ); |
| 1164 | 1166 | ||
| @@ -2932,7 +2932,7 @@ Phoneme Names:\n\ · 2931 unmodified lines | |||
| 2932 | // begin FM ugen | 2932 | // begin FM ugen |
| 2933 | //------------------------------------------------------------------------ | 2933 | //------------------------------------------------------------------------ |
| 2934 | 2934 | ||
| 2935 | doc = "STK FM synthesis super class.\n\ | 2935 | doc = "STK FM synthesis super class. You should NOT need to use this UGen directly. Please refer to the documentation on FM subclasses instead.\n\ |
| 2936 | \n\ | 2936 | \n\ |
| 2937 | This class controls an arbitrary number of waves and envelopes, determined via a constructor argument.\n\ | 2937 | This class controls an arbitrary number of waves and envelopes, determined via a constructor argument.\n\ |
| 2938 | \n\ | 2938 | \n\ |
| @@ -3990,7 +3990,8 @@ by Perry R. Cook and Gary P. Scavone, 1995 - 2002."; · 1051 unmodified lines | |||
| 3990 | 3990 | ||
| 3991 | if( !type_engine_import_ugen_begin( env, "FilterStk", "UGen", env->global(), | 3991 | if( !type_engine_import_ugen_begin( env, "FilterStk", "UGen", env->global(), |
| 3992 | FilterStk_ctor, FilterStk_dtor, | 3992 | FilterStk_ctor, FilterStk_dtor, |
| 3993 | FilterStk_tick, FilterStk_pmsg ) ) return FALSE; | 3993 | FilterStk_tick, FilterStk_pmsg, |
| 3994 | "FilterStk is an STK Filter base class inherited by all Stk Filter UGens such as BiQuad, TwoZero, PoleZero, etc. You should NOT need to use this UGen directly. Please refer to the documentation on other filter types instead." ) ) return FALSE; | ||
| 3994 | // member variable | 3995 | // member variable |
| 3995 | FilterStk_offset_data = type_engine_import_mvar ( env, "int", "@FilterStk_data", FALSE ); | 3996 | FilterStk_offset_data = type_engine_import_mvar ( env, "int", "@FilterStk_data", FALSE ); |
| 3996 | if( FilterStk_offset_data == CK_INVALID_OFFSET ) goto error; | 3997 | if( FilterStk_offset_data == CK_INVALID_OFFSET ) goto error; |
| @@ -4480,7 +4481,7 @@ by Perry R. Cook and Gary P. Scavone, 1995 - 2002."; · 483 unmodified lines | |||
| 4480 | if( !type_engine_import_mfun( env, func ) ) goto error; | 4481 | if( !type_engine_import_mfun( env, func ) ) goto error; |
| 4481 | 4482 | ||
| 4482 | // add examples | 4483 | // add examples |
| 4483 | if( !type_engine_import_add_ex( env, "stk/chorus.ck" ) ) goto error; | 4484 | if( !type_engine_import_add_ex( env, "effects/chorus.ck" ) ) goto error; |
| 4484 | 4485 | ||
| 4485 | // end the class import | 4486 | // end the class import |
| 4486 | type_engine_import_class_end( env ); | 4487 | type_engine_import_class_end( env ); |
| @@ -4609,6 +4610,10 @@ by Perry R. Cook and Gary P. Scavone, 1995 - 2002."; · 122 unmodified lines | |||
| 4609 | func->doc = "get subsampling rate"; | 4610 | func->doc = "get subsampling rate"; |
| 4610 | if( !type_engine_import_mfun( env, func ) ) goto error; | 4611 | if( !type_engine_import_mfun( env, func ) ) goto error; |
| 4611 | 4612 | ||
| 4613 | // add examples | ||
| 4614 | if( !type_engine_import_add_ex( env, "stk/subnoise-control.ck" ) ) goto error; | ||
| 4615 | if( !type_engine_import_add_ex( env, "stk/subnoise-audio.ck" ) ) goto error; | ||
| 4616 | |||
| 4612 | // end the class import | 4617 | // end the class import |
| 4613 | type_engine_import_class_end( env ); | 4618 | type_engine_import_class_end( env ); |
| 4614 | 4619 | ||
| @@ -1072,7 +1072,9 @@ DLL_QUERY lisa_query( Chuck_DL_Query * QUERY ) · 1071 unmodified lines | |||
| 1072 | Multiple voice facility is built in, allowing for a single\ | 1072 | Multiple voice facility is built in, allowing for a single\ |
| 1073 | LiSa object to serve as a source for sample layering and\ | 1073 | LiSa object to serve as a source for sample layering and\ |
| 1074 | granular textures.\ | 1074 | granular textures.\ |
| 1075 | by Dan Trueman (2007)"; | 1075 | by Dan Trueman (2007)\n\ |
| 1076 | See also: a slowly growing <a target=\"_blank\" href=\"../program/lisa/tutorial-1.html\">tutorial</a>\ | ||
| 1077 | | <a target=\"_blank\" href=\"../examples/#lisa\">LiSa examples</a> in the ChucK distribution | <a target=\"_blank\" href=\"https://www.youtube.com/watch?v=7F75v_73pF4\">video tutorial</a> by Clint Hoagland."; | ||
| 1076 | if( !type_engine_import_ugen_begin( env, "LiSa", "UGen", env->global(), | 1078 | if( !type_engine_import_ugen_begin( env, "LiSa", "UGen", env->global(), |
| 1077 | LiSaMulti_ctor, LiSaMulti_dtor, | 1079 | LiSaMulti_ctor, LiSaMulti_dtor, |
| 1078 | LiSaMulti_tick, NULL, | 1080 | LiSaMulti_tick, NULL, |
| @@ -305,8 +305,8 @@ public: · 304 unmodified lines | |||
| 305 | { | 305 | { |
| 306 | m_outputStr += "<a name=\"top\"/>\n"; | 306 | m_outputStr += "<a name=\"top\"/>\n"; |
| 307 | m_outputStr += "<div id=\"title\">\n"; | 307 | m_outputStr += "<div id=\"title\">\n"; |
| 308 | m_outputStr += "<div class=\"titleL\"><h1>" + m_title + "</h1></div>\n"; | 308 | m_outputStr += "<div class=\"titleL\"><h1><a href=\"./\">ChucK Class Library Reference</a></h1></div>\n"; |
| 309 | m_outputStr += "<div class=\"titleR\"><h1><a href=\"index.html\">ChucK Class Library Reference</a></h1></div>\n"; | 309 | m_outputStr += "<h1> <span style=\"color:black\">/</span> " + m_title + "</h1></div>\n"; |
| 310 | m_outputStr += "</div>\n"; // #title | 310 | m_outputStr += "</div>\n"; // #title |
| 311 | } | 311 | } |
| 312 | 312 | ||
| @@ -395,8 +395,8 @@ DLL_QUERY libstd_query( Chuck_DL_Query * QUERY ) · 394 unmodified lines | |||
| 395 | #ifndef __DISABLE_PROMPTER__ | 395 | #ifndef __DISABLE_PROMPTER__ |
| 396 | // begin class (Skot) | 396 | // begin class (Skot) |
| 397 | if( !type_engine_import_class_begin( env, "ConsoleInput", "Event", | 397 | if( !type_engine_import_class_begin( env, "ConsoleInput", "Event", |
| 398 | env->global(), Skot_ctor, | 398 | env->global(), Skot_ctor, Skot_dtor, |
| 399 | Skot_dtor ) ) | 399 | "(Terminal only) a utility for prompting user input on the command line." ) ) |
| 400 | return FALSE; | 400 | return FALSE; |
| 401 | 401 | ||
| 402 | // add member variable | 402 | // add member variable |
| @@ -405,25 +405,35 @@ DLL_QUERY libstd_query( Chuck_DL_Query * QUERY ) · 2 unmodified lines | |||
| 405 | 405 | ||
| 406 | // add prompt() | 406 | // add prompt() |
| 407 | func = make_new_mfun( "Event", "prompt", Skot_prompt ); | 407 | func = make_new_mfun( "Event", "prompt", Skot_prompt ); |
| 408 | func->doc = "Return an Event to wait on."; | ||
| 408 | if( !type_engine_import_mfun( env, func ) ) goto error; | 409 | if( !type_engine_import_mfun( env, func ) ) goto error; |
| 409 | 410 | ||
| 410 | // add prompt() | 411 | // add prompt() |
| 411 | func = make_new_mfun( "Event", "prompt", Skot_prompt2 ); | 412 | func = make_new_mfun( "Event", "prompt", Skot_prompt2 ); |
| 412 | func->add_arg( "string", "what" ); | 413 | func->add_arg( "string", "what" ); |
| 414 | func->doc = "Print a prompt text and return an Event to wait on."; | ||
| 413 | if( !type_engine_import_mfun( env, func ) ) goto error; | 415 | if( !type_engine_import_mfun( env, func ) ) goto error; |
| 414 | 416 | ||
| 415 | // add ready() | 417 | // add more() |
| 416 | func = make_new_mfun( "int", "more", Skot_more ); | 418 | func = make_new_mfun( "int", "more", Skot_more ); |
| 419 | func->doc = "Return whether there is more input to read."; | ||
| 417 | if( !type_engine_import_mfun( env, func ) ) goto error; | 420 | if( !type_engine_import_mfun( env, func ) ) goto error; |
| 418 | 421 | ||
| 419 | // add getString() | 422 | // add getString() |
| 420 | func = make_new_mfun( "string", "getLine", Skot_getLine ); | 423 | func = make_new_mfun( "string", "getLine", Skot_getLine ); |
| 424 | func->doc = "Return the next line of input as a string."; | ||
| 421 | if( !type_engine_import_mfun( env, func ) ) goto error; | 425 | if( !type_engine_import_mfun( env, func ) ) goto error; |
| 422 | 426 | ||
| 423 | // add can_wait() | 427 | // add can_wait() |
| 424 | func = make_new_mfun( "int", "can_wait", Skot_can_wait ); | 428 | func = make_new_mfun( "int", "can_wait", Skot_can_wait ); |
| 429 | func->doc = "(internal) used by virtual machine for synthronization."; | ||
| 425 | if( !type_engine_import_mfun( env, func ) ) goto error; | 430 | if( !type_engine_import_mfun( env, func ) ) goto error; |
| 426 | 431 | ||
| 432 | // add examples | ||
| 433 | if( !type_engine_import_add_ex( env, "string/readline.ck" ) ) goto error; | ||
| 434 | if( !type_engine_import_add_ex( env, "ai/word2vec/word2vec-prompt.ck" ) ) goto error; | ||
| 435 | if( !type_engine_import_add_ex( env, "ai/word2vec/poem-ungenerate.ck" ) ) goto error; | ||
| 436 | |||
| 427 | // end class | 437 | // end class |
| 428 | type_engine_import_class_end( env ); | 438 | type_engine_import_class_end( env ); |
| 429 | #endif // __DISABLE_PROMPTER__ | 439 | #endif // __DISABLE_PROMPTER__ |
| @@ -123,12 +123,12 @@ doc.addGroup( · 122 unmodified lines | |||
| 123 | 123 | ||
| 124 | // add group | 124 | // add group |
| 125 | doc.addGroup( | 125 | doc.addGroup( |
| 126 | [ "IO", "FileIO", "StdOut", "StdErr", | 126 | [ "IO", "FileIO", /* "StdOut", "StdErr", */ |
| 127 | "OscIn", "OscOut", "OscMsg", | 127 | "OscIn", "OscOut", "OscMsg", |
| 128 | "Hid", "HidMsg", "SerialIO", | 128 | "Hid", "HidMsg", "SerialIO", |
| 129 | "MidiIn", "MidiOut", "MidiMsg", "MidiFileIn" ], | 129 | "MidiIn", "MidiOut", "MidiMsg", "MidiFileIn" ], |
| 130 | // group name | 130 | // group name |
| 131 | "Input / Output", | 131 | "Input & Output", |
| 132 | // file name | 132 | // file name |
| 133 | "io", | 133 | "io", |
| 134 | // group descriptions | 134 | // group descriptions |