ChucK Music Programming Language

Related tags

Audio chuck

ChucK macOS - Build and Unit Tests Linux - Build and Unit Tests

Please note that the master branch has been renamed to main.

The Internet Engineering Task Force (IETF) points out that "Master-slave is an oppressive metaphor that will and should never become fully detached from history" as well as "In addition to being inappropriate and arcane, the master-slave metaphor is both technically and historically inaccurate."

Strongly-timed, Concurrent, and On-the-fly Music Programming Language

Welcome to ChucK!

what is it? : Chuck is a programming language for real-time sound synthesis and music creation. It is open-source and freely available on macOS, Windows, and Linux. Chuck presents a unique time-based, concurrent programming model that's precise and expressive (we call this strongly-timed), with dynamic control rates and the ability to add and modify code on-the-fly. In addition, ChucK supports MIDI, OpenSoundControl, HID device, and multi-channel audio. It's fun and easy to learn, and offers composers, researchers, and performers a powerful programming tool for building and experimenting with complex audio synthesis/analysis programs, and real-time interactive music.

For more information, including documentation, research publications, and community resources, please check out the ChucK website:

  • Fix MacOS 11 compile

    Fix MacOS 11 compile

    makefile.osx was treating MacOS 11.1 as if it were pre-10.6

    opened by mitchblank 13
  • Add bounds exceptions to FilterBasic

    Add bounds exceptions to FilterBasic

    Not sure if Q bounding is desired.

    opened by ntindall 8
  • Add --syntax-check-only command line switch.

    Add --syntax-check-only command line switch.

    I want to add this switch in the hopes I'll be able to use it in my VSCode extension for ChucK to add syntax checking in the editor.

    opened by forrcaho 7
  • adsr releaseTime is nan

    adsr releaseTime is nan

    ADSR a;
    a.set( 10::ms, 2::ms, 0.0, 10::ms );
    <<< a.releaseTime() >>>;

    --> nan :(dur)

    opened by lathertonj 7
  • Implement some left-recursion in the Bison file

    Implement some left-recursion in the Bison file

    While attempting to play some large chuck files, with several thousand statements, I encountered a "memory exhausted" error.

    I found a reference to the issue, and a solution posted by Tom, here:

    After some attempts at replacing all of the prepend_* with append_*, and failing, this PR replaces 3 functions and implements left-recursion in the Bison file.

    • All the tests pass.
    • I'm able to play the larger files that would cause the parser to run out of memory previously.

    Let me know if I can write more tests. Thanks!

    opened by stuntgoat 6
  • Reset lisa loop record point to loop start rather than the start of the lisa buffer when the loop end is reached.

    Reset lisa loop record point to loop start rather than the start of the lisa buffer when the loop end is reached.

    This was made to fix an issues I found when working with lisa loops. Looped overdubbing would break as the record position got reset to the beginning of the buffer rather than the loop start when the end of the loop was reached. This better matches the behavior of the play positions and fixes what I believe is currently a bug.

    opened by jordancolburn 6
  • Seg fault chuck --probe on OSX 10.9.3

    Seg fault chuck --probe on OSX 10.9.3

    $ chuck --probe
    [chuck]: found 5 device(s) ...
    [chuck]: ------( audio device: 1 )---------------
    [chuck]: device name = "Apple Inc.: Built-in Microphone"
    [chuck]: probe [success] ...
    [chuck]: # output channels = 0
    [chuck]: # input channels  = 2
    [chuck]: # duplex Channels = 0
    [chuck]: default output = NO
    [chuck]: default input = YES
    [chuck]: natively supported data formats:
    [chuck]:   32-bit float
    [chuck]: supported sample rates:
    [chuck]:   32000 Hz
    [chuck]:   44100 Hz
    [chuck]:   48000 Hz
    [chuck]:   88200 Hz
    [chuck]:   96000 Hz
    [chuck]: ------( audio device: 2 )---------------
    [chuck]: device name = "Apple Inc.: Built-in Output"
    [chuck]: probe [success] ...
    [chuck]: # output channels = 2
    [chuck]: # input channels  = 0
    [chuck]: # duplex Channels = 0
    [chuck]: default output = YES
    [chuck]: default input = NO
    [chuck]: natively supported data formats:
    [chuck]:   32-bit float
    [chuck]: supported sample rates:
    [chuck]:   44100 Hz
    [chuck]:   48000 Hz
    [chuck]:   88200 Hz
    [chuck]:   96000 Hz
    [chuck]: ------( audio device: 3 )---------------
    Segmentation fault: 11

    On this machine I have Apogee ONE and Soundflower drivers and the ONE device is not currently connected. If I remember right with previous ChucK versions the ONE comes up as device 3, sorry will require more investigation on my part.

    $ uname -a
    Darwin foo.local 13.2.0 Darwin Kernel Version 13.2.0: Thu Apr 17 23:03:13 PDT 2014; root:xnu-2422.100.13~1/RELEASE_X86_64 x86_64
    $ chuck --version
    chuck version: (chimera)
       mac os x : intel : 64-bit
    mac os x 
    opened by heuermh 5
  • Make linux-alsa errors

    Make linux-alsa errors

    Here is an errors log

    RtAudio/RtAudio.o: In function `RtApiJack::getDeviceCount()':
    RtAudio.cpp:(.text+0x2b2): undefined reference to `jack_client_open'
    RtAudio.cpp:(.text+0x30d): undefined reference to `jack_get_ports'
    RtAudio.cpp:(.text+0x4b6): undefined reference to `jack_client_close'
    RtAudio/RtAudio.o: In function `RtApiJack::closeStream()':
    RtAudio.cpp:(.text+0xbda): undefined reference to `jack_client_close'
    RtAudio.cpp:(.text+0xccd): undefined reference to `jack_deactivate'
    RtAudio/RtAudio.o: In function `RtApiJack::stopStream()':
    RtAudio.cpp:(.text+0x1c4e): undefined reference to `jack_deactivate'
    RtAudio/RtAudio.o: In function `RtApiJack::startStream()':
    RtAudio.cpp:(.text+0x1d33): undefined reference to `jack_activate'
    RtAudio.cpp:(.text+0x1dd1): undefined reference to `jack_get_ports'
    RtAudio.cpp:(.text+0x1e14): undefined reference to `jack_port_name'
    RtAudio.cpp:(.text+0x1e23): undefined reference to `jack_connect'
    RtAudio.cpp:(.text+0x1f19): undefined reference to `jack_get_ports'
    RtAudio.cpp:(.text+0x1f5c): undefined reference to `jack_port_name'
    RtAudio.cpp:(.text+0x1f75): undefined reference to `jack_connect'
    RtAudio/RtAudio.o: In function `RtApiJack::abortStream()':
    RtAudio.cpp:(.text+0x213b): undefined reference to `jack_deactivate'
    RtAudio/RtAudio.o: In function `RtApiJack::callbackEvent(unsigned long)':
    RtAudio.cpp:(.text+0x3ef4): undefined reference to `jack_port_get_buffer'
    RtAudio.cpp:(.text+0x4088): undefined reference to `jack_port_get_buffer'
    RtAudio.cpp:(.text+0x4148): undefined reference to `jack_port_get_buffer'
    RtAudio.cpp:(.text+0x41a8): undefined reference to `jack_port_get_buffer'
    RtAudio.cpp:(.text+0x4240): undefined reference to `jack_port_get_buffer'
    RtAudio/RtAudio.o:RtAudio.cpp:(.text+0x43cb): more undefined references to `jack_port_get_buffer' follow
    RtAudio/RtAudio.o: In function `RtAudio::openRtApi(RtAudio::Api)':
    RtAudio.cpp:(.text+0x5917): undefined reference to `jack_set_error_function'
    RtAudio/RtAudio.o: In function `RtApiJack::RtApiJack()':
    RtAudio.cpp:(.text+0x5bfb): undefined reference to `jack_set_error_function'
    RtAudio/RtAudio.o: In function `RtAudio::RtAudio(RtAudio::Api)':
    RtAudio.cpp:(.text+0x5eef): undefined reference to `jack_set_error_function'
    RtAudio/RtAudio.o: In function `RtApiJack::getDeviceInfo(unsigned int)':
    RtAudio.cpp:(.text+0x60a9): undefined reference to `jack_client_open'
    RtAudio.cpp:(.text+0x6113): undefined reference to `jack_get_ports'
    RtAudio.cpp:(.text+0x62e6): undefined reference to `jack_get_sample_rate'
    RtAudio.cpp:(.text+0x632d): undefined reference to `jack_get_ports'
    RtAudio.cpp:(.text+0x6373): undefined reference to `jack_get_ports'
    RtAudio.cpp:(.text+0x63ec): undefined reference to `jack_client_close'
    RtAudio.cpp:(.text+0x64f6): undefined reference to `jack_client_close'
    RtAudio.cpp:(.text+0x65ed): undefined reference to `jack_client_close'
    RtAudio/RtAudio.o: In function `RtApiJack::probeDeviceOpen(unsigned int, RtApi::StreamMode, unsigned int, unsigned int, unsigned int, unsigned long, unsigned int*, RtAudio::StreamOptions*)':
    RtAudio.cpp:(.text+0x6df0): undefined reference to `jack_client_open'
    RtAudio.cpp:(.text+0x6e9c): undefined reference to `jack_get_ports'
    RtAudio.cpp:(.text+0x6f71): undefined reference to `jack_client_open'
    RtAudio.cpp:(.text+0x70af): undefined reference to `jack_get_ports'
    RtAudio.cpp:(.text+0x7339): undefined reference to `jack_get_sample_rate'
    RtAudio.cpp:(.text+0x7351): undefined reference to `jack_client_close'
    RtAudio.cpp:(.text+0x7975): undefined reference to `jack_get_ports'
    RtAudio.cpp:(.text+0x79be): undefined reference to `jack_port_by_name'
    RtAudio.cpp:(.text+0x7a5b): undefined reference to `jack_get_buffer_size'
    RtAudio.cpp:(.text+0x7c59): undefined reference to `jack_set_process_callback'
    RtAudio.cpp:(.text+0x7c72): undefined reference to `jack_set_xrun_callback'
    RtAudio.cpp:(.text+0x7c89): undefined reference to `jack_on_shutdown'
    RtAudio.cpp:(.text+0x7cf1): undefined reference to `jack_port_register'
    RtAudio.cpp:(.text+0x7f41): undefined reference to `jack_port_register'
    RtAudio.cpp:(.text+0x8366): undefined reference to `jack_client_close'
    opened by Arseniusz 5
  • Adding a missing chuck script to the VM confuses subsequent error messages

    Adding a missing chuck script to the VM confuses subsequent error messages

    Small test case like this:

    MidiIn min;;

    results in the following output (both with Chuck CLI and MiniAudicle), where Chuck incorrectly attributes the MIDI open error to the script-that-does-not-exist file:

    [script-that-does-not-exist]: no such file or directory
    [script-that-does-not-exist]: MidiIn: couldn't open MIDI port 31337...

    This is pretty low priority, as adding missing or typo-ed script filenames to the VM is obviously developer error, but the consequence on subsequent error messages can definitely lead to some befuddled head scratching.

    opened by ynohtna 5
  • support for function arguments

    support for function arguments

    I can't find anything in the docs or the general web about a Function type or passing functions as arguments.

    Is there or will there be support for this in ChucK?

    opened by RobertAlbus 0
  • Generics or `any` type?

    Generics or `any` type?

    I have a function that rotates an array of ints such that

    [1,2,3,4] @=> int arr[];
    rotate(arr, 1) @=> arr;
    // arr now equal to [2,3,4,1]

    I do not want to implement this function for floats, UGens, etc. Is there a facility in ChucK for what some languages call Templates or Generics?

    opened by RobertAlbus 1
  • Adding pop out for arrays

    Adding pop out for arrays


    opened by chamington 0
  • Chuck as a puredata or max/msp external?

    Chuck as a puredata or max/msp external?

    I have noted that in the recent version (1.4.1.*) of chuck there is this separation of the core code from the host code and that one can generate a libchuck.a with the current Xcode project in the chuck source, and that all of this refactoring is aimed at making embedding chuck easier.

    However, I am struggling to find simple examples of embedding chuck, or documentation of the chuck cpp or c api so that I can figure out whether it makes sense to embed chuck in a puredata or max/msp external in the same way that csound is embedded for example or faust is embedded for example.


    opened by shakfu 1
  • append using 2D float array fails-  NullPointException: (array append)

    append using 2D float array fails- NullPointException: (array append)

    the simplified code below fails on chuck (Windows 10).

    float boolBowDirList2 [0][0]; float temp2 [0]; temp2<<0.5; boolBowDirList2 <<temp2; // NullPointerException: (array append) on line[12]

    it works fine if the array type is int but not for float

    opened by archiartymusictects 0
  • --pid-file command line option (Linux/MacOs only)

    --pid-file command line option (Linux/MacOs only)

    This PR provides Chuck with a --pid-file <FILEPATH> command line option. When provided, the Chuck process writes its process ID to the specified file (and removes it upon exit).

    This allows Chuck to easily be monitored/diagnosed/rebooted by monit (and other similar process management tools) in performance and installation contexts where Chuck is deployed to run unsupervised for extended periods, regardless of memory leaks, hardware issues, script bugs, unexpected input, etc.

    Alternatives Explored

    Until this change, I have been capturing the Chuck process ID in a launching shell script. However, this conceptually simple operation has turned out to be quite brittle, requiring yearly fiddly maintenance to deal with the corner cases arising from vagaries of the overlaps, bugs assumptions between shell, terminal and OS. Having the Chuck process itself be the authoritative source of its process ID makes better long-term sense to me.


    This PR only supports Linux/MacOS builds. In theory, the Windows variant is simply a call to DWORD GetProcessId() (from processthreadsapi.h) but I don't have easy access to a Win dev environment right at this moment.

    (I am also unsure whether process monitoring via process ID is that much of an expected use case on Windows.)


    If you're happy to merge this, I'll add a PR for /doc/manual/chapters/chuck_virtualmachine.tex explaining the new CLI flag.

    opened by ynohtna 0
  • Bugfix: MidiIn crash

    Bugfix: MidiIn crash

    If there's a MidiIn in a shred that goes away, we were failing to unregister our event listener causing a crash on windows 64bit debugging builds.

    repro case

    fun void doit(int id, dur maxwait)
        MidiIn min;
        MidiMsg msg;
            <<< "MIDI device 0 can't be opened." >>>;
        <<< "MIDI device:", min.num(), " -> ", >>>;
        <<< "Listening for midi events for", maxwait >>>;
        now => time start;
        while(now - start < maxwait)
                min => now;
                    <<<"midimsg", msg.data1>>>;
                1::second => now;
        <<< "shred", id, "done" >>>;
    spork ~ doit(1,10::second);
    spork ~ doit(2,25::second);
    opened by dbadb 0
  • on-the-fly over network: unrecognized incoming command from network: '0'

    on-the-fly over network: unrecognized incoming command from network: '0'

    I'm trying to communicate with a chuck server running on a raspberry pi from a macbook pro. I'm consistently getting getting this error.

    Host, Raspbian GNU/Linux 10 (buster) with a pisound:

    [email protected]:~ $ chuck --dac2 --adc2 -l
    [chuck]: unrecognized incoming command from network: '0'

    Client, macOS 11.4 (Big Sur):

    $ chuck @ +
    [chuck]:(1:CKCORE): connecting to on port 8888 via TCP...

    SinOsc osc => dac;
    2::second => now;
    opened by cviejo 0
  • Update to latest RtAudio (as submodule). Support for runtime selection of audio driver.

    Update to latest RtAudio (as submodule). Support for runtime selection of audio driver.

    Here we migrate the "burned-in" RtAudio support to utilize the official github version.


    • use of submodules may be a headache across branches. Or for non-pro-level git users.


    • latest and greatest RtAudio
    • ability to have multiple drivers in the same chuck build. Currently we have validated cohabitation of Windows ASIO and DirectSound but it appears possible (but unproven) to have, eg, Pulse, Alsa and Jack drivers in the same linux build.

    Known issues:

    • the ASIO driver is currently busted (one fix is easy). When the trivial fix is applied, the latency on the adc goes way down (compared to DirectSound). So this was the entire point of this exercise.


    • no changes to the default builds have been made. And should still produce the same result. If one edits a makefile or vsproj to include more RtApi driver requests (eg -D__WINDOWS_ASIO__) you can include multiple drivers in your build. A new commandline option --driver is required to select the non-default driver... For example: chuck --probe --driver::ASIO vs chuck --probe
    opened by dbadb 1
  • Fix for uninitialized variable in RIFF_MARKER for .wav files.

    Fix for uninitialized variable in RIFF_MARKER for .wav files.

    Comes about when reading a file written with WvOut. It seems possible that the real problem is with WvOut writing bogus files, but this is definitely a problem here as well.

    opened by dbadb 0
A Music programming language. Translates source code into MIDI. Includes a player. Supports MIDI-Karaoke. Includes a MIDI analyzer.

Get Started | Features | Screenshots | Programming | CLI | Contribute | License Midica is an interpreter for a Music Programming Language. It translat

Jan Trukenmüller 51 Nov 27, 2021
Esoteric Programming Language

ORCΛ Orca is an esoteric programming language designed to quickly create procedural sequencers, in which every letter of the alphabet is an operation,

Hundredrabbits 3.7k Jan 23, 2022
A language for music notation

Lydown is a language and compiler for creating music scores, parts and snippets. The lydown code is compiled to lilypond code and then compiled to PDF

Sharon Rosner 21 Apr 8, 2021
Sound Processing Language for Web Audio

CoffeeCollider CoffeeCollider is a language for real time audio synthesis and algorithmic composition in HTML5. The concept of this project is designe

mohayonao 213 Dec 18, 2021
Streaming music player that finds free music for you

Desktop music player focused on streaming from free sources Links Official website Mastodon Twitter Support channel (Matrix): Disc

null 7.2k Jan 16, 2022
Music player and music library manager for Linux, Windows, and macOS

Quod Libet: an audio library, manager & player Quod Libet is a cross-platform audio / music management program. It provides many ways to view your loc

Quod Libet 1.1k Jan 10, 2022
music library manager and MusicBrainz tagger

beets Beets is the media library management system for obsessive music geeks. The purpose of beets is to get your music collection right once and for

beetbox 10.6k Jan 23, 2022
:tangerine: Clementine Music Player

Clementine Clementine is a modern music player and library organizer for Windows, Linux and macOS. Latest Release Latest Pre-Releases Website: http://

Clementine 3.1k Jan 2, 2022
Small, fast and powerful console music player for Unix-like operating systems.

Warning: cmus is not actively maintained. For details, please see #856 cmus — C* Music Player Copyright © 2004-2008 Timo Hirvo

C* Music Player 4.5k Jan 16, 2022
Music player for deepin desktop environment.

deepin-music Deepin music is a local music player with beautiful design and simple functions developed by Deepin Technology. Dependencies Build depend

Wuhan Deepin Technology Co.,Ltd. 158 Jan 6, 2022
A beautiful cross platform Desktop Player for Google Play Music

Google Play Music™ Desktop Player Windows: MacOS / Linux: Run "Google Play Music" as a standalone desktop app. Never again will you have to hunt throu

Samuel Attard 8.5k Jan 21, 2022
Cross-platform music production software

LMMS A soft PR-Freeze is currently underway to prepare for refactoring (#5592). Please do not open non-essential PRs at this time. What is LMMS? LMMS

LMMS 5.5k Jan 22, 2022
Mopidy is an extensible music server written in Python

Mopidy Mopidy is an extensible music server written in Python. Mopidy plays music from local disk, Spotify, SoundCloud, Google Play Music, and more. Y

Mopidy 7.3k Jan 21, 2022
🎵 A simple, clean and cross-platform music player

Museeks A simple, clean and cross-platform music player. ( Features Museeks aims to be a simple and easy to use music player with a clean U

Pierre de la Martinière 1.1k Jan 10, 2022
MuseScore is an open source and free music notation software. For support, contribution, bug reports, visit Fork and make pull requests!

Music notation and composition software MuseScore is an open source and free music notation software. For support, contribution, and bug reports visit

MuseScore 6.7k Jan 14, 2022
GTK 3 client for the Music Player Daemon - I'm looking for new maintainers!

Sonata is looking for new maintainers! I (@multani) don't use Sonata much anymore and as a consequence, I've been very slow to answer even to the few

Jonathan Ballet 123 Aug 28, 2021
Python library for audio and music analysis

librosa A python package for music and audio analysis. Documentation See for a complete reference manual and introductory tut

librosa 4.9k Jan 15, 2022
Ear-bending noises and music

Cecilia5 - the audio processing toolbox Cecilia is an audio signal processing environment. Cecilia lets you create your own GUI (grapher, sliders, tog

Olivier Bélanger 130 Dec 29, 2021
🐦 A personal music streaming server that works.

koel Intro Koel (also stylized as koel, with a lowercase k) is a simple web-based personal audio streaming service written in Vue on the client side a

Koel 13.2k Jan 23, 2022