Author Topic: Applying multiple fx  (Read 2027 times)

ceiling

  • Newbie
  • *
  • Posts: 3
    • View Profile
Applying multiple fx
« on: August 05, 2018, 04:45:17 PM »
Using command line here

Is there anyway of applying every effect to a sample in one go?

So basically you would have 1 file per effect printed.

Something like this:

Snare Sample (brassage)
Snare Sample (reverb)
Snare Sample (blur)
Etc.

Hope this makes sense

Thanks


Xenakios

  • Sr. Member
  • ****
  • Posts: 83
    • View Profile
Re: Applying multiple fx
« Reply #1 on: August 07, 2018, 12:12:28 PM »
You would need to write a script that deletes the intermediate files.

Robert Fraser

  • Sr. Member
  • ****
  • Posts: 88
    • View Profile
Re: Applying multiple fx
« Reply #2 on: August 12, 2018, 07:37:54 PM »
In Windows CMD, you would write a batch script, the core of which is a sequence of CDP statements, something like this:

modify brassage 6 %1.wav %1(brassage).wav 0.7 5.0 100 0 1 0.5 5 5
reverb  %1.wav %1(reverb).wav 0.5 0.5 1 0 0 5
pvoc anal 1 %1.wav %1.ana -c1024 -o3
blur blur %1.ana %1(blur).ana 20
pvoc synth %1(blur).ana %1(blur).wav

%1 is a parameter you're passing to the script, in this case the name of your source file (e.g. "myfile.wav"), which is the common infile for each command line. You save the script to a text file and then change its extension to .bat (e.g. "mybatch.bat"). You then call the bat within CMD by typing:

mybatch myfile

...where myfile substitutes for %1 in the script. You don't need to call it as mybatch.bat, though you could. You mustn't put myfile.wav because that text would substitute for %1 and would become (in the first line):
 modify brassage 6 myfile.wav(brassage).wav [etc] which wouldn't work.

For blur, the infile is first converted to .ana using pvoc anal and afterwards back to sound using pvoc synth. Of course we could run a number of spectral commands with %1.ana. We can also delete the .ana files when we're done with them; after the pvoc synth line add:
 erase %1.ana
 erase %1(blur).ana

We also need to tell CMD where to find CDP programs and our files.  Unless you copy CMD.exe to your project folder, you need to make that folder the current one:
  cd \SNDS\MYPROJ
(or whatever the folder's called) - if it's in the same drive as CMD; if a different drive, put the drive name first, e.g.:
  E:
  cd \SNDS\MYPROJ
 
(for the folder E:\SNDS\MYPROJ)

These statements can be typed at the console before running the script.

To point the script to CDP programs, you need a PATH statement, e.g.:
 PATH C:\CDPR7\cdprogs
This can also be typed at the console, or put in the script before any CDP command lines.

The script itself is probably best put in the project folder, beside its infile. If not, the script needs the full path to the infile, e.g. call it as mybatch E:\SNDS\MYPROJ\myfile so that %1 picks up the whole path\filename. (My own preference is to use a single processing folder and copy all sources to that using copysfx, but that's another story.)

Finally, note that CMD takes only parameters %0 to %9, so there's very limited scope for passing values to the script. This is a pain, because CDP typically uses many parameters. The answer to this and other scripting issues would be to run CDP from something like PYTHON, but that solution will need some careful planning first.

ceiling

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Applying multiple fx
« Reply #3 on: August 23, 2018, 05:34:52 PM »
Hi

Thanks for your reply!

I'm actually using mac's command line. Would the process be similar? it still uses bash

Currently re-installing everything on my laptop right now, think i messed up a few things with my command line as the ls command and a few others have stopped working. Decided to just wipe it and take it back to factory settings.

Once i've done that ill get round to giving this a try. I have a pretty basic knowledge of the command line etc. so it's prob gonna take a while to wrap my head around this but i'll get there in the end.

thanks for the in depth reply, greatly appreciated and can't wait to try and give it a go.

I have a few more questions but ill wait til i've tried to implement the code you've given me.


Robert Fraser

  • Sr. Member
  • ****
  • Posts: 88
    • View Profile
Re: Applying multiple fx
« Reply #4 on: August 26, 2018, 02:54:14 PM »
Yes bash is almost identical to CMD. I don't have a Mac, but do have winbash if you're stuck. Try reading Richard Dobson's guide to Terminal, particularly his advice to change directory (cd) to where some sounds are; you'll see his CDP command lines are identical to those for Windows. As I'm sure you know, you no longer need .aifs for Mac, but CDP can handle them anyway, ir you can use COPYSFX to convert them to WAV.  The Terminal document is here:
http://www.ensemble-software.net/CDPDocs/htmltuts/terminal/UsingTerminal.htm