Skip to content

Commit

Permalink
overdub trial
Browse files Browse the repository at this point in the history
  • Loading branch information
esaruoho committed Jan 17, 2025
1 parent fb5374c commit 04dd48a
Show file tree
Hide file tree
Showing 29 changed files with 16,440 additions and 30,847 deletions.
20,953 changes: 0 additions & 20,953 deletions KeyBindings/2024_11_20_PakettiKeyBindings.xml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,7 @@
<KeyBinding>
<Topic>Transport</Topic>
<Binding>Smart Note Off Row</Binding>
<Key>Shift + Option + PeakedBracket</Key>
</KeyBinding>
<KeyBinding>
<Topic>Transport</Topic>
Expand Down Expand Up @@ -1737,6 +1738,10 @@
<Topic>Paketti</Topic>
<Binding>∿ Paketti Normalize Sample</Binding>
</KeyBinding>
<KeyBinding>
<Topic>Paketti</Topic>
<Binding>∿ Normalize Sample Slices Independently</Binding>
</KeyBinding>
<KeyBinding>
<Topic>Paketti</Topic>
<Binding>∿ Pattern Effect Command CheatSheet</Binding>
Expand Down Expand Up @@ -2439,7 +2444,7 @@
</KeyBinding>
<KeyBinding>
<Topic>Paketti</Topic>
<Binding>∿ User-Defined Sample Folders Dialog...</Binding>
<Binding>∿ User-Defined Sample Folders...</Binding>
</KeyBinding>
<KeyBinding>
<Topic>Paketti</Topic>
Expand Down Expand Up @@ -13581,7 +13586,7 @@
</KeyBinding>
<KeyBinding>
<Topic>Paketti</Topic>
<Binding>∿ Global Volume Adjustment Dialog...</Binding>
<Binding>∿ Global Volume Adjustment...</Binding>
</KeyBinding>
<KeyBinding>
<Topic>Paketti</Topic>
Expand Down Expand Up @@ -14893,7 +14898,7 @@
</KeyBinding>
<KeyBinding>
<Topic>Paketti</Topic>
<Binding>∿ Open Player Pro Tools Dialog</Binding>
<Binding>∿ Open Player Pro Tools Dialog...</Binding>
</KeyBinding>
<KeyBinding>
<Topic>Paketti</Topic>
Expand Down Expand Up @@ -16589,6 +16594,7 @@
<KeyBinding>
<Topic>Paketti</Topic>
<Binding>∿ Expose and Select Next Column</Binding>
<Key>Shift + Command + Right</Key>
</KeyBinding>
<KeyBinding>
<Topic>Paketti</Topic>
Expand Down Expand Up @@ -18526,10 +18532,12 @@
<KeyBinding>
<Topic>Paketti</Topic>
<Binding>∿ Move Slice End Left by 100</Binding>
<Key>Shift + Command + Left</Key>
</KeyBinding>
<KeyBinding>
<Topic>Paketti</Topic>
<Binding>∿ Move Slice End Right by 100</Binding>
<Key>Shift + Command + Right</Key>
</KeyBinding>
<KeyBinding>
<Topic>Paketti</Topic>
Expand Down
7,860 changes: 3,929 additions & 3,931 deletions KeyBindings/Debug_Paketti_KeyBindings.log

Large diffs are not rendered by default.

9,539 changes: 4,769 additions & 4,770 deletions KeyBindings/Debug_Renoise_KeyBindings.log

Large diffs are not rendered by default.

22 changes: 11 additions & 11 deletions Paketti0G01_Loader.lua
Original file line number Diff line number Diff line change
Expand Up @@ -237,16 +237,16 @@ preferences = renoise.Document.create("ScriptingToolPreferences") {
pakettiRandomizeAllPluginsPercentageUserPreference4=40,
pakettiRandomizeAllPluginsPercentageUserPreference5=50
},
pakettiColuga = {
pakettiColugaLoopMode=2,
pakettiColugaClipLength=10,
pakettiColugaAmountOfVideos=1,
pakettiColugaLoadWholeVideo=true,
pakettiColugaOutputDirectory="Set this yourself, please.",
pakettiColugaFormatToSave=1,
pakettiColugaPathToSave="<No path set>",
pakettiColugaNewInstrumentOrSameInstrument=true,
pakettiColugaYT_DLPLocation="/opt/homebrew/bin/yt-dlp"
PakettiYTDLP = {
PakettiYTDLPLoopMode=2,
PakettiYTDLPClipLength=10,
PakettiYTDLPAmountOfVideos=1,
PakettiYTDLPLoadWholeVideo=true,
PakettiYTDLPOutputDirectory="Set this yourself, please.",
PakettiYTDLPFormatToSave=1,
PakettiYTDLPPathToSave="<No path set>",
PakettiYTDLPNewInstrumentOrSameInstrument=true,
PakettiYTDLPYT_DLPLocation="/opt/homebrew/bin/yt-dlp"
},
pakettiCheatSheet = {
pakettiCheatSheetRandomize=false,
Expand Down Expand Up @@ -326,7 +326,7 @@ pakettiThemeSelector = renoise.tool().preferences.pakettiThemeSelector
WipeSlices = renoise.tool().preferences.WipeSlices
AppSelection = renoise.tool().preferences.AppSelection
RandomizeSettings = renoise.tool().preferences.RandomizeSettings
pakettiColuga = renoise.tool().preferences.pakettiColuga
PakettiYTDLP = renoise.tool().preferences.PakettiYTDLP
DynamicViewPrefs = renoise.tool().preferences.PakettiDynamicViews


Expand Down
77 changes: 72 additions & 5 deletions PakettiAudioProcessing.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1440,10 +1440,7 @@ local function auto_correlate()
end
end

renoise.tool():add_menu_entry {
name = "Sample Editor:Auto Correlate Loop",
invoke = auto_correlate
}
renoise.tool():add_menu_entry{name="Sample Editor:Paketti..:WIP:Auto Correlate Loop",invoke=auto_correlate}



Expand Down Expand Up @@ -1529,10 +1526,80 @@ local function auto_detect_single_cycle_loop()
end

renoise.tool():add_menu_entry {
name = "Sample Editor:Auto Detect Single-Cycle Loop",
name = "Sample Editor:Paketti..:WIP:Auto Detect Single-Cycle Loop",
invoke = auto_detect_single_cycle_loop
}




function normalize_selected_sample_by_slices()
local selected_sample = renoise.song().selected_sample

if not selected_sample or not selected_sample.sample_buffer or not selected_sample.sample_buffer.has_sample_data then
renoise.app():show_status("Normalization failed: No valid sample to normalize.")
return
end

-- Check if sample has slice markers
if #selected_sample.slice_markers == 0 then
-- If no slice markers, fall back to regular normalize
normalize_selected_sample()
return
end

local sbuf = selected_sample.sample_buffer
local slice_count = #selected_sample.slice_markers

-- Prepare buffer for changes
sbuf:prepare_sample_data_changes()

-- Process each slice independently
for slice_idx = 1, slice_count do
local slice_start = selected_sample.slice_markers[slice_idx]
local slice_end = (slice_idx < slice_count)
and selected_sample.slice_markers[slice_idx + 1] - 1
or sbuf.number_of_frames

-- Find highest amplitude in this slice
local highest_detected = 0
for frame_idx = slice_start, slice_end do
if sbuf.number_of_channels == 2 then
highest_detected = math.max(math.abs(sbuf:sample_data(1, frame_idx)), highest_detected)
highest_detected = math.max(math.abs(sbuf:sample_data(2, frame_idx)), highest_detected)
else
highest_detected = math.max(math.abs(sbuf:sample_data(1, frame_idx)), highest_detected)
end
end

-- Only normalize if the slice isn't silent
if highest_detected > 0 then
-- Normalize this slice
for frame_idx = slice_start, slice_end do
if sbuf.number_of_channels == 2 then
local normalized_sdata = sbuf:sample_data(1, frame_idx) / highest_detected
sbuf:set_sample_data(1, frame_idx, normalized_sdata)
normalized_sdata = sbuf:sample_data(2, frame_idx) / highest_detected
sbuf:set_sample_data(2, frame_idx, normalized_sdata)
else
local normalized_sdata = sbuf:sample_data(1, frame_idx) / highest_detected
sbuf:set_sample_data(1, frame_idx, normalized_sdata)
end
end
end
end

sbuf:finalize_sample_data_changes()

renoise.app():show_status(string.format("Normalized %d slices independently", slice_count))
end
-- Add keybinding and menu entries
renoise.tool():add_keybinding{
name="Global:Paketti:Normalize Sample Slices Independently",
invoke=function() normalize_selected_sample_by_slices() end
}

renoise.tool():add_menu_entry{
name="Sample Editor:Paketti..:Normalize Slices Independently",
invoke=function() normalize_selected_sample_by_slices() end
}
24 changes: 12 additions & 12 deletions PakettiAutomation.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1533,10 +1533,10 @@ renoise.tool():add_menu_entry { name = "Pattern Matrix:Paketti..:Automation Ramp
renoise.tool():add_menu_entry { name = "Pattern Matrix:Paketti..:Automation Ramp Up (Lin) for Pattern Matrix Selection", invoke = automation_ramp_up_lin }
renoise.tool():add_menu_entry { name = "Pattern Matrix:Paketti..:Automation Ramp Down (Lin) for Pattern Matrix Selection", invoke = automation_ramp_down_lin }

renoise.tool():add_keybinding { name = "Global:Paketti..:Automation Ramp Up (Exp)", invoke = automation_ramp_up_exp }
renoise.tool():add_keybinding { name = "Global:Paketti..:Automation Ramp Down (Exp)", invoke = automation_ramp_down_exp }
renoise.tool():add_keybinding { name = "Global:Paketti..:Automation Ramp Up (Lin)", invoke = automation_ramp_up_lin }
renoise.tool():add_keybinding { name = "Global:Paketti..:Automation Ramp Down (Lin)", invoke = automation_ramp_down_lin }
renoise.tool():add_keybinding { name = "Global:Paketti:Automation Ramp Up (Exp)", invoke = automation_ramp_up_exp }
renoise.tool():add_keybinding { name = "Global:Paketti:Automation Ramp Down (Exp)", invoke = automation_ramp_down_exp }
renoise.tool():add_keybinding { name = "Global:Paketti:Automation Ramp Up (Lin)", invoke = automation_ramp_up_lin }
renoise.tool():add_keybinding { name = "Global:Paketti:Automation Ramp Down (Lin)", invoke = automation_ramp_down_lin }

-- Whitelist of center-based automation parameters
local center_based_parameters = {
Expand Down Expand Up @@ -1653,15 +1653,15 @@ renoise.tool():add_menu_entry { name = "Pattern Matrix:Paketti..:Automation Top
renoise.tool():add_menu_entry { name = "Pattern Matrix:Paketti..:Automation Center to Bottom (Lin) for Pattern Matrix Selection", invoke = automation_center_to_bottom_lin }
renoise.tool():add_menu_entry { name = "Pattern Matrix:Paketti..:Automation Bottom to Center (Lin) for Pattern Matrix Selection", invoke = automation_bottom_to_center_lin }

renoise.tool():add_keybinding { name = "Global:Paketti..:Automation Center to Top (Exp)", invoke = automation_center_to_top_exp }
renoise.tool():add_keybinding { name = "Global:Paketti..:Automation Top to Center (Exp)", invoke = automation_top_to_center_exp }
renoise.tool():add_keybinding { name = "Global:Paketti..:Automation Center to Bottom (Exp)", invoke = automation_center_to_bottom_exp }
renoise.tool():add_keybinding { name = "Global:Paketti..:Automation Bottom to Center (Exp)", invoke = automation_bottom_to_center_exp }
renoise.tool():add_keybinding { name = "Global:Paketti:Automation Center to Top (Exp)", invoke = automation_center_to_top_exp }
renoise.tool():add_keybinding { name = "Global:Paketti:Automation Top to Center (Exp)", invoke = automation_top_to_center_exp }
renoise.tool():add_keybinding { name = "Global:Paketti:Automation Center to Bottom (Exp)", invoke = automation_center_to_bottom_exp }
renoise.tool():add_keybinding { name = "Global:Paketti:Automation Bottom to Center (Exp)", invoke = automation_bottom_to_center_exp }

renoise.tool():add_keybinding { name = "Global:Paketti..:Automation Center to Top (Lin)", invoke = automation_center_to_top_lin }
renoise.tool():add_keybinding { name = "Global:Paketti..:Automation Top to Center (Lin)", invoke = automation_top_to_center_lin }
renoise.tool():add_keybinding { name = "Global:Paketti..:Automation Center to Bottom (Lin)", invoke = automation_center_to_bottom_lin }
renoise.tool():add_keybinding { name = "Global:Paketti..:Automation Bottom to Center (Lin)", invoke = automation_bottom_to_center_lin }
renoise.tool():add_keybinding { name = "Global:Paketti:Automation Center to Top (Lin)", invoke = automation_center_to_top_lin }
renoise.tool():add_keybinding { name = "Global:Paketti:Automation Top to Center (Lin)", invoke = automation_top_to_center_lin }
renoise.tool():add_keybinding { name = "Global:Paketti:Automation Center to Bottom (Lin)", invoke = automation_center_to_bottom_lin }
renoise.tool():add_keybinding { name = "Global:Paketti:Automation Bottom to Center (Lin)", invoke = automation_bottom_to_center_lin }

local function randomize_envelope()
local song = renoise.song()
Expand Down
4 changes: 2 additions & 2 deletions PakettiChordsPlus.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ function JalexAdd(number)
if renoise.song().selected_track.visible_note_columns == 12 then
renoise.song().selected_line_index=renoise.song().selected_line_index+1
renoise.song().selected_note_column_index = 1

renoise.song()
return
end

Expand All @@ -24,7 +24,7 @@ function JalexAdd(number)
renoise.app():show_status("Cannot go higher than B-9.")
return
end

renoise.song().selected_pattern.tracks[renoise.song().selected_track_index].lines[renoise.song().selected_line_index].note_columns[renoise.song().selected_note_column_index + 1].note_value = originalNote + number
renoise.song().selected_pattern.tracks[renoise.song().selected_track_index].lines[renoise.song().selected_line_index].note_columns[renoise.song().selected_note_column_index + 1].instrument_value = originalInstrument
renoise.song().selected_pattern.tracks[renoise.song().selected_track_index].lines[renoise.song().selected_line_index].note_columns[renoise.song().selected_note_column_index + 1].volume_value = originalVolume
Expand Down
44 changes: 28 additions & 16 deletions PakettiControls.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ renoise.tool():add_keybinding{name="Global:Paketti:Save Song (2nd)",invoke=funct

function RecordFollowToggle()
local s=renoise.song()
local t=s.transport
local t=renoise.song().transport
local w=renoise.app().window
w.active_middle_frame=1
if t.edit_mode == true and t.follow_player == true then t.edit_mode=false t.follow_player=false return end
Expand All @@ -28,7 +28,7 @@ previous_edit_step = nil

function RecordToggleg()
local s = renoise.song()
local t = s.transport
local t = renoise.song().transport

-- Output the current edit_step
print("Current edit_step: " .. t.edit_step)
Expand Down Expand Up @@ -132,8 +132,8 @@ renoise.tool():add_keybinding{name="Global:Paketti:KeybOctave Down", invoke=func
-----
function PakettiTranspose(steps)
local song = renoise.song()
local selection = song.selection_in_pattern
local pattern = song.selected_pattern
local selection = renoise.song().selection_in_pattern
local pattern = renoise.song().selected_pattern

local start_track, end_track, start_line, end_line, start_column, end_column

Expand Down Expand Up @@ -281,8 +281,27 @@ renoise.song().transport.wrapped_pattern_edit=true
renoise.app().window.active_middle_frame=1
end

renoise.tool():add_keybinding{name="Global:Paketti:Contour Shuttle Record Off", invoke=function() recOffFollowOn() end}
renoise.tool():add_keybinding{name="Global:Paketti:Contour Shuttle Record On", invoke=function() recOnFollowOff() end}
renoise.tool():add_keybinding{name="Global:Paketti:Contour Shuttle Record Off, Follow On", invoke=function() recOffFollowOn() end}
renoise.tool():add_keybinding{name="Global:Paketti:Contour Shuttle Record On, Follow Off", invoke=function() recOnFollowOff() end}

function recordFollowFlip()
local t = renoise.song().transport
local w = renoise.app().window

if t.edit_mode then
t.edit_mode = false
t.follow_player = true
else
t.edit_mode = true
t.follow_player = false
w.active_middle_frame = 1
w.lock_keyboard_focus = true
end
end

renoise.tool():add_keybinding{name="Global:Paketti:Record & Follow Flip", invoke=function() recordFollowFlip() end}
renoise.tool():add_midi_mapping{name="Paketti:Record & Follow Flip x[Toggle]", invoke=function(message) if message:is_trigger() then recordFollowFlip() end end}

-------
renoise.tool():add_keybinding{name="Global:Paketti:Global Edit Mode Toggle",invoke=function()
if renoise.song().transport.edit_mode then renoise.song().transport.edit_mode=false
Expand Down Expand Up @@ -426,16 +445,14 @@ end
function RecordToggle()
local a=renoise.app()
local s=renoise.song()
local t=s.transport
local t=renoise.song().transport
local currentstep=t.edit_step
--if has notifier, dump notifier, if no notifier, add notifier
--if has notifier, remove notifier, if no notifier, add notifier
if t.edit_mode then
t.edit_mode=false
if t.edit_step==0 then
t.edit_step=1
else
return
end
else return end
else
t.edit_mode = true
if s.selected_effect_column_index == 1 then t.edit_step=0
Expand All @@ -446,9 +463,6 @@ end

renoise.tool():add_keybinding{name="Global:Paketti:Record Toggle with EditStep Reading (2nd)", invoke=function() RecordToggle() end}




---------
function loadRecentlySavedSong()
renoise.app():load_song(renoise.app().recently_saved_song_files[1])
Expand Down Expand Up @@ -481,8 +495,6 @@ end
renoise.tool():add_keybinding{name="Global:Paketti:Switch Upper Frame (Track Scopes/Master Spectrum)",invoke=function()
switch_upper_frame() end}
----


-- Function to duplicate the selected track and rename it
local function duplicate_selected_track()
local song=renoise.song()
Expand Down
Loading

0 comments on commit 04dd48a

Please sign in to comment.