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 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

Video: Getting Started with SFZ: The Free Sampler + FREE SFZ SAMPLE LIBRARY

In this video, Dave Hilowitz provides a basic introduction to SFZ – a free sampling format that provides a lot of the same functionality as Kontakt, albeit with a far more basic UI.

The toy xylophone sample I created in this video can be downloaded here.

Posted on 1 Comment

Free Violin Sample in Kontakt, Ableton, and SFZ Format

Before you download the sample, check out the story behind the samples here:

In this video, Dave Hilowitz investigates two violins he bought on the street in Philadelphia. In the process, he learns about forgotten violin maker Lewis E. Pyle and makes some music.

The samples of Mr. Pyle’s violin can be downloaded here.