Page 1 of 2

lovemidi - a Midi I/O library for LÖVE / Lua

Posted: Wed Aug 06, 2014 3:02 pm
by SiENcE
lovemidi is a LÖVE | Lua 5.1 Midi Input/Output Library to send and receive Midi commands.



It's based on luamidi and rtmidi. I modified the Interface, added LuaJit (from löve-deps) and updated rtmidi to newest version. Libraries for win32 and win64 are already included under tests/love2d.

Download
https://github.com/SiENcE/lovemidi

... and what can I do with it?
* connect Midi-Devices like Keyboards or Synthesizers to LÖVE
* send Midi Files or Music Notes over to Synthesizers
* receive Notes played on a Keyboard and generate Sounds in LÖVE
* or just use musical devices as Controller in Games :-D

Midi Router Sample
I wrote a small Midi-Router who receives Midi commands from an Midi-Input device and sends this commands over to an Midi-Output device like VirtualMidiSynth or an external Midi-device.

Code: Select all

-- initialize the library
local midi = require "luamidi"

-- count output-ports
print("Midi Output Ports: ", midi.getoutportcount() )

-- play a note on output-port 0 on channel 1
-- port, note, [vel], [channel]
midi.noteOn(0, 60, 50, 1)

-- deinitialize library
midi.gc()
LÖVE Music-Apps that could benefit from lovemidi:
- Mutrix
- Sect

TODO
It would be cool if someone could provide me an updated makefile for Linux and Macosx.

Re: lovemidi - a Midi I/O library for LÖVE / Lua

Posted: Wed Aug 06, 2014 7:56 pm
by Ranguna259
... I'm sorry but what is this ?

Re: lovemidi - a Midi I/O library for LÖVE / Lua

Posted: Wed Aug 06, 2014 9:22 pm
by SiENcE
http://lmgtfy.com/?q=Midi

I will post a demo video tomorrow :).

Re: lovemidi - a Midi I/O library for LÖVE / Lua

Posted: Wed Aug 06, 2014 9:26 pm
by Ranguna259
Yeah, I've searched but I couldn't relate what I read on wikipedia with love.. I'll wait for the demo.

Re: lovemidi - a Midi I/O library for LÖVE / Lua

Posted: Thu Aug 07, 2014 6:29 pm
by SiENcE
Okay, here you go. Video added to top post and also some ideas ... and what can I do with it?

Have fun!

Re: lovemidi - a Midi I/O library for LÖVE / Lua

Posted: Thu Aug 07, 2014 7:36 pm
by Ranguna259
Loved the end "Ok bye" :rofl:
Well now that I know what this is, let me tell you: This is pretty cool, it's like a joystick but with music. Awesome work :D

Re: lovemidi - a Midi I/O library for LÖVE / Lua

Posted: Thu Aug 07, 2014 8:14 pm
by veethree
Can this be used with usb midi controllers?

Re: lovemidi - a Midi I/O library for LÖVE / Lua

Posted: Thu Aug 07, 2014 9:17 pm
by SiENcE
Sure. I use a Logilink in my video.

Re: lovemidi - a Midi I/O library for LÖVE / Lua

Posted: Mon Aug 11, 2014 3:58 am
by rexjericho
Hey, this is really cool! A neat application of this program would be to hook up an electronic drum kit and launch notes when drum pads are hit and become a one man band.

You could pre-program a stack of notes that form a melody. When a certain drum pad is hit, the program would pop off the next note and send it to a synthesizer. Other drum pads could be used to signal the program to switch to the next melody.

Here's a guy that does this using audio triggers on real drums:

Re: lovemidi - a Midi I/O library for LÖVE / Lua

Posted: Tue Aug 12, 2014 10:08 am
by SiENcE
Oh thats nice! I love the tune :).

Yes this is possible. You can connect as many devices (soft or hardware) as you like to lovemidi and direct inputs and outputs the way you want.

I really love this little box synth πλ².