summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrekado <rekado@elephly.net>2013-01-19 21:37:44 +0800
committerrekado <rekado@elephly.net>2013-01-19 21:57:22 +0800
commita57c0bd136cf030ecca2d36319d342f911695656 (patch)
tree9e220191296848a06813d7751e2f61a8d36445c4 /src
parent3067baf6d723ce5335769379a8f42446b27e93ea (diff)
do not hard-code pos and end
Diffstat (limited to 'src')
-rw-r--r--src/mdaPiano.cpp33
1 files changed, 16 insertions, 17 deletions
diff --git a/src/mdaPiano.cpp b/src/mdaPiano.cpp
index 48747bb..9ecbc3e 100644
--- a/src/mdaPiano.cpp
+++ b/src/mdaPiano.cpp
@@ -169,25 +169,24 @@ void mdaPiano::handle_midi(uint32_t size, unsigned char* data) {
}
-// TODO: load this from a file
+// TODO: load keymapping from a file
void mdaPiano::load_kgrp(KGRP *kgrp)
{
- //Waveform data and keymapping is hard-wired in *this* version
- kgrp[ 0].root = 36; kgrp[ 0].high = 37; kgrp[ 0].pos = 0; kgrp[ 0].end = 36275; kgrp[ 0].loop = 14774;
- kgrp[ 1].root = 40; kgrp[ 1].high = 41; kgrp[ 1].pos = 36278; kgrp[ 1].end = 83135; kgrp[ 1].loop = 16268;
- kgrp[ 2].root = 43; kgrp[ 2].high = 45; kgrp[ 2].pos = 83137; kgrp[ 2].end = 146756; kgrp[ 2].loop = 33541;
- kgrp[ 3].root = 48; kgrp[ 3].high = 49; kgrp[ 3].pos = 146758; kgrp[ 3].end = 204997; kgrp[ 3].loop = 21156;
- kgrp[ 4].root = 52; kgrp[ 4].high = 53; kgrp[ 4].pos = 204999; kgrp[ 4].end = 244908; kgrp[ 4].loop = 17191;
- kgrp[ 5].root = 55; kgrp[ 5].high = 57; kgrp[ 5].pos = 244910; kgrp[ 5].end = 290978; kgrp[ 5].loop = 23286;
- kgrp[ 6].root = 60; kgrp[ 6].high = 61; kgrp[ 6].pos = 290980; kgrp[ 6].end = 342948; kgrp[ 6].loop = 18002;
- kgrp[ 7].root = 64; kgrp[ 7].high = 65; kgrp[ 7].pos = 342950; kgrp[ 7].end = 391750; kgrp[ 7].loop = 19746;
- kgrp[ 8].root = 67; kgrp[ 8].high = 69; kgrp[ 8].pos = 391752; kgrp[ 8].end = 436915; kgrp[ 8].loop = 22253;
- kgrp[ 9].root = 72; kgrp[ 9].high = 73; kgrp[ 9].pos = 436917; kgrp[ 9].end = 468807; kgrp[ 9].loop = 8852;
- kgrp[10].root = 76; kgrp[10].high = 77; kgrp[10].pos = 468809; kgrp[10].end = 492772; kgrp[10].loop = 9693;
- kgrp[11].root = 79; kgrp[11].high = 81; kgrp[11].pos = 492774; kgrp[11].end = 532293; kgrp[11].loop = 10596;
- kgrp[12].root = 84; kgrp[12].high = 85; kgrp[12].pos = 532295; kgrp[12].end = 560192; kgrp[12].loop = 6011;
- kgrp[13].root = 88; kgrp[13].high = 89; kgrp[13].pos = 560194; kgrp[13].end = 574121; kgrp[13].loop = 3414;
- kgrp[14].root = 93; kgrp[14].high = 999; kgrp[14].pos = 574123; kgrp[14].end = 586343; kgrp[14].loop = 2399;
+ kgrp[ 0].root = 36; kgrp[ 0].high = 37; kgrp[ 0].loop = 14774;
+ kgrp[ 1].root = 40; kgrp[ 1].high = 41; kgrp[ 1].loop = 16268;
+ kgrp[ 2].root = 43; kgrp[ 2].high = 45; kgrp[ 2].loop = 33541;
+ kgrp[ 3].root = 48; kgrp[ 3].high = 49; kgrp[ 3].loop = 21156;
+ kgrp[ 4].root = 52; kgrp[ 4].high = 53; kgrp[ 4].loop = 17191;
+ kgrp[ 5].root = 55; kgrp[ 5].high = 57; kgrp[ 5].loop = 23286;
+ kgrp[ 6].root = 60; kgrp[ 6].high = 61; kgrp[ 6].loop = 18002;
+ kgrp[ 7].root = 64; kgrp[ 7].high = 65; kgrp[ 7].loop = 19746;
+ kgrp[ 8].root = 67; kgrp[ 8].high = 69; kgrp[ 8].loop = 22253;
+ kgrp[ 9].root = 72; kgrp[ 9].high = 73; kgrp[ 9].loop = 8852;
+ kgrp[10].root = 76; kgrp[10].high = 77; kgrp[10].loop = 9693;
+ kgrp[11].root = 79; kgrp[11].high = 81; kgrp[11].loop = 10596;
+ kgrp[12].root = 84; kgrp[12].high = 85; kgrp[12].loop = 6011;
+ kgrp[13].root = 88; kgrp[13].high = 89; kgrp[13].loop = 3414;
+ kgrp[14].root = 93; kgrp[14].high = 999; kgrp[14].loop = 2399;
}