diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2013-04-21 19:50:08 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2013-04-21 19:50:08 +0200 |
commit | f2f14d1aa60a9b724a45b0854cee3143f1da80cf (patch) | |
tree | bc0b81d376a964456bd4c3d475647f4f31487357 /dgedit/samplesorter.cc | |
parent | 3f33469b7237240a2be708ca29087773a4b7e228 (diff) |
Added attach length slider. Fixed sample sorter to use sqrt of energy instead of just energy. This spreads out the samples more evenly.
Diffstat (limited to 'dgedit/samplesorter.cc')
-rw-r--r-- | dgedit/samplesorter.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/dgedit/samplesorter.cc b/dgedit/samplesorter.cc index 5958354..a2ec3dc 100644 --- a/dgedit/samplesorter.cc +++ b/dgedit/samplesorter.cc @@ -215,7 +215,9 @@ void SampleSorter::paintEvent(QPaintEvent *event) if(sel.to == i.value().to && sel.from == i.value().from) painter.setPen(colPtSel); else painter.setPen(colPt); - float x = (i.key()/max)*(float)width(); + float x = (i.key()/max); + x = sqrt(x); + x *= (float)width(); drawCircle(painter, x, MAP(x)); i++; } |