Programming for musicians and digital artists : creating music with ChucK / Ajay Kapur, Perry Cook, Spencer Salazar, Ge Wang.

Format Book
Publication InfoShelter Island, NY : Manning, 2015.
Descriptionxxix, 309 pages : illustrations ; 23 cm
Subjects

Other author/creatorKapur, Ajay, author.
Other author/creatorCook, Perry R., author.
Other author/creatorSalazar, Spencer, author.
Other author/creatorWang, Ge, 1977- author.
Other author/creatorReas, Casey writer of foreword.
Contents Introduction. ChucK programming for artists. Why do musicians and artists need to program? -- What is ChucK? How is it different? -- Why program in ChucK? -- ChucK-powered and pre-ChucK computer-mediated art -- Summary -- Part 1. Introduction to programming in ChucK. Basics: sound, waves, and ChucK programming. Sound waves and waveforms -- Your first ChucK programs. Your first program: "Hello world" ; Your first sound program: "Hello Sine!" ; Now let's make music ; Trying new waveforms -- Data type and variables -- Time in ChucK: it's about now. Variables of type dur ; The importance of time ; Variables of type time ; Working with now -- Logic and control structures for your compositions. Programming power through logic statements: the if statement ; Logical operators and conditions ; The for loop control structure ; The while loop control structure -- Using multiple oscillators in your music -- A final example: "Twinkle" with oscillators, variables, logic, and control structures -- Summary -- Libraries: ChucK's built-in tools. The standard library: tools for pitch, loudness, and more. Deriving musical frequencies from MIDI note numbers ; Converting between data types: float to int ; Obtaining an int from a number expressed as text -- The ChucK math library. Math library random functions ; Rounding numbers: being more fair about float-to-int conversion -- Stereo and panning -- Example: random music with two voices and panning -- Summary -- Arrays: arranging and accessing your compositional data. Declaring and storing data in arrays -- Reading and modifying array data -- Using array data to play a melody -- Storing other types of data in arrays. Using an array to store durations ; Arrays of strings: text can be musical too -- Example: a song with melody, harmony, and lyrics! -- Summary -- Sound files and sound manipulation. Sampling: turning sound into numbers -- SndBuf: loading and playing sound files in ChucK. Organizing your sound files ; Looping (automatically repeating) your samples ; Playing your samples backward ; Managing multiple samples at a time -- Stereo sound files and playback -- Example: making a drum machine. Adding logic for different drums on different beats ; Controlling when drums play using logic arrays -- A new math/music tool: the modulo operator -- Tying it all together: your coolest drum machine yet -- Summary -- For further reading -- Functions: making your own tools. Creating and using functions in your programs. Declaring functions ; Your first musical function ; Local vs. global variables -- Some functions to compute gain and frequency. Making real music with functions ; Using a function to gradually change sonic parameters ; Granularize: an audio blender function for SndBuf -- Functions to make compositional forms. Playing a scale with functions and global variables ; Changing scale pitches by using a function on an array ; Building a drum machine with functions and arrays -- Recursion (functions that call themselves). Computing factorial by recursion ; Sonifying the recursive factorial function ; Using recursion to make rhythmic structures -- Example: making chords using functions -- Summary -- Part 2. Now it gets really interesting! Unit generators: ChucK objects for sound synthesis and processing. ChucK's special UGens: adc, dac, and blackhole -- The pulse width oscillator: an electronic music classic -- Envelope (smooth slow function) unit generators. Making a clarinet sound using SqrOsc and Envelope ; Making a violin sound with SawOsc and the ADSR Envelope UG -- Frequency modulation synthesis -- Plucked string synthesis by physical modeling. The simplest plucked string ; Exciting the plucked string with noise ; Modeling frequency-dependent decay with a filter ; Modeling fractional (tuning) delay and adding an ADSR for plucking -- Intro to filter UGens: frequency-dependent gain -- More on delays: room acoustics and reverberation -- Delay-based audio effects -- Example: fun with filter and delay UGens -- Summary -- Synthesis ToolKit instruments. STK wind instruments. The STK brass instrument physical model UGen ; The STK flute physical model UGen -- Better stringed instruments. The STK Sitar physical model UGen ; The STK Mandolin physical model UGen ; The STK bowed string instrument UGen -- Bars and other rigid things -- Particle models -- Synth soundz -- Voices -- Example: Indian music -- Summary -- For further reading -- Multithreading and concurrency: running many programs at once. Programming with concurrency -- Shreds and sporking -- A parallel, multithreaded, concurrent drum machine -- Using concurrency to control aspects of common objects -- Machine commands: adding ChucK files as new shreds. ChucK machine commands for adding and running files ; Using machine functions for composition -- Example: building a multithreaded jazz band. A file organization structure for your jazz band ; Programming the individual players ; An architecture for running your concurrent code -- Summary -- Objects and classes: making your own ChucK power tools. Object-oriented programming: objects and classes. Objects in general ; Classes -- Writing your own classes -- Overloading: different functions can share the same name -- Public vs. private classes. Useful applications for public classes ; The clear VM button ; Static variables -- Initialize.ck: an architecture for organizing your code -- Conducting a drum pattern using a time-varying BPM -- Making new classes from existing classes. Inheritance: modeling and modifying parents ; Polymorphism: managing many children -- Example: building a smart mandolin player -- Summary -- Events: signaling between shreds and syncing to the outside world. What are events? -- Programming with events: keyboard input -- Inter-shred communication using events. Using event.signal() to synchronize one shred to another ; Using signal to synchronize multiple shreds ; Triggering multiple shreds at the same time using events -- Customized events example: a multi-instrument gamelan -- Summary -- Integrating with other systems via MIDI, OSC, serial, and more. Using MIDI: history, basics, and advanced applications. MIDI messages ; External MIDI controllers for ChucK ; ChucK to ChucK using a virtual MIDI port ; Controlling robots via MIDI -- Open sound control: networking music -- Serial input/output to the outside world -- Summary: looking outward and forward -- Appendix A. Installing ChucK and miniAudicle -- Appendix B. Library functions: Std, Math, other -- Appendix C. Unit generators -- Appendix D. Network communication with Open Sound Control -- Appendix E. File I/O -- Appendix F. Serial I/O -- Appendix G. ChucK on the command line -- Appendix H. Extending ChucK.
Abstract While many excellent tools exist for digital image creation and editing, similar tools for manipulating sound with precise timing and control are few and far between. ChucK, an audio-centric programming language, opens new vistas for sound artistry. The ChucK language provides precise high-level control over time, audio computation, and user interface elements like track pads and joysticks. Because ChucK uses the vocabulary of sound, it's easy to learn even for artists with little or no exposure to computer programming. This book offers a complete introduction to programming in the open source music language ChucK. It's an example driven easy-to-follow book, that allows readers to create meaningful and rewarding digital compositions and instruments that make sound and music in direct response to program logic, scores, gestures, and other systems connected via MIDI or the network.
General noteIncludes index.
ISBN9781617291708 (paperback)
ISBN1617291706 (paperback)

Availability

Library Location Call Number Status Item Actions
Music Music Stacks ML74.4.C58 P7 2015 ✔ Available Place Hold