Fri Apr 26 12:13:14 EDT 2013
Encoding "float types"
Problem: some meta info needs to be transported to the GUI (e.g. VST
host like Ableton Live). However, these are just "float" types to the
C code generator. Essentially, the core doesn't care about the limits.
What does the host need?
The real problem is one of usr feedback. All params are normalized,
being 0-127 for MIDI, or 0-1 for VST plugins, meaning that the
operation and automation is transparent.
I'm inclined to add the type information in the name of the parameter.
I don't see another way to do this except for introducing a lot of
complication on the C side. The wrapper (.g.h -> code) could then do
some run-time interpretation? Even the rkt code gen could add some
macros to centralize this.
Naming scheme: <input-range>_<scale-type>_<min>_<max>_<unit>_<name>
m = MIDI range 0-127
v = VST range 0-1
p = exact parameter, no transformation
?? r<max> = 0-max (inclusive) range, m=r127 v=r1?
a = absolute = linear
r = relative = logarithmic/exponential
c = circular (angle)
min / max: output scale ranges
sign = p/m
dot = d
Spec in rkt should probably use a macro to perform the name mangling,
so rep can change
(Frequency MIDI rel 20 2000 Hz)
(Drive MIDI rel -10 10 dB)
This needs to be a special form that does:
- Name mangling or annotation
- Insertion of converter code, e.g. `midi-log/i'
- Separate "user" and "system" controls (e.g. samplerate)