From 0ebe24939d04f2620f09a87e5055dc81ca6b890c Mon Sep 17 00:00:00 2001 From: Jean Pierre Cimalando Date: Mon, 27 Jul 2020 16:23:28 +0200 Subject: [PATCH] CC number oopsie --- src/sfizz/modulations/ModKey.cpp | 2 +- src/sfizz/modulations/ModKey.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sfizz/modulations/ModKey.cpp b/src/sfizz/modulations/ModKey.cpp index 3a865bd7..fc60df9c 100644 --- a/src/sfizz/modulations/ModKey.cpp +++ b/src/sfizz/modulations/ModKey.cpp @@ -12,7 +12,7 @@ namespace sfz { -ModKey ModKey::createCC(uint8_t cc, uint8_t curve, uint8_t smooth, float value, float step) +ModKey ModKey::createCC(uint16_t cc, uint8_t curve, uint8_t smooth, float value, float step) { ModKey::Parameters p; p.cc = cc; diff --git a/src/sfizz/modulations/ModKey.h b/src/sfizz/modulations/ModKey.h index e70c244d..3fd5d470 100644 --- a/src/sfizz/modulations/ModKey.h +++ b/src/sfizz/modulations/ModKey.h @@ -27,7 +27,7 @@ public: explicit ModKey(ModId id, NumericId region = {}, Parameters params = {}) : id_(id), region_(region), params_(params) {} - static ModKey createCC(uint8_t cc, uint8_t curve, uint8_t smooth, float value, float step); + static ModKey createCC(uint16_t cc, uint8_t curve, uint8_t smooth, float value, float step); static ModKey createNXYZ(ModId id, NumericId region, uint8_t N = 0, uint8_t X = 0, uint8_t Y = 0, uint8_t Z = 0); explicit operator bool() const noexcept { return id_ != ModId(); } @@ -45,7 +45,7 @@ public: Parameters() { std::memset(this, 0, sizeof(*this)); } union { //! Parameters if this key identifies a CC source - struct { uint8_t cc, curve, smooth; float value, step; }; + struct { uint16_t cc; uint8_t curve, smooth; float value, step; }; //! Parameters otherwise, based on the related opcode // eg. `N` in `lfoN`, `N, X` in `lfoN_eqX` struct { uint8_t N, X, Y, Z; };