Commit Graph

2184 Commits

Author SHA1 Message Date
Tobias Doerffel
2240d6644d RemoteVstPlugin: encapsulate locking in separate inline functions
Locking the plugin is now achieved by calling RemoteVstPlugin::lock()
and RemoteVstPlugin::unlock().

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-07-09 12:31:59 +02:00
Tobias Doerffel
4f249400ac 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>
2009-07-09 12:10:33 +02:00
Tobias Doerffel
41c9318be8 RemoteVstPlugin: removed different threading models
Different threading models aren't used anymore as SplittedThreadingModel
after all recent improvements works fine for all plugins tested so far.
It even shows that a lot more VST plugins are running now properly.
Therefore all support for TraditionalThreadingModel has been removed
which greatly simplifies code and makes it much more maintainable.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-07-09 00:38:05 +02:00
Tobias Doerffel
dffd9ecfbe RemoteVstPlugin: prefer chunks over parameters for settings
When saving or restoring settings, prefer chunks over parameters.
This fixes some problems with plugins which get confused e.g. if you
restore individual parameters rather than the whole chunk.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-07-07 21:21:25 +02:00
Tobias Doerffel
1015868e1f TrackContentWidget: fix graphical glitches with Qt 4.5
Starting with Qt 4.5 there were minor graphical glitches in
TrackContentWidget. Fix this by not setting Qt::WA_OpaquePaintEvent
attribute.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-07-07 21:16:41 +02:00
Tobias Doerffel
d6a451bdf5 RemoteVstPlugin: define O_BINARY to 0 on Linux
O_BINARY flag is not supported on Linux, therefore define it to 0.
Fixes compilation failure on Linux.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-07-07 18:35:51 +02:00
Tobias Doerffel
48a3d4ebe4 RemoteVstPlugin: open file with O_BINARY when reading/writing chunks
When writing chunk to file or read it back from file, open file with
O_BINARY flag. Otherwise on win32 for example line endings (\n) are
converted (\r\n) and with real binary data this screws up things.

Thanks to Oleg Sharonov for pointing this out.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-07-07 17:05:31 +02:00
Tobias Doerffel
cf7539caaf PianoRoll: switch back to draw note after pasting notes
When pasing notes via Ctrl+V somehow the edit-tool was left in an
undefined state. Therefore explicitely switch back to draw mode so
user can move pasted notes (closes #2808607).

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-07-07 10:43:09 +02:00
Tobias Doerffel
0de2949aed ZynAddSubFX/FLTK: updated to SVN revision 6826
Updated FLTK to SVN revision 6826 of branch-1.3:

- Corrected const methods of Fl_Text_{Buffer|Display|Selection}
  to be declared const, corrected an Fl_Text_Buffer attrib. typo
- Fixed OpenGL shared context handling (STR #2135)
- Fixed gray-scale images with alpha channel (STR #2105)
- Fixed unexpected shortcut behavior for Win32 (STR #2199)
- Fixed documentation for Fl_Progress (STR #2209)

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-07-07 02:08:34 +02:00
Tobias Doerffel
ea376e90fe ZynAddSubFX: now build on OS X as well
Now that we fixed RemotePlugin support on OS X, we can enable build of
ZynAddSubFX on OS X. Some GUI threading issues still have to be solved
though.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-07-07 01:53:46 +02:00
Tobias Doerffel
2ef5dffec0 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>
2009-07-07 01:46:14 +02:00
Tobias Doerffel
fb58dc00ab InstrumentTrack: fixed muting of frozen patterns in BB tracks
In InstrumentTrack::play(...) the local variable "bb_track" always
was either undefined or NULL due to a lost call (probably during M/V
architecture switch) to bbTrack::findBBTrack(...). This could lead to
crashes and/or misbehaviour when playing frozen patterns in BB tracks.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-07-07 01:42:22 +02:00
Tobias Doerffel
913aa5a6e8 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>
2009-07-07 01:32:20 +02:00
Tobias Doerffel
5838f63d0b RemoteVstPlugin: print number of inputs/outputs as debugg message
When input/output count changes, always print new number of inputs and
outputs as debugg message.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-07-07 01:21:16 +02:00
Tobias Doerffel
33ce491caf RemotePlugin: added DEBUG_REMOTE_PLUGIN macro
Added new DEBUG_REMOTE_PLUGIN macro. If it is set, the process won't
be launched. Instead important information are printed allowing the
developer to run the process with according parameters in a debugger.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-07-07 01:01:00 +02:00
Tobias Doerffel
206d906c10 RemoteVstPlugin: reset m_inputs and m_outputs in updateInOutCount()
Reset m_inputs and m_outputs to NULL after deleting the memory they're
pointing to. Fixes possible crash if new input or output count is 0
and the count changes again later.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-07-07 00:45:26 +02:00
Tobias Doerffel
38f7552ce4 RemoteVstPlugin: workaround for early host callbacks by some plugins
Some plugins call host callback from within their main function,
causing RemoteVstPlugin::m_plugin not to be set yet. Therefore
explicitely set RemoteVstPlugin::m_plugin if it's NULL. Makes plugins
by Wallander Instruments (and possibly others as well) work.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-07-07 00:18:06 +02:00
Tobias Doerffel
e65b282166 RemoteVstPlugin: thread-safe plugin dispatching
Plugin dispatcher was called without any protection from various threads
leading to regular crashes or deadlocks within the plugin. The plugin
dispatching is now encapsulated into one central function which protects
the dispatcher by a mutex.

Furthermore improved handling of audioMasterIdle and
audioMasterUpdateDisplay in host callback by posting a message to GUI
thread asking for idle processing instead of directly calling plugin
dispatcher.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-07-06 12:39:47 +02:00
Tobias Doerffel
cca39513d0 RemoteVstPlugin: coding style fixes
Renamed class remoteVstPlugin to RemoteVstPlugin + other minor coding
style fixes.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-07-06 12:37:04 +02:00
Tobias Doerffel
db878b664d RemoteVstPlugin: fixed threading issues with saving/restoring chunks
Saving and restoring chunks from/to plugin seems to work now after a
few tweaks regarding memory-allocation and threading (according
functions need to be called from withing GUI thread). However needs the
new code some testing (especially whether it breaks previously working
plugins).

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-07-06 01:31:53 +02:00
Tobias Doerffel
9b5c0d19f8 RemoteVstPlugin: added more NULL checks
Check for m_plugin being NULL in RemoteVstPlugin::inputCount(),
RemoteVstPlugin::outputCount() and RemoteVstPlugin::pluginVersion().
Makes various VST's load properly now.

Thanks to Oleg Sharonov for pointing this out.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-07-06 01:09:56 +02:00
Tobias Doerffel
6a4297215d InstrumentTrack: fix crash in destructor with IPH-based instruments
Commit e3fa8762ef introduced a crash
in destructor of InstrumentTrack when using IPH based instruments.
Therefore explicitely remove all play handles after calling
silenceAllNotes().

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-07-05 16:53:50 +02:00
Tobias Doerffel
e3fa8762ef Mixer: selectively remove PlayHandles in removePlayHandles()
This commit allows finer control of which kind of PlayHandles get
removed in Mixer::removePlayHandles().

This is now used by InstrumentTrack which only removes NotePlayHandles
in InstrumentTrack::silenceAllNotes(). Fixes broken preview of resources
loaded by IPH-based instruments.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-07-05 16:38:58 +02:00
Tobias Doerffel
d1353247d9 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>
2009-07-05 16:33:49 +02:00
Tobias Doerffel
f4e94d4584 ResourceDB: added missing type name for PluginSpecificResource type
A type name for ResourceItem::PluginSpecificResource was missing in the
s_typeNames map. Therefore the type property of such resources was not
saved properly and had to be guessed each time at startup.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-07-05 16:33:43 +02:00
Tobias Doerffel
372ff79f96 Dropped ResourceItem type "TypeSoundFont"
Dropped separate ResourceItem type "TypeSoundFont" as theres no benefit
from distinguishing it from other plugin-specific files. Soundfonts now
are treated as TypePluginSpecificResource.

Furthermore some minor coding style cleanups.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-07-05 16:05:38 +02:00
Tobias Doerffel
bb933e7643 ResourceTreeModel: dynamic icons for plugin specific resources + caching
Added dynamic generation of icons for plugin specific resources by
drawing the logo of the according plugin onto an empty-sheet-icon.
After generation, cache the result so this expensive operation only
has to be done once.

Furthermore also cache pixmaps for individual ResourceItem types for
not having to load and scale pixmaps for each item.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-07-05 15:58:29 +02:00
Tobias Doerffel
09ff1bb9ed ResourceItem: always return name extension in lower case
Always return name extension in lower case so we can easily match it
somewhere else or use it as key for hash tables.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-07-05 15:58:23 +02:00
Paul Giblock
2a69917d51 Add Korean translation 2009-07-03 21:37:06 -04:00
Tobias Doerffel
f943df139e InstrumentView: added generic DnD support, renamed/splitted files
Added generic drag'n'drop support for all instrument views. All
resources supported by the according instrument now can be dropped
onto instrument view without any extra code in actual instrument.

Additionally renamed some files and classes related to InstrumentView
class to match new style.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-06-30 01:19:48 +02:00
Tobias Doerffel
65668f9489 ResourceBrowser: added management-buttons
Added two new buttons "Manage locations" and "Show piano". The first
one will open a resource location management dialog while the latter
one toggles visibility of the preview piano below.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-06-30 00:25:50 +02:00
Tobias Doerffel
9588e3dcce VeSTige: adapted to resource framework
Adapted VeSTige plugin to new resource framework support in plugin
base class.

Furthermore some coding style improvements.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-06-29 23:35:52 +02:00
Tobias Doerffel
01fc74939c Sf2Player: adapted to resource framework
Adapted Sf2Player plugin to new resource framework support in plugin
base class.

Furthermore some coding style improvements.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-06-29 23:30:12 +02:00
Tobias Doerffel
6ebe8df65a MidiImport: adapted to resource framework
Adapted MidiImport plugin to new resource framework support in plugin
base class. Files for PatMan or soundfonts for Sf2Player are now
relocated using resources framework.

Furthermore some coding style improvements.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-06-29 23:29:07 +02:00
Tobias Doerffel
ac4ef21ab7 ConfigManager/SetupDialog: preparations for resource framework migration
Some initial work on saving hash of default soundfont rather than a
filename. Doesn't work yet but will be improved with rewritten setup
dialog.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-06-29 23:24:10 +02:00
Tobias Doerffel
9701ed5c31 ZynAddSubFX: adapted to resource framework
Adapted ZynAddSubFX plugin to new resource framework support in plugin
base class.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-06-29 14:43:33 +02:00
Tobias Doerffel
40e6d26dbb Handle plugin-specific resources in TrackContainerView/ResourcePreviewer
Up to now plugin-specific resources (e.g. ZynAddSubFX presets) were
not previewed or loaded into a track container. This now works by
adding TypePluginSpecificResource to the according switch-block.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-06-29 14:43:33 +02:00
Tobias Doerffel
77a7db5d2e ResourceItem: dynamically register plugin-processed file types
Dynamically extend the map of file types by plugin-processed file types.
Furthermore renamed type TypePluginSpecificPreset to
TypePluginSpecificResource.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-06-29 14:43:08 +02:00
Tobias Doerffel
3507a44175 PatMan: adapted to resource framework
Adapted PatMan to new resource framework support in plugin
base class.

Furthermore some coding style improvements.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-06-29 13:26:34 +02:00
Tobias Doerffel
f4c2249d3a AudioFileProcessor: adapted to resource framework
Adapted AudioFileProcessor to new resource framework support in plugin
base class.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-06-29 13:24:45 +02:00
Tobias Doerffel
81721b6524 PresetPreviewPlayHandle: removed
Removed unused class PresetPreviewPlayHandle with all its sub- and
helper-classes. Lots of dirty code this way gets cleaned up/removed.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-06-29 13:16:11 +02:00
Tobias Doerffel
3c5c5f9cb3 FileBrowser: remove from LMMS
Remove deprecated FileBrowser from LMMS as everything is now managed by
ResourceBrowser. This will allow further removal of deprecated
technologies.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-06-29 12:58:10 +02:00
Tobias Doerffel
a4a6c14af0 Make use of new ResourceAction class
Replaced deprecated (duplicate) code for loading various kind of files
with ResourceAction-based code.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-06-29 12:53:33 +02:00
Tobias Doerffel
7821dd210e ResourceAction: new class for centralized functionality
Added new class ResourceAction which centralizes functionality of all
actions related to ResourceItems. This includes loading projects,
samples, presets, plugin-specific presets etc.

Using this new class we can avoid duplicate functionality in
ResourcePreviewer, ResourceBrowser, TrackContainerView, InstrumentTrack
etc.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-06-29 12:48:45 +02:00
Tobias Doerffel
d3cf731dc9 Plugin: initial integration of resource framework
Replaced deprecated Plugin::loadFile(QString) method by
Plugin::loadResource(ResourceItem), a future interface to be adapted
by invididual plugins.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-06-29 12:41:53 +02:00
Tobias Doerffel
3ca017e8fb ResourceItem: new method nameExtension(), new type ResourceItemList
Added new method ResourceItem::nameExtension() which returns the
extension of the name of an item (e.g. a filename extension such as
"wav" or similiar).

Added new type ResourceItemList, a QList of ResourceItem pointers.

Furthermore some coding style improvements.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-06-29 12:39:00 +02:00
Tobias Doerffel
fb5c974365 ResourceDB: new method matchItems(), renamed ItemList to ItemHashMap
Added new method ResourceDB::matchItems() which returns a list of item
which somehow match the given list of keywords.

Furthermore renamed ItemList to ItemHashMap to better reflect actual
container type.

Additionally some coding style improvements.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-06-29 12:38:19 +02:00
Tobias Doerffel
fd9d2b0e61 Do not build ZynAddSubFX on OS X
Do not build the ZynAddSubFX plugin on OS X until a proper replacement
for unnamed semaphores (which for whatever reason are not supported on
OS X) has been implemented. Using the win32 code (QSystemSemaphore)
could be an option but needs testing.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-06-28 23:42:38 +02:00
Tobias Doerffel
ed30985aa4 Various fixes for properly building on OS X
There were various (trivial) problems with settings of the build system
which prevented LMMS from being built on OS X.

Thanks to Daniel Klaffenbach for providing his Mac for development
purposes.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-06-28 23:42:38 +02:00
Tobias Doerffel
891b46fd65 ResourceItem: added copy constructor
Added copy constructor for ResourceItem class so one can easily
duplicate a ResourceItem.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-06-23 16:38:04 +02:00