Skip to content

Commit

Permalink
sanitize xg
Browse files Browse the repository at this point in the history
  • Loading branch information
spessasus committed Aug 4, 2024
1 parent 77032e7 commit f85951b
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 29 deletions.
15 changes: 15 additions & 0 deletions src/spessasynth_lib/midi_parser/midi_editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,21 @@ export function modifyMIDI(
midiSystem = "xg";
addedGs = true; // flag as true so gs won't get added
}
else
// check for xg program change
if (
message.messageData[0] === 0x43 // yamaha
&& message.messageData[2] === 0x4C // XG
&& message.messageData[3] === 0x08 // part parameter
&& message.messageData[5] === 0x03 // program change
)
{
programChanges.push({
track: trackNum,
message: message,
channel: message.messageData[4]
});
}
}
})
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ export function systemExclusive(messageData, channelOffset = 0)
return;
}
const channel = messageData[4] + channelOffset;
const value = messageData[6]
const value = messageData[6];
switch (messageData[5])
{
// bank select
Expand Down
28 changes: 14 additions & 14 deletions src/website/minified/demo_main.min.js

Large diffs are not rendered by default.

28 changes: 14 additions & 14 deletions src/website/minified/local_main.min.js

Large diffs are not rendered by default.

0 comments on commit f85951b

Please sign in to comment.