Class Sample
Defines a sequence sample mapped to one of the tracks
Inheritance
Implements
Inherited Members
Namespace: Phoenix.Input
Assembly: Phoenix.Plugin.Input.dll
Syntax
public class Sample : INotifyPropertyChanged, IComparable<Sample>, IEquatable<Sample>
Constructors
View SourceSample(Double, Object)
Initializes a new instance of the Sample class
Declaration
public Sample(double time, object value)
Parameters
Type | Name | Description |
---|---|---|
System.Double | time | Time offset from start of sequence |
System.Object | value | Sample value - boolean, double or string |
Sample(Int32, Object)
Initializes a new instance of the Sample class
Declaration
public Sample(int tick, object value)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | tick | Tick offset from start of sequence |
System.Object | value | Sample value - boolean, double or string |
Properties
View SourceTick
Gets or sets number of ticks (1/30 of a second interval) from sequence start
Declaration
public int Tick { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Time
Gets or sets the time offset from sequence start in seconds This re-calculates the tick
Declaration
public double Time { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
Track
Gets or sets the track the sample belongs to
Declaration
public Track Track { get; set; }
Property Value
Type | Description |
---|---|
Track |
Value
Gets or sets the sample value - boolean, double or string
Declaration
public object Value { get; set; }
Property Value
Type | Description |
---|---|
System.Object |
Methods
View SourceCompareTo(Sample)
Compare functions for sorting items in a set
Declaration
public int CompareTo(Sample other)
Parameters
Type | Name | Description |
---|---|---|
Sample | other | Sample to compare to (only time) |
Returns
Type | Description |
---|---|
System.Int32 | 1 if this sample is newer, -1 if older, 0 if both are equal |
Duplicate()
Duplicates the sample to perform deep copy
Declaration
public Sample Duplicate()
Returns
Type | Description |
---|---|
Sample | Duplicated sample |
Equals(Sample)
Declaration
public bool Equals(Sample other)
Parameters
Type | Name | Description |
---|---|---|
Sample | other |
Returns
Type | Description |
---|---|
System.Boolean |
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
GetHashCode()
Gets the hash code
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 | Hash code |
Overrides
Events
View SourcePropertyChanged
Property changed event required for INotifyPropertyChanged support
Declaration
public event PropertyChangedEventHandler PropertyChanged
Event Type
Type | Description |
---|---|
System.ComponentModel.PropertyChangedEventHandler |
Operators
View SourceEquality(Sample, Sample)
Compares one sample to another
Declaration
public static bool operator ==(Sample first, Sample second)
Parameters
Type | Name | Description |
---|---|---|
Sample | first | First sample for comparison |
Sample | second | Second sample for comparison |
Returns
Type | Description |
---|---|
System.Boolean | Whether the two are equal |
GreaterThan(Sample, Sample)
Compares one sample to another
Declaration
public static bool operator>(Sample first, Sample second)
Parameters
Type | Name | Description |
---|---|---|
Sample | first | First sample for comparison |
Sample | second | Second sample for comparison |
Returns
Type | Description |
---|---|
System.Boolean | Whether first sample is greater than second |
GreaterThanOrEqual(Sample, Sample)
Compares one sample to another
Declaration
public static bool operator >=(Sample left, Sample right)
Parameters
Type | Name | Description |
---|---|---|
Sample | left | First sample for comparison |
Sample | right | Second sample for comparison |
Returns
Type | Description |
---|---|
System.Boolean | Whether the left is greater than or equal the right |
Inequality(Sample, Sample)
Compares one sample to another
Declaration
public static bool operator !=(Sample first, Sample second)
Parameters
Type | Name | Description |
---|---|---|
Sample | first | First sample for comparison |
Sample | second | Second sample for comparison |
Returns
Type | Description |
---|---|
System.Boolean | Whether the two are not equal |
LessThan(Sample, Sample)
Compares one sample to another
Declaration
public static bool operator <(Sample first, Sample second)
Parameters
Type | Name | Description |
---|---|---|
Sample | first | First sample for comparison |
Sample | second | Second sample for comparison |
Returns
Type | Description |
---|---|
System.Boolean | Whether first sample is lesser than second |
LessThanOrEqual(Sample, Sample)
Compares one sample to another
Declaration
public static bool operator <=(Sample left, Sample right)
Parameters
Type | Name | Description |
---|---|---|
Sample | left | First sample for comparison |
Sample | right | Second sample for comparison |
Returns
Type | Description |
---|---|
System.Boolean | Whether the left is less than or equal the right |