Storyboard Pro
Scripting Interface Documentation
SoundTrackManager Class Reference

This interface is used to access the audio tracks of a storyboard project. More...

Public Slots

Sound Track Methods
int numberOfSoundTracks ()
 return the number of Audio tracks More...
 
String nameOfSoundTrack (int index)
 return the columnName of the audio track at index More...
 
String addSoundTrack ()
 add a new empty audio track More...
 
bool deleteSoundTrack (String &columnName)
 delete audio track More...
 
bool importSoundBuffer (String &columnName, String &soundFile, unsigned int targetFrame)
 import a sound file into a given audio track at the specified frame More...
 
QObject * soundColumn (String &columnName)
 returns a SoundColumnInterface object that contains a reference to that sound column. The SoundColumnInterface object contains a useful interface to introspecting the sound and its sound sequences. More...
 
void setAudioClipColor (String &columnName, String &color)
 
String getSoundTrackColor (String &columnName)
 

Detailed Description

This interface is used to access the audio tracks of a storyboard project.

var stb = new SoundTrackManager();
var num = stb.numberOfSoundTracks();
for ( var i = 0; i < num; ++i )
{
System.println( "Name of sound column is " + stb.nameOfSoundTrack(i));
}
// Import a sound file at frame 25
stb.importSoundBuffer("Sound", "/home/user/Music/Child_French_Stereo.wav", 25 );
var soundcol = stb.soundColumn("Sound");
if ( soundcol )
{
var sequences = soundcol.sequences();
var numSequences = sequences.length;
for( var sequenceIdx = 0; sequenceIdx < numSequences; ++sequenceIdx )
{
var sequence = sequences[ sequenceIdx ];
var startFrame = sequence.startFrame;
var name = sequence.name;
var filename = sequence.filename;
var len = sequence.stopFrame - sequence.startFrame + 1;
System.println(filename + " has name " + name + " and start " + startFrame + " and length " + len);
}
}

Member Function Documentation

◆ addSoundTrack

String SoundTrackManager::addSoundTrack ( )
slot

add a new empty audio track

◆ deleteSoundTrack

bool SoundTrackManager::deleteSoundTrack ( String &  columnName)
slot

delete audio track

Parameters
columnName- name of the audio track

◆ getSoundTrackColor

String SoundTrackManager::getSoundTrackColor ( String &  columnName)
slot

return the color of the sound track.

◆ importSoundBuffer

bool SoundTrackManager::importSoundBuffer ( String &  columnName,
String &  soundFile,
unsigned int  targetFrame 
)
slot

import a sound file into a given audio track at the specified frame

Parameters
columnName- name of the audio track
soundFile- path to soundFile ( mp3, aiff, wav )
targetFrame- frame where audio clip is to be inserted.

◆ nameOfSoundTrack

String SoundTrackManager::nameOfSoundTrack ( int  index)
slot

return the columnName of the audio track at index

Parameters
index- index in the list of project audio tracks

◆ numberOfSoundTracks

int SoundTrackManager::numberOfSoundTracks ( )
slot

return the number of Audio tracks

◆ setAudioClipColor

void SoundTrackManager::setAudioClipColor ( String &  columnName,
String &  color 
)
slot

sets the color of the sound track

◆ soundColumn

QObject* SoundTrackManager::soundColumn ( String &  columnName)
slot

returns a SoundColumnInterface object that contains a reference to that sound column. The SoundColumnInterface object contains a useful interface to introspecting the sound and its sound sequences.

Parameters
columnName- name of the audio track