Add Lua bindings to inspect the Tempo Map
This commit is contained in:
parent
bca825e515
commit
4b9d6ff498
@ -1758,6 +1758,7 @@ LuaBindings::common (lua_State* L)
|
||||
.addConstructor <void (*) (double, double, double)> ()
|
||||
.addFunction ("note_type", &Tempo::note_type)
|
||||
.addFunction ("note_types_per_minute", (double (Tempo::*)() const)&Tempo::note_types_per_minute)
|
||||
.addFunction ("end_note_types_per_minute", (double (Tempo::*)() const)&Tempo::end_note_types_per_minute)
|
||||
.addFunction ("quarter_notes_per_minute", &Tempo::quarter_notes_per_minute)
|
||||
.addFunction ("samples_per_quarter_note", &Tempo::samples_per_quarter_note)
|
||||
.addFunction ("samples_per_note_type", &Tempo::samples_per_note_type)
|
||||
@ -1787,7 +1788,6 @@ LuaBindings::common (lua_State* L)
|
||||
.addFunction ("add_tempo", &TempoMap::add_tempo)
|
||||
.addFunction ("add_meter", &TempoMap::add_meter)
|
||||
.addFunction ("tempo_section_at_sample", (TempoSection& (TempoMap::*)(samplepos_t))&TempoMap::tempo_section_at_sample)
|
||||
.addFunction ("tempo_section_at_sample", (const TempoSection& (TempoMap::*)(samplepos_t) const)&TempoMap::tempo_section_at_sample)
|
||||
.addFunction ("meter_section_at_sample", &TempoMap::meter_section_at_sample)
|
||||
.addFunction ("meter_section_at_beat", &TempoMap::meter_section_at_beat)
|
||||
.addFunction ("bbt_at_sample", &TempoMap::bbt_at_sample)
|
||||
@ -1795,20 +1795,33 @@ LuaBindings::common (lua_State* L)
|
||||
.addFunction ("exact_qn_at_sample", &TempoMap::exact_qn_at_sample)
|
||||
.addFunction ("samplepos_plus_qn", &TempoMap::samplepos_plus_qn)
|
||||
.addFunction ("framewalk_to_qn", &TempoMap::framewalk_to_qn)
|
||||
.addFunction ("previous_tempo_section", &TempoMap::previous_tempo_section)
|
||||
.addFunction ("next_tempo_section", &TempoMap::next_tempo_section)
|
||||
.endClass ()
|
||||
|
||||
.beginClass <MetricSection> ("MetricSection")
|
||||
.addFunction ("pulse", &MetricSection::pulse)
|
||||
.addFunction ("set_pulse", &MetricSection::set_pulse)
|
||||
.addFunction ("sample", &MetricSection::sample)
|
||||
.addFunction ("minute", &MetricSection::minute)
|
||||
.addFunction ("initial", &MetricSection::initial)
|
||||
.addFunction ("is_tempo", &MetricSection::is_tempo)
|
||||
.addFunction ("sample_at_minute", &MetricSection::sample_at_minute)
|
||||
.addFunction ("minute_at_sample", &MetricSection::minute_at_sample)
|
||||
.endClass ()
|
||||
|
||||
.deriveClass <TempoSection, MetricSection> ("TempoSection")
|
||||
.addCast<Tempo> ("to_tempo")
|
||||
.addFunction ("c", (double(TempoSection::*)()const)&TempoSection::c)
|
||||
.addFunction ("active", &TempoSection::active)
|
||||
.addFunction ("locked_to_meter", &TempoSection::locked_to_meter)
|
||||
.addFunction ("clamped", &TempoSection::clamped)
|
||||
.endClass ()
|
||||
|
||||
.deriveClass <MeterSection, MetricSection> ("MeterSection")
|
||||
.addCast<Meter> ("to_meter")
|
||||
.addFunction ("set_pulse", &MeterSection::set_pulse)
|
||||
.addFunction ("bbt", &MeterSection::bbt)
|
||||
.addFunction ("beat", &MeterSection::beat)
|
||||
.addFunction ("set_beat", (void(MeterSection::*)(double))&MeterSection::set_beat)
|
||||
.endClass ()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user