2883 lines · 126.6 KB · Text
RawDownload
------------------ChucK VERSIONS log------------------ 1.5.0.4 (June 2023)---- (added) Math.randomize() -- implicitly randomize RNG seed  ---  "Randomize the seed of the random number generator (RNG), using an   non-deterministic mechanism. Whereas srandom() explicitly seeds the   RNG and will produce a deterministic sequence of pseudo-random   numbers, randomize() "shakes things up" and causes RNG to start   generating from a practically unpredicable seed. The quality of   randomize() depends on the underlying implementation."- (added) examples    |- math/randomize.ck -- shows Math.randomize() in action    |- math/maybe.ck -- can't decide? flip a coin with maybe    |- math/int-dist.ck -- simulates distribution of Math.random2()- (updated) improved RNG behavior that probably no one will notice- (fixed) assignments into a full array declaration now results in a  compiler error (previously this would cause a crash). for example:  === code ===    [1,2] @=> int foo[2];  === resulting compiler error ===    cannot assign '@=>' to full array declaration...      |- hint: declare right-hand-side as empty array      |- e.g., int foo[]- (note) as before, assignments into a full non-array declaration still   works, effectively treating the right-hand-side declaration as a   reference:  === code ===    // effective same as new Object @=> Object @ foo;    // works as before    new Object @=> Object foo;- (added) --chugin-probe command-line flag to probe (and verify version)  for chugins and auto-load chuck sources in the search paths; print   results and any version mismatches (e.g., `chuck --chugin-probe`)  also, explicited named chugins can be probed using --chugins:[FILE]  (e.g., `chuck --chugin:Foo.chug --chugin:Bar.chug --chugin-probe`) - (added) chugins loading in search directories now will recursively  search in subdirectories- (added, macOS + Linux) ~/.chuck/lib added to the list of default  search directories; this makes it easier to locally install/organize  chugins (and auto-load .ck files) without administrator privilege  ---  macOS    /usr/local/lib/chuck    /Library/Application Support/ChucK/chugins    ~/Library/Application Support/ChucK/chugins    ~/.chuck/lib  Linux    /usr/local/lib/chuck    ~/.chuck/lib  Windows    C:\Windows\system32\ChucK    C:\Program Files\ChucK\chugins    C:\Program Files (x86)\ChucK\chugins    C:\Users\%USERNAME%\Documents\ChucK\chugins  ---- (updated) chuck --verbose output now streamlined and more effectively  describes what is happening under-the-hood; e.g.,    `chuck [FILENAMES] -v2` to see SYSTEM output    `chuck [FILENAMES] -v5` to see INFORM output    `chuck [FILENAMES] -v10` to see ALL!!! output- (updated) setting chuck log level is no longer logged below INFORM  log-level- (fixed, developer) distinct notions of base type reference and array   reference; for example SinOsc @ foo[] -> `SinOsc @` is base type   reference and `foo[]` is array reference- (fixed, developer) instruction dumps (via +d flag) more correctly  prints reference-related (@) declarations and new operations  1.5.0.3 (June 2023)---- (fixed) chuck audio I/O now correctly carries out extended probing  for default input and output devices with differing sample rates,  e.g., with some bluetooth mic/headphones whose input is limited  to 24kHZ, including some AirPods.- (note) beyond the above, this release is a follow-up maintenance  release; please see 1.5.0.1 and earlier release notes  to see recent  feature updates- (updated) examples/README now has more useful information- (updated) README.md streamlined and linux build instructions improved.- (updated, developer) `make linux-all` (or simply `make linux`) now  builds all supported drivers (e.g., ALSA, PulseAudio, JACK); this is  equivalent in outcome to `make linux-alsa linux-pulse linux-jack`- (updated, developer) makefile streamlined  1.5.0.2 (June 2023)---- (note) this is primarily a maintenance release; please see 1.5.0.1  and earlier release notes  to see recent feature updates- (fixed) (jack, linux/unix) port name now accounts for regex meta  characters (thanks @gyroplast and @garyscavone)- (developer) house cleaning on the chuck git repository  |- migrated large files out of 'chuck' and into a new 'chuck-media' repo  |- streamlined release notes and moved to top level  |- removed outdated files  |- added additional information including ChucK History into README.md-- NOTE TO DEVELOPERS --  The Great ChucK Repo Cleanup of 2023 has been completed! As a result, the overall chuck repo size has been reduced from 721MB to 25MB. Since git works by cloning the entire repo and all history, this massively improves the speed of git clone, git submodule update --init in repos that reference chuck, and the size of each chuck clone on disk.   To accomplish this, we had to "rewrite the git history," which is a semi-cataclysmic process for git repos. As a result, all existing clones of the chuck, miniAudicle, and chunity repos as well as branches and pull-requests that reference the older repo *** are now invalid ***. Please do a fresh clone of the chuck/miniAudicle/chunity repos and copy any important changes to these fresh clones before making any further changes to avoid headaches!   NOTE: do not use git pull with your existing, pre-cleanup chuck repo as it will seem to work BUT will put your local repo into a messed up state. A fresh git clone is necessary before proceeding with chuck development! We believe that the cleaner, smoother ChucK dev experience will be worth this short-term inconvenience. Apologies for any confusion that may arise, and thank you for being involved in ChucK development!  A "legacy" pre-cleanup fork of the repository before the Cleanuphas been archived here: https://github.com/spencersalazar/chuck-legacy---miniAudicle (added: few helpful features)- (added) menu "Help" now has items that will open websites in  the default browser:  "ChucK Class Library Reference..."    https://chuck.stanford.edu/doc/reference/  "ChucK Documentation..."    https://chuck.stanford.edu/doc/  "ChucK Community..."    https://chuck.stanford.edu/community/- (updated) menu "Help" now correctly directs user to miniAudicle  and ChucK websites:  "ChucK website..."    https://chuck.stanford.edu/  "miniAudicle website..."    https://github.com/ccrma/miniAudicle/- (added, Windows/Linux) Device Browser now has an "Audio driver"  drop-down box that can select an available driver to view its  associated audio devices  1.5.0.1 (June 2023)---- (added) WvOut support for multiple bit-depths: 16-bit signed int,  24-bit signed int, 32-bit signed int, 32-bit float, 64-bit float- (added) the above can be optionally specified in new overloaded WvOut methods:	string aifFilename( string value, int datatype );	    Open an AIFF file for writing, with datatype (e.g., IO.INT16,	    IO.INT24, IO.INT32, IO.FLOAT32, IO.FLOAT64).	string sndFilename( string value, int datatype );	    Open SND file for writing, with datatype (e.g., IO.INT16, IO.INT24, IO.INT32,	    IO.FLOAT32, IO.FLOAT64).	string wavFilename( string value, int datatype );	    Open WAVE file for writing, with datatype (e.g., IO.INT16, IO.INT24, IO.INT32, IO.FLOAT32, IO.FLOAT64).	string matFilename( string value, int datatype );	    Open MATLAB file for writing; NOTE: datatype for MATLAB files can	    only be IO.FLOAT64.	string rawFilename( string value, int datatype );	    Open a RAW file for writing; NOTE: datatype for raw files can	    only be IO.INT16- (added) examples/stk/wvout-24bit.ck shows writing to a 24-bit audio file- (added) new IO flags: IO.INT24, IO.INT64, IO.FLOAT32, IO.FLOAT64  IO.UINT8, IO.SINT8, IO.UINT16, IO.SINT16, IO.UINT32, IO.SINT32,  IO.UINT64, IO.SINT64- (fixed) (Windows) HID joystick input    |- note: certain joystick devices (including some XBox One gamepads)       are recognized but do not receive input data; a workaround is to       install explicitly HID drivers for these devices; see    |- https://www.snes9x.com/phpbb3/viewtopic.php?t=27510&sid=661fbbc1609037a8ec2e5f10e003f5a0    |- (from above URL): open Device Manager, expand "Human Interface Devices",          right click "XINPUT compatible HID device", "Update driver",       "Browse my computer", "Let me pick". should be three options.       Try "HID-compliant game controller". If you want to undo the       change, same thing but update "HID-compliant game controller"       and pick the XINPUT ***- (updated) BINARY mode for IO now able to read signed vs. unsigned integers,  specified using using .readtInt( flags ), where 'flags' is one of the above  IO flags; in BINARY mode, IO.INT8/16/32 now returns unsigned integers, same as  IO.UINT8/16/32; to read in signed two's complement integers, use the new  IO.SINT8/16/32/64 flags- (added) FileIO.readFloat( int flags) and FileIO.write( float val, int flags )  these overloaded versions of readFloat() and write() respectively have a 'flags'  argument to specify the kind of float (IO.FLOAT32 or IO.FLOAT64)- (added) examples/io/read-wav-raw.ck -- illustrates directly parsing a WAV file  using FileIO in binary mode (author: Perry R. Cook)- (added) examples/special/scream-o-matic/ -- using LiSa + granular  synthesis for a scream texture generator.- (fixed) potential-crash-on-shutdown type system issue- (fixed) CNoise incorrect bias on pink noise (thank you anthonyhawes)- (updated) on all platforms, Math.random*() functions now internally  use a standard Mersenne Twister RNG (mt19937); this greatly improves   the quality of RNG output, especially on Windows- (updated) on Linux, better default runtime driver selection for  Jack and ALSA- (updated/developer) chuck core minimum c++ level raised to c++11;  projects need compile chuck core with earlier dialect of c++ would need  to modify the source code accordingly- (updated/developer) makefile for linux-jack- (updated/developer) migrated RegEx module from base chuck to chugin- (added/developer) DL Api array4 operations from chugin- (added/developer) ChuckArray4::contains_object() returns whether  array4 contains object references or integers---miniAudicle- (updated) on Windows and Linux; miniAudicle now has a "Audio driver"  drop-down selection in the Preferences dialog window; this selections  allows for run-time selection of different drivers, e.g., "DirectSound",  "WASAPI", or "ASIO" on Windows, as well as "Jack", "Pulse", or "ALSA" on  Linux- (fixed) miniAudicle linux compilation using Qt6    |- FYI: needs qscintilla-qt6-devel and qscintilla-qt6)  [Many thanks to Fernando Lopez-Lezcano and Nils Tonnätt]  1.5.0.0 (May 2023)---**************************************************************************** chuck-1.5.0.0 (chai)**************************************************************************** significant addition: ChAI (Chuck + AI)* significant update: WebChucK (ChucK in web browser) + WebChucK IDE* also: new features, new bug fixes, and new bugs!***************************************************************************---(NOTE) WebChucK (ChucK on browsers) [beta] was released during the development of this version. WebChucK IDE (program chuck on the web):https://chuck.stanford.edu/ide/ WebChucK landing page (including using WebChucK in your web projects)https://chuck.stanford.edu/webchuck/---(NOTE) ChAI (ChucK + AI), first appeared in beta as part of chuck-1.4.2.0;ChAI was used in the course Music 356 / CS 470 "Music and AI" [*] atStanford University, taught by Ge Wang and Yikai Li (TA); Many thanks tothe immensely creative students of "Music and AI". The v1.0 version of theChAI API and modules is hereby released, with new additions on the way. ChAI landing page:https://chuck.stanford.edu/chai/ "Music and AI" (Winter 2023 Stanford University) -- taught with ChAIhttps://ccrma.stanford.edu/courses/356-winter-2023/---(HISTORICAL NOTE for ChAI)Much of ChAI and its ways of thinking and doing can be foundationallyattributed to the work of Dr. Rebecca Fiebrink, her landmark Ph.D. Thesis,/Real-time Human Interaction With Supervised Learning Algorithms for MusicComposition and Performance/ (2011) [1], the Wekinator framework [2], herteaching at the intersections of AI, HCI, and Music [3], as well as earliercollaborations between Rebecca and Ge [4,5] including SMIRK [6] (Small MusicalInformation Retrieval toolKit; 2008; MARSYAS and the MIR work of Dr. GeorgeTzanetakis; early efforts in on-the-fly learning), the unit analyzerframework [7] (2007; afford real-time audio feature extraction). All ofthese have directly or indirectly contributed the creation of ChAI.Additionally, ChAI benefitted from the teaching and design philosophy ofDr. Perry R. Cook (Ph.D. advisor to Rebecca, George, and Ge at Princeton,and ChucK co-author), who argued for real-time human interaction, parametricsound synthesis, and the importance of play in the design of musical tools. [1] Fiebrink, Rebecca. 2011. /Real-time Human Interaction With SupervisedLearning Algorithms for Music Composition and Performance/ Ph.D. Thesis.Princeton University. https://www.cs.princeton.edu/techreports/2010/891.pdf[2] http://www.wekinator.org/Wekinator | Software for real-time, interactive machine learning[3] Fiebrink, Rebecca. "Machine Learning for Musicians and Artists" MOOChttps://www.kadenze.com/courses/machine-learning-for-musicians-and-artists/info[4] Fiebrink, R., G. Wang, P. R. Cook. 2008. "Foundations for On-the-flyLearning in the ChucK Programming Language." /International Computer MusicConference/. https://mcd.stanford.edu/publish/files/2008-icmc-learning.pdf[5] Fiebrink, R., G. Wang, P. R. Cook. 2008. "Support for Music InformationRetrieval in the ChucK Programming Language." /International Conferenceon Music Information Retrieval/ (ISMIR).https://mcd.stanford.edu/publish/files/2008-ismir-proto.pdf[6] http://smirk.cs.princeton.edu/sMIRk | Small Music Information Retrieval toolKit[7] Tzanetakis, G. and P. R. Cook. 2000 "MARSYAS: A Framework for AudioAnalysis." Organised Sound. 4:(3)[8] Tzanetakis, G. and P. R. Cook. 2002 "Musical Genre Classification ofAudio Signals." IEEE Transaction on Speech and Audio Processing. 10(5).[9] Wang, G., R. Fiebrink, P. R. Cook. 2007. "Combining Analysis andSynthesis in the ChucK Programming Language." /International ComputerMusic Conference/. https://mcd.stanford.edu/publish/files/2007-icmc-uana.pdf---- (added) Wekinator [ChAI] (thanks Rebecca Fiebrink and Yikai Li)    |- A Wekinator utility that maps input vectors to output vectors,       commonly used for interactive machine learning combining       human-computer interaction and ML. Based on Rebecca Fiebrink's       Wekinator framework.    |- (inheritance) Wekinator -> Object    -------------------	void add();	    Add current inputs and outputs to the observations.	void add( float[] inputs, float[] outputs );	    Add given inputs and outputs to the observations.	void add( int output_index, float[] inputs, float[] outputs );	    Add given inputs and outputs to the observations for the specified output.	void clear();	    Clear everything except the global properties.	void clearAllObs();	    Clear all observations.	void clearAllObs( int output_index );	    Clear all observations for the specified output.	void clearObs( int lo, int hi );	    Clear the observations by id range.	void clearObs( int output_index, int lo, int hi );	    Clear the observations by id range for the specified output.	void deleteLastRound();	    Delete the last round of observations.	void exportObs( string filename );	    Export the observations to a file.	void exportObs( int output_index, string filename );	    Export the observations for the specified output to a file.	int getAllRecordStatus();	    Get the record status for all outputs.	int getAllRunStatus();	    Get the run status for all outputs.	void getObs( float[][] obs );	    Get the observations in the Wekinator.	void getObs( int output_index, float[][] obs );	    Get the observations for the specified output in the Wekinator.	void getOutputProperty( int output_index, string property_name, int[] property_value );	    Get the output property of the Wekinator. See the Wekinator documentation for more information.	float getOutputPropertyFloat( int output_index, int property_type, string property_name );	    Get the output property of the Wekinator. See the Wekinator documentation for more information.	int getOutputPropertyInt( int output_index, string property_name );	    Get the output property of the Wekinator. See the Wekinator documentation for more information.	int getOutputPropertyInt( int output_index, int property_type, string property_name );	    Get the output property of the Wekinator. See the Wekinator documentation for more information.	int getOutputRecordStatus( int output_index );	    Get the record status for the specified output.	int getOutputRunStatus( int output_index );	    Get the run status for the specified output.	float getPropertyFloat( int property_type, string property_name );	    Get the property of the Wekinator. See the Wekinator documentation for more information.	int getPropertyInt( int property_type, string property_name );	    Get the property of the Wekinator. See the Wekinator documentation for more information.	int getRound();	    Get the current recording round.	void importObs( string filename );	    Import the observations from a file.	void input( float[] inputs );	    Set the inputs of the Wekinator.	int inputDims( int n );	    Set the number of input dimensions to Wekinator.	int inputDims();	    Get the number of input dimensions to Wekinator.	void load( string filename );	    Load the Wekinator from a file.	int modelType( int model_type );	    Set the model type of the Wekinator. Options: AI.Regression: AI.MLP, AI.LR,	    AI.Classification: AI.KNN, AI.SVM, AI.DT	int modelType();	    Get the model type id of the Wekinator.	string modelTypeName();	    Get the model type name of the Wekinator.	void nextRound();	    Bump the recording round.	int numObs();	    Get the number of observations in the Wekinator.	int numObs( int output_index );	    Get the number of observations for the specified output in the Wekinator.	void output( float[] outputs );	    Set the outputs of the Wekinator.	int outputDims( int n );	    Set the number of output dimensions to Wekinator.	int outputDims();	    Get the number of output dimensions to Wekinator.	void predict( float[] inputs, float[] outputs );	    Predict outputs for the given inputs.	void randomizeOutputs();	    Randomize the outputs of the Wekinator.	void save( string filename );	    Save the Wekinator to a file.	void setAllRecordStatus( int status );	    Set the record status for all outputs.	void setAllRunStatus( int status );	    Set the run status for all outputs.	void setOutputProperty( int output_index, string property_name, int property_value );	    Set the output property of the Wekinator. See the Wekinator documentation for more information.	void setOutputProperty( int output_index, int property_type, string property_name, int property_value );	    Set the output property of the Wekinator. See the Wekinator documentation for more information.	void setOutputProperty( int output_index, int property_type, string property_name, float property_value );	    Set the output property of the Wekinator. See the Wekinator documentation for more information.	void setOutputProperty( int output_index, string property_name, int[] property_value );	    Set the output property of the Wekinator. See the Wekinator documentation for more information.	void setOutputRecordStatus( int output_index, int status );	    Set the record status for the specified output.	void setOutputRunStatus( int output_index, int status );	    Set the run status for the specified output.	void setProperty( int property_type, string property_name, int property_value );	    Set the property of the Wekinator. See the Wekinator documentation for more information.	void setProperty( int property_type, string property_name, float property_value );	    Set the property of the Wekinator. See the Wekinator documentation for more information.	int taskType( int task_type );	    Set the task type of the Wekinator. Options: AI.Regression, AI.Classification	int taskType();	    Get the task type id of the Wekinator.	string taskTypeName();	    Get the task type name of the Wekinator.	void train();	    Train models for all outputs.- (added) new examples in ai/wekinator [ChAI]    |- wekinator-basic.ck -- example of basic Wekinator usage    |- wekinator-custom.ck -- more extensive customization for Wekinator    |- wekinator-import.ck -- example of importing observations from file- (added) MLP [ChAI] (thanks Yikai Li)    |- a multilayer perceptron (MLP)--a basic artificial neural        network--that maps an input layer to an output layer across a        number of fully-connected hidden layers. This implemention can be        trained either 1) by using one of the comprehensive .train()        functions OR 2) by iteratively calling .forward() and .backprop()        for each input-output observation, and using .shuffle() for each        epoch. Commonly used for regression or classification.    |- (inheritance) MLP -> Object    -------------    void backprop( float[] output, float learningRate );        (Manually) backpropagate from the output layer, for a single input-output        observation; compute the gradient of the loss function with respect to        the weights in the network, one layer at a time.    void forward( float[] input );        (Manually) forward-propagate the input vector through the network.    void getActivations( int layer, float[] activations );        Get the activations of the given layer, after a manual .forward().    void getBiases( int layer, float[] biases );        Get the biases of the given layer.    void getGradients( int layer, float[] gradients );        Get the gradients of the given layer, after a manual .backprop().    int getPropertyInt( int modelType, string key );        Get int property of name 'key' for the given model type (options: AI.MLP, AI.KNN, AI.SVM).    float getPropertyFloat( int modelType, string key );        Get float property of name 'key' for the given model type (options: AI.MLP, AI.KNN, AI.SVM).    void getWeights( int layer, float[][] weights );        Get the weights of the given layer.    void init( int[] unitsPerLayer );        Initialize the MLP with the given number of neurons per layer, as        specified in 'unitsPerLayer'.    void init( int[] nodesPerLayer, int[] activationPerLayer );        Initialize the MLP with the given number of nodes per layer and the given        ctivation function per layer, as specified in 'activationPerLayer'        (options: AI.Linear, AI.Sigmoid, AI.ReLU, AI.Tanh, or AI.Softmax).    void init( int[] nodesPerLayer, int activationFunction );        Initialize the MLP with the given number of nodes per layer and the given        activation function for all layers (options: AI.Linear, AI.Sigmoid,         I.ReLU, AI.Tanh, or AI.Softmax).    int load( string filename );        Load a MLP model from file.    int predict( float[] input, float[] output );        Predict the output layer from an input layer.    void setProperty( int modelType, string key, int value );        Set int property of name 'key' for the given model type (options: AI.MLP, AI.KNN, AI.SVM).    void setProperty( int modelType, string key, float value );        Set float property of name 'key' for the given model type (options: AI.MLP, AI.KNN, AI.SVM).    int save( string filename );        Save the MLP model to file.    void train( float[][] inputs, float[][] outputs );        Train the MLP with the given input and output observations with default        learning rate=.001 and epochs=100.        (Also see MLP.train(inputs,outputs,learningRate,epochs).)    void train( float[][] inputs, float[][] outputs, float learningRate, int epochs );        Train the MLP with the given input and output observations, the learning        rate, and number of epochs.    static void shuffle( float[][] X, float[][] Y );        (Manually) shuffle the given input and output vectors.- (added) new examples in ai/mlp [ChAI]    |- mlp.ck -- example training a basic artificial neural network    |- mlp-manual.ck -- example of step-by-step training an MLP, printing each stage    |- mlp-load.ck -- loading a saved MLP model from file    |- mlp-save.ck -- saving the MLP model to file'    |- model.txt -- an example model file- (added) Word2Vec [ChAI] (thanks Yikai Li)    |- A word embeddings utility that maps words to vectors; can load a        model and perform similiarity retrieval.    |- (inheritance) Word2Vec -> Object    ------------------    int contains( string word );        Query if 'word' is in the current model.    int dim();        Get number of dimensions for word embedding.    void getSimilar( string word, int k, string[] output );        Get the k most similar words to the given word.    void getSimilar( float[] vec, int k, string[] output );        Get the k most similar words to the given vector.    void getVector( string word, float[] output );        Get the vector of the given word.    int load( string path );        Load pre-trained word embedding model from the given path.    int load( string path, int useKDTreeDim );        Load pre-trained word embedding model from the given path; will use         KDTree for similarity searches if the data dimension is less than         or equal to 'useKDTreeDim'. Set 'useKDTreeDim' to 0 to use linear         (brute force) similarity search; set 'useKDTreeDim' to less than 0         to always use KDTree.    void minMax( float[] mins, float[] maxs );        Retrieve the minimums and maximums for each dimension.    int size();        Get number of words in dictionary.

Lines 1–500 of 2883.

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