Forums | Search | Archives

 All Forums
 Cool Edit
 Can someone design me a script?
 
Author  Topic 
seanbaker





Posts: 228


Post Posted - Tue Jul 10, 2001 10:24 pm 

I need a script that will take the last 0.050 seconds of audio from a batch of wav files and silence that 0.050 seconds. I have this ripping problem that leaves a click in my wav files (even when I uncheck that non-audio box)that have to be removed. Silencing that portion takes the least amount of re-save time. If anyone can show me how to make a script out of this I would be oh so grateful. Would this have anything to do with that "relative to cursor" function in the batch scripts?

_________________
“You were born an original. Don’t die a copy.”

www.seanbaker.com
Jingles - Retropolis Music

www.foursexes.com
Space Age Pop Band

www.leisurekings.com
Far-out Polyester Lounge Act
Go back to top
Detlev Dalitz





Posts: 141


Post Posted - Wed Jul 11, 2001 2:21 am 

Hi seanbaker, here's someone speaking.
Try this script:

Title: Cut50msAtEnd
Description: shrink waveform, cut 50 ms at end
Mode: 2

Selected: none at 0
cmd: Channel Both

cmd: Reverse

Selected: none at 0
cmd: Channel Both

Selected: none at 0
cmd: Generate Silence
1: 0.05

cmd: Copy

cmd: Undo

cmd: Paste Special
1: 1
2: 1
3: 30
4: 1
5: 0
6: 0
7:
8: 2
9: 0

cmd: Delete

cmd: Reverse

End:

If you don't want to cut the silence then delete the last "cmd: Delete" statement in script above.
Batch Run the script against the ripped files.
Detlev

DD.20010711.1116
Go back to top
seanbaker





Posts: 228


Post Posted - Wed Jul 11, 2001 3:47 am 

It seems to work except that in the mix/paste box, the crossfade checkbox doesn't seem to be scriptable. For this script to work properly, it needs to be unchecked. It seems to stay on whatever the last setting used was. Any ideas? Syntrillium, is this a bug?

Edited by - seanbaker on 07/11/2001 04:17:25 AM

_________________
“You were born an original. Don’t die a copy.”

www.seanbaker.com
Jingles - Retropolis Music

www.foursexes.com
Space Age Pop Band

www.leisurekings.com
Far-out Polyester Lounge Act
Go back to top
Syntrillium Support


Location: USA


Posts: 165


Post Posted - Wed Jul 11, 2001 11:09 am 

You should not do any cut or paste operations in any script. Script is designed to help you modify the whole file. You can use it to normalize the whole file, not just a section of it. This is because when you select an area during script, it is actually taking into consideration the % of the file you selected.

So you want to delete the last 0.05 seconds of the file, you record a script to do this. But script recorded that you deleted the last 2% (or what ever) of the file. If your files are different in size, then CEP will delete different amount and it won't always be 0.05 seconds of the file.

Therefore, we recommend you do not hi-light a selection unless you hi-light 100% of the file during the script recording process.

Most features in CEP are scriptable, but not all of them. We currently have no list of what you can script and what you can't. The crossfade checkbox may be on of the features that is not scriptable.

--Syntrillium Support

_________________

Go back to top
Detlev Dalitz





Posts: 141


Post Posted - Wed Jul 11, 2001 1:48 pm 

Quote:
You should not do any cut or paste operations in any script.
That suggestion sounds not good. Why not use scripting?
Quote:
... into consideration the % of the file you selected.
Because all scripting work belongs to relative percentage amounts, cep scripting is only a crippled vehicle.
Seanbakers request to delete a fixed area of 2104samples/44100Hz resp. 50ms at the same position in hundreds of his files can not be done with standards cep scripting behaviour, really bad.
So I did the trick of constructing a 'fixed length' waveform and used it as a measurement to cut the dirty 50ms. My short script works really good enough for that purpose - with all type of files - with any sample rate.
Quote:
The crossfade checkbox may be on of the features that is not scriptable.
That's it.
Go back to top
seanbaker





Posts: 228


Post Posted - Wed Jul 11, 2001 3:44 pm 

I agree. It does work very well. If anyone wants to use this, you have to make a note to yourself to make sure the crossfade option in mix/paste was unchecked the last time used so that it will default to that. It seems like THAT should be scriptable. What Syntrillium said makes no sense, because your script defines an exact time by creating a 50ms piece of slience. That should remain constant no matter what the total length of the waveform is. In your script, after the 50ms of silence is created, it remains highlighted, so when it is copied, it will always be the same regardless of how long the total waveform is. Am I understanding this correctly? I've tried it on a number of waveform lengths and it always works perfectly. Thanks for the script. In reality the only fault with it is that CEP doesn't allow you to script the crossfade checkbox option, which seems to me a no-brainer. Maybe they'll fix this in the future. I've noticed too, that you cannot script the "paste from file" option either. Anyway, thanks for the script. It saves me a whole lot of time. By the way, I did edit the script for only 10ms. I noticed that most of my data click are around 7ms.

_________________
“You were born an original. Don’t die a copy.”

www.seanbaker.com
Jingles - Retropolis Music

www.foursexes.com
Space Age Pop Band

www.leisurekings.com
Far-out Polyester Lounge Act
Go back to top
jonrose


Location: USA


Posts: 2901


Post Posted - Wed Jul 11, 2001 3:56 pm 

This script also works perfectly here on my system. Thanks for the heads-up, DD! And thanks to Sean for asking. I remember considering this one night, but only because I wondered what I might do when confronted with the same need. Since this has never come up, I promptly forgot about the whole thing until Sean asked.

I would concur that the checkboxes should also be scriptable. And Synt...you didn't REALLY think that us hacks out here would be of any mind to follow the rules, did you?

;-)

All the best... -Jon

_________________
Go back to top
younglove





Posts: 314


Post Posted - Wed Jul 11, 2001 8:53 pm 

I haven't tried it, but from inspection, it
looks like the above script won't work if the
current clipboard is set to anything other than clipboard 1. If so, to fix this, remove
parameter 9 from the Paste Special command.
Go back to top
Detlev Dalitz





Posts: 141


Post Posted - Thu Jul 12, 2001 12:51 am 

Quote:
I haven't tried it, but from inspection, itlooks like the above script won't work if the current clipboard is set to anything other than clipboard 1. If so, to fix this, remove parameter 9 from the Paste Special command.


Hi Sean and Jon, thank you for your words of comfort. Hi David, fab master of fab scripts ;-), I've used all the clipboard "1" to "5" and "Windows clipboard" and "From file" and all works good.

Once the clipboard is set, the mix paste dialog automatically uses the last setting. Selecting "From File" has priority against a previously filled clipboard.
Using external files will give you a world of tricks for working at precise sample positions in a waveform.
Detlev

It seems to me that building up a scripting language for cep has stopped about version 1.0 or 1.1? So some scripting functions like "mix paste crossfade" or something in the noise reduction area were not updated properly.

I would like to see if there will come up a powerful scripting language. That would push up cep into powerful regions of industrial mass post production, I think so.
Maybe cep.TWO will bring us better times?
Detlev

DD.20010712.0930
Go back to top
seanbaker





Posts: 228


Post Posted - Fri Jul 13, 2001 11:44 pm 

Quote:
cmd: Copy

cmd: Undo


I was wondering if this portion of the script could be replaced with just one cmd: cut? Any thoughts on this, folks? Of course it doesn't matter anyway. I've been using this all weekend on many files. Until I get a new CD Writer that eliminates this problem, I will be exercising this script for a long time. So far, no problems with it even with the reduction to 10ms instead of 50ms.

You really should get this added to the CEP User Preset Exchange
http://home.earthlink.net/~dccowan/cepuser/cepuser.htm

_________________
“You were born an original. Don’t die a copy.”

www.seanbaker.com
Jingles - Retropolis Music

www.foursexes.com
Space Age Pop Band

www.leisurekings.com
Far-out Polyester Lounge Act
Go back to top
seanbaker





Posts: 228


Post Posted - Fri Jul 13, 2001 11:46 pm 

Here's a tip. I have taken the part out of the script which deletes the silenced audio. Instead I leave it in there. The reason is it takes less time to resave. When you delete even a small portion of audio and then try to resave it, it has to flush the whole file first. On my system, that means an extra 15-20 seconds. When I'm running this on 25 files the time adds up. Besides I don't notice the extra 10ms of silence left on, would you?

_________________
“You were born an original. Don’t die a copy.”

www.seanbaker.com
Jingles - Retropolis Music

www.foursexes.com
Space Age Pop Band

www.leisurekings.com
Far-out Polyester Lounge Act
Go back to top
Detlev Dalitz





Posts: 141


Post Posted - Mon Jul 16, 2001 5:32 am 

well, seanbaker,
at first I've tried to code a "cut", but there comes up an issue I don't remember yet.
So I've gone the save way with "copy undo".

Regarding your note of flushing the entire file I've un-checked the "Options / Settings / System / Force complete flush before saving". So saving of files works faster if only small portions of the file has been altered.

There is another option I like to have unchecked for that kind of sample precise operations:
"Options / Settings / Data / Smooth Delete and Cut boundaries"

By the way there comes up an idea:
I would like to have a "settings dump" feature, which saves the overall settings of all checkboxes, radio buttons and so on to diskfile. So if we plan to exchange some presets or other tricky stuff, I would say, hi, cepfan, load my base dump and play the script, afterwards reload your basedump.

Does cool.ini already contains those complete information?

DD.20010716.1428
Go back to top
seanbaker





Posts: 228


Post Posted - Mon Jul 16, 2001 12:49 pm 

Quote:
Regarding your note of flushing the entire file I've un-checked the "Options / Settings / System / Force complete flush before saving". So saving of files works faster if only small portions of the file has been altered.


I guess everyone's system handles this differently. I, too, have this unchecked, yet even if I am only deleting 10ms from a file, it flushes before saving. However, if I just silence it out (but leave the waveform length the same) it does not try to flush before saving.

Speaking of flushing, any tips on a clogged toilet. Smile

_________________
“You were born an original. Don’t die a copy.”

www.seanbaker.com
Jingles - Retropolis Music

www.foursexes.com
Space Age Pop Band

www.leisurekings.com
Far-out Polyester Lounge Act
Go back to top
   Topic 
Page:


Powered by phpBB 2.0.11 © 2001, 2002 phpBB Group