Within a folder, if the files looked like this:
then "playlist.txt" might contain
disting playlist v1
-loop=0
-retriggerOnSampleChange=0
thumbf2.wav
-natural=41
thumbc3.wav
-switch=44
-natural=48
thumbg3.wav
-switch=52
-natural=55
thumbe4.wav
-switch=60
-natural=64
In this case we've turned off looping (the files are quite percussive thumb piano samples) and turned
off retriggerOnSampleChange, so a new sample is chosen only when a trigger is received.
Each sample file uses the “-natural” setting to let the algorithm know its 'natural pitch', that is, the
pitch of the audio in the sample as recorded. The setting uses MIDI note numbers, where 48 is C3
(see for example
). For example the file 'thumbf2.wav' is a recording of an F at 87.3Hz, so its
natural pitch is 41.
The “-switch” setting tells the algorithm when to choose one sample over another. Again, MIDI
note numbers are used. The files are arranged in order of ascending pitch, and the “-switch” setting
specifies the lowest pitch that will use that file. In the example above, thumbf2.wav will be used up
to MIDI note 43, then thumbc3.wav up to note 51, thumbg3.wav from 52-59, and finally
thumbe4.wav for notes 60 and up.
With this in mind, the pitch CV is used as follows. The incoming CV is converted to a MIDI note
number – say 49, C♯3. First the sample is looked up based on the switch settings – here 49 will
choose thumbc3.wav. This file has natural pitch of 48, so it will be pitched up 1 semitone to play at
the desired pitch.
The default for “-switch” is one up from the previous file in the list. This makes it convenient to
simply list files which are to be mapped onto neighbouring keys e.g.
disting playlist v1
-loop=0
-retriggerOnSampleChange=0
-fixedPitch=1.0
GM KICK BASS.wav
-switch=48
GM MED SNARE.wav
GM CLOSED HH.wav
GM OPEN HH .wav
GM PEDAL HH .wav
15 https://newt.phys.unsw.edu.au/jw/notes.html
Page 87