instrument vol fade in sustain loop

Started by LPChip, July 25, 2006, 20:35:44

Previous topic - Next topic

LPChip

It would be neat if a new option can be added to allow the fade-out value being processed during a sustain loop in the volume envelope.

The basic idea behind it is as follows.

As you know, many instruments can't be played forever. Think of a guitar or piano. Even with sustain pedal or keeping the keys pressed, it will slowly get softer.

Most samples of piano's and guitars and all other kind of similar instruments, usually have samples with a loop point. Usually these instruments have an envelope that softly fades out, and to do a quicker fade out, you'll need to use volume slide effects. (not so realistic)

I was thinking. Lets say you make your envelope like this:

+-+
| |\
| | \
| |  +


Where the sustain loop is between 1st and 2nd loop point. This is the type of instrument I usually use. It works great except for long duration notes. If I'd set a long fade-out value, and enable a new button to fade out during sustain, I could then create the effect of a snare that can wear out.

Ofcource, the note-off that releases the sustain, should continue the volume it had to the next point.

I hope this idea is clear. If not, ask me, and I'll try to clearify.
"Heh, maybe I should've joined the compo only because it would've meant I wouldn't have had to worry about a damn EQ or compressor for a change. " - Atlantis
"yes.. I think in this case it was wishful thinking: MPT is makng my life hard so it must be wrong" - Rewbs

speed-goddamn-focus

I don't understand what this would add that isn't already there?

LPChip

If you now have a sustain envelope with a looped sample, it will always sound untill a note-off is encountered.

With both a fade out and a sustain loop, you can make the note fade away slowly, and continue the envelope once a note-off is encountered.

This is very good to emulate piano's guitars, etc. , but also like a xyliphone. With a xyliphone, you make a sustain loop with a quick fade-out and a long after-sustain envelope. The logic behind this is: if you trigger a xyliphone, and keep the stick  on the plate, the sound will be muted directly. But if you hit the stick with an immediate release, it will sound long.

I understand that you think like: well this is nice but what real value does this add? Well, considder that you want to play an instrument using your midi keyboard. Then you depend on note-off more than anywhere else. This is the perfect way to emulate these kind of effects.

Keeping the note pressed still lowers the volume slightly (or fast depending on your configuration) and when released, it fades out quickly, but not abrubtly, with the ability to generate some after-reverb like envelope.
"Heh, maybe I should've joined the compo only because it would've meant I wouldn't have had to worry about a damn EQ or compressor for a change. " - Atlantis
"yes.. I think in this case it was wishful thinking: MPT is makng my life hard so it must be wrong" - Rewbs

speed-goddamn-focus

I think I get your point now... Wouldn't it be enough to get the note to use the fade-out value if there's no sustain loop (just a long volume envelope)?

LPChip

No, cus I want both to have a volume slide down, and the ability to control what happens after the key has been released.

I can set it to volume fade or set a volume slide as envelope, but i can't control the envelope while looped and also when released.

If I create an envelope between the sustain loop points, and then a note-off occours, it will continue that sustain loop, but will not loop again.
"Heh, maybe I should've joined the compo only because it would've meant I wouldn't have had to worry about a damn EQ or compressor for a change. " - Atlantis
"yes.. I think in this case it was wishful thinking: MPT is makng my life hard so it must be wrong" - Rewbs

Relabsoluness

This one made me thinking for long time :) Finally I think I achieved in creating the piano-style little-fade-on-sustain-and-large-fade-on-release using volume envelope for the sustain fade, and fade out value for the release-fade(seemed to require envelope loop in the volume envelope end). But the 'xyliphone-case', little-fade-on-release was beyond my skills. Could separate sustain- and release-envelopes make it possible to achieve what's sought after(better that having fade out value in sustain?)

LPChip

There are different ways to archieve the same, but the easiest one to implement is by allowing to fade out the entire envelope.

Eg: doesn't matter where you are, the overal volume slowly decreases untill it hits 0. and preferably starts after the first sustain loop point passed.

Since the fadeout params are already there, I think its just a small tweak.

Ofcource you can make all kinds of different envelopes, but is it really required? Nah. I don't think you'll want to create fancy fade outs with different fancy fade outs after note-off appeared. (yes, I've given this alot of thoughs.)
"Heh, maybe I should've joined the compo only because it would've meant I wouldn't have had to worry about a damn EQ or compressor for a change. " - Atlantis
"yes.. I think in this case it was wishful thinking: MPT is makng my life hard so it must be wrong" - Rewbs

rewbs


LPChip

Quote from: "rewbs"I'm really confused.

lol, explain? :)
"Heh, maybe I should've joined the compo only because it would've meant I wouldn't have had to worry about a damn EQ or compressor for a change. " - Atlantis
"yes.. I think in this case it was wishful thinking: MPT is makng my life hard so it must be wrong" - Rewbs

rewbs

Quote from: "LPChip"
Quote from: "rewbs"I'm really confused.

lol, explain? :)

I'm just really confused.

LPChip

How can I help you to make you being less confused? :P
"Heh, maybe I should've joined the compo only because it would've meant I wouldn't have had to worry about a damn EQ or compressor for a change. " - Atlantis
"yes.. I think in this case it was wishful thinking: MPT is makng my life hard so it must be wrong" - Rewbs

Relabsoluness

Quote from: "LPChip"There are different ways to archieve the same, but the easiest one to implement is by allowing to fade out the entire envelope.

Eg: doesn't matter where you are, the overal volume slowly decreases untill it hits 0. and preferably starts after the first sustain loop point passed.
How about the 'xyliphone-case'. I understood that it requires high fade-out before note off and low fade-out after note off. I can't figure out how it would help to allow fade out for the whole envelope, but then again I have used the instrument envelopes quite little so my babblings might not make that much sense(hopefully this post doesn't increase rewbs' confusion :P)

LPChip

Let me explain how a xylophone works.

You hit the note, and if you keep it there, the stick mutes the vibration of the bar. So to properly play it, you must strike the bar with the stick, and then quickly release it. This allows you to add attack (sort of modulation) to your play.

Basically you'd have an envelope like this
direct key release

+-+
| |   \
| |      \
| |         +

half key release

+ |
|\|
| +   _  
| |      +

no key release (or after the fade out reached volume 0)

+ |
| |  
|\|  
| +___


This is how the volume will be executed, but the envelope looks like the 1st.
"Heh, maybe I should've joined the compo only because it would've meant I wouldn't have had to worry about a damn EQ or compressor for a change. " - Atlantis
"yes.. I think in this case it was wishful thinking: MPT is makng my life hard so it must be wrong" - Rewbs

LPChip

YAY.

My dream came true!

Rewbs has made something similar that allows us to make all this.

He even was so free to put it in the wiki.

http://openmpt.xwiki.com/xwiki/bin/view/Manual/InstrumentReleaseEnvelope

To give this even more power, I've attached a song I've made with this feature in the manual. Its a simple 6 pattern song with 3 instruments (only 45 k big, zipped 30) which shows a piano, trumpet and marimba according to the above described techniques. Once you understand how it works, your piano's, guitars, and whatever instruments will never sound the same anymore.

Thanks Rewbs!!!!
"Heh, maybe I should've joined the compo only because it would've meant I wouldn't have had to worry about a damn EQ or compressor for a change. " - Atlantis
"yes.. I think in this case it was wishful thinking: MPT is makng my life hard so it must be wrong" - Rewbs