Android Open Source - Music-Theory Time Signature






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 w  w  . j a va2  s.  co m
import android.os.Parcel;
import android.os.Parcelable;

public class TimeSignature implements Parcelable {

  public static final Parcelable.Creator<TimeSignature> CREATOR = new Parcelable.Creator<TimeSignature>() {

    @Override
    public TimeSignature createFromParcel(Parcel source) {
      return new TimeSignature(source);
    }

    @Override
    public TimeSignature[] newArray(int size) {
      return new TimeSignature[size];
    }

  };
  private int notesPerMeasure;

  private int noteValue;

  public TimeSignature(int noteValue, int notesPerMeasure) {
    this.noteValue = noteValue;
    this.notesPerMeasure = notesPerMeasure;
  }

  public TimeSignature(Parcel source) {
    this.noteValue = source.readInt();
    this.notesPerMeasure = source.readInt();
  }

  @Override
  public int describeContents() {
    return 0;
  }

  public int getNotesPerMeasure() {
    return notesPerMeasure;
  }

  public int getNoteValue() {
    return noteValue;
  }

  public void setNotesPerMeasure(int notesPerMeasure) {
    this.notesPerMeasure = notesPerMeasure;
  }

  public void setNoteValue(int noteValue) {
    this.noteValue = noteValue;
  }

  @Override
  public void writeToParcel(Parcel dest, int flags) {
    dest.writeInt(getNoteValue());
    dest.writeInt(getNotesPerMeasure());
  }

}




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