Steinberg WAVELAB 8.5 RETAIL SOFTWARE 45370 数据表

产品代码
45370
下载
页码 825
Personalizzazione
Informazioni sullo script
711
Esempio di script di base
Di seguito è disponibile un esempio di script di base che utilizza alcune funzioni di 
script di WaveLab per eseguire alcune semplici operazioni in un file audio nell'area 
di lavoro File Audio.
Lo script mostra prima le informazioni circa il file audio, esegue il fade-in dell'inizio 
e il fade-out della fine del file, quindi aggiunge dieci marker a intervalli di un 
secondo. Per osservarne il funzionamento, esaminarlo riga per riga e leggere i 
commenti per ciascuna operazione.
/* Per eseguire questo script:
- aprire un file audio che duri almeno 10 secondi
- aprire la finestra Log tramite il menu Globale
- copiare e incollare questo script nella finestra Script
- scegliere Funzioni > Esegui script */
//clear the log window
logWindow.clear();
//show some information about the active wave file in the log window
logWindow.printInfo("This wave file has " + activeWave.size() + " samples");
logWindow.printInfo("Its sample rate is " + activeWave.sampleRate());
logWindow.printInfo("It has " +activeWave.numChannels() + " channels");
//Work out how long the file is in seconds and round to a whole number
var lengthSecs = activeWave.size() / activeWave.sampleRate();
logWindow.printInfo("This wave file is " + lengthSecs + " seconds long");
//Select the first 10 seconds of the file
activeWave.select(0, 10 * activeWave.sampleRate());
//Trim the file to 10 seconds
activeWave.trim();
//select the first two seconds of the file and fade it in
activeWave.select(0, 2 * activeWave.sampleRate()); //sample rate multiplied 
by two = 2 seconds
activeWave.fadeIn(linear);
//select the last two seconds of the file and fade it out
activeWave.select(activeWave.size() - (2 * activeWave.sampleRate()), 
activeWave.size());
activeWave.fadeOut(linear);
//loop through 10 times and add a marker each second
for (i = 1; i <= 10; i++)