Skip to content

Conversation

@oxygen-dioxide
Copy link

@oxygen-dioxide oxygen-dioxide commented Jan 1, 2026

Summary of the Pull Request

After this PR, users can preview midi (.mid) files as piano roll with peek.

PR Checklist

Detailed Description of the Pull Request / Additional comments

When the user previews a midi file with peek, it will parse the midi file to get the positions, durations and pitches of musical notes, and plot them into a svg graph, where the X axis represents time, the Y axis represents pitch, and different colors represents different tracks. It will be shown in a webview2 where user can zoom and scroll.

Validation Steps Performed

Download this file and extract:
Oh_My_Darling_Clementine.mid.zip

Launch powertoys. Turn on peek. press Ctrl+Space on the midi file, and peek will show a window like this:

图片

@github-actions

This comment has been minimized.

@oxygen-dioxide oxygen-dioxide marked this pull request as ready for review January 1, 2026 07:45
@lei9444
Copy link
Contributor

lei9444 commented Jan 4, 2026

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@yeelam-gordon
Copy link
Contributor

Thanks @oxygen-dioxide for the PR.
Since we use WebView2 for preview, we’re considering whether it would be simpler to create a miniView.html with a well-known JavaScript bundle that handles MIDI well, rather than implementing most of the logic in C#. This would also be the preferred direction for adding new file types.

@lei9444 and @niels9001 here.

@oxygen-dioxide
Copy link
Author

Sorry, I'm not farmiliar with html and js, so I'm not able to develop midi functionality on them

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Peek: Support previewing midi (and other symbolic music formats)

3 participants