Mi serve un test di questo semplice codice:
Public Sub Main()
Dim sn As Sound
sn = Sound.Load("/percorso/del/file.mid")
sn.Play
End
Attivando il Componente gb.sdl2.audio dovreste verificare se viene eseguito un file MIDI.
(Dopo aver lanciato il programma, restate in attesa alcuni secondi per verificare l'eventuale esecuzione)
Grazie
Sull'argomento rinvio anche alla pagina della nostra Wiki:
https://www.gambas-it.org/wiki/index.php?title=Eseguire_un_file_MIDI_mediante_il_componente_gb.sdl2.audio
Probabilmente mi manca qualche codec perchè non riesco a sentirlo neanche con VLC, a me da questi errori:
gb.sdl2.audio: warning: MP3 support not available
gb.sdl2.audio: warning: OGG support not available
gb.sdl2.audio: warning: MOD support not available
fluidsynth: error: Unable to open file "/usr/share/sounds/sf3/FluidR3Mono_GM.sf3"
fluidsynth: error: Couldn't load soundfont file
fluidsynth: error: Failed to load SoundFont "/usr/share/sounds/sf3/FluidR3Mono_GM.sf3"
fluidsynth: error: Unable to open file "/usr/share/sounds/sf2/FluidR3_GM.sf2"
fluidsynth: error: Couldn't load soundfont file
fluidsynth: error: Failed to load SoundFont "/usr/share/sounds/sf2/FluidR3_GM.sf2"
Sta un po in funzione muto e poi si spegne da solo.