gaGetMidiValue(int,int)

Syntax

gaGetMidiValue(int,int)

Example

midiValue = 0

function update()
   // get the value from midi device 1
   // and index 11 (a knob in my case)
   midiValue = gaGetMidiValue(1,11)
end

function draw()
   gaBackground(0.0,0.8)
 
   ofSetColor(255)
   ofRect(0,0,OUTPUT_W*midiValue,OUTPUT_H)
end

Description

This function give us the direct reading over a specific element of our MIDI device.MIDI values use to be between the range of 0-127, but here in GAmuza we have this values normalized into the 0.0-1.0 range.

Parameters

int,int

Returns

«Float, The normalized value of the selected MIDI index and the selected MIDI device