X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Finclude%2Fmidi-item.hh;h=c5a9cc9fddce90dcee66b6fe84cd95f1acc8afda;hb=d4047469357aa91fc32ef9915995cc3a9bc31d2d;hp=a3cea87e619c7f2c591e7e73ed8d25428cfbe930;hpb=ac1340846e81661575ba3036b251e8ab55b13023;p=lilypond.git diff --git a/lily/include/midi-item.hh b/lily/include/midi-item.hh index a3cea87e61..c5a9cc9fdd 100644 --- a/lily/include/midi-item.hh +++ b/lily/include/midi-item.hh @@ -1,7 +1,20 @@ /* - midi-item.hh -- declare Midi items + This file is part of LilyPond, the GNU music typesetter. - (c) 1997--2007 Jan Nieuwenhuizen + Copyright (C) 1997--2012 Jan Nieuwenhuizen + + LilyPond is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + LilyPond is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with LilyPond. If not, see . */ #ifndef MIDI_ITEM_HH @@ -11,7 +24,7 @@ #include "std-vector.hh" string int2midi_varint_string (int i); - + /** Any piece of midi information. @@ -20,14 +33,13 @@ string int2midi_varint_string (int i); class Midi_item { public: - DECLARE_CLASSNAME(Midi_item); + DECLARE_CLASSNAME (Midi_item); Midi_item (); virtual ~Midi_item (); virtual char const *name () const; static Midi_item *get_midi (Audio_item *a); - virtual string to_string () const = 0; }; @@ -35,8 +47,8 @@ class Midi_channel_item : public Midi_item { public: int channel_; - DECLARE_CLASSNAME(Midi_channel_item); - Midi_channel_item (); + DECLARE_CLASSNAME (Midi_channel_item); + Midi_channel_item (Audio_item *ai); }; class Midi_duration : public Midi_item @@ -48,7 +60,6 @@ public: Real seconds_; }; - /** Change instrument event */ @@ -57,7 +68,7 @@ class Midi_instrument : public Midi_channel_item public: Midi_instrument (Audio_instrument *); - DECLARE_CLASSNAME(Midi_instrument); + DECLARE_CLASSNAME (Midi_instrument); virtual string to_string () const; Audio_instrument *audio_; @@ -67,7 +78,7 @@ class Midi_key : public Midi_item { public: Midi_key (Audio_key *); - DECLARE_CLASSNAME(Midi_key); + DECLARE_CLASSNAME (Midi_key); virtual string to_string () const; @@ -78,7 +89,7 @@ class Midi_time_signature : public Midi_item { public: Midi_time_signature (Audio_time_signature *); - DECLARE_CLASSNAME(Midi_time_signature); + DECLARE_CLASSNAME (Midi_time_signature); virtual string to_string () const; @@ -90,7 +101,7 @@ class Midi_note : public Midi_channel_item { public: Midi_note (Audio_note *); - DECLARE_CLASSNAME(Midi_note); + DECLARE_CLASSNAME (Midi_note); int get_semitone_pitch () const; int get_fine_tuning () const; @@ -98,7 +109,6 @@ public: Audio_note *audio_; - static int const c0_pitch_ = 60; Byte dynamic_byte_; }; @@ -107,7 +117,7 @@ class Midi_note_off : public Midi_note { public: Midi_note_off (Midi_note *); - DECLARE_CLASSNAME(Midi_note_off); + DECLARE_CLASSNAME (Midi_note_off); virtual string to_string () const; @@ -119,11 +129,11 @@ class Midi_text : public Midi_item { public: enum Type - { - TEXT = 1, COPYRIGHT, TRACK_NAME, INSTRUMENT_NAME, LYRIC, - MARKER, CUE_POINT - }; - DECLARE_CLASSNAME(Midi_text); + { + TEXT = 1, COPYRIGHT, TRACK_NAME, INSTRUMENT_NAME, LYRIC, + MARKER, CUE_POINT + }; + DECLARE_CLASSNAME (Midi_text); Midi_text (Audio_text *); @@ -136,7 +146,7 @@ class Midi_dynamic : public Midi_channel_item { public: Midi_dynamic (Audio_dynamic *); - DECLARE_CLASSNAME(Midi_dynamic); + DECLARE_CLASSNAME (Midi_dynamic); virtual string to_string () const; @@ -147,7 +157,7 @@ class Midi_piano_pedal : public Midi_channel_item { public: Midi_piano_pedal (Audio_piano_pedal *); - DECLARE_CLASSNAME(Midi_piano_pedal); + DECLARE_CLASSNAME (Midi_piano_pedal); virtual string to_string () const; @@ -158,13 +168,11 @@ class Midi_tempo : public Midi_item { public: Midi_tempo (Audio_tempo *); - DECLARE_CLASSNAME(Midi_tempo); + DECLARE_CLASSNAME (Midi_tempo); virtual string to_string () const; Audio_tempo *audio_; }; - - #endif // MIDI_ITEM_HH