Posted on 2 Comments

Sample Creators: New Features: Continuous Background Sounds & Multi-State Controls

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

Posted on Leave a comment

Sample Creators: New Pitch Shift Effect

As of version 1.13.3, Decent Sampler now has a simple, old school pitch shift effect. This is a classic, delay-based implementation that can be found in a lot of 90s-era digital pitch shifters. It should be useful for adding old-school grit or faking a tape-recorder warble. Usage is pretty straightforward:

<DecentSampler minVersion="1.13.3">
  <ui>
    <tab>
      <labeled-knob x="375" y="75" width="90" textSize="16" textColor="AA000000" trackForegroundColor="CC000000" trackBackgroundColor="66999999" label="Pitch Shift" type="float" minValue="-24.0" maxValue="24.0" value="0">
        <binding type="effect" level="group" groupIndex="0" effectIndex="0" parameter="FX_PITCH_SHIFT"/>
      </labeled-knob>
      <labeled-knob x="445" y="75" width="90" textSize="16" textColor="AA000000" trackForegroundColor="CC000000" trackBackgroundColor="66999999" label="Mix" type="float" minValue="0.0" maxValue="1.0" value="1">
        <binding type="effect" level="group" groupIndex="0" effectIndex="0" parameter="FX_MIX"/>
      </labeled-knob>   
    </tab>
  </ui>
  <groups attack="0.000" decay="25" sustain="1.0" release="0.430" ampVelTrack="0.5">
    <group>
      <!-- ... samples go here ... -->

      <effects>
        <effect type="pitch_shift" pitchShift="0.0" mix="1" enabled="true"/>
      </effects>
    </group>
  </groups>
</DecentSampler>Code language: HTML, XML (xml)

The two parameters of the pitch_shift effect can also be modulated as follows:

<modulators>
  <lfo shape="sine" frequency="2" modAmount="0.3">
    <binding type="effect" level="group" groupIndex="0" effectIndex="0" parameter="FX_PITCH_SHIFT" modBehavior="add" translation="linear" translationOutputMin="-1" translationOutputMax="1"  />
  </lfo>
</modulators>Code language: HTML, XML (xml)

Example for how to use this effect can be found here.

Enjoy!

– Dave