|
|
|
@ -0,0 +1,40 @@
|
|
|
|
|
package com.example.musicwork.freeModel;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Created by dell on 2021/1/2.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
public class MusicNote {
|
|
|
|
|
private int note;//音符(0为休止符,1-7为低音音符,8-14为正常音符,15-21为高音音符)
|
|
|
|
|
private float beat;//节拍(1对应四分音符,1/2对应八分音符)
|
|
|
|
|
private boolean dectimeFlag = false;//音符是否设置了减时线
|
|
|
|
|
|
|
|
|
|
public int getNote() {
|
|
|
|
|
return note;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public float getBeat() {
|
|
|
|
|
return beat;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public boolean isDectimeFlag() {
|
|
|
|
|
return dectimeFlag;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setNote(int note) {
|
|
|
|
|
this.note = note;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setBeat(float beat) {
|
|
|
|
|
this.beat = beat;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setDectimeFlag(boolean dectimeFlag) {
|
|
|
|
|
this.dectimeFlag = dectimeFlag;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public MusicNote(int note, float beat) {
|
|
|
|
|
this.note = note;
|
|
|
|
|
this.beat = beat;
|
|
|
|
|
}
|
|
|
|
|
}
|