Skip to content

Commit

Permalink
Change notes to chords, relabel buttons, comment out menu item
Browse files Browse the repository at this point in the history
  • Loading branch information
billthefarmer committed Apr 18, 2015
1 parent a0f9a9c commit 8501f66
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 10 deletions.
8 changes: 4 additions & 4 deletions res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="@+id/textView1"
android:text="Button" />
android:text="C" />

<Button
android:id="@+id/button2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignTop="@+id/button1"
android:layout_toRightOf="@+id/button1"
android:text="Button" />
android:text="G" />

<Button
android:id="@+id/button3"
Expand All @@ -39,7 +39,7 @@
android:layout_alignLeft="@+id/button1"
android:layout_below="@+id/button1"
android:layout_marginTop="8dp"
android:text="Button" />
android:text="Ants" />

<Button
android:id="@+id/button4"
Expand All @@ -48,6 +48,6 @@
android:layout_alignBaseline="@+id/button3"
android:layout_alignBottom="@+id/button3"
android:layout_toRightOf="@+id/button3"
android:text="Button" />
android:text="!Ants" />

</RelativeLayout>
6 changes: 3 additions & 3 deletions res/menu/main.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android" >

<!--
<item
android:id="@+id/action_settings"
android:orderInCategory="100"
android:showAsAction="never"
android:title="@string/action_settings"/>

</menu>
-->
</menu>
14 changes: 11 additions & 3 deletions src/org/billthefarmer/mididriver/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,14 @@ public boolean onTouch(View v, MotionEvent event)
{
case R.id.button1:
sendMidi(0x90, 48, 63);
sendMidi(0x90, 52, 63);
sendMidi(0x90, 55, 63);
break;

case R.id.button2:
sendMidi(0x90, 56, 63);
sendMidi(0x90, 55, 63);
sendMidi(0x90, 59, 63);
sendMidi(0x90, 62, 63);
break;

default:
Expand All @@ -147,10 +151,14 @@ public boolean onTouch(View v, MotionEvent event)
{
case R.id.button1:
sendMidi(0x80, 48, 0);
sendMidi(0x80, 52, 0);
sendMidi(0x80, 55, 0);
break;

case R.id.button2:
sendMidi(0x80, 56, 0);
sendMidi(0x80, 55, 0);
sendMidi(0x80, 59, 0);
sendMidi(0x80, 62, 0);
break;

default:
Expand All @@ -162,7 +170,7 @@ public boolean onTouch(View v, MotionEvent event)
return false;
}

return true;
return false;
}

// On click
Expand Down

0 comments on commit 8501f66

Please sign in to comment.