Table of Contents

Class Optimizer

Namespace
ChartTools.Tools
Assembly
ChartTools.dll

Provides methods for simplifying songs

public static class Optimizer
Inheritance
Optimizer
Inherited Members

Methods

CutLengths<T>(IEnumerable<T>, bool)

Cuts short long track objects that exceed the start of the next one.

public static void CutLengths<T>(this IEnumerable<T> objects, bool preOrdered = false) where T : ILongTrackObject

Parameters

objects IEnumerable<T>

Set of long track objects

preOrdered bool

Skip ordering of objects by position

Type Parameters

T

CutSpecialLengths<T>(IEnumerable<T>, bool)

Cuts lengths of special phrases based on the numeric value of the type.

public static List<T>[] CutSpecialLengths<T>(IEnumerable<T> phrases, bool preOrdered = false) where T : SpecialPhrase

Parameters

phrases IEnumerable<T>

Set of phrases

preOrdered bool

Skip ordering of phrases by position

Returns

List<T>[]

Passed phrases ordered by position and grouped by type

Type Parameters

T

Exceptions

InvalidOperationException

CutSustains<TChord, TNote, TLane>(IEnumerable<TChord>, bool)

Cuts short sustains that exceed the position of the next note preventing the sustain from continuing.

public static void CutSustains<TChord, TNote, TLane>(this IEnumerable<TChord> chords, bool preOrdered = false) where TChord : Chord<TNote, TLane> where TNote : struct, IDefinedLaneNote<TLane> where TLane : struct, Enum

Parameters

chords IEnumerable<TChord>

Chords to cut the sustains of

preOrdered bool

Skip ordering of chords by position

Type Parameters

TChord
TNote
TLane

RemoveUnneeded(TempoMap, uint, bool)

Removes redundant tempo markers by syncing the position of anchored markers.

public static void RemoveUnneeded(this TempoMap markers, uint resolution, bool desyncedPreOrdered = false)

Parameters

markers TempoMap

Set of markers

resolution uint

Resolution from EffectiveResolution

desyncedPreOrdered bool

Skip ordering of desynced markers by position

RemoveUnneeded(ICollection<Tempo>, bool)

Removes redundant tempo markers.

public static void RemoveUnneeded(this ICollection<Tempo> markers, bool preOrdered = false)

Parameters

markers ICollection<Tempo>

Tempo markers without anchors.

preOrdered bool

Skip ordering of markers by position.

Remarks

If some markers may be anchored, use the overload with a resolution.

Exceptions

InvalidOperationException

RemoveUnneeded(ICollection<TimeSignature>, bool)

Removes redundant time signature markers.

public static void RemoveUnneeded(this ICollection<TimeSignature> signatures, bool preOrdered = false)

Parameters

signatures ICollection<TimeSignature>

Time signatures to remove the unneeded from

preOrdered bool

Skip ordering of markers by position