Table of Contents

Class Timeline

Namespace
SunSharp
Assembly
SunSharp.dll

Project timeline, containing all the existing patterns.

public sealed class Timeline : ITimeline
Inheritance
object
Timeline
Implements

Properties

Slot

Gets the slot this timeline belongs to.

public Slot Slot { get; }

Property Value

Slot

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

original PatternHandle
x int
y int

Returns

PatternHandle

ClonePattern(int, int, int)

Clone a pattern.

public int ClonePattern(int patternId, int x, int y)

Parameters

patternId int
x int

Line number on which the pattern starts (horizontal).

y int

Vertical position on the timeline.

Returns

int

The number of the newly created pattern.

Remarks

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

lines int

Number of lines.

tracks int

Number of tracks.

x int

Line number on which the pattern starts.

y int

Y coordinate on timeline.

iconSeed int

Icon seed for pattern appearance.

name string

Pattern name.

Returns

PatternHandle

The number of the newly created pattern.

Remarks

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

patternId int

Returns

PatternHandle

GetPatternExists(int)

Check if a pattern exists.

public bool GetPatternExists(int patternId)

Parameters

patternId int

Pattern number.

Returns

bool

true if pattern exists; false otherwise.

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

id int
pattern PatternHandle?

Returns

bool

TryGetPattern(string, out PatternHandle?)

Tries to get a pattern by name.

public bool TryGetPattern(string name, out PatternHandle? pattern)

Parameters

name string
pattern PatternHandle?

Returns

bool