Skip to content

Commit

Permalink
minor changes when testing in the evening
Browse files Browse the repository at this point in the history
  • Loading branch information
kanduvisla committed Oct 16, 2024
1 parent e28f588 commit 26b6c9b
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 7 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ This is a rough lists of ideas that I want to add to this plugin in the future:
- suggestion: `LF03`
- Stutter / randomize track
- Muting Groups - where you can mute/unmute multiple tracks at once
- More optimizations (any help is welcome)

## Known issues & limitations

Expand All @@ -76,3 +77,4 @@ This is a rough lists of ideas that I want to add to this plugin in the future:
- Muting in tracks don't work in tracks that are cut with the `LC` command
- When live-editing a track with a `LC` command, funky things will happen due to the virtual counting.
- Possibly a Renoise bug, but when you delete an effect from a track, the `L` in the FX column changes (to a `K` for example).
- Transitioning between patterns of different lengths not yet very stable. Using `ZB00` on the end of your pattern helps when the next pattern is longer, but when transitioning from a longer to a shorter pattern it's not really stable yet.
25 changes: 23 additions & 2 deletions includes/cutoff_points.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ process_cutoff_points = function(t, dstPattern, srcPattern, song, trackLengths,
-- times it has already copied to keep the remainder in mind.

-- How many times does this pattern "fit" in this track:
local duplicationCount = math.ceil(numberOfLines / trackLengths[t])
local duplicationCount = math.ceil(numberOfLines / trackLengths[t]) + 1

-- Copy from first line up until the line with the "LC" effectL
for fl=1, l - 1 do
Expand Down Expand Up @@ -51,7 +51,28 @@ process_cutoff_points = function(t, dstPattern, srcPattern, song, trackLengths,
dstTrack:line(dstLine):copy_from(srcLine)
end

-- TODO: columns
-- Check for column effects (the apply to a single column):
local line = dstTrack:line(dstLine)
local columns = line.note_columns
for c=1, #columns do
local column = line:note_column(c)
local effect_number = column.effect_number_string
local effect_amount = column.effect_amount_string
-- Fill:
if effect_number == "LF" then
-- TODO, how to do fills with polyrhythm?
elseif effect_number == "LT" then
if not is_trig_active(effect_amount, virtualTrackPlayCount) then
column:clear()
end
-- Inversed Trigger:
elseif effect_number == "LI" then
if is_trig_active(effect_amount, virtualTrackPlayCount) then
column:clear()
end
end -- end if

end -- end for#columns
end -- end if#line<>
end -- end for#duplicationCount
end -- end for#fl
Expand Down
14 changes: 9 additions & 5 deletions main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ local app = renoise.app()
local tool = renoise.tool()
local song = nil
local doc = renoise.Document
local benchmark = false -- Output benchmarking information to the console, for dev purposes
local benchmark = true -- Output benchmarking information to the console, for dev purposes

-- View Builder for preferences and set scale
local vbp = renoise.ViewBuilder()
Expand Down Expand Up @@ -239,7 +239,7 @@ updatePattern = function()
-- Usual filtering:
for l=1, dst.number_of_lines do
-- Check for filter
local line = dst.tracks[t].lines[l]
local line = dst:track(t):line(l)

-- Check for track effect (these apply to the whole line):
local effect = line:effect_column(1)
Expand All @@ -253,7 +253,7 @@ updatePattern = function()
-- Auto-queue next pattern:
elseif effect.number_string == "LN" then
if nextPattern.value == currPattern.value then
nextPattern.value = effect.amount_value
nextPattern.value = tonumber(effect.amount_value)
end

-- Trigger:
Expand Down Expand Up @@ -334,9 +334,13 @@ local function processCutoffPoints()
end

-- Add notifier each time the loop ends:
local function stepNotifier()
local function stepNotifier()
-- Check for pattern change:
if currLine == song.patterns[1].number_of_lines then
if currLine == song.patterns[1].number_of_lines - 1 then
if currPattern.value ~= nextPattern.value then
-- Add a "ZB00" the the last line of the master track, so the next pattern will start at 0
end
elseif currLine == song.patterns[1].number_of_lines then
-- Benchmark
local time
if benchmark == true then
Expand Down

0 comments on commit 26b6c9b

Please sign in to comment.