Author Topic: instrument vol fade in sustain loop  (Read 7688 times)

Offline LPChip

  • Administrator
  • *****
  • Posts: 4,956
    • http://lpchip.nl
  • Operating System: Windows 10 Pro N (x64bit)
instrument vol fade in sustain loop
« on: July 25, 2006, 20:35:44 »
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:
Code: [Select]

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


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

Offline speed-goddamn-focus

  • Crazy artist
  • ****
  • Posts: 689
instrument vol fade in sustain loop
« Reply #1 on: July 25, 2006, 21:17:15 »
I don't understand what this would add that isn't already there?

Offline LPChip

  • Administrator
  • *****
  • Posts: 4,956
    • http://lpchip.nl
  • Operating System: Windows 10 Pro N (x64bit)
instrument vol fade in sustain loop
« Reply #2 on: July 26, 2006, 07:53:10 »
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

Offline speed-goddamn-focus

  • Crazy artist
  • ****
  • Posts: 689
instrument vol fade in sustain loop
« Reply #3 on: July 26, 2006, 08:46:31 »
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)?

Offline LPChip

  • Administrator
  • *****
  • Posts: 4,956
    • http://lpchip.nl
  • Operating System: Windows 10 Pro N (x64bit)
instrument vol fade in sustain loop
« Reply #4 on: July 26, 2006, 10:52:27 »
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

Offline Relabsoluness

  • OpenMPT Developers
  • *****
  • Posts: 707
instrument vol fade in sustain loop
« Reply #5 on: July 26, 2006, 21:37:33 »
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?)

Offline LPChip

  • Administrator
  • *****
  • Posts: 4,956
    • http://lpchip.nl
  • Operating System: Windows 10 Pro N (x64bit)
instrument vol fade in sustain loop
« Reply #6 on: July 26, 2006, 22:32:56 »
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

Offline rewbs

  • OpenMPT Developers
  • *****
  • Posts: 578
instrument vol fade in sustain loop
« Reply #7 on: July 27, 2006, 09:32:22 »
I'm really confused.

Offline LPChip

  • Administrator
  • *****
  • Posts: 4,956
    • http://lpchip.nl
  • Operating System: Windows 10 Pro N (x64bit)
instrument vol fade in sustain loop
« Reply #8 on: July 27, 2006, 09:36:12 »
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

Offline rewbs

  • OpenMPT Developers
  • *****
  • Posts: 578
instrument vol fade in sustain loop
« Reply #9 on: July 27, 2006, 12:23:39 »
Quote from: "LPChip"
Quote from: "rewbs"
I'm really confused.


lol, explain? :)


I'm just really confused.

Offline LPChip

  • Administrator
  • *****
  • Posts: 4,956
    • http://lpchip.nl
  • Operating System: Windows 10 Pro N (x64bit)
instrument vol fade in sustain loop
« Reply #10 on: July 27, 2006, 12:43:15 »
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

Offline Relabsoluness

  • OpenMPT Developers
  • *****
  • Posts: 707
instrument vol fade in sustain loop
« Reply #11 on: July 27, 2006, 21:16:59 »
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)

Offline LPChip

  • Administrator
  • *****
  • Posts: 4,956
    • http://lpchip.nl
  • Operating System: Windows 10 Pro N (x64bit)
instrument vol fade in sustain loop
« Reply #12 on: July 27, 2006, 22:02:00 »
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
Code: [Select]

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

half key release
Code: [Select]

+ |
|\|
| +   _  
| |      +

no key release (or after the fade out reached volume 0)
Code: [Select]

+ |
| |  
|\|  
| +___


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

Offline LPChip

  • Administrator
  • *****
  • Posts: 4,956
    • http://lpchip.nl
  • Operating System: Windows 10 Pro N (x64bit)
instrument vol fade in sustain loop
« Reply #13 on: August 16, 2006, 22:43:21 »
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