Add 't' key on timeline to add a tempo point using the current range as the beat length.

This commit is contained in:
Jonathan Moore Liles 2008-05-24 22:27:23 -05:00
parent 734e3b555b
commit ba430eb236
1 changed files with 18 additions and 0 deletions

View File

@ -924,6 +924,24 @@ Timeline::handle ( int m )
redraw(); redraw();
return 1; return 1;
} }
case 't':
{
if ( p1 != p2 )
{
if ( p1 > p2 )
{
nframes_t t = p2;
p2 = p1;
p1 = t;
}
beats_per_minute( p1, sample_rate() * 60 / (float)( p2 - p1 ) );
p2 = p1;
}
return 1;
}
default: default:
return Fl_Overlay_Window::handle( m ); return Fl_Overlay_Window::handle( m );
} }