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.
* win64-vst:
VST support layer: fixed non-working 64 bit VST plugins
VST support layer: added 32 bit VST plugin support for Win64
Win64Toolchain: added 32 bit compiler configuration
ZynAddSubFX: use new RemotePlugin::init() method
RemotePlugin: added support for running remote process multiple times
(cherry picked from commit 65c073ec63)
There's no need to implement an own (buggy) window activation history
for InstrumentTrackWindows. Use QMdiArea::subWindowList(...) instead.
Fixes buggy keyboard focus when switching between InstrumentTrackWindows.
(cherry picked from commit c05965117c)
Added a one-window-mode which allows to have only one instrument track
window open at a time. The content of this window is replaced each time
you open a different track.
Furthermore added global reception and forwarding of key events to the
piano widget of the top-most instrument track window. This for example
enables the user to play test sounds while tweaking some effects in a
different subwindow.
(cherry picked from commit 93681760d2)
In compat code of InstrumentTrack::loadTrackSpecificSettings() also
check for nodeName being equal to ControllerConnection::classNodeName().
This avoids trying to load the non-existing instrument "connection".
In master branch this has been fixed ugly in commit 22c877d4 before,
however implement a cleaner solution which is also suitable for
backporting.
Closes#3021259.
(cherry picked from commit 65311ef2b4)
The SampleTrackView did not explicitely have a SampleTrack model
attached and thus trackView::modelChanged() was not called. This way
SampleTrackView's mute and solo buttons were not connected to the
according models of the SampleTrack model. Fix this by calling
setModel() in SampleTrackView::SampleTrackView() (as done in
constructors of other track types too) and overload the
SampleTrackView::modelChanged() method.
Closes#3043836.
(cherry picked from commit 311bc92bde)
According to http://www.ladspa.org/ladspa_sdk/shared_plugins.html,
LADSPA_PATH is supposed to be delimited by colons. This patch does so,
except on Windows. On Windows we use ';' instead of ':' since colon is
a legal character for a path.
Using QVector involves calls to malloc & friends which are not RT safe
and thus must not be used in AudioJack::processCallback(). Instead
allocate the required array upon initialization.
(cherry picked from commit ae7a4e4c2f13432d39b13c25b66231bdd6a1cc65)
There's been some more code that is only required if AUDIO_PORT_SUPPORT
is set. Added according #ifdefs and fixed a typo in AudioPort support
code.
(cherry picked from commit e98726ae992c77fb2dfdb6668319b5521ff8aaef)
Printing error messages using fprintf() does not help much with
RemotePlugins as their stdout/stderr usually is not redirected to the
parent process. Instead use the debugMessage() function.
(cherry picked from commit a55d71cf7f)
It's a bad style to manage global instances of an object in the object
itself. Therefore introduced a nested helper class which manages all
instances of EnvelopeAndLfoParameters globally. It is now responsible
for global reset/triggers of LFOs. In contrast to previous state, this
is now done thread-safe. Fixes crashes for example while importing
MIDI files.
(cherry picked from commit 5f6c42f19c)
The new deleteHelper() template function takes a pointer, saves it
to a temporary, sets the passed pointer to NULL and then deletes the
object it was referring to before. This way we can spot bugs caused by
undesired references to global objects at shutdown more easily.
(cherry picked from commit fe7d5e3d5a)
It was not safe to immediately delete the AutomationPattern attached to
an InlineAutomation object before commit "InlineAutomation: delete
attached AutomationPattern immediately" as the AutomationPattern
destructor sometimes fiddles around with AutomationEditor (GUI!).
However this has changed now and this enables us to delete the
AutomationPattern immediately. This fixes some random crashes with
scheduling AutomationPatterns for later deletion.
Closes#2982696.
(cherry picked from commit a9abdc3e75)
It was not possible to call any of the functions of AutomationEditor
from threads other than the main GUI thread as the m_pattern pointer
was not protected by a mutex. It is however desired to be able to call
for example AutomationEditor::setCurrentPattern(...) from different
threads (mainly required when deleting AutomationPatterns in other
threads). Thus made this method and all accesses to the m_pattern
pointer thread-safe.
(cherry picked from commit afba8a7ad4)
For some effects it is helpful to know whether their attached EffectView
is visible or not. This mainly concerns effects that actually do not
touch the sound data but analyze it and display the results.
(cherry picked from commit 9c9bca7098)
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)
In Base64::decode() we mess around with pointers so it's more type-safe
to realize everything as a template function. This also silences compiler
warning about dereferencing type-punned pointer in Vibed plugin.
(cherry picked from commit 81cea79c38)
The background tile pixmap used to draw the background of
TrackContentWidgets was only updated on size changes but not on
changes of zoom level in according editor. Fix this by updating
background pixmaps in trackContainerView::setPixelsPerTact().
There have been some problems with the threading logic in the
AudioPulseAudio backend resulting in an endless loop when quitting LMMS.
Furthermore allocated PulseAudio resources were not freed properly.
Thanks to Armin Kazmi <armin.kazmi@tu-dortmund.de> for pointing out
this issue.
(cherry picked from commit 168805745e)
Rewrote implementation of class SideBar to use QToolBar instead of
KMultiTabBar. We can style the SideBar now easily via CSS and do not
have to ship 3rd party KDE code with LMMS. Also the QToolBar based
SideBar integrates much better into the according widget style.
Furthermore renamed SideBar related classes and files to match new
coding style.
(cherry picked from commit 822a22ca37)
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)
If DEBUG_REMOTE_PLUGIN was set, RemotePlugin::process() always returned
as RemotePlugin::isRunning() returned false. Fix this by always
returning true when debugging.
(cherry picked from commit ee63a13f2d)
Instead of writing QVector<Plugin::Descriptor> everywhere, mix up
iterators etc. centrally define Plugin::DescriptorList and use it
everywhere.
Additionally made pointers to Plugin::Descriptor and
Plugin::Descriptor::SubPluginFeatures::Key const in various places
so we can use ConstIterator everywhere when iterating through
Plugin::DescriptorList.
(cherry picked from commit 2287eca802)
We can safely make fillDescriptionWidget() and listSubPluginKeys()
const methods. Furthermore descriptor pointer to listSubPluginKeys()
can be const as well. Might allow more optimizations by the compiler.
(cherry picked from commit 1c76c77d22)
All of the GUI code of EffectSelectDialog has been replaced by an
according UI file. Also merged EffectListWidget class into
EffectSelectDialog to further simplify logic.
(cherry picked from commit cb85bfc906)
Some variables got renamed the way the shouldn't. Doesn't have any
functional impact but fix it for the sake of cosmetics.
(cherry picked from commit d7365e4cf3)
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)
When opening up the ControllerConnectionDialog by default auto detect
is enabled and all MIDI input devices are selected. Upon the first
event all devices but the one the event came from get unchecked. This
eases the process of assigning MIDI controls to software controls.
(cherry picked from commit 27f5d20e05)
Added functionality to query the name of the source port of a MidiEvent
by calling MidiClient::sourcePortName( const MidiEvent & ).
(cherry picked from commit 5ec96a9483)
The MidiClient::writablePorts() method was not overloaded properly in
MidiWinMM implementation due to a typo. This should fix list of output
devices being empty on win32.
(cherry picked from commit 40c56de898)
Per request, make the Controller-rack vertically sizable. This is also
part of our effort to slowly deprecate old fixed-positioning code in
favor of layouts.
(cherry picked from commit bb76ba5121)
Casting to panning_t in calculation in panningToMidi() leads to
integer overflows and thus to miscalculations. This resulted for
example in wrong panning during note preview when editing panning
of a note in PianoRoll. Casting to int instead fixes the issue.
(cherry picked from commit 6e3e1513c7)
* 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)
QString::toStdString() is not aware of locale specific characters (it
just converts to ASCII). Therefore added new macro QSTR_TO_STDSTR which
converts a QString to std::string with UTF8 characters.
Use this new macro in LMMS VST Support Layer and ZynAddSubFX plugin.
This fixes for example VST plugins not being loaded when the path to
the DLL contains non-ASCII (e.g. cyrillic) characters.
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
(cherry picked from commit f3e13c4427)
Setting time signatures 1/16+ lead to divisions by zero in two places.
Fixed this by adding according qMax() call (closes#2818125).
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
(cherry picked from commit cb72bf2260)
MidiPort::outputChannelModel is ranged from 1 to 16 for displaying
user-friendly values. However internally MIDI channels are ranged from
0 to 15. Therefore added realOutputChannel() which returns zero-based
MIDI channel which should be used everywhere except for the GUI.
Fixes MIDI events being sent to VST plugins on channel 2 instead of
channel 1. Makes some more VST plugins actually usable.
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
(cherry picked from commit 4f249400ac)
Variuos features (native/Qt semaphores/shared memory) are now
configured by macros like USE_QT_SHMEM and USE_QT_SEMAPHORES. This
allows central and individual configuration of features according to
the platform to build for at the beginning of the file.
Finally makes RemotePlugin work on OS X by not using native semaphores
rather than QSystemSemaphore's.
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
(cherry picked from commit 2ef5dffec0)
The class forward declaration for "bbTrack" is neither used nor
required, therefore remove it.
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
(cherry picked from commit 913aa5a6e8)
Renamed class remoteVstPlugin to RemoteVstPlugin + other minor coding
style fixes.
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
(cherry picked from commit cca39513d0)
When clicking at an invalid position with the detune tool, LMMS could
crash as an invalid iterator was referenced (closes#2808589).
Furthermore renamed PianoRoll::ModeOpen to PianoRoll::ModeEditDetuning.
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
(cherry picked from commit 9ca93040de)
Renamed type noteVector to NoteVector as well as ::iterator to
::Iterator and ::const_iterator to ::ConstIterator.
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
(cherry picked from commit e12476f79c)