diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2011-10-02 16:24:57 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2011-10-02 16:24:57 +0200 |
commit | 0e3ed82bedabcfcd78dd8c16bbd59ada66bd2e56 (patch) | |
tree | 697fad8169f7b96e9039e9ebd5361578ee83f7dd /dgedit/audioextractor.cc | |
parent | f474c3c923fe5bb27c1ee11e2c6dd57e41889f27 (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.cc | 6 |
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"); |