Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stuck instrument with Windows XP onestop.mid #59

Open
zennetizen opened this issue Jun 9, 2021 · 1 comment
Open

Stuck instrument with Windows XP onestop.mid #59

zennetizen opened this issue Jun 9, 2021 · 1 comment

Comments

@zennetizen
Copy link

When playing onestop.mid from Windows XP a note gets stuck after the first "verse" of the song, and continues through the rest of the song.

I'm trying to figure out what's going on but it's a hard one to debug.

@edgarlsitec
Copy link

edgarlsitec commented Jul 22, 2021

I was having a similar problem when playing a few midi sample files from Creative SB16 and AWE32 driver.
A note always got stuck in the songs styles#2.mid, starman.mid and dance.mid. I managed to find a solution by looking at the last midi commands that were reproduced before the note got stuck.
In the example, try to add the following code at TML_PROGRAM_CHANGE case inside the AudioCallback. I hope it helps.

case TML_PROGRAM_CHANGE: 
        tsf_channel_set_presetnumber(g_TinySoundFont, g_MidiMessage->channel, g_MidiMessage->program, (g_MidiMessage->channel == 9));
        tsf_channel_midi_control(g_TinySoundFont, g_MidiMessage->channel, TML_ALL_SOUND_OFF, 0); // this it the fix!!!
        break;

Note: First I used TML_ALL_SOUND_OFF, but TML_ALL_NOTES_OFF appears to sound better at the overture.mid song.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants