Skip to content

get_MIDI_tracks function reported as nil #5

@ejb

Description

@ejb

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions