SAMPLEPLAY and SAMPLEPLAYASC (2011) for realtime Csound5 Sample players for up to 25 mono/stereo samples and one background loop, in a variety of uncompressed formats including WAV and AIFF; also Ogg/Vorbis (with Csound 5.10 or later) but not MP3. All computer platforms; SamplePlay requires a MIDI controller with up to 25 keys, buttons or pads (optionally velocity sensitive). Optionally, 1 additional key/button/pad and/or 1-3 MIDI knobs/sliders. SamplePlayASC requires only ASCII keyboard (no MIDI) and must be performed from the command line, except for the standalone Lettuce .exe (LSamplePlayASC). Both Lettuce versions include a GUI to be run from the same directory as the (up to) 25 samples and loop (no Csound installation required; necessary Csound 5.10-equivalent files included). Lettuce option is Windows only. Art Hunkins abhunkin@uncg.edu http://www.arthunkins.com includes: OISEAUX ORDINAIRES: Soundscape for SamplePlay (2011) In honor of Olivier Messiaen and his bird-song compositions, especially Oiseaux Exotiques (for piano and small orchestra) A set of 25 stereo bird samples and a background loop captured in the same environment. The samples, labeled soundin.1 through soundin.25, and the loop, soundin.0, must be placed in the directory from which SamplePlay(ASC) is run. These files were created with a high-quality handheld digital recorder (at 44100Hz sample rate stereo, uncompressed WAV) with built-in mike. The recordings were made on a series of early summer mornings from the front stoop of the composers's home in Burlington, North Caroina (USA). The background loop (soundin.0) typically functions to mask extraneous sounds (in this case, traffic noises) present in the samples. (The low-cut filter option can also help reduce such byproducts, as well as rumble, hum, etc.) All samples are bird calls: soundin.1 through 12 (or 13) are closely related, as are soundin.14 through 18 (or 19). Users are highly encouraged to create their own soundfiles - particularly nature soundscapes. Both mono and/or stereo files are acceptable. Any sample rate (and mixture of rates) will work; the same for file formats (but see above re: mp3 and ogg vorbis). For a background loop, special attention should be paid to the loop point. Best results will be obtained when all samples and loop are recorded in the same environment, with the same equipment and at the same level. Sample and loop level are adjustable in SamplePlay, but sample levels are not *individually* variable. All versions of SamplePlay run on any Csound installation, v5.02 or higher (except for the ogg vorbis limitation mentioned above). For Windows, the Lettuce executables (see Rory Walsh's Lettuce Csound utility: http://www.ear.ie/Lettuce.htm), require only the small set of Csound files included here. Place the executables, Csound files and your selected soundfiles (named soundin.0 through 25, with the loop soundin.0) in a single directory, and run from there. The Lettuce versions offer a very nice GUI, as well as a helpful list of instructions. Though SamplePlay and SamplePlayASC are cross-platform, their (see below) are initially set for Windows and Mac. For Linux, edit the CsOptions line (toward the beginning of the file - it starts with "-odac") in a text editor as follows: delete the semicolon at the start of the Linux line, and add one at the start of the Windows/Mac line. (Then resave the file.) SamplePlay is highly preferable to SamplePlayASC. The latter should only be considered when an appropriate MIDI device is not available. Though functionally equivalent to the MIDI version, the ASCII edition is not as flexible or intuitive, and is a challenge to perform. SAMPLEPLAY - the MIDI option The number of MIDI keys/buttons/pads required depends primarily on how many samples (up to 25) you wish to trigger; one is required per sample. (The first key/button/pad triggers soundin.1; the second, soundin.2, and so on.) Any background loop requires either another (separate) key/button/pad or MIDI slider/knob. Additional optional sliders/knobs can control sample pitch, pan position and amplitude (the three parameters can also be randomly controlled or via MIDI note velocity). When controlled via slider/knob, the new setting takes effect with the following event. RUNNING FROM THE COMMAND LINE: Before running SamplePlay (always run from the directory where both SamplePlay and your soundfiles are located), view the beginning of SamplePlay in a text editor. Of interest are the lines below - the ones beginning #define. Since you lack a GUI, these represent options you must manually select, and a way of indicating the settings for your MIDI controls. These variables (in CAPS) are all given suggested default values. Changing values is simply a question of replacing the number between the two #'s; just be sure not to leave any blank spaces. CHAN (channel #) - default=1. BACKGND (background loop) - 0=no loop, 1=MIDI note stop/start, 2=MIDI controller fades on then off - default=2. BGMAX (maximum background level) - valid = 0 - 1 or more - default=1. STCTRL (start/stop controller) - MIDI controller # to start/stop background loop - default=controller #7. STNOTE (start/stop note) - MIDI note # to start/stop background loop - default=84. STFADE (start/stop fade time) - Background loop start/stop fade time (in seconds, for STNOTE) - default=5 seconds. SAMPS (number of active samples) - # of single-shot samples in use (0-25) - default=25. SAMPAMP (sample amplitude control mode) - 0 = no control (SAMPMAX rules); 1 = random amplitude; 2 = MIDI note velocity control; 3 = MIDI slider/knob control - default=2. SAMPMAX (maximum sample level) - valid = 0 - 1 or more - default=1 (same level for all samples). SMPCTRL (sample level controller) - MIDI controller # for SAMPAMP (amplitude of single-shot samples) - default=#21. MIDI1 (1st MIDI note# for 1-25 consecutive sample triggers) - valid = 0 - 127 (103) - default=60 (notes may be played with keys, buttons or pads). REPLACE (sample trigger mode) - 0 = overlap same sample (repeated sample creates possibly overlapping multiples); 1 = replace sample (repeated sample may interrupt former instance - no overlapping multiples); 2 = sample sustains only as long as key/button/pad is held down - default=1. SMPFREQ (sample pitch change mode) - 0 = no pitch change; 1 = random change; 2 = MIDI note velocity control; 3 = MIDI controller - default=0. FRQCTRL (MIDI controller # for pitch change) - default=#22. PANPOS (pan position control mode) - 0 = no change of position; 1 = random change; 2 = MIDI note velocity control; 3 = MIDI controller - default=1. PANCTRL (MIDI controller # for pan position) - default=#23. FILTER (output filter?) - 0 = no filtering; 1 = low-cut filter on output - default=1. CUTOFF (low-cut filter frequency; recommended range - 50 - 2000Hz) - default=400Hz. SRATE (sample rate; recommended choices: 22050, 32000, 44100, 48000Hz) - default=44100Hz. (Note: in Lettuce versions, this rate can be modified under CsOptions [in the Menu Bar].) You also may need to edit several items in the line (just above the list of options): values for -odac (audio output device) and -M (MIDI device #). If the default values abort the run, View the console Output; it will indicate the active devices on your system. Pick the appropriate numbers, insert them and rerun. LETTUCE GUI'S (Windows only) The Lettuce GUI greatly facilitates the specification of performance presets for both of these utilities; no text editing is required. On-screen variables are the same as those listed for the command line. Users of the Lettuce GUI's may also need to set certain . Access to these options is through the menu bar (where Sample Rate too can be modified). Console Output is likewise viewable via this bar. PERFORMANCE SUGGESTIONS: In preparing for performance, it is important that any MIDI knobs/sliders be set to zero *prior to Csound start*; after start, reset controllers that need to be at other initial positions (move pan position and pitch controls to .5 - this setting will approximate the original recordings; you are, of course, free to experiment with alternatives.) Then begin the performance. Maximum performance duration for both utilities is 60 minutes. This value can be increased, if necessary, by subsituting a larger number of seconds for the "3600" that appears twice in the last 7 of either program. SAMPLEPLAYASC - the ASCII keyboard option (non-MIDI) As mentioned above, SamplePlayASC is functionally identical to SamplePlay. One advantage (beside the fact that it doesn't require a MIDI controller) is that there are fewer required presets, and no slider/knob adjustments that must be made prior to performance. On the other hand, lacking knobs/sliders and MIDI key velocity, less control and sensitivity is possible with respect to the various parameters. Also, remembering which ASCII keys do what, can be an exercize in mental gymnastics. In a nutshell, only consider this version if a suitable MIDI controller is unavailable. The ASCII keys have the following functions: ENTER starts/stops the background loop; numeric keys 1 through 0 (10) specify sample amplitude (in equal increments from 1 through 10/max) and Z through / determine pan position, left to right (both rows of keys take effect with the next event). Q through ] trigger samples 1 through 12, and A through ' samples 13 - 23. The - (minus) key triggers sample 24, and = triggers 25. The default/initial pan position is .5 (unmodified sample position) and sample amplitude is 10 (full on). (If the numeric and bottom alpha key rows are not used in performance, these values will persist.) ASCII keys other than those described above, do nothing. Note also that in its Lettuce incarnation, the ASCII version cannot be performed while the View Output window is open and in focus. Because of the way in which ASCII key presses are handled, SamplePlayASC cannot be realized within various Csound "frontends" either. Finally, in SamplePlayASC, it is important not to hold down ASCII keys during performance. (Doing so triggers the autorepeat function of the keys, which is *not* what you want.) As a result, the "play sample only as long as key is pressed" option is not available in SamplePlayASC. (Samples are always played for their full duration, unless the "replace" function is enabled.)