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

Showcase your libraries, tools and other projects that help your fellow love users.
User avatar
SiENcE
Party member
Posts: 792
Joined: Thu Jul 24, 2008 2:25 pm
Location: Berlin/Germany
Contact:

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

Post 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.
Last edited by SiENcE on Thu Aug 07, 2014 6:28 pm, edited 1 time in total.
User avatar
Ranguna259
Party member
Posts: 911
Joined: Tue Jun 18, 2013 10:58 pm
Location: I'm right next to you

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

Post by Ranguna259 »

... I'm sorry but what is this ?
LoveDebug- A library that will help you debug your game with an on-screen fully interactive lua console, you can even do code hotswapping :D

Check out my twitter.
User avatar
Ranguna259
Party member
Posts: 911
Joined: Tue Jun 18, 2013 10:58 pm
Location: I'm right next to you

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

Post by Ranguna259 »

Yeah, I've searched but I couldn't relate what I read on wikipedia with love.. I'll wait for the demo.
LoveDebug- A library that will help you debug your game with an on-screen fully interactive lua console, you can even do code hotswapping :D

Check out my twitter.
User avatar
SiENcE
Party member
Posts: 792
Joined: Thu Jul 24, 2008 2:25 pm
Location: Berlin/Germany
Contact:

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

Post by SiENcE »

Okay, here you go. Video added to top post and also some ideas ... and what can I do with it?

Have fun!
User avatar
Ranguna259
Party member
Posts: 911
Joined: Tue Jun 18, 2013 10:58 pm
Location: I'm right next to you

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

Post 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
LoveDebug- A library that will help you debug your game with an on-screen fully interactive lua console, you can even do code hotswapping :D

Check out my twitter.
User avatar
veethree
Inner party member
Posts: 875
Joined: Sat Dec 10, 2011 7:18 pm

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

Post by veethree »

Can this be used with usb midi controllers?
rexjericho
Prole
Posts: 44
Joined: Sat Dec 15, 2012 7:55 am

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

Post 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:
User avatar
SiENcE
Party member
Posts: 792
Joined: Thu Jul 24, 2008 2:25 pm
Location: Berlin/Germany
Contact:

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

Post 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 πλ².
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot] and 31 guests