google-research / robopianist

[CoRL '23] Dexterous piano playing with deep reinforcement learning.
https://kzakka.com/robopianist/
Apache License 2.0
546 stars 45 forks source link

make fluidsynth sampling_rate float #5

Closed edwhu closed 1 year ago

edwhu commented 1 year ago

When running midi playback, python examples/play_midi_file.py --file robopianist/music/data/rousseau/twinkle-twinkle-trimmed.mid, we get this warning from fluidsynth.

Screen Shot 2023-04-03 at 10 32 42 PM

Referring to https://github.com/nwhitehead/pyfluidsynth/issues/37, we can fix this by making sure the samplerate argument to the fluidsynth(...) call is a float.

Now there are no more warnings. All tests pass.

kevinzakka commented 1 year ago

Thanks! Had it here but forgot it in the examples :)