Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;type process
- ;version 4
- ; Get the path to the current project file (not very reliable)
- set fullfilepath = first(AUD-DO("GetPreference: Name=/RecentFiles/file12"))
- ; Extract the directory path by cutting off the file name after the last slash:
- loop
- for i from 0 below length(fullfilepath) - 1 by 1
- if char-int(char(fullfilepath, i)) = 47 then set lastslashindex = i;
- end
- set dirpath = subseq(fullfilepath, 0, lastslashindex)
- ; Get the track name (This doesn't work)
- set trackname = get(*track*, "NAME")
- ; Generate the full path for the wav file we will be exporting with s-save
- set filepath = strcat(dirpath, "/", trackname, ".wav")
- ; Export track(s) as wav to the project directory using {TRACKNAME}.wav as the file name
- exec s-save(*track*, ny:all, filepath, format: snd-head-Wave, mode: snd-mode-pcm, bits: 16)
- return filepath
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement