Compare commits

..

43 Commits

Author SHA1 Message Date
Tobias Doerffel
79d6cff46f Made 0.4.8 release
Bumped version number to 0.4.8 in CMakeLists.txt and README.
2010-09-03 00:22:33 +02:00
Tobias Doerffel
49d833c2fd VstEffectControlDialog: fixed preprocessor macro logic
Fixed preprocessor macro logic that was messed up in commit
fa9e0f762c.
(cherry picked from commit 342ea2ba05)
2010-09-02 23:48:58 +02:00
Tobias Doerffel
1bf3768c1c VstEffectControlDialog: workaround for invisible GUI on Linux
For some reaons with recent versions of Qt we can't embed the VST FX
GUI into an existing EffectControlDialog anymore. As a workaround, embed
it into a new subwindow and added an additional show/hide button.

Closes #3028717.
(cherry picked from commit fa9e0f762c)
2010-09-02 17:38:05 +02:00
Tobias Doerffel
d396a29c06 ZynAddSubFX: only re-instantiate ZASF if m_hasGUI has changed
Do not re-instantiate ZynAddSubFX if m_hasGUI is different from the
value of the according push button.
(cherry picked from commit f05c510f4d)
2010-09-02 17:23:31 +02:00
Tobias Doerffel
bac2b28ad7 ZynAddSubFX: save which controllers were modified and restore them
We must not only restore the controller knobs but also send updates
to ZynAddSubFX. However this only applies to knobs that were modified.
Therefore save and remember which knobs this applies for.
(cherry picked from commit b2cc802528)
2010-09-02 17:23:28 +02:00
Tobias Doerffel
2c99688f91 ZynAddSubFX: fixed identifier for filter resonance controller
The filter resonance controller erroneously was labeled with something
like "cutoff" which is definitely wrong. Use "resonance" instead.
(cherry picked from commit 1546b7cec0)
2010-09-02 16:24:57 +02:00
Tobias Doerffel
1c4d1f4ed3 PianoView: send NoteOff MIDI events for all keys on focus out
Commit 491910357b was a first try to fix
bug #3052228 but it broke InstrumentPlayHandle-driven instruments.
When losing focus now simply send NoteOff MIDI events for all keys
regardless of the state indicated by Piano::m_pressedKeys.

Closes #3052228.
(cherry picked from commit f8e73c5293)
2010-09-02 01:54:20 +02:00
Tobias Doerffel
706201dd79 Revert "PianoView: call InstrumentTrack::silenceAllNotes() on focus out"
This reverts commit 491910357b.
2010-09-02 01:47:28 +02:00
Tobias Doerffel
a2a1277660 SID: improved artwork+logo once more
The first version of mikobuntu's logo had a white semitransparent
background. This has been fixed. Additionally the background artwork
of the SID plugin has been changed as well to include the new logo.
Thanks to pgib for preparing this.
(cherry picked from commit eb673c0ad5)
2010-09-02 00:07:07 +02:00
Tobias Doerffel
491910357b PianoView: call InstrumentTrack::silenceAllNotes() on focus out
If we lose focus, call InstrumentTrack::silenceAllNotes() after
explicitely sending NoteOff MIDI events for all keys for which presses
were recorded. In case the arpeggiator is enabled this is not
sufficient. Fixes hanging notes when switching active subwindow while
pressing keys in an instrument track window with arpeggiator enabled.

Closes #3052228.
(cherry picked from commit 2f921303eb)
2010-09-01 23:56:28 +02:00
Tobias Doerffel
18d3c886a6 ZynAddSubFX: properly load preset data if knobs are automated/controlled
Commit 534c4debb5 introduced a regression.
If knobs have a song-global automation or controllers attached, they
save these settings in a sub XML node which confused the ZASF preset
loader which assumed the first child node would always be the ZASF
preset data. Fix this by explicitely searching for an XML element named
"ZynAddSubFX-data".

Closes #3057275.
(cherry picked from commit 4e695a4ea8)
2010-09-01 23:29:30 +02:00
Tobias Doerffel
58462500d0 SID: added new logo by mikobuntu
Added a logo remake by mikobuntu. Thanks!
(cherry picked from commit 56ee4db565)
2010-09-01 23:29:28 +02:00
Tobias Doerffel
59f3d81d37 Mirror Commodore logo on SID instrument (v2)
This is an attempt to improve commit c17bb3ba18. The logo has
been mirrored using ImageMagick which doesn't seem to mess up the 8 bit
alpha channel.
(cherry picked from commit 4763da4daa)
2010-09-01 00:26:24 +02:00
Tobias Doerffel
3fae87ae3d CMakeLists.txt: explicitely search for pthread and link against it
On Linux and OS X search for pthread library and link against it
explicitely. This fixes link problems on recent Linux distributions
where indirect linking (by dependencies) is disabled. Thanks to thm
for pointing out this issue.
(cherry picked from commit 1b84b360f4)
2010-08-31 19:21:33 +02:00
Tobias Doerffel
bf595cf285 ZynAddSubFX: added LED checkbox to disable forwarding of MIDI CC events
After introducing the control knobs it's not always desired to forward
all MIDI Control Change events to ZynAddSubFX. Therefore added an LED
checkbox which allows to disable forwarding of such events.

Closes #3055332.
(cherry picked from commit 0b7e37ca6a)
2010-08-31 16:41:23 +02:00
Tobias Doerffel
1669daa788 ZynAddSubFX: forward all MIDI events but NoteOn if muted
There's no reason for not forwarding MIDI events such as NoteOff,
ControlChange etc. when muted. Therefore only do not forward NoteOn
when muted.
(cherry picked from commit 39918f8835)
2010-08-31 16:41:20 +02:00
Tobias Doerffel
611a36e56b MidiEvent: added read method for type property
Even if the type property of the MidiEvent class is still public, there
should be a method for reading it.
(cherry picked from commit 1d5b62d61a)
2010-08-31 16:41:16 +02:00
Paul Nasca
c407bbe15b Bugfix extra "for" in adsynth
(cherry picked from commit e6bc35ff98e3f430a4d091aae8f059b7925179f3)
(cherry picked from commit ab2e117ed8)
2010-08-31 11:48:12 +02:00
Tobias Doerffel
380b0bfa9b Merge branch 'calf-updates'
* calf-updates:
  Use generic single VU meter in some dynamics plugins as well. (cherry picked from commit 50505a2d304555bb3b766c43af5cd1a27de331e2)
  Refactor metering code out of distortion plugins. (cherry picked from commit 84d873861da7b4ad205061b00fcc9f73c47140b6)
  More variable initialisation. (cherry picked from commit 40bbe048f27fc7190001383f93097127119ee667)
  Initialise old-state variables to prevent "stuck" graphs. (cherry picked from commit 2a795084ee9e73712a4b690b84158cc745ff1d30)
(cherry picked from commit cb52114261)
2010-08-31 11:41:50 +02:00
Tobias Doerffel
8ebdee61f6 PianoRoll: respect stacking order of notes
Notes are always drawn on-top of each other starting from the left
to the right. However the behaviour when clicking notes was reverse,
which made it quite hard to edit notes sometimes. Now the top most
note is edited/selected/moved/resized if notes overlay.

Closes #2808603.
(cherry picked from comit 28eb7e00bf)
2010-08-24 18:47:39 +02:00
Tobias Doerffel
9288998686 Merge branch 'calf-updates'
* calf-updates:
  Add Sidechain Gate, rename Gate to Expander, cleanups etc.
(cherry picked from commit 80a1b6b8e8)
2010-08-24 09:34:05 +02:00
Tobias Doerffel
819e6392cd SampleBuffer: for OGG files try with OGG Vorbis decoder first
This is workaround for a bug in libsndfile or our libsndfile decoder
causing some OGG files to be distorted. Therefore try the OGG Vorbis
decoder first if filename extension matches "ogg".

Closes #2957937.
(cherry picked from commit 6e64bcfc42)
2010-08-22 02:22:45 +02:00
Tobias Doerffel
d91c703725 ZynAddSubFX/QtXmlWrapper: fixed loading of oddly formatted presets
Some ZynAddSubFX presets have one or more leading blank lines which
confuses the QtXml module. Therefore dynamically remove characters from
the beginning of the data until we encounter a '<' character.

Closes #3047560.
(cherry picked from commit 32dbda5b33)
2010-08-22 01:03:47 +02:00
Tobias Doerffel
3a79dc1741 PianoRoll: allow chaning volume and panning of step notes
There's no reason to not allow changing volume and panning of step notes
in PianoRoll. Therefore simply check whether the length is not equal to
zero (which might be disabled step notes) instead of checking for length
being greater than zero.

Closes #2836799.
(cherry picked from commit 8286c1031d)
2010-08-19 00:17:41 +02:00
Tobias Doerffel
4e3072137b PianoRoll: fixed messed up editing modes when pressing Ctrl
There were some bugs when pressing Ctrl while in SelectMode. Fix this
by always setting m_ctrlMode and m_editMode in keyPressEvent() when
Ctrl was pressed.

Closes #2854958 and #2836576.
(cherry picked from commit 46c20bdcbd)
2010-08-18 23:58:49 +02:00
Tobias Doerffel
9cf0f4932a Song: reset global models in clearProject()
We have to reset global models such as tempo, master volume etc. before
clearing the global automation patterns attached to them. Fixes bug with
persistent automation on these controls when clearing project.

Closes #3046039.
(cherry picked from commit 2614474246)
2010-08-16 23:40:48 +02:00
Tobias Doerffel
54ce5b96f6 MeterModel: clear global automation patterns in reset()
When resetting a MeterModel we also have to clear global automation
patterns attached to it. Fixes bug with persistent automation data on
e.g. time signature widget when clearing project.
(cherry picked from commit 23a3efcac0)
2010-08-16 23:40:44 +02:00
Tobias Doerffel
89eae05a16 Renamed all automation related files and classes to match new coding style
All automation-related files and classes have been renamed to match the
new coding style.
(cherry picked from commit 9b280ffb3e)
2010-08-16 23:40:33 +02:00
Tobias Doerffel
b16e81ebff ControllerRackView: do not loose focus when adding controller
For an unknown reason the ControllerRackView looses focus when adding
a new controller. Fix this by explicitely calling QWidget::setFocus()
at the end of ControllerRackView::addController().

Closes #3046041.
(cherry picked from commit 676a6fbad1)
2010-08-16 23:39:04 +02:00
Tobias Doerffel
564ef08127 InstrumentTrackWindow: correctly disconnect from track's signals
We used QObject::disconnect() the wrong way leading to multiple
connections from InstrumentTrack::instrumentChanged() to
InstrumentTrackWindow::updateInstrumentView(). This resulted in
loading times being doubled each time you loaded a preset on the same
InstrumentTrack.

Closes #2934099.
(cherry picked from commit 9acb47a7a8)
2010-08-15 14:22:38 +02:00
Tobias Doerffel
cd08109847 InstrumentTrack: do not try to load "libconnection.so" in compat code
In compat code of InstrumentTrack::loadTrackSpecificSettings() also
check for nodeName being equal to ControllerConnection::classNodeName().
This avoids trying to load the non-existing instrument "connection".
In master branch this has been fixed ugly in commit 22c877d4 before,
however implement a cleaner solution which is also suitable for
backporting.

Closes #3021259.
(cherry picked from commit 65311ef2b4)
2010-08-15 14:00:11 +02:00
Tobias Doerffel
b9f5795da6 EffectView: fixed artifacts with semitransparent widget shadow
We must not set the Qt::WA_OpaquePaintEvent attribute when using a
semitransparent background image in paintEvent(). Fixes artifacts
in EffectView's shadowed border.
(cherry picked from commit d830e7f622)
2010-08-15 12:44:29 +02:00
Tobias Doerffel
48891a7de3 VstPlugin: use guarded pointer for pluginWidget
The pluginWidget of a VstPlugin (i.e. the VST editor) might be destroyed
outside VstPlugin's control resulting in a dangling pointer. This leads
to crashes for example when changing the model of an EffectView where a
VST plugin is attached, i.e. when re-opening a InstrumentTrackWindow of
an InstrumentTrack with a VST effect inside.

This can be fixed easily by using QPointer.

Closes #3045102.
(cherry picked from commit f4b84a6058)
2010-08-15 12:44:27 +02:00
Tobias Doerffel
6a99bb11af SampleTrack: fixed non-functional solo and mute buttons
The SampleTrackView did not explicitely have a SampleTrack model
attached and thus trackView::modelChanged() was not called. This way
SampleTrackView's mute and solo buttons were not connected to the
according models of the SampleTrack model. Fix this by calling
setModel() in SampleTrackView::SampleTrackView() (as done in
constructors of other track types too) and overload the
SampleTrackView::modelChanged() method.

Closes #3043836.
(cherry picked from commit 311bc92bde)
2010-08-14 00:26:34 +02:00
Tobias Doerffel
0770bda441 Renamed PATH_SEPARATOR to LADSPA_PATH_SEPARATOR and fixed it
Commit 4e9ebd09c6 introduced PATH_SEPARATOR
but with wrong syntax. Fixed this and renamed it to LADSPA_PATH_SEPARATOR.
2010-08-12 10:30:59 +02:00
Paul Giblock
09b5bc906e Use proper path seperator for LADSPA_PATH
According to http://www.ladspa.org/ladspa_sdk/shared_plugins.html,
LADSPA_PATH is supposed to be delimited by colons.  This patch does so,
except on Windows.  On Windows we use ';' instead of ':' since colon is
a legal character for a path.
2010-08-12 09:12:04 +02:00
Tobias Doerffel
d8594fad15 TrackContainerView: fixed dragged presets into BB Editor
When dragging preset files into BB Editor the patterns were messed up
because simple serializing was not enabled (and thus newly created
patterns were removed again). Fix this by enabling simple serializing
mode before calling InstrumentTrack::loadSettings().

Closes #3041686.
2010-08-11 17:54:41 +02:00
Tobias Doerffel
1d50e6b42e Default theme: improved tooltip appearence
Thanks to mikobuntu for this patch.
(cherry picked from commit 2ed12b138d)
2010-08-11 17:31:51 +02:00
Tobias Doerffel
6c9dc19eb4 ZynAddSubFX: save and restore settings of new knobs
When adding the new knobs for automatable parameters of ZynAddSubFX,
I forgot to include them in the save/load routines.
(cherry picked from commit 534c4debb5)
2010-08-11 00:48:33 +02:00
Tobias Doerffel
3502bbccf8 CMakeLists: print warning about missing Mallets instrument instead of Stk
The Vibed plugin has nothing to do with STK. Instead the Mallets
instrument plugin is meant. Fixed.
(cherry picked from commit a0ef88908c)
2010-08-11 00:29:13 +02:00
Tobias Doerffel
ec19be69cd Added missing FileAssociation.nsh
Commit 07a7442758 includes the new file
FileAssociation.nsh which was not added in that commit. Fix this.
2010-08-06 01:38:10 +02:00
Tobias Doerffel
07a7442758 Win32/64 installer: associate LMMS project files with LMMS
Added some NSIS commands to associate LMMS project files with LMMS
during installation.
2010-08-06 01:33:49 +02:00
Tobias Doerffel
9e98dec0c4 Manpage: fixed duplicate help item and updated program description
Thanks to pgib who pointed out the duplicate help item for the
--interpolate option. Additionally updated the program description.
(cherry picked from commit 5f131f1a69)
2010-08-06 01:31:41 +02:00
68 changed files with 1888 additions and 912 deletions

View File

@@ -15,7 +15,7 @@ INCLUDE(FindPkgConfig)
SET(VERSION_MAJOR "0")
SET(VERSION_MINOR "4")
SET(VERSION_PATCH "7")
SET(VERSION_PATCH "8")
#SET(VERSION_SUFFIX "")
SET(VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")
IF(VERSION_SUFFIX)
@@ -179,7 +179,7 @@ IF(WANT_STK)
ELSE(STK_FOUND)
SET(STK_INCLUDE_DIR "")
SET(STATUS_STK "not found, please install libstk0-dev (or similiar) "
"if you require the Vibed Instrument")
"if you require the Mallets instrument")
ENDIF(STK_FOUND)
ENDIF(WANT_STK)
@@ -294,6 +294,10 @@ IF(WANT_SF2)
ENDIF(FLUIDSYNTH_FOUND)
ENDIF(WANT_SF2)
# check for pthreads
IF(LMMS_BUILD_LINUX OR LMMS_BUILD_APPLE)
FIND_PACKAGE(Threads)
ENDIF(LMMS_BUILD_LINUX OR LMMS_BUILD_APPLE)
# check for WINE
IF(WANT_VST)
@@ -426,7 +430,7 @@ ADD_DEFINITIONS(-D'LIB_DIR="${CMAKE_INSTALL_PREFIX}/${LIB_DIR}/"' -D'PLUGIN_DIR=
INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/include ${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/include ${SDL_INCLUDE_DIR} ${PORTAUDIO_INCLUDE_DIR} ${PULSEAUDIO_INCLUDE_DIR} ${JACK_INCLUDE_DIRS} ${OGGVORBIS_INCLUDE_DIR} ${SAMPLERATE_INCLUDE_DIRS} ${SNDFILE_INCLUDE_DIRS})
LINK_DIRECTORIES(${CMAKE_INSTALL_PREFIX}/lib ${ASOUND_LIBRARY_DIR} ${JACK_LIBRARY_DIRS} ${SAMPLERATE_LIBRARY_DIRS} ${SNDFILE_LIBRARY_DIRS})
LINK_LIBRARIES(${QT_LIBRARIES} ${ASOUND_LIBRARY} ${SDL_LIBRARY} ${PORTAUDIO_LIBRARIES} ${PULSEAUDIO_LIBRARIES} ${JACK_LIBRARIES} ${OGGVORBIS_LIBRARIES} ${SAMPLERATE_LIBRARIES} ${SNDFILE_LIBRARIES})
LINK_LIBRARIES(${CMAKE_THREAD_LIBS_INIT} ${QT_LIBRARIES} ${ASOUND_LIBRARY} ${SDL_LIBRARY} ${PORTAUDIO_LIBRARIES} ${PULSEAUDIO_LIBRARIES} ${JACK_LIBRARIES} ${OGGVORBIS_LIBRARIES} ${SAMPLERATE_LIBRARIES} ${SNDFILE_LIBRARIES})
ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_BINARY_DIR}/lmms.1.gz COMMAND gzip -c ${CMAKE_SOURCE_DIR}/lmms.1 > ${CMAKE_BINARY_DIR}/lmms.1.gz DEPENDS ${CMAKE_SOURCE_DIR}/lmms.1 COMMENT "Generating lmms.1.gz")
@@ -653,8 +657,8 @@ IF(VERSION_SUFFIX)
ENDIF(VERSION_SUFFIX)
SET(CPACK_PACKAGE_INSTALL_DIRECTORY "LMMS ${VERSION}")
IF(WIN32)
SET(CPACK_PACKAGE_ICON "${CMAKE_SOURCE_DIR}/data\\\\nsis_branding.bmp")
SET(CPACK_NSIS_MUI_ICON "${CMAKE_SOURCE_DIR}/data\\\\lmms.ico")
SET(CPACK_PACKAGE_ICON "${CMAKE_SOURCE_DIR}/data/nsis_branding.bmp")
SET(CPACK_NSIS_MUI_ICON "${CMAKE_SOURCE_DIR}/data/lmms.ico")
SET(CPACK_NSIS_INSTALLED_ICON_NAME "lmms.exe")
SET(CPACK_NSIS_DISPLAY_NAME "Linux MultiMedia Studio (LMMS)")
SET(CPACK_NSIS_HELP_LINK "http:\\\\\\\\lmms.sourceforge.net")
@@ -662,18 +666,34 @@ SET(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\lmms.sourceforge.net")
SET(CPACK_NSIS_CONTACT "lmms-devel@lists.sourceforge.net")
SET(CPACK_PACKAGE_EXECUTABLES "lmms.exe;Linux MultiMedia Studio")
SET(CPACK_NSIS_MENU_LINKS "lmms.exe;Linux MultiMedia Studio")
SET(CPACK_NSIS_DEFINES "!include ${CMAKE_SOURCE_DIR}/cmake/nsis/FileAssociation.nsh")
SET(CPACK_PACKAGE_FILE_NAME "lmms-${VERSION}-win32")
SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "
\\\${registerExtension} \\\"$INSTDIR\\\\lmms.exe\\\" \\\".mmp\\\" \\\"LMMS Project\\\"
\\\${registerExtension} \\\"$INSTDIR\\\\lmms.exe\\\" \\\".mmpz\\\" \\\"LMMS Project (compressed)\\\"
")
SET(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS "
\\\${unregisterExtension} \\\".mmp\\\" \\\"LMMS Project\\\"
\\\${unregisterExtension} \\\".mmpz\\\" \\\"LMMS Project (compressed)\\\"
")
ELSE(WIN32)
SET(CPACK_STRIP_FILES "bin/lmms;${PLUGIN_DIR}/*.so")
SET(CPACK_PACKAGE_EXECUTABLES "lmms" "LMMS binary")
ENDIF(WIN32)
IF(WIN64)
SET(CPACK_PACKAGE_FILE_NAME "lmms-${VERSION}-win64")
SET(CPACK_NSIS_DEFINES "${CPACK_NSIS_DEFINES}
InstallDir \\\"\\\$PROGRAMFILES64\\\\${CPACK_PACKAGE_INSTALL_DIRECTORY}\\\"")
ENDIF(WIN64)
SET(MACOSX_BUNDLE_ICON_FILE "${CMAKE_SOURCE_DIR}/data/themes/default/icon.png")
SET(MACOSX_BUNDLE_GUI_IDENTIFIER "LMMS")
SET(MACOSX_BUNDLE_LONG_VERSION_STRING "${VERSION}")
SET(MACOSX_BUNDLE_BUNDLE_NAME "Linux MultiMedia Studio")
SET(MACOSX_BUNDLE_SHORT_VERSION_STRING "${VERSION}")
SET(MACOSX_BUNDLE_BUNDLE_VERSION "${VERSION}")
SET(MACOSX_BUNDLE_COPYRIGHT "Tobias Doerffel, 2008")
SET(MACOSX_BUNDLE_COPYRIGHT "Tobias Doerffel, 2008-2010")
SET(CPACK_SOURCE_GENERATOR "TBZ2")
SET(CPACK_SOURCE_PACKAGE_FILE_NAME "lmms-${VERSION}")

2
README
View File

@@ -1,4 +1,4 @@
Linux MultiMedia Studio 0.4.7
Linux MultiMedia Studio 0.4.8
==============================
Copyright (c) 2004-2010 by LMMS-developers

View File

@@ -0,0 +1,190 @@
/*
_____________________________________________________________________________
File Association
_____________________________________________________________________________
Based on code taken from http://nsis.sourceforge.net/File_Association
Usage in script:
1. !include "FileAssociation.nsh"
2. [Section|Function]
${FileAssociationFunction} "Param1" "Param2" "..." $var
[SectionEnd|FunctionEnd]
FileAssociationFunction=[RegisterExtension|UnRegisterExtension]
_____________________________________________________________________________
${RegisterExtension} "[executable]" "[extension]" "[description]"
"[executable]" ; executable which opens the file format
;
"[extension]" ; extension, which represents the file format to open
;
"[description]" ; description for the extension. This will be display in Windows Explorer.
;
${UnRegisterExtension} "[extension]" "[description]"
"[extension]" ; extension, which represents the file format to open
;
"[description]" ; description for the extension. This will be display in Windows Explorer.
;
_____________________________________________________________________________
Macros
_____________________________________________________________________________
Change log window verbosity (default: 3=no script)
Example:
!include "FileAssociation.nsh"
!insertmacro RegisterExtension
${FileAssociation_VERBOSE} 4 # all verbosity
!insertmacro UnRegisterExtension
${FileAssociation_VERBOSE} 3 # no script
*/
!ifndef FileAssociation_INCLUDED
!define FileAssociation_INCLUDED
!include Util.nsh
!verbose push
!verbose 3
!ifndef _FileAssociation_VERBOSE
!define _FileAssociation_VERBOSE 3
!endif
!verbose ${_FileAssociation_VERBOSE}
!define FileAssociation_VERBOSE `!insertmacro FileAssociation_VERBOSE`
!verbose pop
!macro FileAssociation_VERBOSE _VERBOSE
!verbose push
!verbose 3
!undef _FileAssociation_VERBOSE
!define _FileAssociation_VERBOSE ${_VERBOSE}
!verbose pop
!macroend
!macro RegisterExtensionCall _EXECUTABLE _EXTENSION _DESCRIPTION
!verbose push
!verbose ${_FileAssociation_VERBOSE}
Push `${_DESCRIPTION}`
Push `${_EXTENSION}`
Push `${_EXECUTABLE}`
${CallArtificialFunction} RegisterExtension_
!verbose pop
!macroend
!macro UnRegisterExtensionCall _EXTENSION _DESCRIPTION
!verbose push
!verbose ${_FileAssociation_VERBOSE}
Push `${_EXTENSION}`
Push `${_DESCRIPTION}`
${CallArtificialFunction} UnRegisterExtension_
!verbose pop
!macroend
!define RegisterExtension `!insertmacro RegisterExtensionCall`
!define un.RegisterExtension `!insertmacro RegisterExtensionCall`
!macro RegisterExtension
!macroend
!macro un.RegisterExtension
!macroend
!macro RegisterExtension_
!verbose push
!verbose ${_FileAssociation_VERBOSE}
Exch $R2 ;exe
Exch
Exch $R1 ;ext
Exch
Exch 2
Exch $R0 ;desc
Exch 2
Push $0
Push $1
ReadRegStr $1 HKCR $R1 "" ; read current file association
StrCmp "$1" "" NoBackup ; is it empty
StrCmp "$1" "$R0" NoBackup ; is it our own
WriteRegStr HKCR $R1 "backup_val" "$1" ; backup current value
NoBackup:
WriteRegStr HKCR $R1 "" "$R0" ; set our file association
ReadRegStr $0 HKCR $R0 ""
StrCmp $0 "" 0 Skip
WriteRegStr HKCR "$R0" "" "$R0"
WriteRegStr HKCR "$R0\shell" "" "open"
WriteRegStr HKCR "$R0\DefaultIcon" "" "$R2,0"
Skip:
WriteRegStr HKCR "$R0\shell\open\command" "" '"$R2" "%1"'
WriteRegStr HKCR "$R0\shell\edit" "" "Edit $R0"
WriteRegStr HKCR "$R0\shell\edit\command" "" '"$R2" "%1"'
Pop $1
Pop $0
Pop $R2
Pop $R1
Pop $R0
!verbose pop
!macroend
!define UnRegisterExtension `!insertmacro UnRegisterExtensionCall`
!define un.UnRegisterExtension `!insertmacro UnRegisterExtensionCall`
!macro UnRegisterExtension
!macroend
!macro un.UnRegisterExtension
!macroend
!macro UnRegisterExtension_
!verbose push
!verbose ${_FileAssociation_VERBOSE}
Exch $R1 ;desc
Exch
Exch $R0 ;ext
Exch
Push $0
Push $1
ReadRegStr $1 HKCR $R0 ""
StrCmp $1 $R1 0 NoOwn ; only do this if we own it
ReadRegStr $1 HKCR $R0 "backup_val"
StrCmp $1 "" 0 Restore ; if backup="" then delete the whole key
DeleteRegKey HKCR $R0
Goto NoOwn
Restore:
WriteRegStr HKCR $R0 "" $1
DeleteRegValue HKCR $R0 "backup_val"
DeleteRegKey HKCR $R1 ;Delete key with association name settings
NoOwn:
Pop $1
Pop $0
Pop $R1
Pop $R0
!verbose pop
!macroend
!endif # !FileAssociation_INCLUDED

View File

@@ -8,16 +8,21 @@ QMdiArea {
background-image: url(resources:background_artwork.png);
}
automationEditor {
AutomationEditor {
background-color: rgb(0, 0, 0);
}
QToolTip {
background: rgb(224,224,224);
color: black;
border-radius: 4px;
background: qlineargradient(spread:reflect, x1:0.5, y1:0.5, x2:0.5, y2:0, stop:0 rgba(0, 0, 0, 255), stop:1 rgba(50, 50, 50, 220));
opacity: 175;
border: 1.5px solid rgba(0,0,0,255);
color: #00ff00;
}
QMenu {
border:1px solid black;
background-color: rgb( 192, 192, 192 );

View File

@@ -1,6 +1,6 @@
/*
* automation_editor.h - declaration of class automationEditor which is a window
* where you can edit dynamic values in an easy way
* AutomationEditor.h - declaration of class AutomationEditor which is a window
* where you can edit dynamic values in an easy way
*
* Copyright (c) 2006-2008 Javier Serrano Polo <jasp00/at/users.sourceforge.net>
*
@@ -32,7 +32,7 @@
#include "lmms_basics.h"
#include "JournallingObject.h"
#include "midi_time.h"
#include "automation_pattern.h"
#include "AutomationPattern.h"
#include "ComboBoxModel.h"
@@ -46,13 +46,13 @@ class timeLine;
class toolButton;
class automationEditor : public QWidget, public JournallingObject
class AutomationEditor : public QWidget, public JournallingObject
{
Q_OBJECT
public:
void setCurrentPattern( automationPattern * _new_pattern );
void setCurrentPattern( AutomationPattern * _new_pattern );
inline const automationPattern * currentPattern() const
inline const AutomationPattern * currentPattern() const
{
return( m_pattern );
}
@@ -79,7 +79,7 @@ public slots:
protected:
typedef automationPattern::timeMap timeMap;
typedef AutomationPattern::timeMap timeMap;
virtual void closeEvent( QCloseEvent * _ce );
virtual void keyPressEvent( QKeyEvent * _ke );
@@ -155,9 +155,9 @@ private:
static const int VALUES_WIDTH = 64;
automationEditor();
automationEditor( const automationEditor & );
virtual ~automationEditor();
AutomationEditor();
AutomationEditor( const AutomationEditor & );
virtual ~AutomationEditor();
static QPixmap * s_toolDraw;
@@ -189,7 +189,7 @@ private:
ComboBoxModel m_quantizeModel;
QMutex m_patternMutex;
automationPattern * m_pattern;
AutomationPattern * m_pattern;
float m_minLevel;
float m_maxLevel;
float m_step;

View File

@@ -1,8 +1,8 @@
/*
* automation_pattern.h - declaration of class automationPattern, which contains
* all information about an automation pattern
* AutomationPattern.h - declaration of class AutomationPattern, which contains
* all information about an automation pattern
*
* Copyright (c) 2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2008-2010 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
@@ -24,7 +24,6 @@
*
*/
#ifndef _AUTOMATION_PATTERN_H
#define _AUTOMATION_PATTERN_H
@@ -33,21 +32,21 @@
#include "track.h"
class automationTrack;
class AutomationTrack;
class midiTime;
class EXPORT automationPattern : public trackContentObject
class EXPORT AutomationPattern : public trackContentObject
{
Q_OBJECT
public:
typedef QMap<int, float> timeMap;
typedef QVector<QPointer<AutomatableModel> > objectVector;
automationPattern( automationTrack * _auto_track );
automationPattern( const automationPattern & _pat_to_copy );
virtual ~automationPattern();
AutomationPattern( AutomationTrack * _auto_track );
AutomationPattern( const AutomationPattern & _pat_to_copy );
virtual ~AutomationPattern();
void addObject( AutomatableModel * _obj, bool _search_dup = true );
@@ -99,8 +98,7 @@ public:
static bool isAutomated( const AutomatableModel * _m );
static automationPattern * globalAutomationPattern(
AutomatableModel * _m );
static AutomationPattern * globalAutomationPattern( AutomatableModel * _m );
static void resolveAllIDs();
@@ -111,14 +109,14 @@ public slots:
private:
automationTrack * m_autoTrack;
AutomationTrack * m_autoTrack;
QVector<jo_id_t> m_idsToResolve;
objectVector m_objects;
timeMap m_timeMap; // actual values
bool m_hasAutomation;
friend class automationPatternView;
friend class AutomationPatternView;
} ;

View File

@@ -1,8 +1,8 @@
/*
* automation_pattern_view.h - declaration of class automationPatternView
* AutomationPatternView.h - declaration of class AutomationPatternView
*
* Copyright (c) 2008-2010 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* Copyright (c) 2008 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
@@ -22,21 +22,20 @@
*
*/
#ifndef _AUTOMATION_PATTERN_VIEW_H
#define _AUTOMATION_PATTERN_VIEW_H
#include "track.h"
class automationPattern;
class AutomationPattern;
class automationPatternView : public trackContentObjectView
class AutomationPatternView : public trackContentObjectView
{
Q_OBJECT
public:
automationPatternView( automationPattern * _pat, trackView * _parent );
virtual ~automationPatternView();
AutomationPatternView( AutomationPattern * _pat, trackView * _parent );
virtual ~AutomationPatternView();
public slots:
@@ -63,7 +62,7 @@ protected:
private:
automationPattern * m_pat;
AutomationPattern * m_pat;
QPixmap m_paintPixmap;
bool m_needsUpdate;

View File

@@ -1,10 +1,10 @@
/*
* automation_track.h - declaration of class automationTrack, which handles
* automation of objects without a track
* AutomationTrack.h - declaration of class AutomationTrack, which handles
* automation of objects without a track
*
* Copyright (c) 2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2008-2010 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
*
* This program is free software; you can redistribute it and/or
@@ -24,18 +24,17 @@
*
*/
#ifndef _AUTOMATION_TRACK_H
#define _AUTOMATION_TRACK_H
#include "track.h"
class automationTrack : public track
class AutomationTrack : public track
{
public:
automationTrack( trackContainer * _tc, bool _hidden = false );
virtual ~automationTrack();
AutomationTrack( trackContainer * _tc, bool _hidden = false );
virtual ~AutomationTrack();
virtual bool play( const midiTime & _start, const fpp_t _frames,
const f_cnt_t _frame_base,
@@ -43,7 +42,7 @@ public:
virtual QString nodeName() const
{
return( "automationtrack" );
return "automationtrack";
}
virtual trackView * createView( trackContainerView * );
@@ -54,17 +53,17 @@ public:
virtual void loadTrackSpecificSettings( const QDomElement & _this );
private:
friend class automationTrackView;
friend class AutomationTrackView;
} ;
class automationTrackView : public trackView
class AutomationTrackView : public trackView
{
public:
automationTrackView( automationTrack * _at, trackContainerView * _tcv );
virtual ~automationTrackView();
AutomationTrackView( AutomationTrack * _at, trackContainerView * _tcv );
virtual ~AutomationTrackView();
virtual void dragEnterEvent( QDragEnterEvent * _dee );
virtual void dropEvent( QDropEvent * _de );

View File

@@ -5,6 +5,7 @@
* loading project
*
* Copyright (c) 2008 Paul Giblock <pgllama/at/gmail.com>
* Copyright (c) 2010 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -80,7 +81,17 @@ public:
virtual void saveSettings( QDomDocument & _doc, QDomElement & _this );
virtual void loadSettings( const QDomElement & _this );
virtual QString nodeName() const;
static inline const QString classNodeName()
{
return "connection";
}
virtual QString nodeName() const
{
return classNodeName();
}
public slots:
void deleteConnection();

View File

@@ -2,8 +2,8 @@
* detuning_helper.h - detuning automation helper
*
* Copyright (c) 2007 Javier Serrano Polo <jasp00/at/users.sourceforge.net>
* Copyright (c) 2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* Copyright (c) 2008-2010 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
@@ -23,38 +23,37 @@
*
*/
#ifndef _DETUNING_HELPER_H
#define _DETUNING_HELPER_H
#include "inline_automation.h"
#include "InlineAutomation.h"
class detuningHelper : public inlineAutomation
class DetuningHelper : public InlineAutomation
{
public:
detuningHelper() :
inlineAutomation()
DetuningHelper() :
InlineAutomation()
{
}
virtual ~detuningHelper()
virtual ~DetuningHelper()
{
}
virtual float defaultValue() const
{
return( 0 );
return 0;
}
virtual QString displayName() const
{
return( tr( "Note detuning" ) );
return tr( "Note detuning" );
}
inline virtual QString nodeName() const
{
return( "detuning" );
return "detuning";
}
} ;

View File

@@ -1,5 +1,5 @@
/*
* inline_automation.h - class for automating something "inline"
* InlineAutomation.h - class for automating something "inline"
*
* Copyright (c) 2008-2010 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
@@ -25,21 +25,21 @@
#ifndef _INLINE_AUTOMATION_H
#define _INLINE_AUTOMATION_H
#include "automation_pattern.h"
#include "AutomationPattern.h"
#include "shared_object.h"
class inlineAutomation : public FloatModel, public sharedObject
class InlineAutomation : public FloatModel, public sharedObject
{
public:
inlineAutomation() :
InlineAutomation() :
FloatModel(),
sharedObject(),
m_autoPattern( NULL )
{
}
virtual ~inlineAutomation()
virtual ~InlineAutomation()
{
if( m_autoPattern )
{
@@ -57,11 +57,11 @@ public:
defaultValue() );
}
automationPattern * getAutomationPattern()
AutomationPattern * automationPattern()
{
if( m_autoPattern == NULL )
{
m_autoPattern = new automationPattern( NULL );
m_autoPattern = new AutomationPattern( NULL );
m_autoPattern->addObject( this );
}
return m_autoPattern;
@@ -72,7 +72,7 @@ public:
private:
automationPattern * m_autoPattern;
AutomationPattern * m_autoPattern;
} ;

View File

@@ -32,7 +32,7 @@
#include "export.h"
class automationEditor;
class AutomationEditor;
class bbEditor;
class bbTrackContainer;
class DummyTrackContainer;
@@ -127,7 +127,7 @@ public:
return s_projectNotes;
}
static automationEditor * getAutomationEditor()
static AutomationEditor * automationEditor()
{
return s_automationEditor;
}
@@ -187,7 +187,7 @@ private:
static MainWindow * s_mainWindow;
static FxMixerView * s_fxMixerView;
static songEditor * s_songEditor;
static automationEditor * s_automationEditor;
static AutomationEditor * s_automationEditor;
static bbEditor * s_bbEditor;
static pianoRoll * s_pianoRoll;
static projectNotes * s_projectNotes;

View File

@@ -128,6 +128,13 @@ const ch_cnt_t SURROUND_CHANNELS =
#endif
#ifdef LMMS_BUILD_WIN32
#define LADSPA_PATH_SEPERATOR ';'
#else
#define LADSPA_PATH_SEPERATOR ':'
#endif
typedef sample_t sampleFrame[DEFAULT_CHANNELS];
typedef sample_t surroundSampleFrame[SURROUND_CHANNELS];

View File

@@ -1,7 +1,7 @@
/*
* midi.h - constants, structs etc. concerning MIDI
*
* Copyright (c) 2005-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2005-2010 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -128,6 +128,11 @@ struct midiEvent
{
}
inline MidiEventTypes type() const
{
return m_type;
}
inline int channel() const
{
return m_channel;

View File

@@ -2,8 +2,8 @@
* note.h - declaration of class note which contains all informations about a
* note + definitions of several constants and enums
*
* Copyright (c) 2004-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* Copyright (c) 2004-2010 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
@@ -23,7 +23,6 @@
*
*/
#ifndef _NOTE_H
#define _NOTE_H
@@ -34,7 +33,7 @@
#include "midi_time.h"
#include "SerializingObject.h"
class detuningHelper;
class DetuningHelper;
enum Keys
@@ -87,7 +86,7 @@ public:
int key = DefaultKey,
volume_t _volume = DefaultVolume,
panning_t _panning = DefaultPanning,
detuningHelper * _detuning = NULL );
DetuningHelper * _detuning = NULL );
note( const note & _note );
virtual ~note();
@@ -194,7 +193,7 @@ public:
static midiTime quantized( const midiTime & _m, const int _q_grid );
detuningHelper * detuning() const
DetuningHelper * detuning() const
{
return m_detuning;
}
@@ -236,7 +235,7 @@ private:
panning_t m_panning;
midiTime m_length;
midiTime m_pos;
detuningHelper * m_detuning;
DetuningHelper * m_detuning;
void createDetuning();

View File

@@ -2,7 +2,7 @@
* note_play_handle.h - declaration of class notePlayHandle which is needed
* by LMMS-Play-Engine
*
* Copyright (c) 2004-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2004-2010 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -203,7 +203,7 @@ private:
class baseDetuning
{
public:
baseDetuning( detuningHelper * _detuning );
baseDetuning( DetuningHelper * _detuning );
void setValue( float _val )
{
@@ -217,7 +217,7 @@ private:
private:
detuningHelper * m_detuning;
DetuningHelper * m_detuning;
float m_value;
} ;

View File

@@ -2,7 +2,7 @@
* sample_track.h - class sampleTrack, a track which provides arrangement of
* samples
*
* Copyright (c) 2005-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2005-2010 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -167,6 +167,14 @@ public slots:
void showEffects();
protected:
void modelChanged();
virtual QString nodeName() const
{
return "SampleTrackView";
}
private:
EffectRackView * m_effectRack;
QWidget * m_effWindow;

View File

@@ -34,7 +34,7 @@
#include "MeterModel.h"
class automationTrack;
class AutomationTrack;
class pattern;
class timeLine;
@@ -141,9 +141,9 @@ public:
bpm_t getTempo();
virtual automationPattern * tempoAutomationPattern();
virtual AutomationPattern * tempoAutomationPattern();
automationTrack * globalAutomationTrack()
AutomationTrack * globalAutomationTrack()
{
return m_globalAutomationTrack;
}
@@ -262,7 +262,7 @@ private:
void restoreControllerStates( const QDomElement & _this );
automationTrack * m_globalAutomationTrack;
AutomationTrack * m_globalAutomationTrack;
IntModel m_tempoModel;
MeterModel m_timeSigModel;

View File

@@ -69,8 +69,8 @@ public:
m_posY.addJournalEntryFromOldToCurVal();
}
// automationPattern * automationPatternX();
// automationPattern * automationPatternY();
// AutomationPattern * automationPatternX();
// AutomationPattern * automationPatternY();
private:

View File

@@ -32,7 +32,7 @@
#include "JournallingObject.h"
class automationPattern;
class AutomationPattern;
class InstrumentTrack;
class trackContainerView;
@@ -51,7 +51,7 @@ public:
virtual void loadSettings( const QDomElement & _this );
virtual automationPattern * tempoAutomationPattern()
virtual AutomationPattern * tempoAutomationPattern()
{
return NULL;
}

8
lmms.1
View File

@@ -35,9 +35,9 @@ lmms \- software for easy music production
.\" \fI<whatever>\fP escape sequences to invode bold face and italics,
.\" respectively.
.B LMMS
aims to be a free alternative to popular (but commercial and closed-source) programs such as FL Studio, Cubase and Logic giving you the ability of producing music with your computer by creating cool loops, synthesizing and mixing sounds and processing effects on them, arranging samples, having fun with your MIDI-keyboard and much more...
LMMS combines the features of a sequencer-program (pattern-/channel-/sample-/song-/effect-management) and those of powerful instrument-plugins and plugin-hosters (such as LADSPA and VST) in a modern, user-friendly and easy to use graphical user-interface.
LMMS is a free cross-platform alternative to commercial programs like FL Studio®, which allow you to produce music with your computer. This includes the creation of melodies and beats, the synthesis and mixing of sounds, and arranging of samples. You can have fun with your MIDI-keyboard and much more; all in a user-friendly and modern interface.
LMMS features components such as a Song Editor, a Beat+Bassline Editor, a Piano Roll, an FX Mixer as well as many powerful instruments and effects.
.SH OPTIONS
.IP "\fB\-r, --render\fP \fIproject-file\fP
@@ -52,8 +52,6 @@ Specify output samplerate in Hz - range is 44100 (default) to 192000
Specify output bitrate in kHz (for OGG encoding only), default is 160
.IP "\fB\-i, --interpolation\fP \fImethod\fP
Specify interpolation method - possible values are \fIlinear\fP, \fIsincfastest\fP (default), \fIsincmedium\fP, \fIsincbest\fP
.IP "\fB\-i, --interpolation\fP \fImethod\fP
Specify interpolation method - possible values are \fIlinear\fP, \fIsincfastest\fP (default), \fIsincmedium\fP, \fIsincbest\fP
.IP "\fB\-x, --oversampling\fP \fIvalue\fP
Specify oversampling, possible values: 1, 2 (default), 4, 8
.IP "\fB\-u, --upgrade\fP \fIin\fP \fIout\fP

View File

@@ -30,7 +30,7 @@
#include "FlpImport.h"
#include "note_play_handle.h"
#include "automation_pattern.h"
#include "AutomationPattern.h"
#include "basic_filters.h"
#include "bb_track.h"
#include "bb_track_container.h"
@@ -1614,7 +1614,7 @@ if( scale )
value = m->minValue<float>() + value *
( m->maxValue<float>() - m->minValue<float>() );
}
automationPattern * p = automationPattern::globalAutomationPattern( m );
AutomationPattern * p = AutomationPattern::globalAutomationPattern( m );
p->putValue( jt->pos, value, false );
}
}

View File

@@ -2,7 +2,7 @@
* LadspaEffect.cpp - class for processing LADSPA effects
*
* Copyright (c) 2006-2008 Danny McRae <khjklujn/at/users.sourceforge.net>
* Copyright (c) 2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2009-2010 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -35,7 +35,7 @@
#include "LadspaSubPluginFeatures.h"
#include "mixer.h"
#include "EffectChain.h"
#include "automation_pattern.h"
#include "AutomationPattern.h"
#include "ControllerConnection.h"
#include "embed.cpp"
@@ -122,10 +122,10 @@ void LadspaEffect::changeSampleRate()
// the IDs of re-created controls have been saved and now need to be
// resolved again
automationPattern::resolveAllIDs();
AutomationPattern::resolveAllIDs();
// make sure, connections are ok
ControllerConnection::finalizeConnections();
ControllerConnection::finalizeConnections();
}
@@ -485,7 +485,7 @@ void LadspaEffect::pluginInstantiation()
{
port_desc_t * pp = m_ports.at( proc ).at( port );
if( !manager->connectPort( m_key,
m_handles[proc],
m_handles[proc],
port,
pp->buffer ) )
{

View File

@@ -197,6 +197,28 @@ struct deesser_metadata: public plugin_metadata<deesser_metadata>
PLUGIN_NAME_ID_LABEL("deesser", "deesser", "Deesser")
};
/// Damiens' Gate - metadata
/// Added some meters and stripped the weighting part
struct gate_metadata: public plugin_metadata<gate_metadata>
{
enum { in_count = 2, out_count = 2, ins_optional = 0, outs_optional = 0, support_midi = false, require_midi = false, rt_capable = true };
enum { param_bypass, param_level_in, param_meter_in, param_meter_out, param_clip_in, param_clip_out,
param_range, param_threshold, param_ratio, param_attack, param_release, param_makeup, param_knee, param_detection, param_stereo_link, param_gating,
param_count };
PLUGIN_NAME_ID_LABEL("gate", "gate", "Gate")
};
/// Markus's sidechain gate - metadata
struct sidechaingate_metadata: public plugin_metadata<sidechaingate_metadata>
{
enum { in_count = 2, out_count = 2, ins_optional = 0, outs_optional = 0, support_midi = false, require_midi = false, rt_capable = true };
enum { param_bypass, param_level_in, param_meter_in, param_meter_out, param_clip_in, param_clip_out,
param_range, param_threshold, param_ratio, param_attack, param_release, param_makeup, param_knee, param_detection, param_stereo_link, param_gating,
param_sc_mode, param_f1_freq, param_f2_freq, param_f1_level, param_f2_level,
param_sc_listen, param_f1_active, param_f2_active, param_count };
PLUGIN_NAME_ID_LABEL("sidechaingate", "sidechaingate", "Sidechain Gate")
};
/// Markus's 5-band EQ - metadata
struct equalizer5band_metadata: public plugin_metadata<equalizer5band_metadata>
{
@@ -295,15 +317,6 @@ struct bassenhancer_metadata: public plugin_metadata<bassenhancer_metadata>
PLUGIN_NAME_ID_LABEL("bassenhancer", "bassenhancer", "Bass Enhancer")
};
/// Damien's gate - metadata
struct gate_metadata: public plugin_metadata<gate_metadata>
{
enum { in_count = 3, out_count = 2, ins_optional = 1, outs_optional = 0, support_midi = false, require_midi = false, rt_capable = true };
enum { param_threshold, param_ratio, param_attack, param_release, param_makeup, param_knee, param_detection, param_stereo_link, param_aweighting, param_gating, param_peak, param_clip, param_bypass, param_range, param_mono, param_trigger, // param_freq, param_bw,
param_count };
PLUGIN_NAME_ID_LABEL("gate", "gate", "Gate")
};
/// Organ - enums for parameter IDs etc. (this mess is caused by organ split between plugin and generic class - which was
/// a bad design decision and should be sorted out some day) XXXKF @todo
struct organ_enums

View File

@@ -13,6 +13,8 @@
PER_MODULE_ITEM(sidechaincompressor, false, "sidechaincompressor")
PER_MODULE_ITEM(multibandcompressor, false, "multibandcompressor")
PER_MODULE_ITEM(deesser, false, "deesser")
PER_MODULE_ITEM(gate, false, "gate")
PER_MODULE_ITEM(sidechaingate, false, "sidechaingate")
PER_MODULE_ITEM(pulsator, false, "pulsator")
PER_MODULE_ITEM(equalizer5band, false, "eq5")
PER_MODULE_ITEM(equalizer8band, false, "eq8")
@@ -20,7 +22,6 @@
PER_MODULE_ITEM(saturator, false, "saturator")
PER_MODULE_ITEM(exciter, false, "exciter")
PER_MODULE_ITEM(bassenhancer, false, "bassenhancer")
PER_MODULE_ITEM(gate, false, "gate")
#ifdef ENABLE_EXPERIMENTAL
PER_MODULE_ITEM(fluidsynth, true, "fluidsynth")
PER_MODULE_ITEM(wavetable, true, "wavetable")

View File

@@ -29,7 +29,6 @@
#include "giface.h"
#include "metadata.h"
#include "loudness.h"
#include "primitives.h"
namespace calf_plugins {

View File

@@ -29,10 +29,13 @@
#include "giface.h"
#include "loudness.h"
#include "metadata.h"
#include "plugin_tools.h"
namespace calf_plugins {
/// Not a true _audio_module style class, just pretends to be one!
/// Main gain reduction routine by Thor called by various audio modules
class gain_reduction_audio_module
{
private:
@@ -62,12 +65,40 @@ public:
int get_changed_offsets(int generation, int &subindex_graph, int &subindex_dot, int &subindex_gridline) const;
};
/// Not a true _audio_module style class, just pretends to be one!
/// Main gate routine by Damien called by various audio modules
class expander_audio_module {
private:
float linSlope, peak, detected, kneeSqrt, kneeStart, linKneeStart, kneeStop, linKneeStop;
float compressedKneeStop, adjKneeStart, range, thres, attack_coeff, release_coeff;
float attack, release, threshold, ratio, knee, makeup, detection, stereo_link, bypass, mute, meter_out, meter_gate;
mutable float old_threshold, old_ratio, old_knee, old_makeup, old_bypass, old_range, old_trigger, old_mute, old_detection, old_stereo_link;
mutable volatile int last_generation;
inline float output_level(float slope) const;
inline float output_gain(float linSlope, bool rms) const;
public:
uint32_t srate;
bool is_active;
expander_audio_module();
void set_params(float att, float rel, float thr, float rat, float kn, float mak, float det, float stl, float byp, float mu, float ran);
void update_curve();
void process(float &left, float &right, const float *det_left = NULL, const float *det_right = NULL);
void activate();
void deactivate();
void set_sample_rate(uint32_t sr);
float get_output_level();
float get_expander_level();
bool get_graph(int subindex, float *data, int points, cairo_iface *context) const;
bool get_dot(int subindex, float &x, float &y, int &size, cairo_iface *context) const;
bool get_gridline(int subindex, float &pos, bool &vertical, std::string &legend, cairo_iface *context) const;
int get_changed_offsets(int generation, int &subindex_graph, int &subindex_dot, int &subindex_gridline) const;
};
/// Compressor by Thor
class compressor_audio_module: public audio_module<compressor_metadata>, public line_graph_iface {
private:
typedef compressor_audio_module AM;
uint32_t clip_in, clip_out;
float meter_in, meter_out;
stereo_in_out_metering<compressor_metadata> meters;
gain_reduction_audio_module compressor;
public:
typedef std::complex<double> cfloat;
@@ -107,8 +138,7 @@ private:
CalfScModes sc_mode;
mutable CalfScModes sc_mode_old, sc_mode_old1;
float f1_active, f2_active;
uint32_t clip_in, clip_out;
float meter_in, meter_out;
stereo_in_out_metering<sidechaincompressor_metadata> meters;
gain_reduction_audio_module compressor;
dsp::biquad_d2<float> f1L, f1R, f2L, f2R;
public:
@@ -130,7 +160,7 @@ public:
int get_changed_offsets(int index, int generation, int &subindex_graph, int &subindex_dot, int &subindex_gridline) const;
};
/// Multibandcompressor by Markus Schmidt
/// Multibandcompressor by Markus Schmidt (based on Thor's compressor and Krzysztof's filters)
class multibandcompressor_audio_module: public audio_module<multibandcompressor_metadata>, public line_graph_iface {
private:
typedef multibandcompressor_audio_module AM;
@@ -190,59 +220,71 @@ public:
int get_changed_offsets(int index, int generation, int &subindex_graph, int &subindex_dot, int &subindex_gridline) const;
};
class gate_audio_module: public audio_module<gate_metadata>, public line_graph_iface {
/// Gate by Damien
class gate_audio_module: public audio_module<gate_metadata>, public line_graph_iface {
private:
float linSlope, peak, detected, kneeSqrt, kneeStart, linKneeStart, kneeStop, linKneeStop, threshold, ratio, knee, makeup, compressedKneeStop, adjKneeStart, range;
mutable float old_threshold, old_ratio, old_knee, old_makeup, old_bypass, old_range, old_trigger, old_mono;
mutable volatile int last_generation;
uint32_t clip;
dsp::aweighter awL, awR;
dsp::biquad_d2<float> bpL, bpR;
typedef gate_audio_module AM;
stereo_in_out_metering<gate_metadata> meters;
expander_audio_module gate;
public:
typedef std::complex<double> cfloat;
uint32_t srate;
bool is_active;
mutable volatile int last_generation, last_calculated_generation;
gate_audio_module();
void activate();
void deactivate();
uint32_t process(uint32_t offset, uint32_t numsamples, uint32_t inputs_mask, uint32_t outputs_mask);
inline float output_level(float slope) const {
bool rms = *params[param_detection] == 0;
return slope * output_gain(rms ? slope*slope : slope, rms) * makeup;
}
inline float output_gain(float linSlope, bool rms) const {
if(linSlope < linKneeStop) {
float slope = log(linSlope);
//float tratio = rms ? sqrt(ratio) : ratio;
float tratio = ratio;
float gain = 0.f;
float delta = 0.f;
if(IS_FAKE_INFINITY(ratio))
tratio = 1000.f;
gain = (slope-threshold) * tratio + threshold;
delta = tratio;
if(knee > 1.f && slope > kneeStart ) {
gain = dsp::hermite_interpolation(slope, kneeStart, kneeStop, ((kneeStart - threshold) * tratio + threshold), kneeStop, delta,1.f);
}
return std::max(range, expf(gain-slope));
}
return 1.f;
}
void params_changed();
void set_sample_rate(uint32_t sr);
virtual bool get_graph(int index, int subindex, float *data, int points, cairo_iface *context) const;
virtual bool get_dot(int index, int subindex, float &x, float &y, int &size, cairo_iface *context) const;
virtual bool get_gridline(int index, int subindex, float &pos, bool &vertical, std::string &legend, cairo_iface *context) const;
virtual int get_changed_offsets(int generation, int &subindex_graph, int &subindex_dot, int &subindex_gridline) const;
uint32_t process(uint32_t offset, uint32_t numsamples, uint32_t inputs_mask, uint32_t outputs_mask);
bool get_graph(int index, int subindex, float *data, int points, cairo_iface *context) const;
bool get_dot(int index, int subindex, float &x, float &y, int &size, cairo_iface *context) const;
bool get_gridline(int index, int subindex, float &pos, bool &vertical, std::string &legend, cairo_iface *context) const;
int get_changed_offsets(int index, int generation, int &subindex_graph, int &subindex_dot, int &subindex_gridline) const;
};
/// Sidecain Gate by Markus Schmidt (based on Damiens's gate and Krzysztof's filters)
class sidechaingate_audio_module: public audio_module<sidechaingate_metadata>, public frequency_response_line_graph {
private:
typedef sidechaingate_audio_module AM;
enum CalfScModes {
WIDEBAND,
HIGHGATE_WIDE,
HIGHGATE_SPLIT,
LOWGATE_WIDE,
LOWGATE_SPLIT,
WEIGHTED_1,
WEIGHTED_2,
WEIGHTED_3,
BANDPASS_1,
BANDPASS_2
};
mutable float f1_freq_old, f2_freq_old, f1_level_old, f2_level_old;
mutable float f1_freq_old1, f2_freq_old1, f1_level_old1, f2_level_old1;
CalfScModes sc_mode;
mutable CalfScModes sc_mode_old, sc_mode_old1;
float f1_active, f2_active;
stereo_in_out_metering<sidechaingate_metadata> meters;
expander_audio_module gate;
dsp::biquad_d2<float> f1L, f1R, f2L, f2R;
public:
typedef std::complex<double> cfloat;
uint32_t srate;
bool is_active;
mutable volatile int last_generation, last_calculated_generation;
sidechaingate_audio_module();
void activate();
void deactivate();
void params_changed();
cfloat h_z(const cfloat &z) const;
float freq_gain(int index, double freq, uint32_t sr) const;
void set_sample_rate(uint32_t sr);
uint32_t process(uint32_t offset, uint32_t numsamples, uint32_t inputs_mask, uint32_t outputs_mask);
bool get_graph(int index, int subindex, float *data, int points, cairo_iface *context) const;
bool get_dot(int index, int subindex, float &x, float &y, int &size, cairo_iface *context) const;
bool get_gridline(int index, int subindex, float &pos, bool &vertical, std::string &legend, cairo_iface *context) const;
int get_changed_offsets(int index, int generation, int &subindex_graph, int &subindex_dot, int &subindex_gridline) const;
};
};

View File

@@ -28,6 +28,7 @@
#include "audio_fx.h"
#include "giface.h"
#include "metadata.h"
#include "plugin_tools.h"
namespace calf_plugins {
@@ -37,8 +38,8 @@ private:
float hp_pre_freq_old, lp_pre_freq_old;
float hp_post_freq_old, lp_post_freq_old;
float p_level_old, p_freq_old, p_q_old;
uint32_t clip_in, clip_out;
float meter_in, meter_out, meter_drive;
stereo_in_out_metering<saturator_metadata> meters;
float meter_drive;
dsp::biquad_d2<float> lp[2][4], hp[2][4];
dsp::biquad_d2<float> p[2];
dsp::tap_distortion dist[2];
@@ -57,8 +58,8 @@ public:
class exciter_audio_module: public audio_module<exciter_metadata> {
private:
float freq_old;
uint32_t clip_in, clip_out;
float meter_in, meter_out, meter_drive;
stereo_in_out_metering<exciter_metadata> meters;
float meter_drive;
dsp::biquad_d2<float> hp[2][4];
dsp::tap_distortion dist[2];
public:
@@ -76,8 +77,8 @@ public:
class bassenhancer_audio_module: public audio_module<bassenhancer_metadata> {
private:
float freq_old;
uint32_t clip_in, clip_out;
float meter_in, meter_out, meter_drive;
stereo_in_out_metering<exciter_metadata> meters;
float meter_drive;
dsp::biquad_d2<float> lp[2][4];
dsp::tap_distortion dist[2];
public:

View File

@@ -0,0 +1,85 @@
/* Calf DSP plugin pack
* Tools to use in plugins
*
* Copyright (C) 2001-2010 Krzysztof Foltman, Markus Schmidt, Thor Harald Johansen and others
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General
* Public License along with this program; if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02111-1307, USA.
*/
#ifndef CALF_PLUGIN_TOOLS_H
#define CALF_PLUGIN_TOOLS_H
#include <config.h>
#include "giface.h"
#include "vumeter.h"
namespace calf_plugins {
/// Base class for universal stereo level metering
struct stereo_in_out_metering_base
{
dsp::vumeter vumeter_in, vumeter_out;
stereo_in_out_metering_base()
{
reset();
}
void reset()
{
vumeter_in.reset();
vumeter_out.reset();
}
};
/// Universal stereo level metering for a specific plugin
template<class Metadata>
class stereo_in_out_metering: public stereo_in_out_metering_base
{
public:
inline void process(float *const *params, const float *const *inputs, const float *const *outputs, unsigned int offset, unsigned int nsamples)
{
if (params[Metadata::param_meter_in] || params[Metadata::param_clip_in]) {
if (inputs)
vumeter_in.update_stereo(inputs[0] ? inputs[0] + offset : NULL, inputs[1] ? inputs[1] + offset : NULL, nsamples);
else
vumeter_in.update_zeros(nsamples);
if (params[Metadata::param_meter_in])
*params[Metadata::param_meter_in] = vumeter_in.level;
if (params[Metadata::param_clip_in])
*params[Metadata::param_clip_in] = vumeter_in.clip > 0 ? 1.f : 0.f;
}
if (params[Metadata::param_meter_out] || params[Metadata::param_clip_out]) {
if (outputs)
vumeter_out.update_stereo(outputs[0] ? outputs[0] + offset : NULL, outputs[1] ? outputs[1] + offset : NULL, nsamples);
else
vumeter_out.update_zeros(nsamples);
if (params[Metadata::param_meter_out])
*params[Metadata::param_meter_out] = vumeter_out.level;
if (params[Metadata::param_clip_out])
*params[Metadata::param_clip_out] = vumeter_out.clip > 0 ? 1.f : 0.f;
}
}
void bypassed(float *const *params, unsigned int nsamples)
{
reset();
process(params, NULL, NULL, 0, nsamples);
}
};
};
#endif

View File

@@ -0,0 +1,95 @@
/* Calf DSP Library
* Peak metering facilities.
*
* Copyright (C) 2007 Krzysztof Foltman
*
* 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, 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; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
*/
#ifndef __CALF_VUMETER_H
#define __CALF_VUMETER_H
namespace dsp {
/// Peak meter class
struct vumeter
{
/// Measured signal level
float level;
/// Falloff of signal level (b1 coefficient of a 1-pole filter)
float falloff;
/// Clip indicator (set to 1 when |value| >= 1, fading otherwise)
float clip;
/// Falloff of clip indicator (b1 coefficient of a 1-pole filter); set to 1 if no falloff is required (manual reset of clip indicator)
float clip_falloff;
vumeter()
{
falloff = 0.999f;
clip_falloff = 0.999f;
reset();
}
void reset()
{
level = 0;
clip = 0;
}
/// Update peak meter based on input signal
inline void update(const float *src, unsigned int len)
{
update_stereo(src, NULL, len);
}
/// Update peak meter based on louder of two input signals
inline void update_stereo(const float *src1, const float *src2, unsigned int len)
{
// "Age" the old level by falloff^length
level *= pow(falloff, len);
// Same for clip level (using different fade constant)
clip *= pow(clip_falloff, len);
dsp::sanitize(level);
dsp::sanitize(clip);
// Process input samples - to get peak value, take a max of all values in the input signal and "aged" old peak
// Clip is set to 1 if any sample is out-of-range, if no clip occurs, the "aged" value is assumed
if (src1)
run_sample_loop(src1, len);
if (src2)
run_sample_loop(src2, len);
}
inline void run_sample_loop(const float *src, unsigned int len)
{
float tmp = level;
for (unsigned int i = 0; i < len; i++) {
float sig = fabs(src[i]);
tmp = std::max(tmp, sig);
if (sig >= 1.f)
clip = 1.f;
}
level = tmp;
}
/// Update clip meter as if update was called with all-zero input signal
inline void update_zeros(unsigned int len)
{
level *= pow((double)falloff, (double)len);
clip *= pow((double)clip_falloff, (double)len);
dsp::sanitize(level);
dsp::sanitize(clip);
}
};
};
#endif

View File

@@ -399,6 +399,83 @@ CALF_PORT_PROPS(deesser) = {
CALF_PLUGIN_INFO(deesser) = { 0x8515, "Deesser", "Calf Deesser", "Markus Schmidt / Thor Harald Johansen", calf_plugins::calf_copyright_info, "CompressorPlugin" };
////////////////////////////////////////////////////////////////////////////
CALF_PORT_NAMES(gate) = {"In L", "In R", "Out L", "Out R"};
const char *gate_detection_names[] = { "RMS", "Peak" };
const char *gate_stereo_link_names[] = { "Average", "Maximum" };
CALF_PORT_PROPS(gate) = {
{ 0, 0, 1, 0, PF_BOOL | PF_CTL_TOGGLE, NULL, "bypass", "Bypass" },
{ 1, 0, 64, 0, PF_FLOAT | PF_SCALE_GAIN | PF_CTL_KNOB | PF_UNIT_COEF | PF_PROP_NOBOUNDS, NULL, "level_in", "Input" },
{ 0, 0, 1, 0, PF_FLOAT | PF_SCALE_GAIN | PF_CTL_METER | PF_CTLO_LABEL | PF_UNIT_DB | PF_PROP_OUTPUT | PF_PROP_OPTIONAL, NULL, "meter_in", "Input" },
{ 0, 0, 1, 0, PF_FLOAT | PF_SCALE_GAIN | PF_CTL_METER | PF_CTLO_LABEL | PF_UNIT_DB | PF_PROP_OUTPUT | PF_PROP_OPTIONAL, NULL, "meter_out", "Output" },
{ 0, 0, 1, 0, PF_BOOL | PF_CTL_LED | PF_PROP_OUTPUT | PF_PROP_OPTIONAL, NULL, "clip_in", "0dB-In" },
{ 0, 0, 1, 0, PF_BOOL | PF_CTL_LED | PF_PROP_OUTPUT | PF_PROP_OPTIONAL, NULL, "clip_out", "0dB-Out" },
{ 0.06125, 0.000015849, 1, 0, PF_FLOAT | PF_SCALE_GAIN | PF_CTL_KNOB | PF_UNIT_DB, NULL, "range", "Max Gain Reduction" },
{ 0.125, 0.000976563, 1, 0, PF_FLOAT | PF_SCALE_GAIN | PF_CTL_KNOB | PF_UNIT_DB, NULL, "threshold", "Threshold" },
{ 2, 1, 20, 21, PF_FLOAT | PF_SCALE_LOG_INF | PF_CTL_KNOB | PF_UNIT_COEF, NULL, "ratio", "Ratio" },
{ 20, 0.01, 2000, 0, PF_FLOAT | PF_SCALE_LOG | PF_CTL_KNOB | PF_UNIT_MSEC, NULL, "attack", "Attack" },
{ 250, 0.01, 2000, 0, PF_FLOAT | PF_SCALE_LOG | PF_CTL_KNOB | PF_UNIT_MSEC, NULL, "release", "Release" },
{ 1, 1, 64, 0, PF_FLOAT | PF_SCALE_GAIN | PF_CTL_KNOB | PF_UNIT_DB, NULL, "makeup", "Makeup Gain" },
{ 2.828427125, 1, 8, 0, PF_FLOAT | PF_SCALE_GAIN | PF_CTL_KNOB | PF_UNIT_DB, NULL, "knee", "Knee" },
{ 0, 0, 1, 0, PF_ENUM | PF_CTL_COMBO, gate_detection_names, "detection", "Detection" },
{ 0, 0, 1, 0, PF_ENUM | PF_CTL_COMBO, gate_stereo_link_names, "stereo_link", "Stereo Link" },
{ 0, 0.03125, 1, 0, PF_FLOAT | PF_SCALE_GAIN | PF_CTL_METER | PF_CTLO_LABEL | PF_CTLO_REVERSE | PF_UNIT_DB | PF_PROP_OUTPUT | PF_PROP_OPTIONAL| PF_PROP_GRAPH, NULL, "gating", "Gating" },
};
CALF_PLUGIN_INFO(gate) = { 0x8503, "Gate", "Calf Gate", "Damien Zammit / Thor Harald Johansen", calf_plugins::calf_copyright_info, "ExpanderPlugin" };
////////////////////////////////////////////////////////////////////////////
CALF_PORT_NAMES(sidechaingate) = {"In L", "In R", "Out L", "Out R"};
const char *sidechaingate_detection_names[] = { "RMS", "Peak" };
const char *sidechaingate_stereo_link_names[] = { "Average", "Maximum" };
const char *sidechaingate_mode_names[] = {"Wideband (F1:off / F2:off)",
"High gate wide (F1:Bell / F2:HP)",
"High gate split (F1:off / F2:HP)",
"Low Gate wide (F1:LP / F2:Bell)",
"Low gate split (F1:LP / F2:off)",
"Weighted #1 (F1:Shelf / F2:Shelf)",
"Weighted #2 (F1:Shelf / F2:Bell)",
"Weighted #3 (F1:Bell / F2:Shelf)",
"Bandpass #1 (F1:BP / F2:off)",
"Bandpass #2 (F1:HP / F2:LP)"};
const char *sidechaingate_filter_choices[] = { "12dB", "24dB", "36dB"};
CALF_PORT_PROPS(sidechaingate) = {
{ 0, 0, 1, 0, PF_BOOL | PF_CTL_TOGGLE, NULL, "bypass", "Bypass" },
{ 1, 0, 64, 0, PF_FLOAT | PF_SCALE_GAIN | PF_CTL_KNOB | PF_UNIT_COEF | PF_PROP_NOBOUNDS, NULL, "level_in", "Input" },
{ 0, 0, 1, 0, PF_FLOAT | PF_SCALE_GAIN | PF_CTL_METER | PF_CTLO_LABEL | PF_UNIT_DB | PF_PROP_OUTPUT | PF_PROP_OPTIONAL, NULL, "meter_in", "Input" },
{ 0, 0, 1, 0, PF_FLOAT | PF_SCALE_GAIN | PF_CTL_METER | PF_CTLO_LABEL | PF_UNIT_DB | PF_PROP_OUTPUT | PF_PROP_OPTIONAL, NULL, "meter_out", "Output" },
{ 0, 0, 1, 0, PF_BOOL | PF_CTL_LED | PF_PROP_OUTPUT | PF_PROP_OPTIONAL, NULL, "clip_in", "0dB-In" },
{ 0, 0, 1, 0, PF_BOOL | PF_CTL_LED | PF_PROP_OUTPUT | PF_PROP_OPTIONAL, NULL, "clip_out", "0dB-Out" },
{ 0.06125, 0.000015849, 1, 0, PF_FLOAT | PF_SCALE_GAIN | PF_CTL_KNOB | PF_UNIT_DB, NULL, "range", "Max Gain Reduction" },
{ 0.125, 0.000976563, 1, 0, PF_FLOAT | PF_SCALE_GAIN | PF_CTL_KNOB | PF_UNIT_DB, NULL, "threshold", "Threshold" },
{ 2, 1, 20, 21, PF_FLOAT | PF_SCALE_LOG_INF | PF_CTL_KNOB | PF_UNIT_COEF, NULL, "ratio", "Ratio" },
{ 20, 0.01, 2000, 0, PF_FLOAT | PF_SCALE_LOG | PF_CTL_KNOB | PF_UNIT_MSEC, NULL, "attack", "Attack" },
{ 250, 0.01, 2000, 0, PF_FLOAT | PF_SCALE_LOG | PF_CTL_KNOB | PF_UNIT_MSEC, NULL, "release", "Release" },
{ 1, 1, 64, 0, PF_FLOAT | PF_SCALE_GAIN | PF_CTL_KNOB | PF_UNIT_DB, NULL, "makeup", "Makeup Gain" },
{ 2.828427125, 1, 8, 0, PF_FLOAT | PF_SCALE_GAIN | PF_CTL_KNOB | PF_UNIT_DB, NULL, "knee", "Knee" },
{ 0, 0, 1, 0, PF_ENUM | PF_CTL_COMBO, sidechaingate_detection_names, "detection", "Detection" },
{ 0, 0, 1, 0, PF_ENUM | PF_CTL_COMBO, sidechaingate_stereo_link_names, "stereo_link", "Stereo Link" },
{ 0, 0.03125, 1, 0, PF_FLOAT | PF_SCALE_GAIN | PF_CTL_METER | PF_CTLO_LABEL | PF_CTLO_REVERSE | PF_UNIT_DB | PF_PROP_OUTPUT | PF_PROP_OPTIONAL| PF_PROP_GRAPH, NULL, "gating", "Gating" },
{ 0, 0, 9, 0, PF_ENUM | PF_CTL_COMBO, sidechaingate_mode_names, "sc_mode", "Sidechain Mode" },
{ 250, 10,18000, 0, PF_FLOAT | PF_SCALE_LOG | PF_CTL_KNOB | PF_UNIT_HZ | PF_PROP_GRAPH, NULL, "f1_freq", "F1 Freq" },
{ 4500, 10,18000, 0, PF_FLOAT | PF_SCALE_LOG | PF_CTL_KNOB | PF_UNIT_HZ, NULL, "f2_freq", "F2 Freq" },
{ 1, 0.0625, 16, 0, PF_FLOAT | PF_SCALE_GAIN | PF_CTL_KNOB | PF_UNIT_DB, NULL, "f1_level", "F1 Level" },
{ 1, 0.0625, 16, 0, PF_FLOAT | PF_SCALE_GAIN | PF_CTL_KNOB | PF_UNIT_DB, NULL, "f2_level", "F2 Level" },
{ 0, 0, 1, 0, PF_BOOL | PF_CTL_TOGGLE, NULL, "sc_listen", "S/C-Listen" },
{ 0, 0, 1, 0, PF_BOOL | PF_CTL_LED | PF_PROP_OUTPUT | PF_PROP_OPTIONAL, NULL, "f1_active", "F1 Active" },
{ 0, 0, 1, 0, PF_BOOL | PF_CTL_LED | PF_PROP_OUTPUT | PF_PROP_OPTIONAL, NULL, "f2_active", "F2 Active" },
};
CALF_PLUGIN_INFO(sidechaingate) = { 0x8504, "Sidechaingate", "Calf Sidechain Gate", "Markus Schmidt / Damien Zammit / Thor Harald Johansen", calf_plugins::calf_copyright_info, "ExpanderPlugin" };
////////////////////////////////////////////////////////////////////////////
// A few macros to make
@@ -592,37 +669,6 @@ CALF_PORT_PROPS(bassenhancer) = {
CALF_PLUGIN_INFO(bassenhancer) = { 0x8532, "BassEnhancer", "Calf Bass Enhancer", "Markus Schmidt / Krzysztof Foltman", calf_plugins::calf_copyright_info, "DistortionPlugin" };
////////////////////////////////////////////////////////////////////////////
CALF_PORT_NAMES(gate) = {"In L", "In R", "In Trigger", "Out L", "Out R"};
const char *gate_detection_names[] = { "RMS", "Peak" };
const char *gate_stereo_link_names[] = { "Average", "Maximum" };
const char *gate_weighting_names[] = { "Normal", "A-weighted", "Deesser (low)", "Deesser (med)", "Deesser (high)" };
CALF_PORT_PROPS(gate) = {
{ 0.125, 0.000976563, 1, 0, PF_FLOAT | PF_SCALE_GAIN | PF_CTL_KNOB | PF_UNIT_DB, NULL, "threshold", "Threshold" },
{ 2, 1, 20, 21, PF_FLOAT | PF_SCALE_LOG_INF | PF_CTL_KNOB | PF_UNIT_COEF, NULL, "ratio", "Ratio" },
{ 20, 1, 2000, 0, PF_FLOAT | PF_SCALE_LOG | PF_CTL_KNOB | PF_UNIT_MSEC, NULL, "attack", "Attack" },
{ 250, 1, 2000, 0, PF_FLOAT | PF_SCALE_LOG | PF_CTL_KNOB | PF_UNIT_MSEC, NULL, "release", "Release" },
{ 1, 1, 64, 0, PF_FLOAT | PF_SCALE_GAIN | PF_CTL_KNOB | PF_UNIT_DB, NULL, "makeup", "Makeup Gain" },
{ 2.828427125, 1, 8, 0, PF_FLOAT | PF_SCALE_GAIN | PF_CTL_KNOB | PF_UNIT_DB, NULL, "knee", "Knee" },
{ 0, 0, 1, 0, PF_ENUM | PF_CTL_COMBO, gate_detection_names, "detection", "Detection" },
{ 0, 0, 1, 0, PF_ENUM | PF_CTL_COMBO, gate_stereo_link_names, "stereo_link", "Stereo Link" },
{ 0, 0, 4, 0, PF_ENUM | PF_CTL_COMBO, gate_weighting_names, "aweighting", "Weighting" },
{ 0, 0.03125, 1, 0, PF_FLOAT | PF_SCALE_GAIN | PF_CTL_METER | PF_CTLO_LABEL | PF_UNIT_DB | PF_PROP_OUTPUT | PF_PROP_OPTIONAL| PF_PROP_GRAPH, NULL, "gating", "Gating" },
{ 0, 0, 1, 0, PF_FLOAT | PF_SCALE_GAIN | PF_CTL_METER | PF_CTLO_LABEL | PF_UNIT_DB | PF_PROP_OUTPUT | PF_PROP_OPTIONAL, NULL, "peak", "Peak Output" },
{ 0, 0, 1, 0, PF_BOOL | PF_CTL_LED | PF_PROP_OUTPUT | PF_PROP_OPTIONAL, NULL, "clip", "0dBFS" },
{ 0, 0, 1, 0, PF_BOOL | PF_CTL_TOGGLE, NULL, "bypass", "Bypass" },
{ 0.01, 0.000015849, 1, 0, PF_FLOAT | PF_SCALE_GAIN | PF_CTL_KNOB | PF_UNIT_DB, NULL, "range", "Max Gain Reduction" },
{ 0, 0, 1, 0, PF_BOOL | PF_CTL_TOGGLE, NULL, "mono", "Mono (L only)" },
{ 0, 0, 1, 0, PF_BOOL | PF_CTL_TOGGLE, NULL, "trigger", "Sidechain (Mono In)" },
};
CALF_PLUGIN_INFO(gate) = { 0x8503, "Gate", "Calf Gate", "Damien Zammit / Thor Harald Johansen", calf_plugins::calf_copyright_info, "ExpanderPlugin" };
////////////////////////////////////////////////////////////////////////////
CALF_PORT_NAMES(monosynth) = {

File diff suppressed because it is too large Load Diff

View File

@@ -38,10 +38,6 @@ saturator_audio_module::saturator_audio_module()
{
is_active = false;
srate = 0;
clip_in = 0.f;
clip_out = 0.f;
meter_in = 0.f;
meter_out = 0.f;
meter_drive = 0.f;
}
@@ -50,6 +46,8 @@ void saturator_audio_module::activate()
is_active = true;
// set all filters
params_changed();
meters.reset();
meter_drive = 0.f;
}
void saturator_audio_module::deactivate()
{
@@ -120,6 +118,8 @@ void saturator_audio_module::set_sample_rate(uint32_t sr)
uint32_t saturator_audio_module::process(uint32_t offset, uint32_t numsamples, uint32_t inputs_mask, uint32_t outputs_mask)
{
bool bypass = *params[param_bypass] > 0.5f;
uint32_t orig_offset = offset;
uint32_t orig_numsamples = numsamples;
numsamples += offset;
if(bypass) {
// everything bypassed
@@ -137,18 +137,8 @@ uint32_t saturator_audio_module::process(uint32_t offset, uint32_t numsamples, u
}
++offset;
}
// displays, too
clip_in = 0.f;
clip_out = 0.f;
meter_in = 0.f;
meter_out = 0.f;
meter_drive = 0.f;
meters.bypassed(params, orig_numsamples);
} else {
clip_in -= std::min(clip_in, numsamples);
clip_out -= std::min(clip_out, numsamples);
meter_in = 0.f;
meter_out = 0.f;
meter_drive = 0.f;
float in_avg[2] = {0.f, 0.f};
float out_avg[2] = {0.f, 0.f};
@@ -157,7 +147,6 @@ uint32_t saturator_audio_module::process(uint32_t offset, uint32_t numsamples, u
while(offset < numsamples) {
// cycle through samples
float out[2], in[2] = {0.f, 0.f};
float maxIn, maxOut = 0.f;
int c = 0;
if(in_count > 1 && out_count > 1) {
@@ -178,6 +167,8 @@ uint32_t saturator_audio_module::process(uint32_t offset, uint32_t numsamples, u
proc[0] = in[0] * *params[param_level_in];
proc[1] = in[1] * *params[param_level_in];
float onedivlevelin = 1.0 / *params[param_level_in];
for (int i = 0; i < c; ++i) {
// all pre filters in chain
proc[i] = lp[i][1].process(lp[i][0].process(proc[i]));
@@ -200,7 +191,7 @@ uint32_t saturator_audio_module::process(uint32_t offset, uint32_t numsamples, u
proc[i] = hp[i][2].process(hp[i][3].process(proc[i]));
//subtract gain
proc[i] /= *params[param_level_in];
proc[i] *= onedivlevelin;
}
if(in_count > 1 && out_count > 1) {
@@ -209,42 +200,23 @@ uint32_t saturator_audio_module::process(uint32_t offset, uint32_t numsamples, u
outs[0][offset] = out[0];
out[1] = ((proc[1] * *params[param_mix]) + in[1] * (1 - *params[param_mix])) * *params[param_level_out];
outs[1][offset] = out[1];
maxIn = std::max(fabs(in[0]), fabs(in[1]));
maxOut = std::max(fabs(out[0]), fabs(out[1]));
} else if(out_count > 1) {
// mono -> pseudo stereo
out[0] = ((proc[0] * *params[param_mix]) + in[0] * (1 - *params[param_mix])) * *params[param_level_out];
outs[0][offset] = out[0];
out[1] = out[0];
outs[1][offset] = out[1];
maxOut = fabs(out[0]);
maxIn = fabs(in[0]);
} else {
// stereo -> mono
// or full mono
out[0] = ((proc[0] * *params[param_mix]) + in[0] * (1 - *params[param_mix])) * *params[param_level_out];
outs[0][offset] = out[0];
maxIn = fabs(in[0]);
maxOut = fabs(out[0]);
}
if(maxIn > 1.f) {
clip_in = srate >> 3;
}
if(maxOut > 1.f) {
clip_out = srate >> 3;
}
// set up in / out meters
if(maxIn > meter_in) {
meter_in = maxIn;
}
if(maxOut > meter_out) {
meter_out = maxOut;
}
// next sample
++offset;
} // cycle trough samples
meters.process(params, ins, outs, orig_offset, orig_numsamples);
tube_avg = (sqrt(std::max(out_avg[0], out_avg[1])) / numsamples) - (sqrt(std::max(in_avg[0], in_avg[1])) / numsamples);
meter_drive = (5.0f * fabs(tube_avg) * (float(*params[param_blend]) + 30.0f));
@@ -270,19 +242,6 @@ uint32_t saturator_audio_module::process(uint32_t offset, uint32_t numsamples, u
p[1].sanitize();
}
// draw meters
if(params[param_clip_in] != NULL) {
*params[param_clip_in] = clip_in;
}
if(params[param_clip_out] != NULL) {
*params[param_clip_out] = clip_out;
}
if(params[param_meter_in] != NULL) {
*params[param_meter_in] = meter_in;
}
if(params[param_meter_out] != NULL) {
*params[param_meter_out] = meter_out;
}
if(params[param_meter_drive] != NULL) {
*params[param_meter_drive] = meter_drive;
}
@@ -300,10 +259,6 @@ exciter_audio_module::exciter_audio_module()
{
is_active = false;
srate = 0;
clip_in = 0.f;
clip_out = 0.f;
meter_in = 0.f;
meter_out = 0.f;
meter_drive = 0.f;
}
@@ -351,6 +306,8 @@ void exciter_audio_module::set_sample_rate(uint32_t sr)
uint32_t exciter_audio_module::process(uint32_t offset, uint32_t numsamples, uint32_t inputs_mask, uint32_t outputs_mask)
{
uint32_t orig_offset = offset;
uint32_t orig_numsamples = numsamples;
bool bypass = *params[param_bypass] > 0.5f;
numsamples += offset;
if(bypass) {
@@ -369,25 +326,18 @@ uint32_t exciter_audio_module::process(uint32_t offset, uint32_t numsamples, uin
}
++offset;
}
meters.bypassed(params, orig_numsamples);
// displays, too
clip_in = 0.f;
clip_out = 0.f;
meter_in = 0.f;
meter_out = 0.f;
meter_drive = 0.f;
} else {
clip_in -= std::min(clip_in, numsamples);
clip_out -= std::min(clip_out, numsamples);
meter_in = 0.f;
meter_out = 0.f;
meter_drive = 0.f;
// process
while(offset < numsamples) {
// cycle through samples
float out[2], in[2] = {0.f, 0.f};
float maxIn, maxOut, maxDrive = 0.f;
float maxDrive = 0.f;
int c = 0;
if(in_count > 1 && out_count > 1) {
@@ -434,8 +384,6 @@ uint32_t exciter_audio_module::process(uint32_t offset, uint32_t numsamples, uin
else
out[1] = (proc[1] * *params[param_amount] + in[1]) * *params[param_level_out];
outs[1][offset] = out[1];
maxIn = std::max(fabs(in[0]), fabs(in[1]));
maxOut = std::max(fabs(out[0]), fabs(out[1]));
maxDrive = std::max(dist[0].get_distortion_level() * *params[param_amount],
dist[1].get_distortion_level() * *params[param_amount]);
} else if(out_count > 1) {
@@ -447,8 +395,6 @@ uint32_t exciter_audio_module::process(uint32_t offset, uint32_t numsamples, uin
outs[0][offset] = out[0];
out[1] = out[0];
outs[1][offset] = out[1];
maxOut = fabs(out[0]);
maxIn = fabs(in[0]);
maxDrive = dist[0].get_distortion_level() * *params[param_amount];
} else {
// stereo -> mono
@@ -458,24 +404,10 @@ uint32_t exciter_audio_module::process(uint32_t offset, uint32_t numsamples, uin
else
out[0] = (proc[0] * *params[param_amount] + in[0]) * *params[param_level_out];
outs[0][offset] = out[0];
maxIn = fabs(in[0]);
maxOut = fabs(out[0]);
maxDrive = dist[0].get_distortion_level() * *params[param_amount];
}
if(maxIn > 1.f) {
clip_in = srate >> 3;
}
if(maxOut > 1.f) {
clip_out = srate >> 3;
}
// set up in / out meters
if(maxIn > meter_in) {
meter_in = maxIn;
}
if(maxOut > meter_out) {
meter_out = maxOut;
}
if(maxDrive > meter_drive) {
meter_drive = maxDrive;
}
@@ -483,6 +415,7 @@ uint32_t exciter_audio_module::process(uint32_t offset, uint32_t numsamples, uin
// next sample
++offset;
} // cycle trough samples
meters.process(params, ins, outs, orig_offset, orig_numsamples);
// clean up
hp[0][0].sanitize();
hp[1][0].sanitize();
@@ -494,19 +427,6 @@ uint32_t exciter_audio_module::process(uint32_t offset, uint32_t numsamples, uin
hp[1][3].sanitize();
}
// draw meters
if(params[param_clip_in] != NULL) {
*params[param_clip_in] = clip_in;
}
if(params[param_clip_out] != NULL) {
*params[param_clip_out] = clip_out;
}
if(params[param_meter_in] != NULL) {
*params[param_meter_in] = meter_in;
}
if(params[param_meter_out] != NULL) {
*params[param_meter_out] = meter_out;
}
if(params[param_meter_drive] != NULL) {
*params[param_meter_drive] = meter_drive;
}
@@ -524,16 +444,14 @@ bassenhancer_audio_module::bassenhancer_audio_module()
{
is_active = false;
srate = 0;
clip_in = 0.f;
clip_out = 0.f;
meter_in = 0.f;
meter_out = 0.f;
meters.reset();
meter_drive = 0.f;
}
void bassenhancer_audio_module::activate()
{
is_active = true;
meters.reset();
// set all filters
params_changed();
}
@@ -575,6 +493,8 @@ void bassenhancer_audio_module::set_sample_rate(uint32_t sr)
uint32_t bassenhancer_audio_module::process(uint32_t offset, uint32_t numsamples, uint32_t inputs_mask, uint32_t outputs_mask)
{
bool bypass = *params[param_bypass] > 0.5f;
uint32_t orig_offset = offset;
uint32_t orig_numsamples = numsamples;
numsamples += offset;
if(bypass) {
// everything bypassed
@@ -593,24 +513,16 @@ uint32_t bassenhancer_audio_module::process(uint32_t offset, uint32_t numsamples
++offset;
}
// displays, too
clip_in = 0.f;
clip_out = 0.f;
meter_in = 0.f;
meter_out = 0.f;
meters.bypassed(params, orig_numsamples);
meter_drive = 0.f;
} else {
clip_in -= std::min(clip_in, numsamples);
clip_out -= std::min(clip_out, numsamples);
meter_in = 0.f;
meter_out = 0.f;
meter_drive = 0.f;
// process
while(offset < numsamples) {
// cycle through samples
float out[2], in[2] = {0.f, 0.f};
float maxIn, maxOut, maxDrive = 0.f;
float maxDrive = 0.f;
int c = 0;
if(in_count > 1 && out_count > 1) {
@@ -657,8 +569,6 @@ uint32_t bassenhancer_audio_module::process(uint32_t offset, uint32_t numsamples
else
out[1] = (proc[1] * *params[param_amount] + in[1]) * *params[param_level_out];
outs[1][offset] = out[1];
maxIn = std::max(fabs(in[0]), fabs(in[1]));
maxOut = std::max(fabs(out[0]), fabs(out[1]));
maxDrive = std::max(dist[0].get_distortion_level() * *params[param_amount],
dist[1].get_distortion_level() * *params[param_amount]);
} else if(out_count > 1) {
@@ -670,8 +580,6 @@ uint32_t bassenhancer_audio_module::process(uint32_t offset, uint32_t numsamples
outs[0][offset] = out[0];
out[1] = out[0];
outs[1][offset] = out[1];
maxOut = fabs(out[0]);
maxIn = fabs(in[0]);
maxDrive = dist[0].get_distortion_level() * *params[param_amount];
} else {
// stereo -> mono
@@ -681,24 +589,10 @@ uint32_t bassenhancer_audio_module::process(uint32_t offset, uint32_t numsamples
else
out[0] = (proc[0] * *params[param_amount] + in[0]) * *params[param_level_out];
outs[0][offset] = out[0];
maxIn = fabs(in[0]);
maxOut = fabs(out[0]);
maxDrive = dist[0].get_distortion_level() * *params[param_amount];
}
if(maxIn > 1.f) {
clip_in = srate >> 3;
}
if(maxOut > 1.f) {
clip_out = srate >> 3;
}
// set up in / out meters
if(maxIn > meter_in) {
meter_in = maxIn;
}
if(maxOut > meter_out) {
meter_out = maxOut;
}
if(maxDrive > meter_drive) {
meter_drive = maxDrive;
}
@@ -706,6 +600,7 @@ uint32_t bassenhancer_audio_module::process(uint32_t offset, uint32_t numsamples
// next sample
++offset;
} // cycle trough samples
meters.process(params, ins, outs, orig_offset, orig_numsamples);
// clean up
lp[0][0].sanitize();
lp[1][0].sanitize();
@@ -717,19 +612,6 @@ uint32_t bassenhancer_audio_module::process(uint32_t offset, uint32_t numsamples
lp[1][3].sanitize();
}
// draw meters
if(params[param_clip_in] != NULL) {
*params[param_clip_in] = clip_in;
}
if(params[param_clip_out] != NULL) {
*params[param_clip_out] = clip_out;
}
if(params[param_meter_in] != NULL) {
*params[param_meter_in] = meter_in;
}
if(params[param_meter_out] != NULL) {
*params[param_meter_out] = meter_out;
}
if(params[param_meter_drive] != NULL) {
*params[param_meter_drive] = meter_drive;
}

View File

@@ -32,8 +32,8 @@
#include "MidiImport.h"
#include "track_container.h"
#include "InstrumentTrack.h"
#include "automation_track.h"
#include "automation_pattern.h"
#include "AutomationTrack.h"
#include "AutomationPattern.h"
#include "config_mgr.h"
#include "pattern.h"
#include "Instrument.h"
@@ -150,15 +150,15 @@ public:
lastPos( 0 )
{ }
automationTrack * at;
automationPattern * ap;
AutomationTrack * at;
AutomationPattern * ap;
midiTime lastPos;
smfMidiCC & create( trackContainer * _tc )
{
if( !at )
{
at = dynamic_cast<automationTrack *>(
at = dynamic_cast<AutomationTrack *>(
track::create( track::AutomationTrack, _tc ) );
}
return *this;
@@ -178,7 +178,7 @@ public:
if( !ap || time > lastPos + DefaultTicksPerTact )
{
midiTime pPos = midiTime( time.getTact(), 0 );
ap = dynamic_cast<automationPattern*>(
ap = dynamic_cast<AutomationPattern*>(
at->createTCO(0) );
ap->movePosition( pPos );
}
@@ -287,10 +287,10 @@ bool MidiImport::readSMF( trackContainer * _tc )
smfMidiChannel chs[256];
MeterModel & timeSigMM = engine::getSong()->getTimeSigModel();
automationPattern * timeSigNumeratorPat =
automationPattern::globalAutomationPattern( &timeSigMM.numeratorModel() );
automationPattern * timeSigDenominatorPat =
automationPattern::globalAutomationPattern( &timeSigMM.denominatorModel() );
AutomationPattern * timeSigNumeratorPat =
AutomationPattern::globalAutomationPattern( &timeSigMM.numeratorModel() );
AutomationPattern * timeSigDenominatorPat =
AutomationPattern::globalAutomationPattern( &timeSigMM.denominatorModel() );
// TODO: adjust these to Time.Sig changes
double beatsPerTact = 4;
@@ -318,7 +318,7 @@ bool MidiImport::readSMF( trackContainer * _tc )
pd.setValue( 2 );
// Tempo stuff
automationPattern * tap = _tc->tempoAutomationPattern();
AutomationPattern * tap = _tc->tempoAutomationPattern();
if( tap )
{
tap->clear();

Binary file not shown.

Before

Width:  |  Height:  |  Size: 85 KiB

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

@@ -1,7 +1,7 @@
/*
* VstPlugin.h - declaration of VstPlugin class
*
* Copyright (c) 2005-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2005-2010 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -25,8 +25,9 @@
#ifndef _VST_PLUGIN_H
#define _VST_PLUGIN_H
#include <QtCore/QString>
#include <QtCore/QMutex>
#include <QtCore/QPointer>
#include <QtCore/QString>
#include <QtGui/QWidget>
#include "mixer.h"
@@ -107,7 +108,7 @@ private:
QByteArray saveChunk();
QString m_plugin;
QWidget * m_pluginWidget;
QPointer<QWidget> m_pluginWidget;
int m_pluginWindowID;
QSize m_pluginGeometry;

View File

@@ -1,8 +1,8 @@
/*
* VstEffectControlDialog.cpp - dialog for displaying VST-effect GUI
*
* Copyright (c) 2006-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* Copyright (c) 2006-2010 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
@@ -24,6 +24,7 @@
#include <QtGui/QLayout>
#include <QtGui/QMdiArea>
#include <QtGui/QPushButton>
#include "VstEffectControlDialog.h"
#include "VstEffect.h"
@@ -31,12 +32,27 @@
VstEffectControlDialog::VstEffectControlDialog( VstEffectControls * _ctl ) :
EffectControlDialog( _ctl )
EffectControlDialog( _ctl ),
m_pluginWidget( NULL )
{
QVBoxLayout * l = new QVBoxLayout( this );
l->setMargin( 0 );
l->setSpacing( 0 );
#ifdef LMMS_BUILD_LINUX
_ctl->m_effect->m_plugin->showEditor();
m_pluginWidget = _ctl->m_effect->m_plugin->pluginWidget();
if( m_pluginWidget )
{
setWindowTitle( m_pluginWidget->windowTitle() );
QPushButton * btn = new QPushButton( tr( "Show/hide VST FX GUI" ) );
btn->setCheckable( true );
l->addWidget( btn );
connect( btn, SIGNAL( toggled( bool ) ),
m_pluginWidget, SLOT( setVisible( bool ) ) );
}
#endif
#ifdef LMMS_BUILD_WIN32
_ctl->m_effect->m_plugin->showEditor( this );
QWidget * w = _ctl->m_effect->m_plugin->pluginWidget( false );
if( w )
@@ -44,6 +60,7 @@ VstEffectControlDialog::VstEffectControlDialog( VstEffectControls * _ctl ) :
setWindowTitle( w->windowTitle() );
l->addWidget( w );
}
#endif
}
@@ -51,6 +68,7 @@ VstEffectControlDialog::VstEffectControlDialog( VstEffectControls * _ctl ) :
VstEffectControlDialog::~VstEffectControlDialog()
{
delete m_pluginWidget;
}

View File

@@ -1,8 +1,8 @@
/*
* VstEffectControlDialog.h - dialog for displaying GUI of VST-effect-plugin
*
* Copyright (c) 2006-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* Copyright (c) 2006-2010 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
@@ -37,6 +37,9 @@ public:
VstEffectControlDialog( VstEffectControls * _controls );
virtual ~VstEffectControlDialog();
private:
QWidget * m_pluginWidget;
} ;
#endif

View File

@@ -33,6 +33,7 @@
#include "ZynAddSubFx.h"
#include "engine.h"
#include "knob.h"
#include "led_checkbox.h"
#include "mmp.h"
#include "InstrumentPlayHandle.h"
#include "InstrumentTrack.h"
@@ -107,11 +108,12 @@ ZynAddSubFxInstrument::ZynAddSubFxInstrument(
m_remotePlugin( NULL ),
m_portamentoModel( 0, 0, 127, 1, this, tr( "Portamento" ) ),
m_filterFreqModel( 64, 0, 127, 1, this, tr( "Filter Frequency" ) ),
m_filterQModel( 64, 0, 127, 1, this, tr( "Filter Cutoff" ) ),
m_filterQModel( 64, 0, 127, 1, this, tr( "Filter Resonance" ) ),
m_bandwidthModel( 64, 0, 127, 1, this, tr( "Bandwidth" ) ),
m_fmGainModel( 127, 0, 127, 1, this, tr( "FM Gain" ) ),
m_resCenterFreqModel( 64, 0, 127, 1, this, tr( "Resonance Center Frequency" ) ),
m_resBandwidthModel( 64, 0, 127, 1, this, tr( "Resonance Bandwidth" ) )
m_resBandwidthModel( 64, 0, 127, 1, this, tr( "Resonance Bandwidth" ) ),
m_forwardMidiCcModel( true, this, tr( "Forward MIDI Control Change Events" ) )
{
initPlugin();
@@ -147,8 +149,29 @@ ZynAddSubFxInstrument::~ZynAddSubFxInstrument()
void ZynAddSubFxInstrument::saveSettings( QDomDocument & _doc,
QDomElement & _this )
QDomElement & _this )
{
m_portamentoModel.saveSettings( _doc, _this, "portamento" );
m_filterFreqModel.saveSettings( _doc, _this, "filterfreq" );
m_filterQModel.saveSettings( _doc, _this, "filterq" );
m_bandwidthModel.saveSettings( _doc, _this, "bandwidth" );
m_fmGainModel.saveSettings( _doc, _this, "fmgain" );
m_resCenterFreqModel.saveSettings( _doc, _this, "rescenterfreq" );
m_resBandwidthModel.saveSettings( _doc, _this, "resbandwidth" );
QString modifiedControllers;
for( QMap<int, bool>::ConstIterator it = m_modifiedControllers.begin();
it != m_modifiedControllers.end(); ++it )
{
if( it.value() )
{
modifiedControllers += QString( "%1," ).arg( it.key() );
}
}
_this.setAttribute( "modifiedcontrollers", modifiedControllers );
m_forwardMidiCcModel.saveSettings( _doc, _this, "forwardmidicc" );
QTemporaryFile tf;
if( tf.open() )
{
@@ -188,8 +211,23 @@ void ZynAddSubFxInstrument::loadSettings( const QDomElement & _this )
return;
}
m_portamentoModel.loadSettings( _this, "portamento" );
m_filterFreqModel.loadSettings( _this, "filterfreq" );
m_filterQModel.loadSettings( _this, "filterq" );
m_bandwidthModel.loadSettings( _this, "bandwidth" );
m_fmGainModel.loadSettings( _this, "fmgain" );
m_resCenterFreqModel.loadSettings( _this, "rescenterfreq" );
m_resBandwidthModel.loadSettings( _this, "resbandwidth" );
m_forwardMidiCcModel.loadSettings( _this, "forwardmidicc" );
QDomDocument doc;
doc.appendChild( doc.importNode( _this.firstChild(), true ) );
QDomElement data = _this.firstChildElement( "ZynAddSubFX-data" );
if( data.isNull() )
{
data = _this.firstChildElement();
}
doc.appendChild( doc.importNode( data, true ) );
QTemporaryFile tf;
tf.setAutoRemove( false );
if( tf.open() )
@@ -216,6 +254,27 @@ void ZynAddSubFxInstrument::loadSettings( const QDomElement & _this )
}
m_pluginMutex.unlock();
m_modifiedControllers.clear();
foreach( const QString & c,
_this.attribute( "modifiedcontrollers" ).split( ',' ) )
{
if( !c.isEmpty() )
{
switch( c.toInt() )
{
case C_portamento: updatePortamento(); break;
case C_filtercutoff: updateFilterFreq(); break;
case C_filterq: updateFilterQ(); break;
case C_bandwidth: updateBandwidth(); break;
case C_fmamp: updateFmGain(); break;
case C_resonance_center: updateResCenterFreq(); break;
case C_resonance_bandwidth: updateResBandwidth(); break;
default:
break;
}
}
}
emit settingsChanged();
}
}
@@ -241,6 +300,8 @@ void ZynAddSubFxInstrument::loadFile( const QString & _file )
m_pluginMutex.unlock();
}
m_modifiedControllers.clear();
emit settingsChanged();
}
@@ -277,19 +338,30 @@ void ZynAddSubFxInstrument::play( sampleFrame * _buf )
bool ZynAddSubFxInstrument::handleMidiEvent( const midiEvent & _me,
const midiTime & _time )
{
if( !isMuted() )
// do not send NoteOn events if muted
if( _me.type() == MidiNoteOn && isMuted() )
{
m_pluginMutex.lock();
if( m_remotePlugin )
{
m_remotePlugin->processMidiEvent( _me, 0 );
}
else
{
m_plugin->processMidiEvent( _me );
}
m_pluginMutex.unlock();
return true;
}
// do not forward external MIDI Control Change events if the according
// LED is not checked
else if( _me.type() == MidiControlChange &&
_me.sourcePort() != this &&
m_forwardMidiCcModel.value() == false )
{
return true;
}
m_pluginMutex.lock();
if( m_remotePlugin )
{
m_remotePlugin->processMidiEvent( _me, 0 );
}
else
{
m_plugin->processMidiEvent( _me );
}
m_pluginMutex.unlock();
return true;
}
@@ -317,6 +389,7 @@ void ZynAddSubFxInstrument::reloadPlugin()
void ZynAddSubFxInstrument::slotname() \
{ \
sendControlChange( midictl, modelname.value() ); \
m_modifiedControllers[midictl] = true; \
}
@@ -373,7 +446,7 @@ void ZynAddSubFxInstrument::initPlugin()
void ZynAddSubFxInstrument::sendControlChange( MidiControllers midiCtl, float value )
{
handleMidiEvent( midiEvent( MidiControlChange, 0, midiCtl, (int) value ),
handleMidiEvent( midiEvent( MidiControlChange, 0, midiCtl, (int) value, this ),
midiTime() );
}
@@ -413,8 +486,8 @@ ZynAddSubFxView::ZynAddSubFxView( Instrument * _instrument, QWidget * _parent )
m_filterFreq->setLabel( tr( "FREQ" ) );
m_filterQ = new knob( knobBright_26, this );
m_filterQ->setHintText( tr( "Filter Cutoff:" ) + "", "" );
m_filterQ->setLabel( tr( "CUT" ) );
m_filterQ->setHintText( tr( "Filter Resonance:" ) + "", "" );
m_filterQ->setLabel( tr( "RES" ) );
m_bandwidth = new knob( knobBright_26, this );
m_bandwidth->setHintText( tr( "Bandwidth:" ) + "", "" );
@@ -432,6 +505,8 @@ ZynAddSubFxView::ZynAddSubFxView( Instrument * _instrument, QWidget * _parent )
m_resBandwidth->setHintText( tr( "Resonance bandwidth:" ) + "", "" );
m_resBandwidth->setLabel( tr( "RES BW" ) );
m_forwardMidiCC = new ledCheckBox( tr( "Forward MIDI Control Changes" ), this );
m_toggleUIButton = new QPushButton( tr( "Show GUI" ), this );
m_toggleUIButton->setCheckable( true );
m_toggleUIButton->setChecked( false );
@@ -452,7 +527,9 @@ ZynAddSubFxView::ZynAddSubFxView( Instrument * _instrument, QWidget * _parent )
l->addWidget( m_fmGain, 3, 0 );
l->addWidget( m_resCenterFreq, 3, 1 );
l->addWidget( m_resBandwidth, 3, 2 );
l->setRowStretch( 4, 10 );
l->addWidget( m_forwardMidiCC, 4, 0, 1, 4 );
l->setRowStretch( 5, 10 );
l->setColumnStretch( 4, 10 );
setAcceptDrops( true );
@@ -522,7 +599,9 @@ void ZynAddSubFxView::modelChanged()
m_resCenterFreq->setModel( &m->m_resCenterFreqModel );
m_resBandwidth->setModel( &m->m_resBandwidthModel );
toggleUI();
m_forwardMidiCC->setModel( &m->m_forwardMidiCcModel );
m_toggleUIButton->setChecked( m->m_hasGUI );
}
@@ -531,13 +610,16 @@ void ZynAddSubFxView::modelChanged()
void ZynAddSubFxView::toggleUI()
{
ZynAddSubFxInstrument * model = castModel<ZynAddSubFxInstrument>();
model->m_hasGUI = m_toggleUIButton->isChecked();
model->reloadPlugin();
if( model->m_remotePlugin )
if( model->m_hasGUI != m_toggleUIButton->isChecked() )
{
connect( model->m_remotePlugin, SIGNAL( clickedCloseButton() ),
m_toggleUIButton, SLOT( toggle() ) );
model->m_hasGUI = m_toggleUIButton->isChecked();
model->reloadPlugin();
if( model->m_remotePlugin )
{
connect( model->m_remotePlugin, SIGNAL( clickedCloseButton() ),
m_toggleUIButton, SLOT( toggle() ) );
}
}
}

View File

@@ -25,6 +25,7 @@
#ifndef _ZYNADDSUBFX_H
#define _ZYNADDSUBFX_H
#include <QtCore/QMap>
#include <QtCore/QMutex>
#include "AutomatableModel.h"
@@ -40,6 +41,7 @@ class LocalZynAddSubFx;
class ZynAddSubFxView;
class notePlayHandle;
class knob;
class ledCheckBox;
class ZynAddSubFxRemotePlugin : public QObject, public RemotePlugin
@@ -115,6 +117,9 @@ private:
FloatModel m_fmGainModel;
FloatModel m_resCenterFreqModel;
FloatModel m_resBandwidthModel;
BoolModel m_forwardMidiCcModel;
QMap<int, bool> m_modifiedControllers;
friend class ZynAddSubFxView;
@@ -150,6 +155,7 @@ private:
knob * m_fmGain;
knob * m_resCenterFreq;
knob * m_resBandwidth;
ledCheckBox * m_forwardMidiCC;
private slots:
@@ -158,5 +164,4 @@ private slots:
} ;
#endif

View File

@@ -279,16 +279,10 @@ int QtXmlWrapper::loadXMLfile(const std::string &filename)
}
QByteArray b( xmldata );
if( b[0] != '<' )
while( !b.isEmpty() && b[0] != '<' )
{
// remove first blank line
b.remove( 0,
#ifdef LMMS_BUILD_WIN32
2
#else
1
#endif
);
b.remove( 0, 1 );
}
if( !d->m_doc.setContent( b ) )

View File

@@ -1414,9 +1414,7 @@ inline void ADnote::ComputeVoiceOscillatorRingModulation(int nvoice)
i,
SOUND_BUFFER_SIZE);
int FMVoice = NoteVoicePar[nvoice].FMVoice;
for(i = 0; i < SOUND_BUFFER_SIZE; i++)
tw[i] *=
(1.0 - amp) + amp * NoteVoicePar[FMVoice].VoiceOut[i];
tw[i] *= (1.0 - amp) + amp * NoteVoicePar[FMVoice].VoiceOut[i];
}
}
}

View File

@@ -25,7 +25,7 @@
#include <QtXml/QDomElement>
#include "AutomatableModel.h"
#include "automation_pattern.h"
#include "AutomationPattern.h"
#include "ControllerConnection.h"
@@ -81,7 +81,7 @@ AutomatableModel::~AutomatableModel()
bool AutomatableModel::isAutomated() const
{
return automationPattern::isAutomated( this );
return AutomationPattern::isAutomated( this );
}
@@ -128,13 +128,13 @@ void AutomatableModel::loadSettings( const QDomElement & _this,
const QString & _name )
{
// compat code
QDomNode node = _this.namedItem( automationPattern::classNodeName() );
QDomNode node = _this.namedItem( AutomationPattern::classNodeName() );
if( node.isElement() )
{
node = node.namedItem( _name );
if( node.isElement() )
{
automationPattern * p = automationPattern::
AutomationPattern * p = AutomationPattern::
globalAutomationPattern( this );
p->loadSettings( node.toElement() );
setValue( p->valueAt( 0 ) );

View File

@@ -1,10 +1,10 @@
/*
* automation_pattern.cpp - implementation of class automationPattern which
* holds dynamic values
* AutomationPattern.cpp - implementation of class AutomationPattern which
* holds dynamic values
*
* Copyright (c) 2008-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2008-2010 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
*
* This program is free software; you can redistribute it and/or
@@ -24,22 +24,21 @@
*
*/
#include <QtXml/QDomElement>
#include <QtGui/QMouseEvent>
#include <QtGui/QPainter>
#include "automation_pattern.h"
#include "automation_pattern_view.h"
#include "automation_editor.h"
#include "automation_track.h"
#include "AutomationPattern.h"
#include "AutomationPatternView.h"
#include "AutomationEditor.h"
#include "AutomationTrack.h"
#include "ProjectJournal.h"
#include "bb_track_container.h"
#include "song.h"
automationPattern::automationPattern( automationTrack * _auto_track ) :
AutomationPattern::AutomationPattern( AutomationTrack * _auto_track ) :
trackContentObject( _auto_track ),
m_autoTrack( _auto_track ),
m_objects(),
@@ -52,7 +51,7 @@ automationPattern::automationPattern( automationTrack * _auto_track ) :
automationPattern::automationPattern( const automationPattern & _pat_to_copy ) :
AutomationPattern::AutomationPattern( const AutomationPattern & _pat_to_copy ) :
trackContentObject( _pat_to_copy.m_autoTrack ),
m_autoTrack( _pat_to_copy.m_autoTrack ),
m_objects( _pat_to_copy.m_objects ),
@@ -68,19 +67,19 @@ automationPattern::automationPattern( const automationPattern & _pat_to_copy ) :
automationPattern::~automationPattern()
AutomationPattern::~AutomationPattern()
{
if( engine::getAutomationEditor() &&
engine::getAutomationEditor()->currentPattern() == this )
if( engine::automationEditor() &&
engine::automationEditor()->currentPattern() == this )
{
engine::getAutomationEditor()->setCurrentPattern( NULL );
engine::automationEditor()->setCurrentPattern( NULL );
}
}
void automationPattern::addObject( AutomatableModel * _obj, bool _search_dup )
void AutomationPattern::addObject( AutomatableModel * _obj, bool _search_dup )
{
bool addIt = true;
@@ -117,7 +116,7 @@ void automationPattern::addObject( AutomatableModel * _obj, bool _search_dup )
const AutomatableModel * automationPattern::firstObject() const
const AutomatableModel * AutomationPattern::firstObject() const
{
AutomatableModel * m;
if( !m_objects.isEmpty() && ( m = m_objects.first() ) != NULL )
@@ -134,7 +133,7 @@ const AutomatableModel * automationPattern::firstObject() const
//TODO: Improve this
midiTime automationPattern::length() const
midiTime AutomationPattern::length() const
{
tick_t max_length = 0;
@@ -149,13 +148,13 @@ midiTime automationPattern::length() const
midiTime automationPattern::putValue( const midiTime & _time,
midiTime AutomationPattern::putValue( const midiTime & _time,
const float _value,
const bool _quant_pos )
{
midiTime newTime = _quant_pos && engine::getAutomationEditor() ?
midiTime newTime = _quant_pos && engine::automationEditor() ?
note::quantized( _time,
engine::getAutomationEditor()->quantization() ) :
engine::automationEditor()->quantization() ) :
_time;
m_timeMap[newTime] = _value;
@@ -213,7 +212,7 @@ midiTime automationPattern::putValue( const midiTime & _time,
void automationPattern::removeValue( const midiTime & _time )
void AutomationPattern::removeValue( const midiTime & _time )
{
if( _time != 0 )
{
@@ -255,7 +254,7 @@ void automationPattern::removeValue( const midiTime & _time )
float automationPattern::valueAt( const midiTime & _time ) const
float AutomationPattern::valueAt( const midiTime & _time ) const
{
if( m_timeMap.isEmpty() )
{
@@ -270,7 +269,7 @@ float automationPattern::valueAt( const midiTime & _time ) const
void automationPattern::saveSettings( QDomDocument & _doc, QDomElement & _this )
void AutomationPattern::saveSettings( QDomDocument & _doc, QDomElement & _this )
{
_this.setAttribute( "pos", startPosition() );
_this.setAttribute( "len", trackContentObject::length() );
@@ -300,7 +299,7 @@ void automationPattern::saveSettings( QDomDocument & _doc, QDomElement & _this )
void automationPattern::loadSettings( const QDomElement & _this )
void AutomationPattern::loadSettings( const QDomElement & _this )
{
clear();
@@ -349,7 +348,7 @@ void automationPattern::loadSettings( const QDomElement & _this )
const QString automationPattern::name() const
const QString AutomationPattern::name() const
{
if( !trackContentObject::name().isEmpty() )
{
@@ -365,7 +364,7 @@ const QString automationPattern::name() const
void automationPattern::processMidiTime( const midiTime & _time )
void AutomationPattern::processMidiTime( const midiTime & _time )
{
if( _time >= 0 && m_hasAutomation )
{
@@ -386,16 +385,16 @@ void automationPattern::processMidiTime( const midiTime & _time )
trackContentObjectView * automationPattern::createView( trackView * _tv )
trackContentObjectView * AutomationPattern::createView( trackView * _tv )
{
return new automationPatternView( this, _tv );
return new AutomationPatternView( this, _tv );
}
bool automationPattern::isAutomated( const AutomatableModel * _m )
bool AutomationPattern::isAutomated( const AutomatableModel * _m )
{
trackContainer::trackList l = engine::getSong()->tracks() +
engine::getBBTrackContainer()->tracks();
@@ -410,9 +409,8 @@ bool automationPattern::isAutomated( const AutomatableModel * _m )
for( track::tcoVector::const_iterator j = v.begin();
j != v.end(); ++j )
{
const automationPattern * a =
dynamic_cast<const
automationPattern *>( *j );
const AutomationPattern * a =
dynamic_cast<const AutomationPattern *>( *j );
if( a && a->m_hasAutomation )
{
for( objectVector::const_iterator k = a->m_objects.begin();
@@ -434,19 +432,18 @@ bool automationPattern::isAutomated( const AutomatableModel * _m )
automationPattern * automationPattern::globalAutomationPattern(
AutomationPattern * AutomationPattern::globalAutomationPattern(
AutomatableModel * _m )
{
automationTrack * t = engine::getSong()->globalAutomationTrack();
AutomationTrack * t = engine::getSong()->globalAutomationTrack();
track::tcoVector v = t->getTCOs();
for( track::tcoVector::const_iterator j = v.begin(); j != v.end(); ++j )
{
automationPattern * a = dynamic_cast<automationPattern *>( *j );
AutomationPattern * a = dynamic_cast<AutomationPattern *>( *j );
if( a )
{
for( objectVector::const_iterator k =
a->m_objects.begin();
k != a->m_objects.end(); ++k )
for( objectVector::const_iterator k = a->m_objects.begin();
k != a->m_objects.end(); ++k )
{
if( *k == _m )
{
@@ -456,7 +453,7 @@ automationPattern * automationPattern::globalAutomationPattern(
}
}
automationPattern * a = new automationPattern( t );
AutomationPattern * a = new AutomationPattern( t );
a->addObject( _m, false );
return a;
}
@@ -464,7 +461,7 @@ automationPattern * automationPattern::globalAutomationPattern(
void automationPattern::resolveAllIDs()
void AutomationPattern::resolveAllIDs()
{
trackContainer::trackList l = engine::getSong()->tracks() +
engine::getBBTrackContainer()->tracks();
@@ -479,8 +476,7 @@ void automationPattern::resolveAllIDs()
for( track::tcoVector::iterator j = v.begin();
j != v.end(); ++j )
{
automationPattern * a =
dynamic_cast<automationPattern *>( *j );
AutomationPattern * a = dynamic_cast<AutomationPattern *>( *j );
if( a )
{
for( QVector<jo_id_t>::Iterator k = a->m_idsToResolve.begin();
@@ -504,33 +500,33 @@ void automationPattern::resolveAllIDs()
void automationPattern::clear()
void AutomationPattern::clear()
{
const float val = firstObject()->value<float>();
m_timeMap.clear();
putValue( 0, val );
if( engine::getAutomationEditor() &&
engine::getAutomationEditor()->currentPattern() == this )
if( engine::automationEditor() &&
engine::automationEditor()->currentPattern() == this )
{
engine::getAutomationEditor()->update();
engine::automationEditor()->update();
}
}
void automationPattern::openInAutomationEditor()
void AutomationPattern::openInAutomationEditor()
{
engine::getAutomationEditor()->setCurrentPattern( this );
engine::getAutomationEditor()->parentWidget()->show();
engine::getAutomationEditor()->setFocus();
engine::automationEditor()->setCurrentPattern( this );
engine::automationEditor()->parentWidget()->show();
engine::automationEditor()->setFocus();
}
void automationPattern::objectDestroyed( jo_id_t _id )
void AutomationPattern::objectDestroyed( jo_id_t _id )
{
// TODO: distict between temporary removal (e.g. LADSPA controls
// when switching samplerate) and real deletions because in the latter
@@ -542,5 +538,5 @@ void automationPattern::objectDestroyed( jo_id_t _id )
#include "moc_automation_pattern.cxx"
#include "moc_AutomationPattern.cxx"

View File

@@ -3,6 +3,7 @@
* which handles the link between AutomatableModels and controllers
*
* Copyright (c) 2008 Paul Giblock <drfaygo/at/gmail.com>
* Copyright (c) 2010 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -208,12 +209,6 @@ void ControllerConnection::deleteConnection()
delete this;
}
QString ControllerConnection::nodeName() const
{
return( "connection" );
}
#include "moc_ControllerConnection.cxx"

View File

@@ -1,8 +1,8 @@
/*
* inline_automation.cpp - class for automating something "inline"
* InlineAutomation.cpp - class for automating something "inline"
*
* Copyright (c) 2008-2010 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* Copyright (c) 2008 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
@@ -22,21 +22,20 @@
*
*/
#include <QtXml/QDomElement>
#include "inline_automation.h"
#include "InlineAutomation.h"
void inlineAutomation::saveSettings( QDomDocument & _doc,
void InlineAutomation::saveSettings( QDomDocument & _doc,
QDomElement & _parent )
{
if( hasAutomation() )
{
QDomElement ap = _doc.createElement(
automationPattern::classNodeName() );
AutomationPattern::classNodeName() );
QDomElement v = _doc.createElement( nodeName() );
getAutomationPattern()->saveSettings( _doc, v );
automationPattern()->saveSettings( _doc, v );
ap.appendChild( v );
_parent.appendChild( ap );
}
@@ -45,15 +44,15 @@ void inlineAutomation::saveSettings( QDomDocument & _doc,
void inlineAutomation::loadSettings( const QDomElement & _this )
void InlineAutomation::loadSettings( const QDomElement & _this )
{
QDomNode node = _this.namedItem( automationPattern::classNodeName() );
QDomNode node = _this.namedItem( AutomationPattern::classNodeName() );
if( node.isElement() )
{
node = node.namedItem( nodeName() );
if( node.isElement() )
{
getAutomationPattern()->loadSettings(
automationPattern()->loadSettings(
node.toElement() );
}
}

View File

@@ -1,7 +1,7 @@
/*
* MeterModel.cpp - model for meter specification
*
* Copyright (c) 2008-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2008-2010 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -24,6 +24,7 @@
#include "MeterModel.h"
#include "AutomationPattern.h"
MeterModel::MeterModel( ::Model * _parent ) :
@@ -51,6 +52,9 @@ void MeterModel::reset()
{
m_numeratorModel.setValue( 4 );
m_denominatorModel.setValue( 4 );
AutomationPattern::globalAutomationPattern( &m_numeratorModel )->clear();
AutomationPattern::globalAutomationPattern( &m_denominatorModel )->clear();
}

View File

@@ -26,7 +26,7 @@
#include "engine.h"
#include "automation_editor.h"
#include "AutomationEditor.h"
#include "bb_editor.h"
#include "bb_track_container.h"
#include "config_mgr.h"
@@ -57,7 +57,7 @@ MainWindow * engine::s_mainWindow = NULL;
bbTrackContainer * engine::s_bbTrackContainer = NULL;
song * engine::s_song = NULL;
songEditor * engine::s_songEditor = NULL;
automationEditor * engine::s_automationEditor = NULL;
AutomationEditor * engine::s_automationEditor = NULL;
bbEditor * engine::s_bbEditor = NULL;
pianoRoll * engine::s_pianoRoll = NULL;
projectNotes * engine::s_projectNotes = NULL;
@@ -97,7 +97,7 @@ void engine::init( const bool _has_gui )
s_projectNotes = new projectNotes;
s_bbEditor = new bbEditor( s_bbTrackContainer );
s_pianoRoll = new pianoRoll;
s_automationEditor = new automationEditor;
s_automationEditor = new AutomationEditor;
s_mainWindow->finalize();
}

View File

@@ -38,7 +38,7 @@
ladspaManager::ladspaManager()
{
QStringList ladspaDirectories = QString( getenv( "LADSPA_PATH" ) ).
split( ',' );
split( LADSPA_PATH_SEPERATOR );
ladspaDirectories += configManager::inst()->ladspaDir().split( ',' );
ladspaDirectories.push_back( configManager::inst()->pluginDir() + "ladspa" );

View File

@@ -28,7 +28,7 @@
#include <math.h>
#include "note.h"
#include "detuning_helper.h"
#include "DetuningHelper.h"
#include "templates.h"
@@ -37,7 +37,7 @@
note::note( const midiTime & _length, const midiTime & _pos,
int _key, volume_t _volume, panning_t _panning,
detuningHelper * _detuning ) :
DetuningHelper * _detuning ) :
m_selected( false ),
m_oldKey( tLimit( _key, 0, NumKeys ) ),
m_oldPos( _pos ),
@@ -261,7 +261,7 @@ void note::redoStep( journalEntry & _je )
void note::editDetuningPattern()
{
m_detuning->getAutomationPattern()->openInAutomationEditor();
m_detuning->automationPattern()->openInAutomationEditor();
}
@@ -269,8 +269,8 @@ void note::editDetuningPattern()
void note::createDetuning()
{
m_detuning = new detuningHelper;
(void) m_detuning->getAutomationPattern();
m_detuning = new DetuningHelper;
(void) m_detuning->automationPattern();
m_detuning->setRange( -MaxDetuning, MaxDetuning, 0.1f );
}

View File

@@ -2,7 +2,7 @@
* note_play_handle.cpp - implementation of class notePlayHandle, part of
* rendering engine
*
* Copyright (c) 2004-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2004-2010 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -26,7 +26,7 @@
#include "note_play_handle.h"
#include "basic_filters.h"
#include "config_mgr.h"
#include "detuning_helper.h"
#include "DetuningHelper.h"
#include "InstrumentSoundShaping.h"
#include "InstrumentTrack.h"
#include "MidiPort.h"
@@ -34,9 +34,9 @@
inline notePlayHandle::baseDetuning::baseDetuning(
detuningHelper * _detuning ) :
DetuningHelper * _detuning ) :
m_detuning( _detuning ),
m_value( m_detuning->getAutomationPattern()->valueAt( 0 ) )
m_value( m_detuning->automationPattern()->valueAt( 0 ) )
{
}
@@ -490,7 +490,7 @@ void notePlayHandle::processMidiTime( const midiTime & _time )
{
if( _time >= pos() )
{
const float v = detuning()->getAutomationPattern()->
const float v = detuning()->automationPattern()->
valueAt( _time - pos() );
if( !typeInfo<float>::isEqual( v, m_baseDetuning->value() ) )
{

View File

@@ -1,7 +1,7 @@
/*
* sample_buffer.cpp - container-class sampleBuffer
*
* Copyright (c) 2005-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2005-2010 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -184,7 +184,8 @@ void sampleBuffer::update( bool _keep_settings )
sample_rate_t samplerate = engine::getMixer()->baseSampleRate();
m_frames = 0;
if( QFileInfo( file ).size() > 100*1024*1024 )
const QFileInfo fileInfo( file );
if( fileInfo.size() > 100*1024*1024 )
{
qWarning( "refusing to load sample files bigger "
"than 100 MB" );
@@ -192,6 +193,15 @@ void sampleBuffer::update( bool _keep_settings )
else
{
#ifdef LMMS_HAVE_OGGVORBIS
// workaround for a bug in libsndfile or our libsndfile decoder
// causing some OGG files to be distorted -> try with OGG Vorbis
// decoder first if filename extension matches "ogg"
if( m_frames == 0 && fileInfo.suffix() == "ogg" )
{
m_frames = decodeSampleOGGVorbis( f, buf, channels, samplerate );
}
#endif
if( m_frames == 0 )
{
m_frames = decodeSampleSF( f, buf, channels,

View File

@@ -31,8 +31,8 @@
#include <math.h>
#include "song.h"
#include "automation_track.h"
#include "automation_editor.h"
#include "AutomationTrack.h"
#include "AutomationEditor.h"
#include "bb_editor.h"
#include "bb_track.h"
#include "bb_track_container.h"
@@ -68,7 +68,7 @@ tick_t midiTime::s_ticksPerTact = DefaultTicksPerTact;
song::song() :
trackContainer(),
m_globalAutomationTrack( dynamic_cast<automationTrack *>(
m_globalAutomationTrack( dynamic_cast<AutomationTrack *>(
track::create( track::HiddenAutomationTrack,
this ) ) ),
m_tempoModel( DefaultTempo, MinTempo, MaxTempo, this, tr( "Tempo" ) ),
@@ -708,9 +708,9 @@ bpm_t song::getTempo()
automationPattern * song::tempoAutomationPattern()
AutomationPattern * song::tempoAutomationPattern()
{
return automationPattern::globalAutomationPattern( &m_tempoModel );
return AutomationPattern::globalAutomationPattern( &m_tempoModel );
}
@@ -744,14 +744,20 @@ void song::clearProject()
engine::fxMixer()->clear();
if( engine::getAutomationEditor() )
if( engine::automationEditor() )
{
engine::getAutomationEditor()->setCurrentPattern( NULL );
engine::automationEditor()->setCurrentPattern( NULL );
}
automationPattern::globalAutomationPattern( &m_tempoModel )->clear();
automationPattern::globalAutomationPattern( &m_masterVolumeModel )->
m_tempoModel.reset();
m_masterVolumeModel.reset();
m_masterPitchModel.reset();
m_timeSigModel.reset();
AutomationPattern::globalAutomationPattern( &m_tempoModel )->clear();
AutomationPattern::globalAutomationPattern( &m_masterVolumeModel )->
clear();
automationPattern::globalAutomationPattern( &m_masterPitchModel )->
AutomationPattern::globalAutomationPattern( &m_masterPitchModel )->
clear();
engine::getMixer()->unlock();
@@ -933,10 +939,10 @@ void song::loadProject( const QString & _file_name )
node.toElement() );
}
else if( node.nodeName() ==
engine::getAutomationEditor()->
engine::automationEditor()->
nodeName() )
{
engine::getAutomationEditor()->
engine::automationEditor()->
restoreState( node.toElement() );
}
else if( node.nodeName() ==
@@ -968,7 +974,7 @@ void song::loadProject( const QString & _file_name )
ControllerConnection::finalizeConnections();
// resolve all IDs so that autoModels are automated
automationPattern::resolveAllIDs();
AutomationPattern::resolveAllIDs();
engine::getMixer()->unlock();
@@ -1012,7 +1018,7 @@ bool song::saveProject()
{
engine::getControllerRackView()->saveState( mmp, mmp.content() );
engine::getPianoRoll()->saveState( mmp, mmp.content() );
engine::getAutomationEditor()->saveState( mmp, mmp.content() );
engine::automationEditor()->saveState( mmp, mmp.content() );
engine::getProjectNotes()->
SerializingObject::saveState( mmp, mmp.content() );
m_playPos[Mode_PlaySong].m_timeLine->saveState(

View File

@@ -47,8 +47,8 @@
#include <QtGui/QStyleOption>
#include "automation_pattern.h"
#include "automation_track.h"
#include "AutomationPattern.h"
#include "AutomationTrack.h"
#include "bb_editor.h"
#include "bb_track.h"
#include "bb_track_container.h"
@@ -493,8 +493,8 @@ void trackContentObjectView::dropEvent( QDropEvent * _de )
// the user doesn't expect...
midiTime pos = m_tco->startPosition();
m_tco->restoreState( mmp.content().firstChild().toElement() );
m_tco->movePosition( pos );
automationPattern::resolveAllIDs();
m_tco->movePosition( pos );
AutomationPattern::resolveAllIDs();
_de->accept();
}
}
@@ -1143,7 +1143,7 @@ void trackContentWidget::dropEvent( QDropEvent * _de )
tco->restoreState( mmp.content().firstChild().toElement() );
tco->movePosition( pos );
automationPattern::resolveAllIDs();
AutomationPattern::resolveAllIDs();
_de->accept();
}
@@ -1595,9 +1595,9 @@ track * track::create( TrackTypes _tt, trackContainer * _tc )
case SampleTrack: t = new sampleTrack( _tc ); break;
// case EVENT_TRACK:
// case VIDEO_TRACK:
case AutomationTrack: t = new automationTrack( _tc ); break;
case AutomationTrack: t = new ::AutomationTrack( _tc ); break;
case HiddenAutomationTrack:
t = new automationTrack( _tc, true ); break;
t = new ::AutomationTrack( _tc, true ); break;
default: break;
}

View File

@@ -27,7 +27,7 @@
#include <QtGui/QMouseEvent>
#include "AutomatableModelView.h"
#include "automation_pattern.h"
#include "AutomationPattern.h"
#include "ControllerConnectionDialog.h"
#include "ControllerConnection.h"
#include "embed.h"
@@ -237,7 +237,7 @@ void AutomatableModelViewSlots::removeConnection()
void AutomatableModelViewSlots::editSongGlobalAutomation()
{
automationPattern::globalAutomationPattern( amv->modelUntyped() )->
AutomationPattern::globalAutomationPattern( amv->modelUntyped() )->
openInAutomationEditor();
}

View File

@@ -1,6 +1,6 @@
/*
* automation_editor.cpp - implementation of automationEditor which is used for
* actual setting of dynamic values
* AutomationEditor.cpp - implementation of AutomationEditor which is used for
* actual setting of dynamic values
*
* Copyright (c) 2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2006-2008 Javier Serrano Polo <jasp00/at/users.sourceforge.net>
@@ -24,7 +24,7 @@
*
*/
#include "automation_editor.h"
#include "AutomationEditor.h"
#include <QtGui/QApplication>
#include <QtGui/QButtonGroup>
@@ -64,13 +64,13 @@
QPixmap * automationEditor::s_toolDraw = NULL;
QPixmap * automationEditor::s_toolErase = NULL;
QPixmap * automationEditor::s_toolSelect = NULL;
QPixmap * automationEditor::s_toolMove = NULL;
QPixmap * AutomationEditor::s_toolDraw = NULL;
QPixmap * AutomationEditor::s_toolErase = NULL;
QPixmap * AutomationEditor::s_toolSelect = NULL;
QPixmap * AutomationEditor::s_toolMove = NULL;
automationEditor::automationEditor() :
AutomationEditor::AutomationEditor() :
QWidget(),
m_zoomingXModel(),
m_zoomingYModel(),
@@ -376,7 +376,7 @@ automationEditor::automationEditor() :
automationEditor::~automationEditor()
AutomationEditor::~AutomationEditor()
{
m_zoomingXModel.disconnect();
m_zoomingYModel.disconnect();
@@ -385,7 +385,7 @@ automationEditor::~automationEditor()
void automationEditor::setCurrentPattern( automationPattern * _new_pattern )
void AutomationEditor::setCurrentPattern( AutomationPattern * _new_pattern )
{
m_patternMutex.lock();
m_pattern = _new_pattern;
@@ -397,7 +397,7 @@ void automationEditor::setCurrentPattern( automationPattern * _new_pattern )
void automationEditor::saveSettings( QDomDocument & _doc, QDomElement & _this )
void AutomationEditor::saveSettings( QDomDocument & _doc, QDomElement & _this )
{
MainWindow::saveWidgetState( this, _this );
}
@@ -405,7 +405,7 @@ void automationEditor::saveSettings( QDomDocument & _doc, QDomElement & _this )
void automationEditor::loadSettings( const QDomElement & _this )
void AutomationEditor::loadSettings( const QDomElement & _this )
{
MainWindow::restoreWidgetState( this, _this );
}
@@ -413,7 +413,7 @@ void automationEditor::loadSettings( const QDomElement & _this )
void automationEditor::updateAfterPatternChange()
void AutomationEditor::updateAfterPatternChange()
{
QMutexLocker m( &m_patternMutex );
@@ -445,7 +445,7 @@ void automationEditor::updateAfterPatternChange()
void automationEditor::update()
void AutomationEditor::update()
{
QWidget::update();
@@ -460,7 +460,7 @@ void automationEditor::update()
inline void automationEditor::drawValueRect( QPainter & _p,
inline void AutomationEditor::drawValueRect( QPainter & _p,
int _x, int _y,
int _width, int _height,
const bool _is_selected )
@@ -482,7 +482,7 @@ inline void automationEditor::drawValueRect( QPainter & _p,
void automationEditor::removeSelection()
void AutomationEditor::removeSelection()
{
m_selectStartTick = 0;
m_selectedTick = 0;
@@ -493,7 +493,7 @@ void automationEditor::removeSelection()
void automationEditor::closeEvent( QCloseEvent * _ce )
void AutomationEditor::closeEvent( QCloseEvent * _ce )
{
QApplication::restoreOverrideCursor();
if( parentWidget() )
@@ -510,7 +510,7 @@ void automationEditor::closeEvent( QCloseEvent * _ce )
void automationEditor::keyPressEvent( QKeyEvent * _ke )
void AutomationEditor::keyPressEvent( QKeyEvent * _ke )
{
switch( _ke->key() )
{
@@ -659,7 +659,7 @@ void automationEditor::keyPressEvent( QKeyEvent * _ke )
void automationEditor::leaveEvent( QEvent * _e )
void AutomationEditor::leaveEvent( QEvent * _e )
{
while( QApplication::overrideCursor() != NULL )
{
@@ -670,7 +670,7 @@ void automationEditor::leaveEvent( QEvent * _e )
}
void automationEditor::drawLine( int _x0, float _y0, int _x1, float _y1 )
void AutomationEditor::drawLine( int _x0, float _y0, int _x1, float _y1 )
{
int deltax = qRound( qAbs<float>( _x1 - _x0 ) );
float deltay = qAbs<float>( _y1 - _y0 );
@@ -721,7 +721,7 @@ void automationEditor::drawLine( int _x0, float _y0, int _x1, float _y1 )
void automationEditor::mousePressEvent( QMouseEvent * _me )
void AutomationEditor::mousePressEvent( QMouseEvent * _me )
{
QMutexLocker m( &m_patternMutex );
if( !validPattern() )
@@ -872,7 +872,7 @@ void automationEditor::mousePressEvent( QMouseEvent * _me )
void automationEditor::mouseReleaseEvent( QMouseEvent * _me )
void AutomationEditor::mouseReleaseEvent( QMouseEvent * _me )
{
m_action = NONE;
@@ -885,7 +885,7 @@ void automationEditor::mouseReleaseEvent( QMouseEvent * _me )
void automationEditor::mouseMoveEvent( QMouseEvent * _me )
void AutomationEditor::mouseMoveEvent( QMouseEvent * _me )
{
QMutexLocker m( &m_patternMutex );
if( !validPattern() )
@@ -1240,7 +1240,7 @@ void automationEditor::mouseMoveEvent( QMouseEvent * _me )
inline void automationEditor::drawCross( QPainter & _p )
inline void AutomationEditor::drawCross( QPainter & _p )
{
QPoint mouse_pos = mapFromGlobal( QCursor::pos() );
float level = getLevel( mouse_pos.y() );
@@ -1260,7 +1260,7 @@ inline void automationEditor::drawCross( QPainter & _p )
void automationEditor::paintEvent( QPaintEvent * _pe )
void AutomationEditor::paintEvent( QPaintEvent * _pe )
{
QMutexLocker m( &m_patternMutex );
@@ -1601,7 +1601,7 @@ void automationEditor::paintEvent( QPaintEvent * _pe )
// responsible for moving/resizing scrollbars after window-resizing
void automationEditor::resizeEvent( QResizeEvent * )
void AutomationEditor::resizeEvent( QResizeEvent * )
{
m_leftRightScroll->setGeometry( VALUES_WIDTH, height() - SCROLLBAR_SIZE,
width() - VALUES_WIDTH,
@@ -1643,7 +1643,7 @@ void automationEditor::resizeEvent( QResizeEvent * )
void automationEditor::wheelEvent( QWheelEvent * _we )
void AutomationEditor::wheelEvent( QWheelEvent * _we )
{
_we->accept();
if( _we->modifiers() & Qt::ControlModifier )
@@ -1682,7 +1682,7 @@ void automationEditor::wheelEvent( QWheelEvent * _we )
float automationEditor::getLevel( int _y )
float AutomationEditor::getLevel( int _y )
{
int level_line_y = height() - SCROLLBAR_SIZE - 1;
// pressed level
@@ -1706,7 +1706,7 @@ float automationEditor::getLevel( int _y )
inline bool automationEditor::inBBEditor()
inline bool AutomationEditor::inBBEditor()
{
QMutexLocker m( &m_patternMutex );
return( validPattern() &&
@@ -1717,7 +1717,7 @@ inline bool automationEditor::inBBEditor()
void automationEditor::play()
void AutomationEditor::play()
{
QMutexLocker m( &m_patternMutex );
@@ -1793,7 +1793,7 @@ void automationEditor::play()
void automationEditor::stop()
void AutomationEditor::stop()
{
QMutexLocker m( &m_patternMutex );
@@ -1817,7 +1817,7 @@ void automationEditor::stop()
void automationEditor::horScrolled( int _new_pos )
void AutomationEditor::horScrolled( int _new_pos )
{
m_currentPosition = _new_pos;
emit positionChanged( m_currentPosition );
@@ -1827,7 +1827,7 @@ void automationEditor::horScrolled( int _new_pos )
void automationEditor::verScrolled( int _new_pos )
void AutomationEditor::verScrolled( int _new_pos )
{
m_scrollLevel = _new_pos;
updateTopBottomLevels();
@@ -1837,7 +1837,7 @@ void automationEditor::verScrolled( int _new_pos )
void automationEditor::drawButtonToggled()
void AutomationEditor::drawButtonToggled()
{
m_editMode = DRAW;
removeSelection();
@@ -1847,7 +1847,7 @@ void automationEditor::drawButtonToggled()
void automationEditor::eraseButtonToggled()
void AutomationEditor::eraseButtonToggled()
{
m_editMode = ERASE;
removeSelection();
@@ -1857,7 +1857,7 @@ void automationEditor::eraseButtonToggled()
void automationEditor::selectButtonToggled()
void AutomationEditor::selectButtonToggled()
{
m_editMode = SELECT;
removeSelection();
@@ -1867,7 +1867,7 @@ void automationEditor::selectButtonToggled()
void automationEditor::moveButtonToggled()
void AutomationEditor::moveButtonToggled()
{
m_editMode = MOVE;
m_selValuesForMove.clear();
@@ -1878,7 +1878,7 @@ void automationEditor::moveButtonToggled()
void automationEditor::selectAll()
void AutomationEditor::selectAll()
{
QMutexLocker m( &m_patternMutex );
if( !validPattern() )
@@ -1917,7 +1917,7 @@ void automationEditor::selectAll()
// returns vector with pointers to all selected values
void automationEditor::getSelectedValues( timeMap & _selected_values )
void AutomationEditor::getSelectedValues( timeMap & _selected_values )
{
QMutexLocker m( &m_patternMutex );
if( !validPattern() )
@@ -1962,7 +1962,7 @@ void automationEditor::getSelectedValues( timeMap & _selected_values )
void automationEditor::copySelectedValues()
void AutomationEditor::copySelectedValues()
{
m_valuesToCopy.clear();
@@ -1986,7 +1986,7 @@ void automationEditor::copySelectedValues()
void automationEditor::cutSelectedValues()
void AutomationEditor::cutSelectedValues()
{
QMutexLocker m( &m_patternMutex );
if( !validPattern() )
@@ -2018,7 +2018,7 @@ void automationEditor::cutSelectedValues()
void automationEditor::pasteValues()
void AutomationEditor::pasteValues()
{
QMutexLocker m( &m_patternMutex );
if( validPattern() && !m_valuesToCopy.isEmpty() )
@@ -2041,7 +2041,7 @@ void automationEditor::pasteValues()
void automationEditor::deleteSelectedValues()
void AutomationEditor::deleteSelectedValues()
{
QMutexLocker m( &m_patternMutex );
if( !validPattern() )
@@ -2071,7 +2071,7 @@ void automationEditor::deleteSelectedValues()
void automationEditor::updatePosition( const midiTime & _t )
void AutomationEditor::updatePosition( const midiTime & _t )
{
if( ( engine::getSong()->isPlaying() &&
engine::getSong()->playMode() ==
@@ -2098,7 +2098,7 @@ void automationEditor::updatePosition( const midiTime & _t )
void automationEditor::zoomingXChanged()
void AutomationEditor::zoomingXChanged()
{
const QString & zfac = m_zoomingXModel.currentText();
m_ppt = zfac.left( zfac.length() - 1 ).toInt() * DEFAULT_PPT / 100;
@@ -2112,7 +2112,7 @@ void automationEditor::zoomingXChanged()
void automationEditor::zoomingYChanged()
void AutomationEditor::zoomingYChanged()
{
const QString & zfac = m_zoomingYModel.currentText();
m_y_auto = zfac == "Auto";
@@ -2130,7 +2130,7 @@ void automationEditor::zoomingYChanged()
int automationEditor::quantization() const
int AutomationEditor::quantization() const
{
return( DefaultTicksPerTact /
m_quantizeComboBox->model()->currentText().right(
@@ -2141,7 +2141,7 @@ int automationEditor::quantization() const
void automationEditor::updateTopBottomLevels()
void AutomationEditor::updateTopBottomLevels()
{
if( m_y_auto )
{
@@ -2188,6 +2188,6 @@ void automationEditor::updateTopBottomLevels()
#include "moc_automation_editor.cxx"
#include "moc_AutomationEditor.cxx"

View File

@@ -1,8 +1,8 @@
/*
* automation_pattern_view.cpp - implementation of view for automationPattern
* AutomationPatternView.cpp - implementation of view for AutomationPattern
*
* Copyright (c) 2008-2010 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* Copyright (c) 2008-2009 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
@@ -22,14 +22,13 @@
*
*/
#include <QtGui/QMouseEvent>
#include <QtGui/QPainter>
#include <QtGui/QMenu>
#include "automation_pattern_view.h"
#include "automation_editor.h"
#include "automation_pattern.h"
#include "AutomationPatternView.h"
#include "AutomationEditor.h"
#include "AutomationPattern.h"
#include "embed.h"
#include "engine.h"
#include "gui_templates.h"
@@ -40,7 +39,7 @@
automationPatternView::automationPatternView( automationPattern * _pattern,
AutomationPatternView::AutomationPatternView( AutomationPattern * _pattern,
trackView * _parent ) :
trackContentObjectView( _pattern, _parent ),
m_pat( _pattern ),
@@ -61,7 +60,7 @@ automationPatternView::automationPatternView( automationPattern * _pattern,
automationPatternView::~automationPatternView()
AutomationPatternView::~AutomationPatternView()
{
}
@@ -69,7 +68,7 @@ automationPatternView::~automationPatternView()
void automationPatternView::update()
void AutomationPatternView::update()
{
m_needsUpdate = true;
if( fixedTCOs() )
@@ -82,7 +81,7 @@ void automationPatternView::update()
void automationPatternView::resetName()
void AutomationPatternView::resetName()
{
m_pat->setName( QString::null );
}
@@ -90,7 +89,7 @@ void automationPatternView::resetName()
void automationPatternView::changeName()
void AutomationPatternView::changeName()
{
QString s = m_pat->name();
renameDialog rename_dlg( s );
@@ -102,7 +101,7 @@ void automationPatternView::changeName()
void automationPatternView::disconnectObject( QAction * _a )
void AutomationPatternView::disconnectObject( QAction * _a )
{
JournallingObject * j = engine::projectJournal()->
journallingObject( _a->data().toInt() );
@@ -118,7 +117,7 @@ void automationPatternView::disconnectObject( QAction * _a )
void automationPatternView::constructContextMenu( QMenu * _cm )
void AutomationPatternView::constructContextMenu( QMenu * _cm )
{
QAction * a = new QAction( embed::getIconPixmap( "automation" ),
tr( "Open in Automation editor" ), _cm );
@@ -143,7 +142,7 @@ void automationPatternView::constructContextMenu( QMenu * _cm )
_cm->addSeparator();
QMenu * m = new QMenu( tr( "%1 Connections" ).
arg( m_pat->m_objects.count() ), _cm );
for( automationPattern::objectVector::iterator it =
for( AutomationPattern::objectVector::iterator it =
m_pat->m_objects.begin();
it != m_pat->m_objects.end(); ++it )
{
@@ -166,7 +165,7 @@ void automationPatternView::constructContextMenu( QMenu * _cm )
void automationPatternView::mouseDoubleClickEvent( QMouseEvent * _me )
void AutomationPatternView::mouseDoubleClickEvent( QMouseEvent * _me )
{
if( _me->button() != Qt::LeftButton )
{
@@ -179,7 +178,7 @@ void automationPatternView::mouseDoubleClickEvent( QMouseEvent * _me )
void automationPatternView::paintEvent( QPaintEvent * )
void AutomationPatternView::paintEvent( QPaintEvent * )
{
if( m_needsUpdate == false )
{
@@ -242,7 +241,7 @@ void automationPatternView::paintEvent( QPaintEvent * )
lin2grad.setColorAt( 1, cl );
lin2grad.setColorAt( 0, cd );
for( automationPattern::timeMap::const_iterator it =
for( AutomationPattern::timeMap::const_iterator it =
m_pat->getTimeMap().begin();
it != m_pat->getTimeMap().end(); ++it )
{
@@ -291,7 +290,7 @@ void automationPatternView::paintEvent( QPaintEvent * )
void automationPatternView::dragEnterEvent( QDragEnterEvent * _dee )
void AutomationPatternView::dragEnterEvent( QDragEnterEvent * _dee )
{
stringPairDrag::processDragEnterEvent( _dee, "automatable_model" );
if( !_dee->isAccepted() )
@@ -303,7 +302,7 @@ void automationPatternView::dragEnterEvent( QDragEnterEvent * _dee )
void automationPatternView::dropEvent( QDropEvent * _de )
void AutomationPatternView::dropEvent( QDropEvent * _de )
{
QString type = stringPairDrag::decodeKey( _de );
QString val = stringPairDrag::decodeValue( _de );
@@ -318,12 +317,10 @@ void automationPatternView::dropEvent( QDropEvent * _de )
}
update();
if( engine::getAutomationEditor() &&
engine::getAutomationEditor()->currentPattern() ==
m_pat )
if( engine::automationEditor() &&
engine::automationEditor()->currentPattern() == m_pat )
{
engine::getAutomationEditor()->setCurrentPattern(
m_pat );
engine::automationEditor()->setCurrentPattern( m_pat );
}
}
else
@@ -335,5 +332,5 @@ void automationPatternView::dropEvent( QDropEvent * _de )
#include "moc_automation_pattern_view.cxx"
#include "moc_AutomationPatternView.cxx"

View File

@@ -60,7 +60,7 @@
#include "ToolPlugin.h"
#include "tool_button.h"
#include "ProjectJournal.h"
#include "automation_editor.h"
#include "AutomationEditor.h"
#include "templates.h"
@@ -856,7 +856,7 @@ void MainWindow::togglePianoRollWin( void )
void MainWindow::toggleAutomationEditorWin( void )
{
toggleWindow( engine::getAutomationEditor() );
toggleWindow( engine::automationEditor() );
}

View File

@@ -713,13 +713,10 @@ void PianoView::focusOutEvent( QFocusEvent * )
// hang otherwise
for( int i = 0; i < NumKeys; ++i )
{
if( m_piano->m_pressedKeys[i] == true )
{
m_piano->m_midiEvProc->processInEvent(
m_piano->m_midiEvProc->processInEvent(
midiEvent( MidiNoteOff, 0, i, 0 ),
midiTime() );
m_piano->m_pressedKeys[i] = false;
}
m_piano->m_pressedKeys[i] = false;
}
update();
}

View File

@@ -49,7 +49,7 @@
#include "Clipboard.h"
#include "combobox.h"
#include "debug.h"
#include "detuning_helper.h"
#include "DetuningHelper.h"
#include "embed.h"
#include "gui_templates.h"
#include "InstrumentTrack.h"
@@ -68,7 +68,7 @@
#include "tooltip.h"
typedef automationPattern::timeMap timeMap;
typedef AutomationPattern::timeMap timeMap;
extern Keys whiteKeys[]; // defined in piano_widget.cpp
@@ -721,7 +721,7 @@ inline void pianoRoll::drawDetuningInfo( QPainter & _p, note * _n, int _x,
int middle_y = _y + KEY_LINE_HEIGHT / 2;
_p.setPen( QColor( 0xFF, 0xDF, 0x20 ) );
timeMap & map = _n->detuning()->getAutomationPattern()->getTimeMap();
timeMap & map = _n->detuning()->automationPattern()->getTimeMap();
for( timeMap::ConstIterator it = map.begin(); it != map.end(); ++it )
{
Sint32 pos_ticks = it.key();
@@ -1177,14 +1177,10 @@ void pianoRoll::keyPressEvent( QKeyEvent * _ke )
}
case Qt::Key_Control:
if( m_editMode != ModeSelect )
{
m_ctrlMode = m_editMode;
m_editMode = ModeSelect;
QApplication::changeOverrideCursor(
QCursor( Qt::ArrowCursor ) );
update();
}
m_ctrlMode = m_editMode;
m_editMode = ModeSelect;
QApplication::changeOverrideCursor( Qt::ArrowCursor );
update();
break;
default:
_ke->ignore();
@@ -1347,10 +1343,10 @@ void pianoRoll::mousePressEvent( QMouseEvent * _me )
const NoteVector & notes = m_pattern->notes();
// will be our iterator in the following loop
NoteVector::ConstIterator it = notes.begin();
NoteVector::ConstIterator it = notes.begin()+notes.size()-1;
// loop through whole note-vector...
while( it != notes.end() )
for( int i = 0; i < notes.size(); ++i )
{
midiTime len = ( *it )->length();
if( len < 0 )
@@ -1376,7 +1372,7 @@ void pianoRoll::mousePressEvent( QMouseEvent * _me )
{
break;
}
++it;
--it;
}
// first check whether the user clicked in note-edit-
@@ -1394,10 +1390,9 @@ void pianoRoll::mousePressEvent( QMouseEvent * _me )
note * created_new_note = NULL;
// did it reach end of vector because
// there's no note??
if( it == notes.end() )
if( it == notes.begin()-1 )
{
m_pattern->setType(
pattern::MelodyPattern );
m_pattern->setType( pattern::MelodyPattern );
// then set new note
@@ -1553,10 +1548,7 @@ void pianoRoll::mousePressEvent( QMouseEvent * _me )
// play the note
testPlayNote( m_currentNote );
}
engine::getSong()->setModified();
}
else if( ( _me->buttons() == Qt::RightButton &&
@@ -1565,7 +1557,7 @@ void pianoRoll::mousePressEvent( QMouseEvent * _me )
{
// erase single note
m_mouseDownRight = true;
if( it != notes.end() )
if( it != notes.begin()-1 )
{
if( ( *it )->length() > 0 )
{
@@ -2013,36 +2005,37 @@ void pianoRoll::mouseMoveEvent( QMouseEvent * _me )
// loop through vector
bool use_selection = isSelection();
NoteVector::ConstIterator it = notes.begin();
while( it != notes.end() )
NoteVector::ConstIterator it = notes.begin()+notes.size()-1;
for( int i = 0; i < notes.size(); ++i )
{
if( ( *it )->pos().getTicks() >= ticks_start
&& ( *it )->pos().getTicks() <= ticks_end
&& ( *it )->length().getTicks() > 0
&& ( ( *it )->selected() || ! use_selection ) )
note * n = *it;
if( n->pos().getTicks() >= ticks_start
&& n->pos().getTicks() <= ticks_end
&& n->length().getTicks() != 0
&& ( n->selected() || ! use_selection ) )
{
m_pattern->dataChanged();
// play the note so that the user can tell how loud it is
// and where it is panned
testPlayNote( *it );
testPlayNote( n );
if( m_noteEditMode == NoteEditVolume )
{
( *it )->setVolume( vol );
n->setVolume( vol );
m_pattern->instrumentTrack()->processInEvent(
midiEvent(
MidiKeyPressure,
0,
( *it )->key(),
n->key(),
vol * 127 / 100),
midiTime() );
}
else if( m_noteEditMode == NoteEditPanning )
{
( *it )->setPanning( pan );
n->setPanning( pan );
midiEvent evt( MidiMetaEvent, 0,
( *it )->key(), panningToMidi( pan ) );
n->key(), panningToMidi( pan ) );
evt.m_metaEvent = MidiNotePanning;
m_pattern->instrumentTrack()->processInEvent(
evt, midiTime() );
@@ -2050,18 +2043,18 @@ void pianoRoll::mouseMoveEvent( QMouseEvent * _me )
}
else
{
if( ( *it )->isPlaying() )
if( n->isPlaying() )
{
// mouse not over this note, stop playing it.
m_pattern->instrumentTrack()->processInEvent(
midiEvent( MidiNoteOff, 0,
( *it )->key(), 0 ), midiTime() );
n->key(), 0 ), midiTime() );
( *it )->setIsPlaying( false );
n->setIsPlaying( false );
}
}
++it;
--it;
}
}
@@ -2077,10 +2070,10 @@ void pianoRoll::mouseMoveEvent( QMouseEvent * _me )
const NoteVector & notes = m_pattern->notes();
// will be our iterator in the following loop
NoteVector::ConstIterator it = notes.begin();
NoteVector::ConstIterator it = notes.begin()+notes.size()-1;
// loop through whole note-vector...
while( it != notes.end() )
for( int i = 0; i < notes.size(); ++i )
{
// and check whether the cursor is over an
// existing note
@@ -2092,12 +2085,12 @@ void pianoRoll::mouseMoveEvent( QMouseEvent * _me )
{
break;
}
++it;
--it;
}
// did it reach end of vector because there's
// no note??
if( it != notes.end() )
if( it != notes.begin()-1 )
{
// cursor at the "tail" of the note?
if( ( *it )->length() > 0 &&
@@ -3591,10 +3584,11 @@ note * pianoRoll::noteUnderMouse()
midiTime::ticksPerTact() / m_ppt + m_currentPosition;
// will be our iterator in the following loop
NoteVector::ConstIterator it = notes.begin();
NoteVector::ConstIterator it = notes.begin()+notes.size()-1;
// loop through whole note-vector...
while( it != notes.end() )
int i;
for( i = 0; i < notes.size(); ++i )
{
// and check whether the cursor is over an
// existing note
@@ -3604,7 +3598,12 @@ note * pianoRoll::noteUnderMouse()
{
break;
}
++it;
--it;
}
if( i == notes.size() )
{
return NULL;
}
return *it;

View File

@@ -409,6 +409,7 @@ void trackContainerView::dropEvent( QDropEvent * _de )
InstrumentTrack * it = dynamic_cast<InstrumentTrack *>(
track::create( track::InstrumentTrack,
m_tc ) );
it->setSimpleSerializing();
it->loadSettings( mmp.content().toElement() );
//it->toggledInstrumentTrackButton( true );
_de->accept();

View File

@@ -2,6 +2,7 @@
* ControllerRackView.cpp - view for song's controllers
*
* Copyright (c) 2008-2009 Paul Giblock <drfaygo/at/gmail.com>
* Copyright (c) 2010 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -22,7 +23,6 @@
*
*/
#include <QtGui/QApplication>
#include <QtGui/QLayout>
#include <QtGui/QMdiSubWindow>
@@ -173,6 +173,10 @@ void ControllerRackView::addController()
engine::getSong()->addController( new LfoController( engine::getSong() ) );
update();
// fix bug which always made ControllerRackView loose focus when adding
// new controller
setFocus();
}

View File

@@ -1,5 +1,5 @@
/*
* effect_view.cpp - view-component for an effect
* EffectView.cpp - view-component for an effect
*
* Copyright (c) 2006-2007 Danny McRae <khjklujn/at/users.sourceforge.net>
* Copyright (c) 2007-2010 Tobias Doerffel <tobydox/at/users.sourceforge.net>
@@ -51,8 +51,6 @@ EffectView::EffectView( Effect * _model, QWidget * _parent ) :
{
setFixedSize( 210, 60 );
setAttribute( Qt::WA_OpaquePaintEvent, true );
m_bypass = new ledCheckBox( "", this );
m_bypass->move( 3, 3 );
m_bypass->setWhatsThis( tr( "Toggles the effect on or off." ) );

View File

@@ -1,8 +1,9 @@
/*
* combobox.cpp - implementation of LMMS-combobox
*
* Copyright (c) 2006-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* Copyright (c) 2006-2010 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2008-2009 Paul Giblock <pgib/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
@@ -33,7 +34,6 @@
#include <QtGui/QPixmap>
#include <QtGui/QStyleOptionFrame>
#include "automation_pattern.h"
#include "caption_menu.h"
#include "engine.h"
#include "embed.h"

View File

@@ -1,10 +1,10 @@
/*
* automation_track.cpp - automationTrack handles automation of objects without
* a track
* AutomationTrack.cpp - AutomationTrack handles automation of objects without
* a track
*
* Copyright (c) 2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2008-2010 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
*
* This program is free software; you can redistribute it and/or
@@ -24,9 +24,8 @@
*
*/
#include "automation_track.h"
#include "automation_pattern.h"
#include "AutomationTrack.h"
#include "AutomationPattern.h"
#include "engine.h"
#include "embed.h"
#include "ProjectJournal.h"
@@ -35,8 +34,8 @@
#include "track_label_button.h"
automationTrack::automationTrack( trackContainer * _tc, bool _hidden ) :
track( _hidden ? HiddenAutomationTrack : AutomationTrack, _tc )
AutomationTrack::AutomationTrack( trackContainer * _tc, bool _hidden ) :
track( _hidden ? HiddenAutomationTrack : track::AutomationTrack, _tc )
{
setName( tr( "Automation track" ) );
}
@@ -44,14 +43,14 @@ automationTrack::automationTrack( trackContainer * _tc, bool _hidden ) :
automationTrack::~automationTrack()
AutomationTrack::~AutomationTrack()
{
}
bool automationTrack::play( const midiTime & _start, const fpp_t _frames,
bool AutomationTrack::play( const midiTime & _start, const fpp_t _frames,
const f_cnt_t _frame_base, Sint16 _tco_num )
{
if( isMuted() )
@@ -73,8 +72,7 @@ bool automationTrack::play( const midiTime & _start, const fpp_t _frames,
for( tcoVector::iterator it = tcos.begin(); it != tcos.end(); ++it )
{
automationPattern * p =
dynamic_cast<automationPattern *>( *it );
AutomationPattern * p = dynamic_cast<AutomationPattern *>( *it );
if( p == NULL || ( *it )->isMuted() )
{
continue;
@@ -92,23 +90,23 @@ bool automationTrack::play( const midiTime & _start, const fpp_t _frames,
trackView * automationTrack::createView( trackContainerView * _tcv )
trackView * AutomationTrack::createView( trackContainerView * _tcv )
{
return new automationTrackView( this, _tcv );
return new AutomationTrackView( this, _tcv );
}
trackContentObject * automationTrack::createTCO( const midiTime & )
trackContentObject * AutomationTrack::createTCO( const midiTime & )
{
return new automationPattern( this );
return new AutomationPattern( this );
}
void automationTrack::saveTrackSpecificSettings( QDomDocument & _doc,
void AutomationTrack::saveTrackSpecificSettings( QDomDocument & _doc,
QDomElement & _this )
{
}
@@ -116,7 +114,7 @@ void automationTrack::saveTrackSpecificSettings( QDomDocument & _doc,
void automationTrack::loadTrackSpecificSettings( const QDomElement & _this )
void AutomationTrack::loadTrackSpecificSettings( const QDomElement & _this )
{
// just in case something somehow wrent wrong...
if( type() == HiddenAutomationTrack )
@@ -129,7 +127,7 @@ void automationTrack::loadTrackSpecificSettings( const QDomElement & _this )
automationTrackView::automationTrackView( automationTrack * _at,
AutomationTrackView::AutomationTrackView( AutomationTrack * _at,
trackContainerView * _tcv ) :
trackView( _at, _tcv )
{
@@ -145,14 +143,14 @@ automationTrackView::automationTrackView( automationTrack * _at,
automationTrackView::~automationTrackView()
AutomationTrackView::~AutomationTrackView()
{
}
void automationTrackView::dragEnterEvent( QDragEnterEvent * _dee )
void AutomationTrackView::dragEnterEvent( QDragEnterEvent * _dee )
{
stringPairDrag::processDragEnterEvent( _dee, "automatable_model" );
}
@@ -160,7 +158,7 @@ void automationTrackView::dragEnterEvent( QDragEnterEvent * _dee )
void automationTrackView::dropEvent( QDropEvent * _de )
void AutomationTrackView::dropEvent( QDropEvent * _de )
{
QString type = stringPairDrag::decodeKey( _de );
QString val = stringPairDrag::decodeValue( _de );
@@ -185,8 +183,7 @@ void automationTrackView::dropEvent( QDropEvent * _de )
}
trackContentObject * tco = getTrack()->createTCO( pos );
automationPattern * pat =
dynamic_cast<automationPattern *>( tco );
AutomationPattern * pat = dynamic_cast<AutomationPattern *>( tco );
pat->addObject( mod );
pat->movePosition( pos );
}

View File

@@ -2,7 +2,7 @@
* InstrumentTrack.cpp - implementation of instrument-track-class
* (window + data-structures)
*
* Copyright (c) 2004-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2004-2010 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -40,9 +40,10 @@
#include "InstrumentTrack.h"
#include "AudioPort.h"
#include "automation_pattern.h"
#include "AutomationPattern.h"
#include "bb_track.h"
#include "config_mgr.h"
#include "ControllerConnection.h"
#include "debug.h"
#include "EffectChain.h"
#include "EffectRackView.h"
@@ -812,8 +813,8 @@ void InstrumentTrack::loadTrackSpecificSettings( const QDomElement & _this )
// compat code - if node-name doesn't match any known
// one, we assume that it is an instrument-plugin
// which we'll try to load
else if( automationPattern::classNodeName() !=
node.nodeName() &&
else if( AutomationPattern::classNodeName() != node.nodeName() &&
ControllerConnection::classNodeName() != node.nodeName() &&
!node.toElement().hasAttribute( "id" ) )
{
delete m_instrument;
@@ -1294,8 +1295,8 @@ void InstrumentTrackWindow::modelChanged()
m_nameLineEdit->setText( m_track->name() );
disconnect( m_track, SIGNAL( nameChanged() ) );
disconnect( m_track, SIGNAL( instrumentChanged() ) );
m_track->disconnect( SIGNAL( nameChanged() ), this );
m_track->disconnect( SIGNAL( instrumentChanged() ), this );
connect( m_track, SIGNAL( nameChanged() ),
this, SLOT( updateName() ) );

View File

@@ -2,7 +2,7 @@
* sample_track.cpp - implementation of class sampleTrack, a track which
* provides arrangement of samples
*
* Copyright (c) 2005-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2005-2010 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -531,6 +531,8 @@ sampleTrackView::sampleTrackView( sampleTrack * _t, trackContainerView * _tcv )
m_effWindow->layout()->setSizeConstraint( QLayout::SetFixedSize );
m_effWindow->setWindowTitle( _t->name() );
m_effWindow->hide();
setModel( _t );
}
@@ -559,7 +561,15 @@ void sampleTrackView::showEffects()
void sampleTrackView::modelChanged()
{
sampleTrack * st = castModel<sampleTrack>();
m_volumeKnob->setModel( &st->m_volumeModel );
trackView::modelChanged();
}
#include "moc_sample_track.cxx"