Fader dB files
When a fader is moved in a daw, the dB value is displayed, but a raw midi value is sent to external devices. Translating that raw midi value back to a dB value is no easy task for the plugin since volume faders use a logarithmic scale, and each daw has a unique scale implemented.
The only reasonable way (that I have found) is to take many sample points where the raw midi value is stored together with the dB value displayed by the daw. These sample points (I suggest 100+) are stored in an XML file, and that file is used when the corresponding daw is selected in the dB value section of the Value display dropdown.
When the plugin receives a fader midi value, the file is checked to see if that exact value is a registered sample point, in which case the registered dB value is used. If the received value is between two registered sample points, the plugin will calculate the dB value based on the information in the two sample points. With few sample points in the file, there is a risk that the displayed dB value in the plugin differs from that in the daw since the calculation may be inaccurate. So, the more sample points there are, the better the dB value accuracy is.
Quick and "easy" configuration
Copy one of the built-in dB fader files. Register a large amount of sample points. You're done. :-)
Copy a suitable file from "%appdata%\Elgato\StreamDeck\Plugins\se.trevligaspel.midi.sdPlugin\dBCurves" (Windows) or "~/Library/Application Support/com.elgato.StreamDeck/Plugins/se.trevligaspel.midi.sdPlugin/dBCurves" (macOS) and paste it to "Documents\Trevliga Spel\dBCurves" (create the folder if it doesn't exist; files must be stored in that folder, it's the only place where the plugin is looking for them). Filenames starting with "db_" are targeted at the Mackie Control action, while filenames beginning with "db127_" are targeted at the Control Change action. All the files have the same structure, so unless you intend to add extra sample points to an existing file, which file you copy doesn't matter that much.
If you want to refine the samples for an existing file, please keep the file name unchanged (in which case, the plugin will use your copy instead of the built-in file). If you want to add a file for a new daw, please rename it (wisely) and change the name attribute in the file to whatever you want to see in the dropdown.
Configure a Stream Deck button to display the midi value for a fader.
Move the fader in small steps (either in the daw or by using Stream deck buttons) and register as many sample points as you endure, creating one Value row for each sample point (100+ sample points evenly spread is a good starting point...).
Save the file.
Select the new entry in the plugin.
Move the fader, and watch in awe of how reasonably accurate dB values are displayed in Stream Deck.
Take a rest and a cup of coffee; you're worth it. :-)
A bit more detailed configuration
In the installed plugin folder, the subfolder dBCurves contains the built-in xml files for the various daws. The Value display dropdown in the editor is populated with the name attributes from the files found (with valid content)
Please do not edit the files in the dBCurves folder.
In case a bundled dB file needs improvements or if you want to add a file for another daw, please do as follows:
Create a folder Trevliga Spel in your Documents folder (if it's not already there...)
Create a folder dBCurves in the Trevliga Spel folder.
If you want to change an existing dB file: copy the file you want to improve from the plugin dBCurves folder to your Trevliga Spel/dBCurves folder. Do not rename the file.
If you want to create a new dB file: copy one of the files from the plugin dBCurves folder to your Trevliga Spel/dBCurves folder and rename the file to reflect the new daw. Change the name attribute at the beginning of the file to whatever text you want to see in the dropdown.
Make whatever changes you want (as described below) to the file in your Trevliga Spel/dBCurves folder.
If the plugin finds a file in your personal folder with the same name as a file in the plugin folder, the file in your personal folder will be used. The fact that the file is found in the personal folder is indicated by an asterisk before the name in the dropdown.
The files have the following format:
<?xml version="1.0" encoding="utf-8" ?>
<dBCurve name="Cubase/Nuendo, 12dB" decimals1="2" decimals2="1" decimals3="1" version="1">
<Value midivalue="26" dbvalue="-104"/>
<Value midivalue="53" dbvalue="-98"/>
<Value midivalue="79" dbvalue="-94.5"/>
<Value midivalue="15612" dbvalue="7.46"/>
<Value midivalue="16039" dbvalue="8.9"/>
<Value midivalue="16369" dbvalue="10.33"/>
The text to be displayed in the dropdown dB value section of the Display Value dropdown in either the Mackie Control or the Control Change action.
decimals1, decimals2, decimals3
The number of decimals to display depends on the number of integers in the dB value. (Please note that this is independent of the number of decimals entered in the dbvalue field.)
Not used by the plugin, you can use that attribute to track changes you make.
This is the raw midi value for the sample point and should be registered as an integer. For the Control Change action, this value is in the range 0 - 127, while the Mackie Control action has a range of 0 - 16383.
Important: The plugin will select the available files based on each file's max value for the midivalue attribute. If the max value is higher than 127, the file will be added to the Mackie Control dropdown; if the max value is 127 or lower, it will be added to the Control Change dropdown.
This is the dB value for calculations when midi values are received. The value is a decimal with an optional number of decimals. The plugin treats decimal points (.) and decimal commas (,) in the same way, so you can use whatever notion is natural for you. ("12.5" and "12,5" are both treated as "twelve and a half")
You don't have to register the Value rows in (midivalue) numerical order, but I highly recommend doing so.
Recevied midi values lower than the lowest registered value will be displayed as "-Inf".
Recevied midi values higher than the highest registered value will be displayed as the highest registered value.
File names are important since when you select a dB file in the dropdown, it is, in fact, the file name you choose. You can change the name attribute in the file without losing the link between a button and the selected dB file, but if you change the file name, all buttons that reference that file will lose their configuration. The plugin doesn't have any requirements at all for the file names. The following naming convention has been used for the built-in files; you can use the same convention or something completely different.
File names for the Mackie Control action (with a midivalue range of 0 - 16383) are prefixed with "db_".
File names for the Control Change action (with a midivalue range of 0 - 127) are prefixed with "db127_". Please note that these two "rules" only let humans understand the difference between the files; when deciding where to display the different files, the plugin looks at the file content, not the file name.
After the prefix, the target daw name is used.
Finally, the max dB value for the target fader is used. This was primarily necessary for Cubase/Nuendo, which can have both 6dB and 12dB as the max value for the faders, but I've used the same structure for all file names.
Examples: "db_Bitwig6db.xml", "db127_Cubase12db.xml", "db_StudioOne10db.xml".
In an xml file, some characters are reserved for the xml structure itself, and you must not use those characters when defining texts. If you want to have any of the following characters displayed in the dropdowns, please use the following replacement strings (without the quotes):
To display the < character, please use "<"
To display the > character, please use ">"
To display the & character, please use "&"
To display the " (quote) character, please use """
To display a line feed, please use "