Unfortunately I saw your response too late, but I also found the S-SAVE function you mentioned in your last response:
s-save(expression, [maxlen, filename, progress], format: format, mode: mode, bits: bits, swap: flag, play: play) [SAL]
(s-save expression [maxlen filename progress] :format format :mode mode :bits bits :swap flag :play play) [LISP]
Evaluates the expression, which should result in a sound or an array of sounds, and writes the result to the given filename. (If omitted, *default-sound-file* is used instead.) A FLONUM is returned giving the maximum absolute value of all samples written. (This is useful for normalizing sounds and detecting sample overflow.) If play is not NIL, the sound will be output through the computer's audio output system. (play: [SAL] or :play [LISP] is not implemented on all systems; if it is implemented, and filename is NIL, then this will play the file without also writing a file.) The latency (length of audio buffering) used to play the sound is 0.3s by default, but see snd-set-latency. If a multichannel sound (array) is written, the channels are up-sampled to the highest rate in any channel so that all channels have the same sample rate. The maximum number of samples written per channel is optionally given by maxlen, which allows writing the initial part of a very long or infinite sound. Progress is indicated by printing the sample count after writing each 10 seconds of frames. If progress is specified and greater than 10,000, progress is printed at this specified frame count increment. A header is written according to format, samples are encoded according to mode, using bits bits/sample, and bytes are swapped if flag is not NIL. Defaults for these are *default-sf-format*, *default-sf-mode*, and *default-sf-bits*. The default for flag is NIL. The bits parameter may be 8, 16, or 32. The values for the format and mode options are described below:
Format
snd-head-none
The format is unknown and should be determined by reading the file.
snd-head-raw
A raw format file has no header.
snd-head-AIFF
AIFF format header.
snd-head-IRCAM
IRCAM format header.
snd-head-NeXT
1024-byte NeXT/SUN format header followed by IRCAM header ala CMIX. Note that the NeXT/SUN format has a header-length field, so it really is legal to have a large header, even though the normal minimal header is only 24 bytes. The additional space leaves room for maximum amplitudes, which can be used for normalizing floating-point soundfiles, and for other data. Nyquist follows the CMIX convention of placing an IRCAM format header immediately after the NeXT-style header.
snd-head-Wave
Microsoft Wave format header.
snd-head-WaveX
Microsoft Wave with WAVEFORMATEX format header.
snd-head-flac
FLAC lossless compressed audio.
snd-head-ogg
OGG-VORBIS compressed audio.
snd-head-*
See sndfnint.lsp in the nyquist/runtime directory for more formats. The current list includes paf, svx, nist, voc, w64, mat4, mat5, pvf, xi, htk, sds, avr, sd2, and caf.
Mode
snd-mode-adpcm
ADPCM mode (not supported).
snd-mode-pcm
signed binary PCM mode.
snd-mode-ulaw
8-bit U-Law mode.
snd-mode-alaw
8-bit A-Law mode (not supported).
snd-mode-float
32-bit floating point mode.
snd-mode-upcm
unsigned binary PCM mode.
snd-mode-*
See sndfnint.lsp in the nyquist/runtime for more modes. The current list includes double, gsm610, dwvw, dpcm, and msadpcm.
The defaults for format, mode, and bits are as follows:
NeXT and Sun machines:
snd-head-NeXT, snd-mode-pcm, 16
SGI and Macintosh machines:
snd-head-AIFF, snd-mode-pcm, 16
So my understanding is I don’t necessarily have to use the Lisp syntax, I can use the SAL syntax as well. It seems way more familiar to me. Using that syntax I would end up with something like this:
;nyquist plug-in
;version 4
;type process
;name "Multi Export"
;debugbutton disabled
;author "randomuser111"
;release 1.0.0
;copyright "Released under terms of the GNU General Public License version 2 or later."
if get(quote(*TRACK*), quote(TYPE)) = "wave" then
s-save(TRACK, 999999999999, "./wav/" + get(quote(*TRACK*), quote(NAME)) + ".wav", snd-head-Wave, snd-mode-float, 32, NIL, NIL)
Would that work?
Or maybe something like this instead?
AUD-DO("Export2: Filename=\"./wav/" + get(quote(*TRACK*), quote(NAME)) + ".wav\" NumChannels=\"" + get(quote(*TRACK*), quote(CHANNELS)) + "\"")
I’m not sure if the “recent files” method would be reliable. My workflow is to create a copy of MyTemplate.AUP3 and then open that. So that project was never actually saved, it was just copied and renamed.