Can I do volume slide over MIDI?

Started by billkotsias, May 05, 2022, 21:25:34

Previous topic - Next topic


Hello! I started writing tracker music over 30 years ago, but haven't done so for the last 15 years. I am super glad to have downloaded latest ModPlug version and it feels like I'm back home again  ;)

For the first time I decided to use OMPT to control my Casio WK-7600 synth (GM-1 capable) because its instruments sound so much better than the ones I found in "MIDI Library" and "GM.DLS" at the top-left pane (am I right to presume these are provided by Windows/laptop soundcard)?

Anyway, I'd like to know if I can use any effects, particularly Volume slide (increase/decrease). I tried c0x commands but it seems these only work on samples. On the other hand, standard volume Vxx command seems to translate fine (had to set "Volume Command Handling = MIDI volume" and deselected "Volume commands with notes are Velocities"  ??? ). So, I did something like:

C-5 02 v20
--- -- v28
--- -- v36

but this is a little choppy - volume goes up in steps, not smoothly.

Is there a better way? I tried to take a look at but I got lost, I think I need some more basic tutorial to get into that stuff.

Can anyone please help me out?


So I found the Control Change command:

Can someone please provide an example of how to use such CC controls in OMPT? I couldn't find one.
I found this message
but I don't get what PC Notes are, or how to annotate them

Saga Musix

One important thing to know first is that MIDI, unlike tracker modules, doesn't really have a fixed concept for changing the volume of a single note. MIDI volume (CC 07) messages affect all notes playing on the same MIDI channel, meaning that you are effectively limited to a 16 note polyphony (one per MIDI channel) when using MIDI volume for changing note volume. The only type of MIDI message that would allow addressing individual notes on a channel - polyphonic aftertouch - is not well-supported by both hardware and software synthesizers and is typically not even used to modify volume (but on some synths it can certainly be configured that way).

With that out of the way, the volume command handling option you found is a bit of a hack and indeed only affects set volume commands (vxx), not volume slides. PC notes aren't going to help you either because you want to talk to a MIDI synth (PC notes only work with plugin parameters), but you can set up some MIDI macros to do the job. I have attached an example with two variants:

On channel 1, MIDI CC 07 is sent, taking the parameter value of command Zxx or \xx. With \xx you can do smooth slides, but not the same way as c0x (you only specify the target of the slide, not the speed and direction). On channel 2, actual volume slides are used and the MIDI macro instead uses the letter "u" to evaluate the CC event's parameter based on the current tracker channel volume. As a consequence this approach occupies both effect cells if you want to update the volume. Not optimal but it's pretty flexible (as it will also work with instrument envelopes). (Side note: The slide on channel 2 starts at volume 1 because a zero-volume note- on event is equivalent to a note-off event in MIDI).

I know it's not optimal, but hopefully there will be a more intuitive way in the future that doesn't eat a whole effect column.

Quoteam I right to presume these are provided by Windows/laptop soundcard
Indeed, GM.DLS (and by extension OpenMPT's default MIDI library) is shippsed with Windows/DirectX. Soundcards haven't really included any ROM samples in the last 20+ years. :) There's plenty of better-sounding soundfonts that you can load into OpenMPT instead.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.


Thank you so much!

TBH, I have found the solution a few moments before seeing your reply ;D (after a lot of trial-n-error, and swearing, I must confess  :o )
I have attached a screenshot of my solution.
What a pity that MIDI has to be so much more complicated than good old tracking, obviously for (bad) historical reasons...

I haven't checked your example yet, will check it in the next couple of days, I presume it's similar to what I did  ;)

Saga Musix

Yes, the first variant in my example does exactly what you have discovered. As mentioned, there's a second variant which can allow for more tracker-style volume modification because it can take volume envelopes of instruments into account. Just give it a try. :)
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.


Awesome, I like the 2nd approach even better!!