CFugue
Note.h
1 /*
2  This is part of CFugue, a C++ Runtime for MIDI Score Programming
3  Copyright (C) 2009 Gopalakrishna Palem
4 
5  For links to further information, or to contact the author,
6  see <http://cfugue.sourceforge.net/>.
7 
8  $LastChangedDate: 2013-12-18 10:59:57 +0530 (Wed, 18 Dec 2013) $
9  $Rev: 197 $
10  $LastChangedBy: krishnapg $
11 */
12 
13 #ifndef __NOTE_H__AA5D5FE9_22AC_4e8c_911A_BB682EC71179__
14 #define __NOTE_H__AA5D5FE9_22AC_4e8c_911A_BB682EC71179__
15 
16 namespace CFugue
17 {
18  /// <Summary> Class representing a Musical Note </Summary>
19  struct Note
20  {
21  bool isRest; ///< Specifies if this is a Rest Note or not
22  short noteNumber; ///< Midi Note Value. C5 is 60
23  double decimalDuration; ///< Specifies the Duration of the note in double
24  long duration; ///< Specifies the Duration of the note in long
25  bool isStartOfTie; ///< Indicates if this is the first note in a Tie
26  bool isEndOfTie; ///< Indciates if this is the last note in a Tie
27  unsigned short attackVelocity; ///< Specifies the attack velocity of this note
28  unsigned short decayVelocity; ///< Specifies the decay velocity of this note
29  enum NoteTypes
30  {
31  FIRST, ///< Indicates if this is a First note in a group of notes
32  SEQUENTIAL, ///< Indicates if this is a Sequential note in a group of notes
33  PARALLEL ///< Indicates if this is a Parallel note in a group of notes
34  } type; ///< Specifies the type of this note
35 
36  /// <Summary> Default Values </Summary>
37  enum DefaultVelocities : long
38  {
39  DEFAULT_ATTACK_VELOCITY = 64, ///< Default Note Attack Velocity
40  DEFAULT_DECAY_VELOCITY = 64, ///< Default Note Decay Velocity
41  };
42 
43  inline Note(void)
44  : isRest(false),
45  noteNumber(0),
46  duration(0),
47  decimalDuration(0.0),
48  isStartOfTie(false),
49  isEndOfTie(false),
52  type(FIRST)
53  {
54  }
55 
56  inline ~Note(void)
57  {
58  }
59  };
60 
61 } // namespace CFugue
62 
63 #endif // __NOTE_H__AA5D5FE9_22AC_4e8c_911A_BB682EC71179__
unsigned short decayVelocity
Specifies the decay velocity of this note.
Definition: Note.h:28
long duration
Specifies the Duration of the note in long.
Definition: Note.h:24
bool isStartOfTie
Indicates if this is the first note in a Tie.
Definition: Note.h:25
bool isEndOfTie
Indciates if this is the last note in a Tie.
Definition: Note.h:26
enum CFugue::Note::NoteTypes type
Specifies the type of this note.
short noteNumber
Midi Note Value. C5 is 60.
Definition: Note.h:22
DefaultVelocities
Default Values
Definition: Note.h:37
Indicates if this is a Sequential note in a group of notes.
Definition: Note.h:32
unsigned short attackVelocity
Specifies the attack velocity of this note.
Definition: Note.h:27
Class representing a Musical Note
Definition: Note.h:19
Indicates if this is a Parallel note in a group of notes.
Definition: Note.h:33
Default Note Attack Velocity.
Definition: Note.h:39
bool isRest
Specifies if this is a Rest Note or not.
Definition: Note.h:21
Indicates if this is a First note in a group of notes.
Definition: Note.h:31
double decimalDuration
Specifies the Duration of the note in double.
Definition: Note.h:23
Default Note Decay Velocity.
Definition: Note.h:40

CFugue, the C++ Music Programming Library © Copyright 2009 Cenacle Research India Private Limited Gopalakrishna Palem