From f8df60a9e661b0ed8311a1125d176fd9e18df9ec Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Sun, 23 Mar 2025 19:19:03 -0400 Subject: [PATCH 1/8] Add 150% and 250% options to "View > UI scale" menu. --- src/app/MenuBar.cpp | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/app/MenuBar.cpp b/src/app/MenuBar.cpp index 04072baf..092e1d22 100644 --- a/src/app/MenuBar.cpp +++ b/src/app/MenuBar.cpp @@ -422,10 +422,19 @@ struct ViewButton : MenuButton { } })); - menu->addChild(createIndexPtrSubmenuItem(string::translate("MenuBar.view.pixelRatio"), { - string::translate("MenuBar.view.pixelRatio.auto"), - "100%", "200%", "300%" - }, &settings::pixelRatio)); + static const std::vector pixelRatios = {0, 1, 1.5, 2, 2.5, 3}; + std::vector pixelRatioLabels; + for (float pixelRatio : pixelRatios) { + pixelRatioLabels.push_back(pixelRatio == 0.f ? string::translate("MenuBar.view.pixelRatio.auto") : string::f("%0.f%%", pixelRatio * 100.f)); + } + menu->addChild(createIndexSubmenuItem(string::translate("MenuBar.view.pixelRatio"), pixelRatioLabels, [=]() -> size_t { + auto it = std::find(pixelRatios.begin(), pixelRatios.end(), settings::pixelRatio); + if (it == pixelRatios.end()) + return -1; + return it - pixelRatios.begin(); + }, [=](size_t i) { + settings::pixelRatio = pixelRatios[i]; + })); ZoomSlider* zoomSlider = new ZoomSlider; zoomSlider->box.size.x = 250.0; From 4acf0834ebe1b841c8d555b31bcf75310ff7338e Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Tue, 25 Mar 2025 17:00:29 -0400 Subject: [PATCH 2/8] Build libarchive with Windows 7 minimum version. --- dep/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dep/Makefile b/dep/Makefile index 5b35bb95..f016299e 100755 --- a/dep/Makefile +++ b/dep/Makefile @@ -167,7 +167,7 @@ libarchive-3.7.7: $(libarchive): | $(zstd) libarchive-3.7.7 #cd libarchive-3.7.7 && $(CONFIGURE) --enable-shared=no --enable-static=yes --disable-bsdtar --disable-bsdcat --disable-bsdcpio --disable-posix-regex-lib --disable-xattr --disable-acl --without-zlib --without-bz2lib --without-libb2 --without-iconv --without-lz4 --without-lzma --without-cng --without-openssl --without-xml2 --without-expat cd libarchive-3.7.7 && mkdir -p build - cd libarchive-3.7.7/build && $(CMAKE) -DBUILD_TESTING=OFF -DBUILD_SHARED_LIBS=OFF -DENABLE_ACL=OFF -DENABLE_BZip2=OFF -DENABLE_CAT=OFF -DENABLE_CNG=OFF -DENABLE_COVERAGE=OFF -DENABLE_CPIO=OFF -DENABLE_EXPAT=OFF -DENABLE_ICONV=OFF -DENABLE_LIBB2=OFF -DENABLE_LIBXML2=OFF -DENABLE_LZ4=OFF -DENABLE_LZMA=OFF -DENABLE_LZO=OFF -DENABLE_MBEDTLS=OFF -DENABLE_NETTLE=OFF -DENABLE_OPENSSL=OFF -DENABLE_TAR=OFF -DENABLE_TEST=OFF -DENABLE_UNZIP=OFF -DENABLE_WERROR=OFF -DENABLE_XATTR=OFF -DENABLE_ZLIB=OFF -DENABLE_ZSTD=ON -DZSTD_INCLUDE_DIR:PATH=$(DEP_PATH)/include -DZSTD_LIBRARY=$(DEP_PATH)/lib/libzstd.a .. + cd libarchive-3.7.7/build && $(CMAKE) -DBUILD_TESTING=OFF -DBUILD_SHARED_LIBS=OFF -DENABLE_ACL=OFF -DENABLE_BZip2=OFF -DENABLE_CAT=OFF -DENABLE_CNG=OFF -DENABLE_COVERAGE=OFF -DENABLE_CPIO=OFF -DENABLE_EXPAT=OFF -DENABLE_ICONV=OFF -DENABLE_LIBB2=OFF -DENABLE_LIBXML2=OFF -DENABLE_LZ4=OFF -DENABLE_LZMA=OFF -DENABLE_LZO=OFF -DENABLE_MBEDTLS=OFF -DENABLE_NETTLE=OFF -DENABLE_OPENSSL=OFF -DENABLE_TAR=OFF -DENABLE_TEST=OFF -DENABLE_UNZIP=OFF -DENABLE_WERROR=OFF -DENABLE_XATTR=OFF -DENABLE_ZLIB=OFF -DENABLE_ZSTD=ON -DWINDOWS_VERSION="WIN7" -DZSTD_INCLUDE_DIR:PATH=$(DEP_PATH)/include -DZSTD_LIBRARY=$(DEP_PATH)/lib/libzstd.a .. $(MAKE) -C libarchive-3.7.7/build $(MAKE) -C libarchive-3.7.7/build install From f881348a9e3ff8167c673f7a8cf5a43c5b673c8a Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Tue, 25 Mar 2025 17:13:33 -0400 Subject: [PATCH 3/8] Rename VERSION to RACK_VERSION in Makefile to avoid environment variable conflicts. --- Info.plist | 4 ++-- Makefile | 20 ++++++++++---------- installer.nsi | 12 ++++++------ src/common.cpp | 2 +- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/Info.plist b/Info.plist index 52c26b06..673aa958 100644 --- a/Info.plist +++ b/Info.plist @@ -7,12 +7,12 @@ CFBundleNameVCV Rack 2 Free CFBundleDisplayNameVCV Rack 2 Free CFBundleIdentifiercom.vcvrack.rack2 - CFBundleVersion{VERSION} + CFBundleVersion{RACK_VERSION} CFBundlePackageTypeAPPL CFBundleSignatureRACK CFBundleExecutableRack CFBundleIconFileicon - CFBundleShortVersionString{VERSION} + CFBundleShortVersionString{RACK_VERSION} NSHumanReadableCopyrightCopyright © VCV NSPrincipalClassNSApplication NSHighResolutionCapable diff --git a/Makefile b/Makefile index 1d6accc6..2699aee2 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ RACK_DIR ?= . -EDITION := Free -VERSION_MAJOR := 2 -VERSION ?= $(patsubst v%,%,$(shell git describe --tags --match "v$(VERSION_MAJOR).*")) +RACK_EDITION := Free +RACK_VERSION_MAJOR := 2 +RACK_VERSION ?= $(patsubst v%,%,$(shell git describe --tags --match "v$(RACK_VERSION_MAJOR).*")) FLAGS += -Iinclude -Idep/include @@ -17,7 +17,7 @@ SOURCES += dep/tinyexpr/tinyexpr.c SOURCES += $(wildcard src/*.c src/*/*.c) SOURCES += $(wildcard src/*.cpp src/*/*.cpp) -build/src/common.cpp.o: FLAGS += -D_APP_VERSION=$(VERSION) +build/src/common.cpp.o: FLAGS += -D_RACK_VERSION=$(RACK_VERSION) build/dep/tinyexpr/tinyexpr.c.o: FLAGS += -DTE_POW_FROM_RIGHT -DTE_NAT_LOG FLAGS += -fPIC @@ -164,17 +164,17 @@ endif # The following targets are not supported for public use -DIST_NAME = Rack$(EDITION)-$(VERSION)-$(ARCH_NAME) +DIST_NAME = Rack$(RACK_EDITION)-$(RACK_VERSION)-$(ARCH_NAME) ifdef ARCH_MAC - DIST_BUNDLE := VCV Rack $(VERSION_MAJOR) $(EDITION).app + DIST_BUNDLE := VCV Rack $(RACK_VERSION_MAJOR) $(RACK_EDITION).app else - DIST_DIR := Rack$(VERSION_MAJOR)$(EDITION) + DIST_DIR := Rack$(RACK_VERSION_MAJOR)$(RACK_EDITION) endif DIST_MD := $(wildcard *.md) DIST_HTML := $(patsubst %.md, build/%.html, $(DIST_MD)) DIST_RES := res cacert.pem Core.json template.vcv LICENSE-GPLv3.txt $(DIST_HTML) translations DIST_SDK_DIR := Rack-SDK -DIST_SDK = Rack-SDK-$(VERSION)-$(ARCH_NAME).zip +DIST_SDK = Rack-SDK-$(RACK_VERSION)-$(ARCH_NAME).zip FUNDAMENTAL_VERSION ?= 2.6.1 FUNDAMENTAL_FILENAME := Fundamental-$(FUNDAMENTAL_VERSION)-$(ARCH_NAME).vcvplugin @@ -211,7 +211,7 @@ ifdef ARCH_MAC otool -L dist/"$(DIST_BUNDLE)"/Contents/MacOS/$(STANDALONE_TARGET) # Copy resources cp Info.plist dist/"$(DIST_BUNDLE)"/Contents/ - $(SED) 's/{VERSION}/$(VERSION)/g' dist/"$(DIST_BUNDLE)"/Contents/Info.plist + $(SED) 's/{RACK_VERSION}/$(RACK_VERSION)/g' dist/"$(DIST_BUNDLE)"/Contents/Info.plist cp -R icon.icns dist/"$(DIST_BUNDLE)"/Contents/Resources/ cp -R $(DIST_RES) dist/"$(DIST_BUNDLE)"/Contents/Resources/ cp "$(FUNDAMENTAL_FILENAME)" dist/"$(DIST_BUNDLE)"/Contents/Resources/ @@ -273,7 +273,7 @@ endif ifdef ARCH_WIN # Make NSIS installer # pacman -S mingw-w64-x86_64-nsis - makensis -DVERSION_MAJOR=$(VERSION_MAJOR) -DVERSION=$(VERSION) "-XOutFile dist/$(DIST_NAME).exe" installer.nsi + makensis -DRACK_VERSION_MAJOR=$(RACK_VERSION_MAJOR) -DRACK_VERSION=$(RACK_VERSION) "-XOutFile dist/$(DIST_NAME).exe" installer.nsi endif diff --git a/installer.nsi b/installer.nsi index 1c28be6a..870451cb 100644 --- a/installer.nsi +++ b/installer.nsi @@ -1,10 +1,10 @@ !include "MUI2.nsh" -!define NAME_FULL "VCV Rack Free ${VERSION}" -!define NAME "VCV Rack ${VERSION_MAJOR} Free" -!define RACK_DIR "Rack${VERSION_MAJOR}Free" -!define INSTALL_REG "Software\VCV\Rack${VERSION_MAJOR}Free" -!define UNINSTALL_REG "Software\Microsoft\Windows\CurrentVersion\Uninstall\VCVRack${VERSION_MAJOR}Free" +!define NAME_FULL "VCV Rack Free ${RACK_VERSION}" +!define NAME "VCV Rack ${RACK_VERSION_MAJOR} Free" +!define RACK_DIR "Rack${RACK_VERSION_MAJOR}Free" +!define INSTALL_REG "Software\VCV\Rack${RACK_VERSION_MAJOR}Free" +!define UNINSTALL_REG "Software\Microsoft\Windows\CurrentVersion\Uninstall\VCVRack${RACK_VERSION_MAJOR}Free" Name "${NAME_FULL}" Unicode True @@ -94,7 +94,7 @@ Section "${NAME}" INSTALL_SECTION ; Write uninstaller info WriteRegStr HKLM "${UNINSTALL_REG}" "DisplayName" "${NAME}" WriteRegStr HKLM "${UNINSTALL_REG}" "DisplayIcon" '"$INSTDIR\Rack.exe"' - WriteRegStr HKLM "${UNINSTALL_REG}" "DisplayVersion" "${VERSION}" + WriteRegStr HKLM "${UNINSTALL_REG}" "DisplayVersion" "${RACK_VERSION}" WriteRegStr HKLM "${UNINSTALL_REG}" "UninstallString" '"$INSTDIR\Uninstall.exe"' WriteRegStr HKLM "${UNINSTALL_REG}" "QuietUninstallString" '"$INSTDIR\Uninstall.exe" /S' WriteRegStr HKLM "${UNINSTALL_REG}" "InstallLocation" '"$INSTDIR"' diff --git a/src/common.cpp b/src/common.cpp index 4f2869c0..aad8aeab 100644 --- a/src/common.cpp +++ b/src/common.cpp @@ -19,7 +19,7 @@ const std::string APP_NAME = "VCV Rack"; const std::string APP_EDITION = "Free"; const std::string APP_EDITION_NAME = "Free"; const std::string APP_VERSION_MAJOR = "2"; -const std::string APP_VERSION = TOSTRING(_APP_VERSION); +const std::string APP_VERSION = TOSTRING(_RACK_VERSION); #if defined ARCH_WIN const std::string APP_OS = "win"; const std::string APP_OS_NAME = "Windows"; From 96054a0b5ef48b94248f2cebde0b7b81e30ce3a0 Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Tue, 25 Mar 2025 17:22:33 -0400 Subject: [PATCH 4/8] Rack no longer needs Controlled Folder Access to Documents on Windows since Rack 2.5.0. --- installer.nsi | 4 ---- 1 file changed, 4 deletions(-) diff --git a/installer.nsi b/installer.nsi index 870451cb..748b4967 100644 --- a/installer.nsi +++ b/installer.nsi @@ -115,10 +115,6 @@ Section "${NAME}" INSTALL_SECTION ; Create shortcuts CreateShortcut "$DESKTOP\${NAME}.lnk" "$INSTDIR\Rack.exe" CreateShortcut "$SMPROGRAMS\${NAME}.lnk" "$INSTDIR\Rack.exe" - - ; Add allowed app to Controlled Folder Access - ExpandEnvStrings $0 "%COMSPEC%" - ExecShellWait "" '"$0"' "/C powershell -ExecutionPolicy Bypass -WindowStyle Hidden $\"Add-MpPreference -ControlledFolderAccessAllowedApplications '$INSTDIR\Rack.exe'$\"" SW_HIDE SectionEnd From 844b45057f78ecab6edf42b51fc13bb039d7ccea Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Wed, 26 Mar 2025 21:31:32 -0400 Subject: [PATCH 5/8] MIDI-Map: Set param value without Engine smoothing, since MIDI-Map already filters it. --- src/core/MIDIMap.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/core/MIDIMap.cpp b/src/core/MIDIMap.cpp index 70f7431a..4bed567f 100644 --- a/src/core/MIDIMap.cpp +++ b/src/core/MIDIMap.cpp @@ -115,16 +115,23 @@ struct MIDIMap : Module { if (values[cc] < 0) continue; float value = values[cc] / 127.f; - // Detect behavior from MIDI buttons. + + // Detect MIDI CC buttons if (smooth && std::fabs(valueFilters[id].out - value) < 1.f) { // Smooth value with filter - valueFilters[id].process(args.sampleTime * divider.getDivision(), value); + value = valueFilters[id].process(args.sampleTime * divider.getDivision(), value); } else { - // Jump value + // Jump filter value, don't filter valueFilters[id].out = value; } - paramQuantity->setScaledValue(valueFilters[id].out); + + // Scale and snap value based on ParamQuantity + value = paramQuantity->fromScaled(value); + if (paramQuantity->snapEnabled) + value = std::round(value); + // Set param value without Engine smoothing, since it is already filtered. + APP->engine->setParamValue(module, paramId, value); } } From 2cc7d4e002f49b5e30270961ddcd95589d95a6a9 Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Wed, 26 Mar 2025 22:10:55 -0400 Subject: [PATCH 6/8] Update changelog. --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9cffcf34..64f5a482 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ In this document, Ctrl means Command (⌘) on Mac. +### 2.5.3 (2025-03-26) +- Fix failure to launch on Windows 7. +- Rack Pro + - Audio Unit: Fix crash when sending multiple MIDI CC messages to plugin simultaneously. + ### 2.6.2 (2025-03-17) - Fix incorrect audio driver being loaded from patches made in Rack ≤2.6.0. - Fix Mac installer creating duplicate app bundle. From e3ebe33f5e4ca7a77436dfe16cb47b8701ccc024 Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Thu, 27 Mar 2025 10:34:10 -0400 Subject: [PATCH 7/8] Update changelog. --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 64f5a482..fecfdba9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ In this document, Ctrl means Command (⌘) on Mac. ### 2.5.3 (2025-03-26) - Fix failure to launch on Windows 7. - Rack Pro - - Audio Unit: Fix crash when sending multiple MIDI CC messages to plugin simultaneously. + - Audio Unit: Fix crash when controlling multiple parameters with *VCV MIDI Map*. ### 2.6.2 (2025-03-17) - Fix incorrect audio driver being loaded from patches made in Rack ≤2.6.0. From d676da3da726f76d6790775883c6b0c5f7faa86e Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Thu, 27 Mar 2025 13:49:43 -0400 Subject: [PATCH 8/8] Fix version number in changelog. --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fecfdba9..98c3face 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ In this document, Ctrl means Command (⌘) on Mac. -### 2.5.3 (2025-03-26) +### 2.6.3 (2025-03-26) - Fix failure to launch on Windows 7. - Rack Pro - Audio Unit: Fix crash when controlling multiple parameters with *VCV MIDI Map*.