Skip to content

Is it possible to mute or remove a track? #128

Answered by melanchall
ar065 asked this question in Q&A
Discussion options

You must be logged in to vote

Do you mean mute during playback? If so, you can create custom playback and ignore events on specified track chunk or channel. Please see example here: #122. So your implementation of TryPlayEvent will be like that:

protected override bool TryPlayEvent(MidiEvent midiEvent, object metadata)
{
    if (mutedTrackChunks.Contains((int)metadata))
        return false;

    OutputDevice?.SendEvent(midiEvent);
    return true;
}

You need install 5.2.1-prerelease7 version or later since provided API is not released yet.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@ar065
Comment options

@melanchall
Comment options

Answer selected by ar065
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Just question about the library
2 participants