PDA

View Full Version : dMCScripting and DSP effects



touff-ray
04-01-2007, 09:33 AM
Hello,
I am wondering how I can use DSP effects in a C*/.NET program. Should I add some options to the CompressionCLI string needed by the Convert function or is there another way to do the trick ?

Touff-Ray

KJim
04-02-2007, 08:04 AM
I seem to remember seeing this in another thread a while back- and I think it isn't possible, which is a real shame. The good thing about r11 was that when you started a scripted conversion, the dialogue gave you the option to add DSP effects at that point manually... is there a way round this, spoon?

KJim
04-02-2007, 08:29 AM
Having said that, the scripting page of the support section says:

"DSP effects can also be activated, pass them in CompressionCLI, see command line documentation."

Where is this info? I can't seem to find it in any of the docs...

KJim
04-02-2007, 12:16 PM
Well, I tried my best:



Set dMC = CreateObject("dMCScripting.Converter")
Dim CompressionCLI
CompressionCLI = "-b 64 -channels=""joint stereo"" -dspeffect1=""Grabber=-lengthms={qt}60000{qt} -position={qt}30000{qt}"""
CompressionCLI = dMC.ShowSettings("mp3 (Lame)", CompressionCLI)
Set WshShell = CreateObject("WScript.Shell")

Call dMC.Convert("C:\Source\sourcefile.flac", "C:\Destination\testdsp.mp3", "mp3 (Lame)", CompressionCLI, "C:\encodingerrors.txt")
Call WshShell.Popup("Done.")


...doesn't work. It encodes, but no dsp inclusion.

Ever get the feeling everyone else has been destroyed by a tidal wave and you're the only one left chatting to yourself about scripting dmc in spoon's forum? No? Hello? Anybody? :cry:

Spoon
04-02-2007, 12:24 PM
Your code is almost right, just that by calling dMC.ShowSettings after adding the DSP commandline is removing the DSP commandline.

KJim
04-02-2007, 12:31 PM
Wicked! That works a treat now:



Set dMC = CreateObject("dMCScripting.Converter")
Dim CompressionCLI
CompressionCLI = "-b 64 -channels=""joint stereo"" -dspeffect1=""Grabber=-lengthms={qt}60000{qt} -position={qt}30000{qt}"""
Set WshShell = CreateObject("WScript.Shell")

Call dMC.Convert("C:\Source\sourcefile.flac", "C:\Destination\testdsp.mp3", "mp3 (Lame)", CompressionCLI, "C:\encodingerrors.txt")
Call WshShell.Popup("Done.")


Cheers Spoon!

touff-ray
04-06-2007, 12:48 PM
Thank you KJim and Spoon ! I am going to try this :komisch12

touff-ray
04-11-2007, 11:51 AM
It works like a charm :)
But now I have two other questions (and I don't want to open a new thread):
- Is there a way to control how dbpoweramp uses multi-core processors ?
- Can we retrieve the status of a conversion (e.g. "50% done", or "Finished") ? And if so, how ?

Touff-Ray

LtData
04-11-2007, 02:09 PM
What do you mean how dMc uses a multi-core processor? Currently, dMC encodes one file per core. I believe the only way to change this is to totally disable multi-core support and only use one core. This can be done only through the Multi-Encoder or the r2 version of the CLI encoder.

Spoon
04-12-2007, 12:56 PM
Through scripting it will take any free cpu time, if you have 2 processors then have 2 scripting objects.

No way of getting the % compelete through scripting.

touff-ray
04-16-2007, 10:45 AM
Thank you both for your answers :)

touff-ray
04-24-2007, 01:25 PM
Hi again everyone,
I have other (noob) questions about dMCScripting :
- Is there a way to know that a conversion is finished ?
- Is there another way than checking the log created by the Convert method to retrieve potential errors during conversions ?

Touff-Ray

Spoon
04-24-2007, 03:28 PM
When the conversion finishes your call to .convert returns.