-
Notifications
You must be signed in to change notification settings - Fork 27
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
Add MIDI support and Compiler Settings
command line options
#164
Merged
mkilgore
merged 10 commits into
QB64-Phoenix-Edition:main
from
mkilgore:midi-support-new
Sep 9, 2022
Merged
Add MIDI support and Compiler Settings
command line options
#164
mkilgore
merged 10 commits into
QB64-Phoenix-Edition:main
from
mkilgore:midi-support-new
Sep 9, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This adds support for tests of the error output of QB64-PE. The tests are in the form of a `.bas` file that does not compile, and a `.err` file containing the expected output of QB64-PE when producing an error for that file. Additionally the `compile_tests` now support multiple tests in a single folder, via using multiple `.bas` files with different names.
This adds MIDI support to the language as a new unstable feature. There are two new metacommands that come with this: $Unstable: Midi $MidiSoundFont: [Default|"filename"] The $Unstable command is required to be able to use any of the other commands, and just signifies that this is not a full part of the language yet and may change in breaking ways before the API is finalized. The $MidiSoundFont command enables MIDI support in the compiled program, and also specifies what sound font to use to play MIDI files. "Default" will make use of the soundfont placed at './internal/support/default_soundfont.sf2', and otherwise a filename can be specified to use any soundfont wanted. In either case, the selected sound font is compiled into the executable and then loaded at runtime. Fixes: QB64-Phoenix-Edition#115
This adds a fake sound card to the GitHub build agents. The existance of a fake sound card allows us to run tests using the audio backend on the build agents without getting errors.
We were missing some quotes in the command line strings, so if there were spaces involved `chmod +x` would not work correctly.
This adds compiler settings for each of the settings in the 'Compiler Settings' IDE dialog. This makes it easy to supply the settings per compile without needing to use the IDE to change them (or edit the `config.ini`). Fixes: QB64-Phoenix-Edition#162
a740g
reviewed
Sep 5, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything looks good. However, we'll need to decide if we are ok making changes to external libraries directly as this will become an extra step when swapping out these libraries with newer versions in the future.
RhoSigma-QB64
approved these changes
Sep 5, 2022
This was referenced Sep 8, 2022
Changing midiaudio.h will make it harder to incorporate new versions into QB64-PE as they come out. To fix that I have reverted all the changes to midiaudio.h and moved the few private parts we were using into a separate 'filepath' API that's part of libqb.
a740g
approved these changes
Sep 9, 2022
This was
linked to
issues
Sep 9, 2022
This was referenced Sep 11, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds MIDI support to the language as a new unstable feature. There
are two new metacommands that come with this:
Once midi support is setup with those commands, you can
_SNDOPEN()
a MIDIfile and play it like any other sound file
The
$Unstable
command is required to be able to use any of the otherMIDI commands, and just signifies that this is not a full part of the
language yet and may change in breaking ways before the API is
finalized.
The
$MidiSoundFont
command enables MIDI support in the compiled program,and also specifies what sound font to use to play MIDI files.
Default
will make use of the soundfont placed at
'./internal/support/default_soundfont.sf2', and otherwise a filename can
be specified to use any soundfont wanted. In both cases, the selected sound
font is compiled into the executable and then loaded at runtime.
Note that MIDI is not supported when using the OpenAL backend, and we report an
error in that situation.
Command line parameters for setting things in the
Compiler Settings
dialogwere also added. This is actually a feature requested by a few different people
so it's nice that I finally got around to doing it, I needed it for some of the
automated testing for the MIDI stuff.
I would also like to callout some improvements I made to the testing system. I
added documentation in
docs/testing.md
regarding it, along with more completeinformation on how to actually add new tests.