Max for Eigenharp

Using Max/MSP to control the Eigenharp

Set your LED colors easily from the Alpha keyboard

On the Eigenlabs forum, one user,  0beron, created a tool for setting the LEDs on an Eigenharp Alpha to desired colors essentially by just pressing the keys. I found that to be a wonderful idea and decided to implement the same feature with Max. This turned out to be very easy to do in a single object.

The SetLEDColor object

It assumes that the Eigen.OSCInputV2 object is instantiated somewhere. That object is responsible for receiving incoming OSC data from the Eigenharp and converting into data that is easily handled by Max. It uses the [Eigen.LEDControllerV2] which was described in an earlier post.

How it works.

The top section on the right receives all key events (press and release). Since we only care about presses, the [stripnote] object blocks keyup events, allowing only key presses to go through. The numbers 121 through 124 represented the key values for the first four keys in the 12-row single column percussion section of the Alpha. If one of those 4 keys is pressed (actually just lightly caressed given the sensitivity of the Eigenharp), a value (1 through 4 respectively) is just stored in a variable called DesiredColor. That’s just so we can remember the last color choice.

Any key other than those four gets sent to the [split 1 120] object. This object sends through the left outlet any value between 1 and 120. Those values correspond to the keys on the main keyboard (24 rows with 5 columns). The combination of the last percussion key to be touched along with the key touched on the main keyboard is used to create a command that can be sent directly to the [Eigen.LEDControllerV2] object. That object can parse commands such as

  • red 1 1
    (Set the LED at row 1 col 1 to red)
  • green 5 2
    (Set the LED at row 5 col 2 to green)
  • off 8 5
    (Turn off the LED at row 8 col 5)

The last section is triggered when you press the fifth key on the percussion section (key number 125) and it is used to quickly turn off all LEDs and then turn on the first three percussion keys to red orange and green respectively, so you can easily remember which key to touch first to pick the desired color)

To use it, just instantiate this object in an empty patcher.

Recording and playback

You might be wondering why the commands being sent to the [Eigen.LEDControllerV2] were also being sent to an outlet. Turns out that it’s pretty convenient to be able record all your taps, save the sequence to a file and reload it later to reset the LEDs on the eigenharp keyboard to a previously defined state.

Here’s an object called LEDRecorder that does just this.

The LED Recorder object

The object has comments and so is hopefully quite easy to understand.

Download the files here.

 

Leave a Reply

Your email address will not be published. Required fields are marked *