Skip to content

Create discord plugin/compatibility #20

@ErykHonda

Description

@ErykHonda

1. Fader Control

The plugin defines two main faders that allow for smooth volume adjustment:

Fader Description Scale
Input Volume Adjusts microphone volume (Input). 0% - 100%
Output Volume Adjusts headphone/speaker volume (Output). 0% - 200%

Both faders support Mute (microphone muting) and Deafen (output muting) functions.

2. Button Support

Physical buttons can be assigned to toggle specific voice settings:

  • Mute: Mutes the microphone. (Unmuting also automatically disables the Deafen state).
  • Deafen: Completely silences all audio (both microphone and headphones).

🛠 Operating Mechanisms

Authorization and Connection

  1. Upon startup, the plugin attempts to connect to a running Discord instance.
  2. If no token is found, the plugin requests user authorization within the Discord app (required permissions: rpc, rpc.activities.write, rpc.voice.read, rpc.voice.write).
  3. The access token is saved in the configuration to prevent the need for repeated logins.

State Synchronization

The plugin ensures that the state of the physical controller is always aligned with the application:

  • RPC Events: It listens for VOICE_SETTINGS_UPDATE events—any change made within Discord instantly updates the MIDI controller.
  • Interval Sync: An additional control synchronization is performed every 30 seconds (syncGap).
  • Normalization: The code automatically handles property naming discrepancies (e.g., mapping noise_suppression to noiseSuppression).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions