]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.0.39
authorfred <fred>
Tue, 4 Mar 1997 20:07:21 +0000 (20:07 +0000)
committerfred <fred>
Tue, 4 Mar 1997 20:07:21 +0000 (20:07 +0000)
lib/include/proto.hh [new file with mode: 0644]
lily/include/midi-item.hh [new file with mode: 0644]
lily/include/midi-output.hh [new file with mode: 0644]
lily/include/midi-stream.hh [new file with mode: 0644]

diff --git a/lib/include/proto.hh b/lib/include/proto.hh
new file mode 100644 (file)
index 0000000..e9d3e60
--- /dev/null
@@ -0,0 +1,172 @@
+/*
+  proto.hh -- part of LilyPond
+
+  (c) 1996,97 Han-Wen Nienhuys
+*/
+
+#ifndef PROTO_HH
+#define PROTO_HH
+
+#include "fproto.hh"
+#include "real.hh"
+
+/// (i64)
+typedef long long Int64;
+
+struct Absdynamic_req;
+struct Accidental;
+struct Atom;
+struct Bar;
+struct Bar_register;
+struct Barcheck_req;
+struct Bar_req;
+struct Beam;
+struct Beam_req;
+struct Box;
+struct Bracket_req;
+struct Cadenza_req;
+struct Chord;
+struct Clef_change_req;
+struct Clef_register;
+struct Clef_item;
+struct Col_hpositions;
+struct Colinfo;
+struct Complex_music;
+struct Complex_staff;
+struct Complex_walker;
+struct Cresc_req;
+struct Directional_spanner;
+struct Decresc_req;
+struct Duration;
+struct Duration_iterator;
+struct Durational_req;
+struct Dynamic;
+struct Group_change_req;
+struct Group_feature_req;
+struct Idealspacing;
+struct Identifier;
+struct Input_file;
+struct Input_music;
+struct Input_score;
+struct Input_staff;
+struct Item;
+struct Key;
+struct Key_register;
+struct Key_change_req;
+struct Key_item;
+struct Keyword;
+struct Keyword_table;
+struct Lily_stream;
+struct Line_of_score;
+struct Line_of_staff;
+struct Linestaff;
+struct Local_key;
+struct Local_key_register;
+struct Local_key_item;
+struct Lookup;
+struct Lyric_item;
+struct Lyric_req;
+struct Melodic_req;
+struct Measure_grouping_req;
+struct Meter_change_req;
+struct Meter;
+struct Meter_register;
+struct Midi_def;
+struct Midi_duration;
+struct Midi_event;
+struct Midi_header;
+struct Midi_item;
+struct Midi_key;
+struct Midi_note;
+struct Midi_output;
+struct Midi_pitch;
+struct Midi_staff;
+struct Midi_stream;
+struct Midi_tempo;
+struct Midi_time;
+struct Midi_track;
+struct Midi_voice;
+struct Midi_walker;
+struct Mixed_qp;
+class My_midi_lexer;
+class My_midi_parser;
+class Midi_event;
+class Midi_score;
+class Midi_track;
+struct Molecule;
+struct Musical_req;
+struct Music_general_chord;
+struct Music_voice;
+struct Command_req;
+struct Note_req;
+struct Notehead;
+struct Notehead_register;
+struct Notename_tab;
+struct Offset;
+struct Output;
+struct PCol;
+struct Plet_req;
+struct Plet;
+struct PScore;
+struct PStaff;
+struct Paper_def;
+struct Partial_measure_req;
+struct Rational;
+struct Register_group_register;
+struct Request;
+struct Request_register;
+struct Rest;
+struct Rest_req;
+struct Rhythmic_grouping;
+struct Rhythmic_grouping_req;
+struct Rhythmic_req;
+struct Score;
+struct Score_column;
+struct Score_walker;
+struct Script_def;
+struct Script;
+struct Script_register;
+struct Script_req;
+struct Simple_music;
+struct Skip_req;
+struct Slur;
+struct Slur_register;
+struct Slur_req;
+struct Source;
+struct Source_file;
+struct Spacing_req ;
+struct Span_req;
+struct Spanner;
+struct Blank_req;
+struct Staff;
+struct Staff_column;
+struct Staff_elem;
+struct Staff_elem_info;
+struct Staff_symbol;
+struct Staff_walker;
+struct Stem;
+struct Stem_req;
+struct Stem_beam_register;
+struct String;
+struct Symbol;
+struct Symtable;
+struct Symtables;
+struct Tex_stream;
+struct Terminate_voice_req;
+struct Text_item ;
+struct Text_def;
+struct Text_gob;
+struct Text_register;
+struct Text_req;
+struct Timing_req;
+struct Time_description;
+struct Track_column;
+struct Voice;
+struct Voice_element;
+struct Voice_group_registers;
+struct Voice_list;
+struct Voice_registers;
+struct Voicegroup;
+struct Walker_registers;
+typedef Rational Moment;
+#endif // PROTO_HH
diff --git a/lily/include/midi-item.hh b/lily/include/midi-item.hh
new file mode 100644 (file)
index 0000000..6f10572
--- /dev/null
@@ -0,0 +1,108 @@
+//
+//  midiitem.hh -- part of LilyPond
+//
+//  copyright 1997 Jan Nieuwenhuizen <jan@digicash.com>
+
+#ifndef MIDI_ITEM_HH
+#define MIDI_ITEM_HH
+#include "string.hh"
+#include "proto.hh"
+
+struct Midi_item {
+    /* *************** */
+    static String i2varint_str( int i );
+    virtual void output_midi( Midi_stream& midi_stream_r ) const;
+    virtual String str() const = 0;
+};
+
+struct Midi_key : public Midi_item {
+       Midi_key( int accidentals_i, int minor_i );
+       
+       virtual String str() const;
+       
+       int accidentals_i_;
+       int minor_i_;
+};
+
+struct Midi_note : public Midi_item {
+    /* *************** */
+    int const c0_pitch_i_c_ = 60;
+    Byte dynamic_byte_;
+
+    /**
+      Generate a note-event on a channel pitch.
+
+      @param #melreq_l# is the pitch. 
+     */
+    Midi_note( Melodic_req* melreq_l, int channel_i, bool on_b );
+
+    virtual String str() const;
+
+    int channel_i_;
+    int on_b_;
+    int pitch_i_;
+};
+
+struct Midi_duration : public Midi_item {
+    /* *************** */
+    Midi_duration( Real seconds_f );
+
+    virtual String str() const;
+
+    Real seconds_f_;
+};
+
+struct Midi_chunk : Midi_item {
+    /* *************** */
+    Midi_chunk();
+
+    void add( String str );
+    void set( String header_str, String data_str, String footer_str );
+    virtual String str() const;
+
+private:
+    String data_str_;
+    String footer_str_;
+    String header_str_;
+};
+
+struct Midi_header : Midi_chunk {
+    /* *************** */
+    Midi_header( int format_i, int tracks_i, int clocks_per_4_i );
+};
+
+struct Midi_text : Midi_item {
+    /* *************** */
+       enum Type { 
+               TEXT = 1, COPYRIGHT, TRACK_NAME, INSTRUMENT_NAME, LYRIC, 
+               MARKER, CUE_POINT
+       };
+       Midi_text( Midi_text::Type type, String text_str );
+
+       virtual String str() const;
+
+       Type type_;
+       String text_str_;
+};
+
+struct Midi_tempo : Midi_item {
+    /* *************** */
+    Midi_tempo( int per_minute_4_i );
+
+    virtual String str() const;
+
+    int per_minute_4_i_;
+};
+
+struct Midi_track : Midi_chunk {
+    /* *************** */
+    int number_i_;
+    Midi_track( int number_i );
+
+    void add( int delta_time_i, String event );
+//     void add( Moment delta_time_moment, Midi_item& mitem_r );
+    void add( Moment delta_time_moment, Midi_item* mitem_l );
+};
+
+#endif // MIDI_ITEM_HH //
+
diff --git a/lily/include/midi-output.hh b/lily/include/midi-output.hh
new file mode 100644 (file)
index 0000000..1945717
--- /dev/null
@@ -0,0 +1,27 @@
+/*
+  midioutput.hh -- declare Midi_output
+
+  source file of the LilyPond music typesetter
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+
+#ifndef MIDIOUTPUT_HH
+#define MIDIOUTPUT_HH
+#include "pscore.hh"
+
+struct Midi_output {
+    Midi_output(Score* score_l, Midi_def* );
+
+    void do_staff(Staff*st_l, int count);
+    void header();
+    void staffs();
+
+    Score* score_l_;
+    Midi_def* midi_l_;
+    Midi_stream* midi_stream_l_;
+};
+
+#endif // MIDIOUTPUT_HH
+
diff --git a/lily/include/midi-stream.hh b/lily/include/midi-stream.hh
new file mode 100644 (file)
index 0000000..2444384
--- /dev/null
@@ -0,0 +1,32 @@
+//
+//  midistream.hh -- part of LilyPond
+//
+//  copyright 1997 Jan Nieuwenhuizen <jan@digicash.com>
+
+#ifndef MIDI_STREAM_HH
+#define MIDI_STREAM_HH
+
+#include <iostream.h>
+#include "string.hh"
+
+/// Midi output
+struct Midi_stream {
+    ostream* os_p_;
+    String filename_str_;
+    int clocks_per_4_i_;
+    int tracks_i_;
+    
+    Midi_stream( String filename_str, int tracks_i, int clocks_per_4_i_ );
+    ~Midi_stream();
+
+    Midi_stream& operator <<( String str );
+    Midi_stream& operator <<( Midi_item const& mitem_c_r );
+    Midi_stream& operator <<( int i );
+
+    void header();
+    void open();
+
+//private:
+//    Midi_stream(Midi_stream const&);
+};
+#endif // MIDI_STREAM_HH //