Commits

kunstmusik committed bd1de31

updated UI to label the sliders, added slider for volume

Comments (0)

Files changed (3)

res/layout/activity_main.xml

         android:id="@+id/seekBar1"
         android:layout_width="wrap_content"
         android:layout_height="match_parent"
+        android:layout_above="@+id/textView1"
         android:layout_alignParentLeft="true"
         android:layout_below="@+id/spinner1" />
 
         android:layout_alignParentTop="true"
         android:contentDescription="Voice" />
 
+    <TextView
+        android:id="@+id/textView1"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_alignParentBottom="true"
+        android:layout_alignParentLeft="true"
+        android:layout_alignRight="@+id/seekBar1"
+        android:gravity="center"
+        android:text="M"
+        android:textAppearance="?android:attr/textAppearanceLarge" />
+
     <com.kunstmusik.touchvoice.VerticalSeekBar
-        android:id="@+id/reverbBar"
+        android:id="@+id/volumeBar"
         android:layout_width="wrap_content"
         android:layout_height="match_parent"
+        android:layout_alignBottom="@+id/seekBar1"
         android:layout_alignParentRight="true"
-        android:layout_below="@+id/spinner1" />
+        android:layout_alignTop="@+id/seekBar1" />
+
+    <TextView
+        android:id="@+id/TextView03"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_alignLeft="@+id/volumeBar"
+        android:layout_alignParentBottom="true"
+        android:layout_alignParentRight="true"
+        android:gravity="center"
+        android:text="V"
+        android:textAppearance="?android:attr/textAppearanceLarge" />
 
     <com.kunstmusik.touchvoice.VerticalSeekBar
-        android:id="@+id/chorusBar"
+        android:id="@+id/reverbBar"
         android:layout_width="wrap_content"
         android:layout_height="match_parent"
+        android:layout_alignBottom="@+id/volumeBar"
         android:layout_alignTop="@+id/seekBar1"
+        android:layout_toLeftOf="@+id/volumeBar" />
+
+    <com.kunstmusik.touchvoice.VerticalSeekBar
+        android:id="@+id/chorusBar"
+        android:layout_width="wrap_content"
+        android:layout_height="match_parent"
+        android:layout_alignBottom="@+id/reverbBar"
+        android:layout_below="@+id/spinner1"
         android:layout_toLeftOf="@+id/reverbBar" />
 
+    <TextView
+        android:id="@+id/TextView01"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_alignLeft="@+id/chorusBar"
+        android:layout_alignParentBottom="true"
+        android:layout_alignRight="@+id/chorusBar"
+        android:gravity="center"
+        android:text="C"
+        android:textAppearance="?android:attr/textAppearanceLarge" />
+
+    <TextView
+        android:id="@+id/TextView02"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_alignParentBottom="true"
+        android:layout_alignRight="@+id/reverbBar"
+        android:layout_toRightOf="@+id/chorusBar"
+        android:gravity="center"
+        android:text="R"
+        android:textAppearance="?android:attr/textAppearanceLarge" />
+
 </RelativeLayout>

res/raw/multitouch_xy.csd

 kvoice_type chnget "voiceType"
 kchorus chnget "chorus"
 kreverb chnget "reverb"
+kvolume chnget "volume"
 
 reset:
 
 
 rireturn
 
-;aout = aout * 2
+kvol = ((kvolume^4) * 54) - 30  ;within -30 and +12 db
 
-;a1 moogladder ga1, kcutoff, kresonance
-
-printk2 kchorus
+aout = aout * ampdb(kvol)
 
 aL, aR chorus aout, aout, kchorus
 aL, aR reverbsc aL, aR, kreverb, 5000

src/com/kunstmusik/touchvoice/MainActivity.java

 	SeekBar seekBar;
 	SeekBar chorusBar;
 	SeekBar reverbBar;
+	SeekBar volumeBar;
 	MultiTouchView view2;
 	Spinner voiceType;
 
 		seekBar = (SeekBar) findViewById(R.id.seekBar1);
 		chorusBar = (SeekBar) findViewById(R.id.chorusBar);
 		reverbBar = (SeekBar) findViewById(R.id.reverbBar);
+		volumeBar = (SeekBar) findViewById(R.id.volumeBar);
 		view2 = (MultiTouchView) findViewById(R.id.view2);
 		voiceType = (Spinner) findViewById(R.id.spinner1);
 		
 		
 		chorusBar.setProgress(50);
 		reverbBar.setProgress(72);
+		volumeBar.setProgress(86);
 		
 		csoundObj.addSlider(seekBar, "morph", 0.0, 5.0);
 		csoundObj.addSlider(chorusBar, "chorus", 0.0, 1.0);
 		csoundObj.addSlider(reverbBar, "reverb", 0.0, 1.0);
-
+		csoundObj.addSlider(volumeBar, "volume", 0, 1.0);
 		
 		view2.initTouch(csoundObj, 
 				"i1.%d 0 -2 %d", 
 		File f = createTempFile(csd);
 
 		csoundObj.addValueCacheable(view2);
-
+		csoundObj.setMessageLoggingEnabled(true);
 		csoundObj.startCsound(f);
 	}
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.