Compare commits
148 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b069cd61ce | ||
|
|
9c27956414 | ||
|
|
d58a4d8804 | ||
|
|
09fb597af4 | ||
|
|
e9073c88bc | ||
|
|
5552fc110a | ||
|
|
bff016dec8 | ||
|
|
2505c770bb | ||
|
|
cf35a58629 | ||
|
|
53e67bae00 | ||
|
|
ec708aa967 | ||
|
|
85fbffb947 | ||
|
|
5168c50325 | ||
|
|
b8476b742e | ||
|
|
ad3884c8f3 | ||
|
|
01d611db6b | ||
|
|
43f2090b67 | ||
|
|
389405b90d | ||
|
|
3d2020555b | ||
|
|
ceefef8029 | ||
|
|
6de80921d7 | ||
|
|
a3dca970bc | ||
|
|
c8b243f49b | ||
|
|
6b7d833215 | ||
|
|
e7ebca02c7 | ||
|
|
fea7510f09 | ||
|
|
b5fff0e230 | ||
|
|
b31c7fcf07 | ||
|
|
6d9c8c0f3b | ||
|
|
f824b87e3a | ||
|
|
2c19290fab | ||
|
|
138bc79941 | ||
|
|
61c5738582 | ||
|
|
e97bb1dd39 | ||
|
|
5b29142c28 | ||
|
|
49cfbda916 | ||
|
|
1ac0c51744 | ||
|
|
63e8f7e2b1 | ||
|
|
7539791d13 | ||
|
|
4bfb989151 | ||
|
|
77b2261630 | ||
|
|
7f5b2f0a3d | ||
|
|
b5ea738a45 | ||
|
|
7782c3ad38 | ||
|
|
7669a1612f | ||
|
|
ec32ce10fa | ||
|
|
6bce7abc40 | ||
|
|
46c1cbc85f | ||
|
|
93689f758f | ||
|
|
9916febb66 | ||
|
|
b9e33736de | ||
|
|
1adbac9009 | ||
|
|
445bdb69e3 | ||
|
|
f0b6d34b3a | ||
|
|
1b08cc0649 | ||
|
|
4c2bf8982f | ||
|
|
d32377845b | ||
|
|
2ab5b1da0c | ||
|
|
02219d908c | ||
|
|
d80a8436c0 | ||
|
|
11a76c45fc | ||
|
|
794e697e22 | ||
|
|
2f4d9c6c66 | ||
|
|
752f48f51c | ||
|
|
565ebee7d1 | ||
|
|
33b9524346 | ||
|
|
e4340c630d | ||
|
|
f986f099da | ||
|
|
22cb12d066 | ||
|
|
6c920df328 | ||
|
|
25f2eae67f | ||
|
|
b02c351fe1 | ||
|
|
69e02fc37d | ||
|
|
e4dd6938cc | ||
|
|
13a41b5bff | ||
|
|
6a1a295cec | ||
|
|
6bb16951ad | ||
|
|
8e4417e5d9 | ||
|
|
890993bff0 | ||
|
|
71eaa4f5e3 | ||
|
|
1153e85c0c | ||
|
|
6e4fbbed87 | ||
|
|
b2c1a04df8 | ||
|
|
33ea001c31 | ||
|
|
117ca99c85 | ||
|
|
9aa6a3fbeb | ||
|
|
bdf234aeb8 | ||
|
|
cce942e5d5 | ||
|
|
d4bbaa58b4 | ||
|
|
729838fa08 | ||
|
|
b5eb4f1f7a | ||
|
|
585f95741c | ||
|
|
9ffeae441d | ||
|
|
6f5a47342b | ||
|
|
e1bebbfcad | ||
|
|
246572489b | ||
|
|
9c107f3860 | ||
|
|
40c67ac5dd | ||
|
|
7a7c9abd9b | ||
|
|
450bf3a35a | ||
|
|
87d62a6a73 | ||
|
|
2a0f268a89 | ||
|
|
376765526a | ||
|
|
34ba29cfcd | ||
|
|
0b46aa4506 | ||
|
|
ed29f2b6f6 | ||
|
|
9ab6699a26 | ||
|
|
41c154dc95 | ||
|
|
b45c0c5f02 | ||
|
|
194088db5f | ||
|
|
a4b328e28f | ||
|
|
78e14739f0 | ||
|
|
547e6dcc95 | ||
|
|
66ba074554 | ||
|
|
5e2d299360 | ||
|
|
f32c89bd13 | ||
|
|
ab4cebeea0 | ||
|
|
a1e7d9e42d | ||
|
|
fb161d5b69 | ||
|
|
719d39df76 | ||
|
|
a585650904 | ||
|
|
ce9cfa6821 | ||
|
|
91e9802993 | ||
|
|
a666df0e56 | ||
|
|
d269cfe6db | ||
|
|
0ed2b5c4a7 | ||
|
|
eb63f04f55 | ||
|
|
cf925d7c5b | ||
|
|
7dac1137bc | ||
|
|
5e3d7fa720 | ||
|
|
cf341c7bdf | ||
|
|
325a8cf842 | ||
|
|
cea7394e86 | ||
|
|
3637359506 | ||
|
|
daa0476205 | ||
|
|
847edd624c | ||
|
|
a54e665e7a | ||
|
|
dbea815931 | ||
|
|
b8e2f3f785 | ||
|
|
7af2930a45 | ||
|
|
1725498bef | ||
|
|
fab41306ac | ||
|
|
6a86fccfa1 | ||
|
|
24c5b2367e | ||
|
|
a394bb099c | ||
|
|
ba7e5e5f5c | ||
|
|
6a6711b088 | ||
|
|
ab69c2d44b |
@@ -13,9 +13,9 @@ INCLUDE(AddFileDependencies)
|
||||
INCLUDE(CheckIncludeFiles)
|
||||
INCLUDE(FindPkgConfig)
|
||||
|
||||
SET(VERSION_MAJOR "0")
|
||||
SET(VERSION_MINOR "9")
|
||||
SET(VERSION_PATCH "92")
|
||||
SET(VERSION_MAJOR "1")
|
||||
SET(VERSION_MINOR "0")
|
||||
SET(VERSION_PATCH "1")
|
||||
#SET(VERSION_SUFFIX "")
|
||||
SET(VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")
|
||||
IF(VERSION_SUFFIX)
|
||||
@@ -43,6 +43,19 @@ OPTION(WANT_VST "Include VST support" ON)
|
||||
OPTION(WANT_VST_NOWINE "Include partial VST support (without wine)" OFF)
|
||||
OPTION(WANT_WINMM "Include WinMM MIDI support" OFF)
|
||||
|
||||
|
||||
IF(LMMS_BUILD_APPLE)
|
||||
SET(WANT_ALSA OFF)
|
||||
SET(WANT_PULSEAUDIO OFF)
|
||||
SET(WANT_SWH OFF)
|
||||
SET(WANT_VST OFF)
|
||||
SET(STATUS_ALSA "<not supported on this platform>")
|
||||
SET(STATUS_PULSEAUDIO "<not supported on this platform>")
|
||||
# MacPorts: /opt/local/lib
|
||||
LINK_DIRECTORIES(${LINK_DIRECTORIES} /opt/local/lib)
|
||||
ENDIF(LMMS_BUILD_APPLE)
|
||||
|
||||
|
||||
IF(LMMS_BUILD_WIN32)
|
||||
SET(WANT_ALSA OFF)
|
||||
SET(WANT_JACK OFF)
|
||||
@@ -307,7 +320,11 @@ CONFIGURE_FILE("${CMAKE_SOURCE_DIR}/lmms.rc.in" "${CMAKE_BINARY_DIR}/lmms.rc")
|
||||
CONFIGURE_FILE("${CMAKE_SOURCE_DIR}/plugins/zynaddsubfx/zynaddsubfx.rc.in" "${CMAKE_BINARY_DIR}/plugins/zynaddsubfx/zynaddsubfx.rc")
|
||||
|
||||
# set compiler flags
|
||||
SET(WERROR_FLAGS "-Wall -Werror -Werror=unused-function -Wno-sign-compare -Wno-strict-overflow")
|
||||
SET(WERROR_FLAGS "-Wall -Werror=unused-function -Wno-sign-compare -Wno-strict-overflow")
|
||||
IF(NOT LMMS_BUILD_APPLE)
|
||||
SET(WERROR_FLAGS "${WERROR_FLAGS} -Werror")
|
||||
ENDIF()
|
||||
|
||||
SET(CMAKE_C_FLAGS "-O2 -g ${WERROR_FLAGS} ${CMAKE_C_FLAGS}")
|
||||
SET(CMAKE_CXX_FLAGS "-O2 -g -fno-exceptions ${WERROR_FLAGS} ${CMAKE_CXX_FLAGS}")
|
||||
set(CMAKE_C_FLAGS_DEBUG "-DLMMS_DEBUG")
|
||||
@@ -439,7 +456,7 @@ IF(LMMS_BUILD_WIN32)
|
||||
"${MINGW_PREFIX}/bin/libfftw3f-3.dll"
|
||||
"${MINGW_PREFIX}/bin/libFLAC-8.dll"
|
||||
"${MINGW_PREFIX}/bin/libportaudio-2.dll"
|
||||
"${MINGW_PREFIX}/bin/libpng15-15.dll"
|
||||
"${MINGW_PREFIX}/bin/libpng16-16.dll"
|
||||
"${MINGW_PREFIX}/bin/SDL.dll"
|
||||
"${MINGW_PREFIX}/bin/libglib-2.0-0.dll"
|
||||
"${MINGW_PREFIX}/bin/libgthread-2.0-0.dll"
|
||||
|
||||
17877
ChangeLog.old
2
README
@@ -1,4 +1,4 @@
|
||||
LMMS 0.9.92
|
||||
LMMS 1.0.1
|
||||
===========
|
||||
|
||||
Copyright (c) 2004-2014 by LMMS developers
|
||||
|
||||
BIN
data/dmg_branding.png
Normal file
|
After Width: | Height: | Size: 243 KiB |
@@ -1,4 +1,4 @@
|
||||
?package(lmms):needs="X11" section="Apps/Sound" \
|
||||
title="LMMS" hints="Audio" command="/usr/bin/lmms" \
|
||||
longtitle="Linux MultiMedia Studio" \
|
||||
longtitle="LMMS" \
|
||||
icon="/usr/share/pixmaps/lmms.png"
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
[Desktop Entry]
|
||||
Name=Linux MultiMedia Studio
|
||||
Name=LMMS
|
||||
GenericName=music production suite
|
||||
GenericName[ca]=Programari de producció musical
|
||||
GenericName[de]=Software zur Musik-Produktion
|
||||
Comment=easy music production for everyone!
|
||||
Comment[ca]=Producció fàcil de música per a tothom!
|
||||
Icon=lmms
|
||||
Exec=lmms
|
||||
Exec=env QT_X11_NO_NATIVE_MENUBAR=1 lmms
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Categories=Qt;AudioVideo;Audio;Midi;
|
||||
|
||||
BIN
data/lmms.icns
Normal file
BIN
data/lmms.png
Normal file
|
After Width: | Height: | Size: 93 KiB |
BIN
data/locale/pt.qm
Normal file
2316
data/locale/ru.ts
@@ -3,7 +3,7 @@
|
||||
<multimedia-project version="1.0" creator="Linux MultiMedia Studio (LMMS)" creatorversion="0.4.0-rc2" type="instrumenttracksettings" >
|
||||
<head/>
|
||||
<instrumenttracksettings muted="0" type="0" name="Erazzor" >
|
||||
<instrumenttrack pan="0" fxch="2" pitch="0" basenote="57" vol="100" >
|
||||
<instrumenttrack pan="0" fxch="0" pitch="0" basenote="57" vol="100" >
|
||||
<instrument name="tripleoscillator" >
|
||||
<tripleoscillator phoffset2="0" userwavefile0="" finer0="-2" userwavefile1="" finer1="2" userwavefile2="" finer2="0" coarse0="0" coarse1="0" coarse2="0" finel0="0" finel1="-2" modalgo1="1" modalgo2="0" finel2="-2" pan0="0" modalgo3="2" pan1="0" stphdetun0="0" pan2="0" stphdetun1="0" wavetype0="2" stphdetun2="0" wavetype1="2" wavetype2="1" vol0="33" vol1="33" phoffset0="0" phoffset1="0" vol2="33" />
|
||||
</instrument>
|
||||
|
||||
139
data/scripts/create_apple_dmg.sh
Executable file
@@ -0,0 +1,139 @@
|
||||
#!/bin/bash
|
||||
|
||||
# by Andy Maloney
|
||||
# http://asmaloney.com/2013/07/howto/packaging-a-mac-os-x-application-using-a-dmg/
|
||||
|
||||
# make sure we are in the correct dir when we double-click a .command file
|
||||
dir=${0%/*}
|
||||
if [ -d "$dir" ]; then
|
||||
cd "$dir"
|
||||
fi
|
||||
|
||||
# set up your app name, version number, and background image file name
|
||||
APP_NAME="LMMS"
|
||||
VERSION="1.0.0"
|
||||
DMG_BACKGROUND_IMG="dmg_branding.png"
|
||||
cp $HOME/lmms/data/$DMG_BACKGROUND_IMG .
|
||||
|
||||
# you should not need to change these
|
||||
APP_LOWERCASE=$(echo $APP_NAME|tr '[:upper:]' '[:lower:]')
|
||||
APP_EXE="${APP_NAME}.app/Contents/MacOS/${APP_LOWERCASE}"
|
||||
|
||||
VOL_NAME="${APP_NAME} ${VERSION}" # volume name will be "SuperCoolApp 1.0.0"
|
||||
DMG_TMP="${VOL_NAME}-temp.dmg"
|
||||
DMG_FINAL="${VOL_NAME}.dmg" # final DMG name will be "SuperCoolApp 1.0.0.dmg"
|
||||
STAGING_DIR="./Install" # we copy all our stuff into this dir
|
||||
|
||||
# Check the background image DPI and convert it if it isn't 72x72
|
||||
_BACKGROUND_IMAGE_DPI_H=`sips -g dpiHeight ${DMG_BACKGROUND_IMG} | grep -Eo '[0-9]+\.[0-9]+'`
|
||||
_BACKGROUND_IMAGE_DPI_W=`sips -g dpiWidth ${DMG_BACKGROUND_IMG} | grep -Eo '[0-9]+\.[0-9]+'`
|
||||
|
||||
if [ $(echo " $_BACKGROUND_IMAGE_DPI_H != 72.0 " | bc) -eq 1 -o $(echo " $_BACKGROUND_IMAGE_DPI_W != 72.0 " | bc) -eq 1 ]; then
|
||||
echo "WARNING: The background image's DPI is not 72. This will result in distorted backgrounds on Mac OS X 10.7+."
|
||||
echo " I will convert it to 72 DPI for you."
|
||||
|
||||
_DMG_BACKGROUND_TMP="${DMG_BACKGROUND_IMG%.*}"_dpifix."${DMG_BACKGROUND_IMG##*.}"
|
||||
|
||||
sips -s dpiWidth 72 -s dpiHeight 72 ${DMG_BACKGROUND_IMG} --out ${_DMG_BACKGROUND_TMP}
|
||||
|
||||
DMG_BACKGROUND_IMG="${_DMG_BACKGROUND_TMP}"
|
||||
fi
|
||||
|
||||
# clear out any old data
|
||||
rm -rf "${STAGING_DIR}" "${DMG_TMP}" "${DMG_FINAL}"
|
||||
|
||||
# copy over the stuff we want in the final disk image to our staging dir
|
||||
mkdir -p "${STAGING_DIR}"
|
||||
cp -rpf "${APP_NAME}.app" "${STAGING_DIR}"
|
||||
# ... cp anything else you want in the DMG - documentation, etc.
|
||||
|
||||
pushd "${STAGING_DIR}"
|
||||
|
||||
# strip the executable
|
||||
echo "Stripping ${APP_EXE}..."
|
||||
strip -u -r "${APP_EXE}"
|
||||
|
||||
# compress the executable if we have upx in PATH
|
||||
# UPX: http://upx.sourceforge.net/
|
||||
if hash upx 2>/dev/null; then
|
||||
echo "Compressing (UPX) ${APP_EXE}..."
|
||||
upx -9 "${APP_EXE}"
|
||||
fi
|
||||
|
||||
# ... perform any other stripping/compressing of libs and executables
|
||||
|
||||
popd
|
||||
|
||||
# figure out how big our DMG needs to be
|
||||
# assumes our contents are at least 1M!
|
||||
SIZE=`du -sh "${STAGING_DIR}" | sed 's/\([0-9\.]*\)M\(.*\)/\1/'`
|
||||
SIZE=`echo "${SIZE} + 5.0" | bc | awk '{print int($1+0.5)}'`
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Error: Cannot compute size of staging dir"
|
||||
exit
|
||||
fi
|
||||
|
||||
# create the temp DMG file
|
||||
hdiutil create -srcfolder "${STAGING_DIR}" -volname "${VOL_NAME}" -fs HFS+ \
|
||||
-fsargs "-c c=64,a=16,e=16" -format UDRW -size ${SIZE}M "${DMG_TMP}"
|
||||
|
||||
echo "Created DMG: ${DMG_TMP}"
|
||||
|
||||
# mount it and save the device
|
||||
DEVICE=$(hdiutil attach -readwrite -noverify "${DMG_TMP}" | \
|
||||
egrep '^/dev/' | sed 1q | awk '{print $1}')
|
||||
|
||||
sleep 2
|
||||
|
||||
# add a link to the Applications dir
|
||||
echo "Add link to /Applications"
|
||||
pushd /Volumes/"${VOL_NAME}"
|
||||
ln -s /Applications
|
||||
popd
|
||||
|
||||
# add a background image
|
||||
mkdir /Volumes/"${VOL_NAME}"/.background
|
||||
cp "${DMG_BACKGROUND_IMG}" /Volumes/"${VOL_NAME}"/.background/
|
||||
|
||||
# tell the Finder to resize the window, set the background,
|
||||
# change the icon size, place the icons in the right position, etc.
|
||||
echo '
|
||||
tell application "Finder"
|
||||
tell disk "'${VOL_NAME}'"
|
||||
open
|
||||
set current view of container window to icon view
|
||||
set toolbar visible of container window to false
|
||||
set statusbar visible of container window to false
|
||||
set the bounds of container window to {400, 100, 920, 440}
|
||||
set viewOptions to the icon view options of container window
|
||||
set arrangement of viewOptions to not arranged
|
||||
set icon size of viewOptions to 72
|
||||
set background picture of viewOptions to file ".background:'${DMG_BACKGROUND_IMG}'"
|
||||
set position of item "'${APP_NAME}'.app" of container window to {160, 205}
|
||||
set position of item "Applications" of container window to {360, 205}
|
||||
close
|
||||
open
|
||||
update without registering applications
|
||||
delay 2
|
||||
end tell
|
||||
end tell
|
||||
' | osascript
|
||||
|
||||
sync
|
||||
|
||||
# unmount it
|
||||
hdiutil detach "${DEVICE}"
|
||||
|
||||
# now make the final image a compressed disk image
|
||||
echo "Creating compressed image"
|
||||
hdiutil convert "${DMG_TMP}" -format UDZO -imagekey zlib-level=9 -o "${DMG_FINAL}"
|
||||
|
||||
# clean up
|
||||
rm -rf "${DMG_TMP}"
|
||||
rm -rf "${STAGING_DIR}"
|
||||
rm -rf "${DMG_BACKGROUND_IMG}"
|
||||
|
||||
echo 'Done.'
|
||||
|
||||
exit
|
||||
130
data/scripts/create_apple_installer.sh
Executable file
@@ -0,0 +1,130 @@
|
||||
#!/bin/bash
|
||||
#title :create_applet_installer.sh
|
||||
#description :Creates Apple ".app" bundle for LMMS
|
||||
#author :Tres Finocchiaro
|
||||
#date :20140331
|
||||
#version :1.0
|
||||
#usage :bash create_applet_installer.sh
|
||||
#notes :See also https://github.com/LMMS
|
||||
#notes :Troubleshooting try: export DYLD_PRINT_LIBRARIES=1
|
||||
#requires :deploymacqt
|
||||
#=========================================================================================
|
||||
|
||||
# MacPorts Location
|
||||
MACPORTS=/opt/local
|
||||
|
||||
# LMMS source directory
|
||||
CMAKE_SRC=$HOME/lmms
|
||||
|
||||
# LMMS compiled resources
|
||||
CMAKE_INSTALL=$CMAKE_SRC/target
|
||||
|
||||
# LMMS source build directory
|
||||
CMAKE_BUILD=$CMAKE_SRC/build
|
||||
|
||||
# STK rawwaves directory
|
||||
STK_RAWWAVE=$HOME/stk-*/rawwaves
|
||||
|
||||
|
||||
# Place to create ".app" bundle
|
||||
APP=$HOME/Desktop/LMMS.app
|
||||
|
||||
# MacPorts installs libreadline with wrong permissions
|
||||
LIBREADLINE=$MACPORTS/lib/libreadline.6.2.dylib
|
||||
|
||||
#=========================================================================================
|
||||
|
||||
echo -e "\n\nRunning..."
|
||||
|
||||
# Check for u+w permissions on libreadline
|
||||
_perm=`stat -f "%p" $LIBREADLINE`
|
||||
_perm=${_perm:3:1}
|
||||
if [ ${_perm} != "7" ]
|
||||
then
|
||||
echo -e "\n\n\t\t\t\t***********\n\t\t\t\t* WARNING *\n\t\t\t\t***********"
|
||||
echo -e "File $LIBREADLINE is not marked as user writable."
|
||||
echo -e "This will break macdeployqt's linking process after it is copied."
|
||||
echo -e "A sudo password is required to elevate and fix using chmod u+w."
|
||||
echo -e "\nPLEASE ENTER SUDO PASSWORD:"
|
||||
sudo chmod u+w $MACPORTS/lib/libreadline.6.2.dylib
|
||||
fi
|
||||
|
||||
# Remove any old .app bundles
|
||||
rm -Rf $APP
|
||||
|
||||
# Create new bundle, copy our built code to it
|
||||
mkdir -p $APP
|
||||
cd $CMAKE_INSTALL
|
||||
mkdir $APP/Contents
|
||||
cp -R * $APP/Contents
|
||||
|
||||
# Manually copy STK rawwaves
|
||||
mkdir -p $APP/Contents/share/stk/rawwaves
|
||||
cp $STK_RAWWAVE/*.raw $APP/Contents/share/stk/rawwaves
|
||||
|
||||
# Make all libraries writable for macdeployqt
|
||||
cd $APP
|
||||
find . -type f -print0 | xargs -0 chmod u+w
|
||||
|
||||
# Move lmms binary to the proper location
|
||||
mkdir -p $APP/Contents/MacOS
|
||||
mv $APP/Contents/bin/lmms $APP/Contents/MacOS
|
||||
rmdir $APP/Contents/bin
|
||||
|
||||
# Move libraries to proper locations
|
||||
mkdir -p $APP/Contents/Frameworks
|
||||
mv $APP/Contents/lib/lmms/libZynAddSubFxCore.dylib \
|
||||
$APP/Contents/Frameworks/libZynAddSubFxCore.dylib
|
||||
|
||||
mv $APP/Contents/lib/lmms/RemoteZynAddSubFx \
|
||||
$APP/Contents/MacOS/RemoteZynAddSubFx
|
||||
|
||||
# Fix more Zyn Linking issues
|
||||
# install_name_tool -change $CMAKE_INSTALL/lib/lmms/libZynAddSubFxCore.dylib \
|
||||
# @loader_path/../../Frameworks/libZynAddSubFxCore.dylib \
|
||||
# $APP/Contents/lib/lmms/libzynaddsubfx.so
|
||||
|
||||
install_name_tool -change libZynAddSubFxCore.dylib \
|
||||
@loader_path/../../Frameworks/libZynAddSubFxCore.dylib \
|
||||
$APP/Contents/lib/lmms/libzynaddsubfx.so
|
||||
|
||||
install_name_tool -change $CMAKE_BUILD/plugins/zynaddsubfx/libZynAddSubFxCore.dylib \
|
||||
@loader_path/../../Frameworks/libZynAddSubFxCore.dylib \
|
||||
$APP/Contents/MacOS/RemoteZynAddSubFx
|
||||
|
||||
# Build a list of shared objects in target/lib/lmms
|
||||
for file in $APP/Contents/lib/lmms/*.so; do
|
||||
_executables="$_executables -executable=$APP/Contents/lib/lmms/${file##*/}"
|
||||
done
|
||||
|
||||
# Build a list of shared objects in target/lib/lmms/ladspa
|
||||
for file in $APP/Contents/lib/lmms/ladspa/*.so; do
|
||||
_executables="$_executables -executable=$APP/Contents/lib/lmms/ladspa/${file##*/}"
|
||||
done
|
||||
|
||||
# Additional binaries that require linking
|
||||
_executables="$_executables -executable=$APP/Contents/MacOS/RemoteZynAddSubFx"
|
||||
_executables="$_executables -executable=$APP/Contents/Frameworks/libZynAddSubFxCore.dylib"
|
||||
|
||||
# Build our App Package using "macdeployqt"
|
||||
macdeployqt $APP $_executables
|
||||
|
||||
# OS X Specific Artwork
|
||||
cp $CMAKE_SRC/data/lmms.icns $APP/Contents/Resources/
|
||||
|
||||
# Create "Info.plist" using lmms.icns file, http://iconverticons.com/online/)
|
||||
echo -e "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" > "$APP/Contents/Info.plist"
|
||||
echo -e "<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\"" >> "$APP/Contents/Info.plist"
|
||||
echo -e "\"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">" >> "$APP/Contents/Info.plist"
|
||||
echo -e " <plist version=\"1.0\">" >> "$APP/Contents/Info.plist"
|
||||
echo -e " <dict>" >> "$APP/Contents/Info.plist"
|
||||
echo -e " <key>CFBundleIconFile</key>" >> "$APP/Contents/Info.plist"
|
||||
echo -e " <string>lmms.icns</string>" >> "$APP/Contents/Info.plist"
|
||||
echo -e " </dict>" >> "$APP/Contents/Info.plist"
|
||||
echo -e "</plist>" >> "$APP/Contents/Info.plist"
|
||||
|
||||
# Done. Ready to build DMG
|
||||
echo -e "\nFinished.\n\nPlease run \"create_apple_dmg.sh\" from the Desktop to build the installer.\n"
|
||||
echo -e "Note: You can drag/drop it into this terminal window.)\n"
|
||||
cp $CMAKE_SRC/data/scripts/create_apple_dmg.sh $HOME/Desktop/
|
||||
chmod +x $HOME/Desktop/create_apple_dmg.sh
|
||||
@@ -1,6 +1,9 @@
|
||||
/********************
|
||||
* LMMS style sheet *
|
||||
********************/
|
||||
QLabel {
|
||||
color: #e0e0e0;
|
||||
}
|
||||
|
||||
QWhatsThat {
|
||||
color: black;
|
||||
|
||||
@@ -88,7 +88,6 @@ public:
|
||||
private:
|
||||
comboBox * m_backend;
|
||||
comboBox * m_device;
|
||||
LcdSpinBox * m_channels;
|
||||
AudioPortAudioSetupUtil m_setupUtil;
|
||||
|
||||
} ;
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _AUTOMATABLE_MODEL_H
|
||||
#define _AUTOMATABLE_MODEL_H
|
||||
#ifndef AUTOMATABLE_MODEL_H
|
||||
#define AUTOMATABLE_MODEL_H
|
||||
|
||||
#include <math.h>
|
||||
|
||||
@@ -34,24 +34,24 @@
|
||||
// simple way to map a property of a view to a model
|
||||
#define mapPropertyFromModelPtr(type,getfunc,setfunc,modelname) \
|
||||
public: \
|
||||
inline type getfunc() const \
|
||||
type getfunc() const \
|
||||
{ \
|
||||
return (type) modelname->value(); \
|
||||
} \
|
||||
public slots: \
|
||||
inline void setfunc( const type val ) \
|
||||
void setfunc( const type val ) \
|
||||
{ \
|
||||
modelname->setValue( val ); \
|
||||
}
|
||||
|
||||
#define mapPropertyFromModel(type,getfunc,setfunc,modelname) \
|
||||
public: \
|
||||
inline type getfunc() const \
|
||||
type getfunc() const \
|
||||
{ \
|
||||
return (type) modelname.value(); \
|
||||
} \
|
||||
public slots: \
|
||||
inline void setfunc( const type val ) \
|
||||
void setfunc( const type val ) \
|
||||
{ \
|
||||
modelname.setValue( (float) val ); \
|
||||
}
|
||||
@@ -80,8 +80,8 @@ public:
|
||||
const float max = 0,
|
||||
const float step = 0,
|
||||
Model* parent = NULL,
|
||||
const QString& display_name = QString(),
|
||||
bool default_constructed = false );
|
||||
const QString& displayName = QString(),
|
||||
bool defaultConstructed = false );
|
||||
|
||||
virtual ~AutomatableModel();
|
||||
|
||||
@@ -93,7 +93,7 @@ public:
|
||||
|
||||
bool isAutomated() const;
|
||||
|
||||
inline ControllerConnection* controllerConnection() const
|
||||
ControllerConnection* controllerConnection() const
|
||||
{
|
||||
return m_controllerConnection;
|
||||
}
|
||||
@@ -103,13 +103,13 @@ public:
|
||||
|
||||
|
||||
template<class T>
|
||||
static inline T castValue( const float v )
|
||||
static T castValue( const float v )
|
||||
{
|
||||
return (T)( v );
|
||||
}
|
||||
|
||||
template<bool>
|
||||
static inline bool castValue( const float v )
|
||||
static bool castValue( const float v )
|
||||
{
|
||||
return ( qRound( v ) != 0 );
|
||||
}
|
||||
@@ -130,7 +130,7 @@ public:
|
||||
|
||||
|
||||
template<class T>
|
||||
inline T initValue() const
|
||||
T initValue() const
|
||||
{
|
||||
return castValue<T>( m_initValue );
|
||||
}
|
||||
@@ -141,19 +141,19 @@ public:
|
||||
}
|
||||
|
||||
template<class T>
|
||||
inline T minValue() const
|
||||
T minValue() const
|
||||
{
|
||||
return castValue<T>( m_minValue );
|
||||
}
|
||||
|
||||
template<class T>
|
||||
inline T maxValue() const
|
||||
T maxValue() const
|
||||
{
|
||||
return castValue<T>( m_maxValue );
|
||||
}
|
||||
|
||||
template<class T>
|
||||
inline T step() const
|
||||
T step() const
|
||||
{
|
||||
return castValue<T>( m_step );
|
||||
}
|
||||
@@ -164,12 +164,12 @@ public:
|
||||
void setAutomatedValue( const float value );
|
||||
void setValue( const float value );
|
||||
|
||||
inline void incValue( int steps )
|
||||
void incValue( int steps )
|
||||
{
|
||||
setValue( m_value + steps * m_step );
|
||||
}
|
||||
|
||||
inline float range() const
|
||||
float range() const
|
||||
{
|
||||
return m_range;
|
||||
}
|
||||
@@ -193,10 +193,13 @@ public:
|
||||
|
||||
void unlinkAllModels();
|
||||
|
||||
virtual void saveSettings( QDomDocument& doc, QDomElement& element,
|
||||
const QString& name = QString( "value" ) );
|
||||
/*! \brief Saves settings (value, automation links and controller connections) of AutomatableModel into
|
||||
specified DOM element using <name> as attribute/node name */
|
||||
virtual void saveSettings( QDomDocument& doc, QDomElement& element, const QString& name );
|
||||
|
||||
virtual void loadSettings( const QDomElement& element, const QString& name = QString( "value" ) );
|
||||
/*! \brief Loads settings (value, automation links and controller connections) of AutomatableModel from
|
||||
specified DOM element using <name> as attribute/node name */
|
||||
virtual void loadSettings( const QDomElement& element, const QString& name );
|
||||
|
||||
virtual QString nodeName() const
|
||||
{
|
||||
@@ -240,6 +243,16 @@ protected:
|
||||
|
||||
|
||||
private:
|
||||
virtual void saveSettings( QDomDocument& doc, QDomElement& element )
|
||||
{
|
||||
saveSettings( doc, element, "value" );
|
||||
}
|
||||
|
||||
virtual void loadSettings( const QDomElement& element )
|
||||
{
|
||||
loadSettings( element, "value" );
|
||||
}
|
||||
|
||||
void linkModel( AutomatableModel* model );
|
||||
void unlinkModel( AutomatableModel* model );
|
||||
|
||||
@@ -280,22 +293,22 @@ signals:
|
||||
|
||||
|
||||
#define defaultTypedMethods(type) \
|
||||
inline type value( int frameOffset = 0 ) const \
|
||||
type value( int frameOffset = 0 ) const \
|
||||
{ \
|
||||
return AutomatableModel::value<type>( frameOffset ); \
|
||||
} \
|
||||
\
|
||||
inline type initValue() const \
|
||||
type initValue() const \
|
||||
{ \
|
||||
return AutomatableModel::initValue<type>(); \
|
||||
} \
|
||||
\
|
||||
inline type minValue() const \
|
||||
type minValue() const \
|
||||
{ \
|
||||
return AutomatableModel::minValue<type>(); \
|
||||
} \
|
||||
\
|
||||
inline type maxValue() const \
|
||||
type maxValue() const \
|
||||
{ \
|
||||
return AutomatableModel::maxValue<type>(); \
|
||||
} \
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* AutomationPattern.h - declaration of class AutomationPattern, which contains
|
||||
* all information about an automation pattern
|
||||
*
|
||||
* Copyright (c) 2008-2013 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2008-2014 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
|
||||
@@ -179,8 +179,8 @@ private:
|
||||
|
||||
bool m_dragging;
|
||||
|
||||
static const float DEFAULT_MIN_VALUE = 0;
|
||||
static const float DEFAULT_MAX_VALUE = 1;
|
||||
static const float DEFAULT_MIN_VALUE;
|
||||
static const float DEFAULT_MAX_VALUE;
|
||||
|
||||
friend class AutomationPatternView;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* ComboBoxModel.h - declaration of class ComboBoxModel
|
||||
*
|
||||
* Copyright (c) 2008-2011 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2008-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -38,11 +38,10 @@ class EXPORT ComboBoxModel : public IntModel
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ComboBoxModel( Model * _parent = NULL,
|
||||
const QString & _display_name = QString(),
|
||||
bool _default_constructed = false ) :
|
||||
IntModel( 0, 0, 0, _parent, _display_name,
|
||||
_default_constructed )
|
||||
ComboBoxModel( Model* parent = NULL,
|
||||
const QString& displayName = QString(),
|
||||
bool isDefaultConstructed = false ) :
|
||||
IntModel( 0, 0, 0, parent, displayName, isDefaultConstructed )
|
||||
{
|
||||
}
|
||||
|
||||
@@ -51,37 +50,38 @@ public:
|
||||
clear();
|
||||
}
|
||||
|
||||
void addItem( const QString & _item, PixmapLoader * _loader = NULL );
|
||||
void addItem( const QString& item, PixmapLoader* loader = NULL );
|
||||
|
||||
void clear();
|
||||
|
||||
int findText( const QString & _txt ) const;
|
||||
int findText( const QString& txt ) const;
|
||||
|
||||
inline QString currentText() const
|
||||
QString currentText() const
|
||||
{
|
||||
return ( size() > 0 && value() < size() ) ? m_items[value()].first : QString();
|
||||
}
|
||||
|
||||
inline const PixmapLoader * currentData() const
|
||||
const PixmapLoader* currentData() const
|
||||
{
|
||||
return m_items[value()].second;
|
||||
}
|
||||
|
||||
inline const QString & itemText( int _i ) const
|
||||
const QString & itemText( int i ) const
|
||||
{
|
||||
return m_items[tLimit<int>( _i, minValue(), maxValue() )].first;
|
||||
return m_items[qBound<int>( minValue(), i, maxValue() )].first;
|
||||
}
|
||||
|
||||
inline const PixmapLoader * itemPixmap( int _i ) const
|
||||
const PixmapLoader* itemPixmap( int i ) const
|
||||
{
|
||||
return m_items[tLimit<int>( _i, minValue(), maxValue() )].second;
|
||||
return m_items[qBound<int>( minValue(), i, maxValue() )].second;
|
||||
}
|
||||
|
||||
inline int size() const
|
||||
int size() const
|
||||
{
|
||||
return m_items.size();
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
typedef QPair<QString, PixmapLoader *> Item;
|
||||
|
||||
|
||||
@@ -65,11 +65,8 @@ private slots:
|
||||
private:
|
||||
QVector<ControllerView *> m_controllerViews;
|
||||
|
||||
QVBoxLayout * m_mainLayout;
|
||||
QScrollArea * m_scrollArea;
|
||||
QPushButton * m_addButton;
|
||||
|
||||
int m_lastY;
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
@@ -77,7 +77,6 @@ protected:
|
||||
|
||||
private:
|
||||
QPixmap m_bg;
|
||||
ledCheckBox * m_bypass;
|
||||
QMdiSubWindow * m_subWindow;
|
||||
ControllerDialog * m_controllerDlg;
|
||||
bool m_show;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* DummyInstrument.h - instrument used as fallback if an instrument couldn't
|
||||
* be loaded
|
||||
*
|
||||
* Copyright (c) 2005-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2005-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -42,7 +42,7 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
virtual void playNote( NotePlayHandle *, bool, sampleFrame * )
|
||||
virtual void playNote( NotePlayHandle *, sampleFrame * )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _ENVELOPE_AND_LFO_VIEW_H
|
||||
#define _ENVELOPE_AND_LFO_VIEW_H
|
||||
#ifndef ENVELOPE_AND_LFO_VIEW_H
|
||||
#define ENVELOPE_AND_LFO_VIEW_H
|
||||
|
||||
#include <QtGui/QWidget>
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* InstrumentMidiIOView.h - widget in instrument-track-window for setting
|
||||
* up MIDI-related stuff
|
||||
*
|
||||
* Copyright (c) 2005-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2005-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -23,8 +23,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _INSTRUMENT_MIDI_IO_VIEW_H
|
||||
#define _INSTRUMENT_MIDI_IO_VIEW_H
|
||||
#ifndef INSTRUMENT_MIDI_IO_VIEW_H
|
||||
#define INSTRUMENT_MIDI_IO_VIEW_H
|
||||
|
||||
#include <QtGui/QWidget>
|
||||
|
||||
@@ -39,7 +39,7 @@ class QToolButton;
|
||||
class InstrumentMidiIOView : public QWidget, public ModelView
|
||||
{
|
||||
public:
|
||||
InstrumentMidiIOView( QWidget * _parent );
|
||||
InstrumentMidiIOView( QWidget* parent );
|
||||
virtual ~InstrumentMidiIOView();
|
||||
|
||||
|
||||
@@ -58,7 +58,8 @@ private:
|
||||
LcdSpinBox * m_fixedOutputNoteSpinBox;
|
||||
QToolButton * m_wpBtn;
|
||||
|
||||
LcdSpinBox* m_baseVelocitySpinBox;
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* InstrumentSoundShapingView.h - view for InstrumentSoundShaping class
|
||||
*
|
||||
* Copyright (c) 2004-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2004-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -30,6 +30,8 @@
|
||||
#include "InstrumentSoundShaping.h"
|
||||
#include "ModelView.h"
|
||||
|
||||
class QLabel;
|
||||
|
||||
class EnvelopeAndLfoView;
|
||||
class comboBox;
|
||||
class groupBox;
|
||||
@@ -61,6 +63,8 @@ private:
|
||||
knob * m_filterCutKnob;
|
||||
knob * m_filterResKnob;
|
||||
|
||||
QLabel* m_singleStreamInfoLabel;
|
||||
|
||||
} ;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* Copyright (c) 2008-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2006-2008 Danny McRae <khjklujn/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,8 +23,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _LADSPA_CONTROL_H
|
||||
#define _LADSPA_CONTROL_H
|
||||
#ifndef LADSPA_CONTROL_H
|
||||
#define LADSPA_CONTROL_H
|
||||
|
||||
#include <ladspa.h>
|
||||
|
||||
@@ -70,8 +70,7 @@ public:
|
||||
return m_port;
|
||||
}
|
||||
|
||||
virtual void saveSettings( QDomDocument & _doc, QDomElement & _parent,
|
||||
const QString & _name );
|
||||
virtual void saveSettings( QDomDocument & _doc, QDomElement & _parent, const QString & _name );
|
||||
virtual void loadSettings( const QDomElement & _this, const QString & _name );
|
||||
inline virtual QString nodeName() const
|
||||
{
|
||||
@@ -90,6 +89,19 @@ protected slots:
|
||||
void tempoKnobChanged();
|
||||
void linkStateChanged();
|
||||
|
||||
protected:
|
||||
virtual void saveSettings( QDomDocument& doc, QDomElement& element )
|
||||
{
|
||||
Q_UNUSED(doc)
|
||||
Q_UNUSED(element)
|
||||
}
|
||||
|
||||
virtual void loadSettings( const QDomElement& element )
|
||||
{
|
||||
Q_UNUSED(element)
|
||||
}
|
||||
|
||||
|
||||
|
||||
private:
|
||||
bool m_link;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
* main_window.h - declaration of class MainWindow, the main window of LMMS
|
||||
* MainWindow.h - declaration of class MainWindow, the main window of LMMS
|
||||
*
|
||||
* Copyright (c) 2004-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* Copyright (c) 2004-2013 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
@@ -22,15 +22,13 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _MAIN_WINDOW_H
|
||||
#define _MAIN_WINDOW_H
|
||||
#ifndef MAIN_WINDOW_H
|
||||
#define MAIN_WINDOW_H
|
||||
|
||||
#include <QtCore/QBasicTimer>
|
||||
#include <QtCore/QTimer>
|
||||
#include <QtCore/QList>
|
||||
#include <QtGui/QMainWindow>
|
||||
#include <QtGui/QWhatsThis>
|
||||
|
||||
class QAction;
|
||||
class QDomElement;
|
||||
@@ -46,14 +44,14 @@ class MainWindow : public QMainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
inline QMdiArea * workspace( void )
|
||||
QMdiArea* workspace()
|
||||
{
|
||||
return( m_workspace );
|
||||
return m_workspace;
|
||||
}
|
||||
|
||||
inline QWidget * toolBar( void )
|
||||
QWidget* toolBar()
|
||||
{
|
||||
return( m_toolBar );
|
||||
return m_toolBar;
|
||||
}
|
||||
|
||||
int addWidgetToToolBar( QWidget * _w, int _row = -1, int _col = -1 );
|
||||
@@ -63,24 +61,24 @@ public:
|
||||
// every function that replaces current file (e.g. creates new file,
|
||||
// opens another file...) has to call this before and may only process
|
||||
// if this function returns true
|
||||
bool mayChangeProject( void );
|
||||
bool mayChangeProject();
|
||||
|
||||
|
||||
void clearKeyModifiers( void );
|
||||
void clearKeyModifiers();
|
||||
|
||||
inline bool isCtrlPressed( void )
|
||||
bool isCtrlPressed()
|
||||
{
|
||||
return( m_keyMods.m_ctrl );
|
||||
return m_keyMods.m_ctrl;
|
||||
}
|
||||
|
||||
inline bool isShiftPressed( void )
|
||||
bool isShiftPressed()
|
||||
{
|
||||
return( m_keyMods.m_shift );
|
||||
return m_keyMods.m_shift;
|
||||
}
|
||||
|
||||
inline bool isAltPressed( void )
|
||||
bool isAltPressed()
|
||||
{
|
||||
return( m_keyMods.m_alt );
|
||||
return m_keyMods.m_alt;
|
||||
}
|
||||
|
||||
static void saveWidgetState( QWidget * _w, QDomElement & _de );
|
||||
@@ -88,34 +86,31 @@ public:
|
||||
|
||||
|
||||
public slots:
|
||||
void resetWindowTitle( void );
|
||||
void resetWindowTitle();
|
||||
|
||||
inline void emptySlot( void )
|
||||
{
|
||||
}
|
||||
inline void enterWhatsThisMode( void )
|
||||
{
|
||||
QWhatsThis::enterWhatsThisMode();
|
||||
}
|
||||
void createNewProject( void );
|
||||
void emptySlot();
|
||||
void enterWhatsThisMode();
|
||||
void createNewProject();
|
||||
void createNewProjectFromTemplate( QAction * _idx );
|
||||
void openProject( void );
|
||||
bool saveProject( void );
|
||||
bool saveProjectAs( void );
|
||||
bool saveProjectAsNewVersion( void );
|
||||
void showSettingsDialog( void );
|
||||
void aboutLMMS( void );
|
||||
void help( void );
|
||||
void toggleAutomationEditorWin( void );
|
||||
void openProject();
|
||||
bool saveProject();
|
||||
bool saveProjectAs();
|
||||
bool saveProjectAsNewVersion();
|
||||
void showSettingsDialog();
|
||||
void aboutLMMS();
|
||||
void help();
|
||||
void toggleAutomationEditorWin();
|
||||
void toggleBBEditorWin( bool forceShow = false );
|
||||
void toggleSongEditorWin( void );
|
||||
void toggleProjectNotesWin( void );
|
||||
void toggleFxMixerWin( void );
|
||||
void togglePianoRollWin( void );
|
||||
void toggleControllerRack( void );
|
||||
void toggleSongEditorWin();
|
||||
void toggleProjectNotesWin();
|
||||
void toggleFxMixerWin();
|
||||
void togglePianoRollWin();
|
||||
void toggleControllerRack();
|
||||
|
||||
void undo( void );
|
||||
void redo( void );
|
||||
void updatePlayPauseIcons();
|
||||
|
||||
void undo();
|
||||
void redo();
|
||||
|
||||
|
||||
protected:
|
||||
@@ -127,11 +122,11 @@ protected:
|
||||
|
||||
|
||||
private:
|
||||
MainWindow( void );
|
||||
MainWindow();
|
||||
MainWindow( const MainWindow & );
|
||||
virtual ~MainWindow();
|
||||
|
||||
void finalize( void );
|
||||
void finalize();
|
||||
|
||||
void toggleWindow( QWidget *window, bool forceShow = false );
|
||||
|
||||
@@ -169,17 +164,17 @@ private:
|
||||
|
||||
|
||||
private slots:
|
||||
void browseHelp( void );
|
||||
void fillTemplatesMenu( void );
|
||||
void browseHelp();
|
||||
void fillTemplatesMenu();
|
||||
void openRecentlyOpenedProject( QAction * _action );
|
||||
void showTool( QAction * _idx );
|
||||
void updateRecentlyOpenedProjectsMenu( void );
|
||||
void updateRecentlyOpenedProjectsMenu();
|
||||
|
||||
|
||||
void autoSave();
|
||||
|
||||
signals:
|
||||
void periodicUpdate( void );
|
||||
void periodicUpdate();
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
@@ -140,9 +140,9 @@ public:
|
||||
return m_data.m_param[1];
|
||||
}
|
||||
|
||||
volume_t volume() const
|
||||
volume_t volume( int midiBaseVelocity ) const
|
||||
{
|
||||
return (volume_t)( velocity() * MaxVolume / MidiMaxVelocity );
|
||||
return (volume_t)( velocity() * DefaultVolume / midiBaseVelocity );
|
||||
}
|
||||
|
||||
const void* sourcePort() const
|
||||
|
||||
@@ -45,22 +45,15 @@ class MidiPortMenu;
|
||||
class MidiPort : public Model, public SerializingObject
|
||||
{
|
||||
Q_OBJECT
|
||||
mapPropertyFromModel(int,inputChannel,setInputChannel,
|
||||
m_inputChannelModel);
|
||||
mapPropertyFromModel(int,outputChannel,setOutputChannel,
|
||||
m_outputChannelModel);
|
||||
mapPropertyFromModel(int,inputController,setInputController,
|
||||
m_inputControllerModel);
|
||||
mapPropertyFromModel(int,outputController,setOutputController,
|
||||
m_outputControllerModel);
|
||||
mapPropertyFromModel(int,fixedInputVelocity,setFixedInputVelocity,
|
||||
m_fixedInputVelocityModel);
|
||||
mapPropertyFromModel(int,fixedOutputVelocity,setFixedOutputVelocity,
|
||||
m_fixedOutputVelocityModel);
|
||||
mapPropertyFromModel(int,fixedOutputNote,setFixedOutputNote,
|
||||
m_fixedOutputNoteModel);
|
||||
mapPropertyFromModel(int,outputProgram,setOutputProgram,
|
||||
m_outputProgramModel);
|
||||
mapPropertyFromModel(int,inputChannel,setInputChannel,m_inputChannelModel);
|
||||
mapPropertyFromModel(int,outputChannel,setOutputChannel,m_outputChannelModel);
|
||||
mapPropertyFromModel(int,inputController,setInputController,m_inputControllerModel);
|
||||
mapPropertyFromModel(int,outputController,setOutputController,m_outputControllerModel);
|
||||
mapPropertyFromModel(int,fixedInputVelocity,setFixedInputVelocity,m_fixedInputVelocityModel);
|
||||
mapPropertyFromModel(int,fixedOutputVelocity,setFixedOutputVelocity,m_fixedOutputVelocityModel);
|
||||
mapPropertyFromModel(int,fixedOutputNote,setFixedOutputNote,m_fixedOutputNoteModel);
|
||||
mapPropertyFromModel(int,outputProgram,setOutputProgram,m_outputProgramModel);
|
||||
mapPropertyFromModel(int,baseVelocity,setBaseVelocity,m_baseVelocityModel);
|
||||
mapPropertyFromModel(bool,isReadable,setReadable,m_readableModel);
|
||||
mapPropertyFromModel(bool,isWritable,setWritable,m_writableModel);
|
||||
public:
|
||||
@@ -159,6 +152,7 @@ private:
|
||||
IntModel m_fixedOutputVelocityModel;
|
||||
IntModel m_fixedOutputNoteModel;
|
||||
IntModel m_outputProgramModel;
|
||||
IntModel m_baseVelocityModel;
|
||||
BoolModel m_readableModel;
|
||||
BoolModel m_writableModel;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Model.h - declaration of Model base class
|
||||
*
|
||||
* Copyright (c) 2007-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2007-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -22,8 +22,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _MODEL_H
|
||||
#define _MODEL_H
|
||||
#ifndef MODEL_H
|
||||
#define MODEL_H
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QPointer>
|
||||
@@ -47,12 +47,12 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
inline bool defaultConstructed()
|
||||
bool isDefaultConstructed()
|
||||
{
|
||||
return m_defaultConstructed;
|
||||
}
|
||||
|
||||
inline Model * parentModel() const
|
||||
Model* parentModel() const
|
||||
{
|
||||
return static_cast<Model *>( parent() );
|
||||
}
|
||||
@@ -62,9 +62,9 @@ public:
|
||||
return m_displayName;
|
||||
}
|
||||
|
||||
virtual void setDisplayName( const QString & _display_name )
|
||||
virtual void setDisplayName( const QString& displayName )
|
||||
{
|
||||
m_displayName = _display_name;
|
||||
m_displayName = displayName;
|
||||
}
|
||||
|
||||
virtual QString fullDisplayName() const;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* ModelView.h - declaration of ModelView base class
|
||||
*
|
||||
* Copyright (c) 2007-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2007-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -22,8 +22,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _MODEL_VIEW_H
|
||||
#define _MODEL_VIEW_H
|
||||
#ifndef MODEL_VIEW_H
|
||||
#define MODEL_VIEW_H
|
||||
|
||||
#include "Model.h"
|
||||
|
||||
@@ -31,31 +31,31 @@
|
||||
class EXPORT ModelView
|
||||
{
|
||||
public:
|
||||
ModelView( Model * _model, QWidget * _this );
|
||||
ModelView( Model* model, QWidget* widget );
|
||||
virtual ~ModelView();
|
||||
|
||||
virtual void setModel( Model * _model, bool _old_model_valid = true );
|
||||
virtual void setModel( Model* model, bool isOldModelValid = true );
|
||||
|
||||
inline Model * model()
|
||||
Model* model()
|
||||
{
|
||||
return m_model;
|
||||
}
|
||||
|
||||
inline const Model * model() const
|
||||
const Model* model() const
|
||||
{
|
||||
return m_model;
|
||||
}
|
||||
|
||||
template<class T>
|
||||
T * castModel()
|
||||
T* castModel()
|
||||
{
|
||||
return dynamic_cast<T *>( model() );
|
||||
return dynamic_cast<T*>( model() );
|
||||
}
|
||||
|
||||
template<class T>
|
||||
const T * castModel() const
|
||||
const T* castModel() const
|
||||
{
|
||||
return dynamic_cast<const T *>( model() );
|
||||
return dynamic_cast<const T*>( model() );
|
||||
}
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ protected:
|
||||
{
|
||||
}
|
||||
|
||||
QWidget * widget()
|
||||
QWidget* widget()
|
||||
{
|
||||
return m_widget;
|
||||
}
|
||||
@@ -74,7 +74,7 @@ protected:
|
||||
|
||||
|
||||
private:
|
||||
QWidget * m_widget;
|
||||
QWidget* m_widget;
|
||||
QPointer<Model> m_model;
|
||||
|
||||
} ;
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _PIANO_H
|
||||
#define _PIANO_H
|
||||
#ifndef PIANO_H
|
||||
#define PIANO_H
|
||||
|
||||
#include "note.h"
|
||||
#include "Model.h"
|
||||
@@ -50,7 +50,7 @@ public:
|
||||
return m_pressedKeys[key];
|
||||
}
|
||||
|
||||
void handleKeyPress( int key, int midiVelocity = MidiDefaultVelocity );
|
||||
void handleKeyPress( int key, int midiVelocity = -1 );
|
||||
void handleKeyRelease( int key );
|
||||
|
||||
InstrumentTrack* instrumentTrack() const
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _PIANO_ROLL_H
|
||||
#define _PIANO_ROLL_H
|
||||
#ifndef PIANO_ROLL_H
|
||||
#define PIANO_ROLL_H
|
||||
|
||||
#include <QtGui/QWidget>
|
||||
|
||||
@@ -53,6 +53,9 @@ class PianoRoll : public QWidget, public SerializingObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
/*! \brief Resets settings to default when e.g. creating a new project */
|
||||
void reset();
|
||||
|
||||
void setCurrentPattern( pattern * _new_pattern );
|
||||
|
||||
inline void stopRecording()
|
||||
@@ -147,6 +150,7 @@ protected slots:
|
||||
|
||||
|
||||
signals:
|
||||
void currentPatternChanged();
|
||||
void semiToneMarkerMenuScaleSetEnabled(bool);
|
||||
void semiToneMarkerMenuChordSetEnabled(bool);
|
||||
|
||||
@@ -169,7 +173,7 @@ private:
|
||||
ActionChangeNoteProperty,
|
||||
ActionResizeNoteEditArea
|
||||
};
|
||||
|
||||
|
||||
enum noteEditMode
|
||||
{
|
||||
NoteEditVolume,
|
||||
@@ -205,7 +209,7 @@ private:
|
||||
void autoScroll( const MidiTime & _t );
|
||||
|
||||
MidiTime newNoteLen() const;
|
||||
|
||||
|
||||
void shiftPos(int amount);
|
||||
void shiftSemiTone(int amount);
|
||||
bool isSelection() const;
|
||||
@@ -213,19 +217,19 @@ private:
|
||||
void testPlayNote( note * n );
|
||||
void testPlayKey( int _key, int _vol, int _pan );
|
||||
void pauseTestNotes( bool _pause = true );
|
||||
|
||||
|
||||
inline int noteEditTop() const;
|
||||
inline int keyAreaBottom() const;
|
||||
inline int noteEditBottom() const;
|
||||
inline int keyAreaTop() const;
|
||||
inline int noteEditRight() const;
|
||||
inline int noteEditLeft() const;
|
||||
|
||||
|
||||
void dragNotes( int x, int y, bool alt, bool shift );
|
||||
|
||||
|
||||
static const int cm_scrollAmtHoriz = 10;
|
||||
static const int cm_scrollAmtVert = 1;
|
||||
|
||||
|
||||
static QPixmap * s_whiteKeyBigPm;
|
||||
static QPixmap * s_whiteKeyBigPressedPm;
|
||||
static QPixmap * s_whiteKeySmallPm;
|
||||
@@ -252,7 +256,7 @@ private:
|
||||
toolButton * m_eraseButton;
|
||||
toolButton * m_selectButton;
|
||||
toolButton * m_detuneButton;
|
||||
|
||||
|
||||
toolButton * m_cutButton;
|
||||
toolButton * m_copyButton;
|
||||
toolButton * m_pasteButton;
|
||||
@@ -287,22 +291,22 @@ private:
|
||||
int m_selectedTick;
|
||||
int m_selectStartKey;
|
||||
int m_selectedKeys;
|
||||
|
||||
|
||||
// boundary box around all selected notes when dragging
|
||||
int m_moveBoundaryLeft;
|
||||
int m_moveBoundaryTop;
|
||||
int m_moveBoundaryRight;
|
||||
int m_moveBoundaryBottom;
|
||||
|
||||
|
||||
// remember where the scrolling started when dragging so that
|
||||
// we can handle dragging while scrolling with arrow keys
|
||||
int m_mouseDownKey;
|
||||
int m_mouseDownTick;
|
||||
|
||||
|
||||
// remember the last x and y of a mouse movement
|
||||
int m_lastMouseX;
|
||||
int m_lastMouseY;
|
||||
|
||||
|
||||
// x,y of when the user starts a drag
|
||||
int m_moveStartX;
|
||||
int m_moveStartY;
|
||||
@@ -312,7 +316,7 @@ private:
|
||||
int m_ppt;
|
||||
int m_totalKeysToScroll;
|
||||
|
||||
// remember these values to use them
|
||||
// remember these values to use them
|
||||
// for the next note that is set
|
||||
MidiTime m_lenOfNewNotes;
|
||||
volume_t m_lastNoteVolume;
|
||||
@@ -323,7 +327,7 @@ private:
|
||||
|
||||
editModes m_editMode;
|
||||
editModes m_ctrlMode; // mode they were in before they hit ctrl
|
||||
|
||||
|
||||
bool m_mouseDownLeft; //true if left click is being held down
|
||||
bool m_mouseDownRight; //true if right click is being held down
|
||||
|
||||
@@ -337,7 +341,7 @@ private:
|
||||
note * noteUnderMouse();
|
||||
|
||||
// turn a selection rectangle into selected notes
|
||||
void computeSelectedNotes( bool shift );
|
||||
void computeSelectedNotes( bool shift );
|
||||
void clearSelectedNotes();
|
||||
|
||||
friend class engine;
|
||||
|
||||
@@ -474,7 +474,6 @@ private:
|
||||
#else
|
||||
int m_shmID;
|
||||
#endif
|
||||
size_t m_shmSize;
|
||||
shmData * m_data;
|
||||
#ifdef USE_QT_SEMAPHORES
|
||||
QSystemSemaphore m_dataSem;
|
||||
@@ -780,7 +779,6 @@ private:
|
||||
void resizeSharedProcessingMemory();
|
||||
|
||||
|
||||
bool m_initialized;
|
||||
bool m_failed;
|
||||
|
||||
QProcess m_process;
|
||||
|
||||
@@ -22,9 +22,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _SAMPLE_BUFFER_H
|
||||
#define _SAMPLE_BUFFER_H
|
||||
#ifndef SAMPLE_BUFFER_H
|
||||
#define SAMPLE_BUFFER_H
|
||||
|
||||
#include <QtCore/QMutex>
|
||||
#include <QtCore/QObject>
|
||||
@@ -99,29 +98,18 @@ public:
|
||||
return m_audioFile;
|
||||
}
|
||||
|
||||
inline f_cnt_t startFrame() const
|
||||
f_cnt_t startFrame() const
|
||||
{
|
||||
return m_startFrame;
|
||||
}
|
||||
|
||||
inline f_cnt_t endFrame() const
|
||||
f_cnt_t endFrame() const
|
||||
{
|
||||
return m_endFrame;
|
||||
}
|
||||
|
||||
void setLoopStartFrame( f_cnt_t _start )
|
||||
{
|
||||
m_varLock.lock();
|
||||
m_loopStartFrame = _start;
|
||||
m_varLock.unlock();
|
||||
}
|
||||
|
||||
void setLoopEndFrame( f_cnt_t _end )
|
||||
{
|
||||
m_varLock.lock();
|
||||
m_loopEndFrame = _end;
|
||||
m_varLock.unlock();
|
||||
}
|
||||
void setLoopStartFrame( f_cnt_t start );
|
||||
void setLoopEndFrame( f_cnt_t end );
|
||||
|
||||
inline f_cnt_t frames() const
|
||||
{
|
||||
@@ -223,13 +211,16 @@ public:
|
||||
public slots:
|
||||
void setAudioFile( const QString & _audio_file );
|
||||
void loadFromBase64( const QString & _data );
|
||||
void setStartFrame( const f_cnt_t _s );
|
||||
void setEndFrame( const f_cnt_t _e );
|
||||
void setStartFrame( f_cnt_t start );
|
||||
void setEndFrame( f_cnt_t end );
|
||||
void setAmplification( float _a );
|
||||
void setReversed( bool _on );
|
||||
|
||||
|
||||
private:
|
||||
/*! Ensures that all settings are sane like end frame > start frame etc. */
|
||||
void sanitizeSettings();
|
||||
|
||||
void update( bool _keep_settings = false );
|
||||
|
||||
void convertIntToFloat ( int_sample_t * & _ibuf, f_cnt_t _frames, int _channels);
|
||||
@@ -273,5 +264,4 @@ signals:
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -52,7 +52,7 @@ public:
|
||||
|
||||
void setHook( SerializingObjectHook * _hook );
|
||||
|
||||
SerializingObjectHook * getHook()
|
||||
SerializingObjectHook* hook()
|
||||
{
|
||||
return m_hook;
|
||||
}
|
||||
@@ -60,8 +60,8 @@ public:
|
||||
|
||||
protected:
|
||||
// to be implemented by sub-objects
|
||||
virtual void saveSettings( QDomDocument & _doc, QDomElement & _this );
|
||||
virtual void loadSettings( const QDomElement & _this );
|
||||
virtual void saveSettings( QDomDocument& doc, QDomElement& element ) = 0;
|
||||
virtual void loadSettings( const QDomElement& element ) = 0;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
@@ -53,11 +53,8 @@ public:
|
||||
const QString & _display_name = QString() );
|
||||
virtual ~TempoSyncKnobModel();
|
||||
|
||||
virtual void saveSettings( QDomDocument & _doc,
|
||||
QDomElement & _this,
|
||||
const QString & _name );
|
||||
virtual void loadSettings( const QDomElement & _this,
|
||||
const QString & _name );
|
||||
void saveSettings( QDomDocument & _doc, QDomElement & _this, const QString& name );
|
||||
void loadSettings( const QDomElement & _this, const QString& name );
|
||||
|
||||
TempoSyncMode syncMode() const
|
||||
{
|
||||
|
||||
@@ -69,7 +69,7 @@ public:
|
||||
|
||||
static inline float minFreq()
|
||||
{
|
||||
return( 0.01f );
|
||||
return( 3.0f );
|
||||
}
|
||||
|
||||
static inline float minQ()
|
||||
@@ -488,8 +488,9 @@ public:
|
||||
/*, const bool _q_is_bandwidth = false*/ )
|
||||
{
|
||||
// temp coef vars
|
||||
_freq = qMax( _freq, minFreq() );// limit freq and q for not getting
|
||||
// bad noise out of the filter...
|
||||
_freq = qBound(minFreq(), _freq, 20000.0f); // limit freq and q for not getting
|
||||
// bad noise out of the filter...
|
||||
|
||||
_q = qMax( _q, minQ() );
|
||||
|
||||
if( m_type == Lowpass_RC12 ||
|
||||
|
||||
@@ -147,8 +147,6 @@ public:
|
||||
return s_controllerRackView;
|
||||
}
|
||||
|
||||
static void updatePlayPauseIcons();
|
||||
|
||||
static float framesPerTick()
|
||||
{
|
||||
return s_framesPerTick;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* Copyright (c) 2006-2007 Andreas Brandmaier <andy/at/brandmaier/dot/de>
|
||||
* 2008 Paul Giblock <drfaygo/at/gmail/dot/com>
|
||||
*
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
@@ -24,8 +24,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _GRAPH_H
|
||||
#define _GRAPH_H
|
||||
#ifndef GRAPH_H
|
||||
#define GRAPH_H
|
||||
|
||||
#include <QtGui/QWidget>
|
||||
#include <QtGui/QPixmap>
|
||||
@@ -71,7 +71,7 @@ public:
|
||||
{
|
||||
return m_graphStyle;
|
||||
}
|
||||
|
||||
|
||||
|
||||
inline void setGraphStyle( graphStyle _s )
|
||||
{
|
||||
@@ -101,10 +101,9 @@ private:
|
||||
|
||||
QPixmap m_foreground;
|
||||
QColor m_graphColor;
|
||||
|
||||
graphModel * m_graphModel;
|
||||
|
||||
graphStyle m_graphStyle;
|
||||
|
||||
|
||||
bool m_mouseDown;
|
||||
int m_lastCursorX;
|
||||
|
||||
@@ -125,7 +124,7 @@ public:
|
||||
virtual ~graphModel();
|
||||
|
||||
// TODO: saveSettings, loadSettings?
|
||||
|
||||
|
||||
inline float minValue() const
|
||||
{
|
||||
return( m_minValue );
|
||||
@@ -140,7 +139,7 @@ public:
|
||||
{
|
||||
return( m_samples.count() );
|
||||
}
|
||||
|
||||
|
||||
inline const float * samples() const
|
||||
{
|
||||
return( m_samples.data() );
|
||||
@@ -160,10 +159,12 @@ public slots:
|
||||
void setWaveToSquare();
|
||||
void setWaveToNoise();
|
||||
QString setWaveToUser( );
|
||||
|
||||
|
||||
void smooth();
|
||||
void smoothNonCyclic();
|
||||
void normalize();
|
||||
void invert();
|
||||
void shiftPhase( int _deg );
|
||||
|
||||
signals:
|
||||
void lengthChanged();
|
||||
|
||||
@@ -58,6 +58,8 @@ class EXPORT knob : public QWidget, public FloatModelView
|
||||
// correctly so we need to do this:
|
||||
Q_PROPERTY(QColor outerColor READ outerColor WRITE setOuterColor)
|
||||
mapPropertyFromModel(bool,isVolumeKnob,setVolumeKnob,m_volumeKnob);
|
||||
mapPropertyFromModel(float,volumeRatio,setVolumeRatio,m_volumeRatio);
|
||||
|
||||
public:
|
||||
knob( int _knob_num, QWidget * _parent = NULL, const QString & _name = QString() );
|
||||
virtual ~knob();
|
||||
@@ -149,6 +151,7 @@ private:
|
||||
|
||||
QPixmap * m_knobPixmap;
|
||||
BoolModel m_volumeKnob;
|
||||
FloatModel m_volumeRatio;
|
||||
|
||||
QPoint m_mouseOffset;
|
||||
QPoint m_origMousePos;
|
||||
|
||||
@@ -176,9 +176,9 @@ public:
|
||||
return m_volume;
|
||||
}
|
||||
|
||||
int midiVelocity() const
|
||||
int midiVelocity( int midiBaseVelocity ) const
|
||||
{
|
||||
return qMin( MidiMaxVelocity, getVolume() * MidiMaxVelocity / MaxVolume );
|
||||
return qMin( MidiMaxVelocity, getVolume() * midiBaseVelocity / DefaultVolume );
|
||||
}
|
||||
|
||||
inline panning_t getPanning() const
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
* shared_object.h - class sharedObject for use among other objects
|
||||
*
|
||||
* Copyright (c) 2006-2007 Javier Serrano Polo <jasp00/at/users.sourceforge.net>
|
||||
* Copyright (c) 2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* Copyright (c) 2008-2014 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,10 +23,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _SHARED_OBJECT_H
|
||||
#define _SHARED_OBJECT_H
|
||||
|
||||
#ifndef SHARED_OBJECT_H
|
||||
#define SHARED_OBJECT_H
|
||||
|
||||
#include <QtCore/QMutex>
|
||||
|
||||
@@ -45,27 +43,33 @@ public:
|
||||
}
|
||||
|
||||
template<class T>
|
||||
static T * ref( T * _object )
|
||||
static T* ref( T* object )
|
||||
{
|
||||
_object->m_lock.lock();
|
||||
object->m_lock.lock();
|
||||
// TODO: Use QShared
|
||||
++_object->m_referenceCount;
|
||||
_object->m_lock.unlock();
|
||||
return( _object );
|
||||
++object->m_referenceCount;
|
||||
object->m_lock.unlock();
|
||||
return object;
|
||||
}
|
||||
|
||||
template<class T>
|
||||
static void unref( T * _object )
|
||||
static void unref( T* object )
|
||||
{
|
||||
_object->m_lock.lock();
|
||||
bool delete_object = --_object->m_referenceCount <= 0;
|
||||
_object->m_lock.unlock();
|
||||
if ( delete_object )
|
||||
object->m_lock.lock();
|
||||
bool deleteObject = --object->m_referenceCount <= 0;
|
||||
object->m_lock.unlock();
|
||||
|
||||
if ( deleteObject )
|
||||
{
|
||||
delete _object;
|
||||
delete object;
|
||||
}
|
||||
}
|
||||
|
||||
// keep clang happy which complaines about unused member variable
|
||||
void dummy()
|
||||
{
|
||||
m_referenceCount = 0;
|
||||
}
|
||||
|
||||
private:
|
||||
int m_referenceCount;
|
||||
|
||||
@@ -170,12 +170,12 @@ public:
|
||||
if ( m_exportLoop )
|
||||
{
|
||||
return m_exporting == true &&
|
||||
m_playPos[Mode_PlaySong].getTact() >= length();
|
||||
m_playPos[Mode_PlaySong].getTicks() >= length() * ticksPerTact();
|
||||
}
|
||||
else
|
||||
{
|
||||
return m_exporting == true &&
|
||||
m_playPos[Mode_PlaySong].getTact() >= length() + 1;
|
||||
m_playPos[Mode_PlaySong].getTicks() >= ( length() + 1 ) * ticksPerTact();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -210,26 +210,29 @@ public:
|
||||
void loadProject( const QString & _filename );
|
||||
bool guiSaveProject();
|
||||
bool guiSaveProjectAs( const QString & _filename );
|
||||
bool saveProjectFile( const QString & _filename );
|
||||
inline const QString & projectFileName() const
|
||||
bool saveProjectFile( const QString & _filename );
|
||||
|
||||
const QString & projectFileName() const
|
||||
{
|
||||
return m_fileName;
|
||||
}
|
||||
inline bool isLoadingProject() const
|
||||
|
||||
bool isLoadingProject() const
|
||||
{
|
||||
return m_loadingProject;
|
||||
}
|
||||
inline bool isModified() const
|
||||
|
||||
bool isModified() const
|
||||
{
|
||||
return m_modified;
|
||||
}
|
||||
|
||||
inline virtual QString nodeName() const
|
||||
virtual QString nodeName() const
|
||||
{
|
||||
return "song";
|
||||
}
|
||||
|
||||
virtual inline bool fixedTCOs() const
|
||||
virtual bool fixedTCOs() const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -274,8 +277,6 @@ public slots:
|
||||
|
||||
void addBBTrack();
|
||||
|
||||
bool isLoadingProject();
|
||||
|
||||
|
||||
private slots:
|
||||
void insertBar();
|
||||
@@ -360,6 +361,7 @@ private:
|
||||
|
||||
signals:
|
||||
void projectLoaded();
|
||||
void playbackStateChanged();
|
||||
void lengthChanged( int _tacts );
|
||||
void tempoChanged( bpm_t _new_bpm );
|
||||
void timeSignatureChanged( int _old_ticks_per_tact,
|
||||
|
||||
@@ -277,6 +277,17 @@ protected:
|
||||
return "trackcontentwidget";
|
||||
}
|
||||
|
||||
virtual void saveSettings( QDomDocument& doc, QDomElement& element )
|
||||
{
|
||||
Q_UNUSED(doc)
|
||||
Q_UNUSED(element)
|
||||
}
|
||||
|
||||
virtual void loadSettings( const QDomElement& element )
|
||||
{
|
||||
Q_UNUSED(element)
|
||||
}
|
||||
|
||||
virtual void undoStep( JournalEntry & _je );
|
||||
virtual void redoStep( JournalEntry & _je );
|
||||
|
||||
@@ -296,8 +307,6 @@ private:
|
||||
typedef QVector<trackContentObjectView *> tcoViewVector;
|
||||
tcoViewVector m_tcoViews;
|
||||
|
||||
int m_pixelsPerTact;
|
||||
|
||||
QPixmap m_background;
|
||||
|
||||
} ;
|
||||
@@ -544,6 +553,17 @@ protected:
|
||||
virtual void undoStep( JournalEntry & _je );
|
||||
virtual void redoStep( JournalEntry & _je );
|
||||
|
||||
virtual void saveSettings( QDomDocument& doc, QDomElement& element )
|
||||
{
|
||||
Q_UNUSED(doc)
|
||||
Q_UNUSED(element)
|
||||
}
|
||||
|
||||
virtual void loadSettings( const QDomElement& element )
|
||||
{
|
||||
Q_UNUSED(element)
|
||||
}
|
||||
|
||||
virtual QString nodeName() const
|
||||
{
|
||||
return "trackview";
|
||||
|
||||
@@ -2,7 +2,7 @@ lmmsicon ICON data/lmms.ico
|
||||
#include <windows.h>
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 0,9,92,0
|
||||
FILEVERSION 1,0,1,0
|
||||
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
||||
FILEOS VOS_NT_WINDOWS32
|
||||
FILETYPE VFT_APP
|
||||
|
||||
125
plugins/Amplifier/Amplifier.cpp
Normal file
@@ -0,0 +1,125 @@
|
||||
/*
|
||||
* Amplifier.cpp - A native amplifier effect plugin with sample-exact amplification
|
||||
*
|
||||
* Copyright (c) 2014 Vesa Kivimäki <contact/dot/diizy/at/nbl/dot/fi>
|
||||
* Copyright (c) 2006-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public
|
||||
* License along with this program (see COPYING); if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "Amplifier.h"
|
||||
|
||||
#include "embed.cpp"
|
||||
|
||||
|
||||
extern "C"
|
||||
{
|
||||
|
||||
Plugin::Descriptor PLUGIN_EXPORT amplifier_plugin_descriptor =
|
||||
{
|
||||
STRINGIFY( PLUGIN_NAME ),
|
||||
"Amplifier",
|
||||
QT_TRANSLATE_NOOP( "pluginBrowser", "A native amplifier plugin" ),
|
||||
"Vesa Kivimäki <contact/dot/diizy/at/nbl/dot/fi>",
|
||||
0x0100,
|
||||
Plugin::Effect,
|
||||
new PluginPixmapLoader( "logo" ),
|
||||
NULL,
|
||||
NULL
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
AmplifierEffect::AmplifierEffect( Model* parent, const Descriptor::SubPluginFeatures::Key* key ) :
|
||||
Effect( &lifier_plugin_descriptor, parent, key ),
|
||||
m_ampControls( this )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
AmplifierEffect::~AmplifierEffect()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
bool AmplifierEffect::processAudioBuffer( sampleFrame* buf, const fpp_t frames )
|
||||
{
|
||||
if( !isEnabled() || !isRunning () )
|
||||
{
|
||||
return( false );
|
||||
}
|
||||
|
||||
double outSum = 0.0;
|
||||
const float d = dryLevel();
|
||||
const float w = wetLevel();
|
||||
for( fpp_t f = 0; f < frames; ++f )
|
||||
{
|
||||
// qDebug( "offset %d, value %f", f, m_ampControls.m_volumeModel.value( f ) );
|
||||
|
||||
sample_t s[2] = { buf[f][0], buf[f][1] };
|
||||
|
||||
// convert vol/pan values to left/right values
|
||||
const float left1 = m_ampControls.m_volumeModel.value( f ) *
|
||||
( m_ampControls.m_panModel.value( f ) <= 0
|
||||
? 1.0
|
||||
: 1.0 - m_ampControls.m_panModel.value( f ) / 100.0 );
|
||||
const float right1 = m_ampControls.m_volumeModel.value( f ) *
|
||||
( m_ampControls.m_panModel.value( f ) >= 0
|
||||
? 1.0
|
||||
: 1.0 + m_ampControls.m_panModel.value( f ) / 100.0 );
|
||||
|
||||
// first stage amplification
|
||||
s[0] *= ( left1 / 100.0 );
|
||||
s[1] *= ( right1 / 100.0 );
|
||||
|
||||
// second stage amplification
|
||||
s[0] *= ( m_ampControls.m_leftModel.value( f ) / 100.0 );
|
||||
s[1] *= ( m_ampControls.m_rightModel.value( f ) / 100.0 );
|
||||
|
||||
buf[f][0] = d * buf[f][0] + w * s[0];
|
||||
buf[f][1] = d * buf[f][1] + w * s[1];
|
||||
outSum += buf[f][0]*buf[f][0] + buf[f][1]*buf[f][1];
|
||||
}
|
||||
|
||||
checkGate( outSum / frames );
|
||||
|
||||
return isRunning();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
extern "C"
|
||||
{
|
||||
|
||||
// necessary for getting instance out of shared lib
|
||||
Plugin * PLUGIN_EXPORT lmms_plugin_main( Model* parent, void* data )
|
||||
{
|
||||
return new AmplifierEffect( parent, static_cast<const Plugin::Descriptor::SubPluginFeatures::Key *>( data ) );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
54
plugins/Amplifier/Amplifier.h
Normal file
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
* Amplifier.h - amplifier-effect-plugin
|
||||
*
|
||||
* Copyright (c) 2014 Vesa Kivimäki <contact/dot/diizy/at/nbl/dot/fi>
|
||||
* Copyright (c) 2006-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public
|
||||
* License along with this program (see COPYING); if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#ifndef AMPLIFIER_H
|
||||
#define AMPLIFIER_H
|
||||
|
||||
#include "Effect.h"
|
||||
#include "AmplifierControls.h"
|
||||
|
||||
|
||||
class AmplifierEffect : public Effect
|
||||
{
|
||||
public:
|
||||
AmplifierEffect( Model* parent, const Descriptor::SubPluginFeatures::Key* key );
|
||||
virtual ~AmplifierEffect();
|
||||
virtual bool processAudioBuffer( sampleFrame* buf, const fpp_t frames );
|
||||
|
||||
virtual EffectControls* controls()
|
||||
{
|
||||
return &m_ampControls;
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
AmplifierControls m_ampControls;
|
||||
|
||||
friend class AmplifierControls;
|
||||
|
||||
} ;
|
||||
|
||||
#endif
|
||||
69
plugins/Amplifier/AmplifierControlDialog.cpp
Normal file
@@ -0,0 +1,69 @@
|
||||
/*
|
||||
* AmplifierControlDialog.cpp - control dialog for amplifier effect
|
||||
*
|
||||
* Copyright (c) 2014 Vesa Kivimäki <contact/dot/diizy/at/nbl/dot/fi>
|
||||
* Copyright (c) 2006-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public
|
||||
* License along with this program (see COPYING); if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <QtGui/QLayout>
|
||||
|
||||
#include "AmplifierControlDialog.h"
|
||||
#include "AmplifierControls.h"
|
||||
#include "embed.h"
|
||||
|
||||
|
||||
|
||||
AmplifierControlDialog::AmplifierControlDialog( AmplifierControls* controls ) :
|
||||
EffectControlDialog( controls )
|
||||
{
|
||||
setAutoFillBackground( true );
|
||||
QPalette pal;
|
||||
pal.setBrush( backgroundRole(), PLUGIN_NAME::getIconPixmap( "artwork" ) );
|
||||
setPalette( pal );
|
||||
setFixedSize( 100, 125 );
|
||||
|
||||
knob * volumeKnob = new knob( knobBright_26, this);
|
||||
volumeKnob -> move( 20, 30 );
|
||||
volumeKnob -> setVolumeKnob( true );
|
||||
volumeKnob->setModel( &controls->m_volumeModel );
|
||||
volumeKnob->setLabel( tr( "VOL" ) );
|
||||
volumeKnob->setHintText( tr( "Volume:" ) + " ", "%" );
|
||||
|
||||
knob * panKnob = new knob( knobBright_26, this);
|
||||
panKnob -> move( 60, 30 );
|
||||
panKnob->setModel( &controls->m_panModel );
|
||||
panKnob->setLabel( tr( "PAN" ) );
|
||||
panKnob->setHintText( tr( "Panning:" ) + " ", "" );
|
||||
|
||||
knob * leftKnob = new knob( knobBright_26, this);
|
||||
leftKnob -> move( 20, 80 );
|
||||
leftKnob -> setVolumeKnob( true );
|
||||
leftKnob->setModel( &controls->m_leftModel );
|
||||
leftKnob->setLabel( tr( "LEFT" ) );
|
||||
leftKnob->setHintText( tr( "Left gain:" ) + " ", "%" );
|
||||
|
||||
knob * rightKnob = new knob( knobBright_26, this);
|
||||
rightKnob -> move( 60, 80 );
|
||||
rightKnob -> setVolumeKnob( true );
|
||||
rightKnob->setModel( &controls->m_rightModel );
|
||||
rightKnob->setLabel( tr( "RIGHT" ) );
|
||||
rightKnob->setHintText( tr( "Right gain:" ) + " ", "%" );
|
||||
}
|
||||
@@ -1,8 +1,9 @@
|
||||
/*
|
||||
* pch.h - file which is used for precompiled headers
|
||||
* AmplifierControlDialog.h - control dialog for amplifier effect
|
||||
*
|
||||
* Copyright (c) 2014 Vesa Kivimäki <contact/dot/diizy/at/nbl/dot/fi>
|
||||
* Copyright (c) 2006-2014 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,15 +23,23 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _PCH_H
|
||||
#define _PCH_H
|
||||
#ifndef AMPLIFIER_CONTROL_DIALOG_H
|
||||
#define AMPLIFIER_CONTROL_DIALOG_H
|
||||
|
||||
#include <Qt/QtCore>
|
||||
#include <Qt/QtGui>
|
||||
#include <Qt/QtXml>
|
||||
#include "EffectControlDialog.h"
|
||||
|
||||
#include <limits>
|
||||
|
||||
#include "Mixer.h"
|
||||
class AmplifierControls;
|
||||
|
||||
|
||||
class AmplifierControlDialog : public EffectControlDialog
|
||||
{
|
||||
public:
|
||||
AmplifierControlDialog( AmplifierControls* controls );
|
||||
virtual ~AmplifierControlDialog()
|
||||
{
|
||||
}
|
||||
|
||||
} ;
|
||||
|
||||
#endif
|
||||
82
plugins/Amplifier/AmplifierControls.cpp
Normal file
@@ -0,0 +1,82 @@
|
||||
/*
|
||||
* AmplifierControls.cpp - controls for amplifier effect
|
||||
*
|
||||
* Copyright (c) 2014 Vesa Kivimäki <contact/dot/diizy/at/nbl/dot/fi>
|
||||
* Copyright (c) 2008-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public
|
||||
* License along with this program (see COPYING); if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include <QtXml/QDomElement>
|
||||
|
||||
#include "AmplifierControls.h"
|
||||
#include "Amplifier.h"
|
||||
#include "engine.h"
|
||||
#include "song.h"
|
||||
|
||||
|
||||
AmplifierControls::AmplifierControls( AmplifierEffect* effect ) :
|
||||
EffectControls( effect ),
|
||||
m_effect( effect ),
|
||||
m_volumeModel( 100.0f, 0.0f, 200.0f, 0.1f, this, tr( "Volume" ) ),
|
||||
m_panModel( 0.0f, -100.0f, 100.0f, 0.1f, this, tr( "Panning" ) ),
|
||||
m_leftModel( 100.0f, 0.0f, 200.0f, 0.1f, this, tr( "Left gain" ) ),
|
||||
m_rightModel( 100.0f, 0.0f, 200.0f, 0.1f, this, tr( "Right gain" ) )
|
||||
{
|
||||
connect( &m_volumeModel, SIGNAL( dataChanged() ), this, SLOT( changeControl() ) );
|
||||
connect( &m_panModel, SIGNAL( dataChanged() ), this, SLOT( changeControl() ) );
|
||||
connect( &m_leftModel, SIGNAL( dataChanged() ), this, SLOT( changeControl() ) );
|
||||
connect( &m_rightModel, SIGNAL( dataChanged() ), this, SLOT( changeControl() ) );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void AmplifierControls::changeControl()
|
||||
{
|
||||
engine::getSong()->setModified();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void AmplifierControls::loadSettings( const QDomElement& _this )
|
||||
{
|
||||
m_volumeModel.loadSettings( _this, "volume" );
|
||||
m_panModel.loadSettings( _this, "pan" );
|
||||
m_leftModel.loadSettings( _this, "left" );
|
||||
m_rightModel.loadSettings( _this, "right" );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void AmplifierControls::saveSettings( QDomDocument& doc, QDomElement& _this )
|
||||
{
|
||||
m_volumeModel.saveSettings( doc, _this, "volume" );
|
||||
m_panModel.saveSettings( doc, _this, "pan" );
|
||||
m_leftModel.saveSettings( doc, _this, "left" );
|
||||
m_rightModel.saveSettings( doc, _this, "right" );
|
||||
}
|
||||
|
||||
|
||||
|
||||
#include "moc_AmplifierControls.cxx"
|
||||
|
||||
79
plugins/Amplifier/AmplifierControls.h
Normal file
@@ -0,0 +1,79 @@
|
||||
/*
|
||||
* AmplifierControls.h - controls for bassboosterx -effect
|
||||
*
|
||||
* Copyright (c) 2014 Vesa Kivimäki <contact/dot/diizy/at/nbl/dot/fi>
|
||||
* Copyright (c) 2008-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public
|
||||
* License along with this program (see COPYING); if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef AMPLIFIER_CONTROLS_H
|
||||
#define AMPLIFIER_CONTROLS_H
|
||||
|
||||
#include "EffectControls.h"
|
||||
#include "AmplifierControlDialog.h"
|
||||
#include "knob.h"
|
||||
|
||||
|
||||
class AmplifierEffect;
|
||||
|
||||
|
||||
class AmplifierControls : public EffectControls
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
AmplifierControls( AmplifierEffect* effect );
|
||||
virtual ~AmplifierControls()
|
||||
{
|
||||
}
|
||||
|
||||
virtual void saveSettings( QDomDocument & _doc, QDomElement & _parent );
|
||||
virtual void loadSettings( const QDomElement & _this );
|
||||
inline virtual QString nodeName() const
|
||||
{
|
||||
return "AmplifierControls";
|
||||
}
|
||||
|
||||
virtual int controlCount()
|
||||
{
|
||||
return 4;
|
||||
}
|
||||
|
||||
virtual EffectControlDialog* createView()
|
||||
{
|
||||
return new AmplifierControlDialog( this );
|
||||
}
|
||||
|
||||
|
||||
private slots:
|
||||
void changeControl();
|
||||
|
||||
private:
|
||||
AmplifierEffect* m_effect;
|
||||
FloatModel m_volumeModel;
|
||||
FloatModel m_panModel;
|
||||
FloatModel m_leftModel;
|
||||
FloatModel m_rightModel;
|
||||
|
||||
friend class AmplifierControlDialog;
|
||||
friend class AmplifierEffect;
|
||||
|
||||
} ;
|
||||
|
||||
#endif
|
||||
3
plugins/Amplifier/CMakeLists.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
INCLUDE(BuildPlugin)
|
||||
|
||||
BUILD_PLUGIN(amplifier Amplifier.cpp AmplifierControls.cpp AmplifierControlDialog.cpp MOCFILES AmplifierControls.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png")
|
||||
BIN
plugins/Amplifier/artwork.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
plugins/Amplifier/logo.png
Normal file
|
After Width: | Height: | Size: 3.1 KiB |
@@ -81,9 +81,9 @@ void BassBoosterControls::changeRatio()
|
||||
|
||||
void BassBoosterControls::loadSettings( const QDomElement& _this )
|
||||
{
|
||||
m_freqModel.setValue( _this.attribute( "freq" ).toFloat() );
|
||||
m_gainModel.setValue( _this.attribute( "gain" ).toFloat() );
|
||||
m_ratioModel.setValue( _this.attribute( "ratio" ).toFloat() );
|
||||
m_freqModel.loadSettings( _this, "freq" );
|
||||
m_gainModel.loadSettings( _this, "gain" );
|
||||
m_ratioModel.loadSettings( _this, "ratio");
|
||||
}
|
||||
|
||||
|
||||
@@ -91,9 +91,9 @@ void BassBoosterControls::loadSettings( const QDomElement& _this )
|
||||
|
||||
void BassBoosterControls::saveSettings( QDomDocument& doc, QDomElement& _this )
|
||||
{
|
||||
_this.setAttribute( "freq", m_freqModel.value() );
|
||||
_this.setAttribute( "gain", m_gainModel.value() );
|
||||
_this.setAttribute( "ratio", m_ratioModel.value() );
|
||||
m_freqModel.saveSettings( doc, _this, "freq" );
|
||||
m_gainModel.saveSettings( doc, _this, "gain" );
|
||||
m_ratioModel.saveSettings( doc, _this, "ratio");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 15 KiB |
@@ -1,6 +1,8 @@
|
||||
ADD_SUBDIRECTORY(Amplifier)
|
||||
ADD_SUBDIRECTORY(audio_file_processor)
|
||||
ADD_SUBDIRECTORY(BassBooster)
|
||||
ADD_SUBDIRECTORY(bit_invader)
|
||||
ADD_SUBDIRECTORY(DualFilter)
|
||||
ADD_SUBDIRECTORY(dynamics_processor)
|
||||
ADD_SUBDIRECTORY(flp_import)
|
||||
ADD_SUBDIRECTORY(HydrogenImport)
|
||||
@@ -10,8 +12,10 @@ ADD_SUBDIRECTORY(LadspaEffect)
|
||||
ADD_SUBDIRECTORY(lb302)
|
||||
#ADD_SUBDIRECTORY(lb303)
|
||||
ADD_SUBDIRECTORY(midi_import)
|
||||
IF(NOT LMMS_BUILD_APPLE)
|
||||
ADD_SUBDIRECTORY(opl2)
|
||||
ENDIF()
|
||||
ADD_SUBDIRECTORY(organic)
|
||||
ADD_SUBDIRECTORY(opl2)
|
||||
ADD_SUBDIRECTORY(papu)
|
||||
ADD_SUBDIRECTORY(patman)
|
||||
ADD_SUBDIRECTORY(peak_controller_effect)
|
||||
|
||||
3
plugins/DualFilter/CMakeLists.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
INCLUDE(BuildPlugin)
|
||||
|
||||
BUILD_PLUGIN(dualfilter DualFilter.cpp DualFilterControls.cpp DualFilterControlDialog.cpp MOCFILES DualFilterControls.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png")
|
||||
172
plugins/DualFilter/DualFilter.cpp
Normal file
@@ -0,0 +1,172 @@
|
||||
/*
|
||||
* DualFilter.cpp - A native dual filter effect plugin with two parallel filters
|
||||
*
|
||||
* Copyright (c) 2014 Vesa Kivimäki <contact/dot/diizy/at/nbl/dot/fi>
|
||||
* Copyright (c) 2006-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public
|
||||
* License along with this program (see COPYING); if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "DualFilter.h"
|
||||
|
||||
#include "embed.cpp"
|
||||
#include "basic_filters.h"
|
||||
|
||||
|
||||
extern "C"
|
||||
{
|
||||
|
||||
Plugin::Descriptor PLUGIN_EXPORT dualfilter_plugin_descriptor =
|
||||
{
|
||||
STRINGIFY( PLUGIN_NAME ),
|
||||
"Dual Filter",
|
||||
QT_TRANSLATE_NOOP( "pluginBrowser", "A native amplifier plugin" ),
|
||||
"Vesa Kivimäki <contact/dot/diizy/at/nbl/dot/fi>",
|
||||
0x0100,
|
||||
Plugin::Effect,
|
||||
new PluginPixmapLoader( "logo" ),
|
||||
NULL,
|
||||
NULL
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
DualFilterEffect::DualFilterEffect( Model* parent, const Descriptor::SubPluginFeatures::Key* key ) :
|
||||
Effect( &dualfilter_plugin_descriptor, parent, key ),
|
||||
m_dfControls( this )
|
||||
{
|
||||
m_filter1 = new basicFilters<2>( engine::mixer()->processingSampleRate() );
|
||||
m_filter2 = new basicFilters<2>( engine::mixer()->processingSampleRate() );
|
||||
|
||||
// ensure filters get updated
|
||||
m_filter1changed = true;
|
||||
m_filter2changed = true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
DualFilterEffect::~DualFilterEffect()
|
||||
{
|
||||
delete m_filter1;
|
||||
delete m_filter2;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
bool DualFilterEffect::processAudioBuffer( sampleFrame* buf, const fpp_t frames )
|
||||
{
|
||||
if( !isEnabled() || !isRunning () )
|
||||
{
|
||||
return( false );
|
||||
}
|
||||
|
||||
double outSum = 0.0;
|
||||
const float d = dryLevel();
|
||||
const float w = wetLevel();
|
||||
|
||||
m_filter1->setFilterType( m_dfControls.m_filter1Model.value() );
|
||||
m_filter2->setFilterType( m_dfControls.m_filter2Model.value() );
|
||||
|
||||
const bool enabled1 = m_dfControls.m_enabled1Model.value();
|
||||
const bool enabled2 = m_dfControls.m_enabled2Model.value();
|
||||
|
||||
// recalculate only when necessary
|
||||
if( enabled1 && m_filter1changed )
|
||||
{
|
||||
m_filter1->calcFilterCoeffs( m_dfControls.m_cut1Model.value(), m_dfControls.m_res1Model.value() );
|
||||
m_filter1changed = false;
|
||||
}
|
||||
if( enabled2 && m_filter2changed )
|
||||
{
|
||||
m_filter2->calcFilterCoeffs( m_dfControls.m_cut2Model.value(), m_dfControls.m_res2Model.value() );
|
||||
m_filter2changed = false;
|
||||
}
|
||||
|
||||
|
||||
// buffer processing loop
|
||||
for( fpp_t f = 0; f < frames; ++f )
|
||||
{
|
||||
sample_t s[2] = { 0.0f, 0.0f }; // mix
|
||||
sample_t s1[2] = { buf[f][0], buf[f][1] }; // filter 1
|
||||
sample_t s2[2] = { buf[f][0], buf[f][1] }; // filter 2
|
||||
|
||||
// get mix amounts for wet signals of both filters
|
||||
const float mix1 = 1.0f - ( ( m_dfControls.m_mixModel.value( f ) + 1.0f ) / 2.0f );
|
||||
const float mix2 = ( ( m_dfControls.m_mixModel.value( f ) + 1.0f ) / 2.0f );
|
||||
|
||||
// update filter 1
|
||||
if( enabled1 )
|
||||
{
|
||||
s1[0] = m_filter1->update( s1[0], 0 );
|
||||
s1[1] = m_filter1->update( s1[1], 1 );
|
||||
|
||||
// apply gain
|
||||
s1[0] *= ( m_dfControls.m_gain1Model.value( f ) / 100.0f );
|
||||
s1[1] *= ( m_dfControls.m_gain1Model.value( f ) / 100.0f );
|
||||
|
||||
// apply mix
|
||||
s[0] += ( s1[0] * mix1 );
|
||||
s[1] += ( s1[1] * mix1 );
|
||||
}
|
||||
|
||||
// update filter 2
|
||||
if( enabled2 )
|
||||
{
|
||||
s2[0] = m_filter2->update( s2[0], 0 );
|
||||
s2[1] = m_filter2->update( s2[1], 1 );
|
||||
|
||||
//apply gain
|
||||
s2[0] *= ( m_dfControls.m_gain2Model.value( f ) / 100.0f );
|
||||
s2[1] *= ( m_dfControls.m_gain2Model.value( f ) / 100.0f );
|
||||
|
||||
// apply mix
|
||||
s[0] += ( s2[0] * mix2 );
|
||||
s[1] += ( s2[1] * mix2 );
|
||||
}
|
||||
|
||||
// do another mix with dry signal
|
||||
buf[f][0] = d * buf[f][0] + w * s[0];
|
||||
buf[f][1] = d * buf[f][1] + w * s[1];
|
||||
outSum += buf[f][0]*buf[f][0] + buf[f][1]*buf[f][1];
|
||||
}
|
||||
|
||||
checkGate( outSum / frames );
|
||||
|
||||
return isRunning();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
extern "C"
|
||||
{
|
||||
|
||||
// necessary for getting instance out of shared lib
|
||||
Plugin * PLUGIN_EXPORT lmms_plugin_main( Model* parent, void* data )
|
||||
{
|
||||
return new DualFilterEffect( parent, static_cast<const Plugin::Descriptor::SubPluginFeatures::Key *>( data ) );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
60
plugins/DualFilter/DualFilter.h
Normal file
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* DualFilter.h - dual filter effect-plugin
|
||||
*
|
||||
* Copyright (c) 2014 Vesa Kivimäki <contact/dot/diizy/at/nbl/dot/fi>
|
||||
* Copyright (c) 2006-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public
|
||||
* License along with this program (see COPYING); if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#ifndef DUALFILTER_H
|
||||
#define DUALFILTER_H
|
||||
|
||||
#include "Effect.h"
|
||||
#include "DualFilterControls.h"
|
||||
#include "basic_filters.h"
|
||||
|
||||
class DualFilterEffect : public Effect
|
||||
{
|
||||
public:
|
||||
DualFilterEffect( Model* parent, const Descriptor::SubPluginFeatures::Key* key );
|
||||
virtual ~DualFilterEffect();
|
||||
virtual bool processAudioBuffer( sampleFrame* buf, const fpp_t frames );
|
||||
|
||||
virtual EffectControls* controls()
|
||||
{
|
||||
return &m_dfControls;
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
DualFilterControls m_dfControls;
|
||||
|
||||
basicFilters<2> * m_filter1;
|
||||
basicFilters<2> * m_filter2;
|
||||
|
||||
bool m_filter1changed;
|
||||
bool m_filter2changed;
|
||||
|
||||
friend class DualFilterControls;
|
||||
|
||||
} ;
|
||||
|
||||
#endif
|
||||
86
plugins/DualFilter/DualFilterControlDialog.cpp
Normal file
@@ -0,0 +1,86 @@
|
||||
/*
|
||||
* DualFilterControlDialog.cpp - control dialog for dual filter effect
|
||||
*
|
||||
* Copyright (c) 2014 Vesa Kivimäki <contact/dot/diizy/at/nbl/dot/fi>
|
||||
* Copyright (c) 2006-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public
|
||||
* License along with this program (see COPYING); if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <QtGui/QLayout>
|
||||
|
||||
#include "DualFilterControlDialog.h"
|
||||
#include "DualFilterControls.h"
|
||||
#include "embed.h"
|
||||
#include "led_checkbox.h"
|
||||
#include "combobox.h"
|
||||
#include "tooltip.h"
|
||||
#include "gui_templates.h"
|
||||
|
||||
#define makeknob( name, x, y, model, label, hint, unit ) \
|
||||
knob * name = new knob( knobBright_26, this); \
|
||||
name -> move( x, y ); \
|
||||
name ->setModel( &controls-> model ); \
|
||||
name ->setLabel( tr( label ) ); \
|
||||
name ->setHintText( tr( hint ) + " ", unit );
|
||||
|
||||
|
||||
|
||||
DualFilterControlDialog::DualFilterControlDialog( DualFilterControls* controls ) :
|
||||
EffectControlDialog( controls )
|
||||
{
|
||||
setAutoFillBackground( true );
|
||||
QPalette pal;
|
||||
pal.setBrush( backgroundRole(), PLUGIN_NAME::getIconPixmap( "artwork" ) );
|
||||
setPalette( pal );
|
||||
setFixedSize( 150, 220 );
|
||||
|
||||
makeknob( cut1Knob, 33, 30, m_cut1Model, "FREQ", "Cutoff frequency", "Hz" )
|
||||
makeknob( res1Knob, 75, 30, m_res1Model, "RESO", "Resonance", "" )
|
||||
makeknob( gain1Knob, 117, 30, m_gain1Model, "GAIN", "Gain", "%" )
|
||||
makeknob( mixKnob, 62, 100, m_mixModel, "MIX", "Mix", "" )
|
||||
makeknob( cut2Knob, 33, 145, m_cut2Model, "FREQ", "Cutoff frequency", "Hz" )
|
||||
makeknob( res2Knob, 75, 145, m_res2Model, "RESO", "Resonance", "" )
|
||||
makeknob( gain2Knob, 117, 145, m_gain2Model, "GAIN", "Gain", "%" )
|
||||
|
||||
gain1Knob-> setVolumeKnob( true );
|
||||
gain2Knob-> setVolumeKnob( true );
|
||||
|
||||
ledCheckBox * enabled1Toggle = new ledCheckBox( "", this,
|
||||
tr( "Filter 1 enabled" ), ledCheckBox::Green );
|
||||
ledCheckBox * enabled2Toggle = new ledCheckBox( "", this,
|
||||
tr( "Filter 2 enabled" ), ledCheckBox::Green );
|
||||
|
||||
enabled1Toggle -> move( 5, 30 );
|
||||
enabled1Toggle -> setModel( &controls -> m_enabled1Model );
|
||||
toolTip::add( enabled1Toggle, tr( "Click to enable/disable Filter 1" ) );
|
||||
enabled2Toggle -> move( 5, 145 );
|
||||
enabled2Toggle -> setModel( &controls -> m_enabled2Model );
|
||||
toolTip::add( enabled2Toggle, tr( "Click to enable/disable Filter 2" ) );
|
||||
|
||||
comboBox * m_filter1ComboBox = new comboBox( this );
|
||||
m_filter1ComboBox->setGeometry( 5, 70, 140, 22 );
|
||||
m_filter1ComboBox->setFont( pointSize<8>( m_filter1ComboBox->font() ) );
|
||||
m_filter1ComboBox->setModel( &controls->m_filter1Model );
|
||||
|
||||
comboBox * m_filter2ComboBox = new comboBox( this );
|
||||
m_filter2ComboBox->setGeometry( 5, 185, 140, 22 );
|
||||
m_filter2ComboBox->setFont( pointSize<8>( m_filter2ComboBox->font() ) );
|
||||
m_filter2ComboBox->setModel( &controls->m_filter2Model );
|
||||
}
|
||||
45
plugins/DualFilter/DualFilterControlDialog.h
Normal file
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* DualFilterControlDialog.h - control dialog for dual filter effect
|
||||
*
|
||||
* Copyright (c) 2014 Vesa Kivimäki <contact/dot/diizy/at/nbl/dot/fi>
|
||||
* Copyright (c) 2006-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public
|
||||
* License along with this program (see COPYING); if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef DUALFILTER_CONTROL_DIALOG_H
|
||||
#define DUALFILTER_CONTROL_DIALOG_H
|
||||
|
||||
#include "EffectControlDialog.h"
|
||||
|
||||
|
||||
class DualFilterControls;
|
||||
|
||||
|
||||
class DualFilterControlDialog : public EffectControlDialog
|
||||
{
|
||||
public:
|
||||
DualFilterControlDialog( DualFilterControls* controls );
|
||||
virtual ~DualFilterControlDialog()
|
||||
{
|
||||
}
|
||||
|
||||
} ;
|
||||
|
||||
#endif
|
||||
167
plugins/DualFilter/DualFilterControls.cpp
Normal file
@@ -0,0 +1,167 @@
|
||||
/*
|
||||
* DualFilterControls.cpp - controls for dual filter effect
|
||||
*
|
||||
* Copyright (c) 2014 Vesa Kivimäki <contact/dot/diizy/at/nbl/dot/fi>
|
||||
* Copyright (c) 2008-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public
|
||||
* License along with this program (see COPYING); if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include <QtXml/QDomElement>
|
||||
|
||||
#include "DualFilterControls.h"
|
||||
#include "DualFilter.h"
|
||||
#include "engine.h"
|
||||
#include "song.h"
|
||||
#include "basic_filters.h"
|
||||
#include "embed.h"
|
||||
|
||||
DualFilterControls::DualFilterControls( DualFilterEffect* effect ) :
|
||||
EffectControls( effect ),
|
||||
m_effect( effect ),
|
||||
|
||||
m_enabled1Model( true, this, tr( "Filter 1 enabled" ) ),
|
||||
m_filter1Model( this, tr( "Filter 1 type" ) ),
|
||||
m_cut1Model( 7000.0f, 1.0f, 14000.0f, 1.0f, this, tr( "Cutoff 1 frequency" ) ),
|
||||
m_res1Model( 0.5, basicFilters<0>::minQ(), 10.0, 0.01, this, tr( "Q/Resonance 1" ) ),
|
||||
m_gain1Model( 100.0f, 0.0f, 200.0f, 0.1f, this, tr( "Gain 1" ) ),
|
||||
|
||||
m_mixModel( 0.0f, -1.0f, 1.0f, 0.01f, this, tr( "Mix" ) ),
|
||||
|
||||
m_enabled2Model( true, this, tr( "Filter 2 enabled" ) ),
|
||||
m_filter2Model( this, tr( "Filter 2 type" ) ),
|
||||
m_cut2Model( 7000.0f, 1.0f, 14000.0f, 1.0f, this, tr( "Cutoff 2 frequency" ) ),
|
||||
m_res2Model( 0.5, basicFilters<0>::minQ(), 10.0, 0.01, this, tr( "Q/Resonance 2" ) ),
|
||||
m_gain2Model( 100.0f, 0.0f, 200.0f, 0.1f, this, tr( "Gain 2" ) )
|
||||
{
|
||||
connect( &m_filter1Model, SIGNAL( dataChanged() ), this, SLOT( updateFilter1() ) );
|
||||
connect( &m_cut1Model, SIGNAL( dataChanged() ), this, SLOT( updateFilter1() ) );
|
||||
connect( &m_res1Model, SIGNAL( dataChanged() ), this, SLOT( updateFilter1() ) );
|
||||
|
||||
connect( &m_filter2Model, SIGNAL( dataChanged() ), this, SLOT( updateFilter2() ) );
|
||||
connect( &m_cut2Model, SIGNAL( dataChanged() ), this, SLOT( updateFilter2() ) );
|
||||
connect( &m_res2Model, SIGNAL( dataChanged() ), this, SLOT( updateFilter2() ) );
|
||||
|
||||
m_filter1Model.addItem( tr( "LowPass" ), new PixmapLoader( "filter_lp" ) );
|
||||
m_filter1Model.addItem( tr( "HiPass" ), new PixmapLoader( "filter_hp" ) );
|
||||
m_filter1Model.addItem( tr( "BandPass csg" ), new PixmapLoader( "filter_bp" ) );
|
||||
m_filter1Model.addItem( tr( "BandPass czpg" ), new PixmapLoader( "filter_bp" ) );
|
||||
m_filter1Model.addItem( tr( "Notch" ), new PixmapLoader( "filter_notch" ) );
|
||||
m_filter1Model.addItem( tr( "Allpass" ), new PixmapLoader( "filter_ap" ) );
|
||||
m_filter1Model.addItem( tr( "Moog" ), new PixmapLoader( "filter_lp" ) );
|
||||
m_filter1Model.addItem( tr( "2x LowPass" ), new PixmapLoader( "filter_2lp" ) );
|
||||
m_filter1Model.addItem( tr( "RC LowPass 12dB" ), new PixmapLoader( "filter_lp" ) );
|
||||
m_filter1Model.addItem( tr( "RC BandPass 12dB" ), new PixmapLoader( "filter_bp" ) );
|
||||
m_filter1Model.addItem( tr( "RC HighPass 12dB" ), new PixmapLoader( "filter_hp" ) );
|
||||
m_filter1Model.addItem( tr( "RC LowPass 24dB" ), new PixmapLoader( "filter_lp" ) );
|
||||
m_filter1Model.addItem( tr( "RC BandPass 24dB" ), new PixmapLoader( "filter_bp" ) );
|
||||
m_filter1Model.addItem( tr( "RC HighPass 24dB" ), new PixmapLoader( "filter_hp" ) );
|
||||
m_filter1Model.addItem( tr( "Vocal Formant Filter" ), new PixmapLoader( "filter_hp" ) );
|
||||
|
||||
m_filter2Model.addItem( tr( "LowPass" ), new PixmapLoader( "filter_lp" ) );
|
||||
m_filter2Model.addItem( tr( "HiPass" ), new PixmapLoader( "filter_hp" ) );
|
||||
m_filter2Model.addItem( tr( "BandPass csg" ), new PixmapLoader( "filter_bp" ) );
|
||||
m_filter2Model.addItem( tr( "BandPass czpg" ), new PixmapLoader( "filter_bp" ) );
|
||||
m_filter2Model.addItem( tr( "Notch" ), new PixmapLoader( "filter_notch" ) );
|
||||
m_filter2Model.addItem( tr( "Allpass" ), new PixmapLoader( "filter_ap" ) );
|
||||
m_filter2Model.addItem( tr( "Moog" ), new PixmapLoader( "filter_lp" ) );
|
||||
m_filter2Model.addItem( tr( "2x LowPass" ), new PixmapLoader( "filter_2lp" ) );
|
||||
m_filter2Model.addItem( tr( "RC LowPass 12dB" ), new PixmapLoader( "filter_lp" ) );
|
||||
m_filter2Model.addItem( tr( "RC BandPass 12dB" ), new PixmapLoader( "filter_bp" ) );
|
||||
m_filter2Model.addItem( tr( "RC HighPass 12dB" ), new PixmapLoader( "filter_hp" ) );
|
||||
m_filter2Model.addItem( tr( "RC LowPass 24dB" ), new PixmapLoader( "filter_lp" ) );
|
||||
m_filter2Model.addItem( tr( "RC BandPass 24dB" ), new PixmapLoader( "filter_bp" ) );
|
||||
m_filter2Model.addItem( tr( "RC HighPass 24dB" ), new PixmapLoader( "filter_hp" ) );
|
||||
m_filter2Model.addItem( tr( "Vocal Formant Filter" ), new PixmapLoader( "filter_hp" ) );
|
||||
|
||||
connect( engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( updateFilters() ) );
|
||||
}
|
||||
|
||||
|
||||
|
||||
void DualFilterControls::updateFilter1()
|
||||
{
|
||||
m_effect->m_filter1changed = true;
|
||||
}
|
||||
|
||||
void DualFilterControls::updateFilter2()
|
||||
{
|
||||
m_effect->m_filter2changed = true;
|
||||
}
|
||||
|
||||
|
||||
void DualFilterControls::updateFilters()
|
||||
{
|
||||
// swap filters to new ones
|
||||
|
||||
delete m_effect->m_filter1;
|
||||
delete m_effect->m_filter2;
|
||||
m_effect->m_filter1 = new basicFilters<2>( engine::mixer()->processingSampleRate() );
|
||||
m_effect->m_filter2 = new basicFilters<2>( engine::mixer()->processingSampleRate() );
|
||||
|
||||
// flag filters as needing recalculation
|
||||
|
||||
updateFilter1();
|
||||
updateFilter2();
|
||||
}
|
||||
|
||||
|
||||
|
||||
void DualFilterControls::loadSettings( const QDomElement& _this )
|
||||
{
|
||||
m_enabled1Model.loadSettings( _this, "enabled1" );
|
||||
m_filter1Model.loadSettings( _this, "filter1" );
|
||||
m_cut1Model.loadSettings( _this, "cut1" );
|
||||
m_res1Model.loadSettings( _this, "res1" );
|
||||
m_gain1Model.loadSettings( _this, "gain1" );
|
||||
|
||||
m_mixModel.loadSettings( _this, "mix" );
|
||||
|
||||
m_enabled2Model.loadSettings( _this, "enabled2" );
|
||||
m_filter2Model.loadSettings( _this, "filter2" );
|
||||
m_cut2Model.loadSettings( _this, "cut2" );
|
||||
m_res2Model.loadSettings( _this, "res2" );
|
||||
m_gain2Model.loadSettings( _this, "gain2" );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void DualFilterControls::saveSettings( QDomDocument& _doc, QDomElement& _this )
|
||||
{
|
||||
m_enabled1Model.saveSettings( _doc, _this, "enabled1" );
|
||||
m_filter1Model.saveSettings( _doc, _this, "filter1" );
|
||||
m_cut1Model.saveSettings( _doc, _this, "cut1" );
|
||||
m_res1Model.saveSettings( _doc, _this, "res1" );
|
||||
m_gain1Model.saveSettings( _doc, _this, "gain1" );
|
||||
|
||||
m_mixModel.saveSettings( _doc, _this, "mix" );
|
||||
|
||||
m_enabled2Model.saveSettings( _doc, _this, "enabled2" );
|
||||
m_filter2Model.saveSettings( _doc, _this, "filter2" );
|
||||
m_cut2Model.saveSettings( _doc, _this, "cut2" );
|
||||
m_res2Model.saveSettings( _doc, _this, "res2" );
|
||||
m_gain2Model.saveSettings( _doc, _this, "gain2" );
|
||||
}
|
||||
|
||||
|
||||
|
||||
#include "moc_DualFilterControls.cxx"
|
||||
|
||||
91
plugins/DualFilter/DualFilterControls.h
Normal file
@@ -0,0 +1,91 @@
|
||||
/*
|
||||
* DualFilterControls.h - controls for dual filter -effect
|
||||
*
|
||||
* Copyright (c) 2014 Vesa Kivimäki <contact/dot/diizy/at/nbl/dot/fi>
|
||||
* Copyright (c) 2008-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public
|
||||
* License along with this program (see COPYING); if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef DUALFILTER_CONTROLS_H
|
||||
#define DUALFILTER_CONTROLS_H
|
||||
|
||||
#include "EffectControls.h"
|
||||
#include "DualFilterControlDialog.h"
|
||||
#include "knob.h"
|
||||
#include "ComboBoxModel.h"
|
||||
|
||||
class DualFilterEffect;
|
||||
|
||||
|
||||
class DualFilterControls : public EffectControls
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
DualFilterControls( DualFilterEffect* effect );
|
||||
virtual ~DualFilterControls()
|
||||
{
|
||||
}
|
||||
|
||||
virtual void saveSettings( QDomDocument & _doc, QDomElement & _parent );
|
||||
virtual void loadSettings( const QDomElement & _this );
|
||||
inline virtual QString nodeName() const
|
||||
{
|
||||
return "DualFilterControls";
|
||||
}
|
||||
|
||||
virtual int controlCount()
|
||||
{
|
||||
return 11;
|
||||
}
|
||||
|
||||
virtual EffectControlDialog* createView()
|
||||
{
|
||||
return new DualFilterControlDialog( this );
|
||||
}
|
||||
|
||||
|
||||
private slots:
|
||||
void updateFilter1();
|
||||
void updateFilter2();
|
||||
void updateFilters();
|
||||
|
||||
private:
|
||||
DualFilterEffect* m_effect;
|
||||
|
||||
BoolModel m_enabled1Model;
|
||||
ComboBoxModel m_filter1Model;
|
||||
FloatModel m_cut1Model;
|
||||
FloatModel m_res1Model;
|
||||
FloatModel m_gain1Model;
|
||||
|
||||
FloatModel m_mixModel;
|
||||
|
||||
BoolModel m_enabled2Model;
|
||||
ComboBoxModel m_filter2Model;
|
||||
FloatModel m_cut2Model;
|
||||
FloatModel m_res2Model;
|
||||
FloatModel m_gain2Model;
|
||||
|
||||
friend class DualFilterControlDialog;
|
||||
friend class DualFilterEffect;
|
||||
|
||||
} ;
|
||||
|
||||
#endif
|
||||
BIN
plugins/DualFilter/artwork.png
Normal file
|
After Width: | Height: | Size: 39 KiB |
@@ -8,9 +8,9 @@ INSTALL(TARGETS calf LIBRARY DESTINATION "${PLUGIN_DIR}/ladspa")
|
||||
SET_TARGET_PROPERTIES(calf PROPERTIES PREFIX "")
|
||||
SET(INLINE_FLAGS "")
|
||||
IF(NOT LMMS_BUILD_APPLE)
|
||||
SET(INLINE_FLAGS "-finline-functions-called-once")
|
||||
SET(INLINE_FLAGS "-finline-functions-called-once -finline-limit=80")
|
||||
ENDIF(NOT LMMS_BUILD_APPLE)
|
||||
SET_TARGET_PROPERTIES(calf PROPERTIES COMPILE_FLAGS "-O2 -finline-limit=80 -finline-functions ${INLINE_FLAGS}")
|
||||
SET_TARGET_PROPERTIES(calf PROPERTIES COMPILE_FLAGS "-O2 -finline-functions ${INLINE_FLAGS}")
|
||||
|
||||
IF(LMMS_BUILD_WIN32)
|
||||
ADD_CUSTOM_COMMAND(TARGET calf POST_BUILD COMMAND "${STRIP}" "\"${CMAKE_CURRENT_BINARY_DIR}/calf.dll\"")
|
||||
|
||||
@@ -153,7 +153,7 @@ void copy_buf(T &dest_buf, const U &src_buf, T scale = 1, T add = 0) {
|
||||
typedef typename T::data_type data_type;
|
||||
data_type *dest = dest_buf.data();
|
||||
const data_type *src = src_buf.data();
|
||||
int size = src.size();
|
||||
int size = src_buf.size();
|
||||
for (int i=0; i<size; i++)
|
||||
*dest++ = (*src++) * scale + add;
|
||||
}
|
||||
|
||||
@@ -216,7 +216,7 @@ public:
|
||||
}
|
||||
|
||||
template<class U, int UseBits>
|
||||
inline U lerp_table_lookup_int(U data[(1<<IntBits)+1]) const {
|
||||
inline U lerp_table_lookup_int(U data[(unsigned int)(1<<IntBits)+1]) const {
|
||||
unsigned int pos = uipart();
|
||||
return lerp_by_fract_int<U, UseBits>(data[pos], data[pos+1]);
|
||||
}
|
||||
@@ -224,19 +224,19 @@ public:
|
||||
/// Untested... I've started it to get a sin/cos readout for rotaryorgan, but decided to use table-less solution instead
|
||||
/// Do not assume it works, because it most probably doesn't
|
||||
template<class U, int UseBits>
|
||||
inline U lerp_table_lookup_int_shift(U data[(1<<IntBits)+1], unsigned int shift) {
|
||||
inline U lerp_table_lookup_int_shift(U data[(unsigned int)(1<<IntBits)+1], unsigned int shift) {
|
||||
unsigned int pos = (uipart() + shift) & ((1 << IntBits) - 1);
|
||||
return lerp_by_fract_int<U, UseBits>(data[pos], data[pos+1]);
|
||||
}
|
||||
|
||||
template<class U>
|
||||
inline U lerp_table_lookup_float(U data[(1<<IntBits)+1]) const {
|
||||
inline U lerp_table_lookup_float(U data[(unsigned int)(1<<IntBits)+1]) const {
|
||||
unsigned int pos = uipart();
|
||||
return data[pos] + (data[pos+1]-data[pos]) * fpart_as_double();
|
||||
}
|
||||
|
||||
template<class U>
|
||||
inline U lerp_table_lookup_float_mask(U data[(1<<IntBits)+1], unsigned int mask) const {
|
||||
inline U lerp_table_lookup_float_mask(U data[(unsigned int)(1<<IntBits)+1], unsigned int mask) const {
|
||||
unsigned int pos = ui64part() & mask;
|
||||
// printf("full = %lld pos = %d + %f\n", value, pos, fpart_as_double());
|
||||
return data[pos] + (data[pos+1]-data[pos]) * fpart_as_double();
|
||||
|
||||
@@ -70,7 +70,7 @@ seed()
|
||||
extern "C" {
|
||||
|
||||
__attribute__ ((constructor))
|
||||
void _init()
|
||||
void caps_so_init()
|
||||
{
|
||||
DescriptorStub ** d = descriptors;
|
||||
|
||||
@@ -126,7 +126,7 @@ void _init()
|
||||
}
|
||||
|
||||
__attribute__ ((destructor))
|
||||
void _fini()
|
||||
void caps_so_fini()
|
||||
{
|
||||
for (ulong i = 0; i < N; ++i)
|
||||
delete descriptors[i];
|
||||
|
||||
@@ -233,10 +233,10 @@ LADSPA_Descriptor * mono_descriptor = NULL;
|
||||
|
||||
|
||||
|
||||
/* __attribute__((constructor)) _init() is called automatically when the plugin library is first
|
||||
/* _init() is called automatically when the plugin library is first
|
||||
loaded. */
|
||||
void
|
||||
__attribute__((constructor)) _init() {
|
||||
_init() {
|
||||
|
||||
int i;
|
||||
char ** port_names;
|
||||
@@ -341,9 +341,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) {
|
||||
}
|
||||
|
||||
|
||||
/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */
|
||||
/* _fini() is called automatically when the library is unloaded. */
|
||||
void
|
||||
__attribute__((destructor)) _fini() {
|
||||
_fini() {
|
||||
delete_descriptor(mono_descriptor);
|
||||
}
|
||||
|
||||
|
||||
@@ -436,10 +436,10 @@ LADSPA_Descriptor * stereo_descriptor = NULL;
|
||||
|
||||
|
||||
|
||||
/* __attribute__((constructor)) _init() is called automatically when the plugin library is first
|
||||
/* _init() is called automatically when the plugin library is first
|
||||
loaded. */
|
||||
void
|
||||
__attribute__((constructor)) _init() {
|
||||
_init() {
|
||||
|
||||
char ** port_names;
|
||||
LADSPA_PortDescriptor * port_descriptors;
|
||||
@@ -575,9 +575,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) {
|
||||
}
|
||||
|
||||
|
||||
/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */
|
||||
/* _fini() is called automatically when the library is unloaded. */
|
||||
void
|
||||
__attribute__((destructor)) _fini() {
|
||||
_fini() {
|
||||
delete_descriptor(stereo_descriptor);
|
||||
}
|
||||
|
||||
|
||||
@@ -349,10 +349,10 @@ LADSPA_Descriptor * mono_descriptor = NULL;
|
||||
|
||||
|
||||
|
||||
/* __attribute__((constructor)) _init() is called automatically when the plugin library is first
|
||||
/* _init() is called automatically when the plugin library is first
|
||||
loaded. */
|
||||
void
|
||||
__attribute__((constructor)) _init() {
|
||||
_init() {
|
||||
|
||||
int i;
|
||||
char ** port_names;
|
||||
@@ -471,9 +471,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) {
|
||||
}
|
||||
|
||||
|
||||
/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */
|
||||
/* _fini() is called automatically when the library is unloaded. */
|
||||
void
|
||||
__attribute__((destructor)) _fini() {
|
||||
_fini() {
|
||||
delete_descriptor(mono_descriptor);
|
||||
}
|
||||
|
||||
|
||||
@@ -574,10 +574,10 @@ LADSPA_Descriptor * stereo_descriptor = NULL;
|
||||
|
||||
|
||||
|
||||
/* __attribute__((constructor)) _init() is called automatically when the plugin library is first
|
||||
/* _init() is called automatically when the plugin library is first
|
||||
loaded. */
|
||||
void
|
||||
__attribute__((constructor)) _init() {
|
||||
_init() {
|
||||
|
||||
char ** port_names;
|
||||
LADSPA_PortDescriptor * port_descriptors;
|
||||
@@ -717,9 +717,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) {
|
||||
}
|
||||
|
||||
|
||||
/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */
|
||||
/* _fini() is called automatically when the library is unloaded. */
|
||||
void
|
||||
__attribute__((destructor)) _fini() {
|
||||
_fini() {
|
||||
delete_descriptor(stereo_descriptor);
|
||||
}
|
||||
|
||||
|
||||
@@ -516,10 +516,10 @@ LADSPA_Descriptor * mono_descriptor = NULL;
|
||||
|
||||
|
||||
|
||||
/* __attribute__((constructor)) _init() is called automatically when the plugin library is first
|
||||
/* _init() is called automatically when the plugin library is first
|
||||
loaded. */
|
||||
void
|
||||
__attribute__((constructor)) _init() {
|
||||
_init() {
|
||||
|
||||
char ** port_names;
|
||||
LADSPA_PortDescriptor * port_descriptors;
|
||||
@@ -646,9 +646,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) {
|
||||
}
|
||||
|
||||
|
||||
/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */
|
||||
/* _fini() is called automatically when the library is unloaded. */
|
||||
void
|
||||
__attribute__((destructor)) _fini() {
|
||||
_fini() {
|
||||
delete_descriptor(mono_descriptor);
|
||||
}
|
||||
|
||||
|
||||
@@ -696,10 +696,10 @@ LADSPA_Descriptor * stereo_descriptor = NULL;
|
||||
|
||||
|
||||
|
||||
/* __attribute__((constructor)) _init() is called automatically when the plugin library is first
|
||||
/* _init() is called automatically when the plugin library is first
|
||||
loaded. */
|
||||
void
|
||||
__attribute__((constructor)) _init() {
|
||||
_init() {
|
||||
|
||||
char ** port_names;
|
||||
LADSPA_PortDescriptor * port_descriptors;
|
||||
@@ -857,9 +857,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) {
|
||||
}
|
||||
|
||||
|
||||
/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */
|
||||
/* _fini() is called automatically when the library is unloaded. */
|
||||
void
|
||||
__attribute__((destructor)) _fini() {
|
||||
_fini() {
|
||||
delete_descriptor(stereo_descriptor);
|
||||
}
|
||||
|
||||
|
||||
@@ -436,10 +436,10 @@ LADSPA_Descriptor * stereo_descriptor = NULL;
|
||||
|
||||
|
||||
|
||||
/* __attribute__((constructor)) _init() is called automatically when the plugin library is first
|
||||
/* _init() is called automatically when the plugin library is first
|
||||
loaded. */
|
||||
void
|
||||
__attribute__((constructor)) _init() {
|
||||
_init() {
|
||||
|
||||
char ** port_names;
|
||||
LADSPA_PortDescriptor * port_descriptors;
|
||||
@@ -607,9 +607,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) {
|
||||
}
|
||||
|
||||
|
||||
/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */
|
||||
/* _fini() is called automatically when the library is unloaded. */
|
||||
void
|
||||
__attribute__((destructor)) _fini() {
|
||||
_fini() {
|
||||
delete_descriptor(stereo_descriptor);
|
||||
}
|
||||
|
||||
|
||||
@@ -494,7 +494,7 @@ run_adding_eq(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
|
||||
|
||||
void
|
||||
__attribute__((constructor)) _init() {
|
||||
_init() {
|
||||
|
||||
char **port_names;
|
||||
LADSPA_PortDescriptor *port_descriptors;
|
||||
@@ -765,7 +765,7 @@ __attribute__((constructor)) _init() {
|
||||
|
||||
|
||||
void
|
||||
__attribute__((destructor)) _fini() {
|
||||
_fini() {
|
||||
|
||||
if (eqDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)eqDescriptor->PortDescriptors);
|
||||
|
||||
@@ -596,7 +596,7 @@ run_adding_eq(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
|
||||
|
||||
void
|
||||
__attribute__((constructor)) _init() {
|
||||
_init() {
|
||||
|
||||
char **port_names;
|
||||
LADSPA_PortDescriptor *port_descriptors;
|
||||
@@ -955,7 +955,7 @@ __attribute__((constructor)) _init() {
|
||||
|
||||
|
||||
void
|
||||
__attribute__((destructor)) _fini() {
|
||||
_fini() {
|
||||
|
||||
if (eqDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)eqDescriptor->PortDescriptors);
|
||||
|
||||
@@ -324,10 +324,10 @@ LADSPA_Descriptor * mono_descriptor = NULL;
|
||||
|
||||
|
||||
|
||||
/* __attribute__((constructor)) _init() is called automatically when the plugin library is first
|
||||
/* _init() is called automatically when the plugin library is first
|
||||
loaded. */
|
||||
void
|
||||
__attribute__((constructor)) _init() {
|
||||
_init() {
|
||||
|
||||
char ** port_names;
|
||||
LADSPA_PortDescriptor * port_descriptors;
|
||||
@@ -423,9 +423,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) {
|
||||
}
|
||||
|
||||
|
||||
/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */
|
||||
/* _fini() is called automatically when the library is unloaded. */
|
||||
void
|
||||
__attribute__((destructor)) _fini() {
|
||||
_fini() {
|
||||
delete_descriptor(mono_descriptor);
|
||||
}
|
||||
|
||||
|
||||
@@ -225,10 +225,10 @@ LADSPA_Descriptor * mono_descriptor = NULL;
|
||||
|
||||
|
||||
|
||||
/* __attribute__((constructor)) _init() is called automatically when the plugin library is first
|
||||
/* _init() is called automatically when the plugin library is first
|
||||
loaded. */
|
||||
void
|
||||
__attribute__((constructor)) _init() {
|
||||
_init() {
|
||||
|
||||
char ** port_names;
|
||||
LADSPA_PortDescriptor * port_descriptors;
|
||||
@@ -325,9 +325,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) {
|
||||
}
|
||||
|
||||
|
||||
/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */
|
||||
/* _fini() is called automatically when the library is unloaded. */
|
||||
void
|
||||
__attribute__((destructor)) _fini() {
|
||||
_fini() {
|
||||
delete_descriptor(mono_descriptor);
|
||||
}
|
||||
|
||||
|
||||
@@ -418,10 +418,10 @@ LADSPA_Descriptor * mono_descriptor = NULL;
|
||||
|
||||
|
||||
|
||||
/* __attribute__((constructor)) _init() is called automatically when the plugin library is first
|
||||
/* _init() is called automatically when the plugin library is first
|
||||
loaded. */
|
||||
void
|
||||
__attribute__((constructor)) _init() {
|
||||
_init() {
|
||||
|
||||
int i;
|
||||
char ** port_names;
|
||||
@@ -536,9 +536,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) {
|
||||
}
|
||||
|
||||
|
||||
/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */
|
||||
/* _fini() is called automatically when the library is unloaded. */
|
||||
void
|
||||
__attribute__((destructor)) _fini() {
|
||||
_fini() {
|
||||
delete_descriptor(mono_descriptor);
|
||||
}
|
||||
|
||||
|
||||
@@ -378,10 +378,10 @@ LADSPA_Descriptor * mono_descriptor = NULL;
|
||||
|
||||
|
||||
|
||||
/* __attribute__((constructor)) _init() is called automatically when the plugin library is first
|
||||
/* _init() is called automatically when the plugin library is first
|
||||
loaded. */
|
||||
void
|
||||
__attribute__((constructor)) _init() {
|
||||
_init() {
|
||||
|
||||
int i;
|
||||
char ** port_names;
|
||||
@@ -480,9 +480,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) {
|
||||
}
|
||||
|
||||
|
||||
/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */
|
||||
/* _fini() is called automatically when the library is unloaded. */
|
||||
void
|
||||
__attribute__((destructor)) _fini() {
|
||||
_fini() {
|
||||
delete_descriptor(mono_descriptor);
|
||||
}
|
||||
|
||||
|
||||
@@ -665,10 +665,10 @@ LADSPA_Descriptor * stereo_descriptor = NULL;
|
||||
|
||||
|
||||
|
||||
/* __attribute__((constructor)) _init() is called automatically when the plugin library is first
|
||||
/* _init() is called automatically when the plugin library is first
|
||||
loaded. */
|
||||
void
|
||||
__attribute__((constructor)) _init() {
|
||||
_init() {
|
||||
|
||||
char ** port_names;
|
||||
LADSPA_PortDescriptor * port_descriptors;
|
||||
@@ -815,9 +815,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) {
|
||||
}
|
||||
|
||||
|
||||
/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */
|
||||
/* _fini() is called automatically when the library is unloaded. */
|
||||
void
|
||||
__attribute__((destructor)) _fini() {
|
||||
_fini() {
|
||||
delete_descriptor(stereo_descriptor);
|
||||
}
|
||||
|
||||
|
||||
@@ -624,10 +624,10 @@ LADSPA_Descriptor * stereo_descriptor = NULL;
|
||||
|
||||
|
||||
|
||||
/* __attribute__((constructor)) _init() is called automatically when the plugin library is first
|
||||
/* _init() is called automatically when the plugin library is first
|
||||
loaded. */
|
||||
void
|
||||
__attribute__((constructor)) _init() {
|
||||
_init() {
|
||||
|
||||
int i;
|
||||
char ** port_names;
|
||||
@@ -748,9 +748,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) {
|
||||
}
|
||||
|
||||
|
||||
/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */
|
||||
/* _fini() is called automatically when the library is unloaded. */
|
||||
void
|
||||
__attribute__((destructor)) _fini() {
|
||||
_fini() {
|
||||
delete_descriptor(stereo_descriptor);
|
||||
}
|
||||
|
||||
|
||||
@@ -228,10 +228,10 @@ cleanup_Sigmoid(LADSPA_Handle Instance) {
|
||||
LADSPA_Descriptor * mono_descriptor = NULL;
|
||||
|
||||
|
||||
/* __attribute__((constructor)) _init() is called automatically when the plugin library is first
|
||||
/* _init() is called automatically when the plugin library is first
|
||||
loaded. */
|
||||
void
|
||||
__attribute__((constructor)) _init() {
|
||||
_init() {
|
||||
|
||||
char ** port_names;
|
||||
LADSPA_PortDescriptor * port_descriptors;
|
||||
@@ -318,9 +318,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) {
|
||||
}
|
||||
|
||||
|
||||
/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */
|
||||
/* _fini() is called automatically when the library is unloaded. */
|
||||
void
|
||||
__attribute__((destructor)) _fini() {
|
||||
_fini() {
|
||||
delete_descriptor(mono_descriptor);
|
||||
}
|
||||
|
||||
|
||||
@@ -220,10 +220,10 @@ LADSPA_Descriptor * mono_descriptor = NULL;
|
||||
|
||||
|
||||
|
||||
/* __attribute__((constructor)) _init() is called automatically when the plugin library is first
|
||||
/* _init() is called automatically when the plugin library is first
|
||||
loaded. */
|
||||
void
|
||||
__attribute__((constructor)) _init() {
|
||||
_init() {
|
||||
|
||||
char ** port_names;
|
||||
LADSPA_PortDescriptor * port_descriptors;
|
||||
@@ -323,9 +323,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) {
|
||||
}
|
||||
|
||||
|
||||
/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */
|
||||
/* _fini() is called automatically when the library is unloaded. */
|
||||
void
|
||||
__attribute__((destructor)) _fini() {
|
||||
_fini() {
|
||||
delete_descriptor(mono_descriptor);
|
||||
}
|
||||
|
||||
|
||||
@@ -381,10 +381,10 @@ LADSPA_Descriptor * mono_descriptor = NULL;
|
||||
|
||||
|
||||
|
||||
/* __attribute__((constructor)) _init() is called automatically when the plugin library is first
|
||||
/* _init() is called automatically when the plugin library is first
|
||||
loaded. */
|
||||
void
|
||||
__attribute__((constructor)) _init() {
|
||||
_init() {
|
||||
|
||||
char ** port_names;
|
||||
LADSPA_PortDescriptor * port_descriptors;
|
||||
@@ -471,9 +471,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) {
|
||||
}
|
||||
|
||||
|
||||
/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */
|
||||
/* _fini() is called automatically when the library is unloaded. */
|
||||
void
|
||||
__attribute__((destructor)) _fini() {
|
||||
_fini() {
|
||||
delete_descriptor(mono_descriptor);
|
||||
}
|
||||
|
||||
|
||||
@@ -308,10 +308,10 @@ LADSPA_Descriptor * mono_descriptor = NULL;
|
||||
|
||||
|
||||
|
||||
/* __attribute__((constructor)) _init() is called automatically when the plugin library is first
|
||||
/* _init() is called automatically when the plugin library is first
|
||||
loaded. */
|
||||
void
|
||||
__attribute__((constructor)) _init() {
|
||||
_init() {
|
||||
|
||||
int i;
|
||||
char ** port_names;
|
||||
@@ -425,9 +425,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) {
|
||||
}
|
||||
|
||||
|
||||
/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */
|
||||
/* _fini() is called automatically when the library is unloaded. */
|
||||
void
|
||||
__attribute__((destructor)) _fini() {
|
||||
_fini() {
|
||||
delete_descriptor(mono_descriptor);
|
||||
}
|
||||
|
||||
|
||||
@@ -55,7 +55,6 @@ private:
|
||||
pixmapButton * m_openPresetButton;
|
||||
pixmapButton * m_rolLPresetButton;
|
||||
pixmapButton * m_rolRPresetButton;
|
||||
pixmapButton * m_selPresetButton;
|
||||
pixmapButton * m_managePluginButton;
|
||||
pixmapButton * m_savePresetButton;
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ Plugin::Descriptor PLUGIN_EXPORT audiofileprocessor_plugin_descriptor =
|
||||
STRINGIFY( PLUGIN_NAME ),
|
||||
"AudioFileProcessor",
|
||||
QT_TRANSLATE_NOOP( "pluginBrowser",
|
||||
"simple sampler with various settings for "
|
||||
"Simple sampler with various settings for "
|
||||
"using samples (e.g. drums) in an "
|
||||
"instrument-track" ),
|
||||
"Tobias Doerffel <tobydox/at/users.sf.net>",
|
||||
@@ -303,7 +303,7 @@ void audioFileProcessor::loopPointChanged( void )
|
||||
//check if start & end overlap and nudge end up if so
|
||||
if( m_startPointModel.value() == m_endPointModel.value() )
|
||||
{
|
||||
m_endPointModel.setValue( qMin( m_endPointModel.value() + 0.001, 1.0d ) );
|
||||
m_endPointModel.setValue( qMin( m_endPointModel.value() + 0.001f, 1.0f ) );
|
||||
}
|
||||
|
||||
const f_cnt_t f_start = static_cast<f_cnt_t>( m_startPointModel.value() *
|
||||
|
||||
@@ -101,8 +101,6 @@ private:
|
||||
|
||||
float m_normalizeFactor;
|
||||
|
||||
oscillator * m_osc;
|
||||
|
||||
friend class bitInvaderView;
|
||||
} ;
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#include <math.h>
|
||||
#include "embed.cpp"
|
||||
|
||||
#ifdef LMMS_BUILD_WIN32
|
||||
#if defined (LMMS_BUILD_WIN32) || defined (LMMS_BUILD_APPLE)
|
||||
#ifndef isnanf
|
||||
#define isnanf(x) isnan(x)
|
||||
#endif
|
||||
|
||||
@@ -58,12 +58,16 @@ dynProcControlDialog::dynProcControlDialog(
|
||||
waveGraph -> setMaximumSize( 204, 205 );
|
||||
|
||||
knob * inputKnob = new knob( knobBright_26, this);
|
||||
inputKnob -> setVolumeKnob( true );
|
||||
inputKnob -> setVolumeRatio( 1.0 );
|
||||
inputKnob -> move( 14, 251 );
|
||||
inputKnob->setModel( &_controls->m_inputModel );
|
||||
inputKnob->setLabel( tr( "INPUT" ) );
|
||||
inputKnob->setHintText( tr( "Input gain:" ) + " ", "" );
|
||||
|
||||
knob * outputKnob = new knob( knobBright_26, this );
|
||||
outputKnob -> setVolumeKnob( true );
|
||||
outputKnob -> setVolumeRatio( 1.0 );
|
||||
outputKnob -> move( 54, 251 );
|
||||
outputKnob->setModel( &_controls->m_outputModel );
|
||||
outputKnob->setLabel( tr( "OUTPUT" ) );
|
||||
|
||||
@@ -86,11 +86,11 @@ void dynProcControls::samplesChanged( int _begin, int _end)
|
||||
void dynProcControls::loadSettings( const QDomElement & _this )
|
||||
{
|
||||
//load knobs, stereomode
|
||||
m_inputModel.setValue( _this.attribute( "inputGain" ).toFloat() );
|
||||
m_outputModel.setValue( _this.attribute( "outputGain" ).toFloat() );
|
||||
m_attackModel.setValue( _this.attribute( "attack" ).toFloat() );
|
||||
m_releaseModel.setValue( _this.attribute( "release" ).toFloat() );
|
||||
m_stereomodeModel.setValue( _this.attribute( "stereoMode" ).toInt() );
|
||||
m_inputModel.loadSettings( _this, "inputGain" );
|
||||
m_outputModel.loadSettings( _this, "outputGain" );
|
||||
m_attackModel.loadSettings( _this, "attack" );
|
||||
m_releaseModel.loadSettings( _this, "release" );
|
||||
m_stereomodeModel.loadSettings( _this, "stereoMode" );
|
||||
|
||||
//load waveshape
|
||||
int size = 0;
|
||||
@@ -109,11 +109,11 @@ void dynProcControls::saveSettings( QDomDocument & _doc,
|
||||
QDomElement & _this )
|
||||
{
|
||||
//save input, output knobs
|
||||
_this.setAttribute( "inputGain", m_inputModel.value() );
|
||||
_this.setAttribute( "outputGain", m_outputModel.value() );
|
||||
_this.setAttribute( "attack", m_attackModel.value() );
|
||||
_this.setAttribute( "release", m_releaseModel.value() );
|
||||
_this.setAttribute( "stereoMode", m_stereomodeModel.value() );
|
||||
m_inputModel.saveSettings( _doc, _this, "inputGain" );
|
||||
m_outputModel.saveSettings( _doc, _this, "outputGain" );
|
||||
m_attackModel.saveSettings( _doc, _this, "attack" );
|
||||
m_releaseModel.saveSettings( _doc, _this, "release" );
|
||||
m_stereomodeModel.saveSettings( _doc, _this, "stereoMode" );
|
||||
|
||||
|
||||
//save waveshape
|
||||
|
||||
@@ -980,6 +980,7 @@ if( p.currentEffectChannel <= NumFxChannels )
|
||||
|
||||
case FLP_LayerChans:
|
||||
p.channels[data].layerParent = cur_channel;
|
||||
break;
|
||||
|
||||
// DWORD EVENTS
|
||||
case FLP_Color:
|
||||
|
||||
@@ -44,7 +44,7 @@ Plugin::Descriptor PLUGIN_EXPORT kicker_plugin_descriptor =
|
||||
STRINGIFY( PLUGIN_NAME ),
|
||||
"Kicker",
|
||||
QT_TRANSLATE_NOOP( "pluginBrowser",
|
||||
"versatile kick- & bassdrum-synthesizer" ),
|
||||
"Versatile kick- & bassdrum-synthesizer" ),
|
||||
"Tobias Doerffel <tobydox/at/users.sf.net>",
|
||||
0x0100,
|
||||
Plugin::Instrument,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* ladspa_browser.h - dialog to display information about installed LADSPA
|
||||
* plugins
|
||||
* plugins
|
||||
*
|
||||
* Copyright (c) 2006-2008 Danny McRae <khjklujn/at/users.sourceforge.net>
|
||||
* Copyright (c) 2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
@@ -68,6 +68,18 @@ public:
|
||||
|
||||
virtual QString nodeName() const;
|
||||
|
||||
virtual void saveSettings( QDomDocument& doc, QDomElement& element )
|
||||
{
|
||||
Q_UNUSED(doc)
|
||||
Q_UNUSED(element)
|
||||
}
|
||||
|
||||
virtual void loadSettings( const QDomElement& element )
|
||||
{
|
||||
Q_UNUSED(element)
|
||||
}
|
||||
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
|
||||