Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.2.3 #81

Merged
merged 2 commits into from
Jan 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.2.3

- Fixed issue that was leading global scales to be applied incorrectly when another channel was running at a higher clock division.

## 1.2.2

- Fixed regression that stopped channel scale locks from applying transposition properly.
Expand Down
2 changes: 1 addition & 1 deletion lib/step.lua
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ function step.calculate_step_scale_number(c, s)
end

local start_trig_17 = fn.calc_grid_count(program.get_channel(program.get().selected_song_pattern, 17).start_trig[1], program.get_channel(program.get().selected_song_pattern, 17).start_trig[2])
if current_step_17 == start_trig_17 then
if c == 17 and current_step_17 == start_trig_17 then
persistent_global_step_scale_number = nil
end

Expand Down
96 changes: 48 additions & 48 deletions lib/tests/lib/integration_tests/param_tests.lua
Original file line number Diff line number Diff line change
Expand Up @@ -59,57 +59,57 @@ local function contains_event(events, target_event)
end

function test_params_trig_locks_are_processed_at_the_right_step()
setup()
local song_pattern = 1
program.set_selected_song_pattern(1)
local test_pattern = program.initialise_default_pattern()

local test_step = 8
local cc_msb = 2
local cc_value = 111
local c = 1
setup()
local song_pattern = 1
program.set_selected_song_pattern(1)
local test_pattern = program.initialise_default_pattern()

local my_param_id = "my_param_id"
local test_step = 8
local cc_msb = 2
local cc_value = 111
local c = 1

params:add(my_param_id, {
name = "name",
val = -1
})

test_pattern.note_values[test_step] = 0
test_pattern.lengths[test_step] = 1
test_pattern.trig_values[test_step] = 1
test_pattern.velocity_values[test_step] = 100

program.get().selected_channel = c

local channel = program.get_selected_channel()

channel.trig_lock_params[1].device_name = "test"
channel.trig_lock_params[1].type = "midi"
channel.trig_lock_params[1].id = 1
channel.trig_lock_params[1].param_id = my_param_id
channel.trig_lock_params[1].cc_msb = cc_msb
channel.trig_lock_params[1].cc_min_value = -1
channel.trig_lock_params[1].cc_max_value = 127

program.add_step_param_trig_lock(test_step, 1, cc_value)

program.get_song_pattern(song_pattern).patterns[1] = test_pattern
fn.add_to_set(program.get_song_pattern(song_pattern).channels[c].selected_patterns, 1)

pattern.update_working_patterns()

-- Reset and set up the clock and MIDI event tracking
clock_setup()

progress_clock_by_beats(test_step - 1)

local midi_cc_event = table.remove(midi_cc_events)

luaunit.assert_items_equals(midi_cc_event, {cc_msb, cc_value, 1})
local my_param_id = "my_param_id"

params:add(my_param_id, {
name = "name",
val = -1
})

test_pattern.note_values[test_step] = 0
test_pattern.lengths[test_step] = 1
test_pattern.trig_values[test_step] = 1
test_pattern.velocity_values[test_step] = 100

program.get().selected_channel = c

local channel = program.get_selected_channel()

channel.trig_lock_params[1].device_name = "test"
channel.trig_lock_params[1].type = "midi"
channel.trig_lock_params[1].id = 1
channel.trig_lock_params[1].param_id = my_param_id
channel.trig_lock_params[1].cc_msb = cc_msb
channel.trig_lock_params[1].cc_min_value = -1
channel.trig_lock_params[1].cc_max_value = 127

program.add_step_param_trig_lock(test_step, 1, cc_value)

program.get_song_pattern(song_pattern).patterns[1] = test_pattern
fn.add_to_set(program.get_song_pattern(song_pattern).channels[c].selected_patterns, 1)

pattern.update_working_patterns()

-- Reset and set up the clock and MIDI event tracking
clock_setup()

progress_clock_by_beats(test_step - 1)

local midi_cc_event = table.remove(midi_cc_events)

luaunit.assert_items_equals(midi_cc_event, {cc_msb, cc_value, 1})

end
end


function test_params_triggless_locks_are_processed_at_the_right_step()
Expand Down
Loading
Loading