P5js open MIDI file

All TS source code is transpiled to JS before it’s able to run on a browser.

Thus they have this CDN link for it posted on their GitHub repo:
<script src="https://Unpkg.com/@tonejs/midi"></script>

You can check its content on this link below:
Unpkg.com/browse/@tonejs/midi/

If you prefer you can code in TS in place of JS by installing their package in order to access their “.d.ts” typing files:
Unpkg.com/browse/@tonejs/midi/dist/

Also check my previous post about coding in TS w/ p5js along w/ 3rd-party libraries:

2 Likes