-
Notifications
You must be signed in to change notification settings - Fork 6
Functions
Use this function to connect with the Launchpad
Parameters:
None
Returns
boolean: If connection was successfull or not
How to use:
Interface lint = new Interface();
lint.connect( Interface.getConnectedLaunchpads()[0] ); //Connects with your Launchpad
Use this function to disconnect with the Launchpad
Parameters:
None
Returns
Nothing
How to use:
lint.disconnect( Interface.getConnectedLaunchpads()[0] ); //Disconnects with your Launchpad
This function can be used to set the color of a specific LED.
Parameters:
x: The X coordinate of the LED
y: The Y coordinate of the LED
velo: The velocity index for the color (see programmers manual of your launchpad)
Returns
Nothing
How to use:
lint.setLED(5, 5, 127); //Sets the LED at position X=5;Y=5 to orange.
With this function you can fill a rectangle by giving start and end coordinates.
Parameters:
startX: The X coordinate for the start
startY: The Y coordinate for the start
endX: The X coordinate for the end
endY: The Y coordinate for the end
velo: The velocity index for the color
Returns
Nothing
How to use:
lint.fillLEDs(2, 2, 5, 5, 50); //Creates a purple rectangle from 2;2 to 5;5
Clears all LEDs.
Parameters:
None
Returns
Nothing
How to use:
lint.clearAllLEDs(); //Clears all LEDs (same as putting their velocity to zero.)
Returns the note on the piano which is equilavent to the LED you input.
Parameters:
x: LEDs X coordinate
y: LEDs Y coordinate
Returns
Midi.Pitch: The Note
How to use:
Midi.Pitch myNote = lint.ledToMidiNote(5, 2); //Returns the equilavent note
Returns the note on the piano which is equilavent to the LED you input.
Parameters:
p: The note to convert (Midi.Pitch type!)
Returns
integer array: The coordinates, Index 0 is X, Index 1 is Y coordinate.
How to use:
int[] myLED = lint.midiNoteToLed(Midi.Pitch.A5); //Returns the equilavent led coordinates for the tone A5