Merge branch 'stable-1.2'

# Conflicts:
#	cmake/nsis/CMakeLists.txt
#	src/core/ProjectRenderer.cpp
#	src/tracks/Pattern.cpp
This commit is contained in:
Hyunjin Song
2018-10-29 16:20:58 +09:00
76 changed files with 989 additions and 3528 deletions

View File

@@ -1,5 +1,5 @@
Alexandre Almeida <wilsalx@gmail.com> <meta.lx@hotmail.com>
Tobias Doerffel <tobias.doerffel@gmail.com>
Tobias Junghans <tobias.doerffel@gmail.com>
Dave French <dave.french3@googlemail.com>
Paul Giblock <drfaygo@gmail.com> <pgib@users.sf.net>
Paul Giblock <drfaygo@gmail.com> <p@pgiblock.net>

View File

@@ -33,7 +33,7 @@ SET(PROJECT_COPYRIGHT "2008-${PROJECT_YEAR} ${PROJECT_AUTHOR}")
SET(VERSION_MAJOR "1")
SET(VERSION_MINOR "2")
SET(VERSION_RELEASE "0")
SET(VERSION_STAGE "rc6")
SET(VERSION_STAGE "rc7")
SET(VERSION_BUILD "0")
SET(VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_RELEASE}")
IF(VERSION_STAGE)

View File

@@ -1,4 +1,4 @@
SET(MACOSX_BUNDLE_ICON_FILE "lmms.icns")
SET(MACOSX_BUNDLE_ICON_FILE "icon.icns")
SET(MACOSX_BUNDLE_GUI_IDENTIFIER "${PROJECT_NAME_UCASE}")
SET(MACOSX_BUNDLE_LONG_VERSION_STRING "${VERSION}")
SET(MACOSX_BUNDLE_BUNDLE_NAME "${PROJECT_NAME_UCASE}")

BIN
cmake/apple/icon.icns Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -1,5 +1,4 @@
INSTALL(FILES lmms.svg DESTINATION "${DATA_DIR}/icons/hicolor/scalable/apps")
INSTALL(FILES project.svg DESTINATION "${DATA_DIR}/icons/hicolor/scalable/mimetypes/" RENAME "application-x-lmms-project.svg")
INSTALL(DIRECTORY icons/ DESTINATION "${DATA_DIR}/icons/hicolor")
INSTALL(FILES lmms.desktop DESTINATION "${DATA_DIR}/applications")
INSTALL(FILES lmms.xml DESTINATION "${DATA_DIR}/mime/packages")

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 549 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 446 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 934 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 771 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 799 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 681 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 836 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

@@ -0,0 +1,142 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="64"
height="64"
id="svg4034"
version="1.1"
inkscape:version="0.92.3 (2405546, 2018-03-11)"
inkscape:export-filename="64x64@2.png"
inkscape:export-xdpi="192"
inkscape:export-ydpi="192"
sodipodi:docname="lmms.svg">
<defs
id="defs4036">
<filter
inkscape:collect="always"
style="color-interpolation-filters:sRGB"
id="filter4173"
x="-0.011714286"
width="1.0234286"
y="-0.0123"
height="1.0246">
<feGaussianBlur
inkscape:collect="always"
stdDeviation="0.205"
id="feGaussianBlur4175" />
</filter>
<linearGradient
gradientTransform="translate(0,32)"
inkscape:collect="always"
xlink:href="#linearGradient4244-6"
id="linearGradient866"
x1="35"
y1="-14"
x2="35"
y2="27"
gradientUnits="userSpaceOnUse" />
<linearGradient
id="linearGradient4244-6"
inkscape:collect="always">
<stop
id="stop4428"
offset="0"
style="stop-color:#27ab5f;stop-opacity:1" />
<stop
id="stop4430"
offset="1"
style="stop-color:#249a56;stop-opacity:1" />
</linearGradient>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="1.4142135"
inkscape:cx="210.86487"
inkscape:cy="3.375495"
inkscape:current-layer="svg4034"
showgrid="true"
inkscape:grid-bbox="true"
inkscape:document-units="px"
inkscape:window-width="1366"
inkscape:window-height="705"
inkscape:window-x="253"
inkscape:window-y="1072"
inkscape:window-maximized="1"
showguides="false"
inkscape:guide-bbox="true"
inkscape:snap-bbox="true"
inkscape:object-nodes="true">
<inkscape:grid
type="xygrid"
id="grid4042" />
<sodipodi:guide
position="37,4"
orientation="0,1"
id="guide4951"
inkscape:locked="false" />
<sodipodi:guide
position="38,60"
orientation="0,1"
id="guide4955"
inkscape:locked="false" />
<sodipodi:guide
position="-19,32"
orientation="0,1"
id="guide4957"
inkscape:locked="false" />
</sodipodi:namedview>
<metadata
id="metadata4039">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<rect
rx="4"
y="4"
x="4"
height="56"
width="56"
id="rect5093"
style="display:inline;opacity:0.98999999;fill:#34d07b;fill-opacity:1;stroke:none;stroke-opacity:1" />
<rect
rx="3"
y="5"
x="5"
height="54"
width="54"
id="rect5095"
style="display:inline;opacity:1;fill:url(#linearGradient866);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
sodipodi:nodetypes="ccccccccccccccccc"
inkscape:connector-curvature="0"
id="path5085-3-6"
d="M 32,13 11,25 v 24 l 7,4 7,-4 v -8 l -7,-4 v -8 l 14,-8 14,8 v 8 l -7,4 v 8 l 7,4 7,-4 V 25 Z"
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;baseline-shift:baseline;text-anchor:start;white-space:normal;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:0.15;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.97797471;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;filter:url(#filter4173);color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
<path
sodipodi:nodetypes="ccccccccccccccccc"
inkscape:connector-curvature="0"
id="path5085-3"
d="M 32,11 11,23 v 24 l 7,4 7,-4 v -8 l -7,-4 v -8 l 14,-8 14,8 v 8 l -7,4 v 8 l 7,4 7,-4 V 23 Z"
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;baseline-shift:baseline;text-anchor:start;white-space:normal;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.97797471;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;filter:url(#filter5497);color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
</svg>

After

Width:  |  Height:  |  Size: 6.0 KiB

View File

@@ -0,0 +1,173 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="64"
height="64"
id="svg4034"
version="1.1"
inkscape:version="0.91 r13725"
inkscape:export-filename="/home/umcaruje/d/Dropbox/lmms icons/project-256x256.png"
inkscape:export-xdpi="360"
inkscape:export-ydpi="360"
sodipodi:docname="application-x-lmms-project.svg"
enable-background="new">
<defs
id="defs4036">
<linearGradient
id="linearGradient4244-6"
inkscape:collect="always">
<stop
id="stop4428"
offset="0"
style="stop-color:#27ab5f;stop-opacity:1" />
<stop
id="stop4430"
offset="1"
style="stop-color:#249a56;stop-opacity:1" />
</linearGradient>
<filter
inkscape:collect="always"
style="color-interpolation-filters:sRGB"
id="filter4400"
x="-0.024"
width="1.048"
y="-0.024"
height="1.048">
<feGaussianBlur
inkscape:collect="always"
stdDeviation="0.14999999"
id="feGaussianBlur4402" />
</filter>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4244-6"
id="linearGradient4432"
gradientUnits="userSpaceOnUse"
x1="9.8838835"
y1="-9.8994951"
x2="10.275496"
y2="27.930717" />
<filter
inkscape:collect="always"
style="color-interpolation-filters:sRGB"
id="filter4442"
x="-0.0116"
width="1.0232"
y="-0.012428571"
height="1.0248571">
<feGaussianBlur
inkscape:collect="always"
stdDeviation="0.145"
id="feGaussianBlur4444" />
</filter>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="5.6568542"
inkscape:cx="4.2102935"
inkscape:cy="18.651114"
inkscape:current-layer="g4263"
showgrid="false"
inkscape:grid-bbox="true"
inkscape:document-units="px"
inkscape:window-width="1366"
inkscape:window-height="740"
inkscape:window-x="339"
inkscape:window-y="1080"
inkscape:window-maximized="1"
showguides="false"
inkscape:guide-bbox="true"
inkscape:snap-bbox="true"
inkscape:object-nodes="true">
<inkscape:grid
type="xygrid"
id="grid4042" />
<sodipodi:guide
position="37,4"
orientation="0,1"
id="guide4951" />
<sodipodi:guide
position="38,60"
orientation="0,1"
id="guide4955" />
<sodipodi:guide
position="-19,32"
orientation="0,1"
id="guide4957" />
</sodipodi:namedview>
<metadata
id="metadata4039">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:groupmode="layer"
id="g4263"
inkscape:label="mimetype"
style="display:inline">
<g
id="g4189">
<path
sodipodi:nodetypes="ssssssccccs"
inkscape:connector-curvature="0"
id="path4273"
d="m 10,-30 c -1.108,0 -2,0.892 -2,2 l 0,56 c 0,1.108 0.892,2 2,2 l 44,0 c 1.108,0 2,-0.892 2,-2 l 0,-43 c 0,-1 -1,-2 -1,-2 L 43,-29 c 0,0 -1,-1 -2,-1 z"
style="display:inline;opacity:1;fill:#34d07b;fill-opacity:1;stroke:none;stroke-opacity:1"
transform="translate(0,32)" />
<path
sodipodi:nodetypes="sssssscccs"
inkscape:connector-curvature="0"
id="path4275"
d="m 10,-29 c -0.554,0 -1,0.446 -1,1 l 0,56 c 0,0.554 0.446,1 1,1 l 44,0 c 0.554,0 1,-0.446 1,-1 l 0,-43 -13,-1 -1,-13 z"
style="display:inline;opacity:1;fill:url(#linearGradient4432);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
transform="translate(0,32)" />
<path
sodipodi:nodetypes="ccccccc"
inkscape:connector-curvature="0"
id="path4339-5"
d="m 40,-29 0,11.999999 c 0,2 1,3 3,3 l 11.999999,0 0,-1 L 41,-29 Z"
style="display:inline;opacity:0.12999998;fill:#222222;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter4400)"
transform="translate(0,32)" />
<path
sodipodi:nodetypes="ccccccc"
inkscape:connector-curvature="0"
id="path4339"
d="m 41,-29 0,12 c 0,1.03125 0.9375,2 2,2 l 12,0 0,-1 -13,-13 z"
style="display:inline;fill:#34d07b;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
transform="translate(0,32)" />
<path
sodipodi:nodetypes="ccccccccccccccccc"
inkscape:connector-curvature="0"
id="path4436"
d="m 32,22 -15,8 0,17.5 5,2.5 4.999999,-2.5 0,-6 L 22,39 l 0,-6 10,-5.5 10,5.5 0,6 -4.999999,2.5 0,6 L 42,50 47,47.5 47,30 Z"
style="display:inline;color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;baseline-shift:baseline;text-anchor:start;white-space:normal;clip-rule:nonzero;overflow:visible;visibility:visible;opacity:0.15;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.97797471;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;filter:url(#filter4442);color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
<path
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;baseline-shift:baseline;text-anchor:start;white-space:normal;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.97797471;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;filter:url(#filter5497);color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
d="m 32,20 -15,8 0,17.5 5,2.5 4.999999,-2.5 0,-6 L 22,37 l 0,-6 10,-5.5 10,5.5 0,6 -4.999999,2.5 0,6 L 42,48 47,45.5 47,28 Z"
id="path4265"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccccccccccccccc" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 93 KiB

File diff suppressed because it is too large Load Diff

Before

Width:  |  Height:  |  Size: 54 KiB

View File

@@ -102,7 +102,7 @@ cat >"${APPDIR}usr/bin/lmms" <<EOL
#!/usr/bin/env bash
DIR="\$( cd "\$( dirname "\${BASH_SOURCE[0]}" )" && pwd )"
if which carla > /dev/null 2>&1; then
CARLAPATH="$(which carla)"
CARLAPATH="\$(which carla)"
CARLAPREFIX="\${CARLAPATH%/bin*}"
echo "Carla appears to be installed on this system at \$CARLAPREFIX/lib[64]/carla so we'll use it."
export LD_LIBRARY_PATH=\$CARLAPREFIX/lib/carla:\$CARLAPREFIX/lib64/carla:\$LD_LIBRARY_PATH

File diff suppressed because it is too large Load Diff

Before

Width:  |  Height:  |  Size: 66 KiB

View File

@@ -0,0 +1,92 @@
# A wrapper around pkg-config-provided and cmake-provided bash completion that
# will have dynamic behavior at INSTALL() time to allow both root-level
# INSTALL() as well as user-level INSTALL().
#
# See also https://github.com/scop/bash-completion
#
# Copyright (c) 2018, Tres Finocchiaro, <tres.finocchiaro@gmail.com>
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
#
# Usage:
# INCLUDE(BashCompletion)
# BASHCOMP_INSTALL(foo)
# ... where "foo" is a shell script adjacent to the CMakeLists.txt
#
# How it determines BASHCOMP_PKG_PATH, in order:
# 1. Uses BASHCOMP_PKG_PATH if already set (e.g. -DBASHCOMP_PKG_PATH=...)
# a. If not, uses pkg-config's PKG_CHECK_MODULES to determine path
# b. Fallback to cmake's FIND_PACKAGE(bash-completion) path
# c. Fallback to hard-coded /usr/share/bash-completion/completions
# 2. Final fallback to ${CMAKE_INSTALL_PREFIX}/share/bash-completion/completions if
# detected path is unwritable.
# - Windows does not support bash completion
# - macOS support should eventually be added for Homebrew (TODO)
IF(WIN32)
MESSAGE(STATUS "Bash competion is not supported on this platform.")
ELSEIF(APPLE)
MESSAGE(STATUS "Bash completion is not yet implemented for this platform.")
ELSE()
INCLUDE(FindUnixCommands)
# Honor manual override if provided
IF(NOT BASHCOMP_PKG_PATH)
# First, use pkg-config, which is the most reliable
FIND_PACKAGE(PkgConfig QUIET)
IF(PKGCONFIG_FOUND)
PKG_CHECK_MODULES(BASH_COMPLETION bash-completion)
PKG_GET_VARIABLE(BASHCOMP_PKG_PATH bash-completion completionsdir)
ELSE()
# Second, use cmake (preferred but less common)
FIND_PACKAGE(bash-completion QUIET)
IF(BASH_COMPLETION_FOUND)
SET(BASHCOMP_PKG_PATH "${BASH_COMPLETION_COMPLETIONSDIR}")
ENDIF()
ENDIF()
# Third, use a hard-coded fallback value
IF("${BASHCOMP_PKG_PATH}" STREQUAL "")
SET(BASHCOMP_PKG_PATH "/usr/share/bash-completion/completions")
ENDIF()
ENDIF()
# Always provide a fallback for non-root INSTALL()
SET(BASHCOMP_USER_PATH "${CMAKE_INSTALL_PREFIX}/share/bash-completion/completions")
# Cmake doesn't allow easy use of conditional logic at INSTALL() time
# this is a problem because ${BASHCOMP_PKG_PATH} may not be writable and we
# need sane fallback behavior for bundled INSTALL() (e.g. .AppImage, etc).
#
# The reason this can't be detected by cmake is that it's fairly common to
# run "cmake" as a one user (i.e. non-root) and "make install" as another user
# (i.e. root).
#
# - Creates a script called "install_${SCRIPT_NAME}_completion.sh" into the
# working binary directory and invokes this script at install.
# - Script handles INSTALL()-time conditional logic for sane ballback behavior
# when ${BASHCOMP_PKG_PATH} is unwritable (i.e. non-root); Something cmake
# can't handle on its own at INSTALL() time)
MACRO(BASHCOMP_INSTALL SCRIPT_NAME)
# A shell script for wrapping conditionl logic
SET(BASHCOMP_SCRIPT "${CMAKE_CURRENT_BINARY_DIR}/install_${SCRIPT_NAME}_completion.sh")
FILE(WRITE ${BASHCOMP_SCRIPT} "\
#!${BASH}\n\
set -e\n\
BASHCOMP_PKG_PATH=\"${BASHCOMP_USER_PATH}\"\n\
if [ -w \"${BASHCOMP_PKG_PATH}\" ]; then\n\
BASHCOMP_PKG_PATH=\"${BASHCOMP_PKG_PATH}\"\n\
fi\n\
echo -e \"\\nInstalling bash completion...\\n\"\n\
mkdir -p \"\$BASHCOMP_PKG_PATH\"\n\
cp \"${CMAKE_CURRENT_SOURCE_DIR}/${SCRIPT_NAME}\" \"\$BASHCOMP_PKG_PATH\"\n\
chmod a+r \"\$BASHCOMP_PKG_PATH/${SCRIPT_NAME}\"\n\
echo -e \"Bash completion for ${SCRIPT_NAME} has been installed to \$BASHCOMP_PKG_PATH/${SCRIPT_NAME}\"\n\
")
INSTALL(CODE "EXECUTE_PROCESS(COMMAND chmod u+x \"install_${SCRIPT_NAME}_completion.sh\" WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} )")
INSTALL(CODE "EXECUTE_PROCESS(COMMAND \"./install_${SCRIPT_NAME}_completion.sh\" WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} )")
MESSAGE(STATUS "Bash completion script for ${SCRIPT_NAME} will be installed to ${BASHCOMP_PKG_PATH} or fallback to ${BASHCOMP_USER_PATH} if unwritable.")
ENDMACRO()
ENDIF()

View File

@@ -2,7 +2,7 @@ SET(CPACK_PACKAGE_ICON "${CMAKE_SOURCE_DIR}/cmake/nsis/nsis_bra
IF(MSVC)
STRING(REPLACE "/" "\\\\" CPACK_PACKAGE_ICON ${CPACK_PACKAGE_ICON})
ENDIF(MSVC)
SET(CPACK_NSIS_MUI_ICON "${CMAKE_SOURCE_DIR}/cmake/nsis/lmms.ico")
SET(CPACK_NSIS_MUI_ICON "${CMAKE_SOURCE_DIR}/cmake/nsis/icon.ico")
SET(CPACK_NSIS_INSTALLED_ICON_NAME "${CMAKE_PROJECT_NAME}.exe" PARENT_SCOPE)
SET(CPACK_NSIS_DISPLAY_NAME "${PROJECT_NAME_UCASE} ${VERSION}" PARENT_SCOPE)
SET(CPACK_NSIS_HELP_LINK "${PROJECT_URL}" PARENT_SCOPE)
@@ -75,3 +75,5 @@ IF(LMMS_HAVE_STK)
ENDIF()
INSTALL(FILES "lmms.exe.manifest" DESTINATION .)
INSTALL(FILES "lmms.VisualElementsManifest.xml" DESTINATION .)
INSTALL(DIRECTORY "assets" DESTINATION .)

View File

@@ -129,6 +129,7 @@ NoBackup:
WriteRegStr HKCR "$R0" "" "$R0"
WriteRegStr HKCR "$R0\shell" "" "open"
Skip:
WriteRegStr HKCR "$R0\DefaultIcon" "" "$R2,1"
WriteRegStr HKCR "$R0\shell\open\command" "" '"$R2" "%1"'
WriteRegStr HKCR "$R0\shell\edit" "" "Edit $R0"
WriteRegStr HKCR "$R0\shell\edit\command" "" '"$R2" "%1"'

BIN
cmake/nsis/assets/Logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
cmake/nsis/icon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 401 KiB

View File

@@ -0,0 +1,9 @@
<Application xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
<VisualElements
ShowNameOnSquare150x150Logo='on'
Square150x150Logo='assets\Logo.png'
Square70x70Logo='assets\SmallLogo.png'
Square44x44Logo='assets\SmallLogo.png'
ForegroundText='light'
BackgroundColor='#249A57'/>
</Application>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 134 KiB

View File

@@ -1,4 +1,5 @@
lmmsicon ICON cmake/nsis/lmms.ico
lmmsicon ICON cmake/nsis/icon.ico
lmmsprojecticon ICON cmake/nsis/project.ico
#include <windows.h>
VS_VERSION_INFO VERSIONINFO

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.5 KiB

After

Width:  |  Height:  |  Size: 9.5 KiB

BIN
cmake/nsis/project.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 401 KiB

View File

@@ -515,7 +515,7 @@ Wenn Sie daran interessiert sind LMMS in eine andere Sprache zu übersetzen oder
<name>AutomationPattern</name>
<message>
<source>Drag a control while pressing &lt;%1&gt;</source>
<translation>Ein Steuerelement mit &lt;Strg&gt; hier her ziehen</translation>
<translation>Ein Steuerelement mit &lt;%1&gt; hier her ziehen</translation>
</message>
</context>
<context>
@@ -6133,7 +6133,7 @@ Grund: »%2«</translation>
</message>
<message>
<source>Mute/unmute (&lt;%1&gt; + middle click)</source>
<translation>Stumm/Laut schalten (&lt;Strg&gt; + Mittelklick)</translation>
<translation>Stumm/Laut schalten (&lt;%1&gt; + Mittelklick)</translation>
</message>
</context>
<context>
@@ -6968,7 +6968,7 @@ Bitte stellen Sie sicher, dass Sie Leserechte auf diese Datei sowie das Verzeich
</message>
<message>
<source>Mute/unmute (&lt;%1&gt; + middle click)</source>
<translation>Stumm/Laut schalten (&lt;Strg&gt; + Mittelklick)</translation>
<translation>Stumm/Laut schalten (&lt;%1&gt; + Mittelklick)</translation>
</message>
</context>
<context>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 93 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 828 B

View File

@@ -15,3 +15,6 @@ if(DOXYGEN_FOUND)
COMMENT "Generating API documentation with Doxygen"
SOURCES Doxyfile.in)
endif(DOXYGEN_FOUND)
ADD_SUBDIRECTORY(bash-completion)

View File

@@ -0,0 +1,4 @@
INCLUDE(BashCompletion)
IF(COMMAND BASHCOMP_INSTALL)
BASHCOMP_INSTALL(lmms)
ENDIF()

334
doc/bash-completion/lmms Normal file
View File

@@ -0,0 +1,334 @@
# lmms(1) completion -*- shell-script -*-
# use shellcheck: "shellcheck -e bash <filename>"
_lmms_array_contains ()
{
local e match="$1"
shift
for e; do [[ "$e" == "$match" ]] && return 0; done
return 1
}
_lmms_long_param_of()
{
case "$1" in
-a)
echo "float"
;;
-b)
echo "bitrate"
;;
-c)
echo "config"
;;
-f)
echo "format"
;;
-i)
echo "interpolation"
;;
-l)
echo "loop"
;;
-m)
echo "mode"
;;
-o)
echo "output"
;;
-p)
echo "profile"
;;
-s)
echo "samplerate"
;;
-x)
echo "oversampling"
;;
*)
echo ""
;;
esac
}
_lmms_conv_old_action ()
{
case "$1" in
-d|--dump)
echo "dump"
;;
-r|--render)
echo "render"
;;
--rendertracks)
echo "rendertracks"
;;
-u|--upgrade)
echo "upgrade"
;;
*)
echo ""
;;
esac
}
_lmms()
{
local cword=$COMP_CWORD
local cur="${COMP_WORDS[COMP_CWORD]}"
# call routine provided by bash-completion
_init_completion || return
local params filemode filetypes
local i # counter variable
local pars_global pars_noaction pars_render actions shortargs
pars_global=(--allowroot --config --help --version)
pars_noaction=(--geometry --import)
pars_render=(--float --bitrate --format --interpolation)
pars_render+=(--loop --mode --output --profile)
pars_render+=(--samplerate --oversampling)
actions=(dump render rendertracks upgrade)
actions_old=(-d --dump -r --render --rendertracks -u --upgrade)
shortargs+=(-a -b -c -f -h -i -l -m -o -p -s -v -x)
local prev prev2
if [ "$cword" -gt 1 ]
then
prev=${COMP_WORDS[cword-1]}
fi
if [ "$cword" -gt 2 ]
then
prev2=${COMP_WORDS[cword-2]}
fi
# don't show shortargs, but complete them when entered
if [[ $cur =~ ^-[^-]$ ]]
then
if _lmms_array_contains "$cur" "${shortargs[@]}"
then
COMPREPLY=( "$cur" )
fi
return
fi
#
# please keep those in order like def_pars_args above
#
case $prev in
--bitrate|-b)
params="64 96 128 160 192 256 320"
;;
--config|-c)
filetypes='xml'
filemode='existing_files'
;;
--format|-f)
params='wav ogg mp3'
;;
--geometry)
# we can not name all possibilities, but this helps the user
# by showing them how the format is
params='0x0+0+0'
;;
--interpolation|-i)
params='linear sincfastest sincmedium sincbest'
;;
--import)
filetypes='mid|midi|MID|MIDI|rmi|RMI|h2song|H2SONG'
filemode='existing_files'
;;
--mode|-m)
params='s j m'
;;
--output|-o)
# default assumption: could be both
local render=1 rendertracks=1
for i in "${!COMP_WORDS[@]}"
do
if [[ ${COMP_WORDS[i]} =~ ^(render|-r|--render)$ ]]
then
rendertracks=
elif [[ ${COMP_WORDS[i]} =~ ^(rendertracks|--rendertracks)$ ]]
then
render=
fi
done
if [ "$rendertracks" ]
then
filemode='existing_directories'
fi
if [ "$render" ]
then
# filemode files is a superset of "existing directories"
# so it's OK to overwrite the filemode='existing_directories'
# from above
filetypes='wav|ogg|mp3'
filemode='files'
fi
;;
--profile|-p)
filemode='files'
;;
--samplerate|-s)
# these are the ones suggested for zyn
# if you think more are required,
# remove this comment and write a justification
params='44100 48000 96000 192000'
;;
--oversampling|-x)
params='1 2 4 8'
;;
*)
local action_found
# Is an action specified?
if [ "$cword" -gt 1 ]
then
local wrd
for wrd in "${COMP_WORDS[@]}"
do
# action named explicitly?
if _lmms_array_contains "$wrd" "${actions[@]}"
then
action_found=$wrd
break
# deprecated action name?
elif _lmms_array_contains "$wrd" "${actions_old[@]}"
then
action_found="$(_lmms_conv_old_action "$wrd")"
break
# no-action params found?
elif _lmms_array_contains "$wrd" "${pars_noaction[@]}"
then
action_found=none
break
fi
done
fi
if [[ $prev =~ -e|--help|-h|-version|-v ]]
then
# the -e flag (from --import) and help/version
# always mark the end of arguments
return
fi
if [[ "$action_found" =~ dump|none|^$ ]] && [[ $prev =~ \.mmpz? ]]
then
# mmp(z) mark the end of arguments for those actions
return
fi
local savefiletypes='mmpz|mmp'
local params_array
# find parameters/filetypes/dirtypes depending on actions
if ! [ "$action_found" ]
then
params_array=( "${actions[@]}" "${pars_global[@]}" "${pars_noaction[@]}")
filemode="existing_files"
filetypes="$savefiletypes"
elif [ "$action_found" == "none" ]
then
params_array=( "${pars_noaction[@]}" )
filemode="existing_files"
filetypes="$savefiletypes"
elif [ "$action_found" == "dump" ]
then
filemode="existing_files"
filetypes="mmpz"
elif [ "$action_found" == "upgrade" ]
then
if [ "$prev" == "upgrade" ]
then
filemode="existing_files"
filetypes="$savefiletypes"
elif [ "$prev2" == "upgrade" ]
then
filemode="files"
filetypes="$savefiletypes"
fi
elif [[ "$action_found" =~ render(tracks)? ]]
then
if [[ "$prev" =~ render(tracks)? ]]
then
filemode="existing_files"
filetypes="$savefiletypes"
else
params_array=( "${pars_render[@]}" )
fi
fi
# add params_array to params, but also check the history of comp words
local param
for param in "${params_array[@]}"
do
local do_append=1
for i in "${!COMP_WORDS[@]}"
do
if [ "$i" -ne 0 ] && [ "$i" -ne "$cword" ]
then
# disallow double long parameters
if [ "${COMP_WORDS[$i]}" == "$param" ]
then
do_append=
# disallow double short parameters
elif [ "--$(_lmms_long_param_of "${COMP_WORDS[$i]}")" == "$param" ]
then
do_append=
# --help or --version must be the first parameters
elif [ "$cword" -gt 1 ] && [[ $param =~ --help|--version ]]
then
do_append=
fi
fi
done
if [ "$do_append" ]
then
params+="$param "
fi
done
;;
esac
case $filemode in
# use completion routine provided by bash-completion
# to fill $COMPREPLY
existing_files)
_filedir "@($filetypes)"
;;
existing_directories)
_filedir -d
;;
files)
# non existing files complete like directories...
_filedir -d
# ...except for non-completing files with the right file type
if [ ${#COMPREPLY[@]} -eq 0 ]
then
if ! [[ "$cur" =~ /$ ]] && [ "$filetypes" ] && [[ "$cur" =~ \.($filetypes)$ ]]
then
# file ending fits, we seem to be done
COMPREPLY=( "$cur" )
fi
fi
;;
esac
if [ "$params" ]
then
# none of our parameters contain spaces, so deactivate shellcheck's warning
# shellcheck disable=SC2207
COMPREPLY+=( $(compgen -W "${params}" -- "${cur}") )
fi
}
complete -F _lmms lmms

View File

@@ -171,10 +171,11 @@ public:
return m_audioDevStartFailed;
}
void setAudioDevice( AudioDevice * _dev );
void setAudioDevice( AudioDevice * _dev , bool startNow );
void setAudioDevice( AudioDevice * _dev,
const struct qualitySettings & _qs,
bool _needs_fifo );
bool _needs_fifo,
bool startNow );
void storeAudioDevice();
void restoreAudioDevice();
inline AudioDevice * audioDev()

View File

@@ -95,7 +95,7 @@ bool VstEffect::processAudioBuffer( sampleFrame * _buf, const fpp_t _frames )
sampleFrame * buf = new sampleFrame[_frames];
#endif
memcpy( buf, _buf, sizeof( sampleFrame ) * _frames );
if (m_pluginMutex.tryLock())
if (m_pluginMutex.tryLock(Engine::getSong()->isExporting() ? -1 : 0))
{
m_plugin->process( buf, buf );
m_pluginMutex.unlock();

View File

@@ -0,0 +1,88 @@
/*
* fluidsynthshims.h - a shim header for FluidSynth 2.0 API changes
*
* Copyright (c) 2018 Hyunjin Song <tteu.ingog@gmail.com>
*
* This file is part of LMMS - https://lmms.io
*
* 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 FLUIDSYNTHSHIMS_H
#define FLUIDSYNTHSHIMS_H
#include <fluidsynth.h>
#if FLUIDSYNTH_VERSION_MAJOR < 2
inline const char* fluid_preset_get_name(fluid_preset_t* preset)
{
return preset->get_name(preset);
}
inline int fluid_preset_get_banknum(fluid_preset_t* preset)
{
return preset->get_banknum(preset);
}
inline int fluid_preset_get_num(fluid_preset_t* preset)
{
return preset->get_num(preset);
}
inline fluid_sfont_t* fluid_preset_get_sfont(fluid_preset_t* preset)
{
return preset->sfont;
}
inline char* fluid_sfont_get_name(fluid_sfont_t* sfont)
{
return sfont->get_name(sfont);
}
inline void fluid_sfont_iteration_start(fluid_sfont_t* sfont)
{
sfont->iteration_start(sfont);
}
// Due to the API change, we can't simply shim the 'fluid_sfont_iteration_next' function
inline fluid_preset_t* fluid_sfont_iteration_next_wrapper(fluid_sfont_t* sfont, fluid_preset_t* preset)
{
return sfont->iteration_next(sfont, preset) ? preset : nullptr;
}
#else // FLUIDSYNTH_VERSION_MAJOR < 2
#define FLUID_REVERB_DEFAULT_ROOMSIZE 0.2f
#define FLUID_REVERB_DEFAULT_DAMP 0.0f
#define FLUID_REVERB_DEFAULT_WIDTH 0.5f
#define FLUID_REVERB_DEFAULT_LEVEL 0.9f
#define FLUID_CHORUS_DEFAULT_N 3
#define FLUID_CHORUS_DEFAULT_LEVEL 2.0f
#define FLUID_CHORUS_DEFAULT_SPEED 0.3f
#define FLUID_CHORUS_DEFAULT_DEPTH 8.0f
inline fluid_preset_t* fluid_sfont_iteration_next_wrapper(fluid_sfont_t* sfont, fluid_preset_t*)
{
return fluid_sfont_iteration_next(sfont);
}
#endif // FLUIDSYNTH_VERSION_MAJOR < 2
#endif // FLUIDSYNTHSHIMS_H

View File

@@ -139,7 +139,6 @@ void patchesDialog::setup ( fluid_synth_t * pSynth, int iChan,
m_iChan = iChan;
fluid_preset_t preset;
QTreeWidgetItem *pBankItem = NULL;
// For all soundfonts (in reversed stack order) fill the available banks...
int cSoundFonts = ::fluid_synth_sfcount(m_pSynth);
@@ -147,11 +146,17 @@ void patchesDialog::setup ( fluid_synth_t * pSynth, int iChan,
fluid_sfont_t *pSoundFont = ::fluid_synth_get_sfont(m_pSynth, i);
if (pSoundFont) {
#ifdef CONFIG_FLUID_BANK_OFFSET
int iBankOffset = ::fluid_synth_get_bank_offset(m_pSynth, pSoundFont->id);
int iBankOffset = ::fluid_synth_get_bank_offset(m_pSynth, fluid_sfont_get_id(pSoundFont));
#endif
pSoundFont->iteration_start(pSoundFont);
while (pSoundFont->iteration_next(pSoundFont, &preset)) {
int iBank = preset.get_banknum(&preset);
fluid_sfont_iteration_start(pSoundFont);
#if FLUIDSYNTH_VERSION_MAJOR < 2
fluid_preset_t preset;
fluid_preset_t *pCurPreset = &preset;
#else
fluid_preset_t *pCurPreset;
#endif
while ((pCurPreset = fluid_sfont_iteration_next_wrapper(pSoundFont, pCurPreset))) {
int iBank = fluid_preset_get_banknum(pCurPreset);
#ifdef CONFIG_FLUID_BANK_OFFSET
iBank += iBankOffset;
#endif
@@ -169,9 +174,9 @@ void patchesDialog::setup ( fluid_synth_t * pSynth, int iChan,
m_iBank = 0;
fluid_preset_t *pPreset = ::fluid_synth_get_channel_preset(m_pSynth, m_iChan);
if (pPreset) {
m_iBank = pPreset->get_banknum(pPreset);
m_iBank = fluid_preset_get_banknum(pPreset);
#ifdef CONFIG_FLUID_BANK_OFFSET
m_iBank += ::fluid_synth_get_bank_offset(m_pSynth, (pPreset->sfont)->id);
m_iBank += ::fluid_synth_get_bank_offset(m_pSynth, fluid_sfont_get_id(fluid_preset_get_sfont(sfont)));
#endif
}
@@ -182,7 +187,7 @@ void patchesDialog::setup ( fluid_synth_t * pSynth, int iChan,
// Set the selected program.
if (pPreset)
m_iProg = pPreset->get_num(pPreset);
m_iProg = fluid_preset_get_num(pPreset);
QTreeWidgetItem *pProgItem = findProgItem(m_iProg);
m_progListView->setCurrentItem(pProgItem);
m_progListView->scrollToItem(pProgItem);
@@ -308,7 +313,6 @@ void patchesDialog::bankChanged (void)
// Clear up the program listview.
m_progListView->setSortingEnabled(false);
m_progListView->clear();
fluid_preset_t preset;
QTreeWidgetItem *pProgItem = NULL;
// For all soundfonts (in reversed stack order) fill the available programs...
int cSoundFonts = ::fluid_synth_sfcount(m_pSynth);
@@ -316,23 +320,29 @@ void patchesDialog::bankChanged (void)
fluid_sfont_t *pSoundFont = ::fluid_synth_get_sfont(m_pSynth, i);
if (pSoundFont) {
#ifdef CONFIG_FLUID_BANK_OFFSET
int iBankOffset = ::fluid_synth_get_bank_offset(m_pSynth, pSoundFont->id);
int iBankOffset = ::fluid_synth_get_bank_offset(m_pSynth, fluid_sfont_get_id(pSoundFont));
#endif
pSoundFont->iteration_start(pSoundFont);
while (pSoundFont->iteration_next(pSoundFont, &preset)) {
int iBank = preset.get_banknum(&preset);
fluid_sfont_iteration_start(pSoundFont);
#if FLUIDSYNTH_VERSION_MAJOR < 2
fluid_preset_t preset;
fluid_preset_t *pCurPreset = &preset;
#else
fluid_preset_t *pCurPreset;
#endif
while ((pCurPreset = fluid_sfont_iteration_next_wrapper(pSoundFont, pCurPreset))) {
int iBank = fluid_preset_get_banknum(pCurPreset);
#ifdef CONFIG_FLUID_BANK_OFFSET
iBank += iBankOffset;
#endif
int iProg = preset.get_num(&preset);
int iProg = fluid_preset_get_num(pCurPreset);
if (iBank == iBankSelected && !findProgItem(iProg)) {
pProgItem = new patchItem(m_progListView, pProgItem);
if (pProgItem) {
pProgItem->setText(0, QString::number(iProg));
pProgItem->setText(1, preset.get_name(&preset));
//pProgItem->setText(2, QString::number(pSoundFont->id));
pProgItem->setText(1, fluid_preset_get_name(pCurPreset));
//pProgItem->setText(2, QString::number(fluid_sfont_get_id(pSoundFont)));
//pProgItem->setText(3, QFileInfo(
// pSoundFont->get_name(pSoundFont)).baseName());
// fluid_sfont_get_name(pSoundFont).baseName());
}
}
}

View File

@@ -29,7 +29,7 @@
#include "ui_patches_dialog.h"
#include "LcdSpinBox.h"
#include <fluidsynth.h>
#include "fluidsynthshims.h"
#include <QWidget>
#include <QLabel>

View File

@@ -128,6 +128,29 @@ sf2Instrument::sf2Instrument( InstrumentTrack * _instrument_track ) :
// everytime we load a new soundfont.
m_synth = new_fluid_synth( m_settings );
#if FLUIDSYNTH_VERSION_MAJOR >= 2
// Get the default values from the setting
double settingVal;
fluid_settings_getnum_default(m_settings, "synth.reverb.room-size", &settingVal);
m_reverbRoomSize.setInitValue(settingVal);
fluid_settings_getnum_default(m_settings, "synth.reverb.damping", &settingVal);
m_reverbDamping.setInitValue(settingVal);
fluid_settings_getnum_default(m_settings, "synth.reverb.width", &settingVal);
m_reverbWidth.setInitValue(settingVal);
fluid_settings_getnum_default(m_settings, "synth.reverb.level", &settingVal);
m_reverbLevel.setInitValue(settingVal);
fluid_settings_getnum_default(m_settings, "synth.chorus.nr", &settingVal);
m_chorusNum.setInitValue(settingVal);
fluid_settings_getnum_default(m_settings, "synth.chorus.level", &settingVal);
m_chorusLevel.setInitValue(settingVal);
fluid_settings_getnum_default(m_settings, "synth.chorus.speed", &settingVal);
m_chorusSpeed.setInitValue(settingVal);
fluid_settings_getnum_default(m_settings, "synth.chorus.depth", &settingVal);
m_chorusDepth.setInitValue(settingVal);
#endif
loadFile( ConfigManager::inst()->defaultSoundfont() );
updateSampleRate();
@@ -393,7 +416,6 @@ QString sf2Instrument::getCurrentPatchName()
int iBankSelected = m_bankNum.value();
int iProgSelected = m_patchNum.value();
fluid_preset_t preset;
// For all soundfonts (in reversed stack order) fill the available programs...
int cSoundFonts = ::fluid_synth_sfcount( m_synth );
for( int i = 0; i < cSoundFonts; i++ )
@@ -404,21 +426,26 @@ QString sf2Instrument::getCurrentPatchName()
#ifdef CONFIG_FLUID_BANK_OFFSET
int iBankOffset =
fluid_synth_get_bank_offset(
m_synth, pSoundFont->id );
m_synth, fluid_sfont_get_id(pSoundFont) );
#endif
pSoundFont->iteration_start( pSoundFont );
while( pSoundFont->iteration_next( pSoundFont,
&preset ) )
fluid_sfont_iteration_start( pSoundFont );
#if FLUIDSYNTH_VERSION_MAJOR < 2
fluid_preset_t preset;
fluid_preset_t *pCurPreset = &preset;
#else
fluid_preset_t *pCurPreset;
#endif
while ((pCurPreset = fluid_sfont_iteration_next_wrapper(pSoundFont, pCurPreset)))
{
int iBank = preset.get_banknum( &preset );
int iBank = fluid_preset_get_banknum( pCurPreset );
#ifdef CONFIG_FLUID_BANK_OFFSET
iBank += iBankOffset;
#endif
int iProg = preset.get_num( &preset );
int iProg = fluid_preset_get_num( pCurPreset );
if( iBank == iBankSelected && iProg ==
iProgSelected )
{
return preset.get_name( &preset );
return fluid_preset_get_name( pCurPreset );
}
}
}

View File

@@ -36,7 +36,7 @@
#include "Knob.h"
#include "LcdSpinBox.h"
#include "LedCheckbox.h"
#include "fluidsynth.h"
#include "fluidsynthshims.h"
#include "MemoryManager.h"
class sf2InstrumentView;

View File

@@ -51,6 +51,7 @@
#include "GuiApplication.h"
#include "PixmapButton.h"
#include "SampleBuffer.h"
#include "Song.h"
#include "StringPairDrag.h"
#include "TextFloat.h"
#include "ToolTip.h"
@@ -365,7 +366,7 @@ void vestigeInstrument::loadFile( const QString & _file )
void vestigeInstrument::play( sampleFrame * _buf )
{
if (!m_pluginMutex.tryLock()) {return;}
if (!m_pluginMutex.tryLock(Engine::getSong()->isExporting() ? -1 : 0)) {return;}
const fpp_t frames = Engine::mixer()->framesPerPeriod();

View File

@@ -40,6 +40,7 @@
#include "InstrumentPlayHandle.h"
#include "InstrumentTrack.h"
#include "gui_templates.h"
#include "Song.h"
#include "StringPairDrag.h"
#include "RemoteZynAddSubFx.h"
#include "LocalZynAddSubFx.h"
@@ -324,7 +325,7 @@ QString ZynAddSubFxInstrument::nodeName() const
void ZynAddSubFxInstrument::play( sampleFrame * _buf )
{
if (!m_pluginMutex.tryLock()) {return;}
if (!m_pluginMutex.tryLock(Engine::getSong()->isExporting() ? -1 : 0)) {return;}
if( m_remotePlugin )
{
m_remotePlugin->process( NULL, _buf );

View File

@@ -95,10 +95,13 @@ tact_t BBTrackContainer::lengthOfBB( int _bb ) const
MidiTime max_length = MidiTime::ticksPerTact();
const TrackList & tl = tracks();
for( TrackList::const_iterator it = tl.begin(); it != tl.end(); ++it )
for (Track* t : tl)
{
max_length = qMax( max_length,
( *it )->getTCO( _bb )->length() );
// Don't create TCOs here if not exist
if (_bb < t->numOfTCOs())
{
max_length = qMax(max_length, t->getTCO( _bb )->length());
}
}
return max_length.nextFullTact();

View File

@@ -53,7 +53,7 @@ EffectChain::~EffectChain()
void EffectChain::saveSettings( QDomDocument & _doc, QDomElement & _this )
{
_this.setAttribute( "enabled", m_enabledModel.value() );
m_enabledModel.saveSettings( _doc, _this, "enabled" );
_this.setAttribute( "numofeffects", m_effects.count() );
for( Effect* effect : m_effects)
@@ -80,7 +80,7 @@ void EffectChain::loadSettings( const QDomElement & _this )
// TODO This method should probably also lock the mixer
m_enabledModel.setValue( _this.attribute( "enabled" ).toInt() );
m_enabledModel.loadSettings( _this, "enabled" );
const int plugin_cnt = _this.attribute( "numofeffects" ).toInt();

View File

@@ -577,7 +577,8 @@ void Mixer::changeQuality( const struct qualitySettings & _qs )
void Mixer::setAudioDevice( AudioDevice * _dev )
void Mixer::setAudioDevice( AudioDevice * _dev,
bool startNow )
{
stopProcessing();
@@ -594,7 +595,7 @@ void Mixer::setAudioDevice( AudioDevice * _dev )
emit sampleRateChanged();
startProcessing();
if (startNow) {startProcessing();}
}
@@ -602,7 +603,8 @@ void Mixer::setAudioDevice( AudioDevice * _dev )
void Mixer::setAudioDevice( AudioDevice * _dev,
const struct qualitySettings & _qs,
bool _needs_fifo )
bool _needs_fifo,
bool startNow )
{
// don't delete the audio-device
stopProcessing();
@@ -623,7 +625,7 @@ void Mixer::setAudioDevice( AudioDevice * _dev,
emit qualitySettingsChanged();
emit sampleRateChanged();
startProcessing( _needs_fifo );
if (startNow) {startProcessing( _needs_fifo );}
}

View File

@@ -152,7 +152,7 @@ void ProjectRenderer::startProcessing()
// Have to do mixer stuff with GUI-thread affinity in order to
// make slots connected to sampleRateChanged()-signals being called immediately.
Engine::mixer()->setAudioDevice( m_fileDev,
m_qualitySettings, false );
m_qualitySettings, false, false );
start(
#ifndef LMMS_BUILD_WIN32
@@ -193,6 +193,9 @@ void ProjectRenderer::run()
tick_t endTick = exportEndpoints.second.getTicks();
tick_t lengthTicks = endTick - startTick;
// Now start processing
Engine::mixer()->startProcessing(false);
// Continually track and emit progress percentage to listeners.
while( exportPos.getTicks() < endTick &&
Engine::getSong()->isExporting() == true

View File

@@ -285,7 +285,6 @@ void SampleBuffer::update( bool _keep_settings )
else
{
fprintf( stderr, "%s\n", message.toUtf8().constData() );
exit( EXIT_FAILURE );
}
}
}

View File

@@ -346,9 +346,7 @@ void Song::processNextBuffer()
m_vstSyncController.setAbsolutePosition( ticks );
m_vstSyncController.setPlaybackJumped( true );
}
else if( m_playPos[m_playMode] == tl->loopEnd() - 1 )
{
emit updateSampleTracks();
}
}

View File

@@ -2125,8 +2125,9 @@ void Track::saveSettings( QDomDocument & doc, QDomElement & element )
}
element.setAttribute( "type", type() );
element.setAttribute( "name", name() );
element.setAttribute( "muted", isMuted() );
element.setAttribute( "solo", isSolo() );
m_mutedModel.saveSettings( doc, element, "muted" );
m_soloModel.saveSettings( doc, element, "solo" );
if( m_height >= MINIMAL_TRACK_HEIGHT )
{
element.setAttribute( "trackheight", m_height );
@@ -2178,8 +2179,8 @@ void Track::loadSettings( const QDomElement & element )
setName( element.hasAttribute( "name" ) ? element.attribute( "name" ) :
element.firstChild().toElement().attribute( "name" ) );
setMuted( element.attribute( "muted" ).toInt() );
setSolo( element.attribute( "solo" ).toInt() );
m_mutedModel.loadSettings( element, "muted" );
m_soloModel.loadSettings( element, "solo" );
if( m_simpleSerializingMode )
{
@@ -2212,8 +2213,9 @@ void Track::loadSettings( const QDomElement & element )
{
loadTrackSpecificSettings( node.toElement() );
}
else if(
!node.toElement().attribute( "metadata" ).toInt() )
else if( node.nodeName() != "muted"
&& node.nodeName() != "solo"
&& !node.toElement().attribute( "metadata" ).toInt() )
{
TrackContentObject * tco = createTCO(
MidiTime( 0 ) );

View File

@@ -804,7 +804,7 @@ int main( int argc, char * * argv )
) );
mb.setIcon( QMessageBox::Warning );
mb.setWindowIcon( embed::getIconPixmap( "icon" ) );
mb.setWindowIcon( embed::getIconPixmap( "icon_small" ) );
mb.setWindowFlags( Qt::WindowCloseButtonHint );
QPushButton * recover;

View File

@@ -266,7 +266,7 @@ MainWindow::~MainWindow()
void MainWindow::finalize()
{
resetWindowTitle();
setWindowIcon( embed::getIconPixmap( "icon" ) );
setWindowIcon( embed::getIconPixmap( "icon_small" ) );
// project-popup-menu
@@ -414,7 +414,7 @@ void MainWindow::finalize()
#if !(defined(LMMS_BUILD_APPLE) && (QT_VERSION < 0x050600))
help_menu->addSeparator();
#endif
help_menu->addAction( embed::getIconPixmap( "icon" ), tr( "About" ),
help_menu->addAction( embed::getIconPixmap( "icon_small" ), tr( "About" ),
this, SLOT( aboutLMMS() ) );
// create tool-buttons

View File

@@ -250,7 +250,25 @@ void BBTrackContainerView::dropEvent(QDropEvent* de)
DataFile dataFile( value.toUtf8() );
Track * t = Track::create( dataFile.content().firstChild().toElement(), model() );
t->deleteTCOs();
// Ensure BB TCOs exist
bool hasValidBBTCOs = false;
if (t->getTCOs().size() == m_bbtc->numOfBBs())
{
hasValidBBTCOs = true;
for (int i = 0; i < t->getTCOs().size(); ++i)
{
if (t->getTCOs()[i]->startPosition() != MidiTime(i, 0))
{
hasValidBBTCOs = false;
break;
}
}
}
if (!hasValidBBTCOs)
{
t->deleteTCOs();
t->createTCOsForBB(m_bbtc->numOfBBs() - 1);
}
m_bbtc->updateAfterTrackAdd();
de->accept();

View File

@@ -697,8 +697,7 @@ void PatternView::mousePressEvent( QMouseEvent * _me )
{
if( _me->button() == Qt::LeftButton &&
m_pat->m_patternType == Pattern::BeatPattern &&
( fixedTCOs() || pixelsPerTact() >= 96 ||
m_pat->m_steps != MidiTime::stepsPerTact() ) &&
( fixedTCOs() || pixelsPerTact() >= 96 ) &&
_me->y() > height() - s_stepBtnOff->height() )
// when mouse button is pressed in beat/bassline -mode
@@ -768,8 +767,7 @@ void PatternView::mouseDoubleClickEvent(QMouseEvent *_me)
void PatternView::wheelEvent( QWheelEvent * _we )
{
if( m_pat->m_patternType == Pattern::BeatPattern &&
( fixedTCOs() || pixelsPerTact() >= 96 ||
m_pat->m_steps != MidiTime::stepsPerTact() ) &&
( fixedTCOs() || pixelsPerTact() >= 96 ) &&
_we->y() > height() - s_stepBtnOff->height() )
{
// get the step number that was wheeled on and
@@ -1013,8 +1011,7 @@ void PatternView::paintEvent( QPaintEvent * )
}
// beat pattern paint event
else if( beatPattern && ( fixedTCOs() || pixelsPerTact >= 96
|| m_pat->m_steps != MidiTime::stepsPerTact() ) )
else if( beatPattern && ( fixedTCOs() || pixelsPerTact >= 96 ) )
{
QPixmap stepon0;
QPixmap stepon200;

View File

@@ -73,13 +73,16 @@ SampleTCO::SampleTCO( Track * _track ) :
connect( timeLine, SIGNAL( positionMarkerMoved() ), this, SLOT( playbackPositionChanged() ) );
}
//playbutton clicked or space key / on Export Song set isPlaying to false
connect( Engine::getSong(), SIGNAL( playbackStateChanged() ), this, SLOT( playbackPositionChanged() ) );
connect( Engine::getSong(), SIGNAL( playbackStateChanged() ),
this, SLOT( playbackPositionChanged() ), Qt::DirectConnection );
//care about loops
connect( Engine::getSong(), SIGNAL( updateSampleTracks() ), this, SLOT( playbackPositionChanged() ) );
connect( Engine::getSong(), SIGNAL( updateSampleTracks() ),
this, SLOT( playbackPositionChanged() ), Qt::DirectConnection );
//care about mute TCOs
connect( this, SIGNAL( dataChanged() ), this, SLOT( playbackPositionChanged() ) );
//care about mute track
connect( getTrack()->getMutedModel(), SIGNAL( dataChanged() ),this, SLOT( playbackPositionChanged() ) );
connect( getTrack()->getMutedModel(), SIGNAL( dataChanged() ),
this, SLOT( playbackPositionChanged() ), Qt::DirectConnection );
//care about TCO position
connect( this, SIGNAL( positionChanged() ), this, SLOT( updateTrackTcos() ) );