Posted on Leave a comment

Sample Creators: A New Wavetable Engine

With the release of version 1.20.0, Decent Sampler now has a wavetable engine.

Wavetables are a powerful synthesis technique that allows you to create complex, evolving timbres by scanning through a series of single-cycle waveforms (called “frames”) stored in a file. Each frame can be a different shape, and as you move through the wavetable, the oscillator crossfades between adjacent frames to create smooth transitions. This allows for a huge variety of sounds, from classic analog-style waveforms to rich, evolving textures that would be difficult or impossible to achieve with traditional oscillator types.

The syntax for using it is very similar to other oscillator engines:

<DecentSampler minVersion="1.20.1">
  <groups attack="0.01" decay="0.1" sustain="1.0" release="0.5">
    <group >
      <oscillator waveform="wavetable" wavetableFile="Wavetables/Default Shapes.wav" wavetableFrameInterpolation="false" wavetablePosition="0.0"/>
    </group>
  </groups>
</DecentSampler>
Code language: HTML, XML (xml)

Right now, it supports just four parameters:

  • waveform: Must be set to wavetable to use the wavetable engine
  • wavetableFile: The path of the wavetable file to use
  • wavetablePosition: A number from 0 to 1 that determines which frame of the wavetable to use
  • wavetableFrameInterpolation: A boolean that controls whether adjacent wavetable frames are linearly crossfaded (true) or snapped to the nearest frame with no crossfading (false)

The wavetablePosition parameter can be modulated in real time using the OSCILLATOR_WAVETABLE_POSITION binding parameter, and the wavetableFrameInterpolation can be toggled on and off using the OSCILLATOR_WAVETABLE_FRAME_INTERPOLATION binding parameter. If you are going to use knobs to change these parameters, make sure to define them at the group level, not the oscillator level, since the bindings are at the group level. Here’s a simple example of how to set up a knob to control the wavetable position:

<?xml version="1.0" encoding="UTF-8"?>
<DecentSampler minVersion="1.19.0">
  <ui height="375" bgColor="#FF1A1A2E" >
    <tab>
      <labeled-knob x="380" y="55" width="80" height="85" label="Position" value="0" minValue="0" maxValue="1" textColor="#FFFFFFFF" trackForegroundColor="#FF6699FF" trackBackgroundColor="#FF333355">
        <binding type="general" level="group" tags="wt" parameter="OSCILLATOR_WAVETABLE_POSITION" translation="linear" translationOutputMin="0.0" translationOutputMax="1.0"/>
      </labeled-knob>
    </tab>
  </ui>
  <groups attack="0.02" decay="0.1" sustain="1.0" release="0.5" >
    <group tags="wt" wavetablePosition="0.0" enabled="1"  modVolume="0.9999999776482582">
      <oscillator waveform="wavetable" wavetableFile="Wavetables/Default Shapes.wav" wavetableFrameInterpolation="true"/>
    </group>
  </groups>
</DecentSampler>Code language: HTML, XML (xml)

As mentioned above, the wavetable file format Decent Sampler uses is based on the Serum-compatible format, which is a standard RIFF-based format with a .wav extension. You can create these files using tools like Serum, Vital, or Carvetoy. The file contains multiple “frames” of audio data, which the oscillator can crossfade between to create evolving timbres. When you load a wavetable file, Decent Sampler reads the number of frames and their size, and uses that information to determine how to map the wavetablePosition parameter to the appropriate frames in the file.

For more detailed information on how to use the wavetable engine, check out the updated documentation in the Decent Sampler Developer’s Guide. There are also two example presets included in the DecentSampler Sample Library Examples (look in the example-017-oscillators directory).

I’m really looking forward to seeing what you all create with this new feature! Wavetables open up a whole new world of sonic possibilities, and I can’t wait to hear the weird and beautiful sounds that come out of it. Happy sampling!

– Dave

Posted on Leave a comment

Sample Creators: New Feature in Version 1.15.2: Pluck Oscillator

Version 1.15.2 of DecentSampler introduces a cool new oscillator type that brings physical modeling synthesis capabilities to the platform: the pluck oscillator. This new waveform uses the Karplus-Strong algorithm to simulate the sound of plucked strings, adding a powerful new tool for creating realistic and expressive string instruments without requiring any audio samples. The pluck oscillator has also been open-sourced under the MIT license here.

What is the Pluck Oscillator?

The pluck oscillator implements the classic Karplus-Strong algorithm, a physical modeling technique that simulates the behavior of a vibrating string. When you trigger a note, the oscillator generates a burst of noise (the “pluck” or excitation) which is then fed through a delay line with feedback. As the sound circulates through the delay, it gradually loses high frequencies, creating the characteristic warm, decaying tone of a plucked string.

Using the Pluck Oscillator

Using the pluck oscillator is straightforward. Simply set the waveform attribute to "pluck1" on either an <oscillator> element or its parent <group>:

<DecentSampler minVersion="1.15.1">
  <groups attack="0.005" decay="0.1" sustain="1" release="10.0">
    <group>
      <oscillator waveform="pluck1" damping="0.5" pluckType="0.5"/>
    </group>
  </groups>
</DecentSampler>Code language: HTML, XML (xml)

As you can see, the oscillator has two new parameters The pluck oscillator responds to standard ADSR envelope parameters, but the release time is particularly important as it controls how long the string continues to resonate after you release the key.

Controllable Parameters

The pluck oscillator exposes two key parameters that can be controlled via bindings:

Damping (OSCILLATOR_DAMPING)

The damping parameter controls how quickly high frequencies decay from the sound. This simulates the effect of damping on a real string:

  • Lower values (0.0 – 0.3): Very bright sound with slow decay, like a lightly-touched string
  • Medium values (0.3 – 0.7): Balanced tone with natural decay
  • Higher values (0.7 – 1.0): Darker, heavily damped sound that dies out quickly

You can bind damping to a knob like this:

<labeled-knob x="20" y="20" width="80" height="100" label="Damping" 
              value="0.5" minimum="0" maximum="1">
  <binding type="general" level="group" position="0" 
           parameter="OSCILLATOR_DAMPING" 
           translation="linear" 
           translationOutputMin="0" 
           translationOutputMax="1"/>
</labeled-knob>Code language: HTML, XML (xml)

A useful technique is to also map damping to the release time, so that heavily damped sounds die out faster:

<binding type="amp" level="group" position="0" 
         parameter="ENV_RELEASE" 
         translation="table"
         translationTable="0,0.5;0.5,6.0;1.0,10.0"/>Code language: HTML, XML (xml)

Pluck Type (OSCILLATOR_PLUCK_TYPE)

The pluck type parameter controls the excitation signal—the initial “burst” that triggers the string vibration:

  • Value 0.0: Pure triangle wave excitation, producing a softer, more rounded tone
  • Value 0.5: Blend of triangle and noise
  • Value 1.0: Pure white noise excitation, producing a brighter, more percussive attack
<labeled-knob x="120" y="20" width="80" height="100" label="Pluck Type" 
              value="0.5" minimum="0" maximum="1">
  <binding type="general" level="group" position="0" 
           parameter="OSCILLATOR_PLUCK_TYPE" 
           translation="linear" 
           translationOutputMin="0" 
           translationOutputMax="1"/>
</labeled-knob>Code language: HTML, XML (xml)

Creative Applications

The pluck oscillator opens up many creative possibilities:

String Instruments: Create harps, guitars, basses, and other plucked instruments with just a few lines of XML. The physical modeling approach means the sound will respond naturally to different playing dynamics.

Hybrid Sounds: Layer the pluck oscillator with acoustic samples to add extra body and sustain to string sounds, or use it as a sub layer for bass guitars.

Experimental Textures: Push the damping and pluck type parameters to extremes to create otherworldly metallic tones, percussive hits, or evolving pads.

Complete Example

Here’s a complete preset that demonstrates both controllable parameters:

<?xml version="1.0" encoding="UTF-8"?>
<DecentSampler minVersion="1.15.1">

  <ui height="375">
    <tab>
      <labeled-knob x="20" y="20" width="80" height="100" 
                    label="Damping" value="0.5" 
                    minimum="0" maximum="1">
        <binding type="general" level="group" position="0" 
                 parameter="OSCILLATOR_DAMPING" 
                 translation="linear" 
                 translationOutputMin="0" 
                 translationOutputMax="1"/>
        <!-- Also control release time -->
        <binding type="amp" level="group" position="0" 
                 parameter="ENV_RELEASE" 
                 translation="table"
                 translationTable="0,0.5;0.5,6.0;1.0,10.0"/>
      </labeled-knob>

      <labeled-knob x="120" y="20" width="80" height="100" 
                    label="Pluck Type" value="0.5" 
                    minimum="0" maximum="1">
        <binding type="general" level="group" position="0" 
                 parameter="OSCILLATOR_PLUCK_TYPE" 
                 translation="linear" 
                 translationOutputMin="0" 
                 translationOutputMax="1"/>
      </labeled-knob>

      <label x="20" y="130" width="300" height="20" 
             text="Pluck Oscillator Example" fontSize="16"/>
      <label x="20" y="155" width="300" height="40" 
             text="Use Damping knob to control decay time&#10;Use Pluck Type knob to blend excitation (triangle → noise)" 
             fontSize="11"/>
    </tab>
  </ui>

  <groups attack="0.005" decay="0.1" sustain="1" release="10.0" 
          ampVelTrack="1" pitchKeyTrack="1">
    <group damping="0.5" pluckType="0.5">
      <oscillator waveform="pluck1" />
    </group>
  </groups>

</DecentSampler>Code language: HTML, XML (xml)

Getting Started

To use the pluck oscillator, make sure your preset specifies minVersion="1.15.2":

<DecentSampler minVersion="1.15.2">
  <!-- Your preset content -->
</DecentSampler>Code language: HTML, XML (xml)

A complete working example can be found in the DecentSampler Sample Library Examples repository here.

The pluck oscillator is documented in the DecentSampler Developer’s Guide, along with all the other oscillator types and parameters.

I’m really excited to see what creative uses the community comes up with for this new physical modeling capability. As always, if you find bugs, make sure to report them here. I do read all of the emails, even if I don’t always have time to respond to them. 🙂

Have fun!

– Dave

Posted on 3 Comments

Sample Creators: New Features in Version 1.15.0: Oscillators, Lines, and Rectangles

The Mona Lisa in rectangles.

Version 1.15.0 of DecentSampler introduces three powerful new features that expand what’s possible when creating sample libraries: built-in oscillators for synthesis without samples, line elements for visual design, and rectangle elements for custom UI layouts. These features open up exciting new possibilities for both sound design and visual presentation.

Oscillators

One of the most significant additions in version 1.15.0 is support for built-in oscillators. Previously, DecentSampler was purely sample-based, but now you can create synthetic sounds using waveform generators. This is particularly useful for creating sub-bass layers, lead synth sounds, or even entirely sample-free instruments.

Using oscillators is straightforward. Instead of using <sample> elements, you place an <oscillator/> element inside a <group>. The waveform type is specified using the waveform attribute on either the sample or the parent group. Here’s a simple example:

<DecentSampler minVersion="1.15.0">
  <groups>
    <group>
      <oscillator waveform="sine"/>
    </group>
  </groups>
</DecentSampler>
Code language: HTML, XML (xml)

The available waveform types are:

  • sine – Pure sine wave with no harmonics, ideal for sub-bass
  • saw – Sawtooth wave with rich harmonics, great for bright sounds
  • square – Square wave with odd harmonics, useful for hollow tones
  • triangle – Triangle wave with fewer harmonics, produces mellower tones
  • noise (or white_noise) – White noise generator, useful for percussion and textures

You can combine oscillators with regular samples for layering effects. For example, you might add a sine wave sub-bass underneath acoustic piano samples to add depth and weight to the low end.

Here’s a more complete example showing how to create a simple synth with waveform selection:

<DecentSampler minVersion="1.15.0">
  <ui>
    <tab>
      <menu x="10" y="10" width="150" height="30" value="1">
        <option name="Sine">
          <binding type="general" level="group" position="0" 
                   parameter="OSCILLATOR_WAVEFORM" 
                   translation="fixed_value" translationValue="sine"/>
        </option>
        <option name="Saw">
          <binding type="general" level="group" position="0" 
                   parameter="OSCILLATOR_WAVEFORM" 
                   translation="fixed_value" translationValue="saw"/>
        </option>
        <option name="Square">
          <binding type="general" level="group" position="0" 
                   parameter="OSCILLATOR_WAVEFORM" 
                   translation="fixed_value" translationValue="square"/>
        </option>
        <option name="Triangle">
          <binding type="general" level="group" position="0" 
                   parameter="OSCILLATOR_WAVEFORM" 
                   translation="fixed_value" translationValue="triangle"/>
        </option>
      </menu>
    </tab>
    <keyboard/>
  </ui>
  <groups>
    <group waveform="saw" volume="0.5" attack="0.01" decay="0.3" 
           sustain="0.7" release="0.5">
      <oscillator/>
    </group>
  </groups>
</DecentSampler>
Code language: HTML, XML (xml)

An example of using oscillators can be found in the DecentSampler Sample Library Examples repository here.

Rectangle Elements

Rectangle elements allow you to create custom backgrounds, panels, borders, and decorative elements in your UI. They support fill colors, border colors, and border thickness, giving you fine control over the visual design of your presets.

Adding a rectangle to your UI is simple:

<rectangle x="10" y="20" width="200" height="100" 
           fillColor="#FF3366FF" 
           borderColor="#FF000000" 
           borderThickness="2" />
Code language: HTML, XML (xml)

Colors use the 8-character hex format #AARRGGBB (alpha, red, green, blue), so #FF3366FF is fully opaque blue with a touch of green.

What makes rectangles particularly powerful is that they support bindings. You can dynamically control their position, size, and visibility using knobs, buttons, or other controls. Here’s an example that uses a knob to control a rectangle’s width:

<ui>
  <tab>
    <labeled-knob x="10" y="10" width="90" label="Width" 
                  type="float" minValue="10" maxValue="400" value="100">
      <binding type="control" level="ui" position="1" parameter="WIDTH" 
               translation="linear" translationOutputMin="10" translationOutputMax="400"/>
    </labeled-knob>
    <rectangle x="10" y="100" width="100" height="50" 
               fillColor="#FF0066FF" 
               borderColor="#FF000000" 
               borderThickness="2" />
  </tab>
  <keyboard/>
</ui>
Code language: HTML, XML (xml)

The binding parameters available for rectangles are:

  • X – X position in pixels
  • Y – Y position in pixels
  • WIDTH – Width in pixels
  • HEIGHT – Height in pixels
  • VISIBLE – Visibility (true/false)

These dynamic capabilities open up possibilities for creating animated UI elements, progress bars, visualizations, and more.

Line Elements

Line elements complement rectangles by allowing you to draw lines for dividers, borders, connectors, or decorative elements. Lines are defined by their start and end points:

<line x1="10" y1="20" x2="200" y2="20" 
      lineColor="#FF000000" 
      lineThickness="2" />
Code language: HTML, XML (xml)

Like rectangles, lines also support dynamic control through bindings. You can create interactive visual elements by binding their endpoints to controls:

<ui>
  <tab>
    <labeled-knob x="10" y="10" width="90" label="End X" 
                  type="float" minValue="0" maxValue="400" value="200">
      <binding type="control" level="ui" position="1" parameter="X2" 
               translation="linear" translationOutputMin="0" translationOutputMax="400"/>
    </labeled-knob>
    <line x1="50" y1="100" x2="200" y2="100" 
          lineColor="#FFFF0000" 
          lineThickness="3" />
  </tab>
  <keyboard/>
</ui>
Code language: HTML, XML (xml)

The binding parameters for lines are:

  • X1 – Start X position in pixels
  • Y1 – Start Y position in pixels
  • X2 – End X position in pixels
  • Y2 – End Y position in pixels
  • VISIBLE – Visibility (true/false)

Together, rectangles and lines give you a complete toolkit for creating sophisticated custom UIs. You can build complex layouts, create visual feedback systems, or even make artistic designs entirely from geometric shapes.

Examples of using rectangles and lines can be found in the DecentSampler Sample Library Examples repository here. The examples include demonstrations of static layouts, dynamic binding controls, and even an artistic rendering of the Mona Lisa created entirely with rectangles!

Getting Started

To use any of these new features, make sure your preset specifies minVersion="1.15.0":

<DecentSampler minVersion="1.15.0">
  <em><!-- Your preset content --></em>
</DecentSampler>
Code language: HTML, XML (xml)

All of these features are documented in the DecentSampler Developer’s Guide, and complete working examples are available in the DecentSampler Sample Library Examples repository.

Definitely let me know if you run into any issues with these new features. They represent a significant expansion of DecentSampler’s capabilities, and I would love to hear your feedback and see what creative uses you come up with.

All the best,
Dave

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

Posted on 3 Comments

Sample Creators: About MPE Support in DecentSampler

Hi everyone!

Over the past year, MIDI Polyphonic Expression (MPE) support has been slowly evolving in DecentSampler. In fact, everything I’m discussing in this blog post has actually been in the sampler since version 1.11.6, but I haven’t documented it because I consider this functionality to be in alpha. Speaking of which, I don’t think anyone should make use of any of these features in commercial sample libraries until all of the kinks have been ironed out. As I work towards a stable feature set, I’m seeking feedback from sample library developers to ensure these new features meet your needs and enable more expressive virtual instruments.

New MPE Modulators & MPE Mode

The MPE functionality introduced in 1.11.6 consists of two new modulators that respond to MPE data:

  1. mpeTimbre – Responds to the timbre/slide dimension of MPE (CC74)
  2. mpePressure – Responds to per-note pressure messages

Before we can talk about using either of these, it’s important to know that you need to turn on MPE Mode in the File > Instrument Settings dialog box.

Working with mpeTimbre

The mpeTimbre modulator allows you to map the timbre on MPE controllers to various parameters. Here’s a practical example that maps timbre to filter frequency:

<mpeTimbre modAmount="0.5" scope="voice">
      <binding type="effect" level="group" groupIndex="0" effectIndex="0" parameter="FX_FILTER_FREQUENCY" 
        modBehavior="add"
        translation="table" 
        translationTable="0,33;0.3,150;0.4,450;0.5,1100;0.7,4100;0.9,11000;1.0001,22000"  />
    </mpeTimbre>
Code language: HTML, XML (xml)

This example uses a translation table to create a non-linear response curve, making the filter frequency changes more musical and intuitive.

Working with mpePressure

The mpePressure modulator responds to per-note pressure, enabling dynamic control over parameters based on how hard a key is pressed after the initial note-on. Here’s an example that maps pressure to amplitude:

<mpePressure modAmount="0.5" scope="voice">
      <binding type="amp" level="group" groupIndex="0" effectIndex="0" parameter="AMP_VOLUME" 
        modBehavior="set"
        translation="linear"
        translationOutputMin="0.5"
        translationOutputMax="1"  />
    </mpePressure>Code language: HTML, XML (xml)

This configuration allows for expressive volume control per note, with pressure scaling the volume between 50% and 100% of the original level.

Example Files

You can download a simple example file here:

Share Your Feedback

As I refine these features, I’m particularly interested in knowing if these modulators seem like reasonable way to approach MPE within DecentSampler. Specifically, I’m curious about:

  1. How you might use these modulators in your sample libraries
  2. Additional parameters or controls you’d find useful
  3. Any edge cases or specific scenarios we should test
  4. Suggestions for improving the XML syntax and structure

Please share your thoughts, suggestions, and any issues you encounter in the comments section of this blog post. Your input will help shape these features and ensure they meet the needs of the sample library development community.

All the best,
Dave

Posted on 1 Comment

Sample Creators: How to Use Buses & Auxiliary Outputs

As of version 1.12.0, Decent Sampler has support for both audio buses and auxiliary outputs. Buses are a powerful feature that allow you to route audio to different auxiliary outputs and apply effects to the audio. This can be useful for creating complex audio routing setups and adding effects to groups of samples. This tutorial will show you how to use buses and auxiliary outputs in Decent Sampler.

Auxilary Outputs

By default, all audio in Decent Sampler is routed to the main audio output. However, you can also route audio to secondary auxiliary outputs. Auxiliary outputs are additional audio outputs that can be used to route audio to external effects processors or other audio devices within your DAW. Decent Sampler supports up to 16 auxiliary stereo outputs, which can be used to create complex audio routing setups.

There are two ways that you can route audio to auxiliary outputs in Decent Sampler:

  1. You can use the outputXTarget attributes in the <sample><group>, or <groups> elements to directly specify the audio output that the sample should be routed to. The available options are MAIN_OUTPUT (the main audio output, which is the default) and AUX_STEREO_OUTPUT_1 through AUX_STEREO_OUTPUT_16 (the auxiliary outputs).
  2. You can also route audio from the samples to user-defined buses, and then route audio from the buses to the auxiliary outputs. This allows you to apply effects to the audio before sending it to the auxiliary outputs. We’ll cover that more below in the Buses section.

Example 1: Routing audio to an auxiliary output

In this example, we will route audio from a sample to an auxiliary output. To do this, we will use the outputXTarget attributes in the <sample> element to specify the audio output that the sample should be routed to. Here is an example of how you can route audio to AUX_STEREO_OUTPUT_1:

<group output1Target="MAIN_OUTPUT" output1Volume="1.0" output2Target="AUX_STEREO_OUTPUT_1" output2Volume="0.5" />
    <!-- Samples go here -->
</group>

In this example, the audio from the samples in the <group> element will be routed to the main audio output with a volume of 1.0, as well as to auxiliary output 1 with a volume of 0.5.

Buses

As mentioned above, buses can be used to create a more complex mix of the samples in the sample library as well as route audio to various audio outputs. Sample library designers can specify up to 16 buses in the <buses> element using the <bus> tag. Each bus can have its own volume and audio output settings. For a full list of attributes that can be used in the <bus> element, see the Buses Element documentation.

Example 2: Applying effects to audio using buses

In this example, we will apply an effect to audio using a bus. To do this, we will define a bus with an effect applied to it, and then route audio from the samples to the bus. Here is an example of how you can apply a reverb effect to audio using a bus:

<buses>
<bus busVolume="0.5" output1Target="MAIN_OUTPUT" output2Target="AUX_STEREO_OUTPUT_1" output1Volume="0.8" output2Volume="0.5">
<effects>
<effect type="reverb" wetLevel="1" />
</effects>
</bus>
</buses>
<group output1Target="MAIN_OUTPUT" output2Target="BUS_1" output2Volume="1.0">
<!-- Samples go here -->
</group>

In this example, a bus is defined with a reverb effect applied to it. The audio from the samples in the <group> element will be routed to the main audio output with a volume of 1.0, as well as to the bus with the reverb effect applied to it.

Conclusion

Buses and auxiliary outputs are powerful features in Decent Sampler that allow you to create complex audio routing setups and apply effects to groups of samples. By using buses and auxiliary outputs, you can create more dynamic and interesting sample libraries that take full advantage of Decent Sampler’s capabilities. You can find working examples of both audio outputs and buses in the official Decent Sampler example repository (look in the Example 10 directory).

Have fun!

– Dave Hilowitz

Posted on Leave a comment

Saving User Presets in DecentSampler: A Quick Guide

As a DecentSampler user, you’ve likely spent time tweaking and perfecting your sound. But what if you want to save these settings for future use? Good news! DecentSampler allows you to save user presets for any library you’re currently using. Here’s how to do it:

Step 1: Convert Your Library Format

Before you can save user presets, you need to ensure your library is in the correct format. Specifically, if your library is in a .dslibrary format, you must first convert it to either a .dsbundle or a folder-based preset.

Method 1: Converting .dslibrary files using Decent Sampler

The easiest way to convert a .dslibrary file is by using the DecentSampler plug-in itself:

  1. Simply drag that .dslibrary file onto the DecentSampler plug-in window. 
  2. You will see a box that says Do you want to install this preset?, click Yes.
  3. DecentSampler will decompress the .dslibrary file and create a new .dsbundle directory wherever you keep your sample libraries. For a list of the default sample library locations, see here.

Method 2: Manually Method

If Method 1 doesn’t work for some reason, you can also convert the file yourself. At their core, .dslibrary files are just .zip files with a different extension. 

  1. Change the extension on the .dslibrary file to .zip.
  2. Decompress the .zip file and put it wherever you store your sample libraries. If you are on macOS or Windows, this will be as easy as simply double-clicking the .zip file.

Step 2: Set Up Your Sound

Now that your library is in the correct format, load it and adjust the parameters to your liking. This could include changes to the envelope, filter settings, effects, or any other adjustable parameters within the library.

Step 3: Access the FILE… Menu

Once you’re happy with your sound, look for the FILE… menu. This is typically located at the top of the DecentSampler interface.

Step 4: Choose “Developers Tools > Save Preset…”

In the preset menu, you should see an option to “Save Preset…”. Click on this option.

Step 5: Select Save Location and Name Your Preset

A dialog box will appear, prompting you to save your preset. It is important that you save the preset in the same location as the other presets for this library – DecentSampler will usually suggest the correct location as the default location. Choose a name that’s descriptive and easy to remember. For example, “Warm Pad with Long Release” or “Punchy Bass with Distortion”.

Step 6: Confirm and Save

Once you’ve named your preset, click “Save” or “OK” to confirm. Your preset is now saved and ready for future use!

Accessing Your Saved Presets

To use your saved preset in the future:

  1. Load the same library you used when creating the preset (remember, it must be the .dsbundle or folder-based version).
  2. A box will pop up showing you all of the presets that belong to that library. 
  3. Find and select your new saved preset.

Remember, user presets are specific to the library you’re using. A preset saved while using one library won’t be available when you’re working with a different library.

Happy sampling, and enjoy the convenience of your personalized DecentSampler presets!

Posted on Leave a comment

Sample Creators: Here’s how to use the new XY Pad UI control

Hello! Version 1.11.12 of Decent Sampler introduces a useful new UI control: an XY pad. Here’s an example that I’ve colored yellow:

A screenshot of an XY Pad

This control is similar to a knob or a slider except that it works in two dimensions. For sample library creators who have worked with knobs and sliders will find that setting up this new control is pretty similar to those controls. The main difference between an XY pad and a knob is that instead of having one set of bindings it has two: one for the X axis and one for the Y axis. The code for the example above is this:

<xyPad x="10" y="10" width="300" height="195" parameterName="Pad" xValue="0.5576778054237366" yValue="0.4821614623069763" bgColor="77FFCC00" markerFillColor="FFFFFFFF" outlineColor="77FFFFFFF">
        <x>
          <binding type="amp" level="group" groupIndex="0" parameter="AMP_VOLUME" translation="linear" translationOutputMin="0" translationOutputMax="1"/>
          <binding type="amp" level="group" groupIndex="1" parameter="AMP_VOLUME" translation="linear" translationOutputMin="1" translationOutputMax="0"/>
        </x>
        <y>
          <binding type="effect" level="instrument" effectIndex="0" parameter="FX_FILTER_FREQUENCY" translation="table" translationTable="0,33;0.3,150;0.4,450;0.5,1100;0.7,4100;0.9,11000;1.0001,22000"/>
        </y>
      </xyPad>
Code language: HTML, XML (xml)

You’ll note that the current value on the X axis can be found in the xValue attribute, and the current value for the Y axis can be found in the yValue attribute. XY Pads are automatable using DAW automation.

To learn more about this control, see the updated documentation here. You can download this example here – you’ll find it in the example 9 directory.

Enjoy!

– Dave

Posted on 1 Comment

Sample Creators: Introducing Note Sequences

Hello Sample Creators!

I have a couple of news items I wanted to share. First, I’m thrilled to announce a new update to Decent Sampler – a tiny but mighty sequence playback engine hidden right within the plugin. This new feature lets you embed simple note sequences directly into your sample libraries. This opens up a world of possibilities for sample library makers. For example:

  • Guitar libraries: Strumming patterns, arpeggios, and riffs
  • Drum libraries: Provide essential preset beats and fills to jumpstart users’ creative flow.
  • Melodic libraries: Craft short phrases or even full melodic sequences.
  • World percussion libraries: Embed traditional rhythms and grooves to enhance authenticity.

Learn more about how to use these here. By the way, for those of you who are Patrons, the latest version of the Omnichord sample library makes use of the new sequencer functionality. Each of the Omnichord strums is a little 13 note sequences that gets played when the user hits a key.

Which brings us to our second news item: the DecentSamples File Format Developer Guide has been moved here. As I was typing up documentation for the note sequencer stuff, I felt we’d finally reached the moment where we needed to break all of the information in the guide into several discreet pages. I’m now using ReadTheDocs service to help me host and organize the documentation.

OK. I think that’s it. As always, let me know if you find any bugs.

– Dave