class XMLNode;
namespace ARDOUR {
- namespace Properties {
- /* this is pseudo-property: nothing has this as an actual
- property, but it allows us to signal changes to the
- MidiModel used by the MidiRegion
- */
- extern PBD::PropertyDescriptor<void*> midi_data;
- }
+ namespace Properties {
+ /* this is pseudo-property: nothing has this as an actual
+ property, but it allows us to signal changes to the
+ MidiModel used by the MidiRegion
+ */
+ extern PBD::PropertyDescriptor<void*> midi_data;
+ extern PBD::PropertyDescriptor<Evoral::MusicalTime> length_beats;
+ }
}
namespace ARDOUR {
/* start of this region is the offset between the start of its capture and the start of the whole pass */
plist.add (Properties::start, (*ci)->start - initial_capture);
plist.add (Properties::length, (*ci)->frames);
+ plist.add (Properties::length_beats, converter.from((*ci)->frames));
plist.add (Properties::name, region_name);
boost::shared_ptr<Region> rx (RegionFactory::create (srcs, plist));
void
MidiRegion::post_set (const PropertyChange& pc)
{
- if (pc.contains (Properties::length) || pc.contains (Properties::position)) {
+ if (pc.contains (Properties::length) && !pc.contains (Properties::length_beats)) {
update_length_beats ();
}
}