Class Timeline
- Namespace
- SunSharp
- Assembly
- SunSharp.dll
Project timeline, containing all the existing patterns.
public sealed class Timeline : ITimeline
- Inheritance
-
objectTimeline
- Implements
Properties
Slot
Gets the slot this timeline belongs to.
public Slot Slot { get; }
Property Value
Methods
ClonePattern(PatternHandle, int, int)
Clones a pattern and returns a handle to the new pattern.
public PatternHandle ClonePattern(PatternHandle original, int x, int y)
Parameters
originalPatternHandlexintyint
Returns
ClonePattern(int, int, int)
Clone a pattern.
public int ClonePattern(int patternId, int x, int y)
Parameters
patternIdintxintLine number on which the pattern starts (horizontal).
yintVertical position on the timeline.
Returns
- int
The number of the newly created pattern.
Remarks
Requires LockSlot(int) / UnlockSlot(int).
Calls sv_new_pattern(int, int, int, int, int, int, int, IntPtr).Exceptions
- SunVoxException
Thrown when the operation fails.
CreatePattern(int, int, int, int, int, string?)
Create a new pattern.
public PatternHandle CreatePattern(int lines, int tracks, int x, int y, int iconSeed = 0, string? name = null)
Parameters
linesintNumber of lines.
tracksintNumber of tracks.
xintLine number on which the pattern starts.
yintY coordinate on timeline.
iconSeedintIcon seed for pattern appearance.
namestringPattern name.
Returns
- PatternHandle
The number of the newly created pattern.
Remarks
Requires LockSlot(int) / UnlockSlot(int).
Calls sv_new_pattern(int, int, int, int, int, int, int, IntPtr).Exceptions
- SunVoxException
Thrown when the operation fails.
GetEnumerator()
Returns an enumerator that iterates through the collection.
public IEnumerator<PatternHandle> GetEnumerator()
Returns
- IEnumerator<PatternHandle>
An enumerator that can be used to iterate through the collection.
GetPattern(int)
Returns a handle to a pattern by ID. The underlying pattern may not exist.
public PatternHandle GetPattern(int patternId)
Parameters
patternIdint
Returns
GetPatternExists(int)
Check if a pattern exists.
public bool GetPatternExists(int patternId)
Parameters
patternIdintPattern number.
Returns
Remarks
GetUpperPatternCount()
Get the upper limit of pattern count (one more than the highest pattern number).
public int GetUpperPatternCount()
Returns
- int
Upper limit of pattern count.
Remarks
Exceptions
- SunVoxException
Thrown when the operation fails.
TryGetPattern(int, out PatternHandle?)
Tries to get a pattern by ID.
public bool TryGetPattern(int id, out PatternHandle? pattern)
Parameters
idintpatternPatternHandle?
Returns
- bool
TryGetPattern(string, out PatternHandle?)
Tries to get a pattern by name.
public bool TryGetPattern(string name, out PatternHandle? pattern)
Parameters
namestringpatternPatternHandle?
Returns
- bool