Long time announced, now finally done and the main reason for us to give this release a major version bump, is the deprecation of $NOPREFIX
. But no worries, we've added a converter which will automatically transform your old $NOPREFIX
using programs back to the regular underscore using syntax as soon as you open such a program. Aside from some subtle side cases, the converter should perfectly do its job without requiring further manual adjustments afterwards.
Moreover the new version got a big audio library update with lots of new features, and a comprehensive new logging system which will help debugging and streamlining your programs. These two had been probably worth a major version bump by itself. Also to highlight is the addition of several new precompiler flags and a huge set of preset constants for use in your programs.
QB64-PE v4.0.0 - Thanks to everyone who contributed to this brand new version.
Breaking changes
- #544, #548 - Complete deprecation of
$NOPREFIX
. - @RhoSigma-QB64 - #553 - Added automatic
$NOPREFIX
to underscore usage converter, triggered when a file using$NOPREFIX
is opened in the IDE. If the user agrees to convert, a backup of the file and any includes are made. - @flukiluke
Enhancements
- #535 - Relax
ALIAS
function name validation, closing issue #493. - @a740g - #536, #571, #572 - The "Export As ..." feature now checks for an active selection first. If there is one, only the selected code is exported, otherwise the entire source will be exported as usual. Plus some adjustments for new commands. - @RhoSigma-QB64
- #550 - added new _MOUSEHIDDEN function. - @RhoSigma-QB64
- #558 - Implements the
_QB64PE_
precompiler flag, closing issue #551. - @RhoSigma-QB64 - #561 - Various enhancements to the IDE and the Compiler. - @RhoSigma-QB64
- Now showing the syntax for all user defined
SUBs
andFUNCTIONs
for better reference in the status messages. - Added lots of preset constants available in every program by default.
- Added _MIN, _MAX, _ENCODEURL$ and _DECODEURL$ functions.
- Now showing the syntax for all user defined
- #562 - The HTTP support for
_OPENCLIENT
is stabilized now,$UNSTABLE:HTTP
is no longer required. Also added the_DEBUG_
precompiler flag, closing issue #29. - @RhoSigma-QB64 - #565 - The big audio library update. - @a740g
Lot of things:
PLAY
now ignores the ";" character as QB4.5 did, fixing issue #554- Adds Pink noise, Brownian noise, LFSR noise, pulse, and custom (
_WAVE
) waveform support toSOUND
&PLAY
- Adds support for ADSR envelope for
SOUND
&PLAY
- Adds multi-channel (4 voice) support for
SOUND
&PLAY
- Adds
SOUND WAIT
andSOUND RESUME
support for multi-channel forSOUND
&PLAY
- Adds Amiga Basic like
_WAVE
command, closing issue #187- Adds support for
_SNDRAWBATCH
that can push a batch of audio sample frames at once compared to just one frame that_SNDRAW
supports- Moves
BEEP
out of the audio library, i.e. a simpleBEEP
no longer pull in the entire audio library- Restores
CHR$(7)
beep support (due to the above change)New commands and enhancements:
SOUND frequency!, duration![, volume!][, panning!][, waveform&][, waveformParameters!][, voice&]
SOUND WAIT
SOUND RESUME
PLAY voiceCommands1$[, voiceCommands2$][, voiceCommands3$][, voiceCommands4$]
remainingTime# = PLAY([voice&])
_WAVE voice&, waveDefinition%%([index&])[, frameCount&]
_SNDRAWBATCH array!([index&])[, channels&][, handle&][, frameCount&]
PLAY MML language improvements (special thanks to @grymmjack for guidance):
W
n /@
n: waveform select (1 = SQUARE, 2 = SAWTOOTH, 3 = TRIANGLE, 4 = SINE, 5 = NOISE_WHITE, 6 = NOISE_PINK, 7 = NOISE_BROWNIAN, 8 = NOISE_LFSR, 9 = PULSE, 10 = CUSTOM_WAVE)/
n: attack (percentage of total note time 0 - 100)\
n: decay (percentage of total note time 0 - 100)^
n: sustain (percentage of MML volume 0 - 100)_
n: release (percentage of total note time 0 - 100)Y
n: extra params for current waveform (percentage 0 - 100 - usually for pulse wave)S
n: pan position (0 to 100) where 0 is leftmost and 100 is rightmostR
/P
: rest / pauseV+
&V-
: Volume increment / decrement (single-step & clamped)S+
&S-
: Pan right / left (single-step & clamped)
This adds new logging capabilities to QB64, both internally from
libqb
and also exposed to the QB64 code. Beyond being a bit nicer than aBelow is an example of some logging from a QB64 program (note how the IDE opens a separate console window to display it):
The new commands are _LOGTRACE, _LOGINFO, _LOGWARN, _LOGERROR and _LOGMINLEVEL. The first four write out log messages at the indicated log level. The last returns a number indicating the lowest level of logging is enabled, allowing you to skip generating more expensive logging if it won't be displayed.
Logging is enabled via a variety of different environment variables (when run from the IDE these are configured automatically):
QB64PE_LOG_LEVEL
- sets the lowest log level to display, options areTrace
,Information
,Warning
,Error
QB64PE_LOG_SCOPES
- A comma-separated list of different sets of logging to turn on, allowing basic filtering of what is displayed. Options are:
a.libqb
- Some generic logging fromlibqb
, such as error codes when they happen, program startup/shutdown, etc.
b.libqb-image
- Logging from the image subsystem (when images are loaded,freed, errors that happen, etc.)
c.libqb-audio
- Logging from the audio subsystem
d.qb64
- Logging from the QB64 Program (_Log*
statements)QB64PE_LOG_HANDLERS
- A comma-separated list of the logging handlers to enable. If no handlers are enabled, then no logging is generated. Current options are:
a.console
- Logging output is written to the console.
b.file
- Writes logs to the file set via theQB64PE_LOG_FILE_PATH
environment variableCurrently the IDE just defaults to using
Information
and enabling all the scopes, in a future update I'd like to have an IDE dialog that lets you pick the log level and scopes.
- #567 - Added new function _TOSTR$ which supports the full
_FLOAT
range. Also added_ASSERTS_
,_CONSOLE_
,_EXPLICIT_
and_EXPLICITARRAY_
precompiler flags. - @RhoSigma-QB64 - #574 - Added the _IIF function for conditional evaluation like the ternary operator in C, with short-circuiting behavior, closing issue #403. - @a740g
- #581 - Lifts the restrictions of doing arithmetic with
_OFFSET
in expressions. Also added the new function _CAST, which works like explicit type casting in C. - @a740g - #582 - Added new function _CLAMP and a set of functions dealing with the HSB colorspace in symmetry with the RGB functions, namely _HSB32, _HSBA32, _HUE32, _SATURATION32 and _BRIGHTNESS32. - @RhoSigma-QB64
Bug fixes
- #534 - Allows users to revert to the built-in soundbank by passing an empty string to
_MIDISOUNDBANK
. Before it was not possible to switch back to the default soundbank once an external one had been used with_MIDISOUNDBANK
. - @a740g - #537 - Fixed some wrong Wiki links in exported code. - @RhoSigma-QB64
- #546 - Update clipboard library to latest, fixing issue #541. - @a740g
- #557 - Fixed a bug where
KILL
,FILES
, and_FILES$
unintentionally shared a static DIR pointer when performing file searches. As a result, calling any of these functions would reset the search state of_FILES$
, leading to unexpected behavior. This issue was reported here. - @a740g - #560 - Fixed unary negation when using
CONST
, closing issue #542. - @mkilgore - #568 - Reloading a MIDI file with a different soundfont now works as expected, also
_MEMSOUND
now works correctly with fully decoded MEMORY sounds. - @a740g - #570 - Removes the voice range check in
_PLAY
(function). If the voice is out of range, it now simply defaults to zero, aligning the behavior with QB4.5 standards. - @a740g - #574 - Resolved an issue in
_ROL
and_ROR
, where the second argument could incorrectly be aSTRING
. - @a740g
Internal changes
- #539, #585 - Switch to LLVM MinGW C++ compiler on all Windows architectures. - @a740g
- #538, #540, #543, #547 - Enable globbing by default and silence lots of C++ compiler warnings. - @a740g
- #548, #550 - Complete removal of rotten Android remains, i.e.
$VIRTUALKEYBORD
and friends. - @RhoSigma-QB64 - #569 - Various libqb refactoring, silence more C++ compiler warnings. - @a740g
- #588 - Tidy up the markdown files in the repository - @a740g