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<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
chordsIEnumerable<TChord>Chords to cut the sustains of
preOrderedboolSkip ordering of chords by position
Type Parameters
TChordTNoteTLane
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 EffectiveResolution
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