Is their a way add MIDI effects to samples?

Started by biolizardshadow, August 22, 2020, 21:15:54

Previous topic - Next topic

Saga Musix

Here's what I would suggest to do:
1. Pick an empty fixed macro at the bottom of the dialog (e.g. ZFF)
2. Set its value to Bc0Ay - this will send MIDI CC 10 using the current channel panning (B = MIDI CC, c = current MIDI channel, 0A = CC 10, y = current panning value)
3. Use this macro (ZFF) in the pattern where you want to update MIDI panning.
4. Repeat these steps for any other MIDI message you might want to send. Please refer to the macro syntax in the manual to do that. Note that you can put more than one MIDI message in a single macro, e.g. "Bc0Ay Bc07u" would update both MIDI channel panning and channel volume at the same time.

QuoteAlso will this work on channels playing sampled instruments or just VST/VSTI instrument plugins?
These macros will not do anything audible on sample channels while editing, but they will work as expected when exporting to MIDI.

I have attached an example which should hopefully illustrate the example above. You will also see the difference between Zxx and \xx in the example - Zxx sends a MIDI message once a row, while \xx sends one on every tick.
» 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.

biolizardshadow

Oh now I see what you mean so the ending letters at the end of the macro determine how the macro behaves?. The example you provided was good and helped me understand how some of this stuff works now.




Thank you very much for your help!

biolizardshadow

Also is there a way to export vibrato command as the MIDI modulation command? Theirs an h vibrato command in the volume effects but it doesn't seem to do anything.

Saga Musix

Quote from: biolizardshadow on August 25, 2020, 14:34:14
Oh now I see what you mean so the ending letters at the end of the macro determine how the macro behaves?
Well, macros are like a mini programming langauge. Each letter has a meaning as documented in the wiki.

QuoteTheirs an h vibrato command in the volume effects but it doesn't seem to do anything
Vibrato commands are exported as pitch bend commands. By default, OpenMPT sets a pitch bend depth of 12 semitones for each sample-based instrument.
» 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.

biolizardshadow

Then how would you go about creating a custom macro and knowing what does?

Saga Musix

Macros are nothing but raw MIDI messages. They work the same way as MIDI messages work in any other application, with the addition that you can replace any part of the macro with variables that change their value based on the Zxx parameter / volume / panning / etc.
You don't need to remember all types of MIDI messages by heart, you can generate them from the "Type" dropdown menu in the macro editor. For example you could choose "MIDI CC", then choose "CC 10" from that dropdown and you would get "Bc0Az", which would send MIDI CC 10 with a parameter based on the Zxx parameter. All you need to do then to reach the macro from my example above is replace the z by y so that it insert the current channel panning instead of the Zxx parameter into the message. Similarly, "c" is replaced by the current MIDI channel. You could replace "c" with "0" if you always knew that your message should be sent on the first MIDI channel, for example.
» 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.

biolizardshadow

#21
I was talking about maybe something not used by general MIDI, kind of like a system exclusive event. Also is their a way to activate two macros at the same time within the current channel?

Saga Musix

QuoteI was talking about maybe something not used by general MIDI, kind of like a system exclusive event.
You mean as an alternative way to write out vibrato events?

QuoteAlso is their a way to activate two macros at the same time within the current channel?
No, you can only activate one macro at a time, but as shown in the example file above you can put multiple MIDI messages into a single macro, as long as they don't need different values for the "z" parameter.
» 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.

biolizardshadow

The example file only has one MIDI message. And when I was asking about writing custom MIDI messages I was just intrigued by the posabilities that are out there with custom MIDI messages.

Saga Musix

No, the macro I configured for "ZFF" has two MIDI messages: "Bc0Ay Bc07u" that's MIDI CC (channel panning) followed by MIDI CC 7 (channel volume).
And yes, you can write any custom MIDI message you want. It doesn't have to be a MIDI CC, it could be a SysEx message too. As long as you know how the SysEx message has to look like, and as long as it's shorter than 31 characters, anything is possible.
» 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.

biolizardshadow

Quote from: Saga Musix on August 26, 2020, 15:32:50
No, the macro I configured for "ZFF" has two MIDI messages: "Bc0Ay Bc07u" that's MIDI CC (channel panning) followed by MIDI CC 7 (channel volume).
And yes, you can write any custom MIDI message you want. It doesn't have to be a MIDI CC, it could be a SysEx message too. As long as you know how the SysEx message has to look like, and as long as it's shorter than 31 characters, anything is possible.


Hmm for some reason its only showing the set filter cutoff as the only macro running, but it still exports the MIDI messages when I run it through a MIDI editor.

Saga Musix

As I previously explained, I picked macro ZFF for sending the MIDI messages. You can find it at the bottom of the dialog in the dropdown list that by default starts at Z80. Z80-ZFF are fixed macros, i.e. they cannot use the letter "z" in the macro to depend on the Zxx parameter. At the top of the dialog are parametered macros instead, where a single macro covers the range Z00-Z7F, and the Zxx parameter is inserted into the maro via the letter z. For example in the default macro (F0F000z), if you call Z33, it will turn the macro into F0F00033. But since these macros I picked as an example don't depend on the letter "z", it doesn't make sense to use them in a parameter macro, so I put them in an unused fixed macro 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.