Skip to content

change channel function #123

Open
Open
@CNelias

Description

@CNelias

Selecting the instrument of a track is usually done by adding a program change event to the track which describes when to change and what instrument to use.

This, however, is not the case when dealing with drums. The MIDI convention is that notes to be rendered as drums have to be on the channel 10.
I propose to add an internal attribute to the MIDITrack structure that describes the channel to be used when calling the addnotes! function. That way the notes would be directly send to the drum channel without having to modify them.

Then, the constructor of MIDITrack could be modified to accept an instrument argument in order to add the correct program change event or update the channel attribute of the track so that the instrument of the MIDI track is correct upon synthesis.

What do you think ?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions