Freedom Odds

My Music

Hi, I am Les Hall and this is my music. I discovered the wonderful program called "ChucK" from Princeton University here. ChucK is a very easy to use programming language that creates music. With ChucK you can generate music, apply effects to music, record audio, save to *.wav files, and so much more! On this page you will find the better few of my experiments in learning and using ChucK. To the left are links to the songs and source code, while to the right are descriptions and links. I hope you enjoy this music and maybe even find the ChucKist within yourself! If you like you can email me inventor-66@comcast.net Also, please note that all of the files are copyrighted and released under the GNU General Public License, which means that you are free to use them, modify them, and redistribute them however you cannot steal them and claim that they are your own work. Read all about it in the gpl.txt file.

Around the World

Videos

tornado5a.mov

tornado5.MPG

tornado4.MPG

tornado2.MPG

tornado1.MPG

Crosses.mov

CrownOfThorns.mov

CrownOfThorns.MPG

ThunderStorm1.mov

FFTbars6.mov

FFTbars5.mov

FFTbars2.mov

FFTbars1.mov

Cube1.mov

Torus1.mov

CubeOfSpheres2.mov

CubeOfSpheres1.mov

The_Harvest.mov

blobman7.mov

blobman6.mov

blobman4.mov

blobman3.mov

SphereTrio2.mov

chuck2POVRay3.MPG

Songs

Guitar_Lab_Rock1.mp3

guitar_riff_lab2.mp3

guitar_riff_lab1.mp3

Boolean_8bit.mp3

Boolean_Quartet.mp3

Boolean_Trio.mp3

base_n5.mp3

base_n1.mp3

binary2.mp3

impulse2plus6.mp3

impulse2.mp3

here_without_you_unenhanced.mp3

here_without_you_enhanced_005.mp3

Chuck Files

Eliminator5.ck

Guitar_Zero22.ck

Guitar_Zero20.ck

Guitar_Zero14.ck

Guitar_Zero11.ck

Guitar_Tracker9.ck

ChucK_Lab2.ck

Synth_Lab28.ck

Guitar_Lab26.ck

speech2text7.ck

Boolean2blobman8.ck

guitar_riff_lab2.ck

guitar_riff_lab.ck

Boolean2blobman7.ck

Boolean2blobman6.ck

Boolean2blobman4.ck

Boolean2blobman3.ck

chuck2POVRay3.ck

Boolean_8bit.ck

Boolean_Quartet.ck

Boolean_Trio.ck

base_n5.ck

base_n1.ck

binary2.ck

impulse6.ck

impulse2.ck

female2duo2.ck

rec_in.ck

rec-auto.ck

galaga_bees.ck

Pam_Synth.ck

Crown of Thorns

There have been several Google searches for the Crown of Thorns video, so I thought I would publish the source code so that you can modify the video and make your own version of it. It runs on POV-Ray which is freeware and cross-platform, just visit here to get it. I have not looked at the code in a long time, but I do recall putting all of the adjustable parameters near the top of the source code file. You can change the number of loops, the thorn size, the stick size, the radius, and the crwon height. Also you might want to change the background color and mess with the colored lights to get more shimmer. The rendering takes a long time but it is worth it.

The source code is here.

EChucK

I have created a new hardware synthesizer that is inexpensive and fun, plus open-sourced. You can read about it here.

ChucK Lab Video

I made a video demonstrating ChucK Lab. It is here.

Guitar Motion Sensor

Although I'm still waiting to buy the hardware, my planning is complete for the Guitar Motion Sensor project. For anyone who is interested or might even want to get started on his/her own version of the project, I have collected my findings together and written them up on a web page. To read all about it click here.

Eliminator

This is a fun little ChucK MAUI game that I put together recently. It listens to the microphone and does an FFT to get the spectrum, displaying part of it in green on a grid of LEDs. Then red enemy LEDs begin to descend upon the green "eliminator" LEDs. The eliminators repel the enemies back, but if the sound spectrum is not full some of them reach the bottom of the screen where they destroy that column of LEDs, turning it all blue. As the game proceeds, the enemies get faster until they eventually win and you get a "Game Over" popup window. It's kind of fun - you can play music, sing, or play instruments to create the eliminator sound spectrum. Runs on the Mac miniAudicle.

Eliminator5.ck

Guitar Zero

Sound familiar? Yep, "Guitar Zero" is my ChucK response to the popular "Guitar Hero" program, and it works with real guitars. It's a ChucK MAUI application which means Mac only for now, but soon it will run on Linux and PC. You strap on your guitar, crank up your amp, then run Guitar_Zero on the miniAudicle. The application will show you a start-up screen, just accept the defaults by clicking on "play now", then you get a scoreboard and a fretboard. The application will then quiz you by indicating random notes on the fretboard, and it listens for a correct response from you. If you correctly play the note in time you get a beep and a new note, plus your score goes up. If you don't you get a buzz and a new note and no score increase. The time allotted decreases from ten seconds to zero seconds exponentially, so the game does become unplayable at some point and that's your final score when you can't hit any notes anymore. I have also added features like chords and a song. As always the software is completely free and protected by the GNU General Public License, so enjoy it - it's free!

Guitar_Zero22.ck

Tube Amp Model

I created a very crude but effective tube amp model, and described how I did it Here

Guitar Tracker

Wouldn't it be cool if you could vary multiple effect parameters in real time with Human Interface Devices like the mouse and keyboard? Then cooler still, what if you could detect the notes and use them as commands for special effects? That's what Guitar Tracker is all about. You give it a wav file of guitar playing and it picks out the notes. You can apply special effects like feedback and wah dynamically with two degrees of freedom with the mouse. This makes really interesting dynamic crackle and pling sounds in dynamic response to mouse motion, plus the effect itself changes also. Then want to insert a drum loop into your performance? Press "d" for drum mode and your guitar is now playing drums instead of guitar! Mouse click to start recording and another to end, then your drum loop starts playing in an endless loop. Same for bass guitar, press "p" to kick in the pitch shifter which converts your six-string into a bass guitar and does loops too.

What's better yet is that the software will evolve in the next few months, assuming I stick with the project which I plan to do, to include motion detection. With an accelerometer and a USB interface, something like up to five degrees of freedom can be detected at once, plus coded gestures as well. Then you can vary feedback, delay, double wah, and reverb all at once, waving the guitar and moving around on stage to shape the sound. For gestures, perhaps knocking on the guitar body is like a mouse click or perhaps suddenly recoiling the guitar like it fired a cannon out it's neck is a key stroke. The possibilities are endless, and it all starts here with version 9 of Guitar Tracker. So grab the file, the accompanying wav file, and ChucK it up on your system, it's fun to play around with Guitar Tracker!

Guitar_Tracker9.ck

Guitar_Tracker.wav

ChucK Lab

Guitar Lab and Synth Lab are now united as one! They were so useful linked together that I combined them as one application, called "ChucK Lab". Now you don't have to mess around with ChucKing up separate source code files, just run ChucK Lab to get both cool programs at once. Plus the output of Guitar Lab goes into Synth Lab so you can do effects processing on your guitar songs. Also there are a few bug fixes and some new features, as well as processor usage optimizations (runs faster/better), so get the latest now! (Note: The LiSa feature of Synth Lab does not work properly yet). Oh, and by the way, as of today (4/22/2008), the Linux and Windows ports of ChucK's MAUI graphical user interface are ever so close to being released! Very soon you will be able to run ChucK Lab on all three ChucK platforms (Mac, Linux, and Windows). Here is the ChucK Lab source code.

Synth Lab

Note: this source code is obsolete, see "ChucK Lab" above. Go here to read a web page about my fun new program, Synth Lab. It's a modular synthesizer written in software form which gives you a pretty good modular synthesizer for free so you can create all sorts of wacky sounds or even complete songs if you like. At the moment Synth Lab only runs on the Mac and the folks at Princeton are currently porting ChucK's graphical user interface to the PC and Linux so soon everyone can use it. So give Synth Lab a try, if you're into music you'll enjoy it!

Guitar Lab

Note: this source code is obsolete, see "ChucK Lab" above. My latest creation is so much fun to play with that I had to get it on the web page right away. It uses the MAUI user interface tools that are currently available in the Mac miniAudicle to create a user inteface for guitar lab. It has the Boolean Sequencing built into it, so you can create guitar riffs by pressing buttons in the logic expression field. Give it a try, it's cool! I have made a whole page dedicated to this one, which you can find here.

Blob Tornado

Blobs are back, but this time as a bunch of psychedelic spheres that smoosh into each other as they travel around in a ring. Its a hypnotizing animation, everyone seems to like it. The movie (without audio) is here: tornado1.MPG. Also see: tornado2.MPG. Also see: tornado4.MPG. Also see: tornado5.MPG. Also see: tornado5a.mov.

Sine Wave Oscillator

This December I had an idea about a sine wave oscillator. I became immediately consumed with desire to build and test this thing to see if it really worked. So over the next few days I did just that, writing lots of equations and building prototypes with occasional sleep breaks. Isn't it fun when you're excited about something? Well, the end product is a *.pdf document that describes the oscillator and how it works plus some of its features. The document is here.

Hear an Artificial Intelligence Think

This one is wacky. I wrote an artificial intelligence program, just a feedforward neural net with backprop, in ChucK to do speech recognition. Well, it never did more than five unique sounds, so I got bored with it and modified it to output the sound of its own thinking to the headphones. Note that you need headphones on this one to prevent audio feedback as you enter the training data. First it prompts you to say "A, E, I, O and U", then it trains on the data, emitting a machine-like drone that would be suitable as a background track in an electromusic composition (you're welcome to use it if you like). Once it's done training it plays the sound of its thoughts as it attempts to perform audio pattern recognition on your spoken input. So, in a way you are hearing the sound of machine intelligence that is thinking about what you just said. Kind of a mind trip, and a little bit fun to play around with. Proof that you can do almost any weird thing with ChucK Here is the source code.

Crosses

I'm not sure how well the lighting turned out in this one, you tell me. It features three crosses, the left red one for bass, the middle green one for midrange, and the right blue one for treble. The crosses change in size and position according to the music. Here is the movie.

Crown of Thorns

This video features a rotating glass crown of thorns that I algorithmically generated, plus a new flute / mandolin song. I made the crown by creating a while loop on the angle theta and using trigonometry to draw cylinders connected by little spheres, then added randomly positioned thorns. There are control parameters for things like thorn size, stick thickness, and the like. The video is one minute long. Here is the movie.

Thunder Storm 1

This is a movie of a thunder storm. I made it with kijjaz's thunder which I modified somewhat, plus an ominous guitar riff and some clouds with lightning. Turn up the volume on this one! Here is the movie.

FFT Bars 6

I made a nice bass guitar song using my Boolean sequencing, so I thought I would make a movie of it. It has notes derived from the exclusive OR of each adjacent two bit ANDed sequence, like this: j0&j1 ^ j1&j2 ^ j2&j3... which creates a slow riff. In the video I used 30 frames per second so you really see the details in time, plus a full 64 bars for clear detailed view of the harmonics. You can see individual notes as increases in the harmonics if you look and listen closely. I also finally got the colors nicely encoded to hue, or in other words the colors of the rainbow from red to green to blue. Here is the movie.

FFT Bars 5

Lightning strikes! This FFT movie of a guitar strumming has the FFT data encoded as lightning. It starts at the top in a random position each frame, then draws complex vectors from the FFT with phase divided by two. This constrains the phase to +/-90 degrees, so the vector zig-zags its way down, kind of like lightning. Here is the movie.

FFT Bars 2

This is another FFT music video. There are now 16 frequency bars and the song consists of a guitar and some drums, very simple. The movie is 60 seconds long. Here is the movie.

FFT Bars 1

This movie has a nice song with help from kijjaz's drums and the video shows an FFT of the music. Watch the third red bar go up and down while listening to the drum beats, you will see that they are timed together. The movie is 60 seconds long. Here is the movie.

Cube 1

This rotating cube with light turned out nice, one minute long. Here is the movie.

Torus 1

A rotating glass torus with dazzling colored lights reflecting on its surface. In this movie I finally figured out how to make iMovie preserve the video quality and size. It is 60 seconds long, my longest movie yet. Here is the movie.

Cube of Spheres 2

I figured out the timing problem in Cube of Spheres 1 and fixed it, then trimmed down the motion of the spheres. Which one do you like better? Here is the movie.

Cube of Spheres 1

This video has 27 spheres arranged in a cube, each with a light source inside. They move about in random sinusoidal directions and there is a brilliant light sparkle effect. They return to their cubic positions, but for some reason POV-Ray rendered them a bit past that, not sure why. Anyway, it turned out nice despite that minor flaw. Enjoy. Here is the movie.

The Harvest

The final video of the Blobman series, The Harvest shows two blobpeople moving up and down in time with the frequency of the instruments. The scrolling FFT represents their agricultural plot, with the peaks of the FFt representing the plants. I tried to time it with the music as closely as possible, but still there is some delay. Anyway, it's done now, so enjoy! Here are the movie and the source code.

Guitar Riff Lab 2

I added two riffs to guitar riff lab, you can select them by changing the "riff" variable at the top of the file. There is a bass riff, which is nice, but the one I really like is riff 3, the "east meets west" riff. That one starts out with a western sound, then quickly goes to an eastern sound, then builds up west to east sequences of increasing length and complexity. It is really nice when the count rolls around the odometer so to speak and the song builds to a majorly east sequence, then suddenly transitions to west, kind of dramatic sounding. The song is riff 3. Here are the song and the source code.

Blobman 7

In this movie I timed it at 6 notes per second to mesh better with iMovie's 12 frame per second compression. Also I changed the music beats a little to something more pleasant, I think. Here are the movie and the source code.

Guitar Riff Lab

Presenting... guitar riff lab! Thanks to forum posts and a code sample from kijjaz and Kassen on electro-music.com/forum/, I was able to put together this Stratocaster-sounding electric guitar riff laboratory. It contains my base-n algorithmic composition technique to create the guitar riffs, though I'm not sure if I'm the one who thought of it first. You set up a logic expression that determines when guitar plucks are made and an algebraic expression for the frequency, then let it go. Don't forget to experiment with different values of n (low integers like 2, 3, 4...). It really has a good sound, I'm impressed! Here are the song and the source code.

Blobman 6

The latest in the blobman music video series. I removed the spheres, made a scrolling FFT for the blobpeople to stand on, and linked blobman to the drums and blobwoman to the clarinet. It's still a little hard to follow but you get the idea, makes a nice video. Here are the movie and the source code.

Blobman 4

This music video is very similar to Blobman 3 below, but the blobpeople are more fully animated and some things are moved around. Here are the movie and the source code.

Blobman 3

In this video we have three features: blobpeople, spheres, and an FFT. They are all animated according to the frequencies of the instruments in the music. Here are the movie and the source code.

Sphere Trio

This is my first music video. It begins with a new composition, Boolean_16bit2.mp3 (from Boolean_16bit2.ck) in which I learned how to use some of the instruments that ChucK comes with instead of making my own from sinusoids and plucked filters. The song has three instruments: heavy metal, clarinet, and bowed. These are represented by red, green, and blue spheres in the video, and the size of the spheres is encoded to the frequency of the instruments. As you watch and listen, try to isolate the instruments (the red heavy metal is easiest), where higher pitch corresponds to a larger sphere. I finally figured out how to do it! Note: I had to post a *.mov file as the audio did not encode correctly on *.MPG. Here are the movie and the source code.

FFT Fly-Over

This is a 6-second movie of a fly-over of an FFT spectrum. It has no music. I have been experimenting with creating music videos using ChucK and POV-Ray by having Chuck generate the POV-Ray source code from its FFT output. The result is interesting and has possibilities. Here are the movie and the source code.

Boolean 8 bit

This Boolean sequence has an 8-bit counter with two "twangy" plucked instruments and a sort of haunting harp-like instrument. Here are the song and the source code.

Boolean Quartet

This song is like Boolean Trio below, but with a fourth guitar-like instrument added. Here are the song and the source code.

Boolean Trio

This is my first fully composed song. It has a background "organ", a "bass instrument", and a "keyboard", all created from boolean sequences. See below in Base n 5, Base n 1, and Binary2 for the background on this one. I imagine a great deal of song composing is possible using this technique. Changes from Base n 5 include alebraically encoded frequency for the keyboard and addition of a simple bass instrument (simulated by an impulse-driven band pass filter), and two notes on the bass instrument. The first short segment is a blur, the second somewhat decipherable, and in the third you can clearly make out the three instruments. If you let the ChucK program run it will just keep on increasing the value of n ad infinitum. Here are the song and the source code.

Base n 5

After playing around with Base n 1 below, I thought of my old logic theory from my career as an engineer. It occurred to me that if I would just add some logic to the base n count, it would produce a value of one some of the time and 0 the rest of the time, and by driving those 1's into the impulse function I might create some kind of irregular beat for a second instrument. Well, I did just that and it turned out pretty well. The beats sound irregular but they have a logical pattern to them, so they sort of "make sense" to the listener if you know what I mean. It is possible to stimulate many musical notes using this method, but I started with something simple, just a single percussive sound for each value of one. The sound file has n=2, n=3, and n=4 sequences. This one has excellent possibilities. Here are the song and the source code.

Base n 1

This ChucK file and song are just like Binary2 below, but the numeric base is now variable. It counts up starting from base 2 (binary) to base 3 then base 4 and so on. The songs get long fast - a base 6 or base 8 song would be long enough for an entire composition. I have also had some fun with reversing the frequencies and amplitudes, shifting the base frequency, and playing combinations of those together. The provided mp3 file has only base 2 and base 3. Here are the song and the source code.

Binary2

This is a pleasant little experiment in making music with binary counts. A five-bit binary counter cycles from 0 to 31, with an oscillator attached to each bit. The MSB has a 200 Hz oscillator, the next bit a 400 Hz, etc., plus the amplitude decays in binary fashion from MSB to LSB. There is a brief 3-second pause and then the pattern begins again. That's it, just a an audio binary sequence done with harmonics. Here are the song and the source code.

Impulse2plus6

This ChucK song plays random notes at random intervals from two instruments. The smooth notes on the background instrument are created by driving an impulse into a high-Q bandpass filter followed by a JCRev reverb enhancement, while the plucking notes are done with a lower-Q bandpass filter and significantly lower reverb. This creates a nice contrast so you can hear the two instruments clearly. Here are the song, the first source code. and the second source code.

Impulse2

This ChucK song plays random notes at random intervals. The notes are created by driving an impulse into a high-Q bandpass filter followed by a JCRev reverb enhancement. Here are the song and the source code.

Female to Duo

I was very pleased to learn that the latest version of ChucK has FFT and IFFT features. These allow us to convert music from the time domain (waveform plot) to the frequency domain (bar graph) and back. So after some experimentation I came up with this female to duo effect. It takes a female singer's voice track and makes a spectral copy of the voice at 0.8 * f, which sounds like an additional male voice in harmony. If you listen to the two songs, you will hear my friend Shell's voice in the unenhanced song and her voice closely copied by a male counterpart in the enhanced song. The only problem is that the male voice sounds a bit "computery" or "bionic". To use this effect, copy the female voice *.wav file to "infile.wav", then run "chuck female2duo2.ck" to do the conversion - the output is to the speakers or headphones. Press control-c to stop ChucK. Here are the unenhanced song, the enhanced song, and the source code.

Recording

It is easy to record in ChucK, but it isn't prominently placed in the documentation so I thought I would describe it here for you. To make your own voice recorder, simply download the two source code files below, then run "chuck rec_in.ck rec-auto.ck", do your recording, and press control-c to stop ChucK. To record a special effect, like the above Female to Duo effect, just chuck-up both the effect and the recorder like this: "chuck female2duo2.ck rec-auto.ck". Here are the microphone input source code, and the file output source code.

Galaga Bees

This one just tickles me, since I'm a fan and collector of old 1980's arcade games. Remember the arcade classic "Galaga", circa 1982? Well the enemy bees in galaga made a certain warbling sound when they dove upon you, and this chuck file does just that. Actually it does it interactively using the microphone. Just talk, play music, turn on the TV or whatever and you will hear the Galaga bees storming upon you once again! If you turn up the volume you may create a feedback loop, which will initiate a swarm of these bees. You can just leave it running in the background on your computer and the bees will reply to your voice or your typing or whatever. Beware the Galaga bees! Here is the source code.

Pam's Synthesizer

My friend Pam was quite pleased with the Impulse2 song, and she wondered what it would be like if you could "play" those notes on the keyboard. Fortunately the folks at Princeton, being the wise ChucKists that they are, have already figured this out and included it in their software (GNU GPL). So I just modified one of their keyboard examples to have the same musical quality as Impulse2 and ta-da! Instant results. Just run it with "chuck Pam_Synth.ck" and play the keyboard keys to make sounds. Note that you can create loud bursts of sound by following a long bass sound with a quick treble sound. So there you have it, a synthesizer for your system, and its all free! Here is the source code.

copyright 2008 Les Hall

My stuff: Sports Prediction, Commentary, Oscillator, Music, HS TechSpy, and Dome Homes.

Web Site Hit Counters
Hit Counters
Contact me inventor-66@comcast.net