public class SongUtil
extends java.lang.Object
| Constructor and Description |
|---|
SongUtil() |
| Modifier and Type | Method and Description |
|---|---|
static <N extends Note> |
applyToAllNotes(SongView<N> songView,
java.util.function.Consumer<N> noteConsumer)
Applies the given consumer to all notes in the song view.
|
static <N extends Note> |
removeDoubleNotes(SongView<N> songView)
Removes duplicate notes which are on the same tick.
|
static <N extends Note> |
removeSilentNotes(SongView<N> songView)
Removes all notes which have a volume of 0.
|
static <N extends Note> |
removeSilentNotes(SongView<N> songView,
float threshold)
Removes all notes which have a volume lower than or equal the given threshold.
|
public static <N extends Note> void applyToAllNotes(SongView<N> songView, java.util.function.Consumer<N> noteConsumer)
N - The note typesongView - The song viewnoteConsumer - The note consumerpublic static <N extends Note> void removeDoubleNotes(SongView<N> songView)
N - The note typesongView - The song viewpublic static <N extends Note> void removeSilentNotes(SongView<N> songView)
N - The note typesongView - The song view