(max) groove~ and buffer~: playing audio from RAM

We’re transitioning from synthesis to audio playback from buffers, which allows us to manipulate and process audio in live performance. The basic object for all of these functions is buffer~.

Example patcher: GrooveSimple.maxpat

buffer~

buffer~ holds an audio file in RAM. The basic parameters are the buffer name, length in ms, and number of channels. The buffer name is essential so that other objects can access the contents of the buffer for playback, processing, or other info. You have to define a length, but you don’t need to over-stress about the size. I usually specify large buffers because RAM is generally abundant.

You generally input audio into a buffer~ in one of three ways: read, replace, or record. Read and replace bring up the standard Mac file dialog window and let you choose a file (unless you specify a filename along with the message). Read keeps the buffer length and number of channels as specified in the arguments. Replace resizes the buffer to fit the new file, and also changes the number of channels to match. I tend to favor using replace.

groove~

groove~ allows for ratio-based playback of audio from a buffer~, with looping and continuously variable speed control. Some things to keep in mind:

  • playback ratio has to be sent as a signal to groove~. The usual method is a float sent to sig~. Unity playback is 1. You can also reverse audio with negative ratios.
  • if no loop points are sent to groove~, the entire buffer will be looped.
  • a float sent to the left inlet sets the time of the playback head. You have to set the playback head before initial playback, as well as after reaching the end of the buffer if looping is not enabled.

Comments

Leave a Reply