-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNote.java
55 lines (46 loc) · 1.22 KB
/
Note.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/*
* Name: Rynel Luo, Vidula Kopli
* PennKey: rynelluo, vkopli
* Recitation: 215, 216
*
* Description: Note interface used by QuarterNote class
*/
public interface Note {
/**
* play note
*/
public void play();
/**
* draw note
*/
public void draw();
/**
* get string representation of note
*/
public String getNoteString();
/**
* add another note over this note by combining sample arrays
* @param note to be overlayed over this note
*/
public void overlayNote(Note note);
/**
* get sample array for note
*/
public double[] getSampleArray();
/**
* Returns staff index of the first note in the chord
* (if the note is part of a chord)
* @return staff index of the first note of the chord
*/
public int getStaffIdx();
/**
* Returns x position of note (of first note if it is part of a chord)
* @return x position of note
*/
public int getX();
/**
* Returns y position of note (of first note if it is part of a chord)
* @return y position of note
*/
public int getY();
}