quasar098 / midi-playground

square bounce
GNU General Public License v3.0
198 stars 56 forks source link

can't use an mp3 #100

Closed valid5 closed 4 months ago

valid5 commented 4 months ago

error metadata.json

Zulivan commented 4 months ago

The song_file parameter is designed specifically for MIDI files. On the other hand, the audio_file parameter can accept either MIDI or MP3 files.

MIDI files are structured in a way that makes them ideal for generating musical content programmatically. They contain precise information about notes, timing, and other musical elements, making it relatively straightforward to manipulate them in code.

However, MP3 files don't provide this level of granularity. While they contain audio data, they lack the structured information found in MIDI files. As a result, extracting timing information from an MP3 file isn't as straightforward, which leads to the error you encountered.

To resolve this issue, make sure you're providing a MIDI file for the song_file parameter. If you need to use an MP3 file, consider converting it to MIDI format first using appropriate tools.

quasar098 commented 4 months ago

the above is true

valid5 commented 4 months ago

stop closing it- what do you even mean "appropriate tools"

valid5 commented 4 months ago

also when i did put a midi file in the game just crashed before generating map

Zulivan commented 4 months ago

stop closing it- what do you even mean "appropriate tools"

There are various software tools available for this purpose, such as audio-to-MIDI converters. However, please note that the accuracy of these converters can vary, and you may need to manually adjust the resulting MIDI file to ensure it meets your needs.

Alternatively, if accuracy is crucial, consider creating the MIDI file from scratch using a digital audio workstation (DAW) or music notation software.

also when i did put a midi file in the game just crashed before generating map

Before playing the game, take note of the settings shown on the loading screen. These settings often include parameters related to the level generation.

Try adjusting these settings to see if it resolves the crash. For example, you might experiment with different square speed, direction.

valid5 commented 4 months ago

give examples on good FREE software to do this