Android Open Source - Music-Theory Tone






From Project

Back to project page Music-Theory.

License

The source code is released under:

GNU General Public License

If you think the Android project Music-Theory listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.mt.theory;
/*from   w ww. jav  a2  s.c o m*/
public enum Tone {
  A(0, -3),
  B(1, -1),
  C(2, 0),
  D(3, 2),
  E(4, 4),
  F(5, 5),
  G(6, 7);

  // Midi representation offset used for generating the actual midi value of a
  // tone + octave. Used for audio playback.
  private int midiValue;

  // Arbitrary relative offset for determining the number of visual steps
  // between two given notes on the musical staff
  private int staffValue;

  private Tone(int staffValue, int midiValue) {
    this.staffValue = staffValue;
    this.midiValue = midiValue;
  }

  public int getMidiPositionValue() {
    return midiValue;
  }

  public int getStaffPositionValue() {
    return staffValue;
  }
}




Java Source Code List

com.mt.HomeActivity.java
com.mt.QuizActivity.java
com.mt.audio.MidiTrack.java
com.mt.keys.KeySignatureQuizActivity.java
com.mt.keys.KeySignatureQuizPreferenceActivity.java
com.mt.notes.NoteQuizActivity.java
com.mt.notes.NoteQuizPreferenceActivity.java
com.mt.staff.ScoreView.java
com.mt.theory.Accidental.java
com.mt.theory.Clef.java
com.mt.theory.Duration.java
com.mt.theory.Interval.java
com.mt.theory.KeySignature.java
com.mt.theory.NoteGroup.java
com.mt.theory.Note.java
com.mt.theory.Quality.java
com.mt.theory.Score.java
com.mt.theory.TimeSignature.java
com.mt.theory.Tone.java
com.mt.utils.NoteUtil.java
com.mt.utils.QuizUtil.java