gaRecSampleVolume(int,float)

Syntax

gaRecSampleVolume(int,float)

Example

record = false
numRecordings = 0

function setup()
 ofSetCircleResolution(50)
end

function update()
 
end

function draw()
 gaBackground(0.0,1.0)
 
 ofSetColor(255,125,55)
 ofDrawBitmapString(string.format("Samples recorded: %i",numRecordings),200,200)

 if record then
 ofSetColor(255,0,0)
 ofCircle(OUTPUT_W/2,OUTPUT_H/2,100)
 end

end

function mouseReleased()
 if numRecordings>0 then
 for i=0, numRecordings-1 do
 gaRecSampleVolume(i,1.0)
 gaRecSampleLooping(i,true)
 gaRecSamplePlay(i)
 gaRecSampleSpeed(i,1.0)
 end
 end
end

function keyReleased()
 if gaKey() == string.byte(' ') then
 record = not record
 
 if record then
 gaStartRec(0)
 else
 gaStopRec()
 numRecordings = numRecordings + 1
 end
 
 end
end

Description

Set the volume of the specified audio sample previously recorded. Volume range is 0.0 to 1.0.

Parameters

int,float