Skip to content

Commit

Permalink
Fix wrong default initialization value for ctrl 8 (Balance)
Browse files Browse the repository at this point in the history
Fix #35
  • Loading branch information
pedrolcl committed Dec 28, 2024
1 parent beda54d commit 37a4c2a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ with this program; If not, see <http://www.gnu.org/licenses/>.
cmake_minimum_required(VERSION 3.16)

project( VMPK
VERSION 0.9.1
VERSION 0.9.2
LANGUAGES CXX
DESCRIPTION "Virtual MIDI Piano Keyboard"
HOMEPAGE_URL "https://vmpk.sourceforge.io/"
Expand Down
2 changes: 1 addition & 1 deletion src/constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ const char MIDICTLDEFVALUE[] = "MIDICTLDEFVAL\0";
const int MIDIGMDRUMSCHANNEL = 9;
const int MIDICHANNELS = 16;
const int MIDIVELOCITY = 100;
const int MIDIPAN = 64;
const int MIDIMIDVALUE = 64;
const int MIDIVOLUME = 100;
const int MIDIMAXVALUE = 127;
const int DEFAULTBASEOCTAVE = 3;
Expand Down
9 changes: 5 additions & 4 deletions src/mididefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,10 @@
#define CALC_LSB(x) (x % 0x80)
#define CALC_MSB(x) (x / 0x80)

#define CTL_VOLUME 7
#define CTL_PAN 10
#define CTL_EXPRESSION 11
#define CTL_REVERB_SEND 91
#define CTL_VOLUME 7
#define CTL_BALANCE 8
#define CTL_PAN 10
#define CTL_EXPRESSION 11
#define CTL_REVERB_SEND 91

#endif /* MIDIDEFS_H */
5 changes: 4 additions & 1 deletion src/vpiano.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1272,8 +1272,11 @@ void VPiano::initControllers(int channel)
case CTL_VOLUME:
m_ctlState[channel][CTL_VOLUME] = MIDIVOLUME;
break;
case CTL_BALANCE:
m_ctlState[channel][CTL_BALANCE] = MIDIMIDVALUE;
break;
case CTL_PAN:
m_ctlState[channel][CTL_PAN] = MIDIPAN;
m_ctlState[channel][CTL_PAN] = MIDIMIDVALUE;
break;
case CTL_EXPRESSION:
m_ctlState[channel][CTL_EXPRESSION] = MIDIMAXVALUE;
Expand Down

0 comments on commit 37a4c2a

Please sign in to comment.