Commit Graph

79 Commits

Author SHA1 Message Date
Hannu Haahti
9ab6699a26 sf2_player: fix #481 2014-03-19 00:31:29 +02:00
Tobias Doerffel
5e2d299360 MidiPort: introduced internal base velocity property
In order to keep compatibility with projects created with LMMS < 1.0.0
we maintain a property specifying the base velocity (i.e. the velocity
sent to MIDI-based instruments at volume=100%). For new projects this
always will be 64 while compat code enforces a value of 127 for old
projects.

We can also think about hiding the new groupbox in order to hide
complexity from the user.

Closes #430.
2014-03-17 22:30:52 +01:00
Tobias Doerffel
83af61836f Sf2Player: corrected MIDI velocity calculation for pseudo envelopes 2014-03-08 12:46:52 +01:00
Tobias Doerffel
382a76773d Merge pull request #390 from wongcc966422/issue360
sf2 plugin: fixes naming issue
2014-02-27 16:05:10 +01:00
Wong Cho Ching
d76e3dd301 sf2 plugin:fixes naming issue 2014-02-27 19:47:20 +08:00
Tobias Doerffel
987fdc2e01 Sf2Player: less line breaks and a few other coding style improvements 2014-02-21 20:43:23 +01:00
Tobias Doerffel
7cd7ca46f8 Sf2Player: use qDebug() rather than QTextStream on stdout 2014-02-21 20:43:23 +01:00
Tobias Doerffel
2591378818 LcdSpinBox: adopt naming style convention 2014-02-20 22:17:28 +01:00
Tobias Doerffel
ca0e413fd3 Renamed PlayHandle classes and some functions with bool return values
Next big coding style update - this time all PlayHandle classes are
affected. Functions like done() and released() were renamed to
isFinished() and isReleased().
2014-01-29 23:54:47 +01:00
Tobias Doerffel
43f76f5357 Sf2Player: update pitch wheel sensitivity based on pitch range
Fluidsynth supports setting the pitch wheel sensitivity, therefore make
use of it and set values from the recently introduced pitch range model.
2014-01-26 14:09:05 +01:00
Lukas W
2e7bfe17e6 Update code to use FileInfo instead of QFileInfo
Also removed all blocks similar to
```
#if QT_VERSION >= 0x040806
	filedialog.setOption( QFileDialog::DontUseCustomDirectoryIcons );
#endif
```
as this now takes place in the new subclass's constructor.
2014-01-24 15:37:41 +01:00
Vesa
00346d5ec1 Final tweaks to SF2 artwork (based on feedback), moved chorus & reverb buttons a bit to fit them better with new artwork 2014-01-15 11:45:46 +02:00
Tobias Doerffel
9a7ad0264f SampleBuffer, SamplePlayHandle, SampleRecordHandle, SampleTrack: new coding style
Renamed file and class names.
2014-01-14 18:01:14 +01:00
Tobias Doerffel
0ff1f91c1b Mixer: renamed class and file name
The mixer class is now named "Mixer" and accessible via engine::mixer().
2014-01-08 22:35:14 +01:00
Tobias Doerffel
7633affa20 Use new QFileDialog::DontUseCustomDirectoryIcons flag for faster file dialogs
In Qt 4.8.6 there's a new option QFileDialog::DontUseCustomDirectoryIcons
promising much better performance when there are many folders.

Closes #511.
2013-09-13 21:29:53 +02:00
Tobias Doerffel
44c37775a4 Sf2Player: preserve custom track name when loading settings
Commit a184bc039e introduced a regression
which causes a custom track name not being preserved when loading
setings.

Closes #534.
2013-06-11 13:25:18 +02:00
Tobias Doerffel
a184bc039e Sf2Player: update track name after loading file
For consistent behaviour with other plugins such as AudioFileProcessor
and ZynAddSubFX update the track name after loading a file.
2013-01-14 23:13:21 +01:00
Tobias Doerffel
510f87bfcc Sf2Player: load default soundfont upon instantiation
When creating a new Sf2Player plugin instance, load the default
soundfont. Might decrease performance a little bit when loading projects
which make use of many other soundfonts but for the sake of improved
usability we should accept this.

Partially closes #3149779.
2011-01-23 23:19:31 +01:00
Tobias Doerffel
a9717c0cc3 NotePlayHandle: send correct MidiNoteOff events if base note changed
When changing an InstrumentTrack's base note while NotePlayHandles are
active, they will send a wrong MidiNoteOff event due to the masterKey()
translation in InstrumentTrack::processOutEvent().

Therefore in NotePlayHandle remember the original base note value and
add the difference between original and current base note to the value
returned by NotePlayHandle::key(). Fixes hanging notes in MIDI-based
instruments such as ZynAddSubFX.

Furthermore some coding style improvements.

Closes #3146975.
2010-12-31 13:23:08 +01:00
Tobias Doerffel
f85898ba6e Plugins: export PluginDescriptors and lmms_plugin_main function
Various plugins were missing the PLUGIN_EXPORT declaration with their
PluginDescriptor instantiations and lmms_plugin_main implementation
which made some plugins not show up with latest Win32 build.
2010-07-23 22:16:06 +02:00
Tobias Doerffel
48fdc70893 Sf2Player: disable per-note-panning support for the time being
The per-note-panning support is broken (not sure whether this is a bug
in FluidSynth or our code) and leads to improperly panned sounds all
the time - even with all notes being panned to center. Thus disable it
until we have a proper fix for it.
(cherry picked from commit 22489ae321)
2010-05-17 23:37:29 +02:00
Tobias Doerffel
7c16094811 Fixed spelling errors
Fixed some spelling errors found by Lintian while checking the Debian
package of LMMS. Thanks to Patrick Winnertz for pointing out this issue.
(cherry picked from commit 9fd3dacb67)
2010-01-25 23:27:43 +01:00
Tobias Doerffel
f7da4a0f7e InstrumentPlayHandle: do not process if InstrumentTrack is muted
While regular instruments were excluded from processing when muted
this did not happen for InstrumentPlayHandle-based instruments. Muting
for exampling tracks with VSTi's inside did not decrease CPU usage.
Checking whether related InstrumentTrack is muted before calling
Instrument::play() fixes this issue.

Closes #2857426.
(cherry picked from commit 6940d19969)
2009-09-15 23:51:00 +02:00
Tobias Doerffel
f4dbb2ff5c sed: s/( void )/(), s/FALSE/false/, s/TRUE/true
Replaced remaining occurences of old constants and superfluous "void"
on empty argument list of functions.
(cherry picked from commit 166701f9f3)
2009-08-25 01:42:20 +02:00
Tobias Doerffel
1d5cb23385 File and class renames part 1
Most files and most of the core classes and their methods have been
renamed to match new coding style conventions:

391 files changed, 25400 insertions(+), 25598 deletions(-)

Furthermore splitted some files where model and view classes were
declared or implemented together in the same file.

Should be tested thoroughly as I might have missed renaming some virtual
methods or SIGNAL/SLOT parameters.
(cherry picked from commit 8c9a9dd14c)
2009-08-25 01:30:41 +02:00
Tobias Doerffel
84e0dc1b81 Sf2Player: removed trailing spaces in code
There were some unsolicited trailing spaces in the code. Removed them.
(cherry picked from commit 964c6532f2)
2009-08-05 18:09:42 +02:00
Tobias Doerffel
99791ddf25 Sf2Player: fixed crash and race conditions
Do not crash if no fluid_voice could be determined in
sf2Instrument::playNote() (which for example happens if no soundfont
is loaded). Furthermore protect the FluidSynth API calls in the
envelope and panning code with global synth mutex.
(cherry picked from commit 144f0c6c80)
2009-08-05 18:04:06 +02:00
Tobias Doerffel
31b2b00ba4 Sf2Player: added panning and volume envelope support
Finally there's proper support for panning and volume envelopes. This
is achieved by changing parameters of individual voices (one voice is
being created for each note). The new code also replaces the old
panning hacks which played notes on different channels and changed
panning of individual channels.

Closes #2010818.

(cherry picked from commit 4baf459da2)

stable-0.4 branch: forward-ported various trivial changes from master.
2009-08-05 17:38:50 +02:00
Tobias Doerffel
edf2d4d104 Whole code base: various cleanups, removed SINGLE_SOURCE_COMPILE relicts
* cleaned up code and improved coding style
* removed old SINGLE_SOURCE_COMPILE macro relicts
* use QString::toUtf8() instead of QString::toAscii() wherever possible

(cherry picked from commit 0bb54199b0)
2009-08-05 17:17:57 +02:00
Tobias Doerffel
cfe9c35f41 Sf2Player: allocate temporary buffer on stack if possible
When compiling with GCC always allocate a temporary buffer for
resampling on stack rather than doing an expensive heap allocation.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
(cherry picked from commit d1353247d9)
2009-07-05 16:43:03 +02:00
Tobias Doerffel
b46e711205 Sf2Player: truncated LOG440 constant
Having LOG440 as double with a mantissa of 51 digits doesn't help anything.
Truncated to float with 9 digits.
(cherry picked from commit 12fd3206b4)
2009-03-16 16:57:19 +01:00
Tobias Doerffel
fa6e5be636 update patch after loading settings (closes #2486372) (stable backport)
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/branches/lmms/stable-0.4@2024 0778d3d1-df1d-0410-868b-ea421aaaa00d
2009-02-12 23:25:49 +00:00
Tobias Doerffel
6f78e46035 fixed broken reference sharing (stable backport)
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/branches/lmms/stable-0.4@1831 0778d3d1-df1d-0410-868b-ea421aaaa00d
2008-11-04 20:04:14 +00:00
Tobias Doerffel
87ee43a079 made STRINGIFY_PLUGIN_NAME from embed.h a generic macro STRINGIFY in lmms_basics.h
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1784 0778d3d1-df1d-0410-868b-ea421aaaa00d
2008-10-19 21:48:57 +00:00
Tobias Doerffel
33c63d011c do not mess around with global static pointers for a single instance of patchesDialog - create a local object instead (closes #2139701)
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1772 0778d3d1-df1d-0410-868b-ea421aaaa00d
2008-10-18 14:59:27 +00:00
Tobias Doerffel
adf8aed93c removed obsolete instrument-parallelization support as this is handled much better by worker threads and adds unneccessary complexity
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1718 0778d3d1-df1d-0410-868b-ea421aaaa00d
2008-09-30 11:14:32 +00:00
Tobias Doerffel
63da74283c use notePlayHandle::getMidiVelocty() rather than notePlayHandle::getVolume() for allowing less bright sounds by decreasing instrument-track's volume (if soundfont supports it)
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1716 0778d3d1-df1d-0410-868b-ea421aaaa00d
2008-09-29 19:30:24 +00:00
Tobias Doerffel
778293b31e fixed compiler warnings
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1680 0778d3d1-df1d-0410-868b-ea421aaaa00d
2008-09-21 23:47:02 +00:00
Paul Giblock
74ac69ed1a Fix reference sharing in SF2 player
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1653 0778d3d1-df1d-0410-868b-ea421aaaa00d
2008-09-21 00:19:48 +00:00
Tobias Doerffel
6f0645c66b try to use relative paths for s_fonts map too as otherwise s_fonts.remove( m_filename ) won't do anything if a full path was inserted and m_filename was made relative - fixes crash when re-opening a soundfont which was shared before
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1625 0778d3d1-df1d-0410-868b-ea421aaaa00d
2008-09-17 09:52:51 +00:00
Paul Giblock
18873f7305 Add Portsmf MIDI importing to trunk
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1622 0778d3d1-df1d-0410-868b-ea421aaaa00d
2008-09-17 08:11:38 +00:00
Tobias Doerffel
da2fcf130a UI finetuning / recompression of some PNG-files
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1589 0778d3d1-df1d-0410-868b-ea421aaaa00d
2008-09-08 12:47:11 +00:00
Tobias Doerffel
fa1a9f4967 * rewrote the way plugins can handle certain filetypes
* rewrote various parts of file-browser to be less redundant and more stable (closes #2071891)



git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1582 0778d3d1-df1d-0410-868b-ea421aaaa00d
2008-09-07 22:38:23 +00:00
Tobias Doerffel
9b47d27f56 * improved concept for file types supported by certain plugins
* various small improvements for an even better ZynAddSubFX integration



git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1520 0778d3d1-df1d-0410-868b-ea421aaaa00d
2008-08-30 00:07:02 +00:00
Tobias Doerffel
025fa4ec8a fixed reverb/chorus after change of samplerate
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1444 0778d3d1-df1d-0410-868b-ea421aaaa00d
2008-08-19 17:29:10 +00:00
Tobias Doerffel
578323448f * query data from correct model when activating reverb (closes #2035134)
* convert from note-play-handle's volume to MIDI-velocity when calling fluid_synth_noteon()
* set fluidsynth's internal interpolation-method to high-quality when running LMMS in HQ-mode



git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1434 0778d3d1-df1d-0410-868b-ea421aaaa00d
2008-08-05 14:52:30 +00:00
Tobias Doerffel
81bfa8cdad * integrated patch by Csaba Hruska
* fixed spinbox-ranges



git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1423 0778d3d1-df1d-0410-868b-ea421aaaa00d
2008-08-01 16:14:29 +00:00
Tobias Doerffel
257e60ab37 reduced header-dependencies
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1406 0778d3d1-df1d-0410-868b-ea421aaaa00d
2008-07-28 21:39:08 +00:00
Tobias Doerffel
e637495489 migrated build-system to CMAKE
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1352 0778d3d1-df1d-0410-868b-ea421aaaa00d
2008-07-22 11:36:50 +00:00
Tobias Doerffel
cd2f51b05b fixed compiler warnings
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1325 0778d3d1-df1d-0410-868b-ea421aaaa00d
2008-07-18 10:08:37 +00:00