VOGONS


First post, by Shreddoc

User metadata
Rank Oldbie
Rank
Oldbie

I've made an MT32-pi device, and loaded a set of cool soundfonts into it.

It's a lot of fun to have a MIDI playlist (e.g. in Falcosoft MIDI Player) and listen to your favourite tracks, occasionally pressing the physical "Change Soundfont" button on the device to change to a particular track's ideal soundfont.

Rather than pressing the physical button to switch soundfonts, it's also possible to send custom SYSEX messages to the MT32-pi, to make it switch.

So ideally, I'm picturing the MIDI playlist, with tiny MIDI files in between each track in the playlist, setting the soundfont for the upcoming track. Or perhaps I'm barking up the wrong tree, I don't know.

How are people doing this? assuming they are. Do I use a certain software to create a bunch of tiny MIDI files containing just a SYSEX message, e.g. one for "change to soundfont 0", one for "change to soundfont 1", etc?

Or might somebody even be kind enough to create such a set of MIDIs, implementing the basic control set described in the link above (allowing for, say, changes between up-to-10 soundfonts), if it's only a trivial job with the right setup? Which I could then manually insert into my playlists.

Last edited by Shreddoc on 2021-04-29, 07:05. Edited 1 time in total.

Reply 1 of 7, by Thermalwrong

User metadata
Rank Oldbie
Rank
Oldbie

Hmm, so it needs to be MIDI but needs to include sysex data? I think just capturing / trimming a MIDI capture of the output of mt32-pi-control should achieve that. The syntax for the sysex messages looks simple enough, but making that into a MIDI seems pretty complicated, comparing it with a similar implementation.
I think this is the best utility to use to send the sysex messages right now: https://github.com/gmcn42/mt32-pi-control

There's something similar for reconfiguring the MT32 to work as close as possible to a GM device with MTGM.MID: http://www.houseofsynth.com/roland-mt-32-to-g … version-utility

So with the utility, and something to capture MIDI output, it should be possible.

Reply 2 of 7, by SScorpio

User metadata
Rank Member
Rank
Member

In your setup you'll probably want different MIDI files to perform each switch. You can't pass a parameter to the file so each like you had in your example you'll have one that does switch to soundfont 0, soundfont 1, etc. Another thing to consider is that it will take at least a second or two for the new soundfont to load, you may want to have some empty padding so the switch is performed and then a few seconds of silence, otherwise you could be missing the beginning of the next track.

Reply 3 of 7, by Shreddoc

User metadata
Rank Oldbie
Rank
Oldbie
Thermalwrong wrote on 2021-04-27, 10:10:

Hmm, so it needs to be MIDI but needs to include sysex data? I think just capturing / trimming a MIDI capture of the output of mt32-pi-control should achieve that. The syntax for the sysex messages looks simple enough, but making that into a MIDI seems pretty complicated, comparing it with a similar implementation.

Thanks, I'll have a look into that.

SScorpio wrote on 2021-04-27, 12:14:

In your setup you'll probably want different MIDI files to perform each switch. You can't pass a parameter to the file so each like you had in your example you'll have one that does switch to soundfont 0, soundfont 1, etc. Another thing to consider is that it will take at least a second or two for the new soundfont to load, you may want to have some empty padding so the switch is performed and then a few seconds of silence, otherwise you could be missing the beginning of the next track.

What you have described - a separate file for each soundfont selection - is basically what I had in mind. That would allow the setup of customised playlists involving myriad soundfonts - press play, then forget about it and get on with work.

As per your smart suggestion thanks, I should indeed add a couple bars of rests to allow for SF2 load time. Based on knowing how long each SF2 takes to load, can also tailor that rest phase to suit each SF2's particular loadtime requirement.

My impression from quick Googling (e.g., + reference image below) is that MIDI experts could manually whip up such things in a text or hex editor. Header, one track, SYSEX instructions, rests, done. But as a MIDI-file-format noob - albeit ok with music theory - it's going to take some time to turn that simple abstraction into coded reality.

Screenshot.png
Filename
Screenshot.png
File size
18.01 KiB
Views
1016 views
File comment
Simple MIDI example taken from web, thanks to Geoff at midi dot org forum
File license
Fair use/fair dealing exception

Perhaps further research will allow me to alter the above to suit.

Reply 4 of 7, by Shreddoc

User metadata
Rank Oldbie
Rank
Oldbie

Spent some time reading about the granular detail of the MIDI file format.

Had to skim over some parts as it's a bit of a rabbit-hole, and I don't really want to invent the whole world just to have a cup of tea (you know how it is).

Made a couple of initial attempts at manually constructing a rudimentary .mid containing just the SYSEX instruction, but what I have tried so far is having zero effect at all upon the unit when played. (e.g. the below is supposed to send the sysex "03 00" to the MT32pi, which should cause it to change from Soundfont Mode to MT-32 Mode.... but nothing happens)

<now-redundant image redacted>

I'll keep beavering away at it. If anyone can see any obvious errors in the above, or methodology, please let me know.!GAH! SPOKE TOO SOON. FOUND A SIMPLE ERROR. (I'd left the manufacturer code out of the sysex instruction ... which means then having to increment the length bytes for the Mtrk & Sysex too, <micro-sigh>).

So here's the working one:

mt32pi_sysex.png
Filename
mt32pi_sysex.png
File size
21.36 KiB
Views
963 views
File license
Fair use/fair dealing exception

Does the main job. Now I'll pad it out with the necessary hold-times etc, to end up with the MT32-Pi's full control set in MIDI form. Pleased!

Reply 5 of 7, by Falcosoft

User metadata
Rank Oldbie
Rank
Oldbie

Hi,
1. You said you used FSMP for playback. In the right click context menu of the playlist you can find 'Pause between Songs' and you can set 0,1,2,3 sec. pause so setting delay in the Midi file itself is not so necessary. I think 2 sec. delay between Midi files is ideal regardless of soundfont switching and most likely it's also enough for reasonable sized soundfonts to load.

2. With the help of FSMP + SYXtoMID you can speed up the creation process of your Midi files with included SyeEx.
Use right click context menu of 'Reset' button ->Select /Send Custom SysEx. Here you should check 'Use Hex String' and type the required SysEx message. In your case e.g: F0 7D 02 01 F7 to change soundfont to 1. Then press 'Save as Syx'. Finally open the saved Syx in SYXtoMID.exe and set your desired delay in 'Packet Delay(ms)'.

Filename
SYXtoMID.zip
File size
10.44 KiB
Downloads
86 downloads
File license
Public domain
syx2mid.png
Filename
syx2mid.png
File size
800.42 KiB
Views
942 views
File license
Public domain
Last edited by Falcosoft on 2021-04-29, 07:57. Edited 1 time in total.

Website, Facebook, Youtube
Falcosoft Soundfont Midi Player + Munt VSTi + BassMidi VSTi
VST Midi Driver Midi Mapper

Reply 6 of 7, by Shreddoc

User metadata
Rank Oldbie
Rank
Oldbie
Falcosoft wrote on 2021-04-29, 07:43:
Hi, 1. You said you used FSMP for playback. In the right click context menu of the playlist you can find 'Pause between Songs' […]
Show full quote

Hi,
1. You said you used FSMP for playback. In the right click context menu of the playlist you can find 'Pause between Songs' and you can set 0,1,2,3 sec. pause so setting delay in the Midi file itself is not so necessary. I think 2 sec. delay between Midi files is ideal regardless of soundfont switching and most likely it's also enough for reasonable sized soundfonts to load.

2. With the help of FSMP + SYXtoMID you can speed up the creation process of your Midi files with included SyeEx.
Use right click context menu of 'Reset' button ->Select /Send Custom SysEx. Here you should check 'Use Hex String' and type the required SysEx message. In your case e.g: F0 7D 02 01 F7 to change soundfont to 1. Then press 'Save as Syx'. Finally open the saved Syx in SYXtoMID.exe and set your desired delay in 'Packet Delay(ms)'.
SYXtoMID.zip

Awesome, thanks! Shows I've still got a lot to learn about FSMP.