New [midi=url]...[/midi] BBCode

Post Reply
User avatar
Dave Keenan
Site Admin
Posts: 802
Joined: Tue Sep 01, 2015 2:59 pm
Location: Brisbane, Queensland, Australia
Contact:

New [midi=url]...[/midi] BBCode

Post by Dave Keenan »

There's another new button in the post editor. This time it's MIDI . The AUDIO BBCodes don't work for MIDI (.mid) files, because they are not really audio files, but rather a stream of inputs to a synthesizer. So I've implemented MIDI playback using the javascript functions kindly provided free-of-charge by http://www.midijs.net/.

For example:

[midi=http://forum.sagittal.org/download/file.php?id=177]Johnston 10 ii Solemn fragment[/midi]

generates this player, with start and stop buttons, and the duration in seconds:

▶️ ⏹️ Johnston 10 ii Solemn fragment,  s

This is a fragment from the start of Ben Johnston's String Quartet number 10, 2nd movement: Solemn. You can see and hear more of it here: viewtopic.php?f=14&t=106&p=1814#p1814.

You first need to upload the MIDI file you want to play, as an attachment to your post, e.g. by dragging and dropping it into the post editor. Then you will need to obtain the URL of your uploaded file by clicking on the Attachments tab below the edit pane, then right-clicking on the name of your file and choosing Copy link location or similar.

User avatar
cmloegcmluin
Site Admin
Posts: 535
Joined: Tue Feb 11, 2020 3:10 pm
Location: San Francisco, California, USA
Real Name: Douglas Blumeyer
Contact:

Re: New [midi=url]...[/midi] BBCode

Post by cmloegcmluin »

Looks great! Thanks Dave.

Post Reply