13
0

fixup Lua TempoMap bindings (these will likelyneed to expand in the future

This also likely breaks script back-compatibility for anything tempo-map related
This commit is contained in:
Paul Davis 2021-01-14 16:45:09 -07:00
parent 57311c7643
commit 1ccebbf1f0

View File

@ -1884,22 +1884,16 @@ LuaBindings::common (lua_State* L)
.addFunction ("note_value", &Meter::note_value) .addFunction ("note_value", &Meter::note_value)
.endClass () .endClass ()
#warning NUTEMPO need to consider which methods to use here since ::add_* are private right now and many others have changed .beginClass <Temporal::TempoMap> ("TempoMap")
#if 0 .addFunction ("set_tempo", (Temporal::TempoPoint& (Temporal::TempoMap::*)(Temporal::Tempo const &,timepos_t const &)) &TempoMap::set_tempo)
.beginClass <TempoMap> ("TempoMap") .addFunction ("set_meter", (Temporal::MeterPoint& (Temporal::TempoMap::*)(Temporal::Meter const &,timepos_t const &)) &TempoMap::set_meter)
.addFunction ("add_tempo", &TempoMap::add_tempo) .addFunction ("tempo_at", (Temporal::TempoPoint& (Temporal::TempoMap::*)(timepos_t const &) const) &TempoMap::tempo_at)
.addFunction ("add_meter", &TempoMap::add_meter) .addFunction ("meter_at", (Temporal::MeterPoint& (Temporal::TempoMap::*)(timepos_t const &) const) &TempoMap::meter_at)
.addFunction ("tempo_section_at_frame", (TempoSection& (TempoMap::*)(samplepos_t))&TempoMap::tempo_section_at_sample) .addFunction ("bbt_at", (Temporal::BBT_Time (Temporal::TempoMap::*)(timepos_t const &) const) &TempoMap::bbt_at)
.addFunction ("tempo_section_at_frame", (const TempoSection& (TempoMap::*)(samplepos_t) const)&TempoMap::tempo_section_at_sample) .addFunction ("quarters_at", (Temporal::Beats (Temporal::TempoMap::*)(timepos_t const &) const) &TempoMap::quarters_at)
.addFunction ("meter_section_at_frame", &TempoMap::meter_section_at_sample) .addFunction ("sample_at", (samplepos_t (Temporal::TempoMap::*)(timepos_t const &, samplecnt_t) const) &TempoMap::sample_at)
.addFunction ("meter_section_at_beat", &TempoMap::meter_section_at_beat)
.addFunction ("bbt_at_frame", &TempoMap::bbt_at_sample)
.addFunction ("exact_beat_at_frame", &TempoMap::exact_beat_at_sample)
.addFunction ("exact_qn_at_frame", &TempoMap::exact_qn_at_sample)
.addFunction ("samplepos_plus_qn", &TempoMap::samplepos_plus_qn)
.addFunction ("framewalk_to_qn", &TempoMap::framewalk_to_qn)
.endClass () .endClass ()
#endif
.beginClass <ChanCount> ("ChanCount") .beginClass <ChanCount> ("ChanCount")
.addConstructor <void (*) (DataType, uint32_t)> () .addConstructor <void (*) (DataType, uint32_t)> ()
.addFunction ("get", &ChanCount::get) .addFunction ("get", &ChanCount::get)