All MicroEvals
Create a Modal.com FastAPI script for creating a midi visual...
Create MicroEval

Create a Modal.com FastAPI script for creating a midi visual...

Prompt

Create a Modal.com FastAPI script for creating a midi visualizer. It should use midis2jam2 for the visualization. The user should be able to upload a MIDI file, and specify the resolution, quality, and fps. Our soundfont will be already used, the user cannot customize it. The app should run on Modal's fastest available GPU that supports graphics rendering. The current CLI documentation for v2.2.0 is as follows: midis2jam2 <file.mid> --record <out.mp4> [options] --resolution – The size of the video: 720p, 1080p, 1440p, 2160p, or a width and height such as 1920x1080. The width and height must be even. --fps – The frame rate: 24, 25, 30, 50, 60, 120, 144, or 240. --quality – The video quality: low, medium, high, or maximum. --soundbank – A .sf2 or .dls soundbank to render the audio with. The source can be downloaded from here: https://github.com/wyskoj/midis2jam2/releases/download/v2.2.0/midis2jam2-linux-x64-2.2.0-release.jar The soundfont I want to use can be downloaded from here: https://midkar.com/SoundFonts/Timbres%20of%20Heaven%20(XGM)%204.00(G).7z Inside of the .7z file, it is named Timbres of Heaven (XGM) 4.00(G).sf2. Please make sure the soundfont is either hosted on a Modal volume or baked into the image. You must use Ubuntu for the image because Debian has archived their dependency repos. The user can download the output mp4.

A system prompt was added to support web rendering

Drag to resize
Drag to resize
Drag to resize