Demo code does not compile

Issue #76 new
Former user created an issue

I tried to use the demo code you provide on the how_to_use/procedural page, but it creates errors when I try to compile it.

https://bitbucket.org/arlez80/godot-midi-player/wiki/how_to_use/procedural

First, there was an error in this line events.append( SMF.MIDIEventChunk.event( time, 0, SMF.MIDIEventSystemEvent.new( note_number, { "type": smf.MIDISystemEventType.end_of_track } ) ) )

I think the last 'smf' should be capitalized. After I changed that, I got more errors. These ones, I wasn't sure how to fix:

events.append( SMF.MIDIEventChunk.event( 0, 0, SMF.MIDIEventProgramChange.new( 3 ) ) )

The problem is SMF.MIDIEventChunk.event is a field, not a function. How are you supposed to create these events and add them to the events list?

Comments (2)

  1. きのもと結衣 repo owner

    I forgot updating that page when I update Godot MIDI Player APIs. I will update it.

  2. Log in to comment