cognitive-catalyst / watson-beat

Other
102 stars 46 forks source link

File I/O incompatiable with Windows OS #5

Open amchaney opened 6 years ago

amchaney commented 6 years ago

troubleshooting

AdaptiveStep commented 6 years ago

There are also some key errors when using other midi files (other than the ones provided) as input

amchaney commented 6 years ago

This is interesting, I've made midi's with several DAWs (Garage Band and REAPER) and never had a problem. How did you record your midi? What OS? Most likely a dup of the other issue that you just opened with the midi library being old and rickety.

amchaney commented 6 years ago

Actually, now that I actually read your screen it says "rm" is not a recognized command, so you are on windows? You can spakle that with replacing rmCmd in the file https://github.com/cognitive-catalyst/watson-beat/blob/master/src/DevServer/Skeleton.py with however you remove files in windows. Or, if you are feeling charitable figure out a OS-agnostic way and submit a pull request.

dza6549 commented 6 years ago

Hi I'm on Windows 10 as well. rm is used in a few files. Replace with "del" (without quotes) Cheers

src\DevServer\Skeleton.py Line 653 rmCmd = "rm -rf WB.mid WB.py"
Line 667 rmCmd = "rm -rf WB.mid WB.py"

src\DevServer\Section.py Line 126 os.system( "rm midi_export.mid.dump" )

src\Skeleton\Skeleton.py Line 504 rmCmd = "rm -rf {}/WB.mid {}/WB.py".format( results.outputFilePath, results.outputFilePath )

src\Arranging\CreateMidiEventsForBass.py Line 455 call = "rm " + foutName + ".py" ;

[Edit: line numbers]

dza6549 commented 6 years ago

Ok I'm not sure "del" is working as expected. I have 93 files in my output folder and another 63 files in my src folder.

AdaptiveStep commented 6 years ago

@amchaney You were right about the key error. Apparently if the midi file has more than one track, it gives a key error. For Watson-Beat to work properly It is required that the input midi file has only one track.

This can be considered a bug and easily fixed if Watson-Beat only reads the first track in the midi file.

Further: A midi file can be edited with the free midi editor: http://midieditor.sourceforge.net/ There people can see if their midi file has only one track, which worked for me. .