Right, I know that this topic has been discussed before, but I really want to make a proper effort to get the attention of Envato and get them to sort this out.
I am loving AJ at the moment, makes me good money, and I love the community that they have created.
HOWEVER
My biggest frustration is the watermark!!! I am non exclusive, so upload my tracks to other sites as well, and not one of them ask the authors to manually apply the water track and create the preview file / zipped file, e.t.c. They all have automatic ways to do it.
So I am proposing that Audio Jungle Implement Automatic watermarking on tracks and automatic zipped files
i.e. all we have to do is upload one MP3 file, and some clever computer code handles the rest. I KNOW that this can be done as many other sites have software and code that do it automatically. I also have been passed some code that will do the watermark automatically, but I do not understand enough to use it yet, sorry its so long, if someone out there can tell me how this works that would be great!!!
I know that this can be done, and would make so much more sense for everyone involved!
using System;
using System.IO;
using System.Windows.Forms;
using SoundForge;
public class EntryPoint {
public string Begin(IScriptableApp app) {
string strWildcard = GETARG(âWildâ,"*.wav");
string strOutputType = GETARG(âFiletypeâ,".wav");
// pick a folder to process
string strSourceDir = SfHelpers.ChooseDirectory(âChoose a folder to process all files from.â, @âc:\Audiobankâ);
if (null == strSourceDir)
return âno source directory - quittingâ;
// pick an output folder
string strOutDir = SfHelpers.ChooseDirectory(âChoose a folder for the output files.â, @âc:\Audiobank\watermarkâ);
if (null == strOutDir)
return âno destination directory - quittingâ;
// choose an output format
ISfRenderer rend = app.FindRenderer(null, strOutputType);
if (null == rend)
return âno renderer - quittingâ;
ISfGenericPreset tpl = rend.ChooseTemplate(IntPtr.Zero, 0);
if (null == tpl)
return âno render template - quittingâ;
// now process them until we are done or the user hits cancel
//
foreach (string strFilename in Directory.GetFiles(strSourceDir, strWildcard))
{
// make an output filename using the input filename and the output folder name with a new extension based on the render format.
string strBase = Path.GetFileNameWithoutExtension(strFilename);
string strOutfile = Path.Combine(strOutDir, strBase + â.â + rend.Extension);
SfStatus result = ProcessAFile(app, strFilename, strOutfile, tpl);
DPF("{0} : {1}", strFilename, result.ToString());
if (result == SfStatus.Cancel)
break;
}
return null; // return null for success, an error string otherwise
}
public SfStatus ProcessAFile(IScriptableApp app, string strFilename, string strOutfile, ISfGenericPreset tpl)
{
SfStatus result = SfStatus.Success;
// open the file
ISfFileHost file = app.OpenFile(strFilename, false, true);
/* add code here to process the file */
ISfFileHost filePop = app.OpenFile(@âc:\Audiobank\watermark.wavâ, true, true);
Int64 ccLength = file.Length;
Int64 ccMix = filePop.Length;
Int64 ccStep = file.SecondsToPosition(21.0);
Int64 ccStart = 0;
if (filePop.SampleRate != file.SampleRate)
{
DPF(ârate doesnt match - quittingâ);
}
ISfFileHost filePops = app.NewFile(file.DataFormat, false);
if (ccStart > 0)
filePops.InsertSilence(0, ccStart);
app.DoEvents(app.Win32Window.Handle);
SfAudioSelection aselPop = new SfAudioSelection(filePop);
for (Int64 ccPos = ccStart; ccPos + ccMix < ccLength; ccPos += ccStep)
{
filePops.OverwriteAudio(ccPos, 0, filePop, aselPop);
if (ccMix < ccStep)
{
filePops.InsertSilence(ccPos + ccMix, ccStep - ccMix);
}
}
filePop.Close(CloseOptions.DiscardChanges);
file.MixAudio(new SfAudioSelection(file), 1.0, 1.0, filePops, new SfAudioSelection(filePops));
// wait for processing to finish
result = file.WaitForDoneOrCancel();
if (result != SfStatus.Success)
return result;
// save the file under the new name and given format
file.RenderAs(strOutfile, null, tpl, null, RenderOptions.RenderOnly);
result = file.WaitForDoneOrCancel();
file.Close(CloseOptions.DiscardChanges);
return result;
}
public void FromSoundForge(IScriptableApp app)
{
ForgeApp = app; //execution begins here
app.SetStatusText(String.Format(âScript â{0}â is running.â, Script.Name));
string msg = Begin(app);
app.SetStatusText(msg != null ? msg : String.Format(âScript â{0}â is done.â, Script.Name));
}
public static IScriptableApp ForgeApp = null;
public static void DPF(string sz) { ForgeApp.OutputText(sz); }
public static void DPF(string fmt, params object[] args) { ForgeApp.OutputText(String.Format(fmt, args)); }
public static string GETARG(string key, string str) { string val = Script.Args.ValueOf(key); if (val == null) val = str; return val; }
} //EntryPoint