summaryrefslogtreecommitdiff
path: root/dgedit/audioextractor.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2011-10-02 16:24:57 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2011-10-02 16:24:57 +0200
commit0e3ed82bedabcfcd78dd8c16bbd59ada66bd2e56 (patch)
tree697fad8169f7b96e9039e9ebd5361578ee83f7dd /dgedit/audioextractor.cc
parentf474c3c923fe5bb27c1ee11e2c6dd57e41889f27 (diff)
Convert velocity levels from 0-127 (midi) to 0.0-1.0 (more generic).
Diffstat (limited to 'dgedit/audioextractor.cc')
-rw-r--r--dgedit/audioextractor.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/dgedit/audioextractor.cc b/dgedit/audioextractor.cc
index 015d323..3d11f84 100644
--- a/dgedit/audioextractor.cc
+++ b/dgedit/audioextractor.cc
@@ -190,9 +190,9 @@ void AudioExtractor::exportSelections(Selections selections,
Levels::iterator nxt = k;
nxt++;
- int next;
- if(nxt == levels.end()) next = 127;
- else next = nxt->velocity - 1;
+ float next;
+ if(nxt == levels.end()) next = 1.0;
+ else next = nxt->velocity;
QDomElement velocity = doc.createElement("velocity");