mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 06:44:57 +01:00
skeleton for clip start/end editing
This commit is contained in:
parent
e7b10fc37d
commit
48ed5be776
6 changed files with 170 additions and 1 deletions
|
|
@ -1793,6 +1793,8 @@ MidiCueEditor::set_region (std::shared_ptr<ARDOUR::MidiRegion> r)
|
|||
}
|
||||
|
||||
view->set_region (r);
|
||||
view->show_start (true);
|
||||
view->show_end (true);
|
||||
|
||||
/* Compute zoom level to show entire source plus some margin if possible */
|
||||
|
||||
|
|
@ -1815,7 +1817,8 @@ MidiCueEditor::set_region (std::shared_ptr<ARDOUR::MidiRegion> r)
|
|||
{
|
||||
EditingContext::TempoMapScope tms (*this, map);
|
||||
double width = bg->width();
|
||||
samplecnt_t samples = duration.samples();
|
||||
/* make it 20% wider than we need */
|
||||
samplecnt_t samples = (samplecnt_t) floor (1.2 * duration.samples());
|
||||
std::cerr << "new spp from " << samples << " / " << width << std::endl;
|
||||
samplecnt_t spp = floor (samples / width);
|
||||
reset_zoom (spp);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue