$UNSTABLE: Difference between revisions

From QB64 Phoenix Edition Wiki
Jump to navigation Jump to search
(Added documentation of new $MIDISOUNDFONT metacommand)
No edit summary
 
(14 intermediate revisions by 3 users not shown)
Line 1: Line 1:
The [[$MIDISOUNDFONT]] metacommand enables MIDI support for [[_SNDOPEN]].
The [[$UNSTABLE]] metacommand is used to enable the use of features that have not yet been made a permanent part of the language. Features hidden behind this metacommand may have breaking changes or be removed between releases.
 
MIDI functionality is current unstable, and requires [[$UNSTABLE]]:MIDI to be able to use.




{{PageSyntax}}
{{PageSyntax}}
:[[$MIDISOUNDFONT]]: {DEFAULT|"{{Parameter|Filename}}"}
:[[$UNSTABLE]]: {MIDI, HTTP}




{{Parameters}}
{{PageParameters}}
* DEFAULT indicates that the soundfont provided by QB64-PE should be used to play MIDI files.
* The current unstable features are as follows:
** The provided soundfont is about 1MB in size.
** '''MIDI''' allows usage of the [[$MIDISOUNDFONT]] metacommand ({{Text|deprecated|red}})
* {{Parameter|Filename}} can be used to provide your own soundfont for playing MIDI files.
** '''HTTP''' allows opening HTTP connections using [[_OPENCLIENT]]
** The specified soundfont file is compiled into your program and is not required at runtime.




{{PageDescription}}
{{PageDescription}}
* The use of this metacommand allows [[_SNDOPEN]] to open MIDI files.
* [[$UNSTABLE]] exists as a way to allow usage of new language features before they are finalized as part of the language.
* The selected soundfont is what is used to play all MIDI files.
* Any languages features hidden behind [[$UNSTABLE]] may be changed in breaking ways in the next version of QB64-PE.
* Language features that become a permanent part of the language will no longer require [[$UNSTABLE]] to be used.
* More than one [[$UNSTABLE]] can be used in a program.




{{PageAvailability}}
{{PageAvailability}}
* '''QB64-PE v3.2 and up''' (QB64 Phoenix Edition)
<!-- QB64 = a version or none, QBPE = a version or all, Platforms = yes or no -->
<gallery widths="48px" heights="48px" mode="nolines">
File:Qb64.png|'''none'''
File:Qbpe.png|'''v3.2.0'''
File:Apix.png
File:Win.png|'''yes'''
File:Lnx.png|'''yes'''
File:Osx.png|'''yes'''
</gallery>
<!-- additional availability notes go below here -->
* '''MIDI''' keyword added in '''QB64-PE v3.2.0'''
* '''HTTP''' keyword added in '''QB64-PE v3.5.0'''
* '''MIDI''' keyword was {{Text|deprecated|red}} in '''QB64-PE v3.14.0'''. Use [[_MIDISOUNDBANK]] instead.




Line 28: Line 39:
{{Cl|$UNSTABLE}}:MIDI
{{Cl|$UNSTABLE}}:MIDI


' This line is only allowed when {{cl|$UNSTABLE}}:MIDI is used
' This line is only allowed when {{Cl|$UNSTABLE}}:MIDI is used
{{cl|$MIDISOUNDFONT}}: Default
{{Cl|$MIDISOUNDFONT}}: Default


{{cl|_SNDPLAYFILE}} "example.mid"
{{Cl|_SNDPLAYFILE}} "example.mid"
{{CodeEnd}}
{{CodeEnd}}
{{CodeStart}}
{{Cl|$UNSTABLE}}:MIDI


' Using a custom soundfont rather than the default
{{cl|$MIDISOUNDFONT}}: "soundfont.sf2"
{{cl|_SNDPLAYFILE}} "example.mid"
{{CodeEnd}}


{{PageSeeAlso}}
{{PageSeeAlso}}
* [[$UNSTABLE]]
* [[$MIDISOUNDFONT]] ({{Text|deprecated|red}})
* [[_SNDOPEN]]
* [[_MIDISOUNDBANK]]
* [[_OPENCLIENT]]




{{PageNavigation}}
{{PageNavigation}}

Latest revision as of 14:11, 23 July 2024

The $UNSTABLE metacommand is used to enable the use of features that have not yet been made a permanent part of the language. Features hidden behind this metacommand may have breaking changes or be removed between releases.


Syntax

$UNSTABLE: {MIDI, HTTP}


Parameters

  • The current unstable features are as follows:


Description

  • $UNSTABLE exists as a way to allow usage of new language features before they are finalized as part of the language.
  • Any languages features hidden behind $UNSTABLE may be changed in breaking ways in the next version of QB64-PE.
  • Language features that become a permanent part of the language will no longer require $UNSTABLE to be used.
  • More than one $UNSTABLE can be used in a program.


Availability

  • MIDI keyword added in QB64-PE v3.2.0
  • HTTP keyword added in QB64-PE v3.5.0
  • MIDI keyword 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"


See also



Navigation:
Main Page with Articles and Tutorials
Keyword Reference - Alphabetical
Keyword Reference - By usage
Report a broken link