handeyeco / deluge-shortcuts

Synthstrom Deluge: website with a searchable list of shortcuts
https://handeyeco.github.io/deluge-shortcuts/
Other
8 stars 1 forks source link

Unified control syntax #4

Open handeyeco opened 10 months ago

handeyeco commented 10 months ago

Talking with the people on the Deluge Discord, there's an interest in creating a standard for the syntax that describes user interactions. The goals:

This site

This is basically what I've done on this site. For instance:

    {
      title: "Cycle default scales",
      command: "hold(SHIFT) press(SCALE)",
      views: ["synth", "midi", "cv"],
    }

Discord proposal

Another solution was proposed on the Discord:

{
    "features": [
        {
            "name": "In-Key layout",
            "description": "Play notes only in scale",
            "keywords": ["keyboard", "performance"],
            "video": "https://youtube.com/video/kQmqdpUeciY"
        }
    ],
    "ux": [
        {
            "name": "Scroll through layouts",
            "context": "keyboard_screen",
            "actions": [
                {
                    "name": "Scroll negatively",
                    "modifier": {
                        "button": "SCALE",
                        "type": "hold"
                    },
                    "actionKey": "SelectionScrollLeft"
                }
            ]
        }
    ]
}

The manual

The manual takes somewhat of a middle ground:

Screenshot 2023-12-18 at 9 08 58 AM

Notes on the screenshot:

My proposal

I think wook's suggestion makes sense, although I might suggest something like:

const feature = {
  name: "Load sample (Silent)",
  description: "Load a sample into a kit of synth silently",
  views: [Views.Synth, Views.Kit],
  note: "Scroll to sample and press select. Also, Shift + Browse grid shortcut on an existing row to open browser.",
  steps: [
    {
      substeps: [
        {
          action: Actions.Hold,
          control: Controls.Shift,
        },
        {
          action: Actions.Hold,
          control: Controls.Audition,
        }
        {
          action: Actions.Press,
          control: Controls.Load,
        }
      ]
    },
    {
      action: Actions.Turn,
      control: Controls.Select,
    },
    {
      action: Actions.Press,
      control: Controls.Select,
    },
  ]
}

So I guess:

enum Action { HOLD, PRESS, TURN, TURN_LEFT } // ...etc

enum Control { SELECT, SHIFT, AUDITION, X, Y } // ...etc

enum View { SONG, KIT, MIDI, CV, SYNTH, CLIP } // ...etc

type Step = {
  action: Action,
  control: Control,
  note?: string,
}

type Combo = {
  substeps: Array<Step>,
  note?: string,
}

type Feature = {
  name: string,
  views: Array<View>,
  steps: Array<Step | Combo>,
  description?: string,
  note?: string
}

I'm a little worried about the added complexity, but I think as long as combos can't contain combos it should be fine.

Steps

handeyeco commented 10 months ago

https://github.com/SynthstromAudible/DelugeFirmware/issues/856