Source code: com/virtuosotechnologies/asaph/model/notation/Note.java
1 /*
2 ================================================================================
3
4 FILE: Note.java
5
6 PROJECT:
7
8 Asaph
9
10 CONTENTS:
11
12 An object that represents a single note
13
14 PROGRAMMERS:
15
16 Daniel Azuma (DA) <dazuma@kagi.com>
17
18 COPYRIGHT:
19
20 Copyright (C) 2003 Daniel Azuma (dazuma@kagi.com)
21
22 This program is free software; you can redistribute it and/or
23 modify it under the terms of the GNU General Public License as
24 published by the Free Software Foundation; either version 2
25 of the License, or (at your option) any later version.
26
27 This program is distributed in the hope that it will be useful,
28 but WITHOUT ANY WARRANTY; without even the implied warranty of
29 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30 GNU General Public License for more details.
31
32 You should have received a copy of the GNU General Public
33 License along with this program; if not, write to
34 Free Software Foundation, Inc.
35 59 Temple Place, Suite 330
36 Boston, MA 02111-1307 USA
37
38 ================================================================================
39 */
40
41
42 package com.virtuosotechnologies.asaph.model.notation;
43
44
45 /**
46 * An object that represents a single note.
47 */
48 public interface Note
49 {
50 /**
51 * Get the NotationFactory that created this object
52 *
53 * @return the NotationFactory
54 */
55 public NotationFactory getNotationFactory();
56
57
58 /**
59 * Generate the string representation
60 *
61 * @return String
62 */
63 public String generateString();
64
65
66 /**
67 * Get the base of this note (that is, the note with the default modifier).
68 *
69 * @return the base Note
70 */
71 public Note getBaseNote();
72
73
74 /**
75 * Get the modifier of this note
76 *
77 * @return the NoteModifier
78 */
79 public NoteModifier getNoteModifier();
80
81
82 /**
83 * Create a Note whose base is the same as this one, but with the given modifier.
84 *
85 * @param modifier new NoteModifier
86 * @return new Note
87 */
88 public Note getNoteWithModifier(
89 NoteModifier modifier);
90
91
92 /**
93 * Create a note raised by an interval
94 *
95 * @param interval interval to raise by
96 * @return new Note
97 */
98 public Note getRaised(
99 Interval interval);
100
101
102 /**
103 * Create a note lowered by an interval
104 *
105 * @param interval interval to lower by
106 * @return new Note
107 */
108 public Note getLowered(
109 Interval interval);
110
111
112 /**
113 * Create an interval from this note to the given note
114 *
115 * @param note ending note
116 * @return new Interval
117 */
118 public Interval getIntervalTo(
119 Note note);
120 }