Web control panel structure

I’ll describe the quickly control panel format in this post, not a full description but basic functionality should be possible with this description.

The panel is an JSON object (enclosed in {}), the actual controls are placed in sections in “panel”-array. Each section has an “id” and “name”-fields that are used to describe for the user the purpose of the specific controls in the section. In addition, the section has “size”-array that describes how many controls the section has, the array contains width and height of the section.

The actual controls are placed in elements-array, each element containing these elements:

  • name, shown to user
  • id, must be unique
  • values
    • two values in an array, describing the MIDI start and end values
    • First value is used as the default value when initializing the preset unless default is defined
  • default
    • Default is used when initilizing the preset
  • value_step
    • How much the MIDI value is stepped when moving the control one step
    • i.e. if value step is 10, then when the control is moved one step, the MIDI value is increased/decreased by 10
  • type, can be one of these
    • vert_slider_with_desc
      • Vertical slider with text values
      • Must have accompanying “value_desc”-field describing the values
    • knob
      • normal rotary dial
    • button_with_desc
      • On/off button with text description
      • Must have accompanying “value_desc”-field describing the on/off-values
  • display_offset
    • How much the displayed value is offset from the actual MIDI value, used when the control represents negative and positive changes, for example, if offset is set to “-64”, then the value 64 represents zero point, lower values represent negative change, and higher values represent positive change, (for example, displayed range is from -64 to 63, while the MIDI is from 0-127)
  • midi - contains the MIDI definition of the control
    • type
      • either “CC” if using normal Control Change messages, or “NRPN” if NRPN messages are used for control
    • parameter_number
      • The MIDI parameter number for this control

Partial example from Waldorf Pulse 2:

{
  "manufacturer": "Waldorf",
  "model": "Pulse 2",
  "firmware": "1.14",
  "type" : "analog_synth",
  "panel": [
    {
      "_comment" : "A single section of the panel, size is [width height] of elements, e.g. knobs or sliders, max width is 12, elements are filled width first",
      "name" : "Oscillators",
      "section_id" : "oscillators",
      "size" : [ 6, 3],
      "elements" : [
		{
		"name" : "Osc 1 shape",
		"desc" : "Oscillator 1 shape",
		"type" : "vert_slider_with_desc",
		"id" : "osc_1_shape",
		"values" : [0,9],
		"value_step" : 1,
		"value_desc" : ["PWM", "Saw", "Tri", "APW", "Unison-M", "Unison-P", "UniAPW-M", "UniAPW-P","Para-8","Para-4"],
		"midi" :
		  {
			"type" : "CC",
			"parameter_number" : 34
		  }
		},

		{
		"name" : "Osc 1 PW",
		"desc" : "Oscillator 1 pulsewidth",
		"type" : "knob",
		"id" : "osc_1_pw",
		"values" : [0,127],
		"default": 127,
		"midi" :
		  {
			"type" : "CC",
			"parameter_number" : 35
		  }
		},

		{
		"name" : "Osc 1 semi tone",
		"desc" : "Oscillator 1 semitone",
		"type" : "knob",
		"id" : "osc_1_semitone",
		"values" : [16,112],
		"default" : 64,
		"midi" :
		  {
			"type" : "CC",
			"parameter_number" : 70
		  }
		},
		
		{
		"name" : "Osc 1 detune",
		"desc" : "Oscillator 1 detune",
		"type" : "knob",
		"id" : "osc_1_detune",
		"values" : [0,127],
		"default": 64,
		"midi" :
		  {
			"type" : "CC",
			"parameter_number" : 71
		  }
		},
		
		{
		"name" : "Osc 1 key track",
		"desc" : "Oscillator 1 keytrack",
		"type" : "button_with_desc",
		"id" : "osc_1_key_track",
		"values" : [0,1],
		"value_step" : 1,
		"value_desc" : ["Off", "On"],
		"default" : 1,
		"midi" :
		  {
			"type" : "CC",
			"parameter_number" : 73
		  }
		},
		
		{
		"name" : "Osc 1 level",
		"desc" : "Oscillator 1 level",
		"type" : "knob",
		"id" : "osc_1_level",
		"values" : [0,127],
		"default": 40,
		"midi" :
		  {
			"type" : "CC",
			"parameter_number" : 45
		  }
		},
		
		{
		"name" : "Osc 2 shape",
		"desc" : "Oscillator 2 shape",
		"type" : "vert_slider_with_desc",
		"id" : "osc_2_shape",
		"values" : [0,4],
		"value_step" : 1,
		"value_desc" : ["PWM", "Saw", "Tri", "X3-PWM", "X1-PWM"],
		"midi" :
		  {
			"type" : "CC",
			"parameter_number" : 38
		  }
		},

		{
		"name" : "Osc 2 PW",
		"desc" : "Oscillator 2 pulsewidth",
		"type" : "knob",
		"id" : "osc_2_pw",
		"values" : [0,127],
		"default": 127,
		"midi" :
		  {
			"type" : "CC",
			"parameter_number" : 39
		  }
		},

		{
		"name" : "Osc 2 semi tone",
		"desc" : "Oscillator 2 semitone",
		"type" : "knob",
		"id" : "osc_2_semitone",
		"values" : [16,112],
		"default" : 64,
		"midi" :
		  {
			"type" : "CC",
			"parameter_number" : 36
		  }
		},
		
		{
		"name" : "Osc 2 detune",
		"desc" : "Oscillator 2 detune",
		"type" : "knob",
		"id" : "osc_2_detune",
		"values" : [0,127],
		"default": 64,
		"midi" :
		  {
			"type" : "CC",
			"parameter_number" : 37
		  }
		},
		
		{
		"name" : "Osc 2 key track",
		"desc" : "Oscillator 2 keytrack",
		"type" : "button_with_desc",
		"id" : "osc_2_key_track",
		"values" : [0,1],
		"value_step" : 1,
		"value_desc" : ["Off", "On"],
		"default" : 1,
		"midi" :
		  {
			"type" : "CC",
			"parameter_number" : 40
		  }
		},
		
		{
		"name" : "Osc 2 level",
		"desc" : "Oscillator 2 level",
		"type" : "knob",
		"id" : "osc_2_level",
		"values" : [0,127],
		"midi" :
		  {
			"type" : "CC",
			"parameter_number" : 46
		  }
		},
		
		{
		"name" : "Osc 3 shape",
		"desc" : "Oscillator 3 shape",
		"type" : "vert_slider_with_desc",
		"id" : "osc_3_shape",
		"values" : [0,4],
		"value_step" : 1,
		"value_desc" : ["Sqr", "Saw", "Tri", "Ext", "FB"],
		"midi" :
		  {
			"type" : "CC",
			"parameter_number" : 44
		  }
		},

		{
		"name" : "Osc 3 routing",
		"desc" : "Oscillator 3 routing",
		"type" : "vert_slider_with_desc",
		"id" : "osc_3_routing",
		"values" : [0,3],
		"value_step" : 1,
		"value_desc" : ["Mix", "Level2", "VCF", "Drive"],
		"midi" :
		  {
			"type" : "CC",
			"parameter_number" : 72
		  }
		},

		{
		"name" : "Osc 3 semi tone",
		"desc" : "Oscillator 3 semitone",
		"type" : "knob",
		"id" : "osc_3_semitone",
		"values" : [16,112],
		"default" : 64,
		"midi" :
		  {
			"type" : "CC",
			"parameter_number" : 42
		  }
		},
		
		{
		"name" : "Osc 3 detune",
		"desc" : "Oscillator 3 detune",
		"type" : "knob",
		"id" : "osc_3_detune",
		"values" : [0,127],
		"default": 64,
		"midi" :
		  {
			"type" : "CC",
			"parameter_number" : 43
		  }
		},
		
		{
		"name" : "Osc 3 sync",
		"desc" : "Oscillator 3 sync to oscillator 2",
		"type" : "button_with_desc",
		"id" : "osc_3_sync",
		"values" : [0,1],
		"value_step" : 1,
		"value_desc" : ["Off", "On"],
		"default" : 0,
		"midi" :
		  {
			"type" : "CC",
			"parameter_number" : 41
		  }
		},
		
		{
		"name" : "Osc 3 level",
		"desc" : "Oscillator 3 level",
		"type" : "knob",
		"id" : "osc_3_level",
		"values" : [0,127],
		"midi" :
		  {
			"type" : "CC",
			"parameter_number" : 47
		  }
		}
	  ]
    },
 {
      "name" : "Filter",
      "section_id" : "filter",
      "size" : [ 3, 2],
      "elements" : [
        {
        "name" : "VCF cutoff",
        "type" : "knob",
        "id" : "vcf_cutoff",
		"desc" : "Filter cutoff frequency",
        "values" : [0,127],
		"default": 127,
        "midi" :
          {
            "type" : "CC",
            "parameter_number" : 50
          }
        },
		{
        "name" : "VCF reso",
        "type" : "knob",
        "id" : "vcf_reso",
		"desc" : "Filter resonance",
        "values" : [0,127],
        "midi" :
          {
            "type" : "CC",
            "parameter_number" : 56
          }
        },
		
		{
        "name" : "VCF env amt",
        "type" : "knob",
        "id" : "vcf_envf_amt",
		"desc" : "Filter envelope amount",
        "values" : [0,127],
		"default": 64,
        "midi" :
          {
            "type" : "CC",
            "parameter_number" : 52
          }
        },
		{
        "name" : "VCF type",
        "type" : "vert_slider_with_desc",
		"desc" : "Filter type",
        "id" : "vcf_type",
        "values" : [0,3],
        "value_step" : 1,
        "value_desc" : ["LP24", "LP12", "BP12", "HP12"],
        "midi" :
          {
            "type" : "CC",
            "parameter_number" : 49
          }
        },
		{
        "name" : "VCF key track",
        "type" : "knob",
        "id" : "vcf_keytrack",
		"desc" : "Filter keytrack",
        "values" : [0,127],
		"default": 64,
        "midi" :
          {
            "type" : "CC",
            "parameter_number" : 51
          }
        },
		
		{
        "name" : "VCF vel",
        "type" : "knob",
        "id" : "vcf_vel",
		"desc" : "Filter velocity",
        "values" : [0,127],
		"default": 64,
        "midi" :
          {
            "type" : "CC",
            "parameter_number" : 53
          }
        }
      ]
    },
    {
      "name" : "Envelopes",
      "section_id" : "envelopes",
      "size" : [ 6,2],
      "elements" : [
	  
		{
        "name" : "Envf attack",
		"desc" : "Filter envelope attack",
        "type" : "knob",
        "id" : "envf_attack",
        "values" : [0,127],
		"midi" :
          {
            "type" : "CC",
            "parameter_number" : 14
          }
        },
		{
        "name" : "Envf decay",
		"desc" : "Filter envelope decay",
        "type" : "knob",
        "id" : "envf_decay",
        "values" : [0,127],
		"default": 42,
		"midi" :
          {
            "type" : "CC",
            "parameter_number" : 15
          }
        },
		{
        "name" : "Envf sustain",
		"desc" : "Filter envelope sustain",
        "type" : "knob",
        "id" : "envf_sustain",
        "values" : [0,127],
		"default": 42,
		"midi" :
          {
            "type" : "CC",
            "parameter_number" : 16
          }
        },
		{
        "name" : "Envf release",
		"desc" : "Filter envelope release",
        "type" : "knob",
        "id" : "envf_release",
        "values" : [0,127],
		"default": 42,
		"midi" :
          {
            "type" : "CC",
            "parameter_number" : 17
          }
        },
		
        {
        "name" : "Envf loop",
		"desc" : "Filter envelope loop",
        "type" : "vert_slider_with_desc",
        "id" : "envf_loop",
        "values" : [0,2],
        "value_step" : 1,
        "value_desc" : ["Off", "A-D","D-D"],
		"midi" :
          {
            "type" : "CC",
            "parameter_number" : 74
          }
        },
		
		{
        "name" : "Envf trigger",
		"desc" : "Filter envelope trigger",
        "type" : "vert_slider_with_desc",
        "id" : "envf_trigger",
		"default" : 2,
        "values" : [0,4],
        "value_step" : 1,
        "value_desc" : ["SNG1", "SNG2", "RET1", "RET2", "RET3"],
		"midi" :
          {
            "type" : "CC",
            "parameter_number" : 29
          }
        },
		
		{
        "name" : "Enva attack",
		"desc" : "Amplitude envelope attack",
        "type" : "knob",
        "id" : "enva_attack",
        "values" : [0,127],
		"midi" :
          {
            "type" : "CC",
            "parameter_number" : 18
          }
        },
		{
        "name" : "Enva decay",
		"desc" : "Amplitude envelope decay",
        "type" : "knob",
        "id" : "enva_decay",
        "values" : [0,127],
		"default": 42,
		"midi" :
          {
            "type" : "CC",
            "parameter_number" : 19
          }
        },
		{
        "name" : "Enva sustain",
		"desc" : "Amplitude envelope sustain",
        "type" : "knob",
        "id" : "enva_sustain",
        "values" : [0,127],
		"default": 127,
		"midi" :
          {
            "type" : "CC",
            "parameter_number" : 20
          }
        },
		{
        "name" : "Enva release",
		"desc" : "Amplitude envelope release",
        "type" : "knob",
        "id" : "enva_release",
        "values" : [0,127],
		"default": 42,
		"midi" :
          {
            "type" : "CC",
            "parameter_number" : 21
          }
        },
		
        {
        "name" : "Enva loop",
		"desc" : "Amplitude envelope loop",
        "type" : "vert_slider_with_desc",
        "id" : "enva_loop",
        "values" : [0,2],
        "value_step" : 1,
        "value_desc" : ["Off", "A-D","D-D"],
		"midi" :
          {
            "type" : "CC",
            "parameter_number" : 75
          }
        },
		
		{
        "name" : "Enva trigger",
		"desc" : "Amplitude envelope trigger",
        "type" : "vert_slider_with_desc",
        "id" : "enva_trigger",
		"default" : 2,
        "values" : [0,4],
        "value_step" : 1,
        "value_desc" : ["SNG1", "SNG2", "RET1", "RET2", "RET3"],
		"midi" :
          {
            "type" : "CC",
            "parameter_number" : 31
          }
        }
      ]
    },
	

   
	{
      "name" : "Amplitude and noise",
      "section_id" : "amplitude",
      "size" : [ 3, 2],
      "elements" : [
        {
        "name" : "VCA drive",
        "type" : "knob",
        "id" : "vca_drive",
		"desc" : "Amplitude drive",
        "values" : [0,127],
        "midi" :
          {
            "type" : "CC",
            "parameter_number" : 76
          }
        },
		{
        "name" : "VCA curve",
        "type" : "vert_slider_with_desc",
		"desc" : "Amplitude drive curve",
        "id" : "vca_curve",
        "values" : [0,3],
        "value_step" : 1,
        "value_desc" : ["None", "Tube", "Fuzz", "FX"],
        "midi" :
          {
            "type" : "CC",
            "parameter_number" : 77
          }
        },
		{
        "name" : "VCA pan",
        "type" : "knob",
        "id" : "vca_pan",
		"desc" : "Amplitude panning",
        "values" : [0,127],
		"default": 64,
        "midi" :
          {
            "type" : "CC",
            "parameter_number" : 59
          }
        },
		{
        "name" : "VCA vol",
        "type" : "knob",
        "id" : "vca_vol",
		"desc" : "Amplitude volume",
        "values" : [0,127],
		"default": 100,
        "midi" :
          {
            "type" : "CC",
            "parameter_number" : 57
          }
        },
		{
        "name" : "VCA vel",
        "type" : "knob",
        "id" : "vca_vel",
		"desc" : "Amplitude velocity",
        "values" : [0,127],
		"default": 64,
        "midi" :
          {
            "type" : "CC",
            "parameter_number" : 58
          }
        },
		{
        "name" : "Noise level",
        "type" : "knob",
        "id" : "noise_level",
		"desc" : "Amplitude velocity",
        "values" : [0,127],
        "midi" :
          {
            "type" : "CC",
            "parameter_number" : 48
          }
        }
      ]
    },
	
	{
      "name" : "LFO and glide",
      "section_id" : "lfo",
      "size" : [ 3, 2],
      "elements" : [
        {
        "name" : "LFO1 speed",
        "type" : "knob",
        "id" : "lfo1_speed",
		"desc" : "LFO 1 frequency",
        "values" : [0,127],
		"default": 64,
        "midi" :
          {
            "type" : "CC",
            "parameter_number" : 24
          }
        },
		{
        "name" : "LFO1 shape",
        "type" : "vert_slider_with_desc",
		"desc" : "LFO 1 shape",
        "id" : "lfo1_shape",
        "values" : [0,4],
        "value_step" : 1,
        "value_desc" : ["Sine", "Tri", "Saw", "Sqr", "S&H"],
        "midi" :
          {
            "type" : "CC",
            "parameter_number" : 25
          }
        },
		{
        "name" : "Glide rate",
        "type" : "knob",
        "id" : "glide_rate",
		"desc" : "Glide rate",
        "values" : [0,127],
		"default": 10,
        "midi" :
          {
            "type" : "CC",
            "parameter_number" : 5
          }
        },
		{
        "name" : "LFO2 speed",
        "type" : "knob",
        "id" : "lfo2_speed",
		"desc" : "LFO 2 frequency",
        "values" : [0,127],
		"default": 64,
        "midi" :
          {
            "type" : "CC",
            "parameter_number" : 26
          }
        },
		{
        "name" : "LFO2 delay",
        "type" : "knob",
        "id" : "lfo2_delay",
		"desc" : "LFO 2 delay",
        "values" : [0,127],
		"default": 0,
        "midi" :
          {
            "type" : "CC",
            "parameter_number" : 27
          }
        },
		{
        "name" : "Glide mode",
        "type" : "vert_slider_with_desc",
		"desc" : "Glide mode",
        "id" : "Glide mode",
        "values" : [0,4],
        "value_step" : 1,
        "value_desc" : ["Off", "Norm", "Fngr", "Fnon", "Foff"],
        "midi" :
          {
            "type" : "CC",
            "parameter_number" : 62
          }
		}
      ]
    },
    {
      "name" : "Arpeggio",
      "section_id" : "arpeggio",
      "size" : [ 4,2],
      "elements" : [
        {
        "name" : "Arp enable",
        "type" : "vert_slider_with_desc",
        "desc" : "Activate arpeggio",
		"values" : [0,2],
        "value_step" : 1,
        "value_desc" : ["Off", "On", "Hold"], 
        "id" : "arp_enable",
        "midi" :
          {
            "type" : "CC",
            "parameter_number" : 79
          }
        },
		{
        "name" : "Arp range",
        "type" : "knob",
        "id" : "arp_range",
		"desc" : "Arpeggio range",
        "values" : [0,9],
		"default": 1,
        "midi" :
          {
            "type" : "CC",
            "parameter_number" : 80
          }
        },
		{
        "name" : "Arp tempo",
        "type" : "knob",
        "id" : "arp_tempo",
		"desc" : "Arpeggio tempo",
        "values" : [0,127],
	"default": 37,
	"display_offset": 46,
	"display_coeff": 2,
        "midi" :
          {
            "type" : "CC",
            "parameter_number" : 81
          }
        },
	{
        "name" : "Arp clock",
        "type" : "knob",
        "id" : "arp_clock",
		"desc" : "Arpeggio clock",
        "values" : [0,18],
	"value_step" : 1,
	"value_desc" : ["1/1", "3/4", "2/3", "1/2", "3/8", "1/3", "1/4", "3/16", "1/6", "1/8", "3/32", "1/16", "3/64", "1/24", "1/32", "3/128", "1/48", "1/64", "1/96"], 
	"default": 9,
        "midi" :
          {
            "type" : "CC",
            "parameter_number" : 82
          }
        },
        {
        "name" : "Arp mode",
        "id" : "arp_mode",
	"desc" : "Arpeggio mode",
        "type" : "vert_slider_with_desc",
        "values" : [0,6],
        "value_step" : 1,
        "value_desc" : ["Up", "Down", "Alt", "Rand", "#Up", "#Down", "#Alt"],
        "midi" :
          {
            "type" : "CC",
            "parameter_number" : 83
          }
        },
	{
        "name" : "Arp swing",
        "type" : "knob",
        "id" : "arp_swing",
	"desc" : "Arpeggio swing",
        "values" : [14,114],
	"default": 64,
        "midi" :
          {
            "type" : "CC",
            "parameter_number" : 85
          }
        },
	{
        "name" : "Arp delay",
        "type" : "knob",
        "id" : "arp_delay",
	"desc" : "Arpeggio delay",
        "values" : [14,114],
	"default": 64,
        "midi" :
          {
            "type" : "CC",
            "parameter_number" : 86
          }
        }
      ]
    }
  ]

}