Version 1.13.6 of DecentSampler introduces two new features: continuous background sounds and multi-state controls. Continuous background sounds allow sample libraries to incorporate “always-on” sounds, such as vinyl crackle or tape hiss, and multi-state controls allow sample libraries to select between several different values using a standard slider or knob control.
Continuous Background Sounds
Using these is extremely easy. Simply add trigger="continuous" to a sound and it will always play. To turn continuous sounds on and off, simply use the enabled attribute. Here’s an example:
<DecentSampler minVersion="1.13.6">
<ui>
<tab>
<!-- This control adjusts the volume of the hiss sound -->
<labeled-knob x="200" y="10" width="90" textSize="16" textColor="AA000000" trackForegroundColor="CC000000" trackBackgroundColor="66999999" label="Hiss" type="float" minValue="0.0" maxValue="1.0" value="1">
<binding type="amp" level="tag" identifier="hiss" parameter="AMP_VOLUME"/>
</labeled-knob>
<!-- This control turns the hiss on and off -->
<button x="200" y="120" width="90" height="20" parameterName="Hiss Enabled">
<state name="Enabled">
<binding type="general" level="group" tags="hiss" parameter="ENABLED" translation="fixed_value" translationValue="true" />
</state>
<state name="Disabled">
<binding type="general" level="group" tags="hiss" parameter="ENABLED" translation="fixed_value" translationValue="false" />
</state>
</button>
</tab>
<keyboard/>
</ui>
<groups ampVelTrack="0" attack="0.000" decay="25" sustain="1.0" release="0.430" volume="0.3345800042152405">
<group tags="hiss" trigger="continuous" >
<sample path="Samples/TapeHiss.wav" loopEnabled="true" />
</group>
</groups>
</DecentSampler>Code language: HTML, XML (xml)
An example of using continuous background sounds can be found in the Decent Samples Developer Examples repository here.
Multi-State Controls
Multi-state controls work in much the same way that button controls do. They allow you to create a control that can switch between multiple states, rather than just a continuous range of values. Here is an example of how you might use one of these:
<ui>
<tab>
<label text="Language" x="330" y="30" width="120" height="30" textSize="24" tooltip="this is a label tooltip test"></label>
<control x="80" y="10" style="rotary" width="84" height="84" trackForegroundColor="FFF06C55" trackBackgroundColor="66999999" parameterName="Language" valueType="multi_state" value="10.0">
<state name="English">
<binding type="general" level="group" position="0" parameter="ENABLED" translation="fixed_value" translationValue="true" />
<binding type="general" level="group" position="1" parameter="ENABLED" translation="fixed_value" translationValue="false" />
</state>
<state name="French">
<binding type="general" level="group" position="1" parameter="ENABLED" translation="fixed_value" translationValue="true" />
<binding type="general" level="group" position="0" parameter="ENABLED" translation="fixed_value" translationValue="false" />
<binding type="general" level="group" position="0" parameter="ENABLED" translation="fixed_value" translationValue="false" />
</state>
</control>
</tab>
</ui>Code language: HTML, XML (xml)
An example of a multi-state control can be found in the Decent Samples Developer Examples repository here.
Definitely let me know if you run into any issues with either of these features. They are both new and I would love to hear your feedback on them.
All the best,
Dave