Skip to content

Commit

Permalink
do not assign ports to empty tracks
Browse files Browse the repository at this point in the history
  • Loading branch information
spessasus committed Nov 11, 2024
1 parent ebd9159 commit ba93b33
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 67 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ import { MIDIticksToSeconds } from "../../midi_parser/basic_midi.js";
*/
export function assignMIDIPort(trackNum, port)
{
// do not assign ports to empty tracks
if (this.midiData.usedChannelsOnTrack[trackNum].size === 0)
{
return;
}

// assign new 16 channels if the port is not occupied yet
if (this.midiPortChannelOffset === 0)
{
Expand Down
Loading

0 comments on commit ba93b33

Please sign in to comment.