Add optional Gain parameter to Clip - #105
Open
moritzsur wants to merge 1 commit into
Open
Conversation
The gain is a RealParameter, consistent with channel volume, send level and the device gain stages, so the unit is self-describing and the parameter can be used as an automation target. It is applied in addition to the fade-in/fade-out envelope and independently of the channel volume; unity gain is the implied default when the element is omitted. Regenerated Project.xsd and Reference.html and added a save/load round-trip test.
Author
|
When you have a chance, could you let me know whether this is something you’d be open to merging, or whether any changes are needed from my side? @kurasu |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #71.
What
Adds an optional
Gainchild element toClip— aRealParameterholding the gain applied to the clip's audio content. Unity gain is the implied default when the element is omitted, so existing files are unaffected and files that don't use it remain valid against the previous schema.The gain is applied in addition to the fade-in/fade-out envelope and independently of the volume of the channel the clip plays on.
Included:
Clip.java: new documentedgainfield (<Gain>element)Project.xsd/Reference.html: regeneratedDawProjectTest: save/load round-trip test covering the new elementDesign notes
Why a
RealParameterelement? It is consistent with every other gain/volume in the format —ChannelVolume,SendVolume, and the deviceInputGain/OutputGainstages are allRealParameters. That makes the unit self-describing per instance (unit="linear"orunit="decibel", plus optionalmin/max), and since parameters are referenceable, the clip gain can also serve as an automation target.This covers the static per-clip gain that hosts like Bitwig Studio and Studio One expose as a single value per clip; time-varying gain remains representable with a
Pointstimeline targetingexpression="gain".