Description
sflist~ stores a list of preloaded cues for sound files that can be accessed by multiple sfplay~ objects. Each sflist~ object has a unique name that sfplay~ objects use to refer to its cues. Defining a cue is the same for sflist~ as for sfplay~. You can preload cues for sflist~ without the audio being on.
Examples
Arguments
object-name [symbol]
Names the sflist~. sfplay~ objects use this name to refer to cues stored inside the object.
buffer-size [int]
Sets the buffer size used to preload audio files. The default and minimum is 16384. Preloaded buffers are 4 times the buffer size per channel of the audio file.
Attributes
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.
adds the object to the background layer, 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]
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]
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]
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
clear
Arguments
cuedump
embed
Arguments
fclose
Arguments
open
Arguments
preload
Arguments
filename [symbol]
start-time [int]
end-time [int]
directional-flag [int]
playback-speed [float]
There are a number of forms for the message. The word is followed by an obligatory cue number between 2 and 32767. If the cue number is followed by a filename - a file that is currently open or one that is in Max's search path - that cue number will henceforth play the specified file. Note that a file need not have been explicitly opened with the message in order to be used in a cue. If no filename is specified, the currently open file is used.
After the optional filename, an optional start time in milliseconds can be specified. If no start time is specified, the beginning of the file is used as the cue start point. After the start time, an end time in milliseconds can be specified. If no end time is specified, or the end time is , the cue will play to the end of the file. If the end time is less than the start time, the cue is defined but will not play. Eventually it may be possible to define cues that play in reverse.
After the start and/or end time arguments, a optional directional buffer flag is used to enable reverse playback of stored cues. Setting this flag to 1 enables reverse cue playback. The default setting is (bidirectional buffering off).
A final optional argument is used to set the playback speed. A float value sets the playback speed for an sfplay~ object relative to the object's global playback speed -- set by the message. The default value is .
Each cue that is defined requires approximately 40K of memory per sfplay~ channel at the default buffer size (40320), with bidirectional buffering turned off. With bidirectional buffering turned on, the amount of memory per cue is doubled.
Output
Cues
Cues are stored within the object for reference by other soundfile objects. A listing of internally stored cues is sent out its outlet with the
message.See Also
Name | Description |
---|---|
buffer~ | Store audio samples |
groove~ | Variable-rate looping sample playback |
play~ | Position-based sample playback |
sfinfo~ | Report audio file information |
sfplay~ | Play audio file from disk |
sfrecord~ | Record to audio file on disk |
MSP Sampling Tutorial 6: Record and Play Audio Files | MSP Sampling Tutorial 6: Record and Play Audio Files |