-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
try to add graph to hysteresis effekt.
- Loading branch information
Friedolino
committed
Apr 28, 2024
1 parent
5685b0e
commit d11d0e5
Showing
1 changed file
with
57 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,67 @@ | ||
Group { | ||
Widget { | ||
id: hysteresis | ||
label: "hysteresis" | ||
topSize: 0.2 | ||
function refresh() { | ||
return if rw.content.nil? | ||
return if rw.content.children.length < 4 | ||
rw.content.children[4..-1].each do |c| | ||
c.refresh | ||
function refresh_recur(x) { | ||
#@@recur_level ||= 0 | ||
#@@recur_level += 1 | ||
#print " "*@@recur_level | ||
#puts "Distort refresh = {#{x.class}} of {#{dst.class}}" | ||
x.children.each do |xx| | ||
#print " "*(@@recur_level+1) | ||
#puts "child = #{xx.class}" | ||
xx.refresh() if xx.respond_to? :refresh | ||
dst.refresh_recur(xx) | ||
end | ||
#@@recur_level -= 1 | ||
} | ||
function refresh() { | ||
refresh_recur(self) | ||
} | ||
GroupHeader { | ||
label: "Hysteresis" | ||
extern: hysteresis.extern | ||
copyable: true | ||
} | ||
|
||
ParModuleRow { | ||
id: rw | ||
layoutOpts: [] | ||
Selector { | ||
layoutOpts: [:long_mode] | ||
extern: hysteresis.extern + "Hysteresis/preset" | ||
whenValue: lambda { hysteresis.refresh } | ||
Widget { | ||
WaveView { | ||
id: wave | ||
extern: hysteresis.extern + "Hysteresis/waveform" | ||
} | ||
Knob { extern: hysteresis.extern + "Pvolume"} | ||
Knob { extern: hysteresis.extern + "Ppanning"} | ||
Knob { extern: hysteresis.extern + "Hysteresis/Pdrive" } | ||
Knob { extern: hysteresis.extern + "Hysteresis/Premanence" } | ||
Knob { extern: hysteresis.extern + "Hysteresis/Pcoercivity" } | ||
Widget { | ||
ParModuleRow { | ||
id: rw | ||
layoutOpts: [] | ||
Selector { | ||
layoutOpts: [:long_mode] | ||
extern: hysteresis.extern + "Hysteresis/preset" | ||
whenValue: lambda { hysteresis.refresh } | ||
} | ||
Knob { extern: hysteresis.extern + "Pvolume"} | ||
Knob { extern: hysteresis.extern + "Ppanning"} | ||
ToggleButton { label: "Stereo"; extern: hysteresis.extern + "Hysteresis/PStereo" } | ||
|
||
} | ||
ParModuleRow { | ||
id: rw2 | ||
layoutOpts: [] | ||
Knob { extern: hysteresis.extern + "Hysteresis/Pdrive" } | ||
Knob { extern: hysteresis.extern + "Hysteresis/Pcoercivity" } | ||
Knob { extern: hysteresis.extern + "Hysteresis/Premanence" } | ||
Knob { extern: hysteresis.extern + "Hysteresis/Plevel" } | ||
|
||
} | ||
function layout(l, selfBox) { | ||
Draw::Layout::vpack(l, selfBox, children) | ||
} | ||
} | ||
|
||
function layout(l, selfBox) { | ||
Draw::Layout::hpack(l, selfBox, children) | ||
} | ||
} | ||
function layout(l, selfBox) { | ||
Draw::Layout::vfill(l, selfBox, children, [0.15, 0.85]) | ||
} | ||
} |