LuaMidi
LuaMidi copied to clipboard
get_MIDI_tracks function reported as nil
I'm using Lua 5.4.4. After installing LuaMidi using luarocks, the following script throws an error:
local LuaMidi = require('LuaMidi')
print(LuaMidi.get_MIDI_tracks)
local tracks = LuaMidi.get_MIDI_tracks('./tracks/hot_cross_buns.mid')
print(tracks)
The value of the function LuaMidi.get_MIDI_tracks is printed as nil and an error is thrown.
Elliot@MacBook-Air harp-hero % lua build/import-midi.lua
nil
lua: build/import-midi.lua:3: attempt to call a nil value (field 'get_MIDI_tracks')
stack traceback:
build/import-midi.lua:3: in main chunk
[C]: in ?
Not sure what I'm doing wrong here. Unfortunately I couldn't find any examples in the documentation for how to use this function. Any help appreciated!