Skip to content

Commit

Permalink
macro midimappings should no longer error on v3.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
esaruoho authored Sep 21, 2024
1 parent 8b7584f commit 6ee71f4
Show file tree
Hide file tree
Showing 8 changed files with 653 additions and 542 deletions.
510 changes: 39 additions & 471 deletions PakettiExperimental_Verify.lua

Large diffs are not rendered by default.

12 changes: 11 additions & 1 deletion PakettiLoadPlugins.lua
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,24 @@ end
-- Load Plugin Function
function loadPlugin(pluginPath)
local selected_index = renoise.song().selected_instrument_index
renoise.song():insert_instrument_at(selected_index + 1)
local currentView = renoise.app().window.active_middle_frame
renoise.song():insert_instrument_at(renoise.song().selected_instrument_index + 1)
renoise.song().selected_instrument_index = selected_index + 1

if currentView == renoise.ApplicationWindow.MIDDLE_FRAME_INSTRUMENT_PHRASE_EDITOR
then
renoise.app().window.active_middle_frame = renoise.ApplicationWindow.MIDDLE_FRAME_INSTRUMENT_PLUGIN_EDITOR
renoise.app().window.active_middle_frame = renoise.ApplicationWindow.MIDDLE_FRAME_INSTRUMENT_PHRASE_EDITOR
else
renoise.app().window.active_middle_frame = currentView
end
local new_instrument = renoise.song().selected_instrument
new_instrument.plugin_properties:load_plugin(pluginPath)
if new_instrument.plugin_properties.plugin_device and new_instrument.plugin_properties.plugin_device.external_editor_available then
new_instrument.plugin_properties.plugin_device.external_editor_visible = true
end
-- openVisiblePagesToFitParameters() -- Uncomment if you have this function defined elsewhere

end

-- Check if any plugins are selected
Expand Down
9 changes: 7 additions & 2 deletions PakettiLoaders.lua
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,9 @@ end
-- Example usage
function LoadPPG()
local s = renoise.song()

local currentView = renoise.app().window.active_middle_frame


-- Ensure an empty instrument slot is selected
s.selected_instrument_index = search_empty_instrument()
Expand Down Expand Up @@ -202,8 +205,10 @@ function LoadPPG()

-- Set the active frame and tab for the UI
-- renoise.app().window.active_lower_frame = 3
renoise.app().window.active_middle_frame = 3
s.selected_instrument.active_tab = 2
-- renoise.app().window.active_middle_frame = 3
renoise.app().window.active_middle_frame = currentView

-- s.selected_instrument.active_tab = storedTab

-- Example commented code
-- renoise.song().selected_track.devices[checkline].parameters[1].value = 0.474 -- Mix
Expand Down
Loading

0 comments on commit 6ee71f4

Please sign in to comment.