SonifyingInChucKICAD2012.pdf
This is the printout from the ChucK Workshop held recently with Perry Cook. ICAD was held in Atlanta on June 18-21, 2012.
Foundations of On-The-Fly Programming in the ChucK Programming Language
This paper written by Rebecca Fiebrink, Ge Wang, Perry Cook 2008.
ABSTRACT excerpt:
"We present three case studies of applying learning in real-time to performance tasks in ChucK, and we propose that fusing learning abilities with ChucK's real-time, on-the-fly aesthetic suggests exciting new ways of using and interacting with learning algorithms in live computer music performance."
More papers at http://smirk.cs.princeton.edu/
Showing posts with label tutorial. Show all posts
Showing posts with label tutorial. Show all posts
Thursday, June 28, 2012
Wednesday, June 27, 2012
A mapping to the keyboard tutorial
// not a full "lab" per se but it does have the possibility to be developed into one. This is based on my experience working with the KIns.
To get ChucK working with the keyboard, there are a few essential things to include in your code:
1.
// keyboard
To get ChucK working with the keyboard, there are a few essential things to include in your code:
1.
// keyboard
HidIn kb;
// hid message
HidMsg msg;
In the above code, "Hid" stands for "Human Interface (possibly also input?) Device." AKA a device that you use to interact with your computer, like the keyboard. The first line defines the variable that will represent the HID, and the second defines the variable that will hold the information we receive from the HID.
2.
// If the keyboard is not available, just exit the program right away
if( !kb.openKeyboard( 0 ) ) me.exit();
//Otherwise, assuming the program didn't exit on the last line, keep going
<<< "Ready?", "" >>>;
These lines are not critical, but helpful to include in a file, especially for debugging purposes. Obviously you can change them around to suit your tastes, such as only printing out a message if the keyboard *doesn't* open instead of if it does.
3.
// wait for event
kb => now;
The above lines go inside the event loop, which is the (usually infinite) loop that makes the program run. They'll probably be the first thing inside the loop, unless your program has a reason for them not to be. Basically they pause the loop until the HID has a message to send.
4.
kb.recv( msg )
When this function returns true, a key is being held down. It's probably best used in a while loop or if statement, such as while( kb.recv( msg ) ){....} That will execute the body of the loop as long as a key is being held down.
5. msg.which
The value of this variable contains an int that corresponds to the key that's being held down. Operators like ==, >, <, != can be used to work with it to assign different actions to different keys.
These are the most important things to understand when working with keyboard input. Using them, you can construct an array of values of the keys on your keyboard that correspond to meaningful values. For example, to make a program that plays notes when the keyboard is pressed, you could make an array in which the index of the array is the frequency of the note, and the data that corresponds to any given index is the key mapping integer.
How can we find out the key mapping integers if we don't know them or have a reference though? An easy, if tedious, way to do it is to simply print out msg.which whenever a keypress event is received. You can then write your own table by going through each key on your keyboard.
Oscillators, Harmonics and Wavelength Resource
Oscillators, Harmonics and Wavelength Explained Simply
The Synth School website is now closed and "under construction" but this video survived on YouTube. It's a very basic and clear explanation with great animations to show how to create saw and square waves from the original sine wave. Video: 10 minutes.
Wednesday, June 13, 2012
REFERENCES for ChucK Code
Clickable ChucK Manual
An online reference with clickable links to the ChucK manual.
LICK Library for ChucK
Many code examples.
LICK Library for ChucK
Many code examples.
SAMPLE COMPOSITION: To Listen Click Here or go to Dropbox/ChuckIt/Code Samples with WAV file folder and listen to file "otf_01-07Combined...wav"
Try this sample composition which uses a combination .ck
files that include .wav and chucK
generated frequencies. The
/examples/data folder holds the sample .wav files used. [Update the path in otf_01, _02, _03, _04 and
07.ck from /data/------.wav
to reflect the correct path on your
computer for this folder, i.e. data/snare.wav to read /Users/localhost/chuck/examples/data/snare.wav]
/examples/
Open all otf_01.ck through otf_07.ck files
Update path to the .wav files
Add Shreds to the VM in any order
In miniAudicle:
ChucK, Start Virtual Machine
[Hotkey Cmd-period]
In command line:
Type chuck otf_01.ck otf_02.ck …. And chain all files to
shreduler
Monday, June 11, 2012
Music theory for musicians
I decided not to make a powerpoint about music theory for musicians because it's such a widely covered topic already. Instead, I found some easy to use online resources that probably explain things better than I could. Most of these resources cover the systems that western music traditionally uses to write and play music (musical staves, types of notes, chords, harmony, etc).
http://www.musictheory.net/lessons
This site has excellent coverage of basic through intermediate/lower advanced topics of music theory. It lets you go through the lessons at your own pace and has exercises to test your knowledge too. However, if you're looking for a very quick summary, it may not be the best.
Here's a much more in-depth document that explains how notes relate to each other and how scales are constructed:
http://www.gospelmusic.org.uk/resources/cowpielessons.pdf
A very simply written summary of the basics:
http://datadragon.com/education/reading/
The Wikipedia page on music theory. Not very good as a learning tool, but not bad as a reference.
http://en.wikipedia.org/wiki/Music_theory
http://www.musictheory.net/lessons
This site has excellent coverage of basic through intermediate/lower advanced topics of music theory. It lets you go through the lessons at your own pace and has exercises to test your knowledge too. However, if you're looking for a very quick summary, it may not be the best.
Here's a much more in-depth document that explains how notes relate to each other and how scales are constructed:
http://www.gospelmusic.org.uk/resources/cowpielessons.pdf
A very simply written summary of the basics:
http://datadragon.com/education/reading/
The Wikipedia page on music theory. Not very good as a learning tool, but not bad as a reference.
http://en.wikipedia.org/wiki/Music_theory
Wednesday, June 6, 2012
LiSa MANUAL
LiSa
stands for Live Sampling.
see LiSa Examples wiki for more,
and
also a slowly growing tutorial
All
sample code is in the chucK download folder under:
\examples\special
A Good Bit Depth and Bit Rate Explanation
LYNDA.COM
Tutorial on Sampling Rate and Bit Depth. These slides helped me visualize the difference between bit depth and bit rate.
bit rate = bit depth x sample rate
![]() |
Click here for article: Explanation of Sample Rate and Bit Depth
Digital Audio
Digital audio recording works by recording, or sampling, an electronic audio signal at regular intervals (of time). An analog-to-digital (A/D) converter measures and stores each sample as a numerical value that represents the audio amplitude at that particular moment. Converting the amplitude of each sample to a binary number is called quantization. The number of bits used for quantization is referred to as bit depth. Sample rate and bit depth are two of the most important factors when determining the quality of a digital audio system.
Tuesday, June 5, 2012
COMPUTER SOUND DESIGN / Sampling and Synthesis
Sampling Rate and Bit Rates
Sampling Rate and Bit Rate - More Graphs
DIGITAL FILTERS from CCRMA
Sampling Rate and Bit Rate - More Graphs
DIGITAL FILTERS from CCRMA
COMPUTER SOUND DESIGN: Synthesis Techniques and Programming
Download Textbook in PDFThis has excellent technical descriptions and visuals throughout the textbook. In depth descriptions of wavetable synthesis methods and granular synthesis.Get a Grip on Synthesis is an introduction to (subtractive) synthesis for people who may have no musical knowledge and may know nothing about synthesizers, but who want an introduction to the subject. This is an intro video and for more depth go to the BootCamp videos:
Synthesizer Boot Camp Videos - Click on link to watch more videos on modulation, filters, and other short basic videos on how synthesis works in greater detail.
Monday, June 4, 2012
GLOSSARY
amplitude modulation (AM) and frequency modulation (FM) - (Wikipedia)
Frequency modulation (FM) conveys information over a carrier wave by varying its instantaneous frequency. This contrasts with amplitude modulation, in which the amplitude of the carrier is varied while its frequency remains constant. In analog applications, the difference between the instantaneous and the base frequency of the carrier is directly proportional to the instantaneous value of the input-signal amplitude.
bit depth - actual number of bits of data to capture audio
bit rate - how much data is transmitted or received per second
music - a mixture of frequencies that have a clear mathematic relationship between them.
orthogonal - In computer terminology, something - such as a programming language or a data object - is orthogonal if it can be used without consideration as to how its use will affect something else.
sampling rate - number of times audio is measured (or sampled) per second
sampling increment - The number of values skipped. Used to create higher pitches.
wavetable - The section of memory that contains a list of values corresponding to a desired waveform.
wavetable synthesis -
Frequency modulation (FM) conveys information over a carrier wave by varying its instantaneous frequency. This contrasts with amplitude modulation, in which the amplitude of the carrier is varied while its frequency remains constant. In analog applications, the difference between the instantaneous and the base frequency of the carrier is directly proportional to the instantaneous value of the input-signal amplitude.
bit depth - actual number of bits of data to capture audio
bit rate - how much data is transmitted or received per second
music - a mixture of frequencies that have a clear mathematic relationship between them.
orthogonal - In computer terminology, something - such as a programming language or a data object - is orthogonal if it can be used without consideration as to how its use will affect something else.
sampling rate - number of times audio is measured (or sampled) per second
sampling increment - The number of values skipped. Used to create higher pitches.
wavetable - The section of memory that contains a list of values corresponding to a desired waveform.
wavetable synthesis -
Friday, June 1, 2012
All About Digital Filters
This seems like a good tutorial on digital filters: https://ccrma.stanford.edu/~jos/filters/
-Julia
UPDATE: Reposted to MUSIC REFERENCES
-Julia
UPDATE: Reposted to MUSIC REFERENCES
MUSIC REFERENCES
Music References includes several tutorials we found both in written and video formats:
A to Z
The A to Z of digital music making: A list of all the important terms you'll (probably) need to know, with great explanations for each of them.
Thursday, May 31, 2012
miniAudicle Manual
The manual is located here. MAUI Elements gives you options to use/build graphical interfaces as these examples show below
http://audicle.cs.princeton.edu/mini/mac/doc/Wednesday, May 30, 2012
Lab Idea 1: Intro to ChucK for Non-Programmers
Here's an idea for a lab for a class to do. It doesn't assume anything beyond a basic knowledge of how computers work and attempts to explain the basics of ChucK to someone who's never programmed before, while hopefully also giving some ideas for more advanced students to explore. Content is below the jump.
Subscribe to:
Posts (Atom)