-
Notifications
You must be signed in to change notification settings - Fork 244
Closed
Labels
area-playerRelated to the audio playback engine.Related to the audio playback engine.platform-allAffects all platformsAffects all platformsstate-acceptedThis is a valid topic to work on.This is a valid topic to work on.
Description
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
Attempting to load the .mid file generated by code similar that found at Generating Midi Files via MidiFileGenerator into a 3rd party synthesizer yields an error.
For example, attempting to load the midi file into FluidSynth yields fluidsynth: error: Unrecognized MIDI event:
Attempting to load the midi file into Online Sequencer yields Could not parse MIDI file: Invalid event: first byte must be greater than or equal to 0x80:
Finally, attempting to load the midi file into Guitar Pro will load the file however the notes are incorrect and the instrument has changed from Guitar to Piano.
Expected Behavior
Generated .mid file should play in 3rd party synthesizers without issue.
Steps To Reproduce
# NodeJS Application
export class MidiService implements IMidiService {
async generate(buffer: Buffer): Promise<Uint8Array> {
const settings = await this.createSettings();
const score = await this.createScore(buffer, settings);
const midiFile = await this.createMidiFile();
const handler = await this.createMidiFileHandler(midiFile);
const generator = await this.createMidiGenerator(score, null, handler);
generator.generate();
return midiFile.toBinary();
}
const midiService = new MidiService();
const response = await fetch(URL);
const arrayBuffer = await response.arrayBuffer();
const buffer = Buffer.from(arrayBuffer);
const generatedMidi = await this.midiService.generate(buffer);
writeFileSync(PATH, generatedMidi);
Link to jsFiddle, CodePen, Project
No response
Found in Version
1.3-alpha
Platform
Node.js
Environment
- **OS**: MacOS 12.5
- **Browser**: Chrome
- **.net Version**: N/AAnything else?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area-playerRelated to the audio playback engine.Related to the audio playback engine.platform-allAffects all platformsAffects all platformsstate-acceptedThis is a valid topic to work on.This is a valid topic to work on.
Type
Projects
Status
Done



