mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-20 13:46:30 +01:00
Lua bindings to access MIDI region/source note-events
This commit is contained in:
parent
940707e327
commit
6ceade76b3
3 changed files with 33 additions and 1 deletions
|
|
@ -820,3 +820,17 @@ LuaAPI::new_noteptr (uint8_t chan, Evoral::Beats beat_time, Evoral::Beats length
|
|||
{
|
||||
return boost::shared_ptr<Evoral::Note<Evoral::Beats> > (new Evoral::Note<Evoral::Beats>(chan, beat_time, length, note, velocity));
|
||||
}
|
||||
|
||||
std::list<boost::shared_ptr<Evoral::Note<Evoral::Beats> > >
|
||||
LuaAPI::note_list (boost::shared_ptr<MidiModel> mm)
|
||||
{
|
||||
typedef typename boost::shared_ptr<Evoral::Note<Evoral::Beats> > NotePtr;
|
||||
|
||||
std::list<NotePtr> note_ptr_list;
|
||||
|
||||
const MidiModel::Notes& notes = mm->notes();
|
||||
for (MidiModel::Notes::const_iterator i = notes.begin(); i != notes.end(); ++i) {
|
||||
note_ptr_list.push_back (*i);
|
||||
}
|
||||
return note_ptr_list;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue