better xfade presets (still need icons)
authorPaul Davis <paul@linuxaudiosystems.com>
Mon, 3 Nov 2008 08:22:31 +0000 (08:22 +0000)
committerPaul Davis <paul@linuxaudiosystems.com>
Mon, 3 Nov 2008 08:22:31 +0000 (08:22 +0000)
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@4086 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/crossfade_edit.cc
gtk2_ardour/crossfade_view.cc

index cfab1c7ca07773723055d756acc5bbf7f7a9ec83..2c0085c7963f1d74a0a6a15d072714d2c5787ecd 100644 (file)
@@ -868,30 +868,26 @@ CrossfadeEditor::build_presets ()
        p->push_back (PresetPoint (0.666667, 0.666186));
        p->push_back (PresetPoint (0.833333, 0.833033));
        p->push_back (PresetPoint (1.000000, 1.000000));
-
        fade_in_presets->push_back (p);
 
-       p = new Preset ("S-curve", "crossfade_in_default");
-#ifdef OTHER_S
+       p = new Preset ("S(1)-curve", "crossfade_in_default");
        p->push_back (PresetPoint (0, 0));
        p->push_back (PresetPoint (0.1, 0.01));
        p->push_back (PresetPoint (0.2, 0.03));
        p->push_back (PresetPoint (0.8, 0.97));
        p->push_back (PresetPoint (0.9, 0.99));
        p->push_back (PresetPoint (1, 1));
-#endif
+       fade_in_presets->push_back (p);
 
+       p = new Preset ("S(2)-curve", "crossfade_in_default");
        p->push_back (PresetPoint (0.0, 0.0));
-       p->push_back (PresetPoint (0.0625 , 0.222));
-       p->push_back (PresetPoint (0.1875 , 0.444));
-       p->push_back (PresetPoint (0.8125 , 0.555));
-       p->push_back (PresetPoint (0.875  , 0.777));
-       p->push_back (PresetPoint (1.0    , 1.0));
-
+       p->push_back (PresetPoint (0.055, 0.222));
+       p->push_back (PresetPoint (0.163, 0.35));
+       p->push_back (PresetPoint (0.837, 0.678));
+       p->push_back (PresetPoint (0.945, 0.783));
+       p->push_back (PresetPoint (1.0, 1.0));
        fade_in_presets->push_back (p);
 
-
-       // p = new Preset ("linin.xpm");
        p = new Preset ("Constant Power (-3dB)", "crossfade_in_constant");
 
        p->push_back (PresetPoint (0.000000, 0.000000));
@@ -955,7 +951,7 @@ CrossfadeEditor::build_presets ()
        p->push_back (PresetPoint (1.000000, 0.000000));
        fade_out_presets->push_back (p);
 
-       p = new Preset ("S-Curve", "crossfade_out_default");
+       p = new Preset ("S(1)-Curve", "crossfade_out_default");
        p->push_back (PresetPoint (0, 1));
        p->push_back (PresetPoint (0.1, 0.99));
        p->push_back (PresetPoint (0.2, 0.97));
@@ -964,6 +960,15 @@ CrossfadeEditor::build_presets ()
        p->push_back (PresetPoint (1, 0));
        fade_out_presets->push_back (p);
 
+       p = new Preset ("S(2)-Curve", "crossfade_out_default");
+       p->push_back (PresetPoint (0.0, 1.0));
+       p->push_back (PresetPoint (0.163, 0.678));
+       p->push_back (PresetPoint (0.055, 0.783));
+       p->push_back (PresetPoint (0.837, 0.35));
+       p->push_back (PresetPoint (0.945, 0.222));
+       p->push_back (PresetPoint (1.0, 0.0));
+       fade_out_presets->push_back (p);
+
        // p = new Preset ("linout.xpm");
        p = new Preset ("Constant Power (-3dB cut)", "crossfade_out_constant");
        p->push_back (PresetPoint (0.000000, 1.000000));
@@ -1073,7 +1078,7 @@ CrossfadeEditor::x_coordinate (double& xfract) const
 {
        xfract = min (1.0, xfract);
        xfract = max (0.0, xfract);
-    
+
        return canvas_border + (xfract * effective_width());
 }
 
index 0d1d9427d6f0af9cbcc4f34a2632b4704a26f0e5..5e27bf958fca7bd62dc5e84f41cffdbafa21f1d8 100644 (file)
@@ -174,7 +174,7 @@ CrossfadeView::redraw_curves ()
        }
 
        npoints = get_time_axis_view().editor.frame_to_pixel (crossfade->length());
-       npoints = std::min (gdk_screen_width(), npoints);
+       // npoints = std::min (gdk_screen_width(), npoints);
 
        if (!_visible || !crossfade->active() || npoints < 3) {
                fade_in->hide();
@@ -189,6 +189,7 @@ CrossfadeView::redraw_curves ()
        vec = new float[npoints];
 
        crossfade->fade_in().get_vector (0, crossfade->length(), vec, npoints);
+
        for (int i = 0, pci = 0; i < npoints; ++i) {
                Art::Point &p = (*points)[pci++];
                p.set_x(i);