Commit Graph

713 Commits

Author SHA1 Message Date
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
65a0313807 Merge branch 'win64-vst'
* 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)
2010-12-26 11:25:54 +01:00
Tobias Doerffel
60d302d09e InstrumentTrackView: use QMdiArea's window activation history
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)
2010-10-06 10:17:48 +02:00
Tobias Doerffel
3ae2b40eec InstrumentTrackView: added one-window-mode + global piano focus
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)
2010-10-05 11:25:43 +02:00
Tobias Doerffel
611a36e56b MidiEvent: added read method for type property
Even if the type property of the MidiEvent class is still public, there
should be a method for reading it.
(cherry picked from commit 1d5b62d61a)
2010-08-31 16:41:16 +02:00
Tobias Doerffel
89eae05a16 Renamed all automation related files and classes to match new coding style
All automation-related files and classes have been renamed to match the
new coding style.
(cherry picked from commit 9b280ffb3e)
2010-08-16 23:40:33 +02:00
Tobias Doerffel
cd08109847 InstrumentTrack: do not try to load "libconnection.so" in compat code
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)
2010-08-15 14:00:11 +02:00
Tobias Doerffel
6a99bb11af SampleTrack: fixed non-functional solo and mute buttons
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)
2010-08-14 00:26:34 +02:00
Tobias Doerffel
0770bda441 Renamed PATH_SEPARATOR to LADSPA_PATH_SEPARATOR and fixed it
Commit 4e9ebd09c6 introduced PATH_SEPARATOR
but with wrong syntax. Fixed this and renamed it to LADSPA_PATH_SEPARATOR.
2010-08-12 10:30:59 +02:00
Paul Giblock
09b5bc906e Use proper path seperator for LADSPA_PATH
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.
2010-08-12 09:12:04 +02:00
Tobias Doerffel
2b73083100 AudioJack: do not use QVector in processCallback()
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)
2010-07-26 15:59:32 +02:00
Tobias Doerffel
2ba532bf30 AudioJack: more optional code for AudioPort support
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)
2010-07-26 15:59:27 +02:00
Tobias Doerffel
8561c3cc09 RemotePlugin: use debugMessages() instead of fprintf for error messages
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)
2010-07-25 19:27:58 +02:00
Tobias Doerffel
908a917021 EnvelopeAndLfoParameters: moved global instances management into helper class
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)
2010-05-21 14:14:00 +02:00
Tobias Doerffel
488337f6eb Engine: introduced deleteHelper() function
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)
2010-05-21 14:13:11 +02:00
Tobias Doerffel
95b0c827d1 InlineAutomation: delete attached AutomationPattern immediately
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)
2010-05-21 14:11:55 +02:00
Tobias Doerffel
aa992e8e1b AutomationEditor: thread-safe handling of AutomationPattern pointer
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)
2010-05-21 14:11:32 +02:00
Tobias Doerffel
48bbfad53d EffectControl: store visibility information of attached EffectView
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)
2010-05-17 23:36:46 +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
3348a4378f Base64: realize decode() as template function
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)
2009-12-26 01:09:56 +01:00
Tobias Doerffel
275eb7ac2b TrackContainer: fix Qt header includes
Always prefix Qt header includes with name of according module.
(cherry picked from commit bb57d53770)
2009-12-14 09:37:00 +01:00
Tobias Doerffel
d7ae99a5e8 TrackContentWidget: fixed background tile pixmap updating
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().
2009-12-07 01:38:17 +01:00
Tobias Doerffel
5309e7a374 AudioPulseAudio: fixed improper shutdown + free allocated resources
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)
2009-11-20 22:36:06 +01:00
Tobias Doerffel
1eb4c31607 SideBar: rewritten to use QToolBar instead of KMultiTabBar
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)
2009-10-31 13:38:17 +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
18a8ffc674 RemotePlugin: do not skip audio processing when debugging
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)
2009-08-29 00:09:57 +02:00
Tobias Doerffel
5ba1340ed0 Plugin: typedef DescriptorList + more const improvements
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)
2009-08-29 00:07:05 +02:00
Tobias Doerffel
ba4296136b Plugin::Descriptor::SubPluginFeatures: made some methods const
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)
2009-08-29 00:02:55 +02:00
Tobias Doerffel
c2f9fcd14f Plugin::Descriptor: renamed sub_plugin_features to subPluginFeatures
Renamed field sub_plugin_features to subPluginFeatures in
Plugin::Descriptor struct.
(cherry picked from commit e8c3c21f7f)
2009-08-29 00:02:47 +02:00
Tobias Doerffel
fc72b1a6a4 EffectSelectDialog: rewritten using Designer
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)
2009-08-29 00:02:20 +02:00
Tobias Doerffel
c32567ce2f Fixed mistakes made by sed-mass-replaces
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)
2009-08-29 00:01:24 +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
0503f5353f ControllerConnectionDialog: improved auto detect feature for controllers
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)
2009-08-14 15:38:05 +02:00
Tobias Doerffel
e2b1b5de60 MidiEvent: allow querying name of port which it came from
Added functionality to query the name of the source port of a MidiEvent
by calling MidiClient::sourcePortName( const MidiEvent & ).
(cherry picked from commit 5ec96a9483)
2009-08-14 15:37:57 +02:00
Tobias Doerffel
14930d0446 RemotePlugin: added missing include + coding style fixes
The header cstdlib is required for NULL pointer definition. Additionally
some minor coding style fixes.
(cherry picked from commit 2475cf982b)
2009-08-14 15:37:48 +02:00
Tobias Doerffel
a77688ee65 MidiWinMM: fixed typo that caused writablePorts() not being overloaded
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)
2009-08-14 15:37:36 +02:00
Tobias Doerffel
b8ebfbd06a Renamed MIDI and audio related classes/files to match new style
Renamed all MIDI and audio related classes/files to match new style.
Additionally various cleanups.
2009-08-13 00:52:21 +02:00
Paul Giblock
5138ed6722 Rename all Controller-family classes to new style
Adjust capitialization on all Controller-related classes to new
standards and update all calling code
(cherry picked from commit f1d60958f0)
2009-08-09 00:29:16 +02:00
Paul Giblock
e109f3e550 Make Controller-Rack resizable
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)
2009-08-08 10:30:10 +02:00
Tobias Doerffel
852976ed74 Panning: fixed wrong type-conversion in panningToMidi()
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)
2009-08-05 17:19:53 +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
42b1584cbe RemotePlugin: added QSTR_TO_STDSTR macro and use it in LVSL/ZASF
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)
2009-07-29 17:13:47 +02:00
Tobias Doerffel
54dadfcf48 MidiTime/Pattern: fixed divisions by zero with time sigs 1/16+
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)
2009-07-10 17:50:55 +02:00
Tobias Doerffel
91912e143a MidiPort: added realOutputChannel() returning zero-based MIDI channel
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)
2009-07-09 12:54:14 +02:00
Tobias Doerffel
f50d5ce943 RemotePlugin: refactored system feature configuration
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)
2009-07-07 01:59:14 +02:00
Tobias Doerffel
fb56b6757d Track.h: removed unused class declaration "bbTrack"
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)
2009-07-07 01:58:54 +02:00
Tobias Doerffel
33917e4340 RemoteVstPlugin: coding style fixes
Renamed class remoteVstPlugin to RemoteVstPlugin + other minor coding
style fixes.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
(cherry picked from commit cca39513d0)
2009-07-07 01:57:32 +02:00
Tobias Doerffel
c222c062c5 PianoRoll: fixed crash with detune tool
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)
2009-06-18 23:33:21 +02:00
Tobias Doerffel
7a632277b8 Renamed type noteVector to NoteVector
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)
2009-06-18 23:32:32 +02:00