$MIDISOUNDFONT
Jump to navigation
Jump to search
The now deprecated $MIDISOUNDFONT metacommand did enable MIDI support for _SNDOPEN in QB64-PE versions prior to v3.14.0, and was also considered unstable. It could only be used with the $UNSTABLE:MIDI flag set. Since v3.14.0 MIDI support is stable and you can use _MIDISOUNDBANK to load a soundfont.
Syntax
- $MIDISOUNDFONT: {DEFAULT|"Filename"}
Parameters
- DEFAULT indicates that the soundfont provided by QB64-PE should be used to play MIDI files.
- The provided soundfont is about 1MB in size.
- Filename can be used to provide your own soundfont for playing MIDI files.
- The specified soundfont file is compiled into your program and is not required at runtime.
Description
- The use of this metacommand allows _SNDOPEN to open MIDI files.
- The selected soundfont is what is used to play all MIDI files.
Availability
- $MIDISOUNDFONT was deprecated in QB64-PE v3.14.0. Use _MIDISOUNDBANK instead.
Examples
$UNSTABLE:MIDI ' This line is only allowed when $UNSTABLE:MIDI is used $MIDISOUNDFONT: Default _SNDPLAYFILE "example.mid" |
$UNSTABLE:MIDI ' Using a custom soundfont rather than the default $MIDISOUNDFONT: "soundfont.sf2" _SNDPLAYFILE "example.mid" |
See also