soundColumnInterface Class Reference

Public Member Functions

Q_INVOKABLE QScriptValue sequences ()
 
Q_INVOKABLE String & column ()
 
Q_INVOKABLE QScriptValue waveformInfo (QScriptValue args)
 

Properties

String column
 

Detailed Description

scripting object to a sound column... Allow object oriented object interaction with sound sequence.

In Harmony, this object is created by the global scripting interface column.getSoundColumn( columnName );

In Storyboard, this object is created by the scripting interface SoundTrackManager.getSoundColumn( columnName );

It includes methods to iterate over the sound column content. At this moment, it cannot do any modification to the sound column.

Member Function Documentation

◆ column()

Q_INVOKABLE String& soundColumnInterface::column ( )

◆ sequences()

Q_INVOKABLE QScriptValue soundColumnInterface::sequences ( )

◆ waveformInfo()

Q_INVOKABLE QScriptValue soundColumnInterface::waveformInfo ( QScriptValue  args)

Returns an array containing data for printing the sound column's waveform over the given frames. The returned array has 15 entries per frame, and the value is the intensity of the sound.

The args parameter should include the following properties (however none are required)

Name Default Value
startFrame 1
endFrame frame.numberOf()
frameRate scene.getFrameRate()
var colObj = column.soundColumn("My_Sound_Col");
var waveformArr = colObj.waveformInfo({startFrame:1, endFrame:72, frameRate:24.0});
var pix = new QPixmap(150, 72*15);
pix.fill() //Fills with white background
var painter = new QPainter();
painter.begin(pix);
for (var frameCounter = 1; frameCounter <= 72; frameCounter++)
{
//Draw some gray lines to show frame delineations
painter.fillRect(0,k*15,150,1,new QColor(Qt.gray));
}
for (var pixelCounter = 0; pixelCounter < waveformArr.length; pixelCounter++)
{
var intensity = waveformArr[pixelCounter];
var newX = 75-(intensity/2); //center the intensity in the pixmap
//Draw the waveform intensity
painter.fillRect(newX, pixelCounter, intensity, 1, new QColor(Qt.black));
}
painter.end();
pix.save("My/Desktop/waveform.png");

Property Documentation

◆ column

String soundColumnInterface::column
read