2 ZynAddSubFX - a software synthesizer
4 DSSIControlDescription.h - Description of DSSI control ports
5 Copyright (C) 2015 Olivier Jolly
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License
10 as published by the Free Software Foundation; either version 2
11 of the License, or (at your option) any later version.
14 #ifndef ZYNADDSUBFX_DSSICONTROLDESCRIPTION_H
15 #define ZYNADDSUBFX_DSSICONTROLDESCRIPTION_H
22 * DSSIControlDescription represent one instance of DSSI control used to describe accepted values to the DSSI host
23 * and to forward DSSI host value change to ZynAddSubFx controller
25 struct DSSIControlDescription
{
27 const static int MAX_DSSI_CONTROLS
= 12;
29 const zyn::MidiControllers controller_code
; /// controller code, as accepted by the Controller class
30 const char *name
; /// human readable name of this control
32 /** hint about usable range of value for this control, defaulting to 0-128, initially at 64 */
33 const LADSPA_PortRangeHint port_range_hint
= {
34 LADSPA_HINT_BOUNDED_BELOW
| LADSPA_HINT_BOUNDED_ABOVE
| LADSPA_HINT_DEFAULT_MIDDLE
, 0, 128};
37 * Ctr for a DSSIControlDescription using the default hint (0-128 starting at 64)
38 * @param controller_code the controller code
39 * @param name the human readable code name
41 DSSIControlDescription(zyn::MidiControllers controller_code
, const char *name
) :
42 controller_code(controller_code
),
46 * Ctr for a DSSIControlDescription
47 * @param controller_code the controller code
48 * @param name the human readable code name
49 * @param port_range_hint the accepted range of values
51 DSSIControlDescription(zyn::MidiControllers controller_code
, const char *name
, LADSPA_PortRangeHint port_range_hint
) :
52 controller_code(controller_code
), name(name
), port_range_hint(port_range_hint
) { }
56 extern const DSSIControlDescription dssi_control_description
[DSSIControlDescription::MAX_DSSI_CONTROLS
];
58 #endif //ZYNADDSUBFX_DSSICONTROLDESCRIPTION_H