X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Finclude%2Fmidi-chunk.hh;h=3769ce2e42fe7603cc6e3567bf88ea84d6c89eda;hb=9e781b7dc83b60a543ce218aa1a5f139f74c760f;hp=fc41a541f0acd8519855d23d82842fcf6b1e34e7;hpb=91f01637f31c7d904fd8016b49184e935bf1c8ab;p=lilypond.git diff --git a/lily/include/midi-chunk.hh b/lily/include/midi-chunk.hh index fc41a541f0..3769ce2e42 100644 --- a/lily/include/midi-chunk.hh +++ b/lily/include/midi-chunk.hh @@ -1,10 +1,20 @@ -/* - midi-chunk.hh -- declare Midi_chunk - - source file of the GNU LilyPond music typesetter - - (c) 2007 Han-Wen Nienhuys - +/* + This file is part of LilyPond, the GNU music typesetter. + + Copyright (C) 2007--2014 Han-Wen Nienhuys + + 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_CHUNK_HH @@ -14,7 +24,6 @@ #include "virtual-methods.hh" #include "std-vector.hh" - /** timed MIDI event */ @@ -28,19 +37,16 @@ public: string to_string () const; }; - - - /** variable sized MIDI data */ class Midi_chunk { public: - void set (string header_string, string data_string, string footer_string); + void set (const string &header_string, const string &data_string, const string &footer_string); virtual string to_string () const; virtual string data_string () const; - DECLARE_CLASSNAME(Midi_chunk); + DECLARE_CLASSNAME (Midi_chunk); virtual ~Midi_chunk (); private: string data_string_; @@ -51,20 +57,21 @@ private: class Midi_header : public Midi_chunk { public: - DECLARE_CLASSNAME(Midi_header); + DECLARE_CLASSNAME (Midi_header); - Midi_header (int format_i, int tracks_i, int clocks_per_4_i); + Midi_header (int format, int tracks, int clocks_per_4); }; class Midi_track : public Midi_chunk { public: int number_; - DECLARE_CLASSNAME(Midi_track); + int port_; + DECLARE_CLASSNAME (Midi_track); - vector events_; + vector events_; - Midi_track (); + Midi_track (int number, bool port); ~Midi_track (); void add (int, Midi_item *midi);