13.07.2015 Views

Tutorials and Topics - Peabody Computer Music

Tutorials and Topics - Peabody Computer Music

Tutorials and Topics - Peabody Computer Music

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Tutorial 13Sampling:Recording <strong>and</strong> playbackThe index~ object receives a signal as its input, which represents a sample number. It looksup that sample in its associated buffer~, <strong>and</strong> sends the value of that sample out its outlet asa signal. The count~ object just sends out a signal value that increases by one with eachsample. So, if you send the output of count~—a steady stream of increasing numbers—tothe input of index~—which will treat them as sample numbers—index~ will read straightthrough the buffer~, playing it back at the current sampling rate.Play the sound in a buffer~ by looking up each sample <strong>and</strong> sending it to the dac~• Click on the button marked “Play” to play the sound in the buffer~. You can changethe starting sample number by sending a different starting number into count~.This combination of count~ <strong>and</strong> index~ lets you specify a precise sample number in thebuffer~ where you want to start playback. However, if you want to specify starting <strong>and</strong>ending points in the buffer~ in terms of milliseconds, <strong>and</strong>/or you want to play the soundback at a different speed—or even backward—then the play~ object is more appropriate.Variable speed playback: play~The play~ object receives a signal in its inlet which indicates a position, in milliseconds, inits associated buffer~; play~ sends out the signal value it finds at that point in the buffer~.Unlike index~, though, when play~ receives a position that falls between two samples inthe buffer~ it interpolates between those two values. For this reason, you can read througha buffer~ at any speed by sending an increasing or decreasing signal to play~, <strong>and</strong> it willinterpolate between samples as necessary. (Theoretically, you could use index~ in a similarmanner, but it does not interpolate between samples so the sound fidelity would beconsiderably worse.)127

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!