### Quick Start FM Synthesis Configuration Source: https://decentsampler-developers-guide.readthedocs.io/en/stable/_sources/topic-how-to-use-fm-synthesis.md.txt Configure the FM synthesizer by setting `waveform="fm6op"` on an `` and defining FM parameters on the parent ``. This example sets up algorithm 5 with specific operator ratios, levels, and ADSR envelopes. ```xml ``` -------------------------------- ### Full DecentSampler Example with Bit Crusher Source: https://decentsampler-developers-guide.readthedocs.io/en/stable/the-effects-element.html An example of a DecentSampler plugin configuration that includes the Bit Crusher effect with UI knobs for controlling its parameters. ```APIDOC ## DecentSampler with Bit Crusher Example ### Description This example demonstrates a complete DecentSampler plugin configuration, featuring the Bit Crusher effect and three labeled knobs for real-time control of Bit Depth, Rate Reduction, and Mix. ### Method XML Configuration ### Endpoint N/A (Plugin Configuration) ### Request Example ```xml ``` ### Response N/A (Configuration is applied directly) ``` -------------------------------- ### Initialize Legato Instrument Structure Source: https://decentsampler-developers-guide.readthedocs.io/en/stable/_sources/topic-how-to-implement-true-legato.md.txt The starting structure for a full legato instrument definition. ```xml ``` -------------------------------- ### Define buses in XML Source: https://decentsampler-developers-guide.readthedocs.io/en/stable/_sources/the-buses-element.md.txt Example of configuring multiple buses with specific volume and output routing targets. ```xml ``` -------------------------------- ### Multi-Oscillator Layering Example Source: https://decentsampler-developers-guide.readthedocs.io/en/stable/_sources/the-groups-element.md.txt Creates a rich synthesized sound by layering multiple oscillators with different waveforms, tunings, and panning. This example demonstrates creating a fundamental, octave-up, sub-bass, and detuned stereo pair. ```xml ``` -------------------------------- ### Basic midiCC Modulator Setup Source: https://decentsampler-developers-guide.readthedocs.io/en/stable/_sources/the-modulators-element.md.txt Defines a modulator that responds to a specific MIDI CC number. This is a foundational setup for using MIDI CC data as a modulation source. ```xml ``` -------------------------------- ### Define a DecentSampler UI with controls Source: https://decentsampler-developers-guide.readthedocs.io/en/stable/_sources/the-ui-element.md.txt Example of a basic UI structure including a labeled knob and a control element within a tab. ```xml ``` -------------------------------- ### Route Audio to Auxiliary Output Source: https://decentsampler-developers-guide.readthedocs.io/en/stable/_sources/topic-how-to-use-buses-and-auxiliary-outputs.md.txt Use `outputXTarget` attributes to route audio directly to an auxiliary output. This example sends audio to both the main output and AUX_STEREO_OUTPUT_1. ```xml ``` -------------------------------- ### XML Binding Example Source: https://decentsampler-developers-guide.readthedocs.io/en/stable/_sources/appendix-b-the-binding-element.md.txt This XML snippet demonstrates how to use tags to address multiple controls simultaneously in DecentSampler bindings. Ensure the tag name matches the 'tags' attribute of the target controls. ```xml ``` -------------------------------- ### Control Keyboard Note Coloring with Bindings Source: https://decentsampler-developers-guide.readthedocs.io/en/stable/_sources/topic-colored-keys.md.txt Implement bindings to programmatically enable or disable keyboard note coloring. This example shows how to toggle coloring for specific color indices using button states. ```xml ``` -------------------------------- ### Control LFO Parameters with UI Knobs Source: https://decentsampler-developers-guide.readthedocs.io/en/stable/_sources/the-modulators-element.md.txt Example of binding UI knobs to LFO parameters such as depth, rate, and delay time. Ensure the LFO modulator is defined in the section. ```xml ``` -------------------------------- ### Controlling LFO Parameters via UI Knobs Source: https://decentsampler-developers-guide.readthedocs.io/en/stable/the-modulators-element.html Example of binding UI knobs to control LFO parameters like Depth, Rate, and Delay Time. ```APIDOC ## POST /api/control/lfo/ui ### Description This endpoint demonstrates how to bind UI knobs to control LFO parameters such as Depth, Rate, and Delay Time. ### Method POST ### Endpoint `/api/control/lfo/ui` ### Request Body ```xml ``` ### Response Success Response (200) - **status** (string) - Indicates the success of the operation. ### Response Example ```json { "status": "success" } ``` ``` -------------------------------- ### Control Group Volume with Labeled Knob Source: https://decentsampler-developers-guide.readthedocs.io/en/stable/appendix-b-the-binding-element.html This example demonstrates how to use a element to control the volume of the first group (group 0) using a labeled knob on the UI. The binding translates the knob's linear output to the group's volume parameter. ```xml ``` -------------------------------- ### mpeTimbre Modulator Setup Source: https://decentsampler-developers-guide.readthedocs.io/en/stable/_sources/the-modulators-element.md.txt Use the `` element to control timbre in response to MPE messages. Ensure the plugin is in MPE mode. The 'scope' attribute can be 'global' or 'voice'. Smoothing times are in milliseconds. ```xml ``` -------------------------------- ### Basic midiVelocity Modulator Setup Source: https://decentsampler-developers-guide.readthedocs.io/en/stable/_sources/the-modulators-element.md.txt Use this element to control parameters based on note-on velocity. The 'scope' attribute determines if velocity is global or per-voice. Default scope is 'voice'. ```xml ``` -------------------------------- ### midiVelocity to Control Reverb Amount Source: https://decentsampler-developers-guide.readthedocs.io/en/stable/_sources/the-modulators-element.md.txt This example demonstrates using note velocity to control the wet level of a reverb effect. This allows for dynamic changes in the amount of reverb based on playing intensity. ```xml ``` -------------------------------- ### DecentSampler Instrument with Wave Shaper UI Bindings Source: https://decentsampler-developers-guide.readthedocs.io/en/stable/the-effects-element.html An example of a DecentSampler instrument definition that includes UI elements (knobs) bound to the parameters of a wave shaper effect. This allows users to control distortion, drive boost, and output level via the instrument's interface. ```xml ``` -------------------------------- ### Monophonic Lead Synth with Portamento Source: https://decentsampler-developers-guide.readthedocs.io/en/stable/_sources/the-groups-element.md.txt A complete example of a Moog-style monophonic lead synthesizer featuring portamento (glide) and detuned oscillators. This setup uses tag polyphony to enforce monophonic behavior and LFO for vibrato. ```xml ``` -------------------------------- ### Per-Voice MIDI CC Modulator for Filter Cutoff Source: https://decentsampler-developers-guide.readthedocs.io/en/stable/_sources/the-modulators-element.md.txt Example of using the mod wheel (CC#1) to control filter cutoff with per-voice channel tracking. This setup allows for dynamic filter adjustments tied to individual notes. ```xml ``` -------------------------------- ### Route Sample Audio to a Bus Source: https://decentsampler-developers-guide.readthedocs.io/en/stable/_sources/the-buses-element.md.txt This XML snippet demonstrates routing sample audio to both the main output and a specific bus (BUS_1). Adjust 'outputXTarget' and 'outputXVolume' to control routing and levels. ```xml ``` -------------------------------- ### Implement Keyswitch Menu Selection Source: https://decentsampler-developers-guide.readthedocs.io/en/stable/_sources/the-midi-element.md.txt Demonstrates using MIDI note events to trigger specific menu option changes by updating a UI control's value. ```xml ``` -------------------------------- ### Importing MIDI Files for Sequences Source: https://decentsampler-developers-guide.readthedocs.io/en/stable/_sources/topic-how-to-use-note-sequences.md.txt This section outlines the process of creating note sequences by importing MIDI files into Decent Sampler using the preset editor. ```APIDOC ## Creating a sequence using the sample editor Another way to create sequences is via MIDI. While the Decent Sampler preset editor does not have a sequence editor built in, it does allow you to import MIDI files to create sequences. This means that you can use your favorite DAW to create sequences and then import them into Decent Sampler. This list of steps assumes that already have a preset created and that you are just looking to add sequences to it. 1. Create a MIDI sequence in your favorite DAW. 2. Export the sequence as a MIDI file. 3. Load your preset in Decent Sampler. 4. Open the preset editor by going to **File > Developer Tools > Preset Editor...** (or F12). 5. In the preset editor, choose the **File > Sequence Manager...** menu item. 6. Click the **Edit > Import MIDI File** menu option, and select the MIDI file created in step 2. 7. You will be presented with a dialog box asking whether you want to quantize your sequence. Click OK. 8. Close the sequence manager window and save your preset. ``` -------------------------------- ### Define Oscillator Waveform Source: https://decentsampler-developers-guide.readthedocs.io/en/stable/the-groups-element.html Example XML structure for binding an oscillator waveform to a fixed value. ```xml ``` -------------------------------- ### Define a note sequence in XML Source: https://decentsampler-developers-guide.readthedocs.io/en/stable/_sources/the-noteSequences-element.md.txt Example of an Omnichord-style strum sequence defined within the element. ```xml ``` -------------------------------- ### Configure Wave Folder Effect in DecentSampler Source: https://decentsampler-developers-guide.readthedocs.io/en/stable/_sources/the-effects-element.md.txt This XML configuration demonstrates how to set up a Wave Folder effect within a DecentSampler group. It includes bindings for UI controls to adjust the 'drive' and 'threshold' parameters. ```xml ``` -------------------------------- ### Linear Translation Binding Source: https://decentsampler-developers-guide.readthedocs.io/en/stable/appendix-b-the-binding-element.html Example of using linear translation mode to scale input values between a defined minimum and maximum. ```xml ``` -------------------------------- ### Creating Note Sequences via XML Source: https://decentsampler-developers-guide.readthedocs.io/en/stable/_sources/topic-how-to-use-note-sequences.md.txt This section details how to manually create note sequences using XML elements within your Decent Sampler configuration. ```APIDOC ## The `` element The `` element is how you specify note sequences that can be used by this playback engine. There should be exactly one `` element in each `` file. The `` element can contain one or more `` elements: ### The `` element The `` element has the following attributes: - `name` (optional): An optional descriptive name for the sequence. This is only used in the sample editor UI to help you identify the sequence. - `length` (required): The length of the sequence in beats. This is a floating point number. - `rate` (optional): The rate at which the sequence is played. This is a floating point number. The default is 1.0. The `` element can contain one or more `` elements: #### The `` element The `` element has the following attributes: - `position` (required): The position of the note in the sequence, in beats. This is a whole number. - `velocity` (required): The velocity of the note. This is a floating point number between 0 and 1. - `note` (required): The MIDI note number of the note. - `length` (required): The length of the note in beats. This is a whole number. An example sequence might looks like this: ```xml ``` ``` -------------------------------- ### Fixed Value Translation Binding Source: https://decentsampler-developers-guide.readthedocs.io/en/stable/appendix-b-the-binding-element.html Example of using fixed_value translation mode to ignore input and force a specific parameter value. ```xml ``` -------------------------------- ### Define LFO modulators Source: https://decentsampler-developers-guide.readthedocs.io/en/stable/the-modulators-element.html LFOs are defined within the block. Use the delayTime attribute to specify a start delay in seconds. ```xml ``` ```xml ``` -------------------------------- ### Sample Audio Output Configuration Source: https://decentsampler-developers-guide.readthedocs.io/en/stable/the-groups-element.html Configuration parameters for defining audio routing targets and volume levels for sample outputs. ```APIDOC ## Sample Audio Output Configuration ### Description Defines the routing targets and volume levels for up to eight audio outputs per sample. ### Parameters #### Request Body - **output1Target** (string) - Optional - The first audio output target. Options: MAIN_OUTPUT, NO_OUTPUT, BUS_1-16, AUX_STEREO_OUTPUT_1-16. Default: MAIN_OUTPUT - **output2Target** (string) - Optional - The second audio output target. Default: NO_OUTPUT - **output3Target** (string) - Optional - The third audio output target. Default: NO_OUTPUT - **output4Target** (string) - Optional - The fourth audio output target. Default: NO_OUTPUT - **output5Target** (string) - Optional - The fifth audio output target. Default: NO_OUTPUT - **output6Target** (string) - Optional - The sixth audio output target. Default: NO_OUTPUT - **output7Target** (string) - Optional - The seventh audio output target. Default: NO_OUTPUT - **output8Target** (string) - Optional - The eighth audio output target. Default: NO_OUTPUT - **output1Volume** (float) - Optional - Volume for output 1 (0.0 to 1.0). Default: 1.0 - **output2Volume** (float) - Optional - Volume for output 2 (0.0 to 1.0). Default: 1.0 - **output3Volume** (float) - Optional - Volume for output 3 (0.0 to 1.0). Default: 1.0 - **output4Volume** (float) - Optional - Volume for output 4 (0.0 to 1.0). Default: 1.0 - **output5Volume** (float) - Optional - Volume for output 5 (0.0 to 1.0). Default: 1.0 - **output6Volume** (float) - Optional - Volume for output 6 (0.0 to 1.0). Default: 1.0 - **output7Volume** (float) - Optional - Volume for output 7 (0.0 to 1.0). Default: 1.0 - **output8Volume** (float) - Optional - Volume for output 8 (0.0 to 1.0). Default: 1.0 ``` -------------------------------- ### DecentSampler Instrument with Stereo Simulator UI Binding Source: https://decentsampler-developers-guide.readthedocs.io/en/stable/the-effects-element.html Demonstrates how to integrate a stereo simulator effect into a DecentSampler instrument with a user interface control. A labeled knob is used to adjust the 'width' parameter, controlling the stereo spread and dry/wet mix. ```xml ``` -------------------------------- ### Controlling Modulator Parameters via MIDI CC Source: https://decentsampler-developers-guide.readthedocs.io/en/stable/the-modulators-element.html Example of binding MIDI CC messages to control modulator parameters, specifically LFO MOD_AMOUNT. ```APIDOC ## POST /api/control/lfo/midi ### Description This endpoint demonstrates how to bind MIDI Continuous Controller (CC) messages to control modulator parameters, such as the LFO's MOD_AMOUNT. ### Method POST ### Endpoint `/api/control/lfo/midi` ### Request Body ```xml ``` ### Response #### Success Response (200) - **status** (string) - Indicates the success of the operation. #### Response Example ```json { "status": "success" } ``` ``` -------------------------------- ### Envelope Element Configuration Source: https://decentsampler-developers-guide.readthedocs.io/en/stable/_sources/the-modulators-element.md.txt An example of an element used for ADSR modulation. This can be useful for controlling group-level effects. The 'voice' scope is the default for envelopes. ```xml ```