Closed atsushieno closed 3 years ago
Another issue with the "use NRPN" idea is that unless we switch to MIDI2 model the actual parameter values are bound to the range within 0..127, which does not match audio plugin parameters capability (usually 32-bit float, can be even 64-bit). Maybe it is inevitable unless we use our very own sysex with enough data size.
It is impossible to map double to MIDI2 (32bit data with assignable controllers or NRPNs) anyways, so we can safely(?) dump the idea of supporting double.
For plugin parameter definitions like this (generated from augene-player "Export Plugin Metadata" feature):
{"type": "VST3", "name": "OPNplug", "unique-id": "-1472549978",
"file": "/home/atsushi/.vst3/OPNplug.vst3", "parameters": [
{"index": "0", "name": "Master volume"},
{"index": "1", "name": "Emulator"},
{"index": "2", "name": "Chip count"},
{"index": "3", "name": "Chip type"},
... (can be up to 16383 in theory)
define / generate / use MML like:
// define
#macro AUDIO_PLUGIN_PARAMETER parameterID: number, val:number { NRPN $parameterID % #80, $parameterID / #80 DTE $val % #80, $val / #80 }
// generate
#macro OPNPLUG { __MIDI #F0 7D len xxxxxxxxxx F7 } // specify unique-id in UTF-8 string in sysex
#macro OPNPLUG_CHIPTYPE val { AUDIO_PLUGIN_PARAMETER 3, $val }
// use
1 OPNPLUG_CHIPTYPE 1
Then Midi2TracktionConverter picks up those MIDI events and convert to <AUTOMATIONTRACK>
s.
Along with this way, we don't really have to make changes to AugeneProject model. Everything is done only in Midi2TracktionEditConverter, and we can write a plugin-to-MML generator later, or those MMLs can be done manually. The generated MMLs work like nrpn-gs-xg.mml
in our default macros.
I made some changes to mugene-ng so that __MIDI
primitive operators can take string arguments too, so the plugin designation macro can be:
#macro OPNPLUG { __MIDI #F0, #7D, "augene-ng", 11, "-1472549978", #F7 } // specify unique-id in UTF-8 string in sysex
It also adds implicit identifier augene-ng
after 7Dh
so that we can mostly avoid any other system exclusive messages that are being sent as 7Dh
(research / dev purpose manufacturer ID).
Revamped NRPN based idea with SYSEX-based idea. After "augene-ng", add 00h
, parameter-index LSB, MSB, parameter-value LSB, MSB, then F7h
. It's not difficult.
current compilation result https://gist.github.com/atsushieno/443aca35527d23e2e5717cefe029b1f2
It still needs to adjust/unify track plugins, but pretty good progress.
As of 484db39, it should be done.
(inherited from https://github.com/atsushieno/augene/issues/9)
This time I go forward and drafting specification on how we achieve support for automation tracks.
In
*.tracktionedit
files, an automation track is represented as an<AUTOMATIONCURVE>
element in the target<PLUGIN>
element within the<TRACK>
element, and the<TRACK>
element at the same time contains a corresponding<AUTOMATIONTRACK>
element that specifiescurrentAutoParamPluginID
attribute that indicates<PLUGIN>
'sid
andcurrentAutoParamTag
attribute that indicates the<AUTOMATIONTRACK>
'sparamID
(which is also the actual parameter ID of the plugin).The actual
AUTOMATIONCURVE
looks like:... and
AUTONATIONTRACK
looks like:Since we human beings don't recognize plugin parameter IDs, we'll need some comprehensive mapping from each parameter name to the parameter ID. It is not available on AudioPluginHost, so we will have to create some mapping generator tool that can then be consumed by
AugeneProject
andAugeneModel
inaugene-project
.The most probable candidate MIDI messages that are mapped to automation parameters are NRPNs. But since any MIDI messages can be also consumed by the target MIDI plugin, occupying NRPNs is not a very safe idea. It should be at least an optional feature, and desirably there should be other supported mappings e.g. SysEx messages with certain manufacturer IDs.