Skip to content

Commit

Permalink
Merge pull request #20 from cachilders/fix-adsr
Browse files Browse the repository at this point in the history
[fix] adsr
  • Loading branch information
cachilders authored Feb 20, 2024
2 parents 9c91218 + e0a9651 commit 7bb5604
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions lib/ensemble.lua
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ function Ensemble:_play_note(voice, note, velocity, envelope_duration)
velocity = vel,
attack = envelope_duration * (params:get('marco_attack_'..voice) / 100),
decay = envelope_duration * (params:get('marco_decay_'..voice) / 100),
sustain = envelope_duration * (params:get('marco_release_'..voice) / 100),
release = envelope_duration * (params:get('marco_sustain_'..voice) / 100)
sustain = params:get('marco_sustain_'..voice) / 100,
release = envelope_duration * (params:get('marco_release_'..voice) / 100)
})
end

Expand Down
8 changes: 4 additions & 4 deletions lib/parameters.lua
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,10 @@ function Parameters:_init_params()
params:set_action('marco_seq_reset_'..i, function() arrangement:reset(i) end)
params:add_separator('marco_seq_actions_foot_'..i, '')
params:add_separator('marco_seq_settings_'..i, 'SEQUENCE '..i..' SETTINGS')
params:add_number('marco_attack_'..i, 'Attack', 0, 100, 20, function(param) return ''..param:get()..'% of pulse' end)
params:add_number('marco_decay_'..i, 'Decay', 0, 100, 25, function(param) return ''..param:get()..'% of pulse' end)
params:add_number('marco_release_'..i, 'Sustain', 0, 100, 35, function(param) return ''..param:get()..'% of pulse' end)
params:add_number('marco_sustain_'..i, 'Release', 0, 100, 25, function(param) return ''..param:get()..'% of pulse' end)
params:add_number('marco_attack_'..i, 'Attack', 0, 100, 20, function(param) return ''..param:get()..'% of width' end)
params:add_number('marco_decay_'..i, 'Decay', 0, 100, 25, function(param) return ''..param:get()..'% of width' end)
params:add_number('marco_sustain_'..i, 'Sustain', 0, 100, 90, function(param) return ''..param:get()..'% of strength' end)
params:add_number('marco_release_'..i, 'Release', 0, 100, 20, function(param) return ''..param:get()..'% of width' end)
end
end

Expand Down

0 comments on commit 7bb5604

Please sign in to comment.