Commits

kunstmusik committed c3cd38c

scaled signal * 2, changed range for vowel2 to 0-5 from app to stabilize, added checks to VerticalSeekBar for null listener

Comments (0)

Files changed (3)

res/raw/multitouch_xy.csd

 
 rireturn
 
+aout = aout * 2
+
 ;a1 moogladder ga1, kcutoff, kresonance
 
 aL, aR reverbsc aout, aout, .72, 5000

src/com/kunstmusik/touchvoice/MainActivity.java

 		csoundObj.addValueCacheable(new SpinnerValueCacheable(voiceType, "voiceType"));
 		
 		
-		csoundObj.addSlider(seekBar, "morph", 0.0, 12.0);
+		csoundObj.addSlider(seekBar, "morph", 0.0, 5.0);
 		
 		view2.initTouch(csoundObj, 
 				"i1.%d 0 -2 %d", 

src/com/kunstmusik/touchvoice/VerticalSeekBar.java

 		if (!isEnabled()) {
 			return false;
 		}
-
+		
 		switch (event.getAction()) {
 		case MotionEvent.ACTION_DOWN:
-			onChangeListener.onStartTrackingTouch(this);
+			if(onChangeListener != null) {
+				onChangeListener.onStartTrackingTouch(this);
+			}
 			setPressed(true);
 			setSelected(true);
 			break;
 			// Otherwise the listener gets called ~5 times per change
 			if (progress != lastProgress) {
 				lastProgress = progress;
-				onChangeListener.onProgressChanged(this, progress, true);
+				if(onChangeListener != null) {
+					onChangeListener.onProgressChanged(this, progress, true);
+				}
 			}
 
 			onSizeChanged(getWidth(), getHeight(), 0, 0);
-			onChangeListener.onProgressChanged(this, getMax()
+			if(onChangeListener != null) {
+				onChangeListener.onProgressChanged(this, getMax()
 					- (int) (getMax() * event.getY() / getHeight()), true);
-			setPressed(true);
-			setSelected(true);
+			}
+//			setPressed(true);
+//			setSelected(true);
 			break;
 		case MotionEvent.ACTION_UP:
-			onChangeListener.onStopTrackingTouch(this);
+			if(onChangeListener != null) {
+				onChangeListener.onStopTrackingTouch(this);
+			}
 			setPressed(false);
 			setSelected(false);
 			break;