Show / Hide Table of Contents

Class Sequence

Sequence containing tracks and recorded samples

Inheritance
System.Object
Sequence
Implements
System.ComponentModel.INotifyPropertyChanged
System.IDisposable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Phoenix.Input
Assembly: Phoenix.Plugin.Input.dll
Syntax
public class Sequence : INotifyPropertyChanged, IDisposable

Constructors

View Source

Sequence()

Initializes a new instance of the Sequence class

Declaration
public Sequence()
View Source

Sequence(String)

Initializes a new instance of the Sequence class

Declaration
public Sequence(string pathToLoadFrom)
Parameters
Type Name Description
System.String pathToLoadFrom

Path to load from, otherwise a blank sequence is created

Fields

View Source

CommaEscape

Character sequence for escaping commas

Declaration
public const string CommaEscape = ","
Field Value
Type Description
System.String
View Source

TicksPerSecond

Minimum unit of time for storing samples

Declaration
public const double TicksPerSecond = 30
Field Value
Type Description
System.Double

Properties

View Source

IsPaused

Gets a value indicating whether the sequence playback is suspended

Declaration
public bool IsPaused { get; }
Property Value
Type Description
System.Boolean
View Source

IsPlaying

Gets a value indicating whether the sequence is in the middle of playback

Declaration
public bool IsPlaying { get; }
Property Value
Type Description
System.Boolean
View Source

IsRecording

Gets a value indicating whether the sequence is recording

Declaration
public bool IsRecording { get; }
Property Value
Type Description
System.Boolean
View Source

Length

Gets the sequence length in seconds

Declaration
public double Length { get; }
Property Value
Type Description
System.Double
View Source

LengthTicks

Gets the sequence length in ticks

Declaration
public int LengthTicks { get; }
Property Value
Type Description
System.Int32
View Source

LockUpdate

Gets or sets a value indicating whether update notifications should be put on hold

Declaration
public bool LockUpdate { get; set; }
Property Value
Type Description
System.Boolean
View Source

Loop

Gets or sets a value indicating whether the sequence should loop when last sample is processed

Declaration
public bool Loop { get; set; }
Property Value
Type Description
System.Boolean
View Source

Path

Gets or sets the path the sequence was last loaded from

Declaration
public string Path { get; set; }
Property Value
Type Description
System.String
View Source

PlaybackEnd

Gets or sets the end of playback in seconds

Declaration
public double PlaybackEnd { get; set; }
Property Value
Type Description
System.Double
View Source

PlaybackEndTick

Gets or sets the end of playback in ticks

Declaration
public int PlaybackEndTick { get; set; }
Property Value
Type Description
System.Int32
View Source

PlaybackLength

Gets the length of playback between in/out points in seconds

Declaration
public double PlaybackLength { get; }
Property Value
Type Description
System.Double
View Source

PlaybackLengthTicks

Gets the length of playback between in/out points in ticks

Declaration
public int PlaybackLengthTicks { get; }
Property Value
Type Description
System.Int32
View Source

PlaybackStart

Gets or sets the start of playback in seconds

Declaration
public double PlaybackStart { get; set; }
Property Value
Type Description
System.Double
View Source

PlaybackStartTick

Gets or sets the start of playback in ticks

Declaration
public int PlaybackStartTick { get; set; }
Property Value
Type Description
System.Int32
View Source

Position

Gets or sets the current sequence position

Declaration
public double Position { get; set; }
Property Value
Type Description
System.Double
View Source

PositionTicks

Gets or sets the current position in ticks

Declaration
public int PositionTicks { get; set; }
Property Value
Type Description
System.Int32
View Source

Tracks

Gets the tracks with information on samples expected

Declaration
public Collection<Track> Tracks { get; }
Property Value
Type Description
System.Collections.ObjectModel.Collection<Track>

Methods

View Source

ClearSamples()

Clears sequence of all samples

Declaration
public void ClearSamples()
View Source

Deserialize(String)

Loads samples from file. Serialization functions are the only ones that assume data contained in Sequence is controller input.

Declaration
public void Deserialize(string filePath)
Parameters
Type Name Description
System.String filePath

Path to load from

View Source

Deserialize(String[])

Deserialize from an array of text lines

Declaration
public void Deserialize(string[] lines)
Parameters
Type Name Description
System.String[] lines

Text to read

View Source

Dispose()

Disposes Sequence to finalize running threads properly

Declaration
public void Dispose()
View Source

Dispose(Boolean)

Perform finalization

Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type Name Description
System.Boolean disposing

Whether to dispose managed resources

View Source

Duplicate()

Duplicates tracks and samples but not the state data (does include view and position)

Declaration
public Sequence Duplicate()
Returns
Type Description
Sequence

A duplicate of the sequence not including state

View Source

Finalize()

Finalizes an instance of the Sequence class.

Declaration
protected void Finalize()
View Source

GetRange(Double, Double)

Returns an array of samples between specific points in local sequence time

Declaration
public Sample[] GetRange(double startTime, double endTime)
Parameters
Type Name Description
System.Double startTime

Start time to get samples for

System.Double endTime

End time to get samples for

Returns
Type Description
Sample[]

Samples in range

View Source

GetRange(Int32, Int32)

Returns an array of samples between two ticks in local sequence time

Declaration
public Sample[] GetRange(int startTick, int endTick)
Parameters
Type Name Description
System.Int32 startTick

Time tick to get samples for

System.Int32 endTick

End tick to get samples for

Returns
Type Description
Sample[]

A range of samples as an array

View Source

GetSamples()

Returns a copy of all samples in an array sorted by time from start to end of sequence

Declaration
public Sample[] GetSamples()
Returns
Type Description
Sample[]

All samples

View Source

Pause()

Suspends sequence playback

Declaration
public void Pause()
View Source

Play()

Commences or resumes sequence playback

Declaration
public void Play()
View Source

Record()

Commences sequence recording

Declaration
public void Record()
View Source

SecondsToTicks(Double)

Converts seconds to ticks

Declaration
public static int SecondsToTicks(double seconds)
Parameters
Type Name Description
System.Double seconds

Seconds to convert

Returns
Type Description
System.Int32

Time in ticks

View Source

SecondsToTicksCeil(Double)

Converts seconds to ticks using ceiling rounding

Declaration
public static int SecondsToTicksCeil(double seconds)
Parameters
Type Name Description
System.Double seconds

Seconds to convert

Returns
Type Description
System.Int32

Time in ticks

View Source

Serialize()

Write samples to a string.

Declaration
public string Serialize()
Returns
Type Description
System.String

Samples as a string

View Source

Serialize(String)

Writes samples to file. Serialization functions are the only ones that assume data contained in Sequence is controller input.

Declaration
public void Serialize(string filePath)
Parameters
Type Name Description
System.String filePath

Path to write to

View Source

Stop()

Stops playback and ends the playing thread, resetting current position to 0

Declaration
public void Stop()
View Source

TicksToSeconds(Int32)

Converts ticks to seconds

Declaration
public static double TicksToSeconds(int ticks)
Parameters
Type Name Description
System.Int32 ticks

Ticks to convert

Returns
Type Description
System.Double

Time in seconds

Events

View Source

PropertyChanged

Property changed event required for INotifyPropertyChanged support

Declaration
public event PropertyChangedEventHandler PropertyChanged
Event Type
Type Description
System.ComponentModel.PropertyChangedEventHandler
View Source

SampleAvailable

Sample available event

Declaration
public event EventHandler SampleAvailable
Event Type
Type Description
System.EventHandler
View Source

StateChanged

State changed event

Declaration
public event EventHandler StateChanged
Event Type
Type Description
System.EventHandler

Implements

System.ComponentModel.INotifyPropertyChanged
System.IDisposable
  • View Source
In This Article
Back to top Generated by DocFX