MIDI Notes To Dimmers And Play Sound

128 views
Skip to first unread message

Mathieu

unread,
May 31, 2015, 8:18:52 PM5/31/15
to ligh...@googlegroups.com
Here's a sample project showing how to map MIDI notes to dimmers and play the corresponding note sounds. The mapping is: midi note C2 triggers dimmer 1, C#0 triggers dimmer 2, D0 triggers dimmer 3... Using the MIDI output feature, Lightjams can also sends the MIDI notes to the Windows Synth (or any other MIDI output device able to play sounds).

The sample project file maps 25 midi notes to 25 dimmers. Only one source is needed using the shader mode (which means the power formula is evaluated for each cell individually). The power formula is: midi.note(1,49+x). 49 is the id of the C2 note. At the bottom of the grid, the dimmer attribute with a x position = 0 is triggered by midi.note(1,49+0), which is C2. Then the dimmer at x position 1 is triggered by midi.note(1,49+1), which is C#0.

To output MIDI, another 25 dimmers have been patched in the MIDI note channel 1 universe, starting at note 49. These dimmer attributes are in the top row. They get activated when the corresponding MIDI note has been received.
midi-notes-2-dimmers-and-sound.ljp

James Gilliland

unread,
Jul 6, 2015, 10:29:17 PM7/6/15
to ligh...@googlegroups.com
Hi, I just started using Lightjams and I'm having trouble getting this project to work. I am outputting midi notes from ableton live 7 using loopMidi, and have a DMXKing ultraDMX which I'm trying to use for output, but nothing seems to happen when I send notes from ableton.

I have all green lights in the bottom right for DMX and Midi. If I switch the source over to midi instead of math formula all the right notes flash green at the bottom, so it seem to be receiving the notes fine from ableton, but nothing happens.

James Gilliland

unread,
Jul 6, 2015, 10:55:48 PM7/6/15
to ligh...@googlegroups.com
I just noticed, the music light in the bottom right is red with the following error message:
     Error creating sound analyser Line in
     (High Definition Audio .
     Error stating music recording
     (WaveIn)
     AlreadyAllocated calling
     waveInOpen.

Mathieu

unread,
Jul 7, 2015, 8:49:20 AM7/7/15
to ligh...@googlegroups.com
Hi James,

This project file tracks 25 midi notes from C2 (id 49 in Lightjams). Is Ableton sending the proper notes? 

You can modify the source's power formula to track the midi notes you need by replacing the 49 in this formula midi.note(1,49+x) by the id of your first midi note.

About the music input error message, this means another software is using this sound card. Can be Ableton for example.

Regards,
Mathieu

James Gilliland

unread,
Jul 8, 2015, 12:28:50 AM7/8/15
to ligh...@googlegroups.com
Oh awesome, thanks, you're right i was using the wrong midi notes in ableton, I didn't realise what that 49 was doing in the math formula. All seems to be working now.
Reply all
Reply to author
Forward
0 new messages