Skip to content

GUI

ControlSpec

Defines the range and response curve for a control parameter.

Parameters:

Name Type Description Default
min float

Minimum value of the control parameter.

0.0
max float

Maximum value of the control parameter.

1.0
exp float

Exponent for the response curve. 1.0 = linear, >1.0 = logarithmic, <1.0 = exponential.

1.0

normalize(val)

Normalize a value to the range [0.0, 1.0] based on the control spec.

unnormalize(norm_val)

Convert a normalized value [0.0, 1.0] back to the control spec range.

Handle

Bases: QWidget


              flowchart TD
              mmm_python.GUI.Handle[Handle]

              

              click mmm_python.GUI.Handle href "" "mmm_python.GUI.Handle"
            

A convenience widget that combines a label, a slider, and a value display.

MPlot

Bases: QWidget


              flowchart TD
              mmm_python.GUI.MPlot[MPlot]

              

              click mmm_python.GUI.MPlot href "" "mmm_python.GUI.MPlot"
            

MWaveform

Bases: QWidget


              flowchart TD
              mmm_python.GUI.MWaveform[MWaveform]

              

              click mmm_python.GUI.MWaveform href "" "mmm_python.GUI.MWaveform"
            

Slider2D

Bases: QWidget


              flowchart TD
              mmm_python.GUI.Slider2D[Slider2D]

              

              click mmm_python.GUI.Slider2D href "" "mmm_python.GUI.Slider2D"
            

A custom 2D slider widget

get_values()

Get current X and Y values (0.0 to 1.0)

mouseMoveEvent(event)

Handle mouse move

mousePressEvent(event)

Handle mouse press

mouseReleaseEvent(event)

Handle mouse release

paintEvent(event)

Paint the slider

set_values(x, y)

Set X and Y values (0.0 to 1.0)