Skip to content

Prog Change and set Midi Channel #310

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

You must be logged in to vote

@Lenvdb64 Hi,

Pattern is just a set of actions. Those actions will be materialized on ToFile or TrackChunk call. Please see the Pattern article:

Pattern can be then saved to MidiFile (via ToFile method) or TrackChunk (via ToTrackChunk method). You need to provide a tempo map. Also you can optionally specify the channel that should be set to events. The default channel is 0.

So you specify a channel by passing it as the parameter to those methods.

As for your code:

using (var dev = OutputDevice.GetByName("Microsoft GS Wavetable Synth"))
{
    Melanchall.DryWetMidi.Common.SevenBitNumber channel = (Melanchall.DryWetMidi.Common.SevenBitNumber)9;

    CreateMidiFile();
}

it's super strange:

Replies: 3 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

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

@melanchall
Comment options

Answer selected by melanchall
Comment options

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

@melanchall
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants