ChucK What's New
1.4.2.0 (Jan 2023)
(NOTE) chuck-1.4.2.0 marks a beginning (in BETA) of ChAI => ChucK for AI
-- a set of functionalities for interactive machine learning and artful,
humanistic design of music and artificial intelligence; it coincides with
the new "Music and AI" course at Stanford University, designed and taught
by Ge Wang with Ph.D. candidate Yikai Li. ChAI (Beta) additions are
listed at the end
- (added) MFCC unit analyzer (thanks Yikai Li)
|- A unit analyzer that computes Mel-frequency Cepstral Coefficients
(MFCCs), and outputs a vector of coefficients.
|- (inheritance) MFCC -> UAna -> UGen -> Object
- (added) examples: analysis/features/mfcc.ck
- (added) all associative arrays now have a new method [thanks nshaheed]
void getKeys( string[] keys );
Return all keys found in associative array in keys
- (added) Machine.realtime(): "return true if the shred is in realtime
mode, false if it's in silent mode (i.e. --silent is enabled)"
-- thanks nshaheed --
- (added) Machine.silent(): "return false if the shred is in realtime
mode, true if it's in silent mode (i.e. --silent is enabled)"
-- thanks nshaheed --
- (fixed) .help() now more accurately prints ("unit analyzer")
for UAna types
- (fixed) multi-variable array declaration; the following should
now work:
int x[1], y[2];
int x, y[3];
- (fixed) resolved an issue with multi-dimensional arrays pre-maturely
releasing internal type data structure -- e.g., causing an assertion
failure in the second function call
fun void test()
{
[ [1,2,3], [1,2,3] ] @=> int arr[][];
}
test();
test();
- (fixed) internal array storage now (more) correctly differentiate
between int and float, on systems where the two are the same size
(e.g., both 32-bit or both 64-bit)
- (fixed) command line chuck: when opening default input audio device
(e.g., Microphone), check for mono devices (the case on some MacOS
systems) now happens earlier, before searching other 2-channel input
audio devices; this preempts chuck using virtual audio input devices
such as ZoomAudioDevice as the input device
- (dev) added test examples in 01-Basic related to multi-var array
declarations
- (dev) extraneous white spaces removed throughout src/core
** thank you nshaheed for this soul-restoring measure **
- (dev) all tabs replaced with 4 spaces, now consistent across project
** thank you nshaheed for this soul-restoring measure **
- (dev) nshaheed: linux makefiles now correctly inserts Debug (-g)
build flag when Debug build is enabled (default builds for Release)
(BETA) ChAI-related additions: please note this is in Beta, meaning that
APIs may change in the near future.
- (added) SVM object (thanks Yikai Li)
|- a support vector machine (SVM) utility trains a model and
predicts output based on new input
|- (inheritance) SVM -> Object
|- methods:
int predict( float[] x, float[] y );
Predict the output 'y' given the input 'x'.
int train( float[][] x, float[][] y );
Train the SVM model with the given samples 'x' and 'y'.
- (added) KNN object (thanks Yikai Li)
|- A k-nearest neighbor (KNN) utility that predicts the output of
a given input based on the training data
|- (inheritance) KNN -> Object
|- methods:
int predict( int k, float[] x, float[] prob );
Predict the output probabilities (in 'prob') given new input
'x' based on 'k' nearing neighbors.
int train( float[][] x, int[] y );
Train the KNN model with the given samples 'x' and
corresponding labels 'y'.
- (added) HMM object (thanks Yikai Li)
|- A hidden markov model (HMM) utility that generates a sequence
of observations based on the training data
|- (inheritance) SVM -> Object
|- methods:
int load( float[] initiailDistribution,
float[][] transitionMatrix,
float[][] emissionMatrix );
Initialize the HMM model with the given initial state
distribution, transition matrix, and emission matrix.
int train( int numStates, int numEmissions,
int[] observations );
Train the HMM model with the given observations.
int generate( int length, int[] output );
Generate a sequence of observations of the given length.
(BETA) end CHAI additions
1.4.1.1 (May 2022)
- (added) native support for Apple Silicon (e.g., M1) as intel/apple
universal binary; significant performance throughput observed
running chuck natively on Apple Silicon
- (added) array.popOut( int index )
removes an array element by index [thanks chamington and nshaheed]
- (modified) building from source, on MacOS command line:
> make mac (compile for current architecture: arm64/x86_64)
> make mac-ub (compile universal binary: arm64/x86_64)
> lipo -archs ./chuck (checks architectures)
> ./chuck --about (prints out compiled platform…
…and if compiled as universal binary):
---
chuck version: 1.4.1.1 (numchucks)
macOS : 64-bit (universal binary)
---
> make osx (deprecated; use 'make mac' or 'make mac-ub')
- (added) Math.equal( float x, float y )
returns whether two floats are considered equivalent
- (added) OscOut.send() error reporting now includes the intended
recipient (hostname:port)
- (added) examples/hid/gametra.ck
boilerplate gametrak code
- (moved) examples/osc/1-send-recv/
moved s.ck and r.ck (sender and receiver) examples here
- (added) examples/osc/2-multi-msg/
examples for interleaving two OSC message types at different rates
- (added) examples/osc/3-one2many/
examples showing one sender to many receivers
- (added) examples/osc/4-multicast/
examples showing one sender using multicast to broadcast
- (fixed) fixed Lisa-load.ck to correct load sound file [thanks nshaheed]
- (fixed) CK_STDCERR now flushes on all output
- (fixed) error message display for MidiFileIn (STK)
- (fixed) array literal assignment now works as expected when
common ancestor type is child type of the RHS type; [thanks nshaheed]
--- for example ---
[ new SinOsc ] @=> Osc arr[]; // previously this results in a
// incompatible type error, although
// Osc is a superclass SinOsc
-------------------
- (continuous integration) -- updated to use 'make mac'
- (test) -- modified 01-Basic/86.ck; disabled 87.ck due to
Math.isnan() behaving differently on Apple Silicon;
modified 03-Modules/std01.ck to handled floating point equivalence
differently; also prompted adding Math.equal(); modified
05-Global/86.ck to disable Math.isnan()
- (updated, internal) integer types update for smoother Windows 64 bit
- (noted) synchronization point for Chunity version x.x.x
- (added) added to VERSIONS (this file) release dates since initial
release in 2004
1.4.1.0 (June 2021)
(NOTE) chuck-1.4.1.0 is the first significant release resulting from a
coordinated team effort to update and improve ChucK for teaching and
research. In April 2021, Perry and Ge led a ChucK "Global
Repair-a-thon", which identified issues and put forth a new Development
Roadmap. The ChucK dev team will follow this roadmap for updates, new
features, and new ChucK mediums (e.g., Chunity, WebChucK, FaucK,
ChucKTrip, and more). Many people were involved in this significant
release, including Jack Atherton, Mike Mulshine, Matt Wright, Rebecca
Fiebrink, Dan Trueman, Lloyd May, Mark Cerquiera, Mario Buoninfante,
Perry Cook, Spencer Salazar, and Ge Wang. Many thanks to everyone who
contributed. Happy ChucKing!
- (added) static Object.apropos();
All ChucK objects (i.e., all non-primitive types) can now invoke
.apropos(), which will dynamically generate and print to console
the description and inheritance hierarchy of the underlying type,
as well as the available functions at runtime. This can be called
on any object instance or on any class (without an instance):
// any object instance
SinOsc foo;
// print to console info about its underlying type
foo.apropos();
(OR)
// apropos from any class (identical output as above)
SinOsc.apropos();
Intended to be a quick runtime reference / learning tool!
- (added) examples/apropos.ck -- show .apropos() in action
- (added) examples/deep/chant.ck (by Perry Cook, 2006) -- a chant singing
synthesizer that makes use of ChucK's strongly-time and concurrent
programming features.
- (added) new Multi-channel LiSa UGens! (LiSa10 was already present)
LiSa2 (stereo)
LiSa4 (quad),
LiSa6 (6-channel; laptop orchestra edition!)
LiSa8 (8-channel),
LiSa16 (16-channel)
- (fixed) LiSa playback bug; voice panning now handles the mono case;
previously was silencing voice playback
- (added) new STK set/get access functions in FM:
float op4Feedback( float value );
Set operator 4 feedback.
float op4Feedback();
Get operator 4 feedback.
float opADSR( int opNum, float a, float d, float s, float r );
Set operator ADSR: attack, decay, sustain, release.
float opAM( int opNum, float value );
Set operator amplitude modulation.
float opAM( int opNum );
Get operator amplitude modulation.
float opGain( int opNum, float value );
Set operator gain.
float opGain( int opNum );
Get gperator gain.
float opRatio( int opNum, float ratio );
Set operator frequency ratio.
float opRatio( int opNum );
Get operator frequency ratio.
float opWave( int opNum, int wave );
Set operator waveform [1-8].
- (added) new Synthesis Toolkit (STK) FM instruments from Perry!
HnkyTonk: STK-style Honkey Tonk Piano FM synthesis instrument.
(aka, Algorithm 1 of the Yamaha TX81Z DX11 FM synthesizer)
FrencHrn: STK-style French Horn FM synthesis instrument.
(aka, Algorithm 2 of the Yamaha TX81Z DX11 FM synthesizer)
KrstlChr: STK-style "Crystal Choir" FM synthesis instrument.
(aka, Algorithm 7 of the Yamaha TX81Z DX11 FM synthesizer)
*** for each of these, try using the new .apropos() to examine its
documentation and interface; e.g., HnkyTonk.apropos(); ***
- (added) new Moog function:
float filterStartFreq( float freq );
Set filter starting frequency.
float filterStartFreq();
Get filter starting frequency.
- (added) new STK examples:
examples/stk/frenchrn-algo2.ck -- FM French Horn demo
examples/stk/honkeytonk-algo1.ck -- FM Honkey Tonk demo
examples/stk/krstlchr-algo7.ck -- FM Kristal Choir demo
examples/stk/hevymetl-acoustic-algo3.ck -- FM HevyMetl => Nylon Guitar
examples/stk/hevymetl-trumpet-algo3.ck -- FM HevyMetl => Trumpet
- (updated) tweaks to a number of STK UGens, which may result in audio
changes; the affected UGens are:
BandedWG, BeeThree, FMVoices, HevyMetl, PercFlut, Rhodey,
TubeBell, Wurley
- (fixed) issue in PluckTwo in computing delay length; this affects
the tuning of various plucked string models, including Mandolin.
- (added) .frames() for SndBuf and SndBuf2; returns the number of sample
frames in the loaded sound file. This is identical in behavior to
.samples() -- but for stereo+, .frames() is semanitically more
accurate than .samples().
- (added) "global" declarations for int, float, string, Object, UGen, Event;
this can be used in-language across ChucK files (each file must first
"declare" the global value before using it). This also support usage from
external hosts such as Chunity. (thanks to Jack Atherton for this work!)
- (added) constant power panning (as controlled by the .pan parameter)
for all UGen_Stereo--including Pan2, stereo dac, stereo adc; this is
controllable using the new .panType parameter. By default, constant
power panning is NOT enabled for dac and adc, whose panning behavior
is unchanged (panType==0) and favors a kind of unity-gain-preserving
but perceptually suspect panning scheme. By contrast, Pan2 will default
to use constant power panning (panType==1). This will alter exist the
effect of any code that uses Pan2. Specifically, this will introduce
a ~3 dB reduction in the output Pan2 (it is possible to
restore the previous behavior by explicitly setting .panType to 0).
This ~3 dB reduction corresponds to the equal-powered amplitude value
when pan is at center (pan=0). Mathematically, the reduction amount
can be calculated using Std.lintodb(Math.cos(pi/4))
[To hear this new behavior, check out examples/stereo/stereo_noise.ck]
- (BEHAVIOR CHANGED) clearly separated array.size() and array.capacity();
for historical/compatibility reasons, array.cap() is the same as
array.size() and generally should be avoided in favor of either .size()
or .capacity()
- (BEHAVIOR CHANGED): internally, all ChucK static functions are now
passed an extra parameter (Chuck_Type * TYPE) as a pointer to the
base type/class. This will affect Chugins, which should be updated/
rebuilt with the latest headers.
- (BEHAVIOR CHANGED): when connecting two multi-channel UGen's (both
are at least stereo), say LHS => RHS, if LHS channels < RHS channels,
the channels will be connected one-by-one up to the LHS channel count;
previously, the LHS channels will be automatically repeated to connect
to the RHS channels that have no corresponding LHS channels. This
behavior can still be achieved by manually connecting the individual
channels of LHS and and RHS through LHS.chan(n) and RHS.chan(n).
- (fixed) resolved a bug with SndBuf not playing when .rate < 0 and while
.pos beyond the end
- (fixed) resolved a bug with SndBuf where it could output DC when .rate < 0
after it reaches the beginning of the file (e.g., if the first sample is
non-zero)
- (fixed) resolved a bug in ADSR when sustain is set to 0 and audio stops,
.releaseTime return NaN and basically the world ends (thanks to
mariobuoninfante for help in addressing this)
- (fixed) reset Gen10 table to allow add/remove partials; thanks to
mariobuoninfant
- (fixed) updated MidiOut and removed check in order to allow messages
of size less than or greater than 3 bytes; thanks to mariobuoninfante
for this issue report on Ubuntu Studio 64-bit; this fix addresses
the sending of MIDI clock, stop, continue, and SysEx -- also thank
you mariobuoninfante for the fix.
- (deprecated) Chubgraph => (new) Chugraph;
Chubgraph will continue to function, with a deprecation warning.
- (documentation) updated embedded documentation text for all statically
linked UGens and libraries.
- (documentation) brought examples in alignment between distribution
and the online examples collection; many examples updated for clarity
and utility
http://chuck.stanford.edu/doc/examples
http://chuck.cs.princeton.edu/doc/examples
- (internal/refactor) the "Mega Merge 2021" integrates a long-standing
branch since REFACTOR-2017 that includes support for globals and was
the basis for Chunity. Future Chunity releases will align with mainline
ChucK language features. (thanks to Jack Atherton for several years of
laying the groundwork and for ChucK in Chunity!)
- (internal/developement) added m_started flag to the ChucK class to avoid
a strange (but mostly harmless) condition when the virtual machine is
shutting down and ChucK::run() attempt to call ChucK::start()
- (internal/development) Thanks to Mark Cerqueira -- migrated from old
Travis CI (continuous integration testing) to GHA (GitHub Actions).
1.4.0.1
- (fixed) when opening audio input devices where the default
device has insufficient chanels (e.g., MacOS input is mono
by default), logic has been added to also match sample rates
when searching for alternate audio input devices; additional
logic added in the specific case of mono input devices to
simulate stereo, to fulfill the standard request for stereo
input.
- (fixed) added check to prevent crash in rare situations involving
self-join when deleting XThread in background. (git PR #103)
- (fixed) by stuntgoat@github -- right-recursion in chuck parser
can exhaust memory in larger chuck files; this has been updated
to use left recursion. (git PR #32, (finally) merged by hand by
Spencer and Ge) Also thanks to Tom Lieber for the initial analysis
and solution:
https://lists.cs.princeton.edu/pipermail/chuck-users/2009-April/004029.html
- (added) by Nathan Tindall -- Q and freq bounding for filters (LPF,
HPF, BPF, BRF) to avoid LOUD FILTER EXPLOSIONS; now negative values
will throw an exception on the offending shred.
- (restored, macOS) MAUI Chugin now (re)supported, post 1.4.0.0
- (added; developer) ChucK.h API to set a main thread hook (e.g., for
graphical functionalitie from Chugins)
- (updated, developer) Chugin API now support main thread callback
for graphical-/GUI purposes
- (developer) refactored code to move I/O-related code out of
chuck_lang and into chuck_io.
1.4.0.0
- NOTE: 1.4.0.0 is a simultaneous release with 1.3.6.0;*
- the two are identical except 1.3.6.0 also supports *
- earlier version of OS X before 10.9 (back to 10.5). *
- MAJOR SOURCE REFACTOR!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*
- (Thanks Jack Atherton for months of groundwork!) *
- (added) support for 64-bit on windows
- (added) Chuck_External API for including and running ChucK from
elsewhere in C++
- specify the sample rate
- optionally specify the directory that me.dir() should
evaluate to; this dir will also be scanned for chugins
- optionally use custom callbacks for out and err messages
from ChucK
- (added) external keyword - for communicating variable values to and from
C++ code using Chuck_External API
- (developer) ChucK "core" as library, independent of external
system audio I/O; now much easier to embed ChucK as a
component in other hosts (e.g., command line, plugins, Unity, etc.)
- (developer) ChucK "host" (command line app)
- (developer) SOURCE: code support for multiple ChucK/VM instances
- (developer) SOURCE: one file to include them all (chuck.h)
- (developer) c_str() method for Chuck_Strings, so that chugins with a different
definition of std::string can still construct their own string
- (developer) API for chugin API calls
- now API variable must be passed
- SHRED variable must also occasionally be passed
- (internal) refactored Chuck_String representation to be immutable
- (internal) refactored to eliminate global VM, compiler, and env variables
- compiler stores a reference to env
- compiler stores a reference to vm
- vm stores a reference to env
- env stores its own top-level types; no more global type variables
- DL_Query stores a reference to compiler
- (internal) refactored all print statements to use new macros
1.3.5.3
(unreleased; rolled into 1.4.0.0)
- (added) support for primitive type 'vec3' for 3D vector
- access .x .y .z OR .r .g .b OR .value .goal .slew
- (added) support for primitive type 'vec4' for 4D vector
- access .x .y .z .w OR .r .g .b .a
- (added) VM exceptions (e.g., ArrayOutOfBounds) now print line number
where possible (thanks Jack Atherton!)
- (added) Math.gauss( x, mu, sigma )
- (added) .clear() for Delay, DelayA, DelayL
- (fixed) - == and != for polar and complex types
- (fixed) repeat statement now worked correctly for shreds
- (fixed) crash with --adaptive:N and ugens that used tickf e.g. WvOut2
- (fixed) SndBuf occasional crash at end of file
- (fixed)(Win) install issue where chugins and/or example files were missing
- (removed) --blocking functionality; callback only for real-time audio
- (internal) refactored VM to be more friendly for integration
1.3.5.2
- (added) default root path changed from /usr to /usr/local
(fixes issues in Mac OS X 10.11 "El Capitan")
- (added) new ChuGins
- FoldbackSaturator
by Ness Morris
Foldback Saturator for nasty distortion.
- WPDiodeLadder
by Owen Vallis
Diode ladder filter based on Will Pirkle's technical notes.
- WPKorg35
by Owen Vallis
Korg 35 low-pass filter based on Will Pirkle's technical notes.
- (fixed)(Win) missing DLL issue
- (fixed) me.dir() issues with Machine.add()-ed shreds
- (fixed) crash fixes for <<< >>> with null objects
- (fixed) stop ignoring midi clock in midi messages
- (fixed) crash fix for array => ugen
- (fixed) fix OscOut send failure for programs that also use OscIn
1.3.5.1
- (added) new ChuGins
- PowerADSR
by Eric Heep
Power function ADSR envelope.
- WinFuncEnv
by Eric Heep
Envelope built on window functions.
- (added) more aggressive optimizations for ARM platforms
- (fixed) SndBuf fixes
- (fixed) SerialIO fixes:
- newline handling
- full-duplex IO
- general lag issues
1.3.5.0
- (added) new functions in Std
- int Std.clamp(int v, int min, int max)
Return v constrained to [min, max]
- float Std.clampf(float v, float min, float max)
Return v constrained to [min, max]
- float Std.scalef(float v, float srcmin, float srcmax,
float dstmin, float dstmax)
Scale v to range [dstmin, dstmax]. v is assumed to have the range
[srcmin, srcmax].
- float Std.dbtolin(float x)
Convert x dB to linear value
- float Std.lintodb(float x)
Convert linear value x to dB
- (added) MidiIn.open(string)/MidiOut.open(string) will open devices matched
by partial match if no full device-name match is found.
- (added) examples/osc/osc_dump.ck example
- (added) new static variables in ADSR
- .ATTACK, .DECAY, .SUSTAIN, .RELEASE, .DONE
values corresponding to current state, returned by ADSR.state()
- (added) full book/digital-artists examples
- (fixed) real-time audio hiccuping/underrun when loading files in SndBuf
- SndBuf .chunks now uses .chunks as buffer size for dynamic loading
- files are loaded .chunks samples at a time
- memory for the file is divided into buffers of .chunks samples
- chunk size defaults to 32768 samples
- (fixed) DLL issue on Win32 command line build
- (fixed) non-void functions implicitly return 0/null if no return statement
- (fixed) --probe crashes and other crashes related to error logging
- (fixed) include trailing slash in me.dir() and friends
- (fixed) fix me.path()/me.dir() for input paths with implicit .ck extension
- (fixed) better error messages for OscIn/OscOut
- (fixed) rare threading bug for OTF commands
1.3.4.0
- (added) chuck operator connects between arrays of ugens, multi-channel
ugens, and mono unit ugens
ex.
SinOsc s => Pan2 pan => Gain master[2] => dac;
persists stereo signal through master to dac.
See examples/stereo/array.ck for example usage.
- (added) new OSC support classes
- OscOut
Sends OSC messages
- .dest(string host, int port)
set destination hostname or IP address and port
- .start(string addr)
set target OSC address to addr
- .add(int i)
- .add(float f)
- .add(string s)
add argument to the message
- .send()
send message
- OscIn extends Event
Receives OSC messages
- int .port
port number to listen to
- .addAddress(string addr)
listen for OSC addresses matching addr
- .removeAddress(string addr)
stop listening for OSC addresses matching addr
- .listenAll()
listen for all incoming OSC messages on port
- int .recv(OscMsg msg)
retrieve pending OSC messages into msg. Returns 1 if a
message was available, 0 otherwise
- OscMsg
Encapsulates a received OSC message
- string .address
the OSC address this message was sent to
- string .typetag
the OSC typetag of this message
- int .getInt(int i)
- float .getFloat(int i)
- string .getString(int i)
retrieve the argument at position i of the given type
See examples/osc/ for examples on usage.
OscRecv and OscSend are still supported for backwards compatibility,
but new code should use OscIn and OscOut.
- (added) new SerialIO functions
- .writeByte(int b)
write byte b to the serial stream
- .writeBytes(int b[])
write array of bytes b to the serial stream
- (added) new chugins (from Joel Matthys)
- PitchTrack
Monophonic autocorrelation pitch tracker, based on [helmholtz~] by
Katja, http://www.katjaas.nl/helmholtz/helmholtz.html
- GVerb
Good quality stereo reverb with adjustable parameters
- Mesh2D
STK instrument that simulates a rectilinear, 2-dimensional digital
waveguide mesh structure. Basically sounds like striking a metal
plate.
- Spectacle
FFT-based spectral delay and EQ
- Elliptic
Elliptic filter, capable of very steep slopes or interesting
harmonic ripples
- (fixed) ChucK Shell fixes
1.3.3.0
- (added) PulseAudio support (via RtAudio)
- (fixed) relative path resolution for me.path() and me.dir()
- (fixed) C:/ style pathnames do not trigger spurious argument processing
- (fixed) MidiFileIn on Windows/Linux
1.3.2.0
- (added) --clear.vm flag
instructs remote VM to remove all shreds and clear public user types
- (added) Std.ftoi(float f)
Function for converting float to int
- (added) ASCII char literals - 'c' converted to int with ASCII value
- (added) book/digital-artists example programs for forthcoming book:
"Programming for Musicians and Digital Artists" (Manning
Publications)
(very special thanks to Mark Morris and Bruce Lott for sample
production)
- (added) new functions
- me.path()
equivalent to me.sourcePath()
- me.dir()
equivalent to me.sourceDir()
- me.dir(int N)
return Nth-level parent of source directory
- Shred.fromId(int id)
return Shred object corresponding to specified id
- (added) new functions for string objects
- .charAt(int index)
return character of string at index
- .setCharAt(int index, int ch)
set character of string at index to ch
- .substring(int pos)
return new string with characters from pos to end of string
- .substring(int pos, int len)
return new string with characters from pos of length len
- .insert(int pos, string str)
insert str at pos
- .erase(int pos, int len)
remove len characters from string, beginning at pos
- .replace(int pos, string str)
replace characters of string at pos with str
- .replace(int pos, int len, string str)
replace len characters of string with str, starting at pos
- .find(int ch)
search for character ch in string, return index of first instance
- .find(int ch, int pos)
search for character ch in string, return index of first instance
at or after index pos
- .find(string str)
search for string str in string, return index of first instance
- .find(string str, int pos)
search for string str in string, return index of first instance at
or after index pos
- .rfind(int ch)
search for character ch in string, return index of last instance
- .rfind(int ch, int pos)
search for character ch in string, return index of last instance
at or before index pos
- .rfind(string str)
search for string str in string, return index of last instance
- .rfind(string str, int pos)
search for string str in string, return index of last instance at
or before index pos
- (added) MidiFileIn class
Class for parsing + handling MIDI input from a file.
See examples/midi/playmidi.ck for example usage.
- .open(string filename)
Open file at specified path
- .read(MidiMsg inMsg)
Get next message in first track
- .read(MidiMsg inMsg, int trackNo)
Get next message in trackNo
- (added) SerialIO class (extends IO)
Class for communicating with serial devices, e.g Arduino.
See examples/serial/ for example usage.
- .list() (static)
return array of strings corresponding
to available serial IO devices
- .open(int i, int baud, int mode)
open device with index i. baud can be a constant specifying
which standard serial baud rate is used (e.g.
SerialIO.B9600). mode can be SerialIO.ASCII or
SerialIO.BINARY to specify ASCII or binary interpretation
of serial data.
- .onLine()
- .onByte()
- .onBytes(int num)
- .onInts(int num)
- .onFloats(int num)
chuck to now to wait for that type of data to arrive (in the
specified quantity). E.g. serial.onLine() => now; will wait
for 1 newline-terminated string to arrive from the serial
device.
- .getLine()
.getByte()
retrieve data requested as above as string/byte
- .getBytes()
.getInts()
.getFloats()
retrieve data requested using the onLine()/etc. above. as array
of data type
- .baudRate()
.baudRate(int baud)
get/set baud rate
- SerialIO.B2400
SerialIO.B4800
SerialIO.B9600
SerialIO.B19200
SerialIO.B38400
SerialIO.B7200
SerialIO.B14400
SerialIO.B28800
SerialIO.B57600
SerialIO.B115200
SerialIO.B230400
available baud rates
- (added) Regex class
Class for regular expression matching and replacing in strings.
Regex style is POSIX-extended.
- RegEx.match(string pattern, string str)
Return true if match for pattern is found in str, false otherwise
- RegEx.match(string pattern, string str, string matches[])
Same as above, but return the match and sub-patterns in matches
matches[0] is the entire matched pattern, matches[1] is the first
sub-pattern (if any), and so on.
- RegEx.replace(string pat, string repl, string str)
Replace the first instance of pat in str with repl, returning the
result.
- RegEx.replaceAll(string pat, string repl, string str)
Replace all instances of pat in str with repl, returning the
result.
- (fixed) --adc: now works as expected
- (fixed) FileIO => string bug
- (fixed) LiSa.sync/LiSa.track now works when set to
1 (playhead follows input, normalized/rectified to [0,1])
2 (playhead follows input, non-normalized/rectified)
affects examples/special/LiSa-track*.ck
- (fixed) LiSa interpolation bug
- (fixed) .clear() function of arrays properly removes all items of the array
- (fixed) != properly handles comparison between a string and literal null
- (fixed) multichannel refcounting bug
- (fixed) WvOut performs IO writes on separate thread, significantly
minimizing audio underruns
- (fixed) crash in Chorus destructor
- (fixed) crash in Mandolin destructor
- (fixed) ADSR correctly initialized in "DONE" state
1.3.1.3
- (fixed) number in --dac: flag is no longer off by one (this bug
was introduced in 1.3.1.2)
1.3.1.2
- (added) chuck now automatically detects and uses next highest
or closest (in that order) system sample rate in
the case where the default is not available; if a sample
rate requested via --srate: is not available, an error
will be encountered with a message.
- (fixed) base parent object is correctly accounted for by
new shred when sporking member functions
(thanks to Michael Heuer for reporting and
narrowing this down)
- (fixed) popping local variables from the operand stack in cases
where the datatype size is larger than int-size; this
is a bug introduced with 64-bit in 1.3.1.0, and exhibited
on 32-bit systems only. (thanks to Simon Steptoe
reporting and narrowing this down)
- (fixed) opening real-time audio with 0 input channels should
now work, once again.
1.3.1.1
- (fixed) critical bug since 1.3 where member function calls in
loop conditionals caused crashes when the loop body
contained local Object's to be released; this directly
affects using OSC, MIDI, HID, which commonly employ
syntax like: 'while( e.nextMesg() ) { … }';
-- this is most likely the cause of the OSC-related issues
we've been seeing (thanks to Graham Coleman for tracking
down and narrowingthe issue!)
- (fixed) strengthened synchronization in OSC between internal
listener thread and chuck VM code
- (fixed) memory bug in OscRecv deallocation
- (fixed) Machine.add( … ) on windows now supports both '\'
and '/' in aboslute paths (previously only '\').
(thanks to Graham Coleman for finding this!)
1.3.1.0
- (added) 64-bit support for all platforms (OS X, Linux, Windows)
many thanks to Paul Brossier, Stephen Sinclair,
Robin Haberkorn, Michael Wilson, Kassen, and
Fernando Lopez-Lezcano, and chuck-users!
- (added) Math.random(), random2(), randomf(), random2f(), srandom(),
and Math.RANDOM_MAX; NOTE: randomf() returns range 0.0 to 1.0
these use the much better random() stdlib functions
the existing Std.rand() and Std.srand() is still
be available for compatibility (these to be deprecated
in the future; please start using Math.random())
* (NOTE: on windows, Math.random() still uses the same
generator as Std.rand() -- we hope to improve this in
a future version!)
* (NOTE: also see removed below)
- (added) chuck --version | chuck --about now print architecture
(32-bit or 64-bit)
- (added) Machine.intsize() will return int width in bits (e.g., 32 or 64)
- (added) examples/array/array_mmixed.ck to verify mixed-index
fix (see below), based on Robin Haberkorn's test code
- (fixed) multi-dimensional arrays now correctly support mix-typed
indices (e.g., strings & ints) (thanks Robin Haberkorn)
- (fixed) constants in Math library now cleaner, they include:
* Math.PI
* Math.TWO_PI
* Math.e or Math.E
* Math.i or Math.I or Math.j or Math.J // as 'complex' type
* Math.INFINITY
* Math.RANDOM_MAX
* Math.INT_MAX // currently, differs on 32-bit and 64-bit systems
* Math.FLOAT_MAX
* Math.FLOAT_MIN_MAG // minimum positive float value
- (fixed) Chubgraph.gain(), .last(), and .op()
- (fixed) error message printing system for variable arguments
- (fixed) StifKarp.sustain now works properly
- (fixed) all examples now use Math.random() instead of Std.rand()
- (removed) Math.rand() removed --> please use Math.random();
(see 'added' above; Std.rand() still there, but to be
deprecated; please use Math.random() moving forward)
1.3.0.2
- (fixed) string literal reference counting
- (fixed) chuck to function call reference counting
1.3.0.1
- (fixed) WvOut no longer only record silence
- (fixed) WvOut.closeFile() does not cause the VM to hang
1.3.0.0
- (added) Chugins: dynamically loaded compiled classes/ugens
see http://chuck.stanford.edu/extend/ for examples.
- (added) new command line options
--chugin-load:{auto|off} disable/enable chugin loading
-gFILE/--chugin:FILE load chugin at FILE
-GPATH/--chugin-path:PATH load all chugins in directory PATH
--dac:NAME use dac with name matching NAME
--adc:NAME use adc with name matching NAME
- (added) Chubgraphs: create ugens by compositing existing UGens
see examples/extend/chubgraph.ck
- (added) ChuGens: create ugen by implementing audio-rate processing in ChucK
see examples/extend/chugen.ck
- (added) new ugens:
- WvOut2: stereo uncompressed audio file output
- SndBuf2: stereo uncompressed audio file input
- (added) new functions:
- me.sourcePath()
returns file path of source file corresponding to this shred
- me.sourceDir()
returns directory of source file corresponding to this shred
- MidiIn.open(string name)
open MIDI input matching name
- MidiOut.open(string name)
open MIDI output matching name
- Hid.open(string name)
open HID matching name
- (added) experimental OS X multitouch HID
- (fixed) real-time audio on Mac OS X 10.7 (Lion), 10.8 (Mountain Lion)
- (fixed) IO.newline() now flushes "chout"
- (fixed) "chout" and "cherr" now invoke member functions correctly
- (fixed) no for statement conditional handled correctly
- (fixed) STK WvOut correctly handles case when file open fails
- (fixed) << operator for arrays now correctly references counts
- (fixed) crashing bug when receiving external events at a high-rate
("the OSC bug")
- (fixed) scope closing correctly dereferences local objects
- (fixed) crash when exiting shreds with connected ugens
- (fixed) deallocation of "empty" Shred object no longer crashes
- (fixed) crash when HID events are sent to an exited shred
- (fixed) destructors for built-in objects are executed
1.2.1.3
- (added) initial/experimental support for file I/O (finally)
(thanks to Andrew Schran, Martin Robinson)
- (added) new class: IO, FileIO
see examples/io/:
read-int.ck
read-str.ck
readline.ck - using readline
write.ck - write using <=
write2.ck - write using .write()
- (added) IO input via =>
- (added) IO output via <= (the "back-chuck")
example: fio <= x <= " " <= y <= "\n";
- (added) new syntax for checking if/while/for/until with IO objects
e.g., while( fio => i ) { … }
- (added) StdOut/StdErr objects:
"chout" (pronounced "shout")
"cherr" (pronounced "Cher")
- (added) Hid.open() now can accept a device name parameter
- (added) analysis/tracking examples are now back
(thanks to Kassen for looking into this)
- (fixed) calling overloaded functions with most specific match
e.g., Specific extends General:
fun void foo( General obj ) { }
fun void foo( Specific obj ) { }
foo( obj $ Specific ); // should call foo( Specific )
(thanks to Robert Poor for reporting, to Kassen, David Rush,
Michael Heuer, and Andrew C. Smith for follow-up)
- (fixed) STK instruments control changes reports range issues as
"control value exceeds nominal range"; previously printed
hard-coded values that were potentially misleading
(thanks to Kassen for reporting)
- (fixed) all oscillators now produce audio for negative frequencies
(thanks to Luke Dahl)
- (fixed) incorrect UGen disconnect (thanks Kassen for reporting)
- (fixed) type checker now validates if/while/for/until types
- (fixed) linux compilation (for gcc 4.x)
- (fixed) complilation on OS X Snow Leopard
1.2.1.2
- (added) dynamic, resizable arrays
.size( int ) resizes array; .size() returns current size()
<< operator appends new elements into array
.popBack() pops the last element of the array, reducing size by 1
.clear() zero's out elements of the array
(see examples/array/
array_dyanmic.ck
array_resize.ck)
- (added) new UAna: FeatureCollector
turns UAna input into a single feature vector, upon .upchuck()
new UAna: Flip
turns audio samples into frames in the UAna domain
new UAna: pilF
turns UAna frames into audio samples, via overlap add
new UAna: AutoCorr
computes the autocorrelation of UAna input
new UAna: XCorr
computes the cross correlation of the first two UAna input
- (added) UGen.isConnectedTo( Ugen ) // is connected to another ugen?
- (added) UAna.isUpConnectedTo( UAna ) // is connected to another uana via =^?
- (added) int Shred.done() // is the shred done?
int Shred.running() // is the shred running?
- (added) int Math.ensurePow2( int )
- (added) Math.INFINITY, Math.FLOAT_MAX, Math.FLOAT_MIN_MAG, Math.INT_MAX
- (added) TriOsc.width(), PulseOsc.width(), SawOsc.width(), SqrOsc.width()
- (added) Std.system(string) is now disabled by default, to enable: specify
the --caution-to-the-wind command line flag, for example:
%> chuck --caution-to-the-wind --loop
- (removed) SqrOsc.width( float ), width is always .5
- (fixed) it's now (again) possible to multiply connect
two UGen's
- (fixed) OS X only: sudden-motion-sensor HID no longer
introduces audio dropouts below peak CPU usage
due to added centralized polling;
added static Hid.globalPollRate( dur ) to control
the central SMS polling's rate
- (fixed) Windows only: implementation of array via STL vector::reserve()
has been replaced with a more compatible approach (see chuck_oo.cpp)
- (fixed) dac amplitude no longer halved!
NOTE: this increases the gain from before by
a factor of 2, or roughly 6 dB!! BEWARE!!
- (fixed) corrected order of shred/ugen dealloc in VM destructor,
preventing a potential crash during shutdown
- (fixed) UAna can now upchuck() at now==0
- (fixed) STK Chorus UGen now has reasonable defaults
.max( dur, float ) for initializing to delay/depth limits
.baseDelay( dur ) sets current base delay
- (fixed) dur +=> now no longer crashes
- (fixed) ADSR now returns attackTime, decayTime, and releaseTime that corresponds
to the duration-based setting functions (internally multiplied by SR)
(thanks Eduard)
- (fixed) STK Mandolin no longer plays without explicit noteOn
- (fixed) unsporked Shred instances now given id == 0 (thanks Kassen)
- (fixed) typos in ugen_xxx.cpp and chuck-specific rtaudio.cpp (/moudi)
1.2.1.1
- (fixed) ctrl-c no longer causes crash on shutdown
(was due to memory deallocation bug)
- (fixed) incorrect code generation for multiple expressions in 3rd clause
of for loops (thanks to Eduard for tracking!)
- (fixed) Envelope now is able to ramp down (contributed by Kassen, Dr. Spankenstein,
kijjaz, and others on electro-music!)
1.2.1.0 : codename spectral
(added) Unit Analyzers (UAna: prounced U-Wanna, plural UAnae)
(primary creators: Rebecca and Ge)
provides support for spectral processing,
information retrieval, generalized + precise audio analysis
(added) new datatypes:
---------
complex: (real,imaginary)
example: #(3,4) is complex literal (3,4)
example: #(3,4) => complex value;
access components via value.re and value.im
used by UAnae
polar: (modulus, phase)
example: %(.5, pi/4) is magnitude .5 and phase pi/4
example: %(.5, pi/4) => polar bear;
access components via bear.mag and bear.phase
used by UAnae
----------
example: can cast between complex and polar via standard $ casting
(added) new UAna's:
----------
(authors: Rebecca and Ge)
FFT: Fast Fourier Transform
input: from UGen (manually input float vector)
output: complex spectrum (.cval()/.cvals())
magnitude spectrum (.cval()/.fvals())
(see examples/analysis/)
IFFT: Inverse FFT
input: UAna/Blob complex vector (spectrum)
output: to UGen (as samples)
(see examples/analysis/)
Centroid: Centroid feature extractor
input: UAna/Blob float vector (mag spectrum)
output: single centroid value per frame
(see examples/analysis/features/)
Flux: Flux feature extractor
input: UAna/Blob float vector (mag spectrum)
output: single flux value between current and previous frame
(see examples/analysis/features/)
RMS: RMS feature extractor
input: UAna/Blob float vector (mag spectrum)
output: single RMS value of frame
(see examples/analysis/features/)
RollOff: RollOff feature extractor
input: UAna/Blob float vector (mag spectrum)
percentage threshold
output: single RollOff value of frame
(see examples/analysis/features/)
----------
(added) capability to externally abort "infinite loop" shreds
(this deals with hanging shreds due to potentially
infinite loops that don't advance time)
(added) OTF command: chuck --abort.shred sends network OTF
to server to remove current shred if there is one
(added) default .toString() method to all Object's
(added) adding an Object to string will first cast object to string;
then add the two
(added) LiSa.duration() get method, and .voiceGain() set/get
(Dan Trueman)
(added) alternate line comment: <-- same as //
example:
SinOsc s => dac; <-- here is a comment
(fixed) NullPointerException when instantiating array of objects
containing arrays of objects
(thanks to chuck-users!!)
(fixed) Machine.remove() on parent shred id no longer crashes
(fixed) Machine.remove() on 'me' now works correctly
(fixed) rounding when writing files via WvOut
(thanks to Chris Chafe for discovering and reporting this)
(changed) default frequencies (220/440) added for various STK instruments
1.2.0.9
(there is no version 1.2.0.9!)
1.2.0.8
(added) command line argument support
e.g. %> chuck foo.ck:1:hello bar:2.5:"with space"
also works with OTF commands
e.g. %> chuck + foo:1:yo
also works with Machine.add( … )
e.g. // code
Machine.add( "foo:1:2:yo" );
(see examples/basic/args.ck for accessing from code)
(added) OS X: watchdog enabled
win32: watchdog implemented and enabled
(combats chuck infinite empty loop implosion)
(added) OTF server/listener now ON by default…
to enable, specify --loop or --server
to disable, specify --standalone
(added) new UGens:
--------
Dynamics: dynamics processor (compressor, expander, etc.)
(author Matt Hoffman and Graham Coleman)
(see examples/special/)
GenX: classic + new lookup table functions base class
(author Dan Trueman, ported from RTCMix)
(see examples/special/) float .lookup( float ) : lookup table value
float[] .coeffs( float[] ) : load the table
Gen5 (extends GenX)
Gen7 (extends GenX)
Gen9 (extends GenX)
Gen10 (extends GenX)
Gen17 (extends GenX)
CurveTable (extends GenX)
WarpTable (extends GenX)
LiSa: (Li)ve (Sa)mpling!
(author Dan Trueman, partly based on Dan's munger~)
--------
(added) (prototype) string catenation
(for now will leak memory! use wisely!!!)
e.g. // expression
"a" + "b"
"a" + 45
"a" + 5.1
"postfix" +=> str;
(added) string escape sequences
\0 \n \t \a \" \b \f \r \v \
\nnn (3 digit octal ascii)
(added) new Objects:
--------
StringTokenizer: uh string tokenizer (by whitespace)
(use to be hidden PRC object)
see examples/string/token.ck
ConsoleInput: interim console input (until file I/O)
(use to be hidden Skot object)
see examples/string/readline.ck--------
(api) API additions
-------- (also see API modifications below)
ADSR: dur attackTime()
dur decayTime()
dur releaseTime()
WvOut: void closeFile()
Hid: void openTiltSensor()
int read( int, int, HidMsg )
HidMsg: int isWheelMotion()
(support for mouse scroll wheels)
int key
(cross-platform USB HID Keyboard Usage code)
int ascii
(ASCII value of key, where appropriate)
--------
(api) API modifications (sorry!)
--------
ADSR: float attackTime( float ) -> dur attackTime( dur )
float decayTime( float ) -> dur decayTime( dur )
float releaseTime( float ) -> dur releaseTime( dur )
--------
(api) deprecated --> new classes
HidIn --> Hid
(fixed) adc.last() now returns correct value (was returning 0)
(fixed) array is now subclass of Object
(fixed) accessing null array no longer crashes (instead: exception)
(fixed) allow: 0 length float arrays
(fixed) check for negative array size
(fixed) accessing null map no longer crashes (instead: exception)
(fixed) connecting null UGen references no longer crashes
(fixed) trivial (null == null) no longer evaluated as string
(fixed) strict (x,y) => z type checking
(fixed) UGens no longer able to make duplicate connections
(fixed) && now terminates early if an operand evaluates to 0
|| terminates early if an operand evaluates to 1
(fixed) bug accessing static members of built-in classes
(fixed) OscSend.startMsg no longer silently fails when
using a single string message specification
(fixed) Math.atan2 now accepts the proper arguments
(fixed) increased OTF command network fail-safe measures
(fixed) STK BlitSquare now produces correct frequency
(applied fix from STK release)
(fixed) no longer spontaneously crashes when HidIn and
other event based input mechanisms are firing rapidly
(fixed) using non-static variables from inside static functions
(fixed) variables must be declared before being used
1.2.0.7b
- added: (all) HidIn.name() now returns meaningful device name
- fixed: (all) fixed STK Envelope bug
- fixed: (osx) mouse motion now correctly returns delta Y
- fixed: (win32) joystick hat messages now properly reported
- fixed: (win32) fixed bug where joysticks of same model/product
id would send messages through the same HidIn object
- fixed: (all) seg fault in OSCSend.startMsg() with single
string message specification
1.2.0.7
- (api) deprecated --> new classes
--------------------------
sinosc --> SinOsc
triosc --> TriOsc
sqrosc --> SqrOsc
sawosc --> SawOsc
pulseosc --> PulseOsc
phasor --> Phasor
osc --> Osc
noise --> Noise
cnoise --> CNoise
impulse --> Impulse
step --> Step
halfrect --> HalfRect
fullrect --> FullRect
gain --> Gain
zerox --> ZeroX
delayp --> DelayP
sndbuf --> SndBuf
pan2 --> Pan2
mix2 --> Mix2
onepole --> OnePole
onezero --> OneZero
polezero --> PoleZero
twopole --> TwoPole
twozero --> TwoZero
biquad --> BiQuad
**** --> ****
std --> Std
math --> Math
machine --> Machine
--------------------------
- (added) --deprecate:X flag
X can be stop, warn, or ignore - default is warn
- (added) STK BiQuad get functions pfreq, prad, zfreq, zrad
- (added) ADSR functions:
void .set( dur a, dur d, float s, dur r );
void .set( float a, float d, float s, float r );
- (added) new UGens (adapted from SC3 Server, Pure Data, CSound)
--------------------------
LPF : resonant lowpass filter (2nd order butterworth)
HPF : resonant highpass filter (2nd order butterworth)
BPF : bandpass filter (2nd order butterworth)
BRF : bandreject filter (2nd order butterworth)
ResonZ : resonant filter (BiQuad with equal-gain zeros)
FilterBasic : base class to above filters
--------------------------
- (added) new HidIn static variables for HidMsg message and device types
- (added) HidMsg fields to determine device type and number
- (added) HidMsg functions with capitalization rather than underscores
(underscored functions deprecated)
- (added) .period for all oscillators
- (fixed) floating point denormals no longer cause potentially
massive CPU usage on intel processors, this includes
BiQuad, OnePole, TwoPole, PoleZero, JCRev, PRCRev, NRev
- (fixed) STK Echo.max no longer gives incorrect warnings
- (fixed) linux makefiles now respects CC/CFLAGS/CXX (Cedric Krier)
- (fixed) SinOsc/TriOsc/PulseOsc/SqrOsc/Phasor.sync now unified:
.sync == 0 : sync frequency to input
.sync == 1 : sync phase to input
.sync == 2 : fm synth
|
NOTE: the above changes may break/affect existing patches
using TriOsc, PulseOsc, or SqrOsc
- (fixed) TriOsc/PulseOsc/SqrOsc phase consistent with convention
- (fixed) ADSR now handles keyOff() before sustain state
- (fixed) ADSR now correctly inherits Envelope
1.2.0.6 (more)
- (added) support for Mac OS X universal binary
- (added) executable now reports targets:
chuck --version
chuck version: 1.2.0.6 (dracula)
exe target: mac os x : universal binary
http://chuck.cs.princeton.edu/
1.2.0.6
- (added) support for Mac OS X on Intel: (make osx-intel)
- (added) win32 - boost thread priority default from 0 to 5
- (added) Mandolin.bodyIR( string path ): set body impulse response
- (added) HID: support for mouse input on OS X, Windows, Linux
through 'HidIn' class
- (added) HID: support for keyboard input on OS X, Windows
through 'HidIn' class
- (added) new HID examples:
hid/mouse-fm.ck
/keyboard-flute.ck
- (added) OS X: --probe human-readable MIDI names
(thanks to Bruce Murphy)
- (fixed) multiple declarations now behave correctly:
(example: int a, b, c;)
- (fixed) now possible to spork non-static member functions
(example: Foo foo; spork ~ foo.go();)
- (fixed) sporking fixed in general
- (fixed) pre/post ++/-- now work correctly
(example: int i; <<< i++ + i++ * ++i >>>;)
- (fixed) public classes can now internally reference non-public
classes in the same file
- (fixed) obj @=> obj now ref counts correctly
- (fixed) STK Mandolin.detune( float f ) changed
- (fixed) STK Mandolin.damping( float f ) changed
1.2.0.5b
- (fixed) adc bug
- (fixed) %=> bug
1.2.0.5
- (added) multi-channel audio
- use --channels or -c set number of channels
for both input and output
- use --out/-o and --in/-i to request
# of input and output channels separately
- stereo is default (for now)
- (added) UGen.channels()
- (added) class UGen -> class UGen_Multi -> class UGen_Stereo
- (added) UGen UGen_Multi.chan( int )
use this to address individual channels
- (added) examples in examples/multi
- n.ck : n channels detuned sine
- i.ck : n channels impulse
- (added) HID support (author: Spencer Salazar)
- (added) 'HidIn' event class (see examples/hid/*.ck)
- (added) Terminal Keyboard Input (immediate mode, separate from HID)
- (added) 'KBHit' event class (see examples/event/kb*.ck)
- (added) sndbuf.chunks : better real-time behavior
- can be set to arbitrary integers
(before the .read happens)
- default is 0 frames (no chunk)
- set .chunks to 0 to read in entire file
(previous behavior)
- (added) int math.isinf( float ) // infinity test
- (added) int math.isnan( float ) // NaN test
(see examples/basic/infnan.ck)
- (added) sndbuf.valueAt( int ) for returning sample at arbitrary pos
(see examples/basic/valueat.ck)
- (added) MASSIVE STK UPDATE
- (added) 'StkInstrument' class
.noteOn( float )
.noteOff( float )
.freq( float ) / .freq()
.controlChange( int, float )
- (added) the following now extend 'StkInstrument'
(most of them have additional parameters)
- BandedWG
- BlowBotl
- BlowHole
- Bowed
- Brass
- Clarinet
- Flute
- FM (and all its subclasses: BeeThree, FMVoices,
HevyMetl, PercFlut, Rhodey, TubeBell, Wurley)
- Mandolin
- ModalBar
- Moog
- Saxofony
- Shakers
- Sitar
- StifKarp
- VoicForm
- (added) better STK documentation
http://chuck.cs.princeton.edu/doc/program/ugen.html
- (added) examples/stk/modulate.ck
- (added) --watchdog and --nowatchdog flags
(very experiment watchdog for real-time audio)
- (added) () => function; // calls function();
(thanks to Mike McGonagle for reporting)
- (added) if exp: ( cond ? if_cond : else_cond )
(thanks to Mike McGonagle for reporting)
- (added) math.abs( int ), math.fabs( float ), math.sgn( float )
(std version unchanged)
- (added) new examples
- basic/infnan.ck
/fm.ck fm2.ck fm3.ck
/valueat.ck
- event/kb.ck kb2.ck
- hid/joy.ck
/joy-fm.ck
/joy-noise.ck
/joy-shake.ck
- multi/i.ck
/n.ck
/we-robot.ck
- osc/s.ck
/r.ck
- stk/bandedwg.ck
/blowbotl.ck
/blowhole.ck
/bowed.ck
/brass.ck
/clarinet.ck
/flute.ck
/mandolin.ck
/modalbar.ck
/saxofony.ck
/stifkarp.ck
- (fixed) sinsoc, triosc, sqrosc, phasor:
- .sync( 0 ) uses input signal to modulate frequency
- .sync( 2 ) uses input signal to modulate phase
(FM synthesis)
- (fixed) impulse.last() no longer has extra samp delay
(thanks to Mike McGonagle for reporting)
- (fixed) class inheritance now handles the first overloaded
function of a parent correctly when called using a
subclass instance. in other words, this part sucks
less now.
(thanks to Mike McGonagle for reporting)
- (fixed) (internal) type checker re-instantiation patched
- (fixed) (internal) detach_all() moved to chuck_globals.cpp
- (fixed) (internal) global variables moved to chuck_globals.cpp
- (fixed) file handles close in compiler and parser
- (fixed) syntax error causing syntax errors
1.2.0.4
- (added) The ChucK Manual (pdf)
fantastic work by Adam Tindale and other documentors
see doc/Chuck_manual.pdf
- (added) Envelope.duration( dur ), Envelope.duration()
- (added) Envelope.keyOn(), Envelope.keyOff();
- (added) PitShift.mix( float ), PitShift.mix()
(originally effectMix)
- (added) std.srand( int ) : seed random number generator
- (added) update to RtAudio 3.2.0 -> much lower latency: Window DS
(thanks to Gary Scavone and Robin Davies)
- (added) update to RtMidi 1.0.4 -> improved midi: linux ALSA
(thanks to Gary Scavone and Pedro Lopez-Cabanillas)
- (added) bandlimited ugens: Blit, BlitSaw, BlitSquare
(thanks to Robin Davies for implementation,
Gary Scavone for putting them in STK)
- (added) examples/basic/foo.ck foo2.ck tick.ck tick2.ck
(foo2 shows using Blit, tick.ck is a simple counter)
- (added) examples/class/dinky.ck try.ck
(creating and using class to make instruments)
- (fixed) sndbuf.read now closes file handle and sets curf
- (fixed) default bufsize=256 under OSX and 512 under all other
- (fixed) chuck + foof garbled error message
- (fixed) chuck.lex compatibility under some linux
- (fixed) waiting on null event: no longer crashes VM
- (fixed) function arguments: no longer allow reference to primitive types
- (fixed) function: correctly select overloaded functions w/ implicit cast
- (fixed) std.atoi() std.atof(): no longer crash on null string
- (fixed) std.fabs(): now works correctly
- (fixed) basic/moe.ck larry.ck currly.ck use fabs
- (fixed) missing base class virtual destructors;
FreeBSD/g++ compatibility (thanks rasmus)
- (fixed) most -Wall warnings
- (fixed) CK_LOG_SYSTEM_ERROR now CK_LOG_CORE
1.2.0.3
(API changes again)
(syntax change - 'loop' -> 'repeat')
loop( … ) construct (see 1.2.0.2) changed to repeat( … )
- usage and semantics same as before
- this is also an experimental language feature
(let us know if it's good or bad)
float std.abs( float ) changed -> int std.abs( int )
use std.fabs( … ) for floating point absolute value
(added) /* block comments */
- no nesting allowed
- closing '*/' not necessary if commenting out rest of the file
(fixed) arrays of null object references correctly allocated
: Event @ events[128];
(fixed) DEFAULT sndbuf rate now set correctly to interpolate
for files outside of chuck sample rate (no longer have to
explicit do 1 => buf.rate)
(fixed) examples/midi/polyfony*.ck no longer creates 128
unnecessary events…
(changed) examples/stk/wurley.ck -> examples/stk/wurley2.ck
(changed) examples/stk/wurley.ck (wacky version)
1.2.0.2
2005.10.17
(sorry for the API changes)
(API change) OSC_Send class name changed to 'OscSend'
(also): .startMesg(…) name changed to startMsg(…)
(API change) OSC_Recv class name changed to 'OscRecv'
(API change) OSC_Addr class name changed to 'OscEvent'
(also): .hasMesg() name changed to .hasMsg()
(also): .nextMesg() name changed to .nextMsg()
(API change) STK Shakers.freq now expect Hz instead of MIDI number
(moved) examples/event/opensound.ck moved to examples/osc/OSC.ck
(see OSC_send.ck and OSC_recv.ck for examples on OpenSoundControl)
(moved) examples/event/polyfony*.ck to examples/midi/
(added) 'loop(…){ }' control structure :
example: loop( 8 ) { … } // executes body 8 times
example: loop( foo ) { … } // executes body foo times
(foo is evaluated exactly once entering the loop, the
value at that time is used as a constant to control
loop iteration - even if foo is changed in the loop
body.)
- supports break and continue
- important: one fundamantal difference between the loop
semantic and for/while/until semantic is that the argument
expression 'exp' in loop( exp ) is evaluated exactly once
when the loop is first entered.
(added) MidiIn and MidiOut member functions:
.good() : whether the thing is good to go (int)
.num() : the device number (int)
.name() : the device name (string)
.printerr( int ) : whether to auto print errors (default YES)
(added) --version command line flag (Graham)
(changed) chuck --status now prints shreds sorted by id
(previously it was the current shreduling order + blocked)
(changed) a udp port may now be shared by many OSC_Recv (phil)
: the incoming messages are broadcast to all
(changed) address/type string in OSC: comma now optional (phil)
(fixed) events are now 0-sample synchronous (instead of 1)
(fixed) startup audio stability for --callback mode
(fixed) incorrect 'continue' behavior in for loops
(fixed) improved OSC stability (phil)
(fixed) OSC shreduling sanity check failed now resolved
(fixed) math.round for negative numbers (win32)
(fixed) std.mtof and std.ftom now internally double precision
(fixed) removed extra console output in STK Flute
(fixed) multiple delete/assertion failure on type rollback
(fixed) chuck --kill now closes WvOut and MidiRW file handles
(added) examples/midi/gomidi.ck : very useful sometimes
(added) examples/midi/gomidi2.ck
(added) examples/basic/rec-auto.ck (rec2.ck back in action)
(added) examples/basic/fmsynth.ck (from v1)
(added) examples/sitar.ck
(fixed) examples/stk/*-o-matic.ck now uses array
1.2.0.1
2005.9.27
- (added) full callback capability for real-time audio
- blocking functionality still available
- select via flags: --blocking and --callback
- improves latency and stability, especially on linux
- use --callback (default) for low latency / small buffer size
- use --blocking for higher throughput
- (fixed) crash when doing on-the-fly 'replace' : chuck --replace 0 foo.ck
- (fixed) OSC event function now correctly named ("event")
- (fixed) removed debug output in OSC
- (fixed) implicit cast is now correct when sporking (thanks to Manfred Brockhaus)
- (fixed) examples code reformatted, cleaned, and commented
- (fixed) nested class definitions can now have same name as outer class
- (fixed) nested class bug in scan1 (thanks to Robin Davies)
- (fixed) variable resolution in parent class now visible (thanks to Robin Davies)
- (fixed) variable resolution ordering
- local, class, parent, global (thanks to Robin Davies)
- (fixed) emitter now asserts inheritance instead of equality (thanks to Robin Davies)
- (fixed) string comparison ==, !=
- (added) string operations <, <=, >, >=
1.2.0.0
SYNTAX and OPERATORS:
(added) +=>, operator : 2 +=> i; (also) -=>, *=>, /=>, %=>
(added) @=> for explicit assignment
this is the only way to make object reference assignments
(added) implicit int to float casting
(changed) cast now look like: 1.1 $ (int) => int i;
(added) function call by chucking :
// call
(1,4) => math.rand2f => result;
// same as
math.rand2f(1,4) => result;
LANGUAGE:
(fixed) type system for existing types
(added) forward lookup of classes and functions (mutual recursion)
(added) stack overflow detection for massive recursion
DOCUMENTATION:
(added) language specification:
http://chuck.cs.princeton.edu/doc/language
COMMAND-LINE:
(added) --probe prints all audio and MIDI devices
(added) --log or --verbose logs compiler and virtual machine
(added) --logN or --verboseN multi level logging
1 - least verbose
10 - most verbose
OBJECTS:
(added) 'class' definitions : class X { int i; }
(added) 'extends' keyword : class Y extends Event { int i; }
(added) virtual/polymorphic inheritance
(added) added pre-constructors - code at class level
gets run when object is instantiated
(added) function overloading :
class X { fun void foo() { } fun void foo( int y ) { } }
(added) base classes (can be extended):
Object, Event, UGen
see below
(added) base classes (cannot be extended):
array, string
see below
(added) member data
(added) static data
(added) member functions
(added) static functions
EVENTS:
(added) base Event class : Event e;
can be used directly
can be extended to custom events
(see one_event_many_shreds.ck)
(added) waiting on event, chuck to now :
e => now; // wait on e
(added) e.signal() wakes up 1 shred, if any
(added) e.broadcast() wakes up all shreds waiting on e
(added) class MidiEvent (see gomidi2.ck)
alternative to polling.
(added) class OSCEvent
ARRAYS:
(added) arrays : int a[10]; float b[20]; Event e[2];
(added) multidimensional arrays : int a[2][2][2];
(added) associative arrays : int a[10]; 0 => a["foo"];
all arrays are both int-indexed and associative
(added) array initialization : [ 1, 2, 3 ] @=> int a[];
(added) .cap() for array capacity
(added) .find() test if item is associative array
(added) .erase() erase item in associative array
UGENS:
(added) class UGen
can be extended
(changed) all ugen parameters are now also functions:
// set freq
440 => s.freq => val;
// same as…
s.freq( 440 ) => val;
(changed) left-most parameters must now be called as functions
// no longer valid
f.freq => float val;
// valid
f.freq() => float val;
// still ok
440 => s.freq => float val;
SHREDS:
(added) class Shred
(added) .yield() .id()
STRINGS:
(added) class string
AUDIO:
(added) stereo
all stereo unit generators have .left, .right, .pan functions
(changed) stereo ugen: dac (2 in, 2 out)
(changed) stereo ugen: adc (0 in, 2 out)
(added) stereo ugen: pan2 take mono or stereo input and pans
(added) stereo ugen: mix2 mix stereo input into mono
1.1.5.6
2005.4.11
- last 1.1 release : contains all 1.1 changes
1.1.5.5
2005.2.10
- FIFO to RR for audio and synthesis - improves stability on OS X
- fixed stack underflow emitter bug with declarations
- fixed cpu sleep bug on win32
1.1.5.4
2004.11.18
- fixed clicks when using adc unit generator
(thanks to paul botelho for testing)
- added 'maybe' keyword
maybe == 0 or 1, with 50% probability each
new examples:
- maybe.ck : the maybe keyword - bad idea? maybe.
- maybecli.ck : maybe click, maybe not
adc examples work better:
- adc.ck
- echo.ck
- i-robot.ck
1.1.5.3
2004.11.4
- when a shred is removed from VM, all children shreds are
also recursively removed
(this fix crash due to removing shreds with active children shreds)
(to keep children around, put parent in infinite time-loop)
(this isn't always good - real solution coming soon)
- 'start' keyword now available - holds the a shred's begin time
updated examples:
- powerup.ck : start local variable changed name
- spork.ck : added infinite time loop to keep children active
1.1.5.2
2004.10.17
- crtical patch shreduler time precision
- same as 1.1.5.1 - see below
1.1.5.1
2004.10.15
- on-the-fly chuck files to remote hosts!
> chuck @hostname + foo.ck
> chuck @hostname -p + foo.ck
- TCP replacing UDP for commands
- endian observed (mac <-> win32/linux)
- more sensible VM output for on-the-fly commands
- many on-the-fly bug fixes
- --replace: new shred inherits the replaced shred id
(useful to keep track of shreds in VM)
- sndbuf automatically set .rate to 1.0 (instead of 0.0)
(0.0 => buf.rate if no play on next time advance)
- new on-the-fly examples
new examples:
otf_*.ck - illustrates precise on-the-fly timing
(adapted from Perry's ChucK drumming + Ge's sine poops)
chuck them one by one into the VM:
terminal 1%> chuck --loop
terminal 2%> chuck + otf_01.ck
(wait)
terminal 2%> chuck + otf_02.ck
(wait)
(repeat through otf_07.ck)
(remove, replace and add your own)
1.1.5.0
2004.9.29
now able to write audio files (wav, aiff, raw)
(try rec.ck and rec2.ck concurrently with any other shreds
to record to disk)
STK file endian is now observed (more things should work
on little endian systems)
added 4 "special" built-in sound samples
"special:glot_pop" - glottal pulse (flat)
"special:glot_ahh" - glottal 'ahh' pop
"special:glot_eee" - glottal 'eee' pop
"special:glot_ooo" - glottal 'ooo' pop
(see/listen to moe++.ck, larry++.ck, curly++.ck)
all bulit-in sound samples now loadable from both WaveLoop and sndbuf
(win32) sndbuf now properly loads wav aiff
new examples:
moe++.ck - stooges, evolved
larry++.ck
curly++.ck
rec.ck - run this concurrently to write audio to file
(also try with -s flag for file out, no real-time audio)
rec2.ck - same as rec, but writes to different file every time,
for sessions
1.1.4.9
2004.9.18
all of STK is now in ChucK!
new examples (see below)
add '--bufnum' to chuck command line (number of buffers)
--status no longer prints full path for source
full path now works for command line + (thanks Adam T.)
minor bug fixes
improved online ugen documentation (go phil!)
new ugens: (again, thanks to Phil Davidson!)
BandedWG (STK)
Blowhole (STK)
BlowBotl (STK)
Bowed (STK)
Brass (STK)
Clarinet (STK)
Flute (STK)
ModalBar (STK)
Saxofony (STK)
Sitar (STK)
StifKarp (STK)
delayp - variable write position delay line
new examples:
band-o-matic.ck - banded waveguide, automated
delayp.ck - shows usage
mode-o-matic.ck - modal bar, happy chaos
stifkarp.ck - stifkarp, chaos
1.1.4.8
2004.9.8
added win32 visual studio support (chuck_win32.*)
new oscillators (see below, thanks to Phil)
corrected more issues on some 64-bit systems
new examples (see below)
chucking to oscillators now able to control phase
(alternative to doing FM by hand (1::samp at a time),
see pwm.ck and sixty.ck) (thanks to Phil)
new ugens:
triosc - triangle wave
pulseosc - pulse wave oscillator w/ controllable pulse width
sqrosc - square wave
sawosc - saw tooth
phasor - 0 to 1 ramp
new examples:
sixty.ck - shows osc's
pwm.ck - basic pulse width modulation
(you can still do FM "by hand" - see fmsynth.ck)
1.1.4.7
2004.9.4
- improved performance (reduce cpu overhead)
- fixed bug that caused crash on ctrl-c
- added sndbuf.play (same as rate)
- corrected issues on some 64-bit systems
- sndbuf.ck now works
1.1.4.6
2004.8.26
added netin/netout unit generators (alpha version)
added a lot of STK unit generators (thanks to philipd)
(over 80% of STK is now imported)
fixed Shakers (thanks to philipd) : examples/shake-o-matic.ck
better compilation for cygwin
minor bugs fixes
added many READ functionality for ugen parameters
see online documentation at:
http://chuck.cs.princeton.edu/doc/program/ugen.html
new ugens:
netout (alpha version) - audio over UDP (see net_send.ck)
netin (alpha version) - audio over UDP (see net_recv.ck)
Chorus (STK)
Envelope (STK)
NRev (STK)
PRCRev (STK)
Modulate (STK)
PitShift (STK)
SubNoise (STK)
WvIn (STK)
WvOut (STK)
BlowBotl (STK)
FM group (STK)
- BeeThree
- FMVoices
- HevyMetl
- PercFlut
- TubeBell
new examples:
shake-o-matic.ck - STK shakers going bonkers
net_send.ck - oneway sender
net_recv.ck - oneway recv
net_bounce.ck - redirect
1.1.4.5
2004.8.14
fixed bug for multiple declarations
made functions local to shred by default
shadowing now works
add 'blackhole' ugen for ticking ugens
added std.mtof (philipd)
added std.ftom
added std.dbtorms
added std.rmstodb
added std.dbtopow
added std.powtodb
new ugens:
blackhole - the silent sample sucker
Wurley (STK)
Rhodey (STK)
OnePole (STK)
OneZero (STK)
PoleZero (STK)
TwoPole (STK)
TwoZero (STK)
new examples:
powerup.ck ( (ab)use of TwoPole and sporking)
i-robot (building feedback filters)
voic-o-form.ck (music for replicants)
rhodey/wurley.ck (more stk-o-matics)
1.1.4.4
2004.8.2
added sndfile patch for jack/sndfile (Martin Rumori)
added special raw wav for WaveLoop (philipd, gewang)
(see examples/dope.ck)
"special:ahh"
"special:eee"
"special:ooo"
"special:britestk"
"special:dope"
"special:fwavblnk"
"special:halfwave"
"speical:impuls10"
"special:impuls20"
"special:impuls40"
"special:mand1"
"special:mandpluk"
"special:marmstk1"
"special:peksblnk"
"special:ppksblnk"
"special:slience"
"speical:sineblnk"
"special:sinewave"
"special:snglpeak"
"special:twopeaks"
fixed shred shreduling ID bug for on-the-fly added shreds (gewang)
fixed function resolution for on-the-fly added shreds (gewang)
added math.nextpow2( int n ) (Niklas Werner, gewang)
new STK ugens:
Mandolin (see examples/mandolin.ck examples/mand-o-matic.ck)
Moog (see examples/moogie.ck)
new examples:
mandolin.ck (use of STK mandolin)
mand-o-matic (fire it up!)
dope.ck (Homer's WaveLoop using internal STK sound)
print_last.ck (prints last ugen output)
wind2.ck (2 shreds control parameters)
1.1.4.3
2004.7.4
add sndfile support (Ari Lazier)
add sndbuf file reading/writing (Ari Lazier)
add sinosc.sfreq and phase (Phil Davidson)
add sndbuf rate and sinc interp (Phil Davidson)
add cget functions for unit generators parameters
(many parameters are readable now)
add .last for last sample computed for all ugen's
add constants in lib import
add math.pi math.twopi math.e
add --srate(N) in command line (chuck --help)
typing .ck extension optional on command line
fixed spork bug involved local variables
fixed nested function calls
fixed math.min/max bug (Phil Davidson)
fixed audio stability OS X (Ari Lazier)
fixed MidiOut issue (thanks to n++k)
new Unit Generators (from STK)
ADSR (updated)
BiQuad
Delay
DelayA
DelayL
Echo
WaveLoop (updated)
1.1.4.2
2004.6.14
- added support for arbitrary audio in/out (via command line)
1.1.4.1
2004.6.13
- double lt gt fix
- added demo[0-5].ck to examples
- PROGRAMMER updated
- big/little endian issue fixed
1.1.4.0
2004.6.12
- major update to use double float for time, dur, and float
(this fixes the millisecond bug)
1.1.3.6
2004.6.9
- fixed win32 build problem (thanks to Adam Wendt)
- fixed midi stack problem (thanks to Thomas Charbonnel)
1.1.3.5
2004.6.8
- fixed mem stack bug (report Alex Chapman)
- added jack support (thanks to Thomas Charbonnel)
1.1.3.4
2004.6.7
- fixed spork bug
- bad midiin now returns 0
- supports sound card with no input
- add spork.ck
1.1.3.3
2004.6.7
- added ability to spork shreds from code
- casting float/int
- 0-127 MIDI devices support
- fix bugs in on-the-fly commands
- added features to --add, --remove
- added --time --kill
- fixed table bug (thanks to n++k)
- fixed linux makefile (thanks to n++k)
- added STK ugen: WaveLoop, Shakers, JCRev, ADSR
- added shred-time synch by T - (now % T ) => now;
1.1.3.2 - 1.1.3.0 - initial release