X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Flua_api.cc;h=0e82276b1e6e7582de244c4de4467c25e078b5b6;hb=b23d7d9170a12cbcd788e1c2cbcf688f376752ed;hp=c32a9e9338744e6c7953ddb0df5a5c8ddcf25447;hpb=35f84bde6a92618179ac13e066fe6d4b15788698;p=ardour.git diff --git a/libs/ardour/lua_api.cc b/libs/ardour/lua_api.cc index c32a9e9338..0e82276b1e 100644 --- a/libs/ardour/lua_api.cc +++ b/libs/ardour/lua_api.cc @@ -820,3 +820,17 @@ LuaAPI::new_noteptr (uint8_t chan, Evoral::Beats beat_time, Evoral::Beats length { return boost::shared_ptr > (new Evoral::Note(chan, beat_time, length, note, velocity)); } + +std::list > > +LuaAPI::note_list (boost::shared_ptr mm) +{ + typedef boost::shared_ptr > NotePtr; + + std::list 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; +}