Segment.Play
The Play method plays the segment. This method can be called using two forms:
As a sub procedure with no return values:
object.Play [iFlags], [oAudiopath], [oTransitionSegment], [oFromPlayingSegment]
As a function that returns a value:
Set oPlayingSegment = object.Play([iFlags], [oAudiopath], [oTransitionSegment], [oFromPlayingSegment])
Parts
object
Required. Object expression that resolves to a Segment Object.
iFlags
Optional. Flags that specify how the segment is played. Multiple flags are set by adding them together. Flags fall into four groups, as shown in the following tables.
Basic Control Flag | Description |
IsControl | Play as a controlling segment. See Controlling Segments. |
IsSecondary | Play as a secondary segment. See Primary and Secondary Segments. |
Note If IsSecondary is not specified, the segment is played as the primary segment. If a script routine in a primary segment calls Segment.Play without IsSecondary, playback transitions to the new primary segment, and playback of the source segment containing the script is halted.
Alignment Flag | Description |
AlignToBar | Align the start point of the segment to the most recent measure boundary in the current primary segment. |
AlignToBeat | Align the start point of the segment to the most recent beat boundary in the current primary segment. |
AlignToSegment | Align the start point of the segment to the start of the current primary segment. |
Note Specify only one alignment flag. If none is specified, the start of the segment is not aligned with a past event. For more information, see Align Options.
Playback Time Flag | Description |
AtBeat | Play at next beat. |
AtFinish | Not available with IsSecondary or IsControl. Play when the currently playing primary segment, if any, finishes. If no primary segment is playing, play starts immediately. If multiple primary segments are played with AtFinish, they are cued to play one after another in the order in which they were played. |
AtGrid | Play at next grid. |
AtImmediate | Play immediately. |
AtMarker | Play at next marker or switch point. |
AtMeasure | Play at next measure. |
Note Specify only one playback time flag. If none is specified, play starts according to the performance boundary authored in the segment. If no primary segment is currently playing, the new segment starts immediately. For more information, see Boundaries and Segment Alignment.
Transition Flag | Description |
PlayFill | Play a Fill transition between the currently playing segment and the new segment. This flag cannot be combined with any other transition flag except PlayModulate. |
PlayIntro | Play an Intro transition between the currently playing segment and the new segment. This flag cannot be combined with any other transition flag except PlayModulate. |
PlayBreak | Play a Break transition between the currently playing segment and the new segment. This flag cannot be combined with any other transition flag except PlayModulate. |
PlayEnd | Play an End transition between the currently playing segment and the new segment. This flag cannot be combined with any other transition flag except PlayModulate. |
PlayEndAndIntro | Play an End transition from the existing segment and an Intro transition from the new segment between the currently playing segment and the new segment. This flag cannot be combined with any other transition flag except PlayModulate. |
PlayModulate | Create a new modulating chord progression during the transition. This flag can be used with any of the other transition flags. If no other transition flag is set, this flag is ignored. |
Note The flags in the preceding table are available only with primary segments, and negate the effects of the IsSecondary and IsControl flags, causing playback of a primary segment instead. If no transition flag is specified or the segment doesn't contain the specified transition, no transition is played. The entire transition is played even if it is several measures long.
For more information, see Transitions.
Other Flag | Description |
NoCutoff | Start the new segment, but don't prematurely cut off any held notes from the previous segment. Not available if transition flags are set. |
oAudiopath
Optional. Audiopath to use for playback of this segment. If this parameter is omitted, an audiopath embedded in the segment is used. If there is no embedded audiopath, the segment plays on the audiopath of the default performance.
oTransitionSegment
Optional. Segment Object to be played as a transition to the new segment. Not valid if transition flags are set.
oFromPlayingSegment
Optional. PlayingSegment Object to replace. This parameter is used to stop a specific secondary PlayingSegment when this segment begins playing. Cannot be used with transition flags, but can be used when oTransitionSegment is supplied.
Return Values
Returns a PlayingSegment Object that represents this instance of the segment.
See Also