gaDrawRecHead(int,int,int,int,int)

Syntax

gaDrawRecHead(int,int,int,int,int)

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
 
 if numRecordings>0 then
 for i=0, numRecordings-1 do
 gaDrawRecHead(i,0,0,OUTPUT_W,OUTPUT_H)
 end
 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

Draw the playhead of the specified audio sample previously recorded, inside the box specified by x,y,width,height.

Parameters

int,int,int,int,int