better xfade presets (still need icons)
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@4086 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
090c5993ee
commit
1ae268ad2a
|
@ -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
|
||||
|
||||
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));
|
||||
|
||||
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.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());
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue