SD Card Playback
Introduction
From firmware v3.3 onwards, if the disting detects a MicroSD card in its slot at power-up, new banks of algorithms become available which use the SD card for audio sample or MIDI file playback. These new banks are described below.
Please update to v3.4 or above for the behaviour documented below.
Restrictions
Because the SD card interface shares system resources with other parts, the following apply when in SD playback mode:
- LEDs 2, 4 & b will appear (almost) permanently lit.
- The push button function of the Z knob cannot be used, and indeed pushing the knob should be avoided, as it may interfere with the SD card operation.
- Because LED 2 is unavailable, the menu item for switching banks is moved to position 3.
- LEDs 2 & b will not light.
Supported MicroSD cards
In theory any MicroSD card will work, but in practice there is a huge variety of cards on the market and we cannot possible test them all. We recommend 32GB SDHC cards.
The MicroSD card must be formatted in FAT32 format, which is the as-sold state for many cards. If not, cards can easily be reformatted to FAT32 in Windows or Mac OS X.
Supported audio files
As of now, the only supported audio file format is 16 bit WAV, mono or stereo. Any sample rate can be used, however.
Since higher sample rates impose greater bandwidth demands on the SD card streaming, we suggest you use the lowest sample rate that gives acceptable audio quality. All our testing generally uses 44.1kHz files.
Note that because the disting's outputs are DC-coupled, the 'audio' files can actually contain recorded or generated CVs, so all the sample playback modes can also be used as complex modulation or sequencing sources.
Supported MIDI files
Currently we support Format 0 files (single track). The division field of the header chunk must be in "ticks per quarter note" format.
Happily this is the format that Ableton Live spits out if you do "Export MIDI Clip".
File naming & Playlists
All files need to be in the root of the drive i.e. not inside any folder.
For audio files, we still support the legacy naming convention from firmware v3.3, which required that files be named 'sampleXX.wav' where XX is a decimal number from 00 to 31 e.g. sample01.wav, sample23.wav. Firmware v3.4 introduces the playlist file, which is the preferred method going forward.
The playlist file specifies what audio/MIDI files the algorithm will use, how they will be ordered, and what playback setings they will use. It is a simple text file, as described below.
By default, audio algorithms look for a playlist file called 'playlist.txt' and MIDI algorithms look for 'midi-playlist.txt'. However, each algorithm first looks for an algorithm-specific playlist file, the name of which is specified in the algorithm descriptions below.
The playlist files must be plain text. Note that TextEdit on macOS defaults to rich text. From the 'Format' menu choose, 'Make Plain Text'.
Audio Playlist Format
An audio playlist file might look something like this:
disting playlist v1 -loop=0 -gap=0 -fadeIn=0 -fadeOut=0 TR66_BD_aOrig_b_R1.wav -fixedPitch=0.9 TR66_Snare_aOrig_b_R1.wav sample01.wav -loop=1 -ramp=1 funky_lp.wav -loop=1 -triggers=4 586447main_JFKwechoosemoonspeech.wav -loop=1This breaks down as:
- The header: "disting playlist v1"
- Default settings (optional)
- List of audio files
- Per-file settings after each file (optional)
Settings are in the format "-" <setting name> "=" <setting value>
Settings that appear before any audio file apply globally to all the files in the playlist, unless overridden by the per-file settings.
The available settings are as follows.
Setting | Default | Description |
---|---|---|
loop | 1 | Whether the sample loops (value 1) or is a one-shot (value 0). |
fadeOut | 3 | Fade out to apply when a sample is retriggered, in milliseconds. |
fadeIn | 3 | Fade in to apply when a sample is retriggered, in milliseconds. |
gap | 3 | Gap (silence) between fade out and fade in, in milliseconds. |
retriggerOnSampleChange | 1 | See below. |
fixedPitch | 0 | Play the sample at a fixed pitch, not controlled by the pitch CV (if any). |
ramp | 0 | Switch Output B to emit a ramp CV. |
triggers | 0 | Switch Output B to emit trigger pulses. |
clocks | 4 | Set the number of clocks per loop for the Clocked Audio Playback algorithm. |
The fades are useful when retriggering samples, especially when starting them at arbitrary points within the sample, to avoid clicks. However, for maximum responsiveness when triggering, say, drum samples, set the fades and gap to zero.
The default behaviour (with
The
The maximum number of sample files per playlist is 64. Files beyond that limit are ignored.
MIDI Playlist Format
A MIDI playlist file might look something like this:
disting playlist v1 -zeroVNote=60 bach_2ptinv.mid CDE_bend.mid -bendRange=12 CDE_bend.mid -loop=0 cc1_2.mid -cc1offset=-1.5 -cc1scale=3 -cc2offset=2 -cc2scale=6This breaks down as:
- The header: "disting playlist v1"
- Default settings (optional)
- List of MIDI files
- Per-file settings after each file (optional)
Settings are in the format "-" <setting name> "=" <setting value>
Settings that appear before any MIDI file apply globally to all the files in the playlist, unless overridden by the per-file settings.
The available settings are as follows.
Setting | Default | Description |
---|---|---|
loop | 1 | Whether the MIDI file loops (value 1) or is a one-shot (value 0). |
zeroVNote | 48 | MIDI note number corresponding to zero Volts output pitch CV. |
bendRange | 2 | Pitch bend range, in semitones. |
cc1offset | 0 | Offset for CC#1, in Volts. |
cc1scale | 5 | Range for CC#1, in Volts. |
cc2offset | 0 | Offset for CC#2, in Volts. |
cc2scale | 5 | Range for CC#2, in Volts. |
The maximum number of MIDI files per playlist is 32. Files beyond that limit are ignored.
Example Files
A simple example playlist and some audio files which are known to be formatted correctly can be downloaded here.
MIDI/CV conversion
The are two primary modes of MIDI/CV conversion, which can be mixed within a MIDI file
- Note on/off messages, and pitch bend messages, are used to generate a pitch CV from output A and a gate CV from output B.
- CCs #1 & #2 are used to directly control voltages on outputs A & B respectively. The 7 bit CC value (0-127) is converted to a voltage according to the scale and offset settings (by default, 0-5V).
The algorithms
Entries marked 'Placeholder' are reserved for future development, and currently run the same algorithm as a nearby non-placeholder entry.Bank 2/a
Group 1 | Group 3 | |
---|---|---|
a | Audio Playback | MIDI File Playback (Clocked) |
c | Audio Playback with V/Oct | MIDI File Playback (Free Running) |
d | Audio Playback with Z Speed | Audio Playback with End CV |
Bank 2/b
Group 1 | Group 3 | |
---|---|---|
a | Clocked Audio Playback | Audio Recorder |
c | Placeholder | Placeholder |
d | Placeholder | Placeholder |
Bank 2/c
Group 1 | Group 3 | |
---|---|---|
a | Wavetable VCO | Placeholder |
c | Placeholder | Placeholder |
d | Placeholder | Placeholder |
Audio Playback
Y is start position CV
Z selects the sample
A is left audio output
B is right audio output
Algorithm-specific playlist filename: playlist-rm.txt
This algorithm continuously plays audio files, in a manner very much inspired by Tom Whitwell's Radio Music module.
The current audio file is selected with the Z knob/CV. It plays, forever, at its natural speed (see the algorithms below if you want to control the speed), looping when it gets to the end; or it plays until the end of the file and stops, depending on the 'loop' setting.
X is a retrigger input. A trigger pulse in excess of 1V will reset the playback position. The initial playback position is set by the Y input. The voltage range 0-8V corresponds to the length of the file so e.g. 0V input (or no input) sets the initial position to the start of the file, 4V input sets the initial position to halfway through the file, etc.
When switching between files, the playback position is maintained, modulo the length of the new file. For example, if you're 5 seconds into a 10 second file:
- if you switch to a 20 second file, the position will be 5 seconds into the new file.
- if you switch to a 2 second file, the position will be 1 second into the new file.
A & B are the left & right audio outputs respectively.
Audio Playback with V/Oct
Y is V/octave pitch CV
Z selects the sample
A is left audio output
B is right audio output
Parameter | Min | Max | Default | Description |
---|---|---|---|---|
0 | -8 | 8 | 0 | Octave shift. |
Algorithm-specific playlist filename: playlist-voct.txt
This algorithm is much the same as the preceding one, except that it forgoes the sample start position input and instead has a pitch input.
Y is the pitch input, using the 1V/octave standard. 0V corresponds to the sample playing at its natural pitch. Positive voltages speed up playback; negative voltages slow it down.
Note that there is a limit to how fast data can be streamed from the SD card. If you speed playback up by a large factor, you may get dropouts.
Audio Playback with Z Speed
Y is start position CV
Z sets the playback speed
A is left audio output
B is right audio output
Parameter | Min | Max | Default | Description |
---|---|---|---|---|
0 | 0 | 31 | 0 | Selects the sample. |
Algorithm-specific playlist filename: playlist-zspeed.txt
This algorithm is much the same as the base SD Playback algorithm, except that it forgoes voltage control of the current sample and instead offers a speed control.
Z is the linear speed control. The central position corresponds to the sample playing at its natural pitch. Positive voltages speed up playback; negative voltages slow it down. Because the scale is linear it is possible to slow it down all the way to being stopped.
The current sample is selected via the parameter i.e. by turning the S knob.
Audio Playback with End CV
Y is start position CV
Z is end position or retrigger CV
A is left audio output
B is right audio output
Parameter | Min | Max | Default | Description |
---|---|---|---|---|
0 | 0 | 31 | 0 | Selects the sample. |
Algorithm-specific playlist filename: playlist-endcv.txt
This algorithm is much the same as the base SD Playback algorithm, except that it forgoes voltage control of the current sample and instead offers control over the sample end point.
X and Z are the retrigger and end position controls.
- If Z is negative, X is the retrigger input, and Z controls the sample end point. So, if you require manual control over the end point, turn the Z knob counterclockwise to shorten the sample.
- If Z is positive, Z is the retrigger input, and X controls the sample end point. In this case X is scaled in the same way as input Y, so varying Y and feeding X the same CV plus a small offset will give you a short segment of the sample that moves around with the input. The trigger fed into Z should be a positive pulse over about 1V.
When Z is adjusted through the switching point between these two modes, LED 1 will light for a short while to let you know that the mode has been changed.
The current sample is selected via the parameter i.e. by turning the S knob.
MIDI File Playback (Clocked)
Y is retrigger CV
Z selects the MIDI file
A is pitch CV output
B is gate output
Algorithm-specific playlist filename: midi-playlist-clocked.txt
This algorithm plays MIDI files, converting the MIDI into CV outputs on A & B (as detailed above).
The current MIDI file is selected with the Z knob/CV.
The X input is a clock, which controls the speed of the MIDI file playback. A clock pulse should exceed 1V. The clocks correspond to quarter notes in the MIDI file.
Y is a retrigger input. A trigger pulse in excess of 1V will reset the file to the beginning.
MIDI File Playback (Free Running)
Y is retrigger CV
Z sets the playback speed
A is pitch CV output
B is gate output
Parameter | Min | Max | Default | Description |
---|---|---|---|---|
0 | 0 | 31 | 0 | Selects the MIDI file. |
Algorithm-specific playlist filename: midi-playlist-free.txt
This algorithm plays MIDI files, converting the MIDI into CV outputs on A & B (as detailed above).
The current MIDI file is selected via the parameter i.e. by turning the S knob.
The playback speed is set by a combination of the Z knob/CV and the X CV. With both at zero, the MIDI file plays at 120bpm. Z offers a linear speed control - positive voltages speed up playback; negative voltages slow it down. Because the scale is linear it is possible to slow it down all the way to being stopped. X offers an exponential (1V/octave) speed control - the speed doubles for every 1V above zero, and halves for every 1V below zero.
Y is a retrigger input. A trigger pulse in excess of 1V will reset the file to the beginning.
Clocked Audio Playback
Y is clock
Z selects the sample
A is left audio output
B is right audio output
Algorithm-specific playlist filename: playlist-clocked.txt
This algorithm plays audio files, the speed of which is set by incoming clock pulses.
The current audio file is selected with the Z knob/CV. It plays, forever, looping when it gets to the end; or it plays until the end of the file and stops, depending on the 'loop' setting.
X is a retrigger input. A trigger pulse in excess of 1V will reset the playback position to the start of the sample.
Y is the clock input. The speed of the sample playback is adjusted so that the whole sample fits into the time taken for a number of clocks, where that number is set (per sample) in the playlist.
When switching between files, the playback position is maintained, as for the Audio Playback algorithm.
A & B are the left & right audio outputs respectively.
Audio Recorder
Y is right audio input
Z controls recording
A is left audio output
B is right audio output
This algorithm records the incoming audio to a WAV file on the MicroSD card.
X & Y are the audio inputs. The incoming audio is echoed directly to the A & B outputs.
The Z knob/CV controls recording. When Z exceeds approximately 1V, recording starts. When it falls below 0.5V, recording stops.
The recorded WAV files are stereo, 16 bit, 46.875kHz. The files are named sequentially starting with rec0.wav (then rec1.wav, rec2.wav etc.). If there are already recordings on the card, the next available filename will be used; the old files will not be overwritten.
When recording is complete, a small text file will also be written to the card, with the same filename but with the extension '.txt'. This will detail any dropouts that occurred while recording the file (or ideally simply 'No dropouts').
Wavetable VCO
Y is wavetable input
Z is tune ±0.5 octaves
A is wavetable output
B is sub-octave square output
Parameter | Min | Max | Default | Description |
---|---|---|---|---|
0 | -31 | 31 | 0 | Chooses the wavetable. |
This algorithm is a wavetable VCO. See for example here for a brief overview of wavetable synthesis.
X is the pitch input for the VCO, with a 1V/octave response. The 0V point for the pitch input is C3 (approximately 130.81Hz).
The Z knob/CV provides a tuning control, with a range of approximately ±0.5 octaves.
The Y input controls the lookup point in the wavetable, with a range of ±5V covering the whole table.
Output A is the main output of the wavetable VCO. Output B generates a ±8V square wave one octave below output A.
Loading wavetables
Wavetables can be loaded in one of two ways: as a single WAV file containing all the waveforms concatenated, or as a folder of WAV files, one per waveform.
The wavetables are listed in the standard playlist format as above, but with the dedicated name "playlist-wavetable.txt". Each entry is either a WAV file (as in the other playlist formats), in which case the file is assumed to contain all the waveforms concatenated, or a folder name.
If a folder is specified in "playlist-wavetable.txt", the folder contains the individual WAV files that represent one waveform each. The folder must also contain a playlist (named "playlist.txt"), listing the waveform WAV files in order.
Waveform WAVs must be in 16 bit mono format. The sample rate is unimportant, since the file is assumed to contain exactly one cycle and so can pitched arbitrarily.
When using a single concatenated WAV file, the disting needs to be know how many frames in the file make up one waveform. This is specified in the playlist via the -wavelength setting (default 600). There are no settings that apply to wavetable folders, nor to the individual files inside the folders.
As an example, consider these SD card contents:
"playlist-wavetable.txt" might contain
disting playlist v1 24 RHODES G1-2.wav -wavelength=700 AKWF_hvoice
If the folder contents were:
then the folder's "playlist.txt" might contain
disting playlist v1 AKWF_hvoice_0001.wav AKWF_hvoice_0002.wav AKWF_hvoice_0003.wav AKWF_hvoice_0004.wav AKWF_hvoice_0005.wav AKWF_hvoice_0006.wav AKWF_hvoice_0007.wav AKWF_hvoice_0008.wavetc.