Author Topic: allow cdp to overwrite outfiles?  (Read 621 times)

p8rpp

  • Sr. Member
  • ****
  • Posts: 57
    • View Profile
allow cdp to overwrite outfiles?
« on: June 29, 2015, 05:41:52 AM »
Hi list,

Is there a way to force cdp to overwrite existing outfiles? Perhaps an
environment variable already exists (I am on linux)?

thank you!
P

rwdobson

  • Sr. Member
  • ****
  • Posts: 69
    • View Profile
Re: allow cdp to overwrite outfiles?
« Reply #1 on: June 29, 2015, 11:28:18 AM »
We designed all CDP programs as a matter of principle to be non-destructive (not least so a sequence of operations can always be repeated (perhaps with changed progam parameters) - the source file will not have been modified or lost and there is always a complete "audit trail" of intermediate files), and that is likely to continue (except for the multichannel toolkit programs which mostly use my minimalist "portsf' library and do allow overwriting). However, there is indeed an environment variable CDP_OVERWRITE_FILE which can be used to nominate one filename which can be overwritten.

Wishart

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: allow cdp to overwrite outfiles?
« Reply #2 on: June 30, 2015, 01:33:43 PM »
(A) Any file called "temp" can be overwritten.

(B) There is an option on the middle menu above the workspace (under the RENAME options - near the bottom of the RENAME menu), to overwrite the chosen file (lets call it OVERWRITE-CHOSEN).
A typical use would be
(1) You have a file AAA to process on the Chosen-Files list.
(2) You process the file, name the output, BBB, and return to the workspace.
(3) At this stage your pre-processed file AAA is on Chosen-Files list, and your output-file BBB is at the top of the workspace.
(4) Highlight the output file (BBB) by clicking mouse on it (but don't alter the Chosen Files list!!).
(5) Use the OVERWRITE-CHOSEN option. This renames BBB to AAA (deleting the original AAA) effectively overwriting the original.

(C) This also works with BULK PROCESS. If you process 1000 files (so you have 1000 files on the Chosen-Files list) and hence you get 1000 NEW files at the top of the workspace, you can highlight those 1000 files and select the OVERWRITE-CHOSEN option, so that all original files are overwritten with all the new ones!!

p8rpp

  • Sr. Member
  • ****
  • Posts: 57
    • View Profile
Re: allow cdp to overwrite outfiles?
« Reply #3 on: June 03, 2019, 05:43:17 AM »
However, there is indeed an environment variable CDP_OVERWRITE_FILE which can be used to nominate one filename which can be overwritten.

This does not seem to work on my Linux box:

$ CDP_OVERWRITE_FILE=lapalomaNorm.wav; cdp_modify loudness 3 lapaloma.wav lapalomaNorm.wav
ERROR: INVALID DATA
ERROR: Cannot open output file lapalomaNorm.wav

p8rpp

  • Sr. Member
  • ****
  • Posts: 57
    • View Profile
Re: allow cdp to overwrite outfiles?
« Reply #4 on: June 03, 2019, 05:45:29 AM »
(A) Any file called "temp" can be overwritten.

Is this specific to soundloom Trevor? Because on my linux box here it doesn't seem to work.

$ cdp_modify loudness 3 lapaloma.wav temp
ERROR: INVALID DATA
ERROR: Cannot open output file temp

p8rpp

  • Sr. Member
  • ****
  • Posts: 57
    • View Profile
Re: allow cdp to overwrite outfiles?
« Reply #5 on: April 01, 2020, 02:42:47 PM »
Replying to myself here:
setting CDP_OVERWRITE_FILE works fine as long as it is not separated by a semicolon from the subsequent cdp command as mistakenly done in my example above.

Feel free to move further discussion over to the mailing list at https://lists.mur.at/mailman/listinfo/cdp
« Last Edit: April 01, 2020, 04:31:14 PM by p8rpp »