mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-09 15:15:41 +01:00
clip recording: store tempo and meter for audio files created during clip recording
Information taken from the timeline - we assume you're going to play in time with the tempo map. Future work: no other material in session - determine tempo (and meter? - super hard) from recorded clip
This commit is contained in:
parent
6badce2d3a
commit
1400fe012e
1 changed files with 10 additions and 3 deletions
|
|
@ -5771,19 +5771,26 @@ TriggerBoxThread::build_audio_source (AudioTrigger* t, Temporal::timecnt_t const
|
|||
++n;
|
||||
}
|
||||
|
||||
/* now build region */
|
||||
|
||||
PropertyList plist;
|
||||
std::shared_ptr<FileSource> fs;
|
||||
|
||||
SegmentDescriptor segment;
|
||||
Temporal::TempoMap::SharedPtr tmap (Temporal::TempoMap::use());
|
||||
segment.set_extent (0, t->data_length());
|
||||
segment.set_tempo (tmap->tempo_at (pos));
|
||||
segment.set_meter (tmap->meter_at (pos));
|
||||
|
||||
for (auto & src : sources) {
|
||||
fs = std::dynamic_pointer_cast<FileSource> (src);
|
||||
fs->mark_immutable ();
|
||||
src->set_segment_descriptor (segment);
|
||||
SourceFactory::setup_peakfile (src, false);
|
||||
}
|
||||
|
||||
fs = std::dynamic_pointer_cast<FileSource> (sources.front());
|
||||
assert (fs);
|
||||
/* now build region */
|
||||
|
||||
PropertyList plist;
|
||||
|
||||
std::string region_name = region_name_from_path (fs->path(), true, false);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue