mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-22 14:46:34 +01:00
MIDITrigger::get_segment_descriptor() does something sensible with Region tempo/meter
This commit is contained in:
parent
be913373cb
commit
577cdd5f61
1 changed files with 2 additions and 7 deletions
|
|
@ -2645,14 +2645,9 @@ SegmentDescriptor
|
||||||
MIDITrigger::get_segment_descriptor () const
|
MIDITrigger::get_segment_descriptor () const
|
||||||
{
|
{
|
||||||
SegmentDescriptor sd;
|
SegmentDescriptor sd;
|
||||||
std::shared_ptr<MidiRegion> mr = std::dynamic_pointer_cast<MidiRegion> (_region);
|
|
||||||
assert (mr);
|
|
||||||
|
|
||||||
sd.set_extent (Temporal::Beats(), mr->length().beats());
|
|
||||||
|
|
||||||
/* we don't really have tempo information for MIDI yet */
|
|
||||||
sd.set_tempo (Temporal::Tempo (120, 4));
|
|
||||||
|
|
||||||
|
sd.set_extent (Temporal::Beats(), _region->length().beats());
|
||||||
|
sd.set_tempo (_region->tempo());
|
||||||
return sd;
|
return sd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue