Skip to content

Knob, Sliders and Bars

GuiKnob

GuiKnob(
    content: str | None = None,
    *,
    color: str | tuple[int, int, int] | None = None,
    value: int = 0,
    range: tuple[int, int] = (0, 100),
    title: str | None = None
)

Bases: _GuiSliderWidgetBase

Knob to set value

Parameters:

  • content (str | None, default: None ) –

    Knob label

  • color (str | tuple[int, int, int] | None, default: None ) –

    Knob color as color name or RGB tuple

  • value (int, default: 0 ) –

    Initial value

  • range (tuple[int, int], default: (0, 100) ) –

    Knob value range

  • title (str | None, default: None ) –

    Title for dock widget and position saving, set by content or type if None

content

content: Any | tuple[Any, ...]

Widget's text or text for its items

color

color: str | tuple[int, int, int] | None

Color as color name or RGB tuple

value

value: str | int | bool | None

Widget's value / selected item text

range

range: tuple[int, int] | None

Value range

is_visible

is_visible: bool

Widget is currently visible

qt_widget

qt_widget: QWidget | WrappedQWidgetMixin

Wrapped PySide6 QWidget that can be altered for extra customization

subscribe

subscribe(
    type: None | Container[GuiEvent] | GuiEvent = None,
    data: None | Container | str | int | bool | Sequence = None,
) -> Callable

Decorator to subscribe a callable to the input's messages.

Decorator without arguments subscribes a callable to all the input's messages.

Decorator with arguments subscribes a callable to the input's messages that match conditions set by arguments. It works the same way as message's matches method:

  1. If condition is None or omitted it matches anything.

  2. If condition equals the message's attribute value it matches the attribute.

  3. If condition is a container (list, tuple) and contains the message's attribute value, it matches the attribute.

Examples
  1. Calls function for all MIDI port's messages:
    @midi_input_instance.subscribe
    def function(msg: MidiMsg) -> None:
        pass
    
  2. Calls function for OSC messages from specific address:
    @osc_input_instance.subscribe(address='/live/song/get/track_data')
    def function(msg: OscMsg) -> None:
        pass
    
  3. Call object instance method for MIDI port's "note on" and "note off" messages:
    midi_input_instance.subscribe((MidiType.NOTE_ON, MidiType.NOTE_OFF))(object.method)
    

Returns:

  • Callable

    Subscribed callable.

GuiSliderV

GuiSliderV(
    content: str | None = None,
    *,
    color: str | tuple[int, int, int] | None = None,
    value: int = 0,
    range: tuple[int, int] = (0, 100),
    title: str | None = None
)

Bases: _GuiSliderWidgetBase

Vertical slider to set value

Parameters:

  • content (str | None, default: None ) –

    Slider label

  • color (str | tuple[int, int, int] | None, default: None ) –

    Slider handle color as color name or RGB tuple

  • value (int, default: 0 ) –

    Initial value

  • range (tuple[int, int], default: (0, 100) ) –

    Slider value range

  • title (str | None, default: None ) –

    Title for dock widget and position saving, set by content or type if None

content

content: Any | tuple[Any, ...]

Widget's text or text for its items

color

color: str | tuple[int, int, int] | None

Color as color name or RGB tuple

value

value: str | int | bool | None

Widget's value / selected item text

range

range: tuple[int, int] | None

Value range

is_visible

is_visible: bool

Widget is currently visible

qt_widget

qt_widget: QWidget | WrappedQWidgetMixin

Wrapped PySide6 QWidget that can be altered for extra customization

subscribe

subscribe(
    type: None | Container[GuiEvent] | GuiEvent = None,
    data: None | Container | str | int | bool | Sequence = None,
) -> Callable

Decorator to subscribe a callable to the input's messages.

Decorator without arguments subscribes a callable to all the input's messages.

Decorator with arguments subscribes a callable to the input's messages that match conditions set by arguments. It works the same way as message's matches method:

  1. If condition is None or omitted it matches anything.

  2. If condition equals the message's attribute value it matches the attribute.

  3. If condition is a container (list, tuple) and contains the message's attribute value, it matches the attribute.

Examples
  1. Calls function for all MIDI port's messages:
    @midi_input_instance.subscribe
    def function(msg: MidiMsg) -> None:
        pass
    
  2. Calls function for OSC messages from specific address:
    @osc_input_instance.subscribe(address='/live/song/get/track_data')
    def function(msg: OscMsg) -> None:
        pass
    
  3. Call object instance method for MIDI port's "note on" and "note off" messages:
    midi_input_instance.subscribe((MidiType.NOTE_ON, MidiType.NOTE_OFF))(object.method)
    

Returns:

  • Callable

    Subscribed callable.

GuiSliderH

GuiSliderH(
    content: str | None = None,
    *,
    color: str | tuple[int, int, int] | None = None,
    value: int = 0,
    range: tuple[int, int] = (0, 100),
    title: str | None = None
)

Bases: _GuiSliderWidgetBase

Horizontal slider to set value

Parameters:

  • content (str | None, default: None ) –

    Slider label

  • color (str | tuple[int, int, int] | None, default: None ) –

    Slider handle color as color name or RGB tuple

  • value (int, default: 0 ) –

    Initial value

  • range (tuple[int, int], default: (0, 100) ) –

    Slider value range

  • title (str | None, default: None ) –

    Title for dock widget and position saving, set by content or type if None

content

content: Any | tuple[Any, ...]

Widget's text or text for its items

color

color: str | tuple[int, int, int] | None

Color as color name or RGB tuple

value

value: str | int | bool | None

Widget's value / selected item text

range

range: tuple[int, int] | None

Value range

is_visible

is_visible: bool

Widget is currently visible

qt_widget

qt_widget: QWidget | WrappedQWidgetMixin

Wrapped PySide6 QWidget that can be altered for extra customization

subscribe

subscribe(
    type: None | Container[GuiEvent] | GuiEvent = None,
    data: None | Container | str | int | bool | Sequence = None,
) -> Callable

Decorator to subscribe a callable to the input's messages.

Decorator without arguments subscribes a callable to all the input's messages.

Decorator with arguments subscribes a callable to the input's messages that match conditions set by arguments. It works the same way as message's matches method:

  1. If condition is None or omitted it matches anything.

  2. If condition equals the message's attribute value it matches the attribute.

  3. If condition is a container (list, tuple) and contains the message's attribute value, it matches the attribute.

Examples
  1. Calls function for all MIDI port's messages:
    @midi_input_instance.subscribe
    def function(msg: MidiMsg) -> None:
        pass
    
  2. Calls function for OSC messages from specific address:
    @osc_input_instance.subscribe(address='/live/song/get/track_data')
    def function(msg: OscMsg) -> None:
        pass
    
  3. Call object instance method for MIDI port's "note on" and "note off" messages:
    midi_input_instance.subscribe((MidiType.NOTE_ON, MidiType.NOTE_OFF))(object.method)
    

Returns:

  • Callable

    Subscribed callable.

GuiProgressBarV

GuiProgressBarV(
    content: str | None = None,
    *,
    color: str | tuple[int, int, int] | None = None,
    value: int = 0,
    range: tuple[int, int] = (0, 100),
    title: str | None = None
)

Bases: _GuiSliderWidgetBase

Horizontal slider to set value

Parameters:

  • content (str | None, default: None ) –

    Progress bar label

  • color (str | tuple[int, int, int] | None, default: None ) –

    Progress color as color name or RGB tuple

  • value (int, default: 0 ) –

    Initial value

  • range (tuple[int, int], default: (0, 100) ) –

    Progress bar value range

  • title (str | None, default: None ) –

    Title for dock widget and position saving, set by content or type if None

content

content: Any | tuple[Any, ...]

Widget's text or text for its items

color

color: str | tuple[int, int, int] | None

Color as color name or RGB tuple

value

value: str | int | bool | None

Widget's value / selected item text

range

range: tuple[int, int] | None

Value range

is_visible

is_visible: bool

Widget is currently visible

qt_widget

qt_widget: QWidget | WrappedQWidgetMixin

Wrapped PySide6 QWidget that can be altered for extra customization

subscribe

subscribe(
    type: None | Container[GuiEvent] | GuiEvent = None,
    data: None | Container | str | int | bool | Sequence = None,
) -> Callable

Decorator to subscribe a callable to the input's messages.

Decorator without arguments subscribes a callable to all the input's messages.

Decorator with arguments subscribes a callable to the input's messages that match conditions set by arguments. It works the same way as message's matches method:

  1. If condition is None or omitted it matches anything.

  2. If condition equals the message's attribute value it matches the attribute.

  3. If condition is a container (list, tuple) and contains the message's attribute value, it matches the attribute.

Examples
  1. Calls function for all MIDI port's messages:
    @midi_input_instance.subscribe
    def function(msg: MidiMsg) -> None:
        pass
    
  2. Calls function for OSC messages from specific address:
    @osc_input_instance.subscribe(address='/live/song/get/track_data')
    def function(msg: OscMsg) -> None:
        pass
    
  3. Call object instance method for MIDI port's "note on" and "note off" messages:
    midi_input_instance.subscribe((MidiType.NOTE_ON, MidiType.NOTE_OFF))(object.method)
    

Returns:

  • Callable

    Subscribed callable.

GuiProgressBarH

GuiProgressBarH(
    content: str | None = None,
    *,
    color: str | tuple[int, int, int] | None = None,
    value: int = 0,
    range: tuple[int, int] = (0, 100),
    title: str | None = None
)

Bases: _GuiSliderWidgetBase

Horizontal slider to set value

Parameters:

  • content (str | None, default: None ) –

    Progress bar label

  • color (str | tuple[int, int, int] | None, default: None ) –

    Progress color as color name or RGB tuple

  • value (int, default: 0 ) –

    Initial value

  • range (tuple[int, int], default: (0, 100) ) –

    Progress bar value range

  • title (str | None, default: None ) –

    Title for dock widget and position saving, set by content or type if None

content

content: Any | tuple[Any, ...]

Widget's text or text for its items

color

color: str | tuple[int, int, int] | None

Color as color name or RGB tuple

value

value: str | int | bool | None

Widget's value / selected item text

range

range: tuple[int, int] | None

Value range

is_visible

is_visible: bool

Widget is currently visible

qt_widget

qt_widget: QWidget | WrappedQWidgetMixin

Wrapped PySide6 QWidget that can be altered for extra customization

subscribe

subscribe(
    type: None | Container[GuiEvent] | GuiEvent = None,
    data: None | Container | str | int | bool | Sequence = None,
) -> Callable

Decorator to subscribe a callable to the input's messages.

Decorator without arguments subscribes a callable to all the input's messages.

Decorator with arguments subscribes a callable to the input's messages that match conditions set by arguments. It works the same way as message's matches method:

  1. If condition is None or omitted it matches anything.

  2. If condition equals the message's attribute value it matches the attribute.

  3. If condition is a container (list, tuple) and contains the message's attribute value, it matches the attribute.

Examples
  1. Calls function for all MIDI port's messages:
    @midi_input_instance.subscribe
    def function(msg: MidiMsg) -> None:
        pass
    
  2. Calls function for OSC messages from specific address:
    @osc_input_instance.subscribe(address='/live/song/get/track_data')
    def function(msg: OscMsg) -> None:
        pass
    
  3. Call object instance method for MIDI port's "note on" and "note off" messages:
    midi_input_instance.subscribe((MidiType.NOTE_ON, MidiType.NOTE_OFF))(object.method)
    

Returns:

  • Callable

    Subscribed callable.