]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/audio-item.cc
Issue 4938 (1/3) Add Audio_item and Midi_item subclasses for control changes
[lilypond.git] / lily / audio-item.cc
index 06603584b97663a30d2803363afcfabef69e0bf0..5c713c43ed5cdf18be6d066de203a89ea1cdb8a6 100644 (file)
@@ -102,9 +102,9 @@ Audio_key::Audio_key (int acc, bool major)
   major_ = major;
 }
 
-const Real Audio_span_dynamic::MINIMUM_VOLUME;
-const Real Audio_span_dynamic::MAXIMUM_VOLUME;
-const Real Audio_span_dynamic::DEFAULT_VOLUME;
+const Real Audio_span_dynamic::MINIMUM_VOLUME = 0.0;
+const Real Audio_span_dynamic::MAXIMUM_VOLUME = 1.0;
+const Real Audio_span_dynamic::DEFAULT_VOLUME = 90.0 / 127.0;
 
 Audio_span_dynamic::Audio_span_dynamic (Moment mom, Real volume)
   : start_moment_ (mom),
@@ -132,7 +132,7 @@ moment_to_ticks (Moment m)
   return int (moment_to_real (m) * 384 * 4);
 }
 
-void Audio_span_dynamic::set_end_moment(Moment mom)
+void Audio_span_dynamic::set_end_moment (Moment mom)
 {
   if (mom < start_moment_)
     {
@@ -222,3 +222,9 @@ Audio_control_function_value_change::context_properties_[] = {
   // extra element to signify the end of the mapping, must be kept last
   { 0,                 NUM_CONTROLS,  0.0, 0.0 }
 };
+
+Audio_control_change::Audio_control_change (int control, int value)
+  : control_ (control),
+    value_ (value)
+{
+}