Compare commits

...

110 Commits

Author SHA1 Message Date
Tobias Doerffel
92ce4ad3da Made 0.4.14 release
Bumped version number to 0.4.14 in CMakeLists.txt, README and lmms.rc.in.
2013-02-27 22:29:42 +01:00
Tobias Doerffel
8bc7f8ce54 Updated chord and scale icon based on new note icons 2013-02-27 22:29:06 +01:00
Tobias Doerffel
fe35743ef0 Default theme: new graphics for note icons
Thanks to John Serafino <lzrblade/at/gmail/dot/com> for the creative work.
2013-02-27 22:13:52 +01:00
Tobias Doerffel
9268398626 AboutDialog: updated copyright year 2013-02-27 21:48:49 +01:00
NoiseByNorthwest
2375b7f0a0 Fixes #3604316: LMMS crashes using AudioFileProcessor
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2013-02-27 17:30:40 +01:00
Mike Choi
50c2242caa VST sync patch: compatibility fix for 64bit builds
It seems 64bit builds for some reason have problems with VST Sync feature on,
workaround seems to be converting VST sync patch from double to floats,
which does work both with 32 and 64bit builds. Double precision
seems to produce odd numbers with 64bit build. (tested on VirtualBox Linux
Mint 14.1 64 bit OS)
(cherry picked from commit 011f87e6e60cccd16f3783e9c4885e03d95c1e56)

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2013-02-27 17:29:00 +01:00
Mike Choi
0b39426953 VST Effects: Open each effect only once, when loaded from project file
Folowing change should ensure VST effect is opened just once, once
loaded from project file.

Double opening seems to trace back to commit 184ddc4d1c
from 2006, when this VST effect save / load feature was introduced as new.

Anyway VST effect parameters seems to load corectly in
VstEffectControls::loadSettings, from project file even without double
VST effect opening.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2013-02-09 12:35:01 +01:00
Mike Choi
7084ec0be6 VST Effects: preserve effect name after LMMS project reload
This patch will set plugin name (information which is not stored with lmms
project file) according plugin file, without *.dll, when is LMMS project
loaded from the file.

Future verion could maybe use PluginBrowser or EffectSellectDialog for the
same.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2013-02-09 12:34:53 +01:00
Mike Choi
0ef2997ece VST to host sync
This patch should bring VST to host synchronization for LMMS.
 (e.g. for plugins like dBlue Glitch, TAL Filters).

Synchronization is done via shared memory, missing song time
positions are reccalculated and added to PPQ position sync values
(SHM - common input interface for sync of all VST plugins)
2013-02-09 12:33:22 +01:00
Tobias Doerffel
7682bc6ef9 Song: added h2song file extension to file import dialog
After we added the HydrogenImport plugin we should also change the
file import dialog such that the user can chose h2song files.
2013-02-09 12:29:45 +01:00
Frank Mather
0acfff036f Added HydrogenImport plugin
This is a new plugin that imports hydrogen drum machine songs.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2013-02-09 12:29:34 +01:00
Tobias Doerffel
26625b137f InstrumentTrack: do not evaluate realOutputChannel() for the time being
When deciding whether to forward a MIDI event directly to the instrument
plugin do not evaluate realOutputChannel() for the time being as it is
ranged from 0 to 15 and has no don't-care-state like the input channel.

This is a workaround - we need a better solution here.
2013-01-23 23:26:23 +01:00
Tobias Doerffel
a3abcdb2e0 InstrumentTrack: directly forward MIDI events under special circumstances
In the special case that a MIDI event comes from a MIDI port, the
instrument is MIDI based (VST plugin, Sf2Player etc.) and the user did
not set dedicated MIDI output channel, directly forward the MIDI event
to the instrument plugin so properties such as MIDI channels are kept.

Based on patch by nuio <numa_shsk/at/mail/dot/goo/dot/ne/dot/jp>, 2013-01-20
2013-01-23 23:12:04 +01:00
Tobias Doerffel
2327581da7 MidiPort: coding style fixes 2013-01-23 23:11:47 +01:00
Tobias Doerffel
8a6aecfbdc MidiPort: set fromMidiPort-flag of MidiEvent instances
This completes the functionality introduced with commit
edf93d04cb.

Based on patch by nuio <numa_shsk/at/mail/dot/goo/dot/ne/dot/jp>, 2013-01-20
2013-01-23 23:10:13 +01:00
Tobias Doerffel
edf93d04cb Midi: added new property fromMidiPort
This new property is going to signal whether a specific event comes from
a MIDI port is was generated internally.

Based on patch by nuio <numa_shsk/at/mail/dot/goo/dot/ne/dot/jp>, 2013-01-20
2013-01-23 23:08:03 +01:00
Mike Choi
c1a2c6b1fa VST effects: secure master channel freezing
Master channel keeps freezing, when VST effects are placed directly
into Master channels FxChain, on slower computers.

Provided solution prolongs VST initialisation phase, by waiting on two extra messages,
which usually follows initialisation and are possibly not yet implemented well.

IdSampleRateInformation,
IdBufferSizeInformation

This seems to prevent Master channel freezes e.g. on VST effects like Tiny-Q.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2013-01-23 22:46:16 +01:00
Mike Choi
32e9ddc6e4 VST effect control window re-design
New outlook for VST effect control window

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2013-01-23 22:45:20 +01:00
Mike Choi
1c9c76f399 VST GUI fixes, improvements
Various fixes improvements:

+ Added support for VST parameters control for windows.
+ New `Close` button for VST parameter controls.
+ Faster GUI for all instruments, effects-loading, not only VSTs,
  and both one-instrument track window mode and normal window
  mode should be supported.
+ Better integration for VST GUIs on Linux, e.g. plugin window
  should not stay always on top of other windows.
+ VST GUI overlook should remain same with different wine setups
  ( except for whole virtual desktops emulations ).
+ VST effect control window merged with VST effect editor window
  should be more easier to control.
+ Little corections at effectviews model updates of instrument
  tracks effect chains.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2013-01-16 23:52:04 +01: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
071358bd98 PixmapButton: added parentheses to fix ambiguity
Fixes compiler warning.
2013-01-14 23:06:02 +01:00
Tobias Doerffel
d943182a6c ZynAddSubFX: increased polyphony to 128
It occured to me that ZASF reported polyphony overflows when using it
in combination with LMMS' arpeggio and chord functionality.
2013-01-13 19:07:12 +01:00
Mike Choi
b784d3daf0 VST Effects: fix for uncontrollable plugin window
Supposed fix for 3595560, see also
http://sourceforge.net/apps/phpbb/lmms/viewtopic.php?f=7&t=778
http://sourceforge.net/tracker/?func=detail&aid=3595560&group_id=105168&atid=640434

VST effects pluginWidget is not deleted, when we close General Settings of instrument track,
on which are directly attached VST effects, but only when we remove this VST effects or tracks itself.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2013-01-13 18:56:47 +01:00
Tobias Doerffel
99efe8aef3 LocalZynAddSubFx: include/forward MIDI channel information
When sending MIDI events to the ZynAddSubFX engine do not statically
send them on channel 0 but on the MIDI channel which is set as output
MIDI channel of the instrument track. This adds some flexibility when
it comes to multipart ZynAddSubFX presets which are connected to
different MIDI channels.
2013-01-13 18:48:35 +01:00
Tobias Doerffel
6940ceca44 InstrumentFunctions: added natural minor scale
A natural minor scale was missing which lead to some irritations about
the harmonic and melodic minor scales. Had to add the new scale at the
end of the chord table in order to not break existing projects and
presets in which simple chord table indices are saved.

Closes #3594824.
2013-01-13 18:13:18 +01:00
Tobias Doerffel
4a1642abc7 InstrumentFunctions/ChordCreator: fixed wrong 6add9 chord
Various seventh chords were wrong and have been fixed.

Thanks to Mike804 for pointing out issues with some chords.

Closes #3600618.
2013-01-13 17:45:51 +01:00
Tobias Doerffel
1a981f50c8 InstrumentFunctions/ChordCreator: fixed wrong 6add9 chord
The 6add9 played a normal major chord which is wrong and has been fixed.

Thanks to Mike804 for reporting this bug.

Closes #3600618.
2013-01-13 16:57:35 +01:00
Tobias Doerffel
128d94b261 German localization: fixed wrong chord name translation
The chord name 6add9 should stay 6add9.
2013-01-13 16:56:49 +01:00
Tobias Doerffel
27e2b5e4ea BbTrack: fixed openInBBEditor() to reliably show the BB Editor
Use the function provided by MainWindow to reliably show the BB Editor.

Thanks to Tres Finocchiaro for pointing out this issue.
2013-01-07 22:07:52 +01:00
Tobias Doerffel
e3e2e48b71 MainWindow: pass optional parameter to toggleWindow() to force showing window
There are use cases where we want to force to show a certain window.
2013-01-07 22:06:37 +01:00
Raine M. Ekman
9ec7613678 InstrumentTrack: Add support for more MIDI commands
MIDI commands All Notes Off, All Sound Off and Omni/Mono/Poly mode will
now silence all playing notes, as they should.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2013-01-07 21:14:04 +01:00
Raine M. Ekman
174037c31a ExportProjectDialog: fix static file extension on multitrack export
When using the multitrack export feature the output files always had
the extension ".wav", even if exported as OGG. This patch fixes this
issue.

Closes #3595157.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2013-01-07 20:28:15 +01:00
Tobias Doerffel
59300906d7 AutomationEditor: fixed drawing of empty automation patterns
Due to recent changes to AutomationPattern the inner draw loop needs
to be adjusted.
2013-01-07 00:36:43 +01:00
Tobias Doerffel
80106138c8 AutomationPattern: removed magic value at position zero
In automation patterns there always had to be a value at position zero
which also had a special semantic concerning the initial values of
connected objects. However that logic was buggy and confusing.
I therefore completely removed the neccessity for a value at position
zero (automated value will be 0 until the first set point).
2013-01-07 00:36:27 +01:00
Tobias Doerffel
99091e9ce3 AutomatableModelView: added context menu action for removing song-global automation
Up to now there was no possibility to remove song-global automation from
a control once created. Overcome this issue by adding an according action
in the context menu of all AutomatableModelView instances.
2013-01-06 23:42:33 +01:00
Tobias Doerffel
1612a25349 ExportProjectDialog: fixed broken cancel button
The cancel button functionality was lost during introduction of the
multi track export functionality.

Closes #3598342.
2013-01-06 23:13:59 +01:00
Mike Choi
b9c926dabd VST parametr control window: window title as trackname
Window title for VSTi parameter controlling window should be set according to
actual track name, not from VST plugin name as its now, it is hard to get to know
which window belongs to where when same plugin is e.g. opened several times, so
with the same name. Now this is handled in paint event, but TBD whenever is
that track name changed. tbd, temporary solution.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2013-01-06 23:02:08 +01:00
Mike Choi
f4cc037321 VST Control: Right window title for parameter manual edit
When you double-click on some knob to change its VST parameter value
manually, new dialog window now has same title as what was that knobs
name. (instead of "lmms" title string)

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2013-01-06 23:01:52 +01:00
Mike Choi
5b6fa164e7 VST Automation: Filter for automated parameters
Filter to display only automated / all knobs (new button) on LMMS VST parametr control window.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2013-01-06 23:01:27 +01:00
Mike Choi
ba03b70457 State of VST controls in LMMS control wrapper is reloaded after Save/Load, from plugins state
After project save/load unsaved VST control parameters in LMMS VST control wrapper are not set to zero now, but reloaded according plugins saved state.

No need to sync values manualy again, after project save, load.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2013-01-06 23:01:13 +01:00
Mike Choi
e8bdc7b3c1 VST Automation: Sync button fix
Only not automated values are synced from VST plugin, no need to sync already automated values.

Synced values are now not trackable with undo / redo, before all changes were tracked individualy,
but user could lose ability to undo easily changes before sync buton was pressed.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2013-01-06 22:59:47 +01:00
Mike Choi
c2e9918c8a VST Automation: crash prevention
Fixed destuctors for various types of VST automation panel removal.

Automated signals correct disconection on panel removal.

When you load new VST plugin in the place of old one, while automation
is already connected and active there, this should not result in LMMS crash
or reuse of that old automation connections and automation window destructor
should not leave zombie VST plugins on application exit.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2013-01-06 22:59:40 +01:00
Mike Choi
3cc01560be VST Automation: lock prevention
src/core/RemotePlugin.cpp @ RemotePlugin::process

Above function should be now more thread safe, but functionality remains.
This prevent lmms locks, when automation is connected to lmms VST plugin wrappers controler / knob on Linux.
On win32 build whenever is lmms wrapper parameter controler / knob  amended.

plugins/vst_base/VstPlugin.cpp @ VstPlugin::setParam
plugins/vst_base/RemoteVstPlugin.cpp @ RemoteVstPlugin::processMessage

In above functions we dont wait for message confirmation when parameter setter function finish, and dont send such confirmations.
This workaround prevent locks on Linux, whenever there is automation connected and if you try to move with VST plugin
(not via lmms plugins wrapper, but with VSTs internal window) than it freezes, on win32 build it will freeze whenever you connect
automation and than if you move your mouse above this VST plugin window.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2013-01-06 22:57:45 +01:00
NoiseByNorthwest
2960f67beb AudioFileProcessor: fixed crash for samples with zero length
This is a fix for #3598536.

Closes #3598536.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2013-01-06 22:53:59 +01:00
Tobias Doerffel
716146848c ZynAddSubFx: when loading a preset set preset name as track name
Based upon the suggestion of Tres Finocchiaro we use the filename of a
ZASF preset for determining the preset name and set it as track name.
2013-01-06 22:48:41 +01:00
Tobias Doerffel
dcf7245fe8 Presets: fixed track names to reflect actual preset names
Thanks to Tres Finocchiaro for pointing out this issue and many thanks
to Mike Choi for providing a helper script for automatically fixing
the preset files.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2013-01-06 22:41:19 +01:00
Tobias Doerffel
70304f9800 Release candidate 1 for 0.4.14
Bumped version number to 0.4.14-rc1 in CMakeLists.txt.
2012-12-10 21:28:25 +01:00
Tobias Doerffel
639763dbb2 FxMixerView: do not set size constraint on parent MDI window
As reported by Mikobuntu on 2012-12-06 there's a problem when minimizing
the FX mixer window. The problem disappears when not setting a size
constraint on the mixer's MDI window.
2012-12-09 17:29:14 +01:00
Tobias Doerffel
c27c321778 RemotePlugin: increased SHM_FIFO_SIZE again
As there are plugins whose parameter dumps are bigger than 64 KB
increased SHM_FIFO_SIZE to 512 KB.
2012-12-09 17:25:59 +01:00
Tobias Doerffel
60017ae6e3 RemoteVstPlugin: decreased locking overhead in getParameterDump() 2012-12-03 00:07:56 +01:00
Tobias Doerffel
890a8a4ba9 RemoteVstPlugin: new method pluginDispatchNoLocking() 2012-12-03 00:07:32 +01:00
Tobias Doerffel
3bad03d56e RemotePlugin: improved management of shared memory keys 2012-12-03 00:06:25 +01:00
Tobias Doerffel
efe3b47810 RemotePlugin: return number of bytes sent in sendMessage() 2012-12-03 00:05:57 +01:00
Tobias Doerffel
a00a922119 RemotePlugin: smaller buffers for printing numbers 2012-12-03 00:05:36 +01:00
Tobias Doerffel
fdea64c0d6 RemotePlugin: more sanity checks 2012-12-03 00:05:06 +01:00
Tobias Doerffel
f28601db5d RemoteVstPlugin: less verbose debug message 2012-12-02 22:09:28 +01:00
Tobias Doerffel
5f298c0c48 RemoteVstPlugin: coding style fixes 2012-12-02 22:09:15 +01:00
Tobias Doerffel
ef68156c71 RemoteVstPlugin: compile with -O3 as otherwise incorrect code is generated
There seems to be a bug in current MinGW GCC which leads to incorrect
code (crash for no obvious reason) in RemoteVstPlugin process.
2012-12-02 22:09:06 +01:00
Tobias Doerffel
e864c8057a DrumSynth: removed unused variable 2012-12-02 19:04:45 +01:00
Tobias Doerffel
2cac30f495 RemoteVstPlugin: use size_t for loop index to fix compiler warning 2012-12-02 19:01:37 +01:00
Tobias Doerffel
c4e29da412 RemoteVstPlugin: fixed out-of-bound array access 2012-12-02 19:01:09 +01:00
Tobias Doerffel
40a92d8417 FlpImport/unrtf: renamed malloc.h to ur_malloc.h for not conflicting with system headers 2012-12-02 19:00:06 +01:00
Tobias Doerffel
8a75c40fd6 Widgets/Fader: open input dialog on double click
There have been requests to have an input dialog when double clicking
the fader (like we have it for knobs for ages already).

Closes #3588157.
2012-11-28 00:10:11 +01:00
Tobias Doerffel
8db0d0b0fa Widgets/Fader: improved usability by not jumping to mouse click position
The previous behaviour was very annoying because starting to drag the
knob almost always resulted in a value change. This has been changed
by a rewritten logic for mouse click and move behaviour.

Closes #3588157.
2012-11-28 00:07:56 +01:00
Tobias Doerffel
3739ef82c6 Widgets/Fader: generic knob drawing code
Instead of hard-coding pixmap sizes, calculate everything dynamically.
2012-11-27 23:58:10 +01:00
Tobias Doerffel
3b72f1e9d9 Widgets/Fader: increment/decrement by 1 via scroll wheel
As per popular demand, incrementing/decrement fader value by 1 instead
of 5 when using the scroll wheel.
2012-11-27 23:36:42 +01:00
Tobias Doerffel
0dc2060ea2 ExportProjectDialog: fixed non-multi-track export once more
There was another bug causing LMMS to crash when using regular export
feature.

Thanks to Mikobuntu for reporting this bug.
2012-11-27 23:29:55 +01:00
Jens Lang
da87fd4e55 RemotePlugin: use atomic operation for lock
Use GCC's builtin atomic add/subtract operation for incrementing/
decrementing the recursive lock variable. This is needed to avoid race
conditions and is much faster than using mutexes etc.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2012-11-26 22:59:02 +01:00
Tobias Doerffel
6817631c91 RemoteVstPlugin: more locking, range checking etc. 2012-11-26 20:49:31 +01:00
Tobias Doerffel
e43f34914f RemoteVstPlugin: renamed presetName() to programName() 2012-11-26 20:23:41 +01:00
Tobias Doerffel
bdaedcdf86 VstPlugin, RemoteVstPlugin: update program name via new idle update messages
Introduced new idle update messages for exchanging data periodically but
not inferring audio processing.
2012-11-26 20:16:06 +01:00
Tobias Doerffel
9d610e5108 RemoteVstPlugin: use pluginDispatch() everywhere for thread safety
Calling plugin dispatcher without lock is potentially dangerous.
2012-11-26 20:00:55 +01:00
Tobias Doerffel
533f086600 AutomatableModel: initialize m_value and m_initValue in constructor
Even though we call setInitValue() in AutomatableModel constructor,
initialize according class members before.
2012-11-26 19:48:37 +01:00
Tobias Doerffel
0d80f0c569 VstPlugin, RemoteVstPlugin: save/restore current program of VST plugin
Not all plugins save current program in their chunk (or do not restore
it properly). We therefore have to save and restore the current program
manually.

Closes #3581879.
2012-11-26 19:30:26 +01:00
Tobias Doerffel
56b07e29c2 RemoteVstPlugin: send updates of current program name if changed
Send current program name back to host if current program has changed.
2012-11-26 19:18:20 +01:00
Tobias Doerffel
1b7ae1f7a9 RemotePlugin, VstPlugin: reorganized and partly rewrote program/preset related functions
The code for managing programs/presets of RemotePlugin instances was
very confusing, mainly within the VstPlugin and RemoteVstPlugin class.
I therefore started to reorganize and rewrite functions.
2012-11-26 19:18:07 +01:00
Kristi
59732b05ed ExportProjectDialog: added option for exporting song as loop (backport)
This patch adds the option to remove the extra silence at the end,
so that the exported song can be seamlessly looped.

This is a backport of commit 8f1657164a.

Closes #3588890.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2012-11-25 12:01:15 +01:00
Tobias Doerffel
9e08849d63 ExportProjectDialog: fixed crash when exporting whole project as one track
We have to use the new semantics of the ProjectRenderer management when
exporting the whole project as one track as well. Otherwise the program
crashed as it tried to utilize the ProjectRenderer instance twice.
2012-11-25 11:47:18 +01:00
Tobias Doerffel
4a962c58d9 ExportProjectDialog: coding style fixes 2012-11-25 11:46:40 +01:00
Tobias Doerffel
3be675ac7b Vestige: send NoteOff events for all possible MIDI keys
In VestigeInstrumentView::noteOffAll() do not only send MIDI NoteOff
events for all LMMS keys but for the whole range of MIDI keys.
2012-11-11 23:40:48 +01:00
Tobias Doerffel
3842cb3d61 RemoteVstPlugin: fixed too short arrays for preset names
The dimension of preset name arrays was too small. Fixed this
by raising it from 30 to 64 characters.
2012-11-11 23:13:01 +01:00
Tobias Doerffel
295dd63b0e SetupDialog: turn off auto save per default
Due to various bug reports, I think we should turn off auto save per
default. Users who want this feature can turn it on explicitely (and
live with problems when they have big projects).
2012-11-11 22:55:38 +01:00
Tobias Doerffel
3a1c117a37 CMakeLists: make fftw3 a requirement and not optional anymore
We have too many components in LMMS relying on FFTW3. Building LMMS
without them cripples LMMS' functionality substantially, so simply
make fftw3 a requirement.

Closes #3495736.
2012-11-11 22:42:04 +01:00
Tobias Doerffel
d3d6d65836 Track: do not load height information if greater than default height
This is a workaround for issue #3585927. Once we found the source of
this issue, we can revert this commit.
2012-11-11 22:17:11 +01:00
Tobias Doerffel
c9d5c1dd06 Track: coding style fixes 2012-11-11 22:11:49 +01:00
Tobias Doerffel
37651dad20 AudioPort: made destructor virtual
It is recommended to make destructors virtual if the class is
polymorphic.
2012-11-11 19:45:24 +01:00
Tobias Doerffel
c39512403b InstrumentTrack, NotePlayHandled: added initial sustain pedal support 2012-11-11 19:39:27 +01:00
Tobias Doerffel
aae89e186c MidiEvent: added controllerNumber() and controllerValue() 2012-11-11 19:39:01 +01:00
Tobias Doerffel
b998ef6e13 Midi: added more controller related constants 2012-11-11 19:38:11 +01:00
Raine M. Ekman
3aa03da5af InstrumentMidiIOView: added support for fixed output notes
It came to me that having LMMS output one fixed note from a track could
be useful for controlling drum machines or something like that, so here's
a new spinbox for the MIDI tab.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2012-11-10 12:50:56 +01:00
Tobias Doerffel
6f7572b949 PianoView: do not include Xlib.h header file anymore
This file is a relict from times when we evaluated X11 events for the
virtual keyboard functionality.
2012-11-10 12:28:36 +01:00
Raine M. Ekman
3a59fdea58 InstrumentMidiIOView: fix number of digits for MIDI channel spinboxes
MIDI channels are in range 1 to 16, so there's no need for 3 digits
here.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2012-11-10 12:17:28 +01:00
Tobias Doerffel
075b7b354a ExportProjectDialog: remove obsolete header
No need for iostream header in LMMS.
2012-11-03 19:38:50 +01:00
Tobias Doerffel
2c3e7483aa MainWindow: fixed ambiguous hotkey for export operations
The new export operation had the same hotkey as the classical one. This
is not a good idea and is now fixed.
2012-11-03 19:37:28 +01:00
devin
929b44f14b Added individual BB tracks to multi export
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2012-11-03 19:37:16 +01:00
Devin Venable
eb60d9e06e Added multiple track export feature.
Here is the patchset for my multiple track export feature. It works now
the way I originally envisioned.

For example, after I export tracks on my little song, I see this in the
directory I created:

devin@devin-studio:~/lmms/projects/fff$ ls
0_Defaultpreset.wav  3_Defaultpreset.wav      6_csidSouwav.wav
1_Defaultpreset.wav  4_spacenoiseswavwav.wav  7_HHOPENwav.wav
2_Defaultpreset.wav  5_csidkickwav.wav        8_HHOPENwav.wav

Each instrument or sample track is exported individually, regardless of
whether in its own song track or playing as part of a BB track. The
name is taken from either the song track name or from the BB track name.
My goal was to get the tracks individually exported, so that I could
combine them with other tracks in Ardour.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2012-11-03 19:28:40 +01:00
Raine M. Ekman
69947a624b Track: allow smaller height
Here's one way to cram more stuff onto small screens, or otherwise help
reducing visual clutter: Allow tracks to be shift-dragged all the way
down to 8 px height.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2012-11-01 21:36:31 +01:00
Tobias Doerffel
e7605ea045 Localizations: renamed ir.* to fa.* for ISO 639 conformance
As proposed by Octosquidopus renamed translation files containing
Farsi translations from ir.* to fa.*
2012-10-27 23:01:37 +02:00
Tobias Doerffel
95e1ef1c78 InstrumentTrack: show FX mixer when double clicking FX line LCD spinbox
As proposed by Danil <baza-nsk@ya.ru> on 2012-03-12.
2012-10-27 22:50:16 +02:00
Tobias Doerffel
c1368ddb1a SetupDialog: added option for disabling auto save feature
As requested by various users, it should be configurable whether the
auto save feature is active or not.
2012-10-27 22:45:59 +02:00
NoiseByNorthwest
d448e6743d Ergonomic enhancements for AudioFileProcessor plugin (interactive wave view).
This patch includes:
* sampleBuffer::visualise(): add possibility to specified a range to visualize instead of the whole sample
* add sampleBuffer::sampleRate() and sampleBuffer::sampleLength() getters
* definition of AudioFileProcessorWaveView and AudioFileProcessorWaveView::knob classes for AudioFileProcessor plugin
* knob::getValue() specified “virtual” to allow redefinition in child class  AudioFileProcessorWaveView::knob
* delete audioFileKnob class (made obsolete by AudioFileProcessorWaveView::knob)
* add audioFileProcessor::isPlaying() signal, which is emitted in audioFileProcessor::playNote
* change type of AudioFileProcessorView::m_startKnob and AudioFileProcessorView::m_endKnob (AudioFileProcessorWaveView::knob instead of audioFileKnob)
* replace AudioFileProcessorView::m_graph (QPixmap) by AudioFileProcessorView::m_waveView (AudioFileProcessorWaveView)

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2012-10-27 22:32:09 +02:00
Tobias Doerffel
ad3af97798 MidiClientRaw: fixed parsing of MIDI events
A break was missing in the function where MIDI events are generated from
raw MIDI data. This always has been broken as of commit d188056683
but was not observed as the code for all switch-cases has been identical.
2012-10-27 22:22:23 +02:00
Jesse Dubay
4ba4d8b4e0 ControllerConnectionDialog: fix crash on autodetect when using raw MIDI client 2012-10-27 22:17:13 +02:00
Tobias Doerffel
370ff26c2b LocalZynAddSubFx: added missing header include
ZASF fails to build with GCC 4.7 due to missing header include.

Thanks to Alexander Liebendorfer for pointing out the issue.
2012-10-27 22:01:08 +02:00
Raine M. Ekman
04c1a0906f AutomationEditor: show tooltip with exact value
Added tooltip telling the exact value under the cursor when editing
automation.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2012-05-20 19:01:21 +02:00
Tobias Doerffel
8b66dfc860 ZynAddSubFX: fixed possible buffer overflow
bankdir could be overflowed in the strncat function since the length
limit is not correctly specified.

Closes #3510466.
2012-05-20 18:55:30 +02:00
Raine M. Ekman
02db2fbd2f Piano roll: fix scale marking algorithm and improve rendering
A patch to fix the scale marking algorithm and possibly improve on the
looks

Closes #3493928.
2012-05-20 18:50:27 +02:00
Tobias Doerffel
12221d221f Updated Polish localization files
Thanks to Radek Słowik <radek/at/vibender/dot/com> for the contribution!
2012-02-13 22:04:14 +01:00
NoiseByNorthwest
0b057ec5df Fixed bugs with magnetic knobs
The problem comes from AutomatableModel::m_initValue wich is not fitted
either in constructor or in setter. Idem for m_value in constructor, imo
this is not enough consistent.

I propose to:
- call fittedValue() in init value setter.
- always call setter to initialize current & init values.
2012-02-13 22:02:03 +01:00
Tobias Doerffel
5d5189b1f4 Updated Polish localization files
Thanks to Radek Słowik <radek/at/vibender/dot/com> for the contribution!
2012-02-03 00:18:21 +01:00
143 changed files with 3597 additions and 891 deletions

View File

@@ -15,7 +15,7 @@ INCLUDE(FindPkgConfig)
SET(VERSION_MAJOR "0")
SET(VERSION_MINOR "4")
SET(VERSION_PATCH "13")
SET(VERSION_PATCH "14")
#SET(VERSION_SUFFIX "")
SET(VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")
IF(VERSION_SUFFIX)
@@ -30,7 +30,6 @@ OPTION(WANT_ALSA "Include ALSA (Advanced Linux Sound Architecture) support" ON)
OPTION(WANT_CALF "Include CALF LADSPA plugins" ON)
OPTION(WANT_CAPS "Include C* Audio Plugin Suite (LADSPA plugins)" ON)
OPTION(WANT_CMT "Include Computer Music Toolkit LADSPA plugins" ON)
OPTION(WANT_FFTW3F "Include SpectrumAnalyzer and ZynAddSubFX plugin" ON)
OPTION(WANT_JACK "Include JACK (Jack Audio Connection Kit) support" ON)
OPTION(WANT_OGGVORBIS "Include OGG/Vorbis support" ON)
OPTION(WANT_PULSEAUDIO "Include PulseAudio support" ON)
@@ -261,16 +260,7 @@ ENDIF(WANT_JACK)
# check for FFTW3F-library
IF(WANT_FFTW3F)
PKG_CHECK_MODULES(FFTW3F fftw3f>=3.0.0)
IF(FFTW3F_FOUND)
SET(LMMS_HAVE_FFTW3F TRUE)
SET(STATUS_FFTW3F "OK")
ELSE(FFTW3F_FOUND)
SET(STATUS_FFTW3F "not found, libfftw3-dev (or similiar) "
"is highly recommended")
ENDIF(FFTW3F_FOUND)
ENDIF(WANT_FFTW3F)
PKG_CHECK_MODULES(FFTW3F REQUIRED fftw3f>=3.0.0)
# check for Fluidsynth
@@ -615,13 +605,11 @@ MESSAGE(
"* Stk Mallets : ${STATUS_STK}\n"
"* VST-instrument hoster : ${STATUS_VST}\n"
"* VST-effect hoster : ${STATUS_VST}\n"
"* SpectrumAnalyzer : ${STATUS_FFTW3F}\n"
"* CALF LADSPA plugins : ${STATUS_CALF}\n"
"* CAPS LADSPA plugins : ${STATUS_CAPS}\n"
"* CMT LADSPA plugins : ${STATUS_CMT}\n"
"* TAP LADSPA plugins : ${STATUS_TAP}\n"
"* SWH LADSPA plugins : ${STATUS_SWH}\n"
"* ZynAddSubFX : ${STATUS_FFTW3F}\n"
)
MESSAGE(

4
README
View File

@@ -1,7 +1,7 @@
Linux MultiMedia Studio 0.4.13
Linux MultiMedia Studio 0.4.14
===============================
Copyright (c) 2004-2012 by LMMS-developers
Copyright (c) 2004-2013 by LMMS-developers
This program is free software; you can redistribute it and/or modify

View File

@@ -1,6 +1,7 @@
MINGW=/opt/mingw32
export PATH=$PATH:$MINGW/bin
export CFLAGS="-march=pentium3 -mtune=generic -mpreferred-stack-boundary=5 -fno-tree-vectorize"
#export CFLAGS="-march=pentium3 -mtune=generic -mpreferred-stack-boundary=5 -fno-tree-vectorize"
export CFLAGS="-march=pentium3 -mtune=generic -mpreferred-stack-boundary=5"
export CXXFLAGS="$CFLAGS"
cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/modules/Win32Toolchain.cmake -DCMAKE_MODULE_PATH=`pwd`/../cmake/modules/

View File

@@ -1,6 +1,6 @@
MINGW=/opt/mingw64
export PATH=$PATH:$MINGW/bin
export CFLAGS="-fno-tree-vectorize"
#export CFLAGS="-fno-tree-vectorize"
export CXXFLAGS="$CFLAGS"
cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/modules/Win64Toolchain.cmake -DCMAKE_MODULE_PATH=`pwd`/../cmake/modules/

Binary file not shown.

View File

@@ -539,7 +539,7 @@ If you&apos;re interested in translating LMMS in another language or want to imp
</message>
<message>
<source>6add9</source>
<translation>madd9</translation>
<translation>6add9</translation>
</message>
<message>
<source>m6</source>

Binary file not shown.

View File

@@ -41,7 +41,11 @@
If you&apos;re interested in translating LMMS in another language or want to improve existing translations, you&apos;re welcome to help us! Simply contact the maintainer!</source>
<translation>Spolszczenie LMMS: Radek Słowik
Zauważone błędy i propozycje zmian tłumaczenia zgłoś proszę na e-mail: radek[małpka]vibender[kropka]com</translation>
Podziękowania dla:
Marii Słowik - za wstępną korektę,
Tomasza Gradowskiego - za cenne uwagi i sugestie zmian.
Zauważone błędy i propozycje zmian tłumaczenia proszę zgłaszać na e-mail: radek[małpka]vibender[kropka]com</translation>
</message>
<message>
<source>License</source>
@@ -976,7 +980,7 @@ Zauważone błędy i propozycje zmian tłumaczenia zgłoś proszę na e-mail: ra
</message>
<message>
<source>&amp;Remove this plugin</source>
<translation>&amp;Usuń tą wtyczkę</translation>
<translation>&amp;Usuń tę wtyczkę</translation>
</message>
<message>
<source>&amp;Help</source>
@@ -1119,7 +1123,7 @@ Prawoklik otwiera menu kontekstowe z pomocą którego można zmienić porządek
</message>
<message>
<source>&amp;Remove this plugin</source>
<translation>&amp;Usuń tą wtyczkę</translation>
<translation>&amp;Usuń tę wtyczkę</translation>
</message>
<message>
<source>&amp;Help</source>
@@ -1648,7 +1652,7 @@ Prawoklik otwiera menu kontekstowe z pomocą którego można zmienić porządek
<name>InstrumentSoundShapingView</name>
<message>
<source>TARGET</source>
<translation>CEL</translation>
<translation>TARGET</translation>
</message>
<message>
<source>These tabs contain envelopes. They&apos;re very important for modifying a sound, in that they are almost always necessary for substractive synthesis. For example if you have a volume envelope, you can set when the sound should have a specific volume. If you want to create some soft strings then your sound has to fade in and out very softly. This can be done by setting large attack and release times. It&apos;s the same for other envelope targets like panning, cutoff frequency for the used filter and so on. Just monkey around with it! You can really make cool sounds out of a saw-wave with just some envelopes...!</source>
@@ -1660,7 +1664,7 @@ Prawoklik otwiera menu kontekstowe z pomocą którego można zmienić porządek
</message>
<message>
<source>Here you can select the built-in filter you want to use for this instrument-track. Filters are very important for changing the characteristics of a sound.</source>
<translation>W tym miejscu możesz wybrać wbudowany filtr, który chcesz nałożyć na tą ścieżkę instrumentu. Filtry bardzo istotne z punktu kształtowania charakterystyki dźwięku.</translation>
<translation>W tym miejscu możesz wybrać wbudowany filtr, który chcesz nałożyć na tę ścieżkę instrumentu. Filtry bardzo istotne z punktu kształtowania charakterystyki dźwięku.</translation>
</message>
<message>
<source>CUTOFF</source>
@@ -2148,11 +2152,11 @@ Upewnij się, że masz prawo zapisu do tego pliku i spróbuj ponownie.</translat
</message>
<message>
<source>Show/hide Song-Editor</source>
<translation>Pokaż/ukryj Edytor Piosenki</translation>
<translation>Pokaż/ukryj Edytor Kompozycji</translation>
</message>
<message>
<source>By pressing this button, you can show or hide the Song-Editor. With the help of the Song-Editor you can edit song-playlist and specify when which track should be played. You can also insert and move samples (e.g. rap samples) directly into the playlist.</source>
<translation>Poprzez naciśnięcie tego przycisku możesz pokazać lub ukryć Edytor Piosenki. Za pomocą Edytora Piosenki możesz modyfikować playlistę utworu oraz określić gdzie i kiedy ścieżki będą odtwarzane. Możesz też wstawiać sample bezpośrednio na playlistę.</translation>
<translation>Poprzez naciśnięcie tego przycisku możesz pokazać lub ukryć Edytor Kompozycji. Za pomocą Edytora Kompozycji możesz modyfikować playlistę utworu oraz określić gdzie i kiedy ścieżki będą odtwarzane. Możesz też wstawiać sample bezpośrednio na playlistę.</translation>
</message>
<message>
<source>Show/hide Beat+Bassline Editor</source>
@@ -2669,7 +2673,7 @@ Powód: &quot;%2&quot;</translation>
</message>
<message>
<source>Quarter note</source>
<translation>Świerćnuta</translation>
<translation>Ćwierćnuta</translation>
</message>
<message>
<source>8th note</source>
@@ -3283,7 +3287,7 @@ Jeśli pracuje normalnie z innym oprogramowaniem VST pod Linuksem proszę koniec
</message>
<message>
<source>Clone of %1</source>
<translation>Klonuj %1</translation>
<translation>Duplikat %1</translation>
</message>
</context>
<context>
@@ -3428,7 +3432,7 @@ Upewnij się, że masz uprawnienia zapisu do tego pliku i katalogu w którym si
</message>
<message>
<source>--- Factory files ---</source>
<translation type="unfinished">--- Pliki Fabryczne ---</translation>
<translation>--- Pliki preinstalowane ---</translation>
</message>
</context>
<context>
@@ -4016,7 +4020,7 @@ Podwójne kliknięcie na którejkolwiek wtyczce otworzy okienko z informacjami o
</message>
<message>
<source>Glass</source>
<translation type="unfinished">Harfa Szklana</translation>
<translation>Harfa Szklana</translation>
</message>
<message>
<source>Tibetan Bowl</source>
@@ -4241,11 +4245,11 @@ Podwójne kliknięcie na którejkolwiek wtyczce otworzy okienko z informacjami o
<name>papuInstrument</name>
<message>
<source>Sweep time</source>
<translation type="unfinished"></translation>
<translation>Okres wobulacji</translation>
</message>
<message>
<source>Sweep direction</source>
<translation type="unfinished"></translation>
<translation>Kierunek wobulacji</translation>
</message>
<message>
<source>Sweep RtShift amount</source>
@@ -4261,11 +4265,11 @@ Podwójne kliknięcie na którejkolwiek wtyczce otworzy okienko z informacjami o
</message>
<message>
<source>Volume sweep direction</source>
<translation type="unfinished"></translation>
<translation>Kierunek wobulacji głośności</translation>
</message>
<message>
<source>Length of each step in sweep</source>
<translation type="unfinished"></translation>
<translation>Długość każdego kroku wobulacji</translation>
</message>
<message>
<source>Channel 2 volume</source>
@@ -4336,11 +4340,11 @@ Podwójne kliknięcie na którejkolwiek wtyczce otworzy okienko z informacjami o
<name>papuInstrumentView</name>
<message>
<source>Sweep Time:</source>
<translation type="unfinished"></translation>
<translation>Okres wobulacji:</translation>
</message>
<message>
<source>Sweep Time</source>
<translation type="unfinished"></translation>
<translation>Okres wobulacji</translation>
</message>
<message>
<source>Sweep RtShift amount:</source>
@@ -4364,11 +4368,11 @@ Podwójne kliknięcie na którejkolwiek wtyczce otworzy okienko z informacjami o
</message>
<message>
<source>Length of each step in sweep:</source>
<translation type="unfinished"></translation>
<translation>Długość każdego kroku wobulacji:</translation>
</message>
<message>
<source>Length of each step in sweep</source>
<translation type="unfinished"></translation>
<translation>Długość każdego kroku wobulacji</translation>
</message>
<message>
<source>Wave pattern duty</source>
@@ -4432,11 +4436,11 @@ Podwójne kliknięcie na którejkolwiek wtyczce otworzy okienko z informacjami o
</message>
<message>
<source>Sweep Direction</source>
<translation type="unfinished"></translation>
<translation>Kierunek wobulacji</translation>
</message>
<message>
<source>Volume Sweep Direction</source>
<translation type="unfinished"></translation>
<translation>Kierunek wobulacji głośności</translation>
</message>
<message>
<source>Shift Register Width</source>
@@ -5588,7 +5592,7 @@ Latencja: %2 ms</translation>
<name>songEditor</name>
<message>
<source>Song-Editor</source>
<translation>Edytor Piosenki</translation>
<translation>Edytor Kompozycji</translation>
</message>
<message>
<source>Play song (Space)</source>
@@ -5944,7 +5948,7 @@ Upewnij się, że masz uprawnienia do odczytu tego pliku i katalogu zawierające
</message>
<message>
<source>Mute this track</source>
<translation>Wycisz tą ścieżkę</translation>
<translation>Wycisz tę ścieżkę</translation>
</message>
<message>
<source>Solo</source>
@@ -5952,11 +5956,11 @@ Upewnij się, że masz uprawnienia do odczytu tego pliku i katalogu zawierające
</message>
<message>
<source>Clone this track</source>
<translation>Klonuj tą ścieżkę</translation>
<translation>Klonuj tę ścieżkę</translation>
</message>
<message>
<source>Remove this track</source>
<translation>Usuń tą ścieżkę</translation>
<translation>Usuń tę ścieżkę</translation>
</message>
</context>
<context>

View File

@@ -3,7 +3,7 @@
<multimediaproject creator="Linux MultiMedia Studio (LMMS)" creatorversion="0.1.2-cvs20060123" type="channelsettings" version="1.0" >
<head/>
<channelsettings>
<channeltrack surpos="134219776" fxch="0" baseoct="4" vol="100" name="Default" basetone="9" tab="1" >
<channeltrack surpos="134219776" fxch="0" baseoct="4" vol="100" name="alien_strings" basetone="9" tab="1" >
<bitinvader sampleLength="128" interpolation="1" version="0.1" normalize="0" sampleShape="PKaOPeKT5r6uR+G9CtejvczMTL2PwvW8CtejvAAAAAAK16M8CtejPI/C9TzMzEw9j8J1PY/CdT2PwnU9j8J1PY/CdT2PwnU9j8J1PczMTD2PwvU8CtejPArXIzwK1yO8CtejvI/C9bzMzEy9KVyPvQrXo73sUbi9rkfhvY/C9b2PwvW9uB4FvpqZGb4K1yO+CtcjvnsULr7sUTi+XI9Cvs3MTL7NzEy+zcxMvs3MTL7NzEy+PgpXvq5HYb6uR2G+rkdhvh6Fa76PwnW+j8J1vo/Cdb6PwnW+j8J1vo/Cdb6PwnW+j8J1vo/Cdb6PwnW+j8J1vo/Cdb6PwnW+HoVrvq5HYb4+Cle+zcxMvlyPQr57FC6+CtcjvpqZGb64HgW+rkfhvc3MzL3sUbi9KVyPvczMTL0K1yO9j8L1vArXI7wK1yM8CtejPI/C9TyPwvU8CtcjPSlcjz3sUbg9rkfhPY/C9T24HgU+mpkZPgrXIz57FC4+7FE4PlyPQj7NzEw+PgpXPh6Faz64HoU+KVyPPuJ6lD5SuJ4+exSuPuxRuD5cj8I+hevRPq5H4T7Xo/A+j8L1PgAAAD+4HgU/zMwMP+F6FD8+Chc/9igcP2ZmJj/XozA/MzMzP5DCNT9I4To/XI9CP3A9Sj/NzEw/KVxPP4XrUT/helQ/9ihcP2ZmZj8=" />
<eldata fres="0.21" ftype="0" fcut="3840" fwet="1" >
<elvol lfosyncmode="0" lpdel="0" amt="1" rel="0.33" ctlenvamt="0" latt="0" sus="0.49" lspd="0.7311" att="0.4" pdel="0" lamt="0" dec="0.897" userwavefile="" x100="1" lshp="0" hold="0" />

View File

@@ -3,7 +3,7 @@
<multimediaproject creator="Linux MultiMedia Studio (LMMS)" creatorversion="0.1.2-cvs20060123" type="channelsettings" version="1.0" >
<head/>
<channelsettings>
<channeltrack surpos="134219776" fxch="0" baseoct="5" vol="100" name="Default" basetone="9" tab="1" >
<channeltrack surpos="134219776" fxch="0" baseoct="5" vol="100" name="beehive" basetone="9" tab="1" >
<bitinvader sampleLength="30" interpolation="1" version="0.1" normalize="1" sampleShape="AAAAAPMEtT56glo/eoJaP/IEtT72BLW+eoJav3iCWr/vBLW+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAI/CdT3NzEw+rkfhPlK4Hj97FC4/pHA9P1yPQj89Clc/rkdhP65HYT/Xo3A/j8J1P0jhej8AAIA/" />
<eldata fres="0.43" ftype="1" fcut="1120" fwet="1" >
<elvol lfosyncmode="0" lpdel="0" amt="1" rel="0.65" ctlenvamt="0" latt="0" sus="0" lspd="0.1" att="0.496" pdel="0" lamt="0" dec="0.499" userwavefile="" x100="0" lshp="0" hold="0" />

View File

@@ -3,7 +3,7 @@
<multimediaproject creator="Linux MultiMedia Studio (LMMS)" creatorversion="0.1.2-cvs20060123" type="channelsettings" version="1.0" >
<head/>
<channelsettings>
<channeltrack surpos="134219776" fxch="0" baseoct="5" vol="100" name="Default" basetone="9" tab="0" >
<channeltrack surpos="134219776" fxch="0" baseoct="5" vol="100" name="bell" basetone="9" tab="0" >
<bitinvader sampleLength="8" interpolation="1" version="0.1" normalize="0" sampleShape="AAAAAPMENT8AAIA/8wQ1Py69u7P1BDW/AACAv+8ENb8=" />
<eldata fres="0.43" ftype="0" fcut="1280" fwet="0" >
<elvol lfosyncmode="0" lpdel="0" amt="1" rel="0.351" ctlenvamt="0" latt="0" sus="0.499" lspd="0.1" att="0" pdel="0" lamt="0" dec="0.499" userwavefile="" x100="0" lshp="0" hold="0" />

View File

@@ -3,7 +3,7 @@
<multimediaproject creator="Linux MultiMedia Studio (LMMS)" creatorversion="0.1.4" type="channelsettings" version="1.0" >
<head/>
<channelsettings>
<channeltrack surpos="134219776" fxch="0" baseoct="4" vol="100" name="Default" basetone="9" tab="0" >
<channeltrack surpos="134219776" fxch="0" baseoct="4" vol="100" name="cello" basetone="9" tab="0" >
<bitinvader sampleLength="128" interpolation="1" version="0.1" normalize="1" sampleShape="xUHivbW52r2yLVm+IY2QvlbDqr5qnbS+bhe3vm5Bt74UH4q+NgEbvlF9KL7+kX6+ILePviYNk74+YZ++W4utvighlL65edy9rZnWPeoZdT45f5w+VgurPjr5nD55STw+qsHUPIoBRbyeyc491VlqPszNZT7coW09IAEQvgYzg75QAai+fAO+vixDlr5++b692JHrPfYlez7W9Wo+vNFdPRRhCr7gOXC+JN+Rvui5c76P4Ue9IYUQPuepcz4vi5c+WCesPiNFkT6CycA9tiHbvao9Vb4GT4O+tZVavkuxJb2ygdg9Y1UxPuBZcD7EDWI+QumgPXQJur2WFUu+CWOEvkThob5y9bi+iEPEvo+Fx75vb7e+RrGivi2Zlr60KVq+8oF4vWjhsz1+0T4+dqk6PsoBZT2jUdG9qMVTvh9zj75dc66+MuuYvv7J/r3TwWk9hClCPjIjmT40UZo+FbkKPii5k72VcUq+ED2Ivi7/lr6+YV++KaEUvS7xFj4G7YI+NCmaPj4Bnz7evW4+luFKPf+R/73AwV++H2ePvlV1qr5owbO+VFmqvlY9q756rby+RK2hvgAtAL5+Kb894oVxPtgRbD4YYYw9/oH/vfdpe75Bc6C+WE2svvJZeb5F8SK9G5UNPvbFej5Ep6E+HhWPPrah2j2YWcy97ml3vtz1bb4=" />
<eldata fres="0.5" ftype="0" fcut="16000" fwet="0" >
<elvol lfosyncmode="0" lpdel="0" amt="1" rel="0.727" ctlenvamt="0" latt="0" sus="0" lspd="0.1" att="0.517" pdel="0" lamt="0" dec="0" userwavefile="" x100="0" lshp="0" hold="0" />

View File

@@ -3,7 +3,7 @@
<multimediaproject creator="Linux MultiMedia Studio (LMMS)" creatorversion="0.1.2-cvs20060123" type="channelsettings" version="1.0" >
<head/>
<channelsettings>
<channeltrack surpos="134219776" fxch="0" baseoct="5" vol="100" name="Default" basetone="9" tab="0" >
<channeltrack surpos="134219776" fxch="0" baseoct="5" vol="100" name="drama" basetone="9" tab="0" >
<bitinvader sampleLength="128" interpolation="1" version="0.1" normalize="0" sampleShape="kNtHv4tFRb+EOUK/ftM+v3Y1O79vaTe/Z3Mzv19tL79Xdyu/T4Mnv0e1I79ACSC/OaEcvzNnGb8tbRa/J70TvyNNEb8eNQ+/G10NvxjRC78Vlwq/E58JvxLxCL8Rgwi/EU8IvxFZCL8RkQi/Eu0IvxN3Cb8UHwq/FucKvxexC78ZlQy/G3cNvx1bDr8fRw+/ICsQvyLxEL8jsxG/JWcSvyYHE78ngRO/KOETvygpFL8pWRS/KXEUvylnFL8pSxS/KBUUvyjHE78naxO/JusSvyVhEr8jvRG/IgkRvyFDEL8fdw+/HaMOvxu9Db8azQy/GN8LvxbnCr8U6wm/Eu8IvxD5B78O/wa/DAUGvwoXBb8IKwS/B0MDvwVbAr8DdwG/AZsAv/+N/7787f2++Vn8vvbF+r7yQfm+8NX3vu119r7qDfW+553zvuRB8r7i2fC+34nvvtwp7r7Zvey+12HrvtQZ6r7Szei+z23nvswV5r7KzeS+x1XjvsTZ4b7BXeC+vs3evrtF3b63mdu+tBHavrGF2L6u9da+q2XVvqjN076kMdK+oZnQvp7lzr6aLc2+l33LvpO9yb6Q8ce+jCXGvoldxL6FmcK+gsHAvn7tvr56Cb2+d027vnNxub5vpbe+bMm1vmj1s75kIbK+YVGwvl2Frr5Zpay+Vs2qvlINqb4=" />
<eldata fres="0.43" ftype="6" fcut="1120" fwet="0" >
<elvol lfosyncmode="0" lpdel="0" amt="1" rel="0.351" ctlenvamt="0" latt="0" sus="0" lspd="0.7311" att="0.058" pdel="0" lamt="0" dec="0.499" userwavefile="" x100="1" lshp="0" hold="0" />

View File

@@ -3,7 +3,7 @@
<multimediaproject creator="Linux MultiMedia Studio (LMMS)" creatorversion="0.1.2-cvs20060123" type="channelsettings" version="1.0" >
<head/>
<channelsettings>
<channeltrack surpos="134219776" fxch="0" baseoct="5" vol="100" name="Default" basetone="9" tab="1" >
<channeltrack surpos="134219776" fxch="0" baseoct="5" vol="100" name="epiano" basetone="9" tab="1" >
<bitinvader sampleLength="30" interpolation="1" version="0.1" normalize="1" sampleShape="AAAAAPMEtT56glo/eoJaP/IEtT72BLW+eoJav3iCWr/vBLW+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" />
<eldata fres="0.43" ftype="0" fcut="1280" fwet="0" >
<elvol lfosyncmode="0" lpdel="0" amt="1" rel="0.351" ctlenvamt="0" latt="0" sus="0.499" lspd="0.1" att="0" pdel="0" lamt="0" dec="0.499" userwavefile="" x100="0" lshp="0" hold="0.22" />

View File

@@ -3,7 +3,7 @@
<multimediaproject creator="Linux MultiMedia Studio (LMMS)" creatorversion="0.1.4" type="channelsettings" version="1.0" >
<head/>
<channelsettings>
<channeltrack surpos="134219776" fxch="0" baseoct="4" vol="100" name="Default" basetone="9" tab="0" >
<channeltrack surpos="134219776" fxch="0" baseoct="4" vol="100" name="soft_pad" basetone="9" tab="0" >
<bitinvader sampleLength="128" interpolation="1" version="0.1" normalize="0" sampleShape="4lVxvqJBUb6xfVi+j0VHvkFRIL7UGeq9Z2GzvV4hr72iwdC98Kn3vQjdA77+2f697NH1vQuFBb5JhSS+nEVOvuDRb77vXXe+v0lfvmqlNL4eCQ++Ar0Avh6tDr5cKS6+lWVKvqjZU76RVUi+X2kvvighFL71Qfq9pMHRvURhor2CAUG9OAGcu2xxNj2O2cY9NbEaPqjNUz4O+4Y+Q1+hPmgLtD52B7s+bbG2PlzJrT5Vf6o+aDu0Ppdbyz7SO+k+BPsBPxTCCT8WCws/ECUIPwgcBD8AOQA/7Af2PsWJ4j6Ff8I+NVWaPtaBaj5+ST8+gMk/Pst5ZT4ax4w+QEGgPkpBpT47cZ0+Ia2QPg7Thj4EC4I+9k17PsphZT50BTo+75n3PbRxWj24Ady7jFFGvRrZjL0gSZC9x1FjvZzBzbwc4Y08DWmGPcGx4D0YUQw+IKEPPvzJ/T2fkc89YGmwPV5Brz2KKcU9sKHXPZqhzD06EZ09YuEwPZpBTTz7gf27bAG2vGPBMb1Syai9HkUPvp15Tr72vXq+BN+Bvtida76KFUW+UjkpvlOFKb6JVUS+0JlnvvzVfb70JXq+v6VfvnwpPr5MaSa+QGUgvk5hJ75dsS6+WDUsvjxVHr4XeQu+8XH4vdOR6b3S0ei95qnyvQotBb48nR2+jr1Gvvr9fL4=" />
<eldata fres="0.5" ftype="0" fcut="9120" fwet="1" >
<elvol lfosyncmode="0" lpdel="0" amt="1" rel="0.727" ctlenvamt="1" latt="0" sus="0" lspd="0.1" att="0.657" pdel="0" lamt="0" dec="0" userwavefile="" x100="0" lshp="0" hold="0" />

View File

@@ -3,7 +3,7 @@
<multimediaproject creator="Linux MultiMedia Studio (LMMS)" creatorversion="0.1.2-cvs20060123" type="channelsettings" version="1.0" >
<head/>
<channelsettings>
<channeltrack surpos="134219776" fxch="0" baseoct="5" vol="100" name="Default" basetone="9" tab="1" >
<channeltrack surpos="134219776" fxch="0" baseoct="5" vol="100" name="spacefx" basetone="9" tab="1" >
<bitinvader sampleLength="68" interpolation="0" version="0.1" normalize="0" sampleShape="W/iCvqwtgL2mPdg+iodDP+wPEz9vmss5NYLSvr5Zp764oRs9I/l+PjGqND73GnY9WMfrPUu8ej6Rqlk+PSsXO54U/L10nDk97x62Pmty2z4tfu49K3SIvvHCjb7lk/090lz+Pl543T6v5qQ8QySRvjVzN75K9Es+qUf9Pr9J8D7l4AY+KxKgvlRRD78AQsa+9qL8PTwnFj+X3yc/b+W2PlNf0zsVwCq+fEhGvtRdQL4b0Bu+nLoCvc53Fz63MJY+ch6qPq4daj76RsO87J6ovjZj8L6GTpO+gpDEPXm/tT5TBo4+iBUcvXS8nr608KW+QNtwvf8ioz5qDgY/iTKrPksJMr70uhu/nh8Xv01bA74=" />
<eldata fres="0.43" ftype="4" fcut="1120" fwet="1" >
<elvol lfosyncmode="0" lpdel="0" amt="0" rel="0.65" ctlenvamt="0" latt="0" sus="0" lspd="0.7311" att="0.496" pdel="0" lamt="1" dec="0.499" userwavefile="" x100="1" lshp="0" hold="0" />

View File

@@ -3,7 +3,7 @@
<multimediaproject creator="Linux MultiMedia Studio (LMMS)" creatorversion="0.1.4" type="channelsettings" version="1.0" >
<head/>
<channelsettings>
<channeltrack surpos="134219776" fxch="0" baseoct="7" vol="100" name="Default" basetone="9" tab="0" >
<channeltrack surpos="134219776" fxch="0" baseoct="7" vol="100" name="subbass" basetone="9" tab="0" >
<bitinvader sampleLength="128" interpolation="1" version="0.1" normalize="1" sampleShape="2kpgviIPhz3VQAM+oJkyu8pZrr5y/Ta/5nhxv9QFf7+cp3a//hNovwSBTb+OOR+/s2TIvruEJL5Oy2I9DDSIPmge7D4MVx0/pyQ5P5aHTz8Qp2M/XIhxP/SJdT/mnnI/vbltP2jiZj+x51o/F5pJP9gINj84YiE/iLIJP/+T3D5WAaQ+bGVePt5p8j06A3o81CG5vQSrP77SmIm+xamuvjpD1L5u/vu+wEURv+w7Ib878Su/XHgxv3ClM7+oLzS/HPIyv4ZlLr/YxSW/wR0avzoZDb+KHv++RRrjvoILxr7yV6e+DyCFvhxUO74+g8a9lA3luyFIqz0CcTM+qPOIPq+Rtj68guA++kkDP1jHFD8MlyQ/vC4yP8h7PT/ZxEY/uqdNP9osUT9WVlE/Ct5PP56cTj8xiU0/zBpLPzCMRj9S4UA/EWU7P7zTNT8MlC4/AWwkP/B3Fz/0qQg/ZfLxPrRG0j5sRbM+YtmUPgeFaz7TSik+YFjFPaeVzTw4qT69Je/yvQgvRb4juYm+LTGxvrwJ176QXPm+WKkLv5mbGL924iO/Fsstv16RNr9kaD6/HV9Fv3NZS7+CQFC/wBJUvxubVr/NUle/VvdVvwo8U78WaFC/qfpNv4QBS79SKUa/ykU/vwxcN7+UOy+/upQmv4KdHL+EJRG/OqYEv9Ya774=" />
<eldata fres="1.13" ftype="0" fcut="4960" fwet="1" >
<elvol lfosyncmode="0" lpdel="0" amt="0" rel="0.1" ctlenvamt="0" latt="0" sus="0.499" lspd="0.1" att="0" pdel="0" lamt="0" dec="0.499" userwavefile="" x100="0" lshp="0" hold="0.499" />

View File

@@ -3,7 +3,7 @@
<multimediaproject creator="Linux MultiMedia Studio (LMMS)" creatorversion="0.1.2-cvs20060123" type="channelsettings" version="1.0" >
<head/>
<channelsettings>
<channeltrack surpos="134219776" fxch="0" baseoct="5" vol="100" name="Default" basetone="9" tab="1" >
<channeltrack surpos="134219776" fxch="0" baseoct="5" vol="100" name="sweep_pad" basetone="9" tab="1" >
<bitinvader sampleLength="8" interpolation="0" version="0.1" normalize="0" sampleShape="+MrwPiRn7r4WUV6/xEkNv429tL6ofBA+P7uAPtTiwD4=" />
<eldata fres="0.43" ftype="0" fcut="1280" fwet="1" >
<elvol lfosyncmode="0" lpdel="0" amt="1" rel="0.351" ctlenvamt="0" latt="0" sus="0.499" lspd="0.1" att="0.164" pdel="0" lamt="0" dec="0.499" userwavefile="" x100="0" lshp="0" hold="0.499" />

View File

@@ -3,7 +3,7 @@
<multimediaproject creator="Linux MultiMedia Studio (LMMS)" creatorversion="0.1.4" type="channelsettings" version="1.0" >
<head/>
<channelsettings>
<channeltrack surpos="134219776" fxch="0" baseoct="4" vol="100" name="Default" basetone="9" tab="1" >
<channeltrack surpos="134219776" fxch="0" baseoct="4" vol="100" name="toy_piano" basetone="9" tab="1" >
<bitinvader sampleLength="128" interpolation="1" version="0.1" normalize="0" sampleShape="cAE4OuAB8DkIAYS6gAFAugABALmgAdC5AAEAuiABEDp4Abw6UAEoOggBhLogAZC6gAHAuAgBhLpAASC7oAFQugABgDqAAUA5gAHAOJABSLpaAa27gAFAvHLBuLxBgSC9xCFive4hd72LYUW9GCEMvUZBI70UMYq9+YH8vZIpSb7DkWG+S4Elvnwhvr044Zu9MbGYvQlRhL2JkcS9UjEpvrABWL7rgXW+EhWJvgYFg765sVy+ftk+vj9pH74dUQ6+W2ktvrmxXL4G1YK+J0mTvhuNjb7owXO+0DFovsYRY76teVa+31lvvg2Nhr7iQXG+ujldvgmphL4G7YK+IDkQvjpBHb3sAfa7dsE6PeQB8j0CMQE+SAGkPSWBkjxSAam7PNGdPWt5NT6dWU4+zhlnPgLJgD6uyVY+eWE8PsBBYD7bSW0+5glzPhGdiD4DeYE+23ltPi9Jlz5hebA+Fh2LPpGRSD7RmWg+Gu2MPgYBgz6+2V4+vglfPvD5dz7haXA+cgk5Pi15Fj4lmRI+VvGqPbRB2rzcMe69O2kdvsOh4b3jYXG9J1GTvS1hFr0PYQc9KAGUuyYBk71Voaq9XNGtvWrxtL0CKQG+c2E5vn4hP76RYUi+8Ul4viDZj74RmYi+dBE6vgr5BL4wIRi+q5HVvYeBw7wOAYe8gEFAvamR1L0=" />
<eldata fres="0.5" ftype="0" fcut="9120" fwet="0" >
<elvol lfosyncmode="0" lpdel="0" amt="1" rel="0.727" ctlenvamt="1" latt="0" sus="0.717" lspd="0.1" att="0" pdel="0" lamt="0" dec="0.673" userwavefile="" x100="0" lshp="0" hold="0.37" />

View File

@@ -3,7 +3,7 @@
<multimediaproject creator="Linux MultiMedia Studio (LMMS)" creatorversion="0.1.2-cvs20060123" type="channelsettings" version="1.0" >
<head/>
<channelsettings>
<channeltrack surpos="134219776" fxch="0" baseoct="6" vol="100" name="Default" basetone="9" tab="0" >
<channeltrack surpos="134219776" fxch="0" baseoct="6" vol="100" name="wah_synth" basetone="9" tab="0" >
<bitinvader sampleLength="56" interpolation="1" version="0.1" normalize="1" sampleShape="AAAAAKJN5T2H3GM+VxqpPgMm3j5BMwg/CJ0fP/MENT89Ctc+XI/CPlyPwj57FK4+CtejPpqZmT4pXI8+rkdhPq5HYT7NzEw+zcxMPo/CdT4pXI8+CtejPgrXoz57FK4+7FG4PlyPwj6H3GM+nE3lPS69u7OzTeW9k9xjvlYaqb4DJt6+rkfhvq5H4b49Cte+zczMvs3MzL5cj8K+exSuvnsUrr57FK6+CtejvpqZmb4pXI++KVyPvilcj74pXI++KVyPvilcj74pXI++CtejvuxRuL5cj8K+gtxjvpBN5b0=" />
<eldata fres="0.21" ftype="6" fcut="2720" fwet="1" >
<elvol lfosyncmode="0" lpdel="0" amt="1" rel="0.528" ctlenvamt="0" latt="0" sus="0" lspd="0.7311" att="0" pdel="0" lamt="0" dec="0.897" userwavefile="" x100="1" lshp="0" hold="0.234" />

View File

@@ -3,7 +3,7 @@
<multimedia-project version="1.0" creator="Linux MultiMedia Studio (LMMS)" creatorversion="0.4.0-svn20071123" type="instrumenttracksettings" >
<head/>
<instrumenttracksettings>
<instrumenttrack width="250" x="583" y="240" fxch="0" height="470" surpos-x="0" surpos-y="0" visible="1" basenote="75" name="Default" vol="102" tab="0" >
<instrumenttrack width="250" x="583" y="240" fxch="0" height="470" surpos-x="0" surpos-y="0" visible="1" basenote="75" name="Oh Synth" vol="102" tab="0" >
<lb302 db24="1" vcf_res="1.045" vcf_dec="0.42" vco_detune="-16" dead="0" vcf_cut="0.15" vcf_mod="0.61" dist="0" slide_dec="0.57" slide="0" shape="3" />
<eldata fres="0.5" ftype="0" fcut="14000" fwet="0" >
<elvol lspd_denominator="4" pdel="0" userwavefile="" dec="0.5" lamt="0" syncmode="0" latt="0" rel="0.1" sus="0.5" amt="0" x100="0" att="0" lpdel="0" hold="0.5" lshp="0" lspd="0.1" ctlenvamt="0" lspd_numerator="4" />

View File

@@ -2,7 +2,7 @@
<!DOCTYPE multimedia-project>
<multimedia-project version="1.0" creator="Linux MultiMedia Studio (LMMS)" creatorversion="0.4.0-rc3" type="instrumenttracksettings" >
<head/>
<instrumenttracksettings muted="0" type="0" name="Default preset" >
<instrumenttracksettings muted="0" type="0" name="STrash" >
<instrumenttrack pan="0" fxch="0" pitch="0" basenote="81" vol="88" >
<instrument name="lb302" >
<lb302 db24="0" vcf_res="1.01" vcf_dec="0.1" dead="0" vcf_cut="0.18" vcf_mod="1" dist="1" slide_dec="0.5" slide="1" shape="0" />

View File

@@ -3,7 +3,7 @@
<multimediaproject creator="Linux MultiMedia Studio (LMMS)" creatorversion="0.1.4-cvs20060209" type="channelsettings" version="1.0" >
<head/>
<channelsettings>
<channeltrack surpos="134219776" fxch="0" baseoct="4" vol="100" name="Default" basetone="9" tab="0" >
<channeltrack surpos="134219776" fxch="0" baseoct="4" vol="100" name="organ_blues" basetone="9" tab="0" >
<organic harmonic4="3" wavetype1="0" harmonic5="4" wavetype2="0" vol0="100" harmonic6="5" wavetype3="0" vol1="100" num_osc="8" harmonic7="6" wavetype4="0" vol2="100" wavetype5="0" vol3="0" detune0="0" wavetype6="0" vol4="0" detune1="0" wavetype7="0" vol5="0" detune2="0" vol6="0" detune3="0" vol7="0" detune4="0" pan0="0" detune5="0" pan1="0" detune6="0" pan2="0" detune7="0" pan3="0" pan4="0" pan5="0" harmonic0="0.5" vol="100" pan6="0" harmonic1="0.75" foldback="0" pan7="0" harmonic2="1" harmonic3="2" wavetype0="0" />
<eldata fres="0.5" ftype="0" fcut="16000" fwet="0" >
<elvol lfosyncmode="0" lpdel="0" amt="0" rel="0.1" ctlenvamt="0" latt="0" sus="0.499" lspd="0.1" att="0" pdel="0" lamt="0" dec="0.499" userwavefile="" x100="0" lshp="0" hold="0.499" />

View File

@@ -3,7 +3,7 @@
<multimediaproject creator="Linux MultiMedia Studio (LMMS)" creatorversion="0.1.4-cvs20060209" type="channelsettings" version="1.0" >
<head/>
<channelsettings>
<channeltrack surpos="134219776" fxch="0" baseoct="4" vol="24" name="Default" basetone="9" tab="0" >
<channeltrack surpos="134219776" fxch="0" baseoct="4" vol="24" name="organ_risingsun" basetone="9" tab="0" >
<organic harmonic4="3" wavetype1="0" harmonic5="4" wavetype2="0" vol0="100" harmonic6="5" wavetype3="0" vol1="77" num_osc="8" harmonic7="6" wavetype4="0" vol2="100" wavetype5="0" vol3="73" detune0="0" wavetype6="0" vol4="55" detune1="0" wavetype7="0" vol5="47" detune2="1" vol6="73" detune3="0" vol7="100" detune4="0" pan0="0" detune5="0" pan1="0" detune6="0" pan2="0" detune7="0" pan3="0" pan4="0" pan5="0" harmonic0="0.5" vol="166" pan6="0" harmonic1="0.75" foldback="0" pan7="0" harmonic2="1" harmonic3="2" wavetype0="0" />
<eldata fres="0.5" ftype="0" fcut="16000" fwet="0" >
<elvol lfosyncmode="0" lpdel="0" amt="0" rel="0.1" ctlenvamt="0" latt="0" sus="0.499" lspd="0.1" att="0" pdel="0" lamt="0" dec="0.499" userwavefile="" x100="0" lshp="0" hold="0.499" />

View File

@@ -3,7 +3,7 @@
<multimediaproject creator="Linux MultiMedia Studio (LMMS)" creatorversion="0.1.4-cvs20060209" type="channelsettings" version="1.0" >
<head/>
<channelsettings>
<channeltrack surpos="134219776" fxch="0" baseoct="4" vol="100" name="Default" basetone="9" tab="0" >
<channeltrack surpos="134219776" fxch="0" baseoct="4" vol="100" name="organ_swish" basetone="9" tab="0" >
<organic harmonic4="3" wavetype1="0" harmonic5="4" wavetype2="0" vol0="5" harmonic6="5" wavetype3="0" vol1="64" num_osc="8" harmonic7="6" wavetype4="0" vol2="66" wavetype5="0" vol3="67" detune0="3" wavetype6="0" vol4="32" detune1="0" wavetype7="0" vol5="32" detune2="1" vol6="4" detune3="1" vol7="0" detune4="0" pan0="0" detune5="40" pan1="0" detune6="0" pan2="0" detune7="0" pan3="0" pan4="0" pan5="0" harmonic0="0.5" vol="100" pan6="0" harmonic1="0.75" foldback="0" pan7="0" harmonic2="1" harmonic3="2" wavetype0="0" />
<eldata fres="0.5" ftype="0" fcut="16000" fwet="0" >
<elvol lfosyncmode="0" lpdel="0" amt="1" rel="0.471" ctlenvamt="0" latt="0" sus="0.313" lspd="0.1" att="0.241" pdel="0" lamt="0" dec="0.499" userwavefile="" x100="0" lshp="0" hold="0.499" />

View File

@@ -3,7 +3,7 @@
<multimediaproject creator="Linux MultiMedia Studio (LMMS)" creatorversion="0.1.4-cvs20060209" type="channelsettings" version="1.0" >
<head/>
<channelsettings>
<channeltrack surpos="134219776" fxch="0" baseoct="5" vol="100" name="Default" basetone="0" tab="1" >
<channeltrack surpos="134219776" fxch="0" baseoct="5" vol="100" name="pad_ethereal" basetone="0" tab="1" >
<organic harmonic4="3" wavetype1="3" harmonic5="4" wavetype2="3" vol0="79" harmonic6="5" wavetype3="3" vol1="72" num_osc="8" harmonic7="6" wavetype4="0" vol2="31" wavetype5="0" vol3="77" detune0="0" wavetype6="4" vol4="0" detune1="0" wavetype7="0" vol5="13" detune2="0" vol6="20" detune3="0" vol7="69" detune4="0" pan0="0" detune5="0" pan1="0" detune6="0" pan2="0" detune7="0" pan3="0" pan4="0" pan5="0" harmonic0="0.5" vol="100" pan6="0" harmonic1="0.75" foldback="0" pan7="0" harmonic2="1" harmonic3="2" wavetype0="3" />
<eldata fres="0.89" ftype="0" fcut="5600" fwet="1" >
<elvol lfosyncmode="0" lpdel="0" amt="1" rel="0.404" ctlenvamt="0" latt="0" sus="0.329" lspd="0.1" att="0.247" pdel="0" lamt="0" dec="0.702" userwavefile="" x100="0" lshp="0" hold="0.329" />

View File

@@ -3,7 +3,7 @@
<multimediaproject creator="Linux MultiMedia Studio (LMMS)" creatorversion="0.1.4-cvs20060209" type="channelsettings" version="1.0" >
<head/>
<channelsettings>
<channeltrack surpos="134219776" fxch="0" baseoct="5" vol="100" name="Default" basetone="9" tab="0" >
<channeltrack surpos="134219776" fxch="0" baseoct="5" vol="100" name="pad_rich" basetone="9" tab="0" >
<organic harmonic4="3" wavetype1="2" harmonic5="4" wavetype2="5" vol0="100" harmonic6="5" wavetype3="1" vol1="100" num_osc="8" harmonic7="6" wavetype4="2" vol2="100" wavetype5="5" vol3="100" detune0="1" wavetype6="0" vol4="100" detune1="0" wavetype7="0" vol5="100" detune2="0" vol6="100" detune3="0" vol7="0" detune4="0" pan0="0" detune5="0" pan1="0" detune6="0" pan2="0" detune7="0" pan3="0" pan4="0" pan5="0" harmonic0="0.5" vol="100" pan6="0" harmonic1="0.75" foldback="0.26" pan7="0" harmonic2="1" harmonic3="2" wavetype0="4" />
<eldata fres="1.19" ftype="0" fcut="320" fwet="1" >
<elvol lfosyncmode="0" lpdel="0" amt="1" rel="0.708" ctlenvamt="0" latt="0" sus="0.039" lspd="0.1" att="0.363" pdel="0" lamt="0" dec="0.499" userwavefile="" x100="0" lshp="0" hold="0.499" />

View File

@@ -3,7 +3,7 @@
<multimediaproject creator="Linux MultiMedia Studio (LMMS)" creatorversion="0.1.4-cvs20060209" type="channelsettings" version="1.0" >
<head/>
<channelsettings>
<channeltrack surpos="134219776" fxch="0" baseoct="5" vol="100" name="Default" basetone="9" tab="1" >
<channeltrack surpos="134219776" fxch="0" baseoct="5" vol="100" name="pad_sweep" basetone="9" tab="1" >
<organic harmonic4="3" wavetype1="1" harmonic5="4" wavetype2="1" vol0="37" harmonic6="5" wavetype3="0" vol1="81" num_osc="8" harmonic7="6" wavetype4="5" vol2="100" wavetype5="0" vol3="24" detune0="0" wavetype6="0" vol4="52" detune1="0" wavetype7="0" vol5="0" detune2="0" vol6="0" detune3="0" vol7="0" detune4="0" pan0="0" detune5="0" pan1="0" detune6="0" pan2="0" detune7="0" pan3="0" pan4="0" pan5="0" harmonic0="0.5" vol="200" pan6="6" harmonic1="0.75" foldback="0.06" pan7="0" harmonic2="1" harmonic3="2" wavetype0="1" />
<eldata fres="0.37" ftype="0" fcut="960" fwet="1" >
<elvol lfosyncmode="0" lpdel="0" amt="1" rel="0.576" ctlenvamt="0" latt="0" sus="0" lspd="0.1" att="0.345" pdel="0" lamt="0" dec="0.499" userwavefile="" x100="0" lshp="0" hold="0.116" />

View File

@@ -3,7 +3,7 @@
<multimediaproject creator="Linux MultiMedia Studio (LMMS)" creatorversion="0.1.4-cvs20060209" type="channelsettings" version="1.0" >
<head/>
<channelsettings>
<channeltrack surpos="134219776" fxch="0" baseoct="4" vol="100" name="Default" basetone="9" tab="0" >
<channeltrack surpos="134219776" fxch="0" baseoct="4" vol="100" name="puresine" basetone="9" tab="0" >
<organic harmonic4="3" wavetype1="0" harmonic5="4" wavetype2="0" vol0="0" harmonic6="5" wavetype3="0" vol1="1" num_osc="8" harmonic7="6" wavetype4="0" vol2="100" wavetype5="0" vol3="5" detune0="0" wavetype6="0" vol4="1" detune1="0" wavetype7="0" vol5="0" detune2="0" vol6="0" detune3="0" vol7="0" detune4="0" pan0="0" detune5="0" pan1="0" detune6="0" pan2="0" detune7="0" pan3="0" pan4="0" pan5="0" harmonic0="0.5" vol="200" pan6="0" harmonic1="0.75" foldback="0" pan7="0" harmonic2="1" harmonic3="2" wavetype0="0" />
<eldata fres="0.5" ftype="0" fcut="16000" fwet="0" >
<elvol lfosyncmode="0" lpdel="0" amt="0" rel="0.1" ctlenvamt="0" latt="0" sus="0.499" lspd="0.1" att="0" pdel="0" lamt="0" dec="0.499" userwavefile="" x100="0" lshp="0" hold="0.499" />

View File

@@ -3,7 +3,7 @@
<multimediaproject creator="Linux MultiMedia Studio (LMMS)" creatorversion="0.1.4-cvs20060209" type="channelsettings" version="1.0" >
<head/>
<channelsettings>
<channeltrack surpos="134219776" fxch="0" baseoct="4" vol="100" name="Default" basetone="9" tab="2" >
<channeltrack surpos="134219776" fxch="0" baseoct="4" vol="100" name="sequencer_64" basetone="9" tab="2" >
<organic harmonic4="3" wavetype1="3" harmonic5="4" wavetype2="3" vol0="100" harmonic6="5" wavetype3="0" vol1="100" num_osc="8" harmonic7="6" wavetype4="0" vol2="100" wavetype5="0" vol3="1" detune0="0" wavetype6="0" vol4="5" detune1="0" wavetype7="0" vol5="10" detune2="0" vol6="33" detune3="0" vol7="23" detune4="0" pan0="-20" detune5="0" pan1="20" detune6="0" pan2="0" detune7="0" pan3="0" pan4="0" pan5="0" harmonic0="0.5" vol="70" pan6="0" harmonic1="0.75" foldback="0.75" pan7="0" harmonic2="1" harmonic3="2" wavetype0="3" />
<eldata fres="0.5" ftype="0" fcut="16000" fwet="0" >
<elvol lfosyncmode="0" lpdel="0" amt="1" rel="0.169" ctlenvamt="0" latt="0" sus="0" lspd="0.1" att="0" pdel="0" lamt="0" dec="0" userwavefile="" x100="0" lshp="0" hold="0.171" />

View File

@@ -2,7 +2,7 @@
<!DOCTYPE multimedia-project>
<multimedia-project version="1.0" creator="Linux MultiMedia Studio (LMMS)" creatorversion="0.4.0-rc3" type="instrumenttracksettings" >
<head/>
<instrumenttracksettings muted="0" type="0" name="Default preset" >
<instrumenttracksettings muted="0" type="0" name="SBass" >
<instrumenttrack pan="0" fxch="0" pitch="0" basenote="81" vol="200" >
<instrument name="tripleoscillator" >
<tripleoscillator phoffset2="0" userwavefile0="" finer0="0" userwavefile1="" finer1="-4" userwavefile2="" finer2="2" coarse0="0" coarse1="0" coarse2="0" finel0="0" finel1="4" modalgo1="0" modalgo2="0" finel2="-2" pan0="0" modalgo3="2" pan1="0" stphdetun0="0" pan2="0" stphdetun1="0" wavetype0="3" stphdetun2="0" wavetype1="5" wavetype2="5" vol0="33" vol1="33" phoffset0="0" phoffset1="0" vol2="33" />

View File

@@ -2,7 +2,7 @@
<!DOCTYPE multimedia-project>
<multimedia-project version="1.0" creator="Linux MultiMedia Studio (LMMS)" creatorversion="0.4.0-rc3" type="instrumenttracksettings" >
<head/>
<instrumenttracksettings muted="0" type="0" name="Default preset" >
<instrumenttracksettings muted="0" type="0" name="SBass2" >
<instrumenttrack pan="0" fxch="0" pitch="0" basenote="81" vol="175" >
<instrument name="tripleoscillator" >
<tripleoscillator phoffset2="240" userwavefile0="" finer0="0" userwavefile1="" finer1="-2" userwavefile2="" finer2="2" coarse0="0" coarse1="0" coarse2="0" finel0="0" finel1="2" modalgo1="0" modalgo2="0" finel2="-2" pan0="0" modalgo3="2" pan1="0" stphdetun0="0" pan2="0" stphdetun1="0" wavetype0="2" stphdetun2="0" wavetype1="1" wavetype2="0" vol0="33" vol1="33" phoffset0="0" phoffset1="120" vol2="33" />

View File

@@ -2,7 +2,7 @@
<!DOCTYPE multimedia-project>
<multimedia-project version="1.0" creator="Linux MultiMedia Studio (LMMS)" creatorversion="0.4.0-rc3" type="instrumenttracksettings" >
<head/>
<instrumenttracksettings muted="0" type="0" name="Default preset" >
<instrumenttracksettings muted="0" type="0" name="SEGuitar" >
<instrumenttrack pan="0" fxch="0" pitch="0" basenote="69" vol="200" >
<instrument name="tripleoscillator" >
<tripleoscillator phoffset2="0" userwavefile0="" finer0="-2" userwavefile1="" finer1="2" userwavefile2="" finer2="0" coarse0="0" coarse1="0" coarse2="0" finel0="0" finel1="-2" modalgo1="1" modalgo2="0" finel2="-2" pan0="0" modalgo3="2" pan1="0" stphdetun0="0" pan2="0" stphdetun1="0" wavetype0="5" stphdetun2="0" wavetype1="5" wavetype2="5" vol0="33" vol1="33" phoffset0="0" phoffset1="0" vol2="33" />

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1006 B

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1006 B

After

Width:  |  Height:  |  Size: 974 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 985 B

After

Width:  |  Height:  |  Size: 974 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 860 B

After

Width:  |  Height:  |  Size: 556 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 852 B

After

Width:  |  Height:  |  Size: 547 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 894 B

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1012 B

After

Width:  |  Height:  |  Size: 726 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 709 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1006 B

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@@ -37,7 +37,7 @@ class AudioPort
{
public:
AudioPort( const QString & _name, bool _has_effect_chain = true );
~AudioPort();
virtual ~AudioPort();
inline sampleFrame * firstBuffer()
{

View File

@@ -1,7 +1,7 @@
/*
* AutomatableModelView.h - class AutomatableModelView
*
* Copyright (c) 2008-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2008-2013 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -101,6 +101,7 @@ public slots:
void execConnectionDialog();
void removeConnection();
void editSongGlobalAutomation();
void removeSongGlobalAutomation();
protected:

View File

@@ -2,7 +2,7 @@
* AutomationPattern.h - declaration of class AutomationPattern, which contains
* all information about an automation pattern
*
* Copyright (c) 2008-2010 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2008-2013 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2006-2008 Javier Serrano Polo <jasp00/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
@@ -109,6 +109,8 @@ public slots:
private:
void cleanObjects();
AutomationTrack * m_autoTrack;
QVector<jo_id_t> m_idsToResolve;
objectVector m_objects;

View File

@@ -55,6 +55,7 @@ private:
lcdSpinBox * m_outputChannelSpinBox;
lcdSpinBox * m_fixedOutputVelocitySpinBox;
lcdSpinBox * m_outputProgramSpinBox;
lcdSpinBox * m_fixedOutputNoteSpinBox;
QToolButton * m_wpBtn;
} ;

View File

@@ -2,7 +2,7 @@
* InstrumentTrack.h - declaration of class InstrumentTrack, a track + window
* which holds an instrument-plugin
*
* Copyright (c) 2004-2010 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2004-2012 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -80,6 +80,11 @@ public:
// silence all running notes played by this track
void silenceAllNotes();
bool isSustainPedalPressed() const
{
return m_sustainPedalPressed;
}
f_cnt_t beatLen( notePlayHandle * _n ) const;
@@ -215,6 +220,7 @@ private:
notePlayHandle * m_notes[NumKeys];
int m_runningMidiNotes[NumKeys];
bool m_sustainPedalPressed;
IntModel m_baseNoteModel;

View File

@@ -1,7 +1,7 @@
/*
* main_window.h - declaration of class MainWindow, the main window of LMMS
*
* Copyright (c) 2004-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2004-2013 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -106,7 +106,7 @@ public slots:
void aboutLMMS( void );
void help( void );
void toggleAutomationEditorWin( void );
void toggleBBEditorWin( void );
void toggleBBEditorWin( bool forceShow = false );
void toggleSongEditorWin( void );
void toggleProjectNotesWin( void );
void toggleFxMixerWin( void );
@@ -132,7 +132,7 @@ private:
void finalize( void );
void toggleWindow( QWidget * _w );
void toggleWindow( QWidget *window, bool forceShow = false );
QMdiArea * m_workspace;

View File

@@ -56,6 +56,8 @@ class MidiPort : public Model, public SerializingObject
m_fixedInputVelocityModel);
mapPropertyFromModel(int,fixedOutputVelocity,setFixedOutputVelocity,
m_fixedOutputVelocityModel);
mapPropertyFromModel(int,fixedOutputNote,setFixedOutputNote,
m_fixedOutputNoteModel);
mapPropertyFromModel(int,outputProgram,setOutputProgram,
m_outputProgramModel);
mapPropertyFromModel(bool,isReadable,setReadable,m_readableModel);
@@ -155,6 +157,7 @@ private:
IntModel m_outputControllerModel;
IntModel m_fixedInputVelocityModel;
IntModel m_fixedOutputVelocityModel;
IntModel m_fixedOutputNoteModel;
IntModel m_outputProgramModel;
BoolModel m_readableModel;
BoolModel m_writableModel;

View File

@@ -1,7 +1,7 @@
/*
* RemotePlugin.h - base class providing RPC like mechanisms
*
* Copyright (c) 2008-2010 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2008-2012 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -27,6 +27,7 @@
#include "export.h"
#include "midi.h"
#include "VST_sync_shm.h"
#include <vector>
#include <cstdio>
@@ -115,7 +116,7 @@ typedef int32_t key_t;
// sometimes we need to exchange bigger messages (e.g. for VST parameter dumps)
// so set a usable value here
const int SHM_FIFO_SIZE = 64000;
const int SHM_FIFO_SIZE = 512*1024;
// implements a FIFO inside a shared memory segment
@@ -284,7 +285,7 @@ public:
// recursive lock
inline void lock()
{
if( !isInvalid() && ++m_lockDepth == 1 )
if( !isInvalid() && __sync_add_and_fetch( &m_lockDepth, 1 ) == 1 )
{
#ifdef USE_QT_SEMAPHORES
m_dataSem.acquire();
@@ -297,16 +298,13 @@ public:
// recursive unlock
inline void unlock()
{
if( m_lockDepth > 0 )
if( __sync_sub_and_fetch( &m_lockDepth, 1) <= 0 )
{
if( --m_lockDepth == 0 )
{
#ifdef USE_QT_SEMAPHORES
m_dataSem.release();
m_dataSem.release();
#else
sem_post( m_dataSem );
sem_post( m_dataSem );
#endif
}
}
}
@@ -418,7 +416,8 @@ private:
return;
}
lock();
while( _len > m_data->endPtr - m_data->startPtr )
while( isInvalid() == false &&
_len > m_data->endPtr - m_data->startPtr )
{
unlock();
#ifndef LMMS_BUILD_WIN32
@@ -439,7 +438,7 @@ private:
void write( const void * _buf, int _len )
{
if( isInvalid() )
if( isInvalid() || _len > SHM_FIFO_SIZE )
{
return;
}
@@ -484,7 +483,7 @@ private:
sem_t * m_dataSem;
sem_t * m_messageSem;
#endif
int m_lockDepth;
volatile int m_lockDepth;
} ;
@@ -509,12 +508,8 @@ enum RemoteMessageIDs
IdSaveSettingsToFile,
IdLoadSettingsFromString,
IdLoadSettingsFromFile,
IdLoadChunkFromPresetFile,
IdRotateProgram,
IdLoadPrograms,
IdSavePreset,
IdSetParameter,
IdLoadPresetFromFile,
IdSavePresetFile,
IdLoadPresetFile,
IdDebugMessage,
IdUserBase = 64
} ;
@@ -552,8 +547,7 @@ public:
message & addInt( int _i )
{
char buf[128];
buf[0] = 0;
char buf[32];
sprintf( buf, "%d", _i );
data.push_back( std::string( buf ) );
return *this;
@@ -561,8 +555,7 @@ public:
message & addFloat( float _f )
{
char buf[128];
buf[0] = 0;
char buf[32];
sprintf( buf, "%f", _f );
data.push_back( std::string( buf ) );
return *this;
@@ -615,7 +608,7 @@ public:
m_out = out;
}
void sendMessage( const message & _m );
int sendMessage( const message & _m );
message receiveMessage();
inline bool isInvalid() const
@@ -819,7 +812,9 @@ class RemotePluginClient : public RemotePluginBase
public:
RemotePluginClient( key_t _shm_in, key_t _shm_out );
virtual ~RemotePluginClient();
#ifdef USE_QT_SHMEM
sncVST * getQtVSTshm();
#endif
virtual bool processMessage( const message & _m );
virtual void process( const sampleFrame * _in_buf,
@@ -887,7 +882,9 @@ private:
#ifdef USE_QT_SHMEM
QSharedMemory m_shmObj;
QSharedMemory m_shmQtID;
#endif
sncVST * m_SncVSTplug;
float * m_shm;
int m_inputCount;
@@ -934,19 +931,21 @@ RemotePluginBase::~RemotePluginBase()
void RemotePluginBase::sendMessage( const message & _m )
int RemotePluginBase::sendMessage( const message & _m )
{
m_out->lock();
m_out->writeInt( _m.id );
m_out->writeInt( _m.data.size() );
int j = 0;
int j = 8;
for( unsigned int i = 0; i < _m.data.size(); ++i )
{
m_out->writeString( _m.data[i] );
j += _m.data[i].size();
j += 4 + _m.data[i].size();
}
m_out->unlock();
m_out->messageSent();
return j;
}
@@ -1013,13 +1012,60 @@ RemotePluginClient::RemotePluginClient( key_t _shm_in, key_t _shm_out ) :
RemotePluginBase( new shmFifo( _shm_in ), new shmFifo( _shm_out ) ),
#ifdef USE_QT_SHMEM
m_shmObj(),
m_shmQtID( "/usr/bin/lmms" ),
#endif
m_SncVSTplug( NULL ),
m_shm( NULL ),
m_inputCount( 0 ),
m_outputCount( 0 ),
m_sampleRate( 44100 ),
m_bufferSize( 0 )
{
#ifdef USE_QT_SHMEM
if( m_shmQtID.attach( QSharedMemory::ReadOnly ) )
{
m_SncVSTplug = (sncVST *) m_shmQtID.data();
m_bufferSize = m_SncVSTplug->m_bufferSize;
m_sampleRate = m_SncVSTplug->m_sampleRate;
return;
}
#else
key_t key;
int m_shmID;
if( ( key = ftok( VST_SNC_SHM_KEY_FILE, 'R' ) ) == -1 )
{
perror( "RemotePluginClient::ftok" );
}
else
{ // connect to shared memory segment
if( ( m_shmID = shmget( key, 0, 0 ) ) == -1 )
{
perror( "RemotePluginClient::shmget" );
}
else
{ // attach segment
m_SncVSTplug = (sncVST *)shmat(m_shmID, 0, 0);
if( m_SncVSTplug == (sncVST *)( -1 ) )
{
perror( "RemotePluginClient::shmat" );
}
else
{
m_bufferSize = m_SncVSTplug->m_bufferSize;
m_sampleRate = m_SncVSTplug->m_sampleRate;
// detach segment
if( shmdt(m_SncVSTplug) == -1 )
{
perror("RemotePluginClient::shmdt");
}
return;
}
}
}
#endif
// if attaching shared memory fails
sendMessage( IdSampleRateInformation );
sendMessage( IdBufferSizeInformation );
}
@@ -1029,6 +1075,9 @@ RemotePluginClient::RemotePluginClient( key_t _shm_in, key_t _shm_out ) :
RemotePluginClient::~RemotePluginClient()
{
#ifdef USE_QT_SHMEM
m_shmQtID.detach();
#endif
sendMessage( IdQuit );
#ifndef USE_QT_SHMEM
@@ -1038,6 +1087,14 @@ RemotePluginClient::~RemotePluginClient()
#ifdef USE_QT_SHMEM
sncVST * RemotePluginClient::getQtVSTshm()
{
return m_SncVSTplug;
}
#endif
bool RemotePluginClient::processMessage( const message & _m )
{
@@ -1107,13 +1164,15 @@ void RemotePluginClient::setShmKey( key_t _key, int _size )
{
#ifdef USE_QT_SHMEM
m_shmObj.setKey( QString::number( _key ) );
if( m_shmObj.attach() )
if( m_shmObj.attach() || m_shmObj.error() == QSharedMemory::NoError )
{
m_shm = (float *) m_shmObj.data();
}
else
{
debugMessage( "failed getting shared memory\n" );
char buf[64];
sprintf( buf, "failed getting shared memory: %d\n", m_shmObj.error() );
debugMessage( buf );
}
#else
if( m_shm != NULL )

58
include/VST_sync_shm.h Normal file
View File

@@ -0,0 +1,58 @@
/*
* VST_sync_shm.h - type declarations needed for VST to lmms host sync
*
* Copyright (c) 2004-2013 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program (see COPYING); if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA.
*
*/
#ifndef _VST_SYNC_SHM_H
#define _VST_SYNC_SHM_H
// VST sync frequency (in ms), how often will be VST plugin synced
// keep it power of two if possible (not used by now)
//#define VST_SNC_TIMER 1
// When defined, latency should be subtracted from song PPQ position
//#define VST_SNC_LATENCY
// define file for ftok as shared memory shmget key
#define VST_SNC_SHM_KEY_FILE "/dev/null"
//#define VST_SNC_SHM_RND_KEY 3561653564469
struct sncVST
{
bool isPlayin;
float ppqPos;
int timeSigNumer;
int timeSigDenom;
bool isCycle;
bool hasSHM;
float cycleStart;
float cycleEnd;
int m_bufferSize;
int m_sampleRate;
int m_bpm;
#ifdef VST_SNC_LATENCY
float m_latency;
#endif
} ;
#endif

View File

@@ -114,8 +114,14 @@ const int kEffectMagic = CCONST( 'V', 's', 't', 'P' );
const int kVstLangEnglish = 1;
const int kVstMidiType = 1;
const int kVstParameterUsesFloatStep = 1 << 2;
const int kVstPpqPosValid = 1 << 9;
const int kVstTempoValid = 1 << 10;
const int kVstBarsValid = 1 << 11;
const int kVstCyclePosValid = 1 << 12;
const int kVstTimeSigValid = 1 << 13;
const int kVstTransportPlaying = 1 << 1;
const int kVstTransportCycleActive = 1 << 2;
const int kVstTransportChanged = 1;
class RemoteVstPlugin;
@@ -267,12 +273,18 @@ public:
double samplePos;
// 08
double sampleRate;
// unconfirmed 10 18
char empty1[8 + 8];
// unconfirmed 10
char empty1[8];
// 18
double ppqPos;
// 20?
double tempo;
// unconfirmed 28 30 38
char empty2[8 + 8 + 8];
// 28
double barStartPos;
// 30?
double cycleStartPos;
// 38?
double cycleEndPos;
// 40?
int timeSigNumerator;
// 44?

View File

@@ -2,7 +2,7 @@
* export_project_dialog.h - declaration of class exportProjectDialog which is
* responsible for exporting project
*
* Copyright (c) 2004-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2004-2012 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -28,17 +28,17 @@
#define _EXPORT_PROJECT_DIALOG_H
#include <QtGui/QDialog>
#include <vector>
#include "ui_export_project.h"
class ProjectRenderer;
#include "ProjectRenderer.h"
class exportProjectDialog : public QDialog, public Ui::ExportProjectDialog
{
Q_OBJECT
public:
exportProjectDialog( const QString & _file_name, QWidget * _parent );
exportProjectDialog( const QString & _file_name, QWidget * _parent, bool multi_export );
virtual ~exportProjectDialog();
@@ -50,12 +50,25 @@ protected:
private slots:
void startBtnClicked( void );
void updateTitleBar( int );
void render(ProjectRenderer* renderer);
void multiRender();
ProjectRenderer* prepRender();
void popRender();
void accept();
private:
QString m_fileName;
ProjectRenderer * m_renderer;
QString m_dirName;
QString m_fileExtension;
typedef QVector<ProjectRenderer*> RenderVector;
RenderVector m_renderers;
bool m_multiExport;
typedef QVector<track*> TrackVector;
TrackVector m_unmuted;
TrackVector m_unmutedBB;
ProjectRenderer::ExportFileFormats m_ft;
TrackVector m_tracksToRender;
} ;
#endif

View File

@@ -1,7 +1,7 @@
/*
* fader.h - fader-widget used in FX-mixer - partly taken from Hydrogen
*
* Copyright (c) 2008-2011 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2008-2012 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -74,23 +74,25 @@ public:
private:
virtual void contextMenuEvent( QContextMenuEvent * _me );
virtual void mousePressEvent( QMouseEvent *ev );
virtual void mouseDoubleClickEvent( QMouseEvent* mouseEvent );
virtual void mouseMoveEvent( QMouseEvent *ev );
virtual void mouseReleaseEvent( QMouseEvent * _me );
virtual void wheelEvent( QWheelEvent *ev );
virtual void paintEvent( QPaintEvent *ev );
inline uint knob_y() const
int knobPosY() const
{
float fRange = m_model->maxValue() - m_model->minValue();
float realVal = m_model->value() - m_model->minValue();
// uint knob_y = (uint)( 116.0 - ( 86.0 * ( m_model->value() / fRange ) ) );
return (uint)( 116.0 - ( 86.0 * ( realVal / fRange ) ) );
return height() - ( ( height() - m_knob.height() ) * ( realVal / fRange ) );
}
FloatModel * m_model;
void setPeak( float fPeak, float &targetPeak, float &persistentPeak, QTime &lastPeakTime );
int calculateDisplayPeak( float fPeak );
float m_fPeakValue_L;
float m_fPeakValue_R;
float m_persistentPeak_L;
@@ -105,6 +107,9 @@ private:
QPixmap m_leds;
QPixmap m_knob;
int m_moveStartPoint;
float m_startValue;
static textFloat * s_textFloat;
void updateTextFloat();

View File

@@ -1,7 +1,7 @@
/*
* fft_helpers.h - some functions around FFT analysis
*
* Copyright (c) 2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2008-2012 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -29,8 +29,6 @@
#include "lmmsconfig.h"
#include "export.h"
#ifdef LMMS_HAVE_FFTW3F
#include <fftw3.h>
const int FFT_BUFFER_SIZE = 2048;
@@ -85,5 +83,3 @@ int EXPORT calc13octaveband31( float * _absspec_buffer, float * _subbands,
float EXPORT signalpower(float *timesignal, int num_values);
#endif
#endif

View File

@@ -112,6 +112,8 @@ protected:
virtual void paintEvent( QPaintEvent * _me );
virtual void wheelEvent( QWheelEvent * _me );
virtual float getValue( const QPoint & _p );
private slots:
virtual void enterValue();
void displayHelp();
@@ -128,7 +130,6 @@ private:
void drawKnob( QPainter * _p );
void setPosition( const QPoint & _p );
float getValue( const QPoint & _p );
bool updateAngle();
inline float pageSize() const

View File

@@ -1,7 +1,7 @@
/*
* midi.h - constants, structs etc. concerning MIDI
*
* Copyright (c) 2005-2010 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2005-2013 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -81,10 +81,41 @@ enum MidiMetaEvents
} ;
enum MidiStandardControllers
{
MidiControllerBankSelect = 0,
MidiControllerModulationWheel = 1,
MidiControllerBreathController = 2,
MidiControllerFootController = 4,
MidiControllerPortamentoTime = 5,
MidiControllerMainVolume = 7,
MidiControllerBalance = 8,
MidiControllerPan = 10,
MidiControllerEffectControl1 = 12,
MidiControllerEffectControl2 = 13,
MidiControllerSustain = 64,
MidiControllerPortamento = 65,
MidiControllerSostenuto = 66,
MidiControllerSoftPedal = 67,
MidiControllerLegatoFootswitch = 68,
// Channel Mode Messages are controllers too...
MidiControllerAllSoundOff = 120,
MidiControllerResetAllControllers = 121,
MidiControllerLocalControl = 122,
MidiControllerAllNotesOff = 123,
MidiControllerOmniOn = 124,
MidiControllerOmniOff = 125,
MidiControllerMonoOn = 126,
MidiControllerPolyOn = 127,
};
const int MidiChannelCount = 16;
const int MidiControllerCount = 128;
const int MidiProgramCount = 128;
const int MidiMaxVelocity = 127;
const int MidiMaxControllerValue = 127;
const int MidiMaxNote = 127;
const int MidiMaxPanning = 127;
const int MidiMinPanning = -128;
@@ -101,7 +132,8 @@ struct midiEvent
m_metaEvent( MidiMetaInvalid ),
m_channel( _channel ),
m_sysExData( NULL ),
m_sourcePort( _sourcePort )
m_sourcePort( _sourcePort ),
m_fromMidiPort( false )
{
m_data.m_param[0] = _param1;
m_data.m_param[1] = _param2;
@@ -113,7 +145,8 @@ struct midiEvent
m_metaEvent( MidiMetaInvalid ),
m_channel( 0 ),
m_sysExData( _sysex_data ),
m_sourcePort( NULL )
m_sourcePort( NULL ),
m_fromMidiPort( false )
{
m_data.m_sysExDataLen = _data_len;
}
@@ -124,7 +157,8 @@ struct midiEvent
m_channel( _copy.m_channel ),
m_data( _copy.m_data ),
m_sysExData( _copy.m_sysExData ),
m_sourcePort( _copy.m_sourcePort )
m_sourcePort( _copy.m_sourcePort ),
m_fromMidiPort( _copy.m_fromMidiPort )
{
}
@@ -148,6 +182,16 @@ struct midiEvent
return m_data.m_param[0];
}
inline uint8_t controllerNumber() const
{
return m_data.m_param[0];
}
inline uint8_t controllerValue() const
{
return m_data.m_param[1];
}
inline Sint16 velocity() const
{
return m_data.m_param[1];
@@ -181,6 +225,15 @@ struct midiEvent
( (float)( PanningRight - PanningLeft ) ) );
}
void setFromMidiPort( bool enabled )
{
m_fromMidiPort = enabled;
}
bool isFromMidiPort() const
{
return m_fromMidiPort;
}
MidiEventTypes m_type; // MIDI event type
MidiMetaEvents m_metaEvent; // Meta event (mostly unused)
@@ -195,6 +248,10 @@ struct midiEvent
const char * m_sysExData;
const void * m_sourcePort;
private:
bool m_fromMidiPort;
} ;

View File

@@ -77,10 +77,10 @@ public:
const float _freq,
const bool _looped = false );
void visualize( QPainter & _p, const QRect & _dr, const QRect & _clip );
inline void visualize( QPainter & _p, const QRect & _dr )
void visualize( QPainter & _p, const QRect & _dr, const QRect & _clip, f_cnt_t _from_frame = 0, f_cnt_t _to_frame = 0 );
inline void visualize( QPainter & _p, const QRect & _dr, f_cnt_t _from_frame = 0, f_cnt_t _to_frame = 0 )
{
visualize( _p, _dr, _dr );
visualize( _p, _dr, _dr, _from_frame, _to_frame );
}
inline const QString & audioFile() const
@@ -132,6 +132,16 @@ public:
return m_frequency;
}
sample_rate_t sampleRate() const
{
return m_sampleRate;
}
int sampleLength() const
{
return double( m_endFrame - m_startFrame ) / m_sampleRate * 1000;
}
inline void setFrequency( float _freq )
{
m_varLock.lock();

View File

@@ -105,8 +105,10 @@ private slots:
void toggleDisableChActInd( bool _disabled );
void toggleManualChPiano( bool _enabled );
void toggleSmoothScroll( bool _enabled );
void toggleAutoSave( bool _enabled );
void toggleOneInstrumentTrackWindow( bool _enabled );
void toggleCompactTrackButtons( bool _enabled );
void toggleSyncVSTPlugins( bool _enabled );
private:
@@ -152,8 +154,10 @@ private:
bool m_disableChActInd;
bool m_manualChPiano;
bool m_smoothScroll;
bool m_enableAutoSave;
bool m_oneInstrumentTrackWindow;
bool m_compactTrackButtons;
bool m_syncVSTPlugins;
typedef QMap<QString, AudioDevice::setupWidget *> AswMap;
typedef QMap<QString, MidiClient::setupWidget *> MswMap;

View File

@@ -1,7 +1,7 @@
/*
* song.h - class song - the root of the model-tree
*
* Copyright (c) 2004-2011 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2004-2012 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -25,13 +25,14 @@
#ifndef _SONG_H
#define _SONG_H
#include <QtCore/QSharedMemory>
#include <QtCore/QVector>
#include "track_container.h"
#include "AutomatableModel.h"
#include "Controller.h"
#include "MeterModel.h"
#include "VST_sync_shm.h"
class AutomationTrack;
class pattern;
@@ -111,6 +112,11 @@ public:
return m_exporting;
}
inline void setExportLoop( bool exportLoop )
{
m_exportLoop = exportLoop;
}
inline bool isRecording() const
{
return m_recording;
@@ -120,8 +126,16 @@ public:
inline bool isExportDone() const
{
return m_exporting == true &&
m_playPos[Mode_PlaySong].getTact() >= length() + 1;
if ( m_exportLoop )
{
return m_exporting == true &&
m_playPos[Mode_PlaySong].getTact() >= length();
}
else
{
return m_exporting == true &&
m_playPos[Mode_PlaySong].getTact() >= length() + 1;
}
}
inline PlayModes playMode() const
@@ -207,7 +221,8 @@ public slots:
void resumeFromPause();
void importProject();
void exportProject();
void exportProject(bool multiExport=false);
void exportProjectTracks();
void startExport();
void stopExport();
@@ -235,6 +250,8 @@ private slots:
void updateFramesPerTick();
void updateSampleRateSHM();
private:
@@ -282,6 +299,7 @@ private:
volatile bool m_recording;
volatile bool m_exporting;
volatile bool m_exportLoop;
volatile bool m_playing;
volatile bool m_paused;
@@ -308,6 +326,9 @@ private:
} ;
QVector<Actions> m_actions;
int m_shmID;
sncVST * m_SncVSTplug;
QSharedMemory m_shmQtID;
friend class engine;
friend class songEditor;

View File

@@ -59,6 +59,13 @@ const int TRACK_OP_WIDTH = 78;
const int DEFAULT_SETTINGS_WIDGET_WIDTH_COMPACT = 96;
const int TRACK_OP_WIDTH_COMPACT = 60;
/*! The minimum track height in pixels
*
* Tracks can be resized by shift-dragging anywhere inside the track
* display. This sets the minimum size in pixels for a track.
*/
const Uint16 MINIMAL_TRACK_HEIGHT = 8;
const Uint16 DEFAULT_TRACK_HEIGHT = 32;
const int TCO_BORDER_WIDTH = 1;
@@ -435,6 +442,13 @@ public:
using Model::dataChanged;
inline int getHeight() {
return ( m_height >= MINIMAL_TRACK_HEIGHT ? m_height : DEFAULT_TRACK_HEIGHT );
}
inline void setHeight( int _height ) {
m_height = _height;
}
public slots:
virtual void setName( const QString & _new_name )
@@ -450,6 +464,7 @@ private:
trackContainer * m_trackContainer;
TrackTypes m_type;
QString m_name;
int m_height;
BoolModel m_mutedModel;
BoolModel m_soloModel;

View File

@@ -2,7 +2,7 @@ lmmsicon ICON data/lmms.ico
#include <windows.h>
VS_VERSION_INFO VERSIONINFO
FILEVERSION 0,4,13,0
FILEVERSION 0,4,14,0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
FILEOS VOS_NT_WINDOWS32
FILETYPE VFT_APP
@@ -17,7 +17,7 @@ BEGIN
VALUE "CompanyName", "LMMS Developers\0"
VALUE "FileDescription", "Linux MultiMedia Studio\0"
VALUE "FileVersion", "@VERSION@\0"
VALUE "LegalCopyright", "Copyright (c) 2004-2012 LMMS Developers\0"
VALUE "LegalCopyright", "Copyright (c) 2004-2013 LMMS Developers\0"
VALUE "OriginalFilename", "lmms.exe\0"
VALUE "ProductName", "LMMS\0"
VALUE "ProductVersion", "@VERSION@\0"

View File

@@ -7,7 +7,6 @@
#cmakedefine LMMS_HOST_X86_64
#cmakedefine LMMS_HAVE_ALSA
#cmakedefine LMMS_HAVE_FFTW3F
#cmakedefine LMMS_HAVE_FLUIDSYNTH
#cmakedefine LMMS_HAVE_JACK
#cmakedefine LMMS_HAVE_OGGVORBIS

View File

@@ -2,6 +2,7 @@ ADD_SUBDIRECTORY(audio_file_processor)
ADD_SUBDIRECTORY(bass_booster)
ADD_SUBDIRECTORY(bit_invader)
ADD_SUBDIRECTORY(flp_import)
ADD_SUBDIRECTORY(HydrogenImport)
ADD_SUBDIRECTORY(kicker)
ADD_SUBDIRECTORY(ladspa_browser)
ADD_SUBDIRECTORY(ladspa_effect)

View File

@@ -0,0 +1,4 @@
INCLUDE(BuildPlugin)
BUILD_PLUGIN(hydrogenimport HydrogenImport.cpp HydrogenImport.h local_file_mgr.cpp LocalFileMng.h)

View File

@@ -0,0 +1,404 @@
#include <QtXml/QDomDocument>
#include <QtCore/QDir>
#include <QtGui/QApplication>
#include <QtGui/QMessageBox>
#include <QtGui/QProgressDialog>
#include <QTextStream>
#include <stdlib.h>
#include "LocalFileMng.h"
#include "HydrogenImport.h"
#include "song.h"
#include "engine.h"
#include "Instrument.h"
#include "InstrumentTrack.h"
#include "note.h"
#include "pattern.h"
#include "track.h"
#include "bb_track.h"
#include "bb_track_container.h"
#include "Instrument.h"
#define MAX_LAYERS 4
extern "C"
{
Plugin::Descriptor PLUGIN_EXPORT hydrogenimport_plugin_descriptor =
{
STRINGIFY( PLUGIN_NAME ),
"Hydrogen Import",
QT_TRANSLATE_NOOP( "pluginBrowser",
"Filter for importing Hydrogen files into LMMS" ),
"frank mather",
0x0100,
Plugin::ImportFilter,
NULL,
NULL,
NULL
} ;
}
QString filename;
class NoteKey
{
public:
enum Key {
C = 0,
Cs,
D,
Ef,
E,
F,
Fs,
G,
Af,
A,
Bf,
B,
};
static int stringToNoteKey( const QString& str )
{
int m_key;
QString sKey = str.left( str.length() - 1 );
QString sOct = str.mid( str.length() - 1, str.length() );
if ( sKey.endsWith( "-" ) )
{
sKey.replace( "-", "" );
sOct.insert( 0, "-" );
}
int nOctave = sOct.toInt();
if ( sKey == "C" )
{
m_key = NoteKey::C;
}
else if ( sKey == "Cs" )
{
m_key = NoteKey::Cs;
}
else if ( sKey == "D" )
{
m_key = NoteKey::D;
}
else if ( sKey == "Ef" )
{
m_key = NoteKey::Ef;
}
else if ( sKey == "E" )
{
m_key = NoteKey::E;
}
else if ( sKey == "F" )
{
m_key = NoteKey::F;
}
else if ( sKey == "Fs" )
{
m_key = NoteKey::Fs;
}
else if ( sKey == "G" )
{
m_key = NoteKey::G;
}
else if ( sKey == "Af" )
{
m_key = NoteKey::Af;
}
else if ( sKey == "A" )
{
m_key = NoteKey::A;
}
else if ( sKey == "Bf" )
{
m_key = NoteKey::Bf;
}
else if ( sKey == "B" ) {
m_key = NoteKey::B;
}
return m_key + (nOctave*12)+57;
}
};
HydrogenImport::HydrogenImport( const QString & _file ) :
ImportFilter( _file, &hydrogenimport_plugin_descriptor )
{
filename = _file;
}
HydrogenImport::~HydrogenImport()
{
}
Instrument * ins;
bool HydrogenImport::readSong()
{
QHash<QString, InstrumentTrack *> drum_track;
QHash<QString, int> pattern_length;
QHash<QString, int> pattern_id;
song *s = engine::getSong();
int song_num_tracks = s->tracks().size();
if ( QFile( filename ).exists() == false )
{
printf( "Song file not found \n" );
return false;
}
QDomDocument doc = LocalFileMng::openXmlDocument( filename );
QDomNodeList nodeList = doc.elementsByTagName( "song" );
if( nodeList.isEmpty() )
{
printf( "Error reading song: song node not found\n" );
return NULL;
}
QDomNode songNode = nodeList.at( 0 );
QString m_sSongVersion = LocalFileMng::readXmlString( songNode , "version", "Unknown version" );
float fBpm = LocalFileMng::readXmlFloat( songNode, "bpm", 120 );
float fVolume = LocalFileMng::readXmlFloat( songNode, "volume", 0.5 );
float fMetronomeVolume = LocalFileMng::readXmlFloat( songNode, "metronomeVolume", 0.5 );
QString sName( LocalFileMng::readXmlString( songNode, "name", "Untitled Song" ) );
QString sAuthor( LocalFileMng::readXmlString( songNode, "author", "Unknown Author" ) );
QString sNotes( LocalFileMng::readXmlString( songNode, "notes", "..." ) );
QString sLicense( LocalFileMng::readXmlString( songNode, "license", "Unknown license" ) );
bool bLoopEnabled = LocalFileMng::readXmlBool( songNode, "loopEnabled", false );
QString sMode = LocalFileMng::readXmlString( songNode, "mode", "pattern" );
float fHumanizeTimeValue = LocalFileMng::readXmlFloat( songNode, "humanize_time", 0.0 );
float fHumanizeVelocityValue = LocalFileMng::readXmlFloat( songNode, "humanize_velocity", 0.0 );
float fSwingFactor = LocalFileMng::readXmlFloat( songNode, "swing_factor", 0.0 );
QDomNode instrumentListNode = songNode.firstChildElement( "instrumentList" );
if ( ( ! instrumentListNode.isNull() ) )
{
int instrumentList_count = 0;
QDomNode instrumentNode;
instrumentNode = instrumentListNode.firstChildElement( "instrument" );
while ( ! instrumentNode.isNull() )
{
instrumentList_count++;
QString sId = LocalFileMng::readXmlString( instrumentNode, "id", "" ); // instrument id
QString sDrumkit = LocalFileMng::readXmlString( instrumentNode, "drumkit", "" ); // drumkit
QString sName = LocalFileMng::readXmlString( instrumentNode, "name", "" ); // name
float fVolume = LocalFileMng::readXmlFloat( instrumentNode, "volume", 1.0 ); // volume
bool bIsMuted = LocalFileMng::readXmlBool( instrumentNode, "isMuted", false ); // is muted
float fPan_L = LocalFileMng::readXmlFloat( instrumentNode, "pan_L", 0.5 ); // pan L
float fPan_R = LocalFileMng::readXmlFloat( instrumentNode, "pan_R", 0.5 ); // pan R
float fFX1Level = LocalFileMng::readXmlFloat( instrumentNode, "FX1Level", 0.0 ); // FX level
float fFX2Level = LocalFileMng::readXmlFloat( instrumentNode, "FX2Level", 0.0 ); // FX level
float fFX3Level = LocalFileMng::readXmlFloat( instrumentNode, "FX3Level", 0.0 ); // FX level
float fFX4Level = LocalFileMng::readXmlFloat( instrumentNode, "FX4Level", 0.0 ); // FX level
float fGain = LocalFileMng::readXmlFloat( instrumentNode, "gain", 1.0, false, false ); // instrument gain
int fAttack = LocalFileMng::readXmlInt( instrumentNode, "Attack", 0, false, false ); // Attack
int fDecay = LocalFileMng::readXmlInt( instrumentNode, "Decay", 0, false, false ); // Decay
float fSustain = LocalFileMng::readXmlFloat( instrumentNode, "Sustain", 1.0, false, false ); // Sustain
int fRelease = LocalFileMng::readXmlInt( instrumentNode, "Release", 1000, false, false ); // Release
float fRandomPitchFactor = LocalFileMng::readXmlFloat( instrumentNode, "randomPitchFactor", 0.0f, false, false );
bool bFilterActive = LocalFileMng::readXmlBool( instrumentNode, "filterActive", false );
float fFilterCutoff = LocalFileMng::readXmlFloat( instrumentNode, "filterCutoff", 1.0f, false );
float fFilterResonance = LocalFileMng::readXmlFloat( instrumentNode, "filterResonance", 0.0f, false );
QString sMuteGroup = LocalFileMng::readXmlString( instrumentNode, "muteGroup", "-1", false );
QString sMidiOutChannel = LocalFileMng::readXmlString( instrumentNode, "midiOutChannel", "-1", false, false );
QString sMidiOutNote = LocalFileMng::readXmlString( instrumentNode, "midiOutNote", "60", false, false );
int nMuteGroup = sMuteGroup.toInt();
bool isStopNote = LocalFileMng::readXmlBool( instrumentNode, "isStopNote", false );
int nMidiOutChannel = sMidiOutChannel.toInt();
int nMidiOutNote = sMidiOutNote.toInt();
if ( sId.isEmpty() ) {
printf( "Empty ID for instrument. skipping \n" );
instrumentNode = (QDomNode) instrumentNode.nextSiblingElement( "instrument" );
continue;
}
QDomNode filenameNode = instrumentNode.firstChildElement( "filename" );
if ( ! filenameNode.isNull() )
{
return false;
}
else
{
unsigned nLayer = 0;
QDomNode layerNode = instrumentNode.firstChildElement( "layer" );
while ( ! layerNode.isNull() )
{
if ( nLayer >= MAX_LAYERS )
{
printf( "nLayer >= MAX_LAYERS" );
continue;
}
QString sFilename = LocalFileMng::readXmlString( layerNode, "filename", "" );
bool sIsModified = LocalFileMng::readXmlBool( layerNode, "ismodified", false );
QString sMode = LocalFileMng::readXmlString( layerNode, "smode", "forward" );
unsigned sStartframe = LocalFileMng::readXmlInt( layerNode, "startframe", 0 );
unsigned sLoopFrame = LocalFileMng::readXmlInt( layerNode, "loopframe", 0 );
int sLoops = LocalFileMng::readXmlInt( layerNode, "loops", 0 );
unsigned sEndframe = LocalFileMng::readXmlInt( layerNode, "endframe", 0 );
bool sUseRubber = LocalFileMng::readXmlInt( layerNode, "userubber", 0, false );
float sRubberDivider = LocalFileMng::readXmlFloat( layerNode, "rubberdivider", 0.0 );
int sRubberCsettings = LocalFileMng::readXmlInt( layerNode, "rubberCsettings", 1 );
int sRubberPitch = LocalFileMng::readXmlFloat( layerNode, "rubberPitch", 0.0 );
float fMin = LocalFileMng::readXmlFloat( layerNode, "min", 0.0 );
float fMax = LocalFileMng::readXmlFloat( layerNode, "max", 1.0 );
float fGain = LocalFileMng::readXmlFloat( layerNode, "gain", 1.0 );
float fPitch = LocalFileMng::readXmlFloat( layerNode, "pitch", 0.0, false, false );
if ( nLayer == 0 )
{
drum_track[sId] = ( InstrumentTrack * ) track::create( track::InstrumentTrack,engine::getBBTrackContainer() );
drum_track[sId]->volumeModel()->setValue( fVolume * 100 );
drum_track[sId]->panningModel()->setValue( ( fPan_R - fPan_L ) * 100 );
ins = drum_track[sId]->loadInstrument( "audiofileprocessor" );
ins->loadFile( sFilename );
}
nLayer++;
layerNode = ( QDomNode ) layerNode.nextSiblingElement( "layer" );
}
}
instrumentNode = (QDomNode) instrumentNode.nextSiblingElement( "instrument" );
}
if ( instrumentList_count == 0 )
{
return false;
}
}
else
{
return false;
}
QDomNode patterns = songNode.firstChildElement( "patternList" );
int pattern_count = 0;
int nbb = engine::getBBTrackContainer()->numOfBBs();
QDomNode patternNode = patterns.firstChildElement( "pattern" );
int pn = 1;
while ( !patternNode.isNull() )
{
if ( pn > 0 )
{
pattern_count++;
s->addBBTrack();
pn = 0;
}
QString sName; // name
sName = LocalFileMng::readXmlString( patternNode, "name", sName );
QString sCategory = ""; // category
sCategory = LocalFileMng::readXmlString( patternNode, "category", sCategory ,false ,false );
int nSize = -1;
nSize = LocalFileMng::readXmlInt( patternNode, "size", nSize, false, false );
pattern_length[sName] = nSize;
QDomNode pNoteListNode = patternNode.firstChildElement( "noteList" );
if ( ! pNoteListNode.isNull() ) {
QDomNode noteNode = pNoteListNode.firstChildElement( "note" );
while ( ! noteNode.isNull() ) {
unsigned nPosition = LocalFileMng::readXmlInt( noteNode, "position", 0 );
float fLeadLag = LocalFileMng::readXmlFloat( noteNode, "leadlag", 0.0 , false , false );
float fVelocity = LocalFileMng::readXmlFloat( noteNode, "velocity", 0.8f );
float fPan_L = LocalFileMng::readXmlFloat( noteNode, "pan_L", 0.5 );
float fPan_R = LocalFileMng::readXmlFloat( noteNode, "pan_R", 0.5 );
int nLength = LocalFileMng::readXmlInt( noteNode, "length", -1, true );
float nPitch = LocalFileMng::readXmlFloat( noteNode, "pitch", 0.0, false, false );
QString sKey = LocalFileMng::readXmlString( noteNode, "key", "C0", false, false );
QString nNoteOff = LocalFileMng::readXmlString( noteNode, "note_off", "false", false, false );
QString instrId = LocalFileMng::readXmlString( noteNode, "instrument", 0,false, false );
int i = pattern_count - 1 + nbb;
pattern_id[sName] = pattern_count - 1;
pattern *p = dynamic_cast<pattern *>( drum_track[instrId]->getTCO( i ) );
note n;
n.setPos( nPosition );
if ( (nPosition + 48) <= nSize )
{
n.setLength( 48 );
}
else
{
n.setLength( nSize - nPosition );
}
n.setVolume( fVelocity * 100 );
n.setPanning( ( fPan_R - fPan_L ) * 100 );
n.setKey( NoteKey::stringToNoteKey( sKey ) );
p->addNote( n,false );
pn = pn + 1;
noteNode = ( QDomNode ) noteNode.nextSiblingElement( "note" );
}
}
patternNode = ( QDomNode ) patternNode.nextSiblingElement( "pattern" );
}
// Pattern sequence
QDomNode patternSequenceNode = songNode.firstChildElement( "patternSequence" );
QDomNode groupNode = patternSequenceNode.firstChildElement( "group" );
int pos = 0;
while ( !groupNode.isNull() )
{
int best_length = 0;
QDomNode patternId = groupNode.firstChildElement( "patternID" );
while ( !patternId.isNull() )
{
QString patId = patternId.firstChild().nodeValue();
patternId = ( QDomNode ) patternId.nextSiblingElement( "patternID" );
int i = pattern_id[patId]+song_num_tracks;
track *t = ( bbTrack * ) s->tracks().at( i );
trackContentObject *tco = t->createTCO( pos );
tco->movePosition( pos );
if ( pattern_length[patId] > best_length )
{
best_length = pattern_length[patId];
}
}
pos = pos + best_length;
groupNode = groupNode.nextSiblingElement( "group" );
}
if ( pattern_count == 0 )
{
return false;
}
return true;
}
bool HydrogenImport::tryImport( trackContainer * _tc )
{
if( openFile() == false )
{
return false;
}
return readSong();
}
extern "C"
{
// necessary for getting instance out of shared lib
Plugin * PLUGIN_EXPORT lmms_plugin_main( Model *, void * _data )
{
return new HydrogenImport( QString::fromUtf8(
static_cast<const char *>( _data ) ) );
}
}

View File

@@ -0,0 +1,27 @@
#ifndef _HYDROGEN_IMPORT_H
#define _HYDROGEN_IMPORT_H
#include <QtCore/QString>
#include <QtCore/QPair>
#include <QtCore/QVector>
#include "ImportFilter.h"
class HydrogenImport : public ImportFilter
{
public:
HydrogenImport( const QString & _file );
bool readSong();
virtual ~HydrogenImport();
virtual PluginView * instantiateView( QWidget * )
{
return( NULL );
}
private:
virtual bool tryImport( trackContainer * _tc );
};
#endif

View File

@@ -0,0 +1,29 @@
#ifndef LFILEMNG_H
#define LFILEMNG_H
#include <iostream>
#include <fstream>
#include <vector>
#include <string>
#include <QDomDocument>
class LocalFileMng
{
public:
LocalFileMng();
~LocalFileMng();
std::vector<QString> getallPatternList(){
return m_allPatternList;
}
static QString readXmlString( QDomNode , const QString& nodeName, const QString& defaultValue, bool bCanBeEmpty = false, bool bShouldExists = true , bool tinyXmlCompatMode = false);
static float readXmlFloat( QDomNode , const QString& nodeName, float defaultValue, bool bCanBeEmpty = false, bool bShouldExists = true , bool tinyXmlCompatMode = false);
static int readXmlInt( QDomNode , const QString& nodeName, int defaultValue, bool bCanBeEmpty = false, bool bShouldExists = true , bool tinyXmlCompatMode = false);
static bool readXmlBool( QDomNode , const QString& nodeName, bool defaultValue, bool bShouldExists = true , bool tinyXmlCompatMode = false );
static void convertFromTinyXMLString( QByteArray* str );
static bool checkTinyXMLCompatMode( const QString& filename );
static QDomDocument openXmlDocument( const QString& filename );
std::vector<QString> m_allPatternList;
};
#endif //LFILEMNG_H

View File

@@ -0,0 +1,234 @@
#include <cstdlib>
#include <cassert>
#include <sys/stat.h>
#include <ctype.h>
#include <QDir>
#include <QApplication>
#include <QVector>
#include <QDomDocument>
#include <QLocale>
#include <QTextCodec>
#include <algorithm>
#include "LocalFileMng.h"
/* New QtXml based methods */
QString LocalFileMng::readXmlString( QDomNode node , const QString& nodeName, const QString& defaultValue, bool bCanBeEmpty, bool bShouldExists, bool tinyXmlCompatMode)
{
QDomElement element = node.firstChildElement( nodeName );
if( !node.isNull() && !element.isNull() ){
if( !element.text().isEmpty() ){
return element.text();
} else {
if ( !bCanBeEmpty ) {
//_WARNINGLOG( "Using default value in " + nodeName );
}
return defaultValue;
}
} else {
if( bShouldExists ){
//_WARNINGLOG( "'" + nodeName + "' node not found" );
}
return defaultValue;
}
}
float LocalFileMng::readXmlFloat( QDomNode node , const QString& nodeName, float defaultValue, bool bCanBeEmpty, bool bShouldExists, bool tinyXmlCompatMode)
{
QLocale c_locale = QLocale::c();
QDomElement element = node.firstChildElement( nodeName );
if( !node.isNull() && !element.isNull() ){
if( !element.text().isEmpty() ){
return c_locale.toFloat(element.text());
} else {
if ( !bCanBeEmpty ) {
//_WARNINGLOG( "Using default value in " + nodeName );
}
return defaultValue;
}
} else {
if( bShouldExists ){
//_WARNINGLOG( "'" + nodeName + "' node not found" );
}
return defaultValue;
}
}
int LocalFileMng::readXmlInt( QDomNode node , const QString& nodeName, int defaultValue, bool bCanBeEmpty, bool bShouldExists, bool tinyXmlCompatMode)
{
QLocale c_locale = QLocale::c();
QDomElement element = node.firstChildElement( nodeName );
if( !node.isNull() && !element.isNull() ){
if( !element.text().isEmpty() ){
return c_locale.toInt( element.text() );
} else {
if ( !bCanBeEmpty ) {
//_WARNINGLOG( "Using default value in " + nodeName );
}
return defaultValue;
}
} else {
if( bShouldExists ){
//_WARNINGLOG( "'" + nodeName + "' node not found" );
}
return defaultValue;
}
}
bool LocalFileMng::readXmlBool( QDomNode node , const QString& nodeName, bool defaultValue, bool bShouldExists, bool tinyXmlCompatMode)
{
QDomElement element = node.firstChildElement( nodeName );
if( !node.isNull() && !element.isNull() ){
if( !element.text().isEmpty() ){
if( element.text() == "true"){
return true;
} else {
return false;
}
} else {
//_WARNINGLOG( "Using default value in " + nodeName );
return defaultValue;
}
} else {
if( bShouldExists ){
//_WARNINGLOG( "'" + nodeName + "' node not found" );
}
return defaultValue;
}
}
/* Convert (in-place) an XML escape sequence into a literal byte,
* rather than the character it actually refers to.
*/
void LocalFileMng::convertFromTinyXMLString( QByteArray* str )
{
/* When TinyXML encountered a non-ASCII character, it would
* simply write the character as "&#xx;" -- where "xx" is
* the hex character code. However, this doesn't respect
* any encodings (e.g. UTF-8, UTF-16). In XML, &#xx; literally
* means "the Unicode character # xx." However, in a UTF-8
* sequence, this could be an escape character that tells
* whether we have a 2, 3, or 4-byte UTF-8 sequence.
*
* For example, the UTF-8 sequence 0xD184 was being written
* by TinyXML as "&#xD1;&#x84;". However, this is the UTF-8
* sequence for the cyrillic small letter EF (which looks
* kind of like a thorn or a greek phi). This letter, in
* XML, should be saved as &#x00000444;, or even literally
* (no escaping). As a consequence, when &#xD1; is read
* by an XML parser, it will be interpreted as capital N
* with a tilde (~). Then &#x84; will be interpreted as
* an unknown or control character.
*
* So, when we know that TinyXML wrote the file, we can
* simply exchange these hex sequences to literal bytes.
*/
int pos = 0;
pos = str->indexOf("&#x");
while( pos != -1 ) {
if( isxdigit(str->at(pos+3))
&& isxdigit(str->at(pos+4))
&& (str->at(pos+5) == ';') ) {
char w1 = str->at(pos+3);
char w2 = str->at(pos+4);
w1 = tolower(w1) - 0x30; // '0' = 0x30
if( w1 > 9 ) w1 -= 0x27; // '9' = 0x39, 'a' = 0x61
w1 = (w1 & 0xF);
w2 = tolower(w2) - 0x30; // '0' = 0x30
if( w2 > 9 ) w2 -= 0x27; // '9' = 0x39, 'a' = 0x61
w2 = (w2 & 0xF);
char ch = (w1 << 4) | w2;
(*str)[pos] = ch;
++pos;
str->remove(pos, 5);
}
pos = str->indexOf("&#x");
}
}
bool LocalFileMng::checkTinyXMLCompatMode( const QString& filename )
{
/*
Check if filename was created with TinyXml or QtXml
TinyXML: return true
QtXml: return false
*/
QFile file( filename );
if ( !file.open(QIODevice::ReadOnly) )
return false;
QString line = file.readLine();
file.close();
if ( line.startsWith( "<?xml" )){
return false;
} else {
//_WARNINGLOG( QString("File '%1' is being read in "
// "TinyXML compatability mode")
// .arg(filename) );
return true;
}
}
QDomDocument LocalFileMng::openXmlDocument( const QString& filename )
{
bool TinyXMLCompat = LocalFileMng::checkTinyXMLCompatMode( filename );
QDomDocument doc;
QFile file( filename );
if ( !file.open(QIODevice::ReadOnly) )
return QDomDocument();
if( TinyXMLCompat ) {
QString enc = QTextCodec::codecForLocale()->name();
if( enc == QString("System") ) {
enc = "UTF-8";
}
QByteArray line;
QByteArray buf = QString("<?xml version='1.0' encoding='%1' ?>\n")
.arg( enc )
.toLocal8Bit();
//_INFOLOG( QString("Using '%1' encoding for TinyXML file").arg(enc) );
while( !file.atEnd() ) {
line = file.readLine();
LocalFileMng::convertFromTinyXMLString( &line );
buf += line;
}
if( ! doc.setContent( buf ) ) {
file.close();
return QDomDocument();
}
} else {
if( ! doc.setContent( &file ) ) {
file.close();
return QDomDocument();
}
}
file.close();
return doc;
}

View File

@@ -115,6 +115,11 @@ void audioFileProcessor::playNote( notePlayHandle * _n,
applyRelease( _working_buffer, _n );
instrumentTrack()->processAudioBuffer( _working_buffer,
frames,_n );
emit isPlaying( _n->totalFramesPlayed() * _n->frequency() / m_sampleBuffer.frequency() );
}
else
{
emit isPlaying( 0 );
}
}
@@ -260,22 +265,6 @@ void audioFileProcessor::loopPointChanged( void )
class audioFileKnob : public knob
{
public:
audioFileKnob( QWidget * _parent ) :
knob( knobStyled, _parent )
{
setFixedSize( 37, 47 );
}
};
QPixmap * AudioFileProcessorView::s_artwork = NULL;
@@ -347,7 +336,7 @@ AudioFileProcessorView::AudioFileProcessorView( Instrument * _instrument,
"Otherwise it will be amplified up or down (your "
"actual sample-file isn't touched!)" ) );
m_startKnob = new audioFileKnob( this );
m_startKnob = new AudioFileProcessorWaveView::knob( this );
m_startKnob->move( 68, 108 );
m_startKnob->setHintText( tr( "Startpoint:" )+" ", "" );
m_startKnob->setWhatsThis(
@@ -357,7 +346,7 @@ AudioFileProcessorView::AudioFileProcessorView( Instrument * _instrument,
"which AudioFileProcessor returns if a note is longer "
"than the sample between the start and end-points." ) );
m_endKnob = new audioFileKnob( this );
m_endKnob = new AudioFileProcessorWaveView::knob( this );
m_endKnob->move( 119, 108 );
m_endKnob->setHintText( tr( "Endpoint:" )+" ", "" );
m_endKnob->setWhatsThis(
@@ -367,6 +356,18 @@ AudioFileProcessorView::AudioFileProcessorView( Instrument * _instrument,
"AudioFileProcessor returns if a note is longer than "
"the sample between the start and end-points." ) );
m_waveView = new AudioFileProcessorWaveView( this, 245, 75, castModel<audioFileProcessor>()->m_sampleBuffer );
m_waveView->move( 2, 172 );
m_waveView->setKnobs(
dynamic_cast<AudioFileProcessorWaveView::knob *>( m_startKnob ),
dynamic_cast<AudioFileProcessorWaveView::knob *>( m_endKnob )
);
connect( castModel<audioFileProcessor>(), SIGNAL( isPlaying( f_cnt_t ) ),
m_waveView, SLOT( isPlaying( f_cnt_t ) ) );
qRegisterMetaType<f_cnt_t>( "f_cnt_t" );
setAcceptDrops( TRUE );
}
@@ -464,26 +465,6 @@ void AudioFileProcessorView::paintEvent( QPaintEvent * )
p.setPen( QColor( 255, 255, 255 ) );
p.drawText( 8, 99, file_name );
p.drawPixmap( 2, 172, m_graph );
p.setPen( QColor( 0xFF, 0xAA, 0x00 ) );
const QRect graph_rect( 4, 174, 241, 70 );
const f_cnt_t frames = qMax( a->m_sampleBuffer.frames(),
static_cast<f_cnt_t>( 1 ) );
const int start_frame_x = a->m_sampleBuffer.startFrame() *
graph_rect.width() / frames;
const int end_frame_x = a->m_sampleBuffer.endFrame() *
graph_rect.width() / frames;
p.drawLine( start_frame_x + graph_rect.x(), graph_rect.y(),
start_frame_x + graph_rect.x(),
graph_rect.height() + graph_rect.y() );
p.drawLine( end_frame_x + graph_rect.x(), graph_rect.y(),
end_frame_x + graph_rect.x(),
graph_rect.height() + graph_rect.y() );
}
@@ -491,13 +472,7 @@ void AudioFileProcessorView::paintEvent( QPaintEvent * )
void AudioFileProcessorView::sampleUpdated( void )
{
m_graph = QPixmap( 245, 75 );
m_graph.fill( Qt::transparent );
QPainter p( &m_graph );
p.setPen( QColor( 64, 255, 160 ) );
castModel<audioFileProcessor>()->m_sampleBuffer.
visualize( p, QRect( 2, 2, m_graph.width() - 4,
m_graph.height() - 4 ) );
m_waveView->update();
update();
}
@@ -535,6 +510,510 @@ void AudioFileProcessorView::modelChanged( void )
AudioFileProcessorWaveView::AudioFileProcessorWaveView( QWidget * _parent, int _w, int _h, sampleBuffer & _buf ) :
QWidget( _parent ),
m_sampleBuffer( _buf ),
m_graph( QPixmap( _w - 2 * s_padding, _h - 2 * s_padding ) ),
m_from( 0 ),
m_to( m_sampleBuffer.frames() ),
m_last_from( 0 ),
m_last_to( 0 ),
m_startKnob( 0 ),
m_endKnob( 0 ),
m_isDragging( false ),
m_reversed( false ),
m_framesPlayed( 0 )
{
setFixedSize( _w, _h );
setMouseTracking( true );
if( m_sampleBuffer.frames() > 1 )
{
const f_cnt_t marging = ( m_sampleBuffer.endFrame() - m_sampleBuffer.startFrame() ) * 0.1;
m_from = qMax( 0, m_sampleBuffer.startFrame() - marging );
m_to = qMin( m_sampleBuffer.endFrame() + marging, m_sampleBuffer.frames() );
}
update();
}
void AudioFileProcessorWaveView::isPlaying( f_cnt_t _frames_played )
{
const f_cnt_t nb_frames = m_sampleBuffer.endFrame() - m_sampleBuffer.startFrame();
if( nb_frames < 1 )
{
m_framesPlayed = 0;
}
else
{
m_framesPlayed = _frames_played % nb_frames;
}
update();
}
void AudioFileProcessorWaveView::enterEvent( QEvent * _e )
{
QApplication::setOverrideCursor( Qt::OpenHandCursor );
}
void AudioFileProcessorWaveView::leaveEvent( QEvent * _e )
{
while( QApplication::overrideCursor() )
{
QApplication::restoreOverrideCursor();
}
}
void AudioFileProcessorWaveView::mousePressEvent( QMouseEvent * _me )
{
m_isDragging = true;
m_draggingLastPoint = _me->pos();
if( isCloseTo( _me->x(), m_startFrameX ) )
{
m_draggingType = sample_start;
}
else if( isCloseTo( _me->x(), m_endFrameX ) )
{
m_draggingType = sample_end;
}
else
{
m_draggingType = wave;
QApplication::setOverrideCursor( Qt::ClosedHandCursor );
}
}
void AudioFileProcessorWaveView::mouseReleaseEvent( QMouseEvent * _me )
{
m_isDragging = false;
if( m_draggingType == wave )
{
QApplication::restoreOverrideCursor();
}
}
void AudioFileProcessorWaveView::mouseMoveEvent( QMouseEvent * _me )
{
if( ! m_isDragging )
{
const bool is_size_cursor =
QApplication::overrideCursor()->shape() == Qt::SizeHorCursor;
if( isCloseTo( _me->x(), m_startFrameX ) ||
isCloseTo( _me->x(), m_endFrameX ) )
{
if( ! is_size_cursor )
{
QApplication::setOverrideCursor( Qt::SizeHorCursor );
}
}
else if( is_size_cursor )
{
QApplication::restoreOverrideCursor();
}
return;
}
const int step = _me->x() - m_draggingLastPoint.x();
switch( m_draggingType )
{
case sample_start:
slideSamplePointByPx( start, step );
break;
case sample_end:
slideSamplePointByPx( end, step );
break;
default:
if( qAbs( _me->y() - m_draggingLastPoint.y() )
< 2 * qAbs( _me->x() - m_draggingLastPoint.x() ) )
{
slide( step );
}
else
{
zoom( _me->y() < m_draggingLastPoint.y() );
}
}
m_draggingLastPoint = _me->pos();
update();
}
void AudioFileProcessorWaveView::wheelEvent( QWheelEvent * _we )
{
zoom( _we->delta() > 0 );
update();
}
void AudioFileProcessorWaveView::paintEvent( QPaintEvent * _pe )
{
QPainter p( this );
p.drawPixmap( s_padding, s_padding, m_graph );
p.setPen( QColor( 0xFF, 0xFF, 0x00 ) );
const QRect graph_rect( s_padding, s_padding, width() - 2 * s_padding, height() - 2 * s_padding );
const f_cnt_t frames = m_to - m_from;
m_startFrameX = graph_rect.x() + ( m_sampleBuffer.startFrame() - m_from ) *
double( graph_rect.width() ) / frames;
m_endFrameX = graph_rect.x() + ( m_sampleBuffer.endFrame() - m_from ) *
double( graph_rect.width() ) / frames;
p.drawLine( m_startFrameX, graph_rect.y(),
m_startFrameX,
graph_rect.height() + graph_rect.y() );
p.drawLine( m_endFrameX, graph_rect.y(),
m_endFrameX,
graph_rect.height() + graph_rect.y() );
if( m_endFrameX - m_startFrameX > 2 )
{
p.fillRect(
m_startFrameX + 1,
graph_rect.y(),
m_endFrameX - m_startFrameX - 1,
graph_rect.height() + graph_rect.y(),
QColor( 255, 255, 0, 70 )
);
if( m_framesPlayed )
{
const int played_width_px = m_framesPlayed
/ double( m_sampleBuffer.endFrame() - m_sampleBuffer.startFrame() )
* ( m_endFrameX - m_startFrameX );
QLinearGradient g( m_startFrameX + 1, 0, m_startFrameX + 1 + played_width_px, 0 );
const QColor c( 0, 120, 255, 180 );
g.setColorAt( 0, Qt::transparent );
g.setColorAt( 0.8, c );
g.setColorAt( 1, c );
p.fillRect(
m_startFrameX + 1,
graph_rect.y(),
played_width_px,
graph_rect.height() + graph_rect.y(),
g
);
p.setPen( QColor( 0, 255, 255 ) );
p.drawLine(
m_startFrameX + 1 + played_width_px,
graph_rect.y(),
m_startFrameX + 1 + played_width_px,
graph_rect.height() + graph_rect.y()
);
m_framesPlayed = 0;
}
}
QLinearGradient g( 0, 0, width() * 0.7, 0 );
const QColor c( 0, 0, 150, 180 );
g.setColorAt( 0, c );
g.setColorAt( 0.4, c );
g.setColorAt( 1, Qt::transparent );
p.fillRect( s_padding, s_padding, m_graph.width(), 14, g );
p.setPen( QColor( 255, 255, 20 ) );
p.setFont( pointSize<8>( font() ) );
QString length_text;
const int length = m_sampleBuffer.sampleLength();
if( length > 20000 )
{
length_text = QString::number( length / 1000 ) + "s";
}
else if( length > 2000 )
{
length_text = QString::number( ( length / 100 ) / 10.0 ) + "s";
}
else
{
length_text = QString::number( length ) + "ms";
}
p.drawText(
s_padding + 2,
s_padding + 10,
tr( "Sample length:" ) + " " + length_text
);
}
void AudioFileProcessorWaveView::updateGraph()
{
if( m_to == 1 )
{
m_to = m_sampleBuffer.frames() * 0.7;
slideSamplePointToFrames( end, m_to * 0.7 );
}
if( m_from > m_sampleBuffer.startFrame() )
{
m_from = m_sampleBuffer.startFrame();
}
if( m_to < m_sampleBuffer.endFrame() )
{
m_to = m_sampleBuffer.endFrame();
}
if( m_sampleBuffer.reversed() != m_reversed )
{
reverse();
}
else if( m_last_from == m_from && m_last_to == m_to )
{
return;
}
m_last_from = m_from;
m_last_to = m_to;
m_graph.fill( Qt::transparent );
QPainter p( &m_graph );
p.setPen( QColor( 64, 255, 160 ) );
m_sampleBuffer.visualize(
p,
QRect( 0, 0, m_graph.width(), m_graph.height() ),
m_from, m_to
);
}
void AudioFileProcessorWaveView::zoom( const bool _out )
{
const f_cnt_t start = m_sampleBuffer.startFrame();
const f_cnt_t end = m_sampleBuffer.endFrame();
const f_cnt_t frames = m_sampleBuffer.frames();
const f_cnt_t d_from = start - m_from;
const f_cnt_t d_to = m_to - end;
const f_cnt_t step = qMax( 1, qMax( d_from, d_to ) / 10 );
const f_cnt_t step_from = ( _out ? - step : step );
const f_cnt_t step_to = ( _out ? step : - step );
const double comp_ratio = double( qMin( d_from, d_to ) )
/ qMax( 1, qMax( d_from, d_to ) );
f_cnt_t new_from;
f_cnt_t new_to;
if( ( _out && d_from < d_to ) || ( ! _out && d_to < d_from ) )
{
new_from = qBound( 0, m_from + step_from, start );
new_to = qBound(
end,
m_to + f_cnt_t( step_to * ( new_from == m_from ? 1 : comp_ratio ) ),
frames
);
}
else
{
new_to = qBound( end, m_to + step_to, frames );
new_from = qBound(
0,
m_from + f_cnt_t( step_from * ( new_to == m_to ? 1 : comp_ratio ) ),
start
);
}
if( double( new_to - new_from ) / m_sampleBuffer.sampleRate() > 0.05 )
{
m_from = new_from;
m_to = new_to;
}
}
void AudioFileProcessorWaveView::slide( int _px )
{
const double fact = qAbs( double( _px ) / width() );
f_cnt_t step = ( m_to - m_from ) * fact;
if( _px > 0 )
{
step = -step;
}
f_cnt_t step_from = qBound( 0, m_from + step, m_sampleBuffer.frames() ) - m_from;
f_cnt_t step_to = qBound( m_from + 1, m_to + step, m_sampleBuffer.frames() ) - m_to;
step = qAbs( step_from ) < qAbs( step_to ) ? step_from : step_to;
m_from += step;
m_to += step;
slideSampleByFrames( step );
}
void AudioFileProcessorWaveView::setKnobs( knob * _start, knob * _end )
{
m_startKnob = _start;
m_endKnob = _end;
m_startKnob->setWaveView( this );
m_startKnob->setRelatedKnob( m_endKnob );
m_endKnob->setWaveView( this );
m_endKnob->setRelatedKnob( m_startKnob );
}
void AudioFileProcessorWaveView::slideSamplePointByPx( knobType _point, int _px )
{
slideSamplePointByFrames(
_point,
f_cnt_t( ( double( _px ) / width() ) * ( m_to - m_from ) )
);
}
void AudioFileProcessorWaveView::slideSamplePointByFrames( knobType _point, f_cnt_t _frames, bool _slide_to )
{
knob * knob = _point == start ? m_startKnob : m_endKnob;
if( ! knob )
{
return;
}
const double v = double( _frames ) / m_sampleBuffer.frames();
if( _slide_to )
{
knob->slideTo( v );
}
else
{
knob->slideBy( v );
}
}
void AudioFileProcessorWaveView::slideSampleByFrames( f_cnt_t _frames )
{
if( m_sampleBuffer.frames() <= 1 )
{
return;
}
const double v = double( _frames ) / m_sampleBuffer.frames();
m_startKnob->slideBy( v, false );
m_endKnob->slideBy( v, false );
}
void AudioFileProcessorWaveView::reverse()
{
slideSampleByFrames(
m_sampleBuffer.frames()
- m_sampleBuffer.endFrame()
- m_sampleBuffer.startFrame()
);
const f_cnt_t from = m_from;
m_from = m_sampleBuffer.frames() - m_to;
m_to = m_sampleBuffer.frames() - from;
m_reversed = ! m_reversed;
}
void AudioFileProcessorWaveView::knob::slideTo( double _v, bool _check_bound )
{
if( _check_bound && ! checkBound( _v ) )
{
return;
}
model()->setValue( _v );
emit sliderMoved( model()->value() );
}
float AudioFileProcessorWaveView::knob::getValue( const QPoint & _p )
{
const double dec_fact = ! m_waveView ? 1 :
double( m_waveView->m_to - m_waveView->m_from )
/ m_waveView->m_sampleBuffer.frames();
const float inc = ::knob::getValue( _p ) * dec_fact;
const float next = model()->value() - inc;
if( ! checkBound( next ) )
{
return 0;
}
return inc;
}
bool AudioFileProcessorWaveView::knob::checkBound( double _v ) const
{
if( ! m_relatedKnob || ! m_waveView )
{
return true;
}
if( ( m_relatedKnob->model()->value() - _v > 0 ) !=
( m_relatedKnob->model()->value() - model()->value() > 0 ) )
return false;
const double d1 = qAbs( m_relatedKnob->model()->value() - model()->value() )
* ( m_waveView->m_sampleBuffer.frames() )
/ m_waveView->m_sampleBuffer.sampleRate();
const double d2 = qAbs( m_relatedKnob->model()->value() - _v )
* ( m_waveView->m_sampleBuffer.frames() )
/ m_waveView->m_sampleBuffer.sampleRate();
return d1 < d2 || d2 > 0.02;
}
extern "C"
{

View File

@@ -76,6 +76,10 @@ private slots:
void loopPointChanged();
signals:
void isPlaying( f_cnt_t _frames_played );
private:
typedef sampleBuffer::handleState handleState;
@@ -94,6 +98,9 @@ private:
class AudioFileProcessorWaveView;
class AudioFileProcessorView : public InstrumentView
{
Q_OBJECT
@@ -118,7 +125,7 @@ private:
static QPixmap * s_artwork;
QPixmap m_graph;
AudioFileProcessorWaveView * m_waveView;
knob * m_ampKnob;
knob * m_startKnob;
knob * m_endKnob;
@@ -130,5 +137,134 @@ private:
class AudioFileProcessorWaveView : public QWidget
{
Q_OBJECT
protected:
virtual void enterEvent( QEvent * _e );
virtual void leaveEvent( QEvent * _e );
virtual void mousePressEvent( QMouseEvent * _me );
virtual void mouseReleaseEvent( QMouseEvent * _me );
virtual void mouseMoveEvent( QMouseEvent * _me );
virtual void wheelEvent( QWheelEvent * _we );
virtual void paintEvent( QPaintEvent * _pe );
public:
enum knobType
{
start,
end,
} ;
class knob : public ::knob
{
const AudioFileProcessorWaveView * m_waveView;
const knob * m_relatedKnob;
public:
knob( QWidget * _parent ) :
::knob( knobStyled, _parent ),
m_waveView( 0 ),
m_relatedKnob( 0 )
{
setFixedSize( 37, 47 );
}
void setWaveView( const AudioFileProcessorWaveView * _wv )
{
m_waveView = _wv;
}
void setRelatedKnob( const knob * _knob )
{
m_relatedKnob = _knob;
}
void slideBy( double _v, bool _check_bound = true )
{
slideTo( model()->value() + _v, _check_bound );
}
void slideTo( double _v, bool _check_bound = true );
protected:
float getValue( const QPoint & _p );
private:
bool checkBound( double _v ) const;
} ;
public slots:
void update()
{
updateGraph();
QWidget::update();
}
void isPlaying( f_cnt_t _frames_played );
private:
static const int s_padding = 2;
enum draggingType
{
wave,
sample_start,
sample_end,
} ;
sampleBuffer & m_sampleBuffer;
QPixmap m_graph;
f_cnt_t m_from;
f_cnt_t m_to;
f_cnt_t m_last_from;
f_cnt_t m_last_to;
knob * m_startKnob;
knob * m_endKnob;
f_cnt_t m_startFrameX;
f_cnt_t m_endFrameX;
bool m_isDragging;
QPoint m_draggingLastPoint;
draggingType m_draggingType;
bool m_reversed;
f_cnt_t m_framesPlayed;
public:
AudioFileProcessorWaveView( QWidget * _parent, int _w, int _h, sampleBuffer & _buf );
void setKnobs( knob * _start, knob * _end );
private:
void zoom( const bool _out = false );
void slide( int _px );
void slideSamplePointByPx( knobType _point, int _px );
void slideSamplePointByFrames( knobType _point, f_cnt_t _frames, bool _slide_to = false );
void slideSampleByFrames( f_cnt_t _frames );
void slideSamplePointToFrames( knobType _point, f_cnt_t _frames )
{
slideSamplePointByFrames( _point, _frames, true );
}
void updateGraph();
void reverse();
static bool isCloseTo( int _a, int _b )
{
return qAbs( _a - _b ) < 3;
}
} ;
#endif

View File

@@ -62,7 +62,7 @@ OutputPersonality * op = NULL;
#include "error.c"
#include "hash.c"
#include "html.c"
#include "malloc.c"
#include "ur_malloc.c"
#include "output.c"
#include "parse.c"
#include "util.c"

View File

@@ -53,7 +53,7 @@
#include <stdlib.h>
#endif
#include "malloc.h"
#include "ur_malloc.h"
#include "defs.h"
#include "error.h"
#include "attr.h"

View File

@@ -90,7 +90,7 @@
#include "defs.h"
#include "parse.h"
#include "util.h"
#include "malloc.h"
#include "ur_malloc.h"
#include "main.h"
#include "error.h"
#include "word.h"

View File

@@ -55,7 +55,7 @@
#include "error.h"
#include "main.h"
#include "malloc.h"
#include "ur_malloc.h"
typedef struct _hi {

View File

@@ -55,7 +55,7 @@
#include <string.h>
#endif
#include "malloc.h"
#include "ur_malloc.h"
#include "defs.h"
#include "error.h"
#include "main.h"

View File

@@ -56,7 +56,7 @@
#include <string.h>
#endif
#include "malloc.h"
#include "ur_malloc.h"
#include "defs.h"
#include "error.h"
#include "output.h"

View File

@@ -61,7 +61,7 @@
#include "defs.h"
#include "parse.h"
#include "malloc.h"
#include "ur_malloc.h"
#include "main.h"
#include "error.h"
#include "word.h"

View File

@@ -55,7 +55,7 @@
#endif
#include "error.h"
#include "malloc.h"
#include "ur_malloc.h"
static unsigned long count=0;

View File

@@ -71,7 +71,7 @@
#include "defs.h"
#include "parse.h"
#include "malloc.h"
#include "ur_malloc.h"
#include "main.h"
#include "error.h"
#include "word.h"

View File

@@ -1,35 +1,31 @@
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_CURRENT_SOURCE_DIR})
ADD_DEFINITIONS(-DFFTW3)
IF(LMMS_HAVE_FFTW3F)
INCLUDE_DIRECTORIES(${FFTW3F_INCLUDE_DIRS})
INCLUDE_DIRECTORIES(${FFTW3F_INCLUDE_DIRS} ${CMAKE_BINARY_DIR})
LINK_DIRECTORIES(${FFTW3F_LIBRARY_DIRS})
LINK_LIBRARIES(-lfftw3f)
ENDIF(LMMS_HAVE_FFTW3F)
INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR})
FILE(GLOB PLUGIN_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/*.c)
FOREACH(_item ${PLUGIN_SOURCES})
GET_FILENAME_COMPONENT(_plugin "${_item}" NAME_WE)
IF(NOT "${_plugin}" STREQUAL "mbeq_1197" OR LMMS_HAVE_FFTW3F)
ADD_LIBRARY(${_plugin} MODULE ${_item})
INSTALL(TARGETS ${_plugin} LIBRARY DESTINATION ${PLUGIN_DIR}/ladspa)
SET_TARGET_PROPERTIES(${_plugin} PROPERTIES PREFIX "")
SET_TARGET_PROPERTIES(${_plugin} PROPERTIES COMPILE_FLAGS "-O3 -Wall -fomit-frame-pointer -fstrength-reduce -funroll-loops -ffast-math -c -fno-strict-aliasing")
IF(LMMS_BUILD_WIN32)
ADD_CUSTOM_COMMAND(TARGET ${_plugin} POST_BUILD COMMAND ${STRIP} ${CMAKE_CURRENT_BINARY_DIR}/${_plugin}.dll)
ELSE(LMMS_BUILD_WIN32)
SET_TARGET_PROPERTIES(${_plugin} PROPERTIES COMPILE_FLAGS "${COMPILE_FLAGS} -fPIC -DPIC")
ENDIF(LMMS_BUILD_WIN32)
IF(LMMS_BUILD_APPLE)
SET_TARGET_PROPERTIES(${_plugin} PROPERTIES LINK_FLAGS "${LINK_FLAGS} -Bsymbolic -lm")
ELSE(LMMS_BUILD_APPLE)
SET_TARGET_PROPERTIES(${_plugin} PROPERTIES LINK_FLAGS "${LINK_FLAGS} -shared -Wl,-no-undefined -Wl,-Bsymbolic -lm")
ENDIF(LMMS_BUILD_APPLE)
IF(LMMS_BUILD_LINUX)
SET_TARGET_PROPERTIES(${_plugin} PROPERTIES LINK_FLAGS "${LINK_FLAGS} -nostartfiles")
ENDIF(LMMS_BUILD_LINUX)
ENDIF(NOT "${_plugin}" STREQUAL "mbeq_1197" OR LMMS_HAVE_FFTW3F)
ADD_LIBRARY(${_plugin} MODULE ${_item})
INSTALL(TARGETS ${_plugin} LIBRARY DESTINATION ${PLUGIN_DIR}/ladspa)
SET_TARGET_PROPERTIES(${_plugin} PROPERTIES PREFIX "")
SET_TARGET_PROPERTIES(${_plugin} PROPERTIES COMPILE_FLAGS "-O3 -Wall -fomit-frame-pointer -fstrength-reduce -funroll-loops -ffast-math -c -fno-strict-aliasing")
IF(LMMS_BUILD_WIN32)
ADD_CUSTOM_COMMAND(TARGET ${_plugin} POST_BUILD COMMAND ${STRIP} ${CMAKE_CURRENT_BINARY_DIR}/${_plugin}.dll)
ELSE(LMMS_BUILD_WIN32)
SET_TARGET_PROPERTIES(${_plugin} PROPERTIES COMPILE_FLAGS "${COMPILE_FLAGS} -fPIC -DPIC")
ENDIF(LMMS_BUILD_WIN32)
IF(LMMS_BUILD_APPLE)
SET_TARGET_PROPERTIES(${_plugin} PROPERTIES LINK_FLAGS "${LINK_FLAGS} -Bsymbolic -lm")
ELSE(LMMS_BUILD_APPLE)
SET_TARGET_PROPERTIES(${_plugin} PROPERTIES LINK_FLAGS "${LINK_FLAGS} -shared -Wl,-no-undefined -Wl,-Bsymbolic -lm")
ENDIF(LMMS_BUILD_APPLE)
IF(LMMS_BUILD_LINUX)
SET_TARGET_PROPERTIES(${_plugin} PROPERTIES LINK_FLAGS "${LINK_FLAGS} -nostartfiles")
ENDIF(LMMS_BUILD_LINUX)
ENDFOREACH(_item ${PLUGIN_SOURCES})

View File

@@ -2,7 +2,7 @@
* sf2_player.cpp - a soundfont2 player using fluidSynth
*
* Copyright (c) 2008 Paul Giblock <drfaygo/at/gmail/dot/com>
* Copyright (c) 2009-2010 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2009-2013 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -389,6 +389,8 @@ void sf2Instrument::openFile( const QString & _sf2File )
}
delete[] sf2Ascii;
instrumentTrack()->setName( QFileInfo( _sf2File ).baseName() );
}

View File

@@ -1,8 +1,5 @@
IF(LMMS_HAVE_FFTW3F)
INCLUDE(BuildPlugin)
INCLUDE_DIRECTORIES(${FFTW3F_INCLUDE_DIRS})
LINK_DIRECTORIES(${FFTW3F_LIBRARY_DIRS})
LINK_LIBRARIES(${FFTW3F_LIBRARIES})
BUILD_PLUGIN(spectrumanalyzer spectrum_analyzer.cpp spectrumanalyzer_controls.cpp spectrumanalyzer_control_dialog.cpp spectrum_analyzer.h spectrumanalyzer_controls.h spectrumanalyzer_control_dialog.h MOCFILES spectrumanalyzer_controls.h EMBEDDED_RESOURCES ${CMAKE_CURRENT_SOURCE_DIR}/*.png)
ENDIF(LMMS_HAVE_FFTW3F)
INCLUDE(BuildPlugin)
INCLUDE_DIRECTORIES(${FFTW3F_INCLUDE_DIRS})
LINK_DIRECTORIES(${FFTW3F_LIBRARY_DIRS})
LINK_LIBRARIES(${FFTW3F_LIBRARIES})
BUILD_PLUGIN(spectrumanalyzer spectrum_analyzer.cpp spectrumanalyzer_controls.cpp spectrumanalyzer_control_dialog.cpp spectrum_analyzer.h spectrumanalyzer_controls.h spectrumanalyzer_control_dialog.h MOCFILES spectrumanalyzer_controls.h EMBEDDED_RESOURCES ${CMAKE_CURRENT_SOURCE_DIR}/*.png)

View File

@@ -1,7 +1,7 @@
/*
* vestige.cpp - instrument-plugin for hosting VST-instruments
*
* Copyright (c) 2005-2011 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2005-2012 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -117,22 +117,31 @@ void vestigeInstrument::loadSettings( const QDomElement & _this )
m_plugin->loadSettings( _this );
const QMap<QString, QString> & dump = m_plugin->parameterDump();
int paramCount = (dump).size();
paramCount = dump.size();
char paramStr[35];
vstKnobs = new knob *[paramCount];
knobFModel = new FloatModel *[paramCount];
QStringList list1;
vstKnobs = new knob *[ paramCount ];
knobFModel = new FloatModel *[ paramCount ];
QStringList s_dumpValues;
QWidget * widget = new QWidget();
for (int i = 0; i < paramCount; i++) {
sprintf( paramStr, "param%d", i);
list1 = dump[paramStr].split(":");
for( int i = 0; i < paramCount; i++ )
{
sprintf( paramStr, "param%d", i );
s_dumpValues = dump[ paramStr ].split( ":" );
vstKnobs[i] = new knob( knobBright_26, widget );
vstKnobs[i]->setHintText( list1.at(1) + ":", "");
vstKnobs[i]->setLabel( list1.at(1).left(15) );
vstKnobs[i] = new knob( knobBright_26, widget, s_dumpValues.at( 1 ) );
vstKnobs[i]->setHintText( s_dumpValues.at( 1 ) + ":", "" );
vstKnobs[i]->setLabel( s_dumpValues.at( 1 ).left( 15 ) );
knobFModel[i] = new FloatModel( (list1.at(2)).toFloat(), 0.0f, 1.0f, 0.01f, this, QString::number(i) );
knobFModel[i] = new FloatModel( 0.0f, 0.0f, 1.0f, 0.01f, this, QString::number(i) );
knobFModel[i]->loadSettings( _this, paramStr );
if( !( knobFModel[ i ]->isAutomated() ||
knobFModel[ i ]->getControllerConnection() ) )
{
knobFModel[ i ]->setValue( ( s_dumpValues.at( 2 )).toFloat() );
knobFModel[ i ]->setInitValue( ( s_dumpValues.at( 2 )).toFloat() );
}
connect( knobFModel[i], SIGNAL( dataChanged() ), this, SLOT( setParameter() ) );
vstKnobs[i]->setModel( knobFModel[i] );
@@ -167,9 +176,10 @@ void vestigeInstrument::saveSettings( QDomDocument & _doc, QDomElement & _this )
m_plugin->saveSettings( _doc, _this );
if (knobFModel != NULL) {
const QMap<QString, QString> & dump = m_plugin->parameterDump();
int paramCount = (dump).size();
paramCount = dump.size();
char paramStr[35];
for (int i = 0; i < paramCount; i++) {
for( int i = 0; i < paramCount; i++ )
{
if (knobFModel[i]->isAutomated() || knobFModel[i]->getControllerConnection()) {
sprintf( paramStr, "param%d", i);
knobFModel[i]->saveSettings( _doc, _this, paramStr );
@@ -223,7 +233,10 @@ void vestigeInstrument::loadFile( const QString & _file )
InstrumentTrack::tr( "Default preset" );
m_pluginMutex.unlock();
closePlugin();
if ( m_plugin != NULL )
{
closePlugin();
}
m_pluginDLL = _file;
textFloat * tf = textFloat::displayMessage(
@@ -250,7 +263,7 @@ void vestigeInstrument::loadFile( const QString & _file )
return;
}
m_plugin->showEditor();
m_plugin->showEditor( NULL, false );
if( set_ch_name )
{
@@ -308,6 +321,51 @@ bool vestigeInstrument::handleMidiEvent( const midiEvent & _me,
void vestigeInstrument::closePlugin( void )
{
// disconnect all signals
if( knobFModel != NULL )
{
for( int i = 0; i < paramCount; i++ )
{
delete knobFModel[ i ];
delete vstKnobs[ i ];
}
}
if( vstKnobs != NULL )
{
delete [] vstKnobs;
vstKnobs = NULL;
}
if( knobFModel != NULL )
{
delete [] knobFModel;
knobFModel = NULL;
}
if( m_scrollArea != NULL )
{
// delete m_scrollArea;
m_scrollArea = NULL;
}
if( m_subWindow != NULL )
{
m_subWindow->setAttribute( Qt::WA_DeleteOnClose );
m_subWindow->close();
if( m_subWindow != NULL )
{
delete m_subWindow;
}
m_subWindow = NULL;
}
if( p_subWindow != NULL )
{
p_subWindow = NULL;
}
m_pluginMutex.lock();
if( m_plugin )
{
@@ -398,7 +456,7 @@ VestigeInstrumentView::VestigeInstrumentView( Instrument * _instrument,
m_rolLPresetButton->setInactiveGraphic( PLUGIN_NAME::getIconPixmap(
"stepper-left" ) );
connect( m_rolLPresetButton, SIGNAL( clicked() ), this,
SLOT( rolrPreset() ) );
SLOT( previousProgram() ) );
toolTip::add( m_rolLPresetButton, tr( "Previous (-)" ) );
m_rolLPresetButton->setShortcut( Qt::Key_Minus );
@@ -432,7 +490,7 @@ VestigeInstrumentView::VestigeInstrumentView( Instrument * _instrument,
m_rolRPresetButton->setInactiveGraphic( PLUGIN_NAME::getIconPixmap(
"stepper-right" ) );
connect( m_rolRPresetButton, SIGNAL( clicked() ), this,
SLOT( rollPreset() ) );
SLOT( nextProgram() ) );
toolTip::add( m_rolRPresetButton, tr( "Next (+)" ) );
m_rolRPresetButton->setShortcut( Qt::Key_Plus );
@@ -501,11 +559,12 @@ void VestigeInstrumentView::updateMenu( void )
{
// get all presets -
if ( m_vi->m_plugin != NULL ) {
m_vi->m_plugin->loadPrograms( 1 );
if ( m_vi->m_plugin != NULL )
{
m_vi->m_plugin->loadProgramNames();
QWidget::update();
QString str = m_vi->m_plugin->presetsString();
QString str = m_vi->m_plugin->allProgramNames();
QStringList list1 = str.split("|");
@@ -600,13 +659,13 @@ void VestigeInstrumentView::openPlugin()
void VestigeInstrumentView::openPreset( void )
void VestigeInstrumentView::openPreset()
{
if ( m_vi->m_plugin != NULL ) {
m_vi->m_plugin->openPreset( );
bool converted;
QString str = m_vi->m_plugin->presetString().section("/", 0, 0);
QString str = m_vi->m_plugin->currentProgramName().section("/", 0, 0);
if (str != "")
lastPosInMenu = str.toInt(&converted, 10) - 1;
QWidget::update();
@@ -617,10 +676,11 @@ void VestigeInstrumentView::openPreset( void )
void VestigeInstrumentView::savePreset( void )
void VestigeInstrumentView::savePreset()
{
if ( m_vi->m_plugin != NULL ) {
if ( m_vi->m_plugin != NULL )
{
m_vi->m_plugin->savePreset( );
/* bool converted;
QString str = m_vi->m_plugin->presetString().section("/", 0, 0);
@@ -634,13 +694,13 @@ void VestigeInstrumentView::savePreset( void )
void VestigeInstrumentView::rollPreset( void )
void VestigeInstrumentView::nextProgram()
{
if ( m_vi->m_plugin != NULL ) {
m_vi->m_plugin->rollPreset( 1 );
m_vi->m_plugin->rotateProgram( 1 );
bool converted;
QString str = m_vi->m_plugin->presetString().section("/", 0, 0);
QString str = m_vi->m_plugin->currentProgramName().section("/", 0, 0);
if (str != "")
lastPosInMenu = str.toInt(&converted, 10) - 1;
QWidget::update();
@@ -650,13 +710,13 @@ void VestigeInstrumentView::rollPreset( void )
void VestigeInstrumentView::rolrPreset( void )
void VestigeInstrumentView::previousProgram()
{
if ( m_vi->m_plugin != NULL ) {
m_vi->m_plugin->rollPreset( -1 );
m_vi->m_plugin->rotateProgram( -1 );
bool converted;
QString str = m_vi->m_plugin->presetString().section("/", 0, 0);
QString str = m_vi->m_plugin->currentProgramName().section("/", 0, 0);
if (str != "")
lastPosInMenu = str.toInt(&converted, 10) - 1;
QWidget::update();
@@ -673,7 +733,7 @@ void VestigeInstrumentView::selPreset( void )
if (action)
if ( m_vi->m_plugin != NULL ) {
lastPosInMenu = action->data().toInt();
m_vi->m_plugin->rollPreset( action->data().toInt() + 2 );
m_vi->m_plugin->setProgram( action->data().toInt() );
QWidget::update();
}
}
@@ -683,8 +743,7 @@ void VestigeInstrumentView::selPreset( void )
void VestigeInstrumentView::toggleGUI( void )
{
QMutexLocker ml( &m_vi->m_pluginMutex );
if( m_vi->m_plugin == NULL )
if( m_vi == NULL || m_vi->m_plugin == NULL )
{
return;
}
@@ -711,7 +770,7 @@ void VestigeInstrumentView::noteOffAll( void )
m_vi->m_pluginMutex.lock();
if( m_vi->m_plugin != NULL )
{
for( int key = 0; key < NumKeys; ++key )
for( int key = 0; key <= MidiMaxNote; ++key )
{
m_vi->m_plugin->processMidiEvent(
midiEvent( MidiNoteOff, 0, key, 0 ), 0 );
@@ -788,9 +847,15 @@ void VestigeInstrumentView::paintEvent( QPaintEvent * )
p.setPen( QColor( 251, 41, 8 ) );
f.setBold( false );
p.setFont( pointSize<8>( f ) );
p.drawText( 10, 114, tr( "by" ) + " " +
p.drawText( 10, 114, tr( "by " ) +
m_vi->m_plugin->vendorString() );
p.drawText( 10, 225, m_vi->m_plugin->presetString() );
p.drawText( 10, 225, m_vi->m_plugin->currentProgramName() );
}
if( m_vi->m_subWindow != NULL )
{
m_vi->m_subWindow->setWindowTitle( m_vi->instrumentTrack()->name()
+ tr( " - VST plugin control" ) );
}
// m_pluginMutex.unlock();
}
@@ -812,7 +877,8 @@ manageVestigeInstrumentView::manageVestigeInstrumentView( Instrument * _instrume
m_vi->m_subWindow->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
m_vi->m_subWindow->setFixedSize( 960, 300);
m_vi->m_subWindow->setWidget(m_vi->m_scrollArea);
m_vi->m_subWindow->setWindowTitle(m_vi->m_plugin->name());
m_vi->m_subWindow->setWindowTitle( m_vi->instrumentTrack()->name()
+ tr( " - VST plugin control" ) );
m_vi->m_subWindow->setWindowIcon( PLUGIN_NAME::getIconPixmap( "logo" ) );
//m_vi->m_subWindow->setAttribute(Qt::WA_DeleteOnClose);
@@ -829,49 +895,77 @@ manageVestigeInstrumentView::manageVestigeInstrumentView( Instrument * _instrume
l->addWidget( m_syncButton, 0, 0, 1, 2, Qt::AlignLeft );
m_displayAutomatedOnly = new QPushButton( tr( "Automated" ), this );
connect( m_displayAutomatedOnly, SIGNAL( clicked() ), this,
SLOT( displayAutomatedOnly() ) );
m_displayAutomatedOnly->setWhatsThis(
tr( "Click here if you want to display automated parameters only." ) );
l->addWidget( m_displayAutomatedOnly, 0, 1, 1, 2, Qt::AlignLeft );
m_closeButton = new QPushButton( tr( " Close " ), widget );
connect( m_closeButton, SIGNAL( clicked() ), this,
SLOT( closeWindow() ) );
m_closeButton->setWhatsThis(
tr( "Close VST plugin knob-controller window." ) );
l->addWidget( m_closeButton, 0, 2, 1, 7, Qt::AlignLeft );
for( int i = 0; i < 10; i++ )
{
l->addItem( new QSpacerItem( 68, 45, QSizePolicy::Fixed, QSizePolicy::Fixed ), 0, i );
}
const QMap<QString, QString> & dump = m_vi->m_plugin->parameterDump();
int paramCount = (dump).size();
m_vi->paramCount = dump.size();
bool isVstKnobs = true;
if (m_vi->vstKnobs == NULL) {
m_vi->vstKnobs = new knob *[paramCount];
m_vi->vstKnobs = new knob *[ m_vi->paramCount ];
isVstKnobs = false;
}
if (m_vi->knobFModel == NULL) {
m_vi->knobFModel = new FloatModel *[paramCount];
m_vi->knobFModel = new FloatModel *[ m_vi->paramCount ];
}
char paramStr[35];
QStringList list1;
QStringList s_dumpValues;
if (isVstKnobs == false) {
for (int i = 0; i < paramCount; i++) {
for( int i = 0; i < m_vi->paramCount; i++ )
{
sprintf( paramStr, "param%d", i);
list1 = dump[paramStr].split(":");
s_dumpValues = dump[ paramStr ].split( ":" );
m_vi->vstKnobs[i] = new knob( knobBright_26, this );
m_vi->vstKnobs[i]->setHintText( list1.at(1) + ":", "");
m_vi->vstKnobs[i]->setLabel( list1.at(1).left(15) );
m_vi->vstKnobs[ i ] = new knob( knobBright_26, this, s_dumpValues.at( 1 ) );
m_vi->vstKnobs[ i ]->setHintText( s_dumpValues.at( 1 ) + ":", "" );
m_vi->vstKnobs[ i ]->setLabel( s_dumpValues.at( 1 ).left( 15 ) );
sprintf( paramStr, "%d", i);
m_vi->knobFModel[i] = new FloatModel( (list1.at(2)).toFloat(), 0.0f, 1.0f, 0.01f,
castModel<vestigeInstrument>(), tr( paramStr ) );
m_vi->knobFModel[ i ] = new FloatModel( (s_dumpValues.at( 2 )).toFloat(),
0.0f, 1.0f, 0.01f, castModel<vestigeInstrument>(), tr( paramStr ) );
connect( m_vi->knobFModel[i], SIGNAL( dataChanged() ), this, SLOT( setParameter() ) );
m_vi->vstKnobs[i] ->setModel( m_vi->knobFModel[i] );
}
}
int i = 0;
for (int lrow = 0+1; lrow < (int(paramCount / 10) + 1)+1; lrow++) {
for (int lcolumn = 0; lcolumn < 10; lcolumn++) {
if (i < paramCount)
for( int lrow = 1; lrow < ( int( m_vi->paramCount / 10 ) + 1 ) + 1; lrow++ )
{
for( int lcolumn = 0; lcolumn < 10; lcolumn++ )
{
if( i < m_vi->paramCount )
{
l->addWidget( m_vi->vstKnobs[i], lrow, lcolumn, Qt::AlignCenter );
}
i++;
}
}
l->setRowStretch( (int(paramCount / 10) + 1), 1 );
l->setRowStretch( ( int( m_vi->paramCount / 10) + 1), 1 );
l->setColumnStretch( 10, 1 );
widget->setLayout(l);
@@ -890,29 +984,84 @@ manageVestigeInstrumentView::manageVestigeInstrumentView( Instrument * _instrume
void manageVestigeInstrumentView::closeWindow()
{
m_vi->m_subWindow->hide();
}
void manageVestigeInstrumentView::syncPlugin( void )
{
char paramStr[35];
QStringList list1;
QStringList s_dumpValues;
const QMap<QString, QString> & dump = m_vi->m_plugin->parameterDump();
float f;
float f_value;
for (int i = 0; i<(dump).size(); i++) {
sprintf( paramStr, "param%d", i);
list1 = dump[paramStr].split(":");
f = (list1.at(2)).toFloat();
m_vi->knobFModel[i]->setValue(f);
m_vi->knobFModel[i]->setInitValue(f);
for( int i = 0; i < m_vi->paramCount; i++ )
{
// only not automated knobs are synced from VST
// those auto-setted values are not jurnaled, tracked for undo / redo
if( !( m_vi->knobFModel[ i ]->isAutomated() ||
m_vi->knobFModel[ i ]->getControllerConnection() ) )
{
sprintf( paramStr, "param%d", i );
s_dumpValues = dump[ paramStr ].split( ":" );
f_value = ( s_dumpValues.at( 2 ) ).toFloat();
m_vi->knobFModel[ i ]->setAutomatedValue( f_value );
m_vi->knobFModel[ i ]->setInitValue( f_value );
}
}
}
void manageVestigeInstrumentView::displayAutomatedOnly( void )
{
bool isAuto = QString::compare( m_displayAutomatedOnly->text(), tr( "Automated" ) ) == 0;
for( int i = 0; i< m_vi->paramCount; i++ )
{
if( !( m_vi->knobFModel[ i ]->isAutomated() ||
m_vi->knobFModel[ i ]->getControllerConnection() ) )
{
if( m_vi->vstKnobs[ i ]->isVisible() == true && isAuto )
{
m_vi->vstKnobs[ i ]->hide();
m_displayAutomatedOnly->setText( "All" );
} else {
m_vi->vstKnobs[ i ]->show();
m_displayAutomatedOnly->setText( "Automated" );
}
}
}
}
manageVestigeInstrumentView::~manageVestigeInstrumentView()
{
if( m_vi->knobFModel != NULL )
{
for( int i = 0; i < m_vi->paramCount; i++ )
{
delete m_vi->knobFModel[ i ];
delete m_vi->vstKnobs[ i ];
}
}
if (m_vi->vstKnobs != NULL) {
delete []m_vi->vstKnobs;
m_vi->vstKnobs = NULL;
}
if( m_vi->knobFModel != NULL )
{
delete [] m_vi->knobFModel;
m_vi->knobFModel = NULL;
}
if (m_vi->m_scrollArea != NULL) {
delete m_vi->m_scrollArea;
@@ -927,6 +1076,8 @@ manageVestigeInstrumentView::~manageVestigeInstrumentView()
delete m_vi->m_subWindow;
m_vi->m_subWindow = NULL;
}
m_vi->p_subWindow = NULL;
}
@@ -987,6 +1138,8 @@ void manageVestigeInstrumentView::dropEvent( QDropEvent * _de )
void manageVestigeInstrumentView::paintEvent( QPaintEvent * )
{
m_vi->m_subWindow->setWindowTitle( m_vi->instrumentTrack()->name()
+ tr( " - VST plugin control" ) );
}

View File

@@ -1,7 +1,7 @@
/*
* vestige.h - instrument VeSTige for hosting VST-plugins
*
* Copyright (c) 2005-2011 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2005-2012 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -92,6 +92,7 @@ private:
knob ** vstKnobs;
FloatModel ** knobFModel;
QObject * p_subWindow;
int paramCount;
friend class VestigeInstrumentView;
@@ -110,7 +111,9 @@ public:
protected slots:
void syncPlugin( void );
void displayAutomatedOnly( void );
void setParameter( void );
void closeWindow();
protected:
@@ -127,6 +130,8 @@ private:
QWidget *widget;
QGridLayout * l;
QPushButton * m_syncButton;
QPushButton * m_displayAutomatedOnly;
QPushButton * m_closeButton;
} ;
@@ -145,8 +150,8 @@ protected slots:
void managePlugin( void );
void openPreset( void );
void savePreset( void );
void rollPreset( void );
void rolrPreset( void );
void nextProgram();
void previousProgram();
void selPreset( void );
void toggleGUI( void );
void noteOffAll( void );

View File

@@ -6,6 +6,7 @@ IF(LMMS_BUILD_WIN32)
ADD_DEFINITIONS(-DPTW32_STATIC_LIB)
ADD_EXECUTABLE(RemoteVstPlugin ${CMAKE_CURRENT_SOURCE_DIR}/RemoteVstPlugin.cpp)
TARGET_LINK_LIBRARIES(RemoteVstPlugin -lQtCore4 -lpthread -lgdi32 -lws2_32)
SET_TARGET_PROPERTIES(RemoteVstPlugin PROPERTIES COMPILE_FLAGS "${COMPILE_FLAGS} -O3")
ADD_CUSTOM_COMMAND(TARGET RemoteVstPlugin POST_BUILD COMMAND ${STRIP} ${CMAKE_CURRENT_BINARY_DIR}/RemoteVstPlugin.exe)
INSTALL(TARGETS RemoteVstPlugin RUNTIME DESTINATION ${PLUGIN_DIR})

View File

@@ -1,7 +1,7 @@
/*
* RemoteVstPlugin.cpp - LMMS VST Support Layer (RemotePlugin client)
*
* Copyright (c) 2005-2010 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2005-2012 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -92,7 +92,20 @@ struct ERect
#include "midi.h"
#include "communication.h"
#include "VST_sync_shm.h"
#ifdef LMMS_BUILD_WIN32
#define USE_QT_SHMEM
#endif
#ifndef USE_QT_SHMEM
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#endif
static VstHostLanguages hlang = LanguageEnglish;
@@ -163,8 +176,11 @@ public:
// determine product-string of plugin
const char * pluginProductString();
// determine name of plugipn preset
const char * presetName();
// determine name of current program
const char * programName();
// send name of current program back to host
void sendCurrentProgramName();
// do a complete parameter-dump and post it
void getParameterDump();
@@ -182,13 +198,16 @@ public:
void loadChunkFromFile( const std::string & _file, int _len );
// restore settings chunk of plugin from file
void loadChunkFromPresetFile( const std::string & _file );
void loadPresetFile( const std::string & _file );
// restore settings chunk of plugin from file
void rotateProgram( int _len );
// sets given program index
void setProgram( int index );
// Load names VST of presets/programs
void loadPrograms( int _len );
// rotate current program by given offset
void rotateProgram( int offset );
// Load names of presets/programs
void getProgramNames();
// Save presets/programs
void savePreset( const std::string & _file );
@@ -255,13 +274,23 @@ private:
lock();
if( m_plugin )
{
ret = m_plugin->dispatcher( m_plugin, cmd, param1,
param2, p, f );
ret = m_plugin->dispatcher( m_plugin, cmd, param1, param2, p, f );
}
unlock();
return ret;
}
// thread-safe dispatching of plugin
int pluginDispatchNoLocking( int cmd, int param1 = 0, int param2 = 0, void * p = NULL, float f = 0 )
{
if( m_plugin )
{
return m_plugin->dispatcher( m_plugin, cmd, param1, param2, p, f );
}
return 0;
}
std::string m_shortName;
HINSTANCE m_libInst;
@@ -285,6 +314,19 @@ private:
bpm_t m_bpm;
double m_currentSamplePos;
int m_currentProgram;
// host to plugin synchronisation data structure
struct in
{
float lastppqPos;
float m_Timestamp;
} ;
in * m_in;
int m_shmID;
sncVST * m_SncVSTplug;
} ;
@@ -306,15 +348,63 @@ RemoteVstPlugin::RemoteVstPlugin( key_t _shm_in, key_t _shm_out ) :
m_outputs( NULL ),
m_midiEvents(),
m_bpm( 0 ),
m_currentSamplePos( 0 )
m_currentSamplePos( 0 ),
m_currentProgram( -1 ),
m_in( NULL ),
m_shmID( -1 ),
m_SncVSTplug( NULL )
{
pthread_mutex_init( &m_pluginLock, NULL );
__plugin = this;
#ifndef USE_QT_SHMEM
key_t key;
if( ( key = ftok( VST_SNC_SHM_KEY_FILE, 'R' ) ) == -1 )
{
perror( "RemoteVstPlugin.cpp::ftok" );
}
else
{ // connect to shared memory segment
if( ( m_shmID = shmget( key, 0, 0 ) ) == -1 )
{
perror( "RemoteVstPlugin.cpp::shmget" );
}
else
{ // attach segment
m_SncVSTplug = (sncVST *)shmat(m_shmID, 0, 0);
if( m_SncVSTplug == (sncVST *)( -1 ) )
{
perror( "RemoteVstPlugin.cpp::shmat" );
}
}
}
#else
m_SncVSTplug = RemotePluginClient::getQtVSTshm();
#endif
if( m_SncVSTplug == NULL )
{
fprintf(stderr, "RemoteVstPlugin.cpp: "
"Failed to initialize shared memory for VST synchronization.\n"
" (VST-host synchronization will be disabled)\n");
m_SncVSTplug = (sncVST*) malloc( sizeof( sncVST ) );
m_SncVSTplug->isPlayin = true;
m_SncVSTplug->timeSigNumer = 4;
m_SncVSTplug->timeSigDenom = 4;
m_SncVSTplug->ppqPos = 0;
m_SncVSTplug->isCycle = false;
m_SncVSTplug->hasSHM = false;
m_SncVSTplug->m_sampleRate = sampleRate();
}
m_in = ( in* ) new char[ sizeof( in ) ];
m_in->lastppqPos = 0;
m_in->m_Timestamp = -1;
// process until we have loaded the plugin
while( 1 )
{
{
message m = receiveMessage();
processMessage( m );
if( m.id == IdVstLoadPlugin || m.id == IdQuit )
@@ -329,6 +419,21 @@ RemoteVstPlugin::RemoteVstPlugin( key_t _shm_in, key_t _shm_out ) :
RemoteVstPlugin::~RemoteVstPlugin()
{
#ifndef USE_QT_SHMEM
// detach shared memory segment
if( shmdt( m_SncVSTplug ) == -1)
{
if( __plugin->m_SncVSTplug->hasSHM )
{
perror( "~RemoteVstPlugin::shmdt" );
}
if( m_SncVSTplug != NULL )
{
delete m_SncVSTplug;
m_SncVSTplug = NULL;
}
}
#endif
if( m_window != NULL )
{
pluginDispatch( effEditClose );
@@ -401,32 +506,53 @@ bool RemoteVstPlugin::processMessage( const message & _m )
sendMessage( IdLoadSettingsFromFile );
break;
case IdLoadChunkFromPresetFile:
loadChunkFromPresetFile( _m.getString( 0 ) );
sendMessage( IdLoadChunkFromPresetFile );
case IdLoadPresetFile:
loadPresetFile( _m.getString( 0 ) );
sendMessage( IdLoadPresetFile );
break;
case IdRotateProgram:
case IdVstSetProgram:
setProgram( _m.getInt( 0 ) );
sendMessage( IdVstSetProgram );
break;
case IdVstCurrentProgram:
sendMessage( message( IdVstCurrentProgram ).addInt( m_currentProgram ) );
break;
case IdVstRotateProgram:
rotateProgram( _m.getInt( 0 ) );
sendMessage( IdRotateProgram );
sendMessage( IdVstRotateProgram );
break;
case IdLoadPrograms:
loadPrograms( _m.getInt( 0 ) );
sendMessage( IdLoadPrograms );
case IdVstProgramNames:
getProgramNames();
break;
case IdSavePreset:
case IdSavePresetFile:
savePreset( _m.getString( 0 ) );
sendMessage( IdSavePreset );
sendMessage( IdSavePresetFile );
break;
case IdSetParameter:
case IdVstSetParameter:
lock();
m_plugin->setParameter( m_plugin, _m.getInt( 0 ), _m.getFloat( 1 ) );
sendMessage( IdSetParameter );
unlock();
//sendMessage( IdVstSetParameter );
break;
case IdVstIdleUpdate:
{
int newCurrentProgram = pluginDispatch( effGetProgram );
if( newCurrentProgram != m_currentProgram )
{
m_currentProgram = newCurrentProgram;
sendCurrentProgramName();
}
break;
}
default:
return RemotePluginClient::processMessage( _m );
@@ -447,6 +573,12 @@ void RemoteVstPlugin::init( const std::string & _plugin_file )
updateInOutCount();
// some plugins have to set samplerate during init
if( m_SncVSTplug->hasSHM )
{
updateSampleRate();
}
/* set program to zero */
/* i comment this out because it breaks dfx Geometer
* looks like we cant set programs for it
@@ -519,10 +651,12 @@ void RemoteVstPlugin::initEditor()
}
#ifdef LMMS_BUILD_LINUX
m_window = CreateWindowEx( 0, "LVSL", m_shortName.c_str(),
( WS_OVERLAPPEDWINDOW | WS_THICKFRAME ) & ~WS_MAXIMIZEBOX,
0, 0, 10, 10, NULL, NULL, hInst, NULL );
//m_window = CreateWindowEx( 0, "LVSL", m_shortName.c_str(),
// ( WS_OVERLAPPEDWINDOW | WS_THICKFRAME ) & ~WS_MAXIMIZEBOX,
// 0, 0, 10, 10, NULL, NULL, hInst, NULL );
m_window = CreateWindowEx( 0 , "LVSL", m_shortName.c_str(),
WS_POPUP | WS_SYSMENU | WS_BORDER , 0, 0, 10, 10, NULL, NULL, hInst, NULL);
#else
m_windowID = 1; // arbitrary value on win32 to signal
// vstPlugin-class that we have an editor
@@ -609,10 +743,7 @@ bool RemoteVstPlugin::load( const std::string & _plugin_file )
if( m_plugin->magic != kEffectMagic )
{
char buf[256];
sprintf( buf, "%s is not a VST plugin\n",
_plugin_file.c_str() );
debugMessage( buf );
debugMessage( "File is not a VST plugin\n" );
return false;
}
@@ -675,6 +806,8 @@ void RemoteVstPlugin::process( const sampleFrame * _in, sampleFrame * _out )
memset( m_outputs[i], 0, bufferSize() * sizeof( float ) );
}
lock();
#ifdef OLD_VST_SDK
if( m_plugin->flags & effFlagsCanReplacing )
{
@@ -690,8 +823,9 @@ void RemoteVstPlugin::process( const sampleFrame * _in, sampleFrame * _out )
}
#endif
m_currentSamplePos += bufferSize();
unlock();
m_currentSamplePos += bufferSize();
}
@@ -768,34 +902,53 @@ const char * RemoteVstPlugin::pluginProductString()
const char * RemoteVstPlugin::presetName()
const char * RemoteVstPlugin::programName()
{
static char buf[32];
buf[0] = 0;
static char buf[24];
m_plugin->dispatcher(m_plugin, effGetProgramName, 0, 0, buf, 0);
memset( buf, 0, sizeof( buf ) );
pluginDispatch( effGetProgramName, 0, 0, buf );
buf[23] = 0;
buf[31] = 0;
return buf;
}
void RemoteVstPlugin::sendCurrentProgramName()
{
char presName[64];
sprintf( presName, "%d/%d: %s", pluginDispatch( effGetProgram ) + 1, m_plugin->numPrograms, programName() );
sendMessage( message( IdVstCurrentProgramName ).addString( presName ) );
}
void RemoteVstPlugin::getParameterDump()
{
char curPresName[30];
//VstParameterProperties vst_props;
message m( IdVstParameterDump );
m.addInt( m_plugin->numParams );
for( int i = 0; i < m_plugin->numParams; ++i )
{
//pluginDispatch( effGetParameterProperties, i, 0, &vst_props );
m_plugin->dispatcher(m_plugin, effGetParamName, i, 0, curPresName, 0);
m.addInt( i );
m.addString( /*vst_props.shortLabel*/curPresName );
m.addFloat( m_plugin->getParameter( m_plugin, i ) );
}
sendMessage( m );
lock();
message m( IdVstParameterDump );
m.addInt( m_plugin->numParams );
for( int i = 0; i < m_plugin->numParams; ++i )
{
char paramName[32];
memset( paramName, 0, sizeof( paramName ) );
pluginDispatchNoLocking( effGetParamName, i, 0, paramName );
paramName[sizeof(paramName)-1] = 0;
m.addInt( i );
m.addString( paramName );
m.addFloat( m_plugin->getParameter( m_plugin, i ) );
}
unlock();
sendMessage( m );
}
@@ -803,6 +956,7 @@ void RemoteVstPlugin::getParameterDump()
void RemoteVstPlugin::setParameterDump( const message & _m )
{
lock();
const int n = _m.getInt( 0 );
const int params = ( n > m_plugin->numParams ) ?
m_plugin->numParams : n;
@@ -815,6 +969,7 @@ void RemoteVstPlugin::setParameterDump( const message & _m )
item.value = _m.getFloat( ++p );
m_plugin->setParameter( m_plugin, item.index, item.value );
}
unlock();
}
@@ -869,55 +1024,86 @@ void RemoteVstPlugin::saveChunkToFile( const std::string & _file )
void RemoteVstPlugin::rotateProgram( int _len )
void RemoteVstPlugin::setProgram( int program )
{
int currProgram;
if (isInitialized() == false) return;
if (_len <= 1) {
currProgram = m_plugin->dispatcher(m_plugin, effGetProgram, 0, 0, 0, 0) + _len;
if (currProgram >= m_plugin->numPrograms) currProgram = m_plugin->numPrograms - 1;
if (currProgram < 0) currProgram = 0;
m_plugin->dispatcher(m_plugin, effSetProgram, 0, currProgram++, 0, 0);
} else {
m_plugin->dispatcher(m_plugin, effSetProgram, 0, _len - 2, 0, 0);
currProgram = _len - 1;
if( isInitialized() == false )
{
return;
}
char presName[30];
sprintf( presName, " %d/%d: %s", currProgram, m_plugin->numPrograms, presetName() );
if( program < 0 )
{
program = 0;
}
else if( program >= m_plugin->numPrograms )
{
program = m_plugin->numPrograms - 1;
}
pluginDispatch( effSetProgram, 0, program );
sendMessage( message( IdVstPluginPresetString ).addString( presName ) );
sendCurrentProgramName();
}
void RemoteVstPlugin::loadPrograms( int _len )
void RemoteVstPlugin::rotateProgram( int offset )
{
if( isInitialized() == false )
{
return;
}
int newProgram = pluginDispatch( effGetProgram ) + offset;
if( newProgram < 0 )
{
newProgram = 0;
}
else if( newProgram >= m_plugin->numPrograms )
{
newProgram = m_plugin->numPrograms - 1;
}
pluginDispatch( effSetProgram, 0, newProgram );
sendCurrentProgramName();
}
void RemoteVstPlugin::getProgramNames()
{
char presName[1024+256*30];
char curProgName[30];
if (isInitialized() == false) return;
bool progNameIndexed = (m_plugin->dispatcher(m_plugin, 29, 0, -1, curProgName, 0) == 1);
bool progNameIndexed = ( pluginDispatch( 29, 0, -1, curProgName ) == 1 );
if (m_plugin->numPrograms > 1) {
if (progNameIndexed) {
for (int i = 0; i< (m_plugin->numPrograms >= 256?256:m_plugin->numPrograms); i++) {
m_plugin->dispatcher(m_plugin, 29, i, -1, curProgName, 0);
for (int i = 0; i< (m_plugin->numPrograms >= 256?256:m_plugin->numPrograms); i++)
{
pluginDispatch( 29, i, -1, curProgName );
if (i == 0) sprintf( presName, "%s", curProgName );
else sprintf( presName + strlen(presName), "|%s", curProgName );
}
} else {
int currProgram = m_plugin->dispatcher(m_plugin, effGetProgram, 0, 0, 0, 0);
for (int i = 0; i< (m_plugin->numPrograms >= 256?256:m_plugin->numPrograms); i++) {
m_plugin->dispatcher(m_plugin, effSetProgram, 0, i, 0, 0);
if (i == 0) sprintf( presName, "%s", presetName() );
else sprintf( presName + strlen(presName), "|%s", presetName() );
}
m_plugin->dispatcher(m_plugin, effSetProgram, 0, currProgram, 0, 0);
}
} else sprintf( presName, "%s", presetName() );
else
{
int currProgram = pluginDispatch( effGetProgram );
for (int i = 0; i< (m_plugin->numPrograms >= 256?256:m_plugin->numPrograms); i++)
{
pluginDispatch( effSetProgram, 0, i );
if (i == 0) sprintf( presName, "%s", programName() );
else sprintf( presName + strlen(presName), "|%s", programName() );
}
pluginDispatch( effSetProgram, 0, currProgram );
}
} else sprintf( presName, "%s", programName() );
sendMessage( message( IdVstPluginPresetsString ).addString( presName ) );
presName[sizeof(presName)-1] = 0;
sendMessage( message( IdVstProgramNames ).addString( presName ) );
}
@@ -950,24 +1136,27 @@ void RemoteVstPlugin::savePreset( const std::string & _file )
bool isPreset = _file.substr( _file.find_last_of( "." ) + 1 ) == "fxp";
int presNameLen = _file.find_last_of( "/" ) + _file.find_last_of( "\\" ) + 2;
if (isPreset) {
for (int i = 0; i < _file.length() - 4 - presNameLen; i++)
if (isPreset)
{
for (size_t i = 0; i < _file.length() - 4 - presNameLen; i++)
progName[i] = i < 23 ? _file[presNameLen + i] : 0;
m_plugin->dispatcher(m_plugin, 4, 0, 0, progName, 0);
} // m_plugin->dispatcher( m_plugin, effGetProgramName, 0, 0, progName, 0.0f );
pluginDispatch( 4, 0, 0, progName );
}
if ( chunky )
chunk_size = m_plugin->dispatcher( m_plugin, 23, isPreset, 0, &data, false );
chunk_size = pluginDispatch( 23, isPreset, 0, &data );
else {
if (isPreset) {
chunk_size = m_plugin->numParams * sizeof( float );
data = new char[ chunk_size ];
unsigned int* toUIntArray = reinterpret_cast<unsigned int*>( data );
lock();
for ( int i = 0; i < m_plugin->numParams; i++ )
{
float value = m_plugin->getParameter( m_plugin, i );
unsigned int * pValue = ( unsigned int * ) &value;
toUIntArray[ i ] = endian_swap( *pValue );
}
unlock();
} else chunk_size = (((m_plugin->numParams * sizeof( float )) + 56)*m_plugin->numPrograms);
}
@@ -999,7 +1188,7 @@ void RemoteVstPlugin::savePreset( const std::string & _file )
fwrite ( data, 1, chunk_size, stream );
else {
int numPrograms = m_plugin->numPrograms;
int currProgram = m_plugin->dispatcher(m_plugin, effGetProgram, 0, 0, 0, 0);
int currProgram = pluginDispatch( effGetProgram );
chunk_size = (m_plugin->numParams * sizeof( float ));
pBank->byteSize = chunk_size + 48;
pBank->byteSize = endian_swap( pBank->byteSize );
@@ -1010,18 +1199,20 @@ void RemoteVstPlugin::savePreset( const std::string & _file )
unsigned int* pValue,* toUIntArray = reinterpret_cast<unsigned int*>( data );
float value;
for (int j = 0; j < numPrograms; j++) {
m_plugin->dispatcher(m_plugin, effSetProgram, 0, j, 0, 0);
m_plugin->dispatcher(m_plugin, effGetProgramName, 0, 0, pBank->prgName, 0);
pluginDispatch( effSetProgram, 0, j );
pluginDispatch( effGetProgramName, 0, 0, pBank->prgName );
fwrite ( pBank, 1, 56, stream );
lock();
for ( int i = 0; i < m_plugin->numParams; i++ )
{
value = m_plugin->getParameter( m_plugin, i );
pValue = ( unsigned int * ) &value;
toUIntArray[ i ] = endian_swap( *pValue );
}
unlock();
fwrite ( data, 1, chunk_size, stream );
}
m_plugin->dispatcher(m_plugin, effSetProgram, 0, currProgram, 0, 0);
pluginDispatch( effSetProgram, 0, currProgram );
}
fclose( stream );
@@ -1034,7 +1225,7 @@ void RemoteVstPlugin::savePreset( const std::string & _file )
void RemoteVstPlugin::loadChunkFromPresetFile( const std::string & _file )
void RemoteVstPlugin::loadPresetFile( const std::string & _file )
{
void * chunk = NULL;
unsigned int * pLen = new unsigned int[ 1 ];
@@ -1048,7 +1239,7 @@ void RemoteVstPlugin::loadChunkFromPresetFile( const std::string & _file )
float * pFloat;
if (m_plugin->uniqueID != pBank->fxID) {
sendMessage( message( IdVstPluginPresetString ).
sendMessage( message( IdVstCurrentProgramName ).
addString( "Error: Plugin UniqID not match" ) );
fclose( stream );
delete[] (unsigned int*)pLen;
@@ -1070,47 +1261,50 @@ void RemoteVstPlugin::loadChunkFromPresetFile( const std::string & _file )
if(_file.substr(_file.find_last_of(".") + 1) == "fxp") {
pBank->prgName[23] = 0;
m_plugin->dispatcher(m_plugin, 4, 0, 0, pBank->prgName, 0);
pluginDispatch( 4, 0, 0, pBank->prgName );
if(pBank->fxMagic != 0x6B437846)
m_plugin->dispatcher(m_plugin, 24, 1, len, chunk, 0);
else {
pluginDispatch( 24, 1, len, chunk );
else
{
lock();
unsigned int* toUIntArray = reinterpret_cast<unsigned int*>( chunk );
for (int i = 0; i < pBank->numPrograms; i++ ) {
for (int i = 0; i < pBank->numPrograms; i++ )
{
toUInt = endian_swap( toUIntArray[ i ] );
pFloat = ( float* ) &toUInt;
m_plugin->setParameter( m_plugin, i, *pFloat );
}
unlock();
}
} else {
if(pBank->fxMagic != 0x6B427846) {
m_plugin->dispatcher(m_plugin, 24, 0, len, chunk, 0);
pluginDispatch( 24, 0, len, chunk );
} else {
int numPrograms = pBank->numPrograms;
unsigned int * toUIntArray;
int currProgram = m_plugin->dispatcher(m_plugin, effGetProgram, 0, 0, 0, 0);
int currProgram = pluginDispatch( effGetProgram );
chunk = new char[ len = sizeof(float)*m_plugin->numParams ];
toUIntArray = reinterpret_cast<unsigned int *>( chunk );
lock();
for (int i =0; i < numPrograms; i++) {
fread (pBank, 1, 56, stream);
fread (chunk, len, 1, stream);
m_plugin->dispatcher(m_plugin, effSetProgram, 0, i, 0, 0);
pluginDispatch( effSetProgram, 0, i );
pBank->prgName[23] = 0;
m_plugin->dispatcher(m_plugin, 4, 0, 0, pBank->prgName, 0);
pluginDispatch( 4, 0, 0, pBank->prgName );
for (int j = 0; j < m_plugin->numParams; j++ ) {
toUInt = endian_swap( toUIntArray[ j ] );
pFloat = ( float* ) &toUInt;
m_plugin->setParameter( m_plugin, j, *pFloat );
}
}
m_plugin->dispatcher(m_plugin, effSetProgram, 0, currProgram, 0, 0);
unlock();
pluginDispatch( effSetProgram, 0, currProgram );
fclose( stream );
}
}
char presName[30];
int currProgram = m_plugin->dispatcher(m_plugin, effGetProgram, 0, 0, 0, 0) + 1;
sprintf( presName, " %d/%d: %s", currProgram, m_plugin->numPrograms, presetName() );
sendMessage( message( IdVstPluginPresetString ).addString( presName ) );
sendCurrentProgramName();
delete[] (unsigned int*)pLen;
delete[] (sBank*)pBank;
@@ -1250,16 +1444,62 @@ intptr_t RemoteVstPlugin::hostCallback( AEffect * _effect, int32_t _opcode,
// fields are required (see valid masks above), as some
// items may require extensive conversions
memset( &_timeInfo, 0, sizeof( _timeInfo ) );
// Shared memory was initialised? - see song.cpp
//assert( __plugin->m_SncVSTplug != NULL );
memset( &_timeInfo, 0, sizeof( _timeInfo ) );
_timeInfo.samplePos = __plugin->m_currentSamplePos;
_timeInfo.sampleRate = __plugin->sampleRate();
_timeInfo.sampleRate = __plugin->m_SncVSTplug->hasSHM ?
__plugin->m_SncVSTplug->m_sampleRate :
__plugin->sampleRate();
_timeInfo.flags = 0;
_timeInfo.tempo = __plugin->m_bpm;
_timeInfo.timeSigNumerator = 4;
_timeInfo.timeSigDenominator = 4;
_timeInfo.flags |= (/* kVstBarsValid|*/kVstTempoValid );
_timeInfo.flags |= kVstTransportPlaying;
_timeInfo.tempo = __plugin->m_SncVSTplug->hasSHM ?
__plugin->m_SncVSTplug->m_bpm :
__plugin->m_bpm;
_timeInfo.timeSigNumerator = __plugin->m_SncVSTplug->timeSigNumer;
_timeInfo.timeSigDenominator = __plugin->m_SncVSTplug->timeSigDenom;
_timeInfo.flags |= kVstTempoValid;
_timeInfo.flags |= kVstTimeSigValid;
if( __plugin->m_SncVSTplug->isCycle )
{
_timeInfo.cycleStartPos = __plugin->m_SncVSTplug->cycleStart;
_timeInfo.cycleEndPos = __plugin->m_SncVSTplug->cycleEnd;
_timeInfo.flags |= kVstCyclePosValid;
_timeInfo.flags |= kVstTransportCycleActive;
}
if( __plugin->m_SncVSTplug->ppqPos !=
__plugin->m_in->m_Timestamp )
{
_timeInfo.ppqPos = __plugin->m_SncVSTplug->ppqPos;
_timeInfo.flags |= kVstTransportChanged;
__plugin->m_in->lastppqPos = __plugin->m_SncVSTplug->ppqPos;
__plugin->m_in->m_Timestamp = __plugin->m_SncVSTplug->ppqPos;
}
else if( __plugin->m_SncVSTplug->isPlayin )
{
__plugin->m_in->lastppqPos += (
__plugin->m_SncVSTplug->hasSHM ?
__plugin->m_SncVSTplug->m_bpm :
__plugin->m_bpm ) / (float)10340;
_timeInfo.ppqPos = __plugin->m_in->lastppqPos;
}
// _timeInfo.ppqPos = __plugin->m_SncVSTplug->ppqPos;
_timeInfo.flags |= kVstPpqPosValid;
if( __plugin->m_SncVSTplug->isPlayin )
{
_timeInfo.flags |= kVstTransportPlaying;
}
_timeInfo.barStartPos = ( (int) ( _timeInfo.ppqPos /
( 4 *__plugin->m_SncVSTplug->timeSigNumer
/ (float) __plugin->m_SncVSTplug->timeSigDenom ) ) ) *
( 4 * __plugin->m_SncVSTplug->timeSigNumer
/ (float) __plugin->m_SncVSTplug->timeSigDenom );
_timeInfo.flags |= kVstBarsValid;
#ifdef LMMS_BUILD_WIN64
return (long long) &_timeInfo;
#else

View File

@@ -1,7 +1,7 @@
/*
* VstPlugin.cpp - implementation of VstPlugin class
*
* Copyright (c) 2005-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2005-2012 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -49,6 +49,7 @@
#include "MainWindow.h"
#include "song.h"
#include "templates.h"
#include <QtGui/QLayout>
class vstSubWin : public QMdiSubWindow
@@ -88,9 +89,11 @@ VstPlugin::VstPlugin( const QString & _plugin ) :
m_version( 0 ),
m_vendorString(),
m_productString(),
m_presetString(),
m_presetsString(),
p_name()
m_currentProgramName(),
m_allProgramNames(),
p_name(),
m_currentProgram(),
m_idleTimer()
{
setSplittedChannels( true );
@@ -109,6 +112,11 @@ VstPlugin::VstPlugin( const QString & _plugin ) :
this, SLOT( setTempo( bpm_t ) ) );
connect( engine::getMixer(), SIGNAL( sampleRateChanged() ),
this, SLOT( updateSampleRate() ) );
// update once per second
m_idleTimer.start( 1000 );
connect( &m_idleTimer, SIGNAL( timeout() ),
this, SLOT( idleUpdate() ) );
}
@@ -193,11 +201,24 @@ void VstPlugin::tryLoad( const QString &remoteVstPluginExecutable )
void VstPlugin::showEditor( QWidget * _parent )
void VstPlugin::showEditor( QWidget * _parent, bool isEffect )
{
QWidget * w = pluginWidget();
if( w )
{
#ifdef LMMS_BUILD_WIN32
// hide sw, plugin window wrapper on win32
// this is obtained from pluginWidget()
if( isEffect )
{
w->setWindowFlags( Qt::FramelessWindowHint );
w->setAttribute( Qt::WA_TranslucentBackground );
}
else
{
w->setWindowFlags( Qt::WindowCloseButtonHint );
}
#endif
w->show();
return;
}
@@ -215,13 +236,30 @@ void VstPlugin::showEditor( QWidget * _parent )
{
vstSubWin * sw = new vstSubWin(
engine::mainWindow()->workspace() );
sw->setWidget( m_pluginWidget );
if( isEffect )
{
sw->setAttribute( Qt::WA_TranslucentBackground );
sw->setWindowFlags( Qt::FramelessWindowHint );
sw->setWidget( m_pluginWidget );
QX11EmbedContainer * xe = new QX11EmbedContainer( sw );
xe->embedClient( m_pluginWindowID );
xe->setFixedSize( m_pluginGeometry );
xe->show();
}
else
{
sw->setWindowFlags( Qt::WindowCloseButtonHint );
sw->setWidget( m_pluginWidget );
QX11EmbedContainer * xe = new QX11EmbedContainer( sw );
xe->embedClient( m_pluginWindowID );
xe->setFixedSize( m_pluginGeometry );
xe->move( 4, 24 );
xe->show();
}
}
QX11EmbedContainer * xe = new QX11EmbedContainer( m_pluginWidget );
xe->embedClient( m_pluginWindowID );
xe->setFixedSize( m_pluginGeometry );
xe->show();
#endif
if( m_pluginWidget )
@@ -251,7 +289,7 @@ void VstPlugin::loadSettings( const QDomElement & _this )
{
if( _this.attribute( "guivisible" ).toInt() )
{
showEditor();
showEditor( NULL, false );
}
else
{
@@ -279,6 +317,10 @@ void VstPlugin::loadSettings( const QDomElement & _this )
setParameterDump( dump );
}
if( _this.hasAttribute( "program" ) )
{
setProgram( _this.attribute( "program" ).toInt() );
}
}
@@ -309,6 +351,8 @@ void VstPlugin::saveSettings( QDomDocument & _doc, QDomElement & _this )
_this.setAttribute( it.key(), it.value() );
}
}
_this.setAttribute( "program", currentProgram() );
}
@@ -335,6 +379,18 @@ void VstPlugin::updateSampleRate()
int VstPlugin::currentProgram()
{
lock();
sendMessage( message( IdVstCurrentProgram ) );
waitForMessage( IdVstCurrentProgram );
unlock();
return m_currentProgram;
}
const QMap<QString, QString> & VstPlugin::parameterDump()
{
lock();
@@ -406,12 +462,16 @@ bool VstPlugin::processMessage( const message & _m )
m_productString = _m.getQString();
break;
case IdVstPluginPresetString:
m_presetString = _m.getQString();
case IdVstCurrentProgram:
m_currentProgram = _m.getInt();
break;
case IdVstPluginPresetsString:
m_presetsString = _m.getQString();
case IdVstCurrentProgramName:
m_currentProgramName = _m.getQString();
break;
case IdVstProgramNames:
m_allProgramNames = _m.getQString();
break;
case IdVstPluginUniqueID:
@@ -457,12 +517,12 @@ void VstPlugin::openPreset( )
!ofd.selectedFiles().isEmpty() )
{
lock();
sendMessage( message( IdLoadChunkFromPresetFile ).
sendMessage( message( IdLoadPresetFile ).
addString(
QSTR_TO_STDSTR(
QDir::toNativeSeparators( ofd.selectedFiles()[0] ) ) )
);
waitForMessage( IdLoadChunkFromPresetFile );
waitForMessage( IdLoadPresetFile );
unlock();
}
}
@@ -470,24 +530,33 @@ void VstPlugin::openPreset( )
void VstPlugin::rollPreset( int step )
void VstPlugin::setProgram( int index )
{
lock();
sendMessage( message( IdRotateProgram ).
addInt( step ) );
waitForMessage( IdRotateProgram );
sendMessage( message( IdVstSetProgram ).addInt( index ) );
waitForMessage( IdVstSetProgram );
unlock();
}
void VstPlugin::loadPrograms( int step )
void VstPlugin::rotateProgram( int offset )
{
lock();
sendMessage( message( IdLoadPrograms ).
addInt( step ) );
waitForMessage( IdLoadPrograms );
sendMessage( message( IdVstRotateProgram ).addInt( offset ) );
waitForMessage( IdVstRotateProgram );
unlock();
}
void VstPlugin::loadProgramNames()
{
lock();
sendMessage( message( IdVstProgramNames ) );
waitForMessage( IdVstProgramNames );
unlock();
}
@@ -496,7 +565,7 @@ void VstPlugin::loadPrograms( int step )
void VstPlugin::savePreset( )
{
QString presName = this->presetString() == "" ? tr(": default"): this->presetString();
QString presName = currentProgramName().isEmpty() ? tr(": default") : currentProgramName();
presName.replace(tr("\""), tr("'")); // QFileDialog unable to handle double quotes properly
QFileDialog sfd( NULL, tr( "Save Preset" ), presName.section(": ", 1, 1) + tr(".fxp"),
@@ -519,12 +588,12 @@ void VstPlugin::savePreset( )
fns = fns + tr(".fxb");
else fns = fns.left(fns.length() - 4) + (fns.right( 4 )).toLower();
lock();
sendMessage( message( IdSavePreset ).
sendMessage( message( IdSavePresetFile ).
addString(
QSTR_TO_STDSTR(
QDir::toNativeSeparators( fns ) ) )
);
waitForMessage( IdSavePreset );
waitForMessage( IdSavePresetFile );
unlock();
}
}
@@ -535,13 +604,21 @@ void VstPlugin::savePreset( )
void VstPlugin::setParam( int i, float f )
{
lock();
sendMessage( message( IdSetParameter ).addInt( i ).addFloat( f ) );
waitForMessage( IdSetParameter );
sendMessage( message( IdVstSetParameter ).addInt( i ).addFloat( f ) );
//waitForMessage( IdVstSetParameter );
unlock();
}
void VstPlugin::idleUpdate()
{
lock();
sendMessage( message( IdVstIdleUpdate ) );
unlock();
}
void VstPlugin::loadChunk( const QByteArray & _chunk )
{

View File

@@ -1,7 +1,7 @@
/*
* VstPlugin.h - declaration of VstPlugin class
*
* Copyright (c) 2005-2010 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2005-2012 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -28,6 +28,7 @@
#include <QtCore/QMutex>
#include <QtCore/QPointer>
#include <QtCore/QString>
#include <QtCore/QTimer>
#include <QtGui/QWidget>
#include "mixer.h"
@@ -52,7 +53,7 @@ public:
return m_pluginWindowID != 0;
}
void showEditor( QWidget * _parent = NULL );
void showEditor( QWidget * _parent = NULL, bool isEffect = false );
void hideEditor();
inline const QString & name() const
@@ -75,16 +76,18 @@ public:
return m_productString;
}
inline const QString & presetString() const
inline const QString& currentProgramName() const
{
return m_presetString;
return m_currentProgramName;
}
inline const QString & presetsString() const
inline const QString& allProgramNames() const
{
return m_presetsString;
return m_allProgramNames;
}
int currentProgram();
const QMap<QString, QString> & parameterDump();
void setParameterDump( const QMap<QString, QString> & _pdump );
@@ -114,10 +117,12 @@ public slots:
void setTempo( bpm_t _bpm );
void updateSampleRate();
void openPreset( void );
void rollPreset( int step );
void loadPrograms( int step );
void setProgram( int index );
void rotateProgram( int offset );
void loadProgramNames();
void savePreset( void );
void setParam( int i, float f );
void idleUpdate();
private:
@@ -135,13 +140,17 @@ private:
Sint32 m_version;
QString m_vendorString;
QString m_productString;
QString m_presetString;
QString m_presetsString;
QString m_currentProgramName;
QString m_allProgramNames;
QString p_name;
QMap<QString, QString> m_parameterDump;
int m_currentProgram;
QTimer m_idleTimer;
} ;

View File

@@ -5,6 +5,7 @@ ADD_EXECUTABLE(RemoteVstPlugin32 ${CMAKE_CURRENT_SOURCE_DIR}/../RemoteVstPlugin.
TARGET_LINK_LIBRARIES(RemoteVstPlugin32 -lQtCore4 -lpthread -lgdi32 -lws2_32)
ADD_CUSTOM_COMMAND(TARGET RemoteVstPlugin32 POST_BUILD COMMAND ${STRIP} ${CMAKE_CURRENT_BINARY_DIR}/RemoteVstPlugin32.exe)
SET_TARGET_PROPERTIES(RemoteVstPlugin32 PROPERTIES COMPILE_FLAGS "${COMPILE_FLAGS} -O3")
INSTALL(TARGETS RemoteVstPlugin32 RUNTIME DESTINATION ${PLUGIN_DIR}/32)

View File

@@ -64,6 +64,12 @@ enum VstRemoteMessageIDs
IdVstGetParameterDump,
IdVstSetParameterDump,
IdVstGetParameterProperties,
IdVstProgramNames,
IdVstCurrentProgram,
IdVstCurrentProgramName,
IdVstSetProgram,
IdVstRotateProgram,
IdVstIdleUpdate,
// remoteVstPlugin -> vstPlugin
IdVstFailedLoadingPlugin,
@@ -74,9 +80,9 @@ enum VstRemoteMessageIDs
IdVstPluginVersion,
IdVstPluginVendorString,
IdVstPluginProductString,
IdVstPluginPresetString,
IdVstPluginPresetsString,
IdVstPluginUniqueID,
IdVstSetParameter,
IdVstParameterCount,
IdVstParameterDump,
IdVstParameterProperties

Some files were not shown because too many files have changed in this diff Show More