Skip to content

Commit

Permalink
Elastika export: better position for DRIVE, LEVEL, MIX knobs.
Browse files Browse the repository at this point in the history
  • Loading branch information
cosinekitty committed Jan 25, 2025
1 parent 49aeddc commit 3557c26
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion export/elastika.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions src/sapphire_panel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ namespace Sapphire
{ "elastika_export", {
{"_panel", { 60.960, 100.000}},
{"curl_slider", { 41.720, 46.000}},
{"drive_knob", { 14.000, 85.500}},
{"drive_knob", { 13.650, 84.500}},
{"fric_slider", { 8.000, 46.000}},
{"input_tilt_knob", { 19.240, 17.500}},
{"level_knob", { 30.480, 85.500}},
{"level_knob", { 30.480, 84.500}},
{"mass_slider", { 52.960, 46.000}},
{"mix_knob", { 46.960, 85.500}},
{"mix_knob", { 47.310, 84.500}},
{"output_tilt_knob", { 41.720, 17.500}},
{"span_slider", { 30.480, 46.000}},
{"stif_slider", { 19.240, 46.000}},
Expand Down
15 changes: 9 additions & 6 deletions util/make_sapphire_svg.py
Original file line number Diff line number Diff line change
Expand Up @@ -1399,13 +1399,16 @@ def PlaceElastikaControls(controls:ControlLayer, pl:Element, shrink:float, targe
AddSlider(controls, pl, target, 'curl_slider', 41.72, 46.00)
AddSlider(controls, pl, target, 'mass_slider', 52.96, 46.00)

AddLargeKnob(controls, pl, target, 'drive_knob', 14.00, 102.00 - shrink)

if target == Target.VcvRack:
AddLargeKnob(controls, pl, target, 'drive_knob', 14.00, 102.00 - shrink)
AddLargeKnob(controls, pl, target, 'level_knob', 46.96, 102.00 - shrink)
elif target == Target.Lite:
AddLargeKnob(controls, pl, target, 'level_knob', 30.48, 102.00 - shrink)
AddLargeKnob(controls, pl, target, 'mix_knob', 46.96, 102.00 - shrink)
dxKnob = 1.5 * ELASTIKA_SLIDER_DX
xCenter = 30.48
yCenter = 102.00 - shrink
AddLargeKnob(controls, pl, target, 'drive_knob', xCenter - dxKnob, yCenter)
AddLargeKnob(controls, pl, target, 'level_knob', xCenter, yCenter)
AddLargeKnob(controls, pl, target, 'mix_knob', xCenter + dxKnob, yCenter)
else:
raise TargetError(target)

Expand Down Expand Up @@ -1475,7 +1478,7 @@ def GenerateElastikaPanel(cdict:Dict[str, ControlLayer], target:Target) -> int:
cdsymbol = 'elastika'
elif target == Target.Lite:
height = 100.0
shrink = 16.5
shrink = 17.5
cdsymbol = 'elastika_export'
else:
raise TargetError(target)
Expand Down Expand Up @@ -1529,7 +1532,7 @@ def GenerateElastikaPanel(cdict:Dict[str, ControlLayer], target:Target) -> int:
pl.append(CenteredControlTextPath(font, 'OUT', ELASTIKA_SLIDER_DX*(4.0) + 2.4, ty))
elif target == Target.Lite:
ty = 76.0
pl.append(CenteredControlTextPath(font, 'IN', ELASTIKA_SLIDER_DX*(1.0) + 2.6, ty))
pl.append(CenteredControlTextPath(font, 'IN', ELASTIKA_SLIDER_DX*(1.0) + 2.4, ty))
pl.append(CenteredControlTextPath(font, 'OUT', ELASTIKA_SLIDER_DX*(2.5) + 2.4, ty))
pl.append(CenteredControlTextPath(font, 'MIX', ELASTIKA_SLIDER_DX*(4.0) + 2.4, ty))
if previewComponentPositions:
Expand Down

0 comments on commit 3557c26

Please sign in to comment.