playlist~
MSP Reference
Open Help

playlist~

Play sound files

Description

Use playlist~ to organize sets of soundfiles and play them back. Each sound is given a visual representation in a clip where a selection from the entire sound file may be choosen. Clips may be dragged within a playlist~ to re-order them, or they maybe dragged to other playlist~ objects by using the handle (dot) on the left side of the clip.

Examples

Arguments

None.

Attributes

accentcolor [4 floats]

Controls Off Color

allowreorder [int] (default: 2)

Allow the re-ordering of clips in the playlist~ by dragging the handle (dot on the left side) for a clip above or below other clips.

Possible values:

0 = 'Off'
1 = 'On'
2 = 'Automatic'

bgcolor [4 floats]

Background Color

channelcount [int] (default: 2)

Number of audio channels to playback. Changing this attribute will clear the playlist~ content.

clipheight [float] (default: 30.)

Height alloted for each clip to be displayed. This value may be altered when dragging new clips into the playlist~ according to the @expansion attribute.

color [4 floats]

Waveform/Controls Color

elementcolor [4 floats]

Clip Divider Color

expansion [symbol] (default: squeeze)

Style of accomodation for adding clips to a playlist~ with no empty space available.

Possible values:

'squeeze' ( Maintain the size of the box and reduce the height of all clips to make room. )
'static' ( Maintain both the size of the box and the height of all clips. A scroll bar will need to be used to access clips out of view. )

loopreport [int] (default: 0)

Loop Report

selectioncolor [4 floats]

Selection Color

showname [int] (default: 1)

Show File Name

style [symbol]

Sets the style to be applied to the object. Styles can be set using the Format palette.

textcolor [4 floats]

Text Color

waveformdisplay [int] (default: 1)

Display style for sound file waveforms that represent each clip.

Possible values:

0 = 'Bi-Polar'
1 = 'Rectified'

Common Box Attributes

annotation [symbol]

Sets the text that will be displayed in the Clue window when the user moves the mouse over the object.

background [int] (default: 0)

Adds or removes the object from the patcher's background layer. background 1 adds the object to the background layer, background 0 removes it. Objects in the background layer are shown behind all objects in the default foreground layer.

color [4 floats]

Sets the color for the object box outline.

fontface [int]

Sets the type style used by the object. The options are:

plain
bold
italic
bold italic

Possible values:

0 = 'regular'
1 = 'bold'
2 = 'italic'
3 = 'bold italic'

fontname [symbol]

Sets the object's font.

fontsize [float]

Sets the object's font size (in points).

Possible values:

'8'
'9'
'10'
'11'
'12'
'13'
'14'
'16'
'18'
'20'
'24'
'30'
'36'
'48'
'64'
'72'

hidden [int] (default: 0)

Toggles whether an object is hidden when the patcher is locked.

hint [symbol]

Sets the text that will be displayed in as a pop-up hint when the user moves the mouse over the object in a locked patcher.

ignoreclick [int] (default: 0)

Toggles whether an object ignores mouse clicks in a locked patcher.

patching_rect [4 floats] (default: 0. 0. 100. 0.)

Sets the position and size of the object in the patcher window.

position [2 floats]

g/s(set)

Sets the object's x and y position in both patching and presentation modes (if the object belongs to its patcher's presentation), leaving its size unchanged.

presentation [int] (default: 0)

Sets whether an object belongs to the patcher's presentation.

presentation_rect [4 floats] (default: 0. 0. 0. 0.)

Sets the x and y position and width and height of the object in the patcher's presentation, leaving its patching position unchanged.

rect [4 floats]

g/s(set)

Sets the x and y position and width and height of the object in both patching and presentation modes (if the object belongs to its patcher's presentation).

size [2 floats]

g/s(set)

Sets the object's width and height in both patching and presentation modes (if the object belongs to its patcher's presentation), leaving its position unchanged.

textcolor [float]

Sets the color for the object's text in RGBA format.

textjustification [int]

Text Justification

Possible values:

0 = 'left'
1 = 'center'
2 = 'right'

varname [symbol]

Sets the patcher's scripting name, which can be used to address the object by name in pattr, scripting messages to thispatcher, and the js object.

Messages

int

Arguments

clip [int]
0 stops soundfile playback. A number greater than zero begins playback of the clip with that index. Indices begin counting at 1.

append

Arguments

soundfile [symbol]
clip-number [int]
Add a new soundfile to the list. First argument specifies the soundfile. Second (optional) argument specifies the slot number for the clip (starting at 1).

clear

Remove all clips from the playlist. To remove just one clip, right-click on the file you wish to remove and choose "Remove" from the contextual menu.

basictuning

Arguments

ARG_NAME_0 [list]
Sets a tuning standard based on a frequency for A for pitch correction operations (440 = default, range is 400 - 500)

(drag)

TEXT_HERE

getcontent

TEXT_HERE

followglobaltempo

Arguments

ARG_NAME_0 [list]
When followgobaltempo is enabled, sfplay~ will calculate the current tempo out of the ratio between originaltempo and global tempo and adapt to global tempo changes.

formant

Arguments

ARG_NAME_0 [list]
The word formant , followed by floating point value, sets the amount of formant scaling when pitchshifting is performed.

formantcorrection

Arguments

ARG_NAME_0 [list]
The word formantcorrection , followed by a zero or one, disables/enables formant correction when pitch correction is performed.

loop

Arguments

clip [int]
loop [int]
Turn looping on/off for a clip. First argument specifies which clip (starting at 1). Second argument is a 1 (loop) or 0 (don't loop).

next

TEXT_HERE

mode

Arguments

ARG_NAME_0 [list]
Sets the timestretching mode to be used. Each mode is optimized for handling different kinds of audio material. All modes are zero latency.

pause

Pause playback of the current clip at the current position.

originallength

Arguments

ARG_NAME_0 [list]
The original length of the the audio file in beats. Used by followglobaltempo to calculate the speed in relation to the global transport speed. Setting the originallength will calculate the originaltempo .

pitchcorrection

Arguments

ARG_NAME_0 [list]
The word pitchcorrection , followed by a zero or one, enable/disables the formant-corrected chromatic intonation correction. For more extensive real-time intonation correction, use the retune~ object.

pitchshift

Arguments

ARG_NAME_0 [list]
Specify pitchshift as a factor of the original pitch (i.e. 2.0 = doubling of pitch, .5 = halving of the original pitch, etc.).

pitchshiftcent

Arguments

ARG_NAME_0 [list]
Specify pitchshift as positive or negative cent values (i.e. 100 = semitone up, -1200 = octave down). Cents may be specified as ints or floats.

play

Arguments

ARG_NAME_0 [list]
TEXT_HERE

originallengthms

Arguments

ARG_NAME_0 [list]
TEXT_HERE

originaltempo

Arguments

ARG_NAME_0 [list]
The original tempo of the the audio file. Used by followglobaltempo to calculate the speed in relation to the global transport speed. Setting the originaltempo will calculate the originallength .

selection

Arguments

clip [int]
start [float]
end [float]
Select playback endpoints for a clip using a normalized range (0.0 is the beginning, 1.0 is the end). First argument specifies which clip (starting at 1). Second argument is the start point for the clip. Third argument is the end point for the clip.

signal

TEXT_HERE

refresh

TEXT_HERE

remove

Arguments

clip-number [int]
Remove a clip from the list.

resume

Resume playback from the current position if playback has been paused.

quality

Arguments

ARG_NAME_0 [list]
Choose the quality for timestretching output.

slurtime

Arguments

ARG_NAME_0 [list]
Set the time it takes for the correction to reach the full correction amount. Typically, notes are a bit unstable at the beginning, because the attack phase of a sound has a higher amount of noise, and because singers gradually adjust their tuning after the onset of the note. The slur time makes the pitch correction sound natural because it models this effect. Higher values will yield a slower adaptation time and it will take longer for the correction to produce the corrected pitch. However, longer slur times will also preserve vibrato better.

speed

Arguments

clip [int]
speed [float]
Set playback speed for a clip. First argument specifies which clip (starting at 1). Second argument is the rate (1.0 = original speed, 0.5 = half-speed, etc).

timestretch

Arguments

ARG_NAME_0 [list]
The word timestretch , followed by a zero or one, disables/enables timestretching.

Output

list

The 'mouse' message is sent together with normalized mouse coordinates and the mouse button state.

Output

dictionary

The rightmost outlet sends a dictionary summary of the playlist~ content in response to the 'getcontent' message.

list

2nd from right outlet sends messages of the form 'start N clipname' or 'done N clipname' where N is the index and 'clipname' is the name of the clip.

signal

There is one signal outlet for each of the playlist~ object's output channels.

These are followed by a signal indicating the position of the playback head. The integer part of the number is the index of the clip that is playing. The fractional part of the number is the instantaneous position within that clip.

See Also

Name Description
jit.playlist Play video files
sfplay~ Play audio file from disk
waveform~ buffer~ viewer and editor