Skip to content
Open
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
22 changes: 15 additions & 7 deletions src/mruby-zest/example/ZynOscilModRight.qml
Original file line number Diff line number Diff line change
Expand Up @@ -153,38 +153,46 @@ Widget {
function onSetup(old=nil)
{
vce = root.get_view_pos(:voice)

if vce == 0
sync.active = false
else
sync.active = true
sync.active = true
end

mapper = [-1]
mapper2 = [-2]
names = ["Normal"]
names2 = ["Normal"]
names2 = ["PartFbk"]
names2 << "Normal"
mapper2 << -1
(0...vce).each do |i|
mapper << i
mapper2 << i
names << "Oscil #{i+1}"
names2 << "Mod #{i+1}"
end
mapper2 << vce
names2 << "Mod #{vce+1}"



extfm.opt_vals = mapper
extfm.options = names
extfm.extern = base.extern + "PextFMoscil"
ext.opt_vals = mapper
ext.options = names
ext.extern = base.extern + "Pextoscil"
extmod.opt_vals = mapper
extmod.opt_vals = mapper2
extmod.options = names2
extmod.extern = base.extern + "PFMVoice"

}

function updateFMVoice(old=nil)
{
vce = root.get_view_pos(:voice)
if sync.value == false
if sync.value == false
mapper = [-1]
names2 = ["Normal"]
extmod.selected = extmod.selected + 1
Expand All @@ -205,6 +213,6 @@ Widget {
if(extmod.valueRef && extmod.selected <= extmod.opt_vals.length)
extmod.valueRef.value = extmod.opt_vals[extmod.selected]
end

}
}