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
objectsIEnumerable<T>Set of long track objects
preOrderedboolSkip 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
phrasesIEnumerable<T>Set of phrases
preOrderedboolSkip ordering of phrases by position
Returns
- List<T>[]
Passed phrases ordered by position and grouped by type
Type Parameters
T
Exceptions
CutSustains<T>(IEnumerable<T>, bool)
Cuts short sustains that exceed the position of the next note preventing the sustain from continuing.
public static void CutSustains<T>(this IEnumerable<T> chords, bool preOrdered = false) where T : Chord
Parameters
chordsIEnumerable<T>Chords to cut the sustains of
preOrderedboolSkip ordering of chords by position
Type Parameters
T
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
markersTempoMapSet of markers
resolutionuintResolution from TrueResolution
desyncedPreOrderedboolSkip 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
markersICollection<Tempo>Tempo markers without anchors.
preOrderedboolSkip ordering of markers by position.
Remarks
If some markers may be anchored, use the overload with a resolution.
Exceptions
RemoveUnneeded(ICollection<TimeSignature>, bool)
Removes redundant time signature markers.
public static void RemoveUnneeded(this ICollection<TimeSignature> signatures, bool preOrdered = false)
Parameters
signaturesICollection<TimeSignature>Time signatures to remove the unneeded from
preOrderedboolSkip ordering of markers by position