Skip to content
View in the app

A better way to browse. Learn more.

Young Composers Music Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

music coded with ChucK

Featured Replies

here are a few tunes that have been coded using the ChucK programming language.

These examples are pretty simple, because I'm really not that good at using the language yet. I've only been at it for about a month. In any case, I've created these, and a few others.

Most of the melodies and chords are selected randomly from certain scales.. so each performance of this stuff is different. Anyway.. enjoy :)

this one is the most 'pop' It's an exercise in breakbeats. The break is sliced into 16 slices which are played back randomly. This one gets a little distorted in a couple of places.. but i don't really care to fix it. The melody has a set rhythm, but the notes are selected randomly from a small set.

gameover.mp3 - File Shared from Box.net - Free Online File Storage

This one isn't really all that interesting. more or less ambient music.. lots of delay and reverb.

untitled1.mp3 - File Shared from Box.net - Free Online File Storage

This one is longer than the other two, and has more form.. and more 'stuff' in it. all harmonies and melodies are random. This one uses a whole tone scale quite a bit.

messiaen01.mp3 - File Shared from Box.net - Free Online File Storage

I'll take a listen to these later today, when I have some free time. There are a lot of Chuck users on the electro-music forum. Just an FYI, if you're interested. They don't post a lot of songs but they do talk about techniques and such.

Hey!

Gameover: i dont like, sounds like a loop beat that you get in some place and a test tone, realy is annoying because all the time is the same.

Untitled1: This is more interesting, i like it a less... maby you can try to change your sinusoidal wave, because is a sond very poor. maybe a diente de sierra?

Messiaen: yes sounds like a Messiaen song, one of his first. The timbre is more rich, and have some ambient who makes this song special, i like it very much, the birds, disonances, no!!!! this drums???!!! oh, i dont like it now, i think that this drums did not have to be, and much less that tones... now i dont like it, haha, i love the begining later is a... a bad techno song.

=D well that was my opinion

  • Author

i know.. i hang out over there a bit. I am 'mrcold'

  • Author
Hey!

Gameover: i dont like, sounds like a loop beat that you get in some place and a test tone, realy is annoying because all the time is the same.

Untitled1: This is more interesting, i like it a less... maby you can try to change your sinusoidal wave, because is a sond very poor. maybe a diente de sierra?

Messiaen: yes sounds like a Messiaen song, one of his first. The timbre is more rich, and have some ambient who makes this song special, i like it very much, the birds, disonances, no!!!! this drums???!!! oh, i dont like it now, i think that this drums did not have to be, and much less that tones... now i dont like it, haha, i love the begining later is a... a bad techno song.

=D well that was my opinion

When i am learning new technology, i generally go for the 'generic techno

hahaha yes it happen with me too.

There are differents types (and forms) of ondes, sinusoidal, diente de sierra, cuadrante, cuadrante sin alias, etc, a lot. Sinusoidal is the more poor, dont have harmonics and this make it a poor sound. Diente de sierra produces a lot of hamonics and for this reason is a more ful sound.

Here a diagram of what i talking about:

http://i258.photobucket.com/albums/hh263/kaux/MisImagenesDidacticas/SynthWaveforms.jpg

http://www.churchofeuthanasia.org/whorld/Help/images/Waveforms.gif

You are using a digital Sinusoidal

  • Author

You are using a digital Sinusoidal

no i am not.

yes you are, the machines dont lie. I saw and listen yor ondes and that tone are a digital sinusoidal one

You know, Cody Loyd is using a machine too… It would be weird if only your computer had the access to the true waveforms he used, but he as the maker wouldn't. Some things may appear very Sinus-like, due to a lack of overtones, but only Cody Loyd can tell us what he used for this.

  • Author
yes you are, the machines dont lie. I saw and listen yor ondes and that tone are a digital sinusoidal one

lol.. what tone?

give me a time.

i know.. i hang out over there a bit. I am 'mrcold'

Ha! I don't hang out in the How To areas very much. I mostly check out news, microtonal discussions, festival information, and such.

I finally got a chance to listen to your pieces.

Game Over:

Because I don't work with Chuck, I really don't know much about it. Is everything done in Chuck? Or is just the sound effects done in Chuck? Is the drum sound a sample, for example, that you "access" through Chuck and Chuck plays different parts of it? I'd like to hear more about your process and how you actually program what you are doing.

Conceptually, this is very interesting. Love how everything progresses, mangles, keeps on. Lots of energy in this. Has kind of a "Big Beat" feel to it. I think it goes on a bit long, maybe could have ended at the first pause. I have a feeling this is more of an exploratory piece than a finished thing, but I could be wrong. I wanted a little more definition. If there is some way to EQ this, I think a touch more in the 5 - 6khz range would help. This might be due to a low MP3 resolution, though. Lows and highs tend to really get lost on conversion.

untitled 1:

This piece, honestly, doesn't do much for me. I get what you're after and it seems cool, but I think you got carried away on the effects. I think would work better with a lot less effect mix, different ambient textures that offset each other.

messian01:

I wasn't crazy about the way this one started, but it grew on me. After the drums come in, there is a cool detuned synth (somewhere around 40% through the file) that I think can be exploited by manually offsetting another instance of the same sound and some really deep reverb (not deep in timbre, but spacially); perhaps you thought of this and used the next detuned passage (the plucked piano sound about 80% of the way through) to function like a repetition. Like the first piece, this goes on too long for my tastes, but it has an arc that I can follow and seems more complete.

I think what you are doing is very, very cool. I look forward to hearing more from you.

hey Cody Loyd, time ago you didn't post here, .... nice you come back...

Gameover:

I would only change that glissando sounds over and over ....

The rest is ok, .... it needs more elements but I remember something sush said about "you don't get tired of people keeps telling you what to do, or what would they do" ...something like that ...

Untitled1:

is more interesting indeed but the introduction .... what is that man ? .... I didn't like that. ....unless you explain it to me ....

messiaen01:

(there's a click at the beginning) .... a low freq. hum ... is that ok ? .... nice birds ...

probably the best of the 3 for me, (but Messiaen would never used those beats :D ) ...

is something wrong with my earphones or your tracks are a little weak in dB ?

  • Author

thanks everyone for the comments. Compositionally, these really aren't that fantastic, and I am aware of this. These are more experiments in the chuck language. I'll explain a little about whats going on with chuck.

ChucK is a programming language. ChucK => Strongly-timed, On-the-fly Audio Programming Language check out the examples on that page to see a little what the code looks like...

the language includes things like Oscillators (sine, tri, saw etc.) Envelope Generators, Effects (reverb, chorus, filters etc.) and several synth instruments (of varying quality.. things like flute, plucked string, moog etc.). The language has the ability to read in .wav files from the computer and play them either from memory, or from the HD.

The language supports re-usable classes and functions (that is, you can code some sort of 'instrument' and it can be copy and pasteable from program to program.)

The language is "strongly timed" which means that everything must be set to run in a certain time frame, or it won't run at all. This means that it is VERY easy to get things running together in sync (something which is not so easy in PureData.. which i have also used.)

Ok.. a bit about how I created this stuff. A very important symbol in this language is called "the chuck" and looks like this =>. The most basic program is something like this:


SinOsc s => dac;
day => now;[/CODE]

There is a Sine Oscillator (called 's') which is 'chucked' to the dac (digital audio convertor) and then "day => now" which simply means to make time pass. in this case, this sinewave would play at 220 hz (the default) for exactly one day and then the program would shut down. There are many different durations that one can use: week, day, hour, minute, second, millisecond, and sample.

To make the sound change you edit some parameter by chucking the new value to it. we called the sinosc "s" so its frequency parameter would be "s.freq" if we wanted for this sinewave to play at 440, we would add a line of code that says " 440 => s.freq;"

[CODE]
SinOsc s => dac;

440 => s.freq;
2::second => now;
220 => s.freq;
2::second => now;
440 => s.freq;
2::second => now;
220 => s.freq;
2::second => now;
[/CODE]

in this program, the sinewave switches back and forth between 440 and 220, playing each for 2 seconds.

The language includes a midi to freq converter, so most of the time i code using midi numbers. These pieces all have some sort of random melody or harmony in them which is done by creating an array of midi notes, and then having the program pick randomly from that array, converting that from midi to freq, and then chucking the resulting note to the Oscilator's .freq parameter. I code this into a loop so that the note changes constantly through the whole piece.

The beats that are used are external .WAV samples. there is a parameter to ( .rate ) that changes the rate of playback, so i use a mathmatical operation to match the beat to the tempo of the song (or in one example, i matched the tempo of the song to the beat...) There is also a parameter ( .pos ) which is used to tell from where in the file to begin playback (in samples). When the file is read into memory, you can get the number of samples in the file. I divided this number by 8 or 16 or something (for a 4/4 bar) and use the resulting number to 'slice' the beat, by playing back the 8 or 16 slices in a different order (usually random.. :) )

...

does that answere most of the questions you might have?? please feel free to ask questions about the process or the language.

cody

for wich operative system? where i can download it? lets try...

  • Author
for wich operative system? where i can download it? lets try...

it works on mac, linux and PC. I use it all on linux..... go to the site that i linked in my above post and click "download chuck"

There is a tutorial on that site, and several examples. I learned everything by following the tutorial ( which only helps get you used to the syntax ) and then going through the examples (which is where i learned MOST of what i've done)

good luck

Hmm, this ChucK timing seems intriguing, as long as it's flexible enough.

Timing is indeed a huge problem for PD/Max, making it much more suitable for controlling sounds live than creating a whole synthsised "tape" piece.

Csound handles timing all right, but I'm not fond personally of how it separates "score" timing from other (often time-based) things that may be going on in the "orchestra".

Is the timing in ChucK flexible in the way that the times can be determined while the program is already running (let's say algorithmically, by chance, or maybe even by user input)?

Are there ways of packing certain procedures that are often needed into functions/abstractions/sub-instruments or anything similar?

If it has such things it may be worth looking into.

  • Author
Hmm, this ChucK timing seems intriguing, as long as it's flexible enough.

Timing is indeed a huge problem for PD/Max, making it much more suitable for controlling sounds live than creating a whole synthsised "tape" piece.

Csound handles timing all right, but I'm not fond personally of how it separates "score" timing from other (often time-based) things that may be going on in the "orchestra".

Is the timing in ChucK flexible in the way that the times can be determined while the program is already running (let's say algorithmically, by chance, or maybe even by user input)?

Are there ways of packing certain procedures that are often needed into functions/abstractions/sub-instruments or anything similar?

If it has such things it may be worth looking into.

timing is very flexible. durations other than the given second/ms/etc. can be used. by using coding a line such as this

{ 3.45676::second => dur NEWDURATION; }

you can then use that new duration in any way you like:

2::NEWDURATION => now;

.345::NEWDURATION => now;

of course you can call it anything you like.. so you could create something like this:


3::second => dur bar;
.25::bar => dur quarter;
.5::quarter => dur eighth;
(1/6)::bar => dur triplet;
[/CODE]

and then you can use any of these durations in any way. They can be controlled and created while the program is running.

If you want to use keyboard/midi/joystick input, you can create and event, and pass time that way, instead of using durations like this:

KEYBOARDEVENT => now;

the program plays until the event and then moves on.

It is easy to code 'functions' for reuse later, in fact, these functions are how you get more than one thing going on at the same time:

[CODE]
//create two functions:
fun void beats()
{
some code that makes beats.....
}

fun void melody()
{
some code that make a melody
}

//and then you "spork" each function so that they play along independently

spork ~ beats();
spork ~ melody();
//also.. don't forget to make time pass (or nothing will actually play!)
365::day => now;
//or you could make a time loop, so it plays FOREVER
while(true)
{
10::second => now;
}
[/CODE]

of course, both of those functions can be set up to take user input, and you can use functions in the more traditional way (to do a recurring mathematical operation for instance)

  • Author

oh.. if you wanted...

it would certainly be possible to create a patch in MAX/MSP or PD or anything else.. that is controlled by midi, and then use the timing and algorithmic features of ChucK to control the patch.

Very nice, thanks!

pity myself .....I hate codes, that's why I refused start working on web development .... if what Nicola said about the composing and programming activities are from different sides of the brain, you must have working both sides :D ........

you don't need a head-cooler ? :D

  • Author
pity myself .....I hate codes, that's why I refused start working on web development .... if what Nicola said about the composing and programming activities are from different sides of the brain, you must have working both sides :D ........

you don't need a head-cooler ? :D

i don't agree with nicola on that.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.