Index: lily/include/waveform.hh |
diff --git a/lily/include/waveform.hh b/lily/include/waveform.hh |
new file mode 100644 |
index 0000000000000000000000000000000000000000..29bf8a45f2c12f337e9125d87cde15b3f9277a26 |
--- /dev/null |
+++ b/lily/include/waveform.hh |
@@ -0,0 +1,71 @@ |
+/* |
+ This file is part of LilyPond, the GNU music typesetter. |
+ |
+ Copyright (C) 2010 Mike Solomon <mikesol@stanfordalumni.org> |
+ |
+ 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 <http://www.gnu.org/licenses/>. |
+*/ |
+ |
+#ifndef WAVEFORM_HH |
+#define WAVEFORM_HH |
+ |
+#include "grob-interface.hh" |
+#include "lily-proto.hh" |
+ |
+#include "fstream" |
+#include "iostream" |
+#include "string" |
+#include "map" |
+ |
+struct Interior_point_info |
+{ |
+ Real staff_position; |
+ Real waveform_position; |
+}; |
+ |
+struct Waveform_info |
+{ |
+ Real left_bound; |
+ Real right_bound; |
+ Spanner *spanner; |
+ vector<Interior_point_info *> interior_points; |
+}; |
+ |
+struct Breakpoint_height |
+{ |
+ int breakpoint; |
+ Real height; |
+}; |
+ |
+Spanner* get_original_spanner(Spanner* spanner); |
+vector<Waveform_info *> get_waveform_info(Spanner* spanner); |
+Drul_array<Real> get_l_r_boundaries (Grob* me); |
+Real get_note_column_boundary (Grob* note_column, Spanner* spanner); |
+ |
+class Waveform |
+{ |
+public: |
+ DECLARE_SCHEME_CALLBACK(calc_sample_length, (SCM)); |
+ DECLARE_SCHEME_CALLBACK(calculate_broken_wave_placements, (SCM)); |
+ DECLARE_SCHEME_CALLBACK(do_io, (SCM)); |
+ DECLARE_SCHEME_CALLBACK (get_split_instructions, (SCM)); |
+ DECLARE_SCHEME_CALLBACK (get_y_extent, (SCM)); |
+ DECLARE_SCHEME_CALLBACK (print, (SCM)); |
+ DECLARE_GROB_INTERFACE (); |
+ static multimap<Spanner*,multimap<Spanner*,SCM>*> *waveform_keep_tracker_; |
+ static int waveform_counter_; |
+ |
+}; |
+ |
+#endif // WAVEFORM_HH |