|
@@ -38,12 +38,14 @@ public:
|
|
|
class NoteMessage : public ChannelMessage
|
|
|
{
|
|
|
public:
|
|
|
- unsigned char pitch;
|
|
|
- static const unsigned char pitchMaximum = (1 << 7) - 1;
|
|
|
+ typedef unsigned char Pitch;
|
|
|
+
|
|
|
+ Pitch pitch;
|
|
|
+ static const Pitch pitchMaximum = (1 << 7) - 1;
|
|
|
unsigned char velocity;
|
|
|
static const unsigned char velocityMaximum = (2 << 7) - 1;
|
|
|
|
|
|
- NoteMessage(Channel channel, unsigned char pitch, unsigned char velocity)
|
|
|
+ NoteMessage(Channel channel, Pitch pitch, unsigned char velocity)
|
|
|
: ChannelMessage(channel), pitch(pitch), velocity(velocity)
|
|
|
{
|
|
|
}
|
|
@@ -57,7 +59,7 @@ protected:
|
|
|
static const unsigned char messageType = 0x9;
|
|
|
|
|
|
public:
|
|
|
- NoteOnMessage(Channel channel, unsigned char pitch, unsigned char velocity)
|
|
|
+ NoteOnMessage(Channel channel, Pitch pitch, unsigned char velocity)
|
|
|
: NoteMessage(channel, pitch, velocity)
|
|
|
{
|
|
|
}
|
|
@@ -74,7 +76,7 @@ protected:
|
|
|
static const unsigned char messageType = 0x8;
|
|
|
|
|
|
public:
|
|
|
- NoteOffMessage(Channel channel, unsigned char pitch, unsigned char velocity)
|
|
|
+ NoteOffMessage(Channel channel, Pitch pitch, unsigned char velocity)
|
|
|
: NoteMessage(channel, pitch, velocity)
|
|
|
{
|
|
|
}
|