Some last minute changes for 2.6:
renoise.app():prompt_for_path(dialog_title) -> [valid path or empty string]
Pattern Line notifiers as needed by tools that visualizes pattern data:
-- Check/add/remove notifier functions or methods, which are called by Renoise -- as soon as any of the pattern's lines have changed. -- The notifiers are called as soon as a new line was added, an existing one -- was cleared, or existing ones changed somehow (notes, effects, anything). -- -- One argument is passed to the notifier function: "pos", a table with the -- fields "pattern", "track" and "line", which define where the change has -- happened: -- -- function my_pattern_line_notifier(pos) -- -- check pos.pattern, pos.track, pos.line (all are indices) -- end -- -- Please be gentle in the notifiers, don't do too much stuff in there. -- Ideally just set a flag like "pattern_dirty" which then gets picked up by -- an app_idle notifier: Line change notifiers can be called hundreds of times -- when for example simply clearing a pattern. -- If you are only interested in changes that are made to currently edited -- pattern, dynamically attach and detach to the selected pattern's line -- notifiers by listening to "renoise.song().selected_pattern_observable". [added RC2] renoise.song().patterns:has_line_notifier(func[, obj]) -> [boolean] [added RC2] renoise.song().patterns:add_line_notifier(func[, obj]) [added RC2] renoise.song().patterns:remove_line_notifier(func[, obj])
Please do not ignore the note about “be gentle in the notifiers”. Wrongly used they will easily be a big problem and lag any pattern operations in Renoises main editor, the Pattern Editor.
To avoid such a lag, prefer doing real update stuff in one batch in idle, like:
function line_changed_notifier(pos) -- a line changed that we are displaying, refresh the UI later on refresh_ui = true end -- then in your idle notifier: function on_idle() if (refresh_ui) then refresh_ui = false -- pattern changed. rebuild the UI which represents the pattern end end
A few coroutine related issues have been fixed. Like it was not possible to remove a notifier in a Lua thread that was added by the main thread. Also fixed a possible crashes crash when creating dialogs from within Lua threads.