Is midi playback with REV Spark controllers possible?

Hello, I’m on the software division for team 3482. Just for fun, I am trying to play a midi file on our robot’s motors. I know this is possible with CTRE Talons but our bot is entirely using sparks at the moment, and REVLib doesn’t support midi playback. Would it be possible to parse the midi file and convert it into motor movements? Has anyone else done this before?

2 Likes

Is it possible, technically speaking, any stepper or brushless motor should be capable or doing this type of sounding. However as of now CTRE and the Nidec (that no one uses) support it with a custom library.

Given how @bobbysq made the Nidec version I’m wondering what was involved behind the scenes to try and do the same for a SparkMax/Neo/Vortex.

Would love to have parity across all of the brushless brands on this.

This was possible with the Nidec Dynamo because of how its controller works. I don’t know the exact intricacies of how it works from an electrical perspective, but the controller passes the PWM signal directly to the motor, which means I can change the tone the motor makes when set to 0 power by changing the frequency of the PWM signal. As far as I know, REV’s controllers don’t have any way to manipulate this as an end user, so this would be difficult to implement on your own.