Skip to content

Commit

Permalink
add detune parameter (in cents) (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
catfact committed May 22, 2023
1 parent 0de3c14 commit ca7d54c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion awake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ function step()

if one.data[one.pos] > 0 then
local note_num = notes[one.data[one.pos]+two.data[two.pos]]
local freq = MusicUtil.note_num_to_freq(note_num)
local freq = MusicUtil.note_num_to_freq(note_num + (params:get("detune")*0.01))
-- Trig Probablility
if math.random(100) <= params:get("probability") then
-- Audio engine out
Expand Down Expand Up @@ -324,6 +324,7 @@ function init()
params:add{type="control",id="pan",controlspec=cs_PAN,
action=function(x) engine.pan(x) end}

params:add{type="number",id="detune",min=-100, max=100, default=0}
hs.init()

add_pattern_params()
Expand Down

0 comments on commit ca7d54c

Please sign in to comment.