Commit graph

13883 commits

Author SHA1 Message Date
alexey.lysiuk
4fdf488960 Fixed MSVC compilation warning
VC\include\type_traits(1468): warning C4800: 'int': forcing value to bool 'true' or 'false' (performance warning)
src\sound\musicformats\music_midistream.cpp(832): note: see reference to function template instantiation 'std::function<bool (int)>::function<MIDIStreamer::SetMIDISource::<lambda_...>,int,void>(_Fx)' being compiled
2018-02-26 13:22:36 +02:00
alexey.lysiuk
14802c0547 Fixed GCC compilation error
src/sound/timiditypp/reverb.h:467:6: error: declaration of ‘TimidityPlus::lfo TimidityPlus::<anonymous struct>::lfo’ [-fpermissive]
src/sound/timiditypp/reverb.h:61:8: error: changes meaning of ‘lfo’ from ‘struct TimidityPlus::lfo’ [-fpermissive]
2018-02-26 13:10:32 +02:00
Christoph Oelckers
64354df3c6 - another 'variadic argument' error due to MSVC letting it slip through. 2018-02-26 10:57:35 +01:00
Christoph Oelckers
f405d630df - Redid CVar synchronization for Timidity++. 2018-02-26 09:55:04 +01:00
Christoph Oelckers
47dbbeb65a Revert "- don't let the Timidity++ player directly access the CVARs."
This reverts commit 8f7a503561.

# Conflicts:
#	src/sound/timiditypp/playmidi.cpp

Something in here wasn't working as intended, and since it needs better synchronization let's redo it entirely.
2018-02-26 09:19:10 +01:00
Christoph Oelckers
36e8358763 - use submenus for soundfont selection both for better overview and avoiding a music restart for each selection change. 2018-02-26 08:52:40 +01:00
Christoph Oelckers
918d188263 - This shouldn't have been committed. 2018-02-25 16:15:24 +01:00
Christoph Oelckers
67a6ec01e1 - added a separate section for soundfont search paths. 2018-02-25 09:32:05 +01:00
Christoph Oelckers
2ac101fa51 - removed tmpfileplus, which was only used by the old Timidity++ player. 2018-02-24 23:01:55 +01:00
Christoph Oelckers
8f7a503561 - don't let the Timidity++ player directly access the CVARs.
This may cause problems because the player runs in a different thread than the input code.
Instead the play thread will now copy their values to local variables when it starts generating output.
2018-02-24 19:36:09 +01:00
Christoph Oelckers
27f9330c81 - reimplemented thr OPL dumoer for MIDI. 2018-02-24 18:55:42 +01:00
Christoph Oelckers
a5316c211d - Moved the MIDI WAVE writer device to its own source file. 2018-02-24 18:25:04 +01:00
Christoph Oelckers
2202a52840 - made the MIDI to WAVE dumper functional again, including the option of choosing the MIDI synth and sound font with which it should be rendered. 2018-02-24 18:19:27 +01:00
Christoph Oelckers
786f1b34be - did not save everything. 2018-02-24 13:33:28 +01:00
Christoph Oelckers
6e913bb032 - Timidity CVAR cleanup and removal of the more obscure options. 2018-02-24 13:06:17 +01:00
Christoph Oelckers
b1313d533a - changing reverb mode must reallocate the buffers because they are mode-dependent. 2018-02-24 12:41:16 +01:00
Christoph Oelckers
fa8cfa65c0 - fixed incomplete initialization of the chorus data. 2018-02-24 12:30:19 +01:00
Christoph Oelckers
88328b056d - removed 'register' keyword from reverb.cpp. 2018-02-23 22:01:00 +01:00
Christoph Oelckers
39f26028aa - reworked the advanced sound menu to take advantage of the new soundfont handling.
The text input field for the configs have been removed. Instead it will now present a list of soundfonts that are found in specific locations.
For that it will look in the 'soundfont' directories of the FileSearch.Directories entry of the config.
Acceptable file formats here are SF2 and zipped GUS patch sets. These zipped patch sets need to have a timidity.cfg at the root and refer to all containing data by relative path. References to outside files are not allowed here.
It is still possible to refer to sound fonts elsewhere on the hard drive by manually entering a path at the console - but these won't show in the menu and will get lost if one cycles through the list of available options.
Of the available softsynths, FluidSynth will only list SF", Wildmidi will only list GUS patch sets and Timidity++ and GUS will list both.

Please note that although the GUS synth can read SF2, the output appears to be broken die to some old bug.
2018-02-23 19:23:39 +01:00
Christoph Oelckers
5da1433c57 - fixed a memory leak and removed debug output. 2018-02-23 18:57:30 +01:00
Christoph Oelckers
88f9f0982c - fixed Timidity++ playback. 2018-02-23 18:33:54 +01:00
Christoph Oelckers
4a179954b1 - removed Timidity_mastervolume CVAR. The reason why this was added got addressed at a lower level with the new code (i.e. the EXE's output was far too loud) and if there need to be adjustments to evening out the volume of the different MIDI synths it should be done in the data generation step, not as an added factor to the system volume of the track. 2018-02-23 17:27:36 +01:00
Christoph Oelckers
d25cc1baa0 - Fixed today's work now that I'm able to hear some sound again. Also some reorganization 2018-02-23 17:01:17 +01:00
Christoph Oelckers
ddedcd9fc2 Removed all conditional checks on HAVE_FLUIDSYNTH
With the current setup it makes zero sense to exclude it. This was all a remnant of its introduction when it couldn't be taken for granted.
2018-02-23 14:36:26 +01:00
Christoph Oelckers
adebd644f2 Rewroter 'writemidi' CCMD to work independently of the currently playing song's data.
The first benefit of separating the MIDI data sources from the playback classes. :)
2018-02-23 14:26:29 +01:00
Christoph Oelckers
16f17deb0f We no longer have a sound system that can handle music playback, so the code for it can go away. 2018-02-23 13:23:03 +01:00
Christoph Oelckers
9a1479ab08 Separate MIDI streamer and source creation in the high level code. 2018-02-23 13:20:07 +01:00
Christoph Oelckers
9aa1199902 Split the different MIDI format implementations into a separate 'Source' class.
This is necessary to write a universal, device independent wave dumper for MIDIs.
With each format inheriting from the main player class it is not possible to create a generic dumper player.
2018-02-23 12:40:43 +01:00
Christoph Oelckers
8734511e80 Removed PathExpander and PseudoMidiDevice which are no longer being used
PathExpander has been integrated into the sound font manager and PseudoMidiDevice was only used as the base class for the old Timidity++ device with the external executable.
2018-02-23 09:21:42 +01:00
Christoph Oelckers
aae832386f Fixed warnings in Timidity++ code emitted by XCode, except one which cannot be eliminatet without compromising the code. 2018-02-23 09:07:42 +01:00
Christoph Oelckers
6618656e7c Adjusted Timidity++ to soundfint manager 2018-02-23 08:54:01 +01:00
Christoph Oelckers
f9893a700a - fixed some warnings. 2018-02-23 01:01:18 +01:00
Christoph Oelckers
d6fe1fb39f - simplified the sound font manager a bit.
- allow the GUS to change sound fonts at run time.
- implemented sound font manager support in the GUS synth. This works but also made me realize that the SF2 support of this synth has been rather broken, apparently forever.
2018-02-23 00:48:03 +01:00
Christoph Oelckers
c12c068355 - WildMidi now uses the soundfont manager.
- added the missing handler for reading Timidity configs from the lump directory.
- fixed incomplete init of the GUS synth when no soundfont can be located.
- fixed bad initialization of WildMidi sampling frequency. It would default to 11.025 kHz if no valid rate was set. Now it will use the sound device's native frequency.
2018-02-22 22:35:49 +01:00
Christoph Oelckers
1361956072 - Soundfont manager works for FluidSynth. 2018-02-22 18:03:22 +01:00
Christoph Oelckers
8b8a7e5e45 - sfmanager gets initialized 2018-02-22 14:30:43 +01:00
Christoph Oelckers
aaedae6972 - do not abort if FScanner cannot open a file. 2018-02-22 14:10:25 +01:00
Christoph Oelckers
504d68e2f8 All compile errors on Mac fixed. 2018-02-22 13:50:41 +01:00
Christoph Oelckers
2c138d703d Move function out of header due to compile errors on macOS 2018-02-22 13:46:29 +01:00
Christoph Oelckers
04344505c0 Soundfont header 2018-02-22 13:42:12 +01:00
Christoph Oelckers
a6fa906764 Framework for context independent sounffont management
Not tested yet!
2018-02-22 12:51:45 +01:00
Christoph Oelckers
3d08c1fbc7 Merge branch 'master' into timidity++
# Conflicts:
#	src/sound/mididevices/music_timiditypp_mididevice.cpp
2018-02-22 09:10:42 +01:00
Christoph Oelckers
9bf11155eb Ignore .DS_Store for macOS 2018-02-22 08:40:32 +01:00
Christoph Oelckers
542d3431ff - Start of soundfont refactoring. This does not compile yet! 2018-02-22 07:21:19 +01:00
Christoph Oelckers
0688d53ea8 - allow reloading the sound font for the GUS device. 2018-02-21 23:38:04 +01:00
Christoph Oelckers
e84ec2978a - plugged the pending memory leaks. 2018-02-21 21:33:56 +01:00
Christoph Oelckers
5219916de5 - there's no need to drag the event time around, this really was just an artifact of Timidity's original implementation which is no longer in use.
- plugged a few memory leaks.
2018-02-21 21:11:31 +01:00
Christoph Oelckers
af705d1c59 - silenced a few pointless console messages generated by Timidity++. 2018-02-21 20:44:51 +01:00
Christoph Oelckers
af1de8ddc9 - removed volume testing output.
- final tweak to volume adjustment: Do this upon extraction for better results.

If this is done via the synth's parameters it will affect channel balance.
The given factor of 5 is necessary to roughly match the output of FluidSynth.
2018-02-21 20:12:37 +01:00
Christoph Oelckers
59352af486 - Volume tweaking. 2018-02-21 19:05:14 +01:00