patches from wildmidi project - #125
Open
sezero wants to merge 12 commits into
Open
Conversation
fixes W007 warnings from Watcom C++
Partly based on ScratchEverywhere@b0986b9
vbcc used to emit similar errors. Here are the errors from Apple's gcc-4.0, for e.g.: ``` In file included from sf2.c:55: tsf.h: In function 'tsf_region_operator': tsf.h:614: error: initializer element is not constant tsf.h:614: error: (near initialization for 'genMetas[25].offset') tsf.h:614: warning: missing initializer tsf.h:614: warning: (near initialization for 'genMetas[25].offset') tsf.h:615: error: initializer element is not constant tsf.h:615: error: (near initialization for 'genMetas[26].offset') tsf.h:615: warning: missing initializer tsf.h:615: warning: (near initialization for 'genMetas[26].offset') tsf.h:616: error: initializer element is not constant tsf.h:616: error: (near initialization for 'genMetas[27].offset') tsf.h:616: warning: missing initializer tsf.h:616: warning: (near initialization for 'genMetas[27].offset') tsf.h:617: error: initializer element is not constant tsf.h:617: error: (near initialization for 'genMetas[28].offset') tsf.h:617: warning: missing initializer tsf.h:617: warning: (near initialization for 'genMetas[28].offset') tsf.h:618: error: initializer element is not constant tsf.h:618: error: (near initialization for 'genMetas[29].offset') tsf.h:618: warning: missing initializer tsf.h:618: warning: (near initialization for 'genMetas[29].offset') tsf.h:619: error: initializer element is not constant tsf.h:619: error: (near initialization for 'genMetas[30].offset') tsf.h:619: warning: missing initializer tsf.h:619: warning: (near initialization for 'genMetas[30].offset') tsf.h:620: error: initializer element is not constant tsf.h:620: error: (near initialization for 'genMetas[31].offset') tsf.h:620: warning: missing initializer tsf.h:620: warning: (near initialization for 'genMetas[31].offset') tsf.h:621: error: initializer element is not constant tsf.h:621: error: (near initialization for 'genMetas[32].offset') tsf.h:621: warning: missing initializer tsf.h:621: warning: (near initialization for 'genMetas[32].offset') tsf.h:622: error: initializer element is not constant tsf.h:622: error: (near initialization for 'genMetas[33].offset') tsf.h:622: warning: missing initializer tsf.h:622: warning: (near initialization for 'genMetas[33].offset') tsf.h:623: error: initializer element is not constant tsf.h:623: error: (near initialization for 'genMetas[34].offset') tsf.h:623: warning: missing initializer tsf.h:623: warning: (near initialization for 'genMetas[34].offset') tsf.h:624: error: initializer element is not constant tsf.h:624: error: (near initialization for 'genMetas[35].offset') tsf.h:624: warning: missing initializer tsf.h:624: warning: (near initialization for 'genMetas[35].offset') tsf.h:625: error: initializer element is not constant tsf.h:625: error: (near initialization for 'genMetas[36].offset') tsf.h:625: warning: missing initializer tsf.h:625: warning: (near initialization for 'genMetas[36].offset') tsf.h:626: error: initializer element is not constant tsf.h:626: error: (near initialization for 'genMetas[37].offset') tsf.h:626: warning: missing initializer tsf.h:626: warning: (near initialization for 'genMetas[37].offset') tsf.h:627: error: initializer element is not constant tsf.h:627: error: (near initialization for 'genMetas[38].offset') tsf.h:627: warning: missing initializer tsf.h:627: warning: (near initialization for 'genMetas[38].offset') tsf.h:628: error: initializer element is not constant tsf.h:628: error: (near initialization for 'genMetas[39].offset') tsf.h:628: warning: missing initializer tsf.h:628: warning: (near initialization for 'genMetas[39].offset') tsf.h:629: error: initializer element is not constant tsf.h:629: error: (near initialization for 'genMetas[40].offset') tsf.h:629: warning: missing initializer tsf.h:629: warning: (near initialization for 'genMetas[40].offset') ``` The asm output compared to be the same before and after for x86, x86_64, ppc and m68k targets.
Authored-by: Merlyn Morgan-Graham <kavika@gmail.com> schellingb#110
Authored-by: Merlyn Morgan-Graham <kavika@gmail.com> schellingb#110
When an OOM error happens when trying to allocate more slots for voices, tsf_note_on returned failure, properly, but it didn't undo the increase in voiceNum. This would cause an overflow / overwrite error on the next note_on call. Authored-by: Earle F. Philhower, III <earlephilhower@yahoo.com> schellingb#118
tsf.h:372: warning: `tsf_load_filename' defined but not used tsf.h:1555: warning: `tsf_get_presetcount' defined but not used tsf.h:1565: warning: `tsf_bank_get_presetname' defined but not used tsf.h:1577: warning: `tsf_set_volume' defined but not used tsf.h:1582: warning: `tsf_set_max_voices' defined but not used tsf.h:1702: warning: `tsf_bank_note_on' defined but not used tsf.h:1729: warning: `tsf_bank_note_off' defined but not used tsf.h:1737: warning: `tsf_note_off_all' defined but not used tsf.h:1846: warning: `tsf_channel_set_presetindex' defined but not used tsf.h:1876: warning: `tsf_channel_set_bank' defined but not used tsf.h:2079: warning: `tsf_channel_get_preset_index' defined but not used tsf.h:2084: warning: `tsf_channel_get_preset_bank' defined but not used tsf.h:2089: warning: `tsf_channel_get_preset_number' defined but not used tsf.h:2094: warning: `tsf_channel_get_pan' defined but not used tsf.h:2099: warning: `tsf_channel_get_volume' defined but not used tsf.h:2104: warning: `tsf_channel_get_pitchwheel' defined but not used tsf.h:2109: warning: `tsf_channel_get_pitchrange' defined but not used tsf.h:2114: warning: `tsf_channel_get_tuning' defined but not used
CC1 was parsed then discarded, and the GUS engine had no LFO at all. Adds a 5Hz triangle vibrato LFO (TiMidity++ style) for GUS patches, wires CC1 to vibLfoToPitch for SF2 (50 cents at full wheel, per SF2.01 8.4.4 as FluidSynth does), and adds an LFO to the MA-FM synth. RPN 5 rescales depth; CC121 and the resets clear it. Files without CC1 render bit-for-bit identical to before.
This file contains hidden or 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
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.
Thanks for this project.
We recently used tsf.h in WildMIDI with patches. So I thought it'd only be polite to submit our changes to mainstream. Feel free to use them as you see fit.
The patchset includes three changes which are not my own: see #110 and #118 for them. And the big endian patch is partly based on ScratchEverywhere@b0986b9
Regards.