HF RL Explorer

Implement a class MidiAnalyzer that processes a mido.MidiFile object to analyze Note On events. The solver…

Implement a class MidiAnalyzer that processes a mido.MidiFile object to analyze Note On events. The solver…: a task in r2e-code-instruct-qwen3.5 (Harbor dataset). The class must have a method analyze(self, midifile) that returns a dictionary with keys total notes (count of Note On messages) and…

The task

The class must have a method `analyze(self, midifile)` that returns a dictionary with keys `total_notes` (count of Note On messages) and `avg_velocity` (average velocity of Note On messages, 0.0 if none).

Part of Essacheez/r2e-code-instruct-qwen3.5.