Commit Graph

957 Commits

Author SHA1 Message Date
Tobias Doerffel
5949f49e11 Add BB track when adding track to empty BB editor
When there's no BB track but a track is added to the BB editor,
automatically create a BB track so that the user doesn't get confused
by new empty track (not even showing clickable beats).

Partially closes #3149779.
(cherry picked from commit 4cad9517aa)
2011-01-23 23:58:17 +01:00
Tobias Doerffel
dc06302745 SongEditor: always bring up to front after loading a project
When just opening a song in order to listen to it, it's very annyoing to
manually bring up the song editor each time, therefore do it
automatically.
(cherry picked from commit 6be555d61a)
2011-01-05 15:20:26 +01:00
Tobias Doerffel
c296ca6ae3 AudioPortAudio: adapt to AudiBackend/AudioOutputContext API
Things have changed a bit for audio backend implementations in the
master branch. Therefore adapt AudioPortAudio to the new API.
2011-01-02 01:28:34 +01:00
Tobias Doerffel
7b68713008 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.
(cherry picked from commit a9717c0cc3)
2010-12-31 13:32:51 +01:00
Tobias Doerffel
be92c67b94 VST support layer: fixed non-working 64 bit VST plugins
LMMS' native Win64 VST host capabilities were broken due to wrong data
types in some places. On 32 bit there's no difference between a pointer
and an int but on x64 there is, therefore fix data types where
approriate. Makes 64 bit VST DLLs work in LMMS/Win64.
2010-12-23 23:50:50 +01:00
Tobias Doerffel
39cc1a8212 RemotePlugin: added support for running remote process multiple times
There might be situations where we want to try to run multiple different
remote processes. Therefore introduced RemotePlugin::init(...) which can
be called multiple times even if previous calls failed.
2010-12-23 22:22:01 +01:00
Tobias Doerffel
5143b6ad21 RemotePlugin: fixed compiler warning
Just a minor signed/unsigned int issue.
2010-12-23 22:21:14 +01:00
Tobias Doerffel
80a9f6c0de ResourceBrowser: integrated new ManageResourceLocationsDialog
Clicking the "Manage locations" button now opens an instance of the new
ManageResourceLocationsDialog.

Furthermore renamed ResourceBrowser::manageDirectories() to
ResourceBrowser::manageLocations().
2010-10-08 13:40:05 +02:00
Tobias Doerffel
654420d5f5 Added ManageResourceLocationsDialog
The ManageResourceLocationsDialog class provides a dialog for adding,
editing and removing resource locations.
2010-10-08 13:40:03 +02:00
Tobias Doerffel
903cf1f1e5 Added EditResourceLocationDialog
The EditResourceLocationDialog class provides a dialog for editing a
certain ResourceLocation.
2010-10-08 13:40:00 +02:00
Tobias Doerffel
4f1fbf9946 Added ResourceLocation class
The ResourceLocation class stores information about a location of
resources and creates according ResourceLocation instances.
2010-10-08 13:39:57 +02:00
Tobias Doerffel
59e472a7d9 Added UnknownResourceProvider class
The UnknownResourceProvider class is a dummy provider used as fallback
when an unknown ResourceProvider has been specified.
2010-10-08 13:38:43 +02:00
Tobias Doerffel
c05965117c 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.
2010-10-06 10:15:16 +02:00
Tobias Doerffel
1d5b62d61a 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.
2010-08-31 15:20:51 +02:00
Tobias Doerffel
b38eab0075 FxMixer: rewrote processing of FX channels
Rewrote the way FX channels (FX lines) are processed, i.e. the
calculation when to process which channel. This patch based on a patch
by Stefan Fendt but includes further improvements regarding
multithreading.
2010-08-30 17:32:19 +02:00
Tobias Doerffel
9b280ffb3e 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.
2010-08-16 20:21:18 +02:00
Tobias Doerffel
65311ef2b4 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.
2010-08-15 13:56:25 +02:00
Tobias Doerffel
311bc92bde 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.
2010-08-14 00:23:13 +02:00
Tobias Doerffel
114c1973e2 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:29:37 +02:00
Paul Giblock
4e9ebd09c6 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-11 21:40:54 -04:00
Paul Giblock
9f2640946e Use QProxyStyle support in DefaultStyle
The specializations to utilize different styles is a nice idea, but it
is hard to discover which styles a user may have installed.
Additionally, it would be impossible to override a system style.  This
patch implemnts ClassicStyle as a QProxyStyle.

This additionally fixes the missing dependency on toolbar_bg. Utilize
CSS now.
2010-08-07 18:35:49 -04:00
Tobias Doerffel
698f321e69 ResourceProvider+subclasses: added doxygen comments
Documented the whole ResourceProvider class and important parts of the
subclasses.
2010-08-07 00:07:54 +02:00
Tobias Doerffel
93681760d2 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.
2010-08-06 23:05:00 +02:00
Tobias Doerffel
68abd34908 AutomatableModelView/ContextMenu: option for unlinking all controls
Integrated patch by Rodrigo Rodrigues da Silva which adds an option
to all AutomatableModelView's context menu allowing to unlink all
linked controls.
2010-07-28 21:25:30 +02:00
Tobias Doerffel
9e42d4388e ClassicStyle: template-based derivation from native style
First attempts to get away from QPlastiqueStyle as the default style
and instead dynamically use an overloaded version of the native style.
Still needs lots of tuning, especially regarding colors.
2010-07-28 21:21:11 +02:00
Tobias Doerffel
206c30ff73 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:54:46 +02:00
Tobias Doerffel
31b099d74e 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:54:40 +02:00
Tobias Doerffel
b0822212b0 Merge branch 'remote-plugin-fixes'
* remote-plugin-fixes:
  RemotePlugin: sleep in waitForMessage() when actively waiting for data
  RemotePlugin: better code order in sendMessage() + cleanups
  RemotePlugin: coding style fixes + inline keyword reduces
  RemotePlugin: smaller buffers for number to string conversions
  RemotePlugin: added branch prediction hints
2010-07-26 15:52:14 +02:00
Tobias Doerffel
a55d71cf7f 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.
2010-07-25 19:27:27 +02:00
Tobias Doerffel
5f6c42f19c 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.
2010-05-21 13:27:04 +02:00
Tobias Doerffel
fe7d5e3d5a 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.
2010-05-21 13:25:10 +02:00
Tobias Doerffel
a9abdc3e75 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.
2010-05-21 13:19:24 +02:00
Tobias Doerffel
afba8a7ad4 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.
2010-05-21 13:19:15 +02:00
Tobias Doerffel
3fcb5b09ba FxMixer, FxMixerView: export class symbols
Due to the FxMixer improvements some plugins such as the FLP import
filter now directly access the FxMixer and its view. Therefore the
symbols of the FxMixer and FxMixerView classes need to be exported for
the win32 builds.
2010-05-17 23:22:30 +02:00
Tobias Doerffel
9c9bca7098 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.
2010-05-17 23:17:16 +02:00
Tobias Doerffel
9fd3dacb67 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.
2010-01-25 23:24:42 +01:00
Tobias Doerffel
81cea79c38 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.
2009-12-26 01:06:52 +01:00
Tobias Doerffel
ebf80bb8a3 Instrument: added Doxygen comments
Commented the whole Instrument class and converted the existing comments
to Doxygen style.
2009-12-26 00:54:33 +01:00
Tobias Doerffel
783913e79c RemotePlugin: sleep in waitForMessage() when actively waiting for data
RemotePlugin::waitForMessage() can operate in polling mode which is used
when loading a remote plugin so the master application does not block
until the remote plugin has been loaded. This is achieved by calling
QCoreApplication::processEvents().

However if there're no events to process, the polling loop will just eat
up CPU time which is especially bad when on a single core system.
This has been fixed by inserting short sleeps.
2009-12-14 11:10:30 +01:00
Tobias Doerffel
6abba395ca RemotePlugin: better code order in sendMessage() + cleanups
We can cache the number of data sets in the message in order to avoid
duplicate data::size() calls. Furthermore the accumulation of the size
of the written data is an old relict and can be safely removed.
2009-12-14 11:05:27 +01:00
Tobias Doerffel
7b410bb52d RemotePlugin: coding style fixes + inline keyword reduces
Fixed some minor coding style issues and removed some superfluous
"inline" keywords.
2009-12-14 10:58:14 +01:00
Tobias Doerffel
ab8f2ab7c7 RemotePlugin: smaller buffers for number to string conversions
There's no need for 128 bytes when converting a number to a string.
Use 64 bytes instead.
2009-12-14 10:50:21 +01:00
Tobias Doerffel
fa9aeeb3b1 RemotePlugin: added branch prediction hints
Added some branch prediction hints, especially to ShmFifo locking
functions.
2009-12-14 10:19:14 +01:00
Tobias Doerffel
bb57d53770 TrackContainer: fix Qt header includes
Always prefix Qt header includes with name of according module.
2009-12-14 09:28:42 +01:00
Tobias Doerffel
cef439b1ce AutomatableModel: made member variables private again
As of commit dd28a654b5 some member
variables were made protected without any actual requirement for it.
Revert the part of the commit.
2009-12-03 19:09:55 +01:00
Tobias Doerffel
0e82b0facc Merge branch 'master' into mixer-new-fifo-arch
Conflicts:
	include/Mixer.h
	src/core/Mixer.cpp
	src/core/audio/AudioPort.cpp
	src/core/main.cpp
2009-11-30 00:50:31 +01:00
Tobias Doerffel
294fa87475 Merge branch 'auto-save'
* auto-save:
  don't change the current project when auto-saving
  auto-saves every minute and recovers upon crash
  don't show WelcomeScreen when importing/loading

Conflicts:
	src/gui/MainWindow.cpp
2009-11-29 23:21:54 +01:00
Tobias Doerffel
03d3548ba1 ProjectRenderer: renamed OutputSettings to EncoderSettings + Doxygen comments
Renamed the ProjectRenderer::OutputSettings structure to
ProjectRenderer::EncoderSettings to better reflect its meaning.

Additionally added some basic Doxygen comments.
2009-11-29 15:37:04 +01:00
Tobias Doerffel
20589f19e4 Mixer: rewrote processing chain of rendered audio buffers
Until now, Mixer not only was responsible for rendering audio buffers
but also managed writing them to audio backend (through a FIFO) and
handled various quality related parameters.

All this functionality has been moved into the new AudioOutputContext
class. It glues together AudioBackend (formerly called AudioDevice),
global quality settings and the Mixer.

The AudioOutputContext class creates a FifoWriter which calls
Mixer::renderNextBuffer() and writes the output into the BufferFifo of
the AudioOutputContext it belongs to. The BufferFifo is read by the
according AudioBackend which belongs to the AudioOutputContext as well.

The AudioOutputContext also handles resampling in case the AudioBackend
wants the buffers in a different samplerate.

During this rewrite the Mixer class and the according source files have
been renamed from "mixer" to "Mixer". This results in small changes
all over LMMS' code base.
2009-11-29 01:46:23 +01:00
Tobias Doerffel
ced0d8ecc6 Merge branch 'master' into fx-mixer-rework 2009-11-26 01:47:38 +01:00