|
From: Yoda-JM <yo...@us...> - 2011-01-13 12:52:26
|
Module: editor
Branch: master
Commit: bca162e06f489ac6c5567b0cd6bc7feda9e3b7d8
Author: Vincent Le Ligeour <yo...@us...>
Date: Thu Jan 13 13:51:54 2011 +0100
Added more visualization hacks
---
pitchvis.cc | 15 +++++++--------
1 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/pitchvis.cc b/pitchvis.cc
index 441db92..bc97bca 100644
--- a/pitchvis.cc
+++ b/pitchvis.cc
@@ -67,18 +67,17 @@ PitchVis::PitchVis(std::string const& filename): height(1024) {
p.r = 0.0; p.g = 1.0; p.b = 0.0;
break;
case 1:
- p.r = 0.0; p.g = 0.5; p.b = 0.0;
+ p.r = 0.15; p.g = 0.15; p.b = 0.0;
break;
case 2:
- p.r = 0.0; p.g = 0.3; p.b = 0.0;
+ p.r = 0.05; p.g = 0.05; p.b = 0.0;
break;
}
- (*this)(x, y) += p;
- p.r *= 0.5;
- p.g *= 0.5;
- p.b *= 0.5;
- (*this)(x, y + 1) += p;
- (*this)(x, y - 1) += p;
+ (*this)(x, y) = p;
+ for(int j = -3 ; j < 4 ; ++j) {
+ if(y + j < 0 || y + j >= height) continue;
+ (*this)(x, y + j) = p;
+ }
++i;
}
}
|