lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hello,

I'm a beginner musician who tinkers with code in his spare time and I would like to write a little video game to help me make progress in music. 

The game simply plays a MIDI melody then pauses and waits for me to play the notes I recognised by ear. Then I use my MIDI keyboard to play the melody back to the game, and the game simply checks that I am playing the right notes in the right order, ignoring the rhythm.

In other words, if the midi file contains the melody for "frère jacques", the game simply checks that I am indeed playing "do re mi do, do re mi do, mi fa sol, mi fa sol..."

I have a little experience in coding, but not that much and none with audio. And I am new to the gaming world. I coded a "pong" video game with Lua/Löve2d.

The principle of the game is simple enough, so I fired up my text editor to try and code it in Löve... and... got stuck straight away... there is no simple way to play a MIDI melody in Löve, nor stream the MIDI input from a keyboard.

I'm using windows for now. In time I would like my game to run on a dedicated raspberry pi, or my android phone, so I can play anywhere and share it with other beginner musicians.

I've done quite a bit of research, asked for help on the Löve forum, on the dualo forum (my midi keyboard is a dualo), and reached out to Peter Billam who developed several MIDI libraries.

Someone on the Löve forum said "it's definitely not going to be easy using Löve"... Peter Billam has not answered yet. 

Anyway, here is my question: maybe Löve is not the right framework? Would it be easier to write it directly in Lua?  And maybe Lua itself is not the best option for what I am trying to do and I should turn to something like Qt or even C/C++ ? Maybe musicXML is a better option then MIDI?

I don't mind putting in the effort, but I would like to put the effort in the right place? Can you help orient me in the right direction?

Thanks for your time
Regards
Bruno