Ce forum permet à des personnes du monde entier de communiquer, c′est pourquoi les messages échangés sont en anglais.
-
In a newly created (empty) soundfont, I create an instrument. When I select it and click on the envelope editor, I see an evelope that goes from 0 to max at 0s, continues at max to 2s, and then goes to 0 and stays at zero until 4s.
What does this mean? All values (Delay, Attack, Releasem Hold, Decay, etc) are minimal (0.001s).
I add a sound sample which is 25 seconds long. It is a percussion sound, so I want to sound the complete sample whenever it is invoked, regardless how long the key is pressed. If I understand things correctly, I must set the Hold value to the length of the sample. However, the maximal value for Hold seems to be 5000 samples (18secs). So the best I can do is set Hold to max and set Release to the rest of the length.
Is this correct? Or is there a better way to sound the complete sample? -
When I was less experienced it confused me as well. Still I always use the regular window for editing the envelope.
delay
This refers to the duration of the sound stays muted after the key is pressed. In the majority of cases you want to hear audio immediatly after pressing the keys and then the parameters are left at zero. However delay comes in handy for example when you want to create richer pad sounds constructed with several layers. Suppose you want to introduce a second sound layer 0.5 seconds after the key is pressed, then you can set it by entering "0.5" in the delay-section.
Keep in mind delay does not hold the playback of the sound - it mutes the audio. In practise it means this: suppose you've set the delay to 0.5 seconds, you'll start hearing audio after 0.5 seconds of the sample has already been played.
attack
Here you can set the duration of time the audio-volume goes from zero to maximum after the delay. For example a bowed string sound like a violin has an attack which is relatively quite long, while a plucked string sound such as a guitar is very short.
My advise for this: even when you want to use an attack as short as possible, at least enter a value of 0.001. When you'll leave it blank the attack is absolutely zero and then there might be a change you'll hear some kind of 'clic' after pressing the key.
Hold
The duration of time the volume of the sound stays at its maximum
decay
The duration of time the sound-volume decreases from maximum to the level you've set in the sustain-section. (When you'll leave the sustain-section blank the volume stays at it's maximum no matter which decay-value you've chosen.
sustain
When you want to decrease the volume after "hold" you can set it here. Just as "attenuation" the parameters you can enter here refer to the amount of decibel-reduction. Suppose you want to reduce the volume by its half after the decay-time you'll set a parameter of 6 in the sustain-section.
When you want to deminish the volume to absolutely no sound at all than it's best to enter the number 144. This refers to the dynamics of 24bit audio. (In 24bit audio volume-differences from zero to 144 dB can be stored. Within 16bit the maximum is 96 dB. Within 8bit audio the maximum is 48bit, etc)
release
The duration of time the volume becomes zero after releasing the key. Sounds of violins or synth-pads have a relatively long release time, while that of other sounds (such as organs) are relatively very short.
In practise for short release times you still have to set its duration to at least 0.2 seconds, because a release time which is too short doesn't sound pleasant or natural. (However it also depends what you had in mind about the construction of the instrument you want to create.)
Key → Hold or Key → Decay
When plucking the strings on a guitar or pressing the keys on a piano with the sustain-pedal on you'll notice the lower the tone the longer it lasts untill you'll hear no sound at all.
Here you can simulate it by setting up a scale. The start-point is MIDI-key 60 (also known as the central C on a piano keyboard). No matter which parameters you've set into Key → Hold or Key → Decay, the duration of "Hold" and "Decay" will last as long as you've set with the refering parameters. However, suppose you've entered the number 25 within the section of
"Key → Decay": when you press MIDI-key 48 (one octave below) the decay-time becomes 25% longer lasting. With MIDI-key 72 the decay-time becomes 25% shorter.
It's possible to enter negative values and then it goes the other way round. With a value of -25 the decay-time becomes 25% shorter with MIDI-key 48 and 25% longer with MIDI-key 72
---------------
This does not directly answer your question, however I hope it gives you more insight of constructing the envelope and makes it easier to figure out yourself how to use the envelope-window -
Thanks for the extensive information. While it sheds some light here and there it doesn't really answer my questions (as you already stated).
For example, look at the 2nd image. Hold is set to 18 seconds and Release is about 7 seconds. Yet in the window Hold seems to stretch to 23 seconds and the total length is 30 seconds, a value that I cannot dereive from any of the numbers filled in. -
I don't know why that is. Polyphone is a very good program but it contains some bugs ... though I wonder that is related to the limitations of the SF2-format itself.
It can also be a problem of FluidSynth : the sound-engine for soundfonts Polyphone is built on. When that's the case you could test your soundfont with a player like this one: Falcosoft Soundfont MIDI Player : its built on the engine BASSMIDI instead of FluidSynth.
To go back to your situation: you've set Hold to 18 seconds, but you haven't set parameters within Sustain, so the 18 seconds to Hold are pointless. Do you want the sample to last for 18 seconds when the player keeps the key on the keyboard pressed? And after those 18 seconds you want the sound to stop abruptly? Then you should set Sustain to 144. If you want to end the sound more smoothly you have to set a higher value than 0.001 seconds.
What you describe about stretching to 23 seconds etc is a problem which is familiar to me as well. It seems to be a bug in the program.
You can also look into the SF2 specification which describes al features possible with soundfonts. (A large document unfortunately which is a pain in the ass to study.) -
The "Release" parameter is for applying the natural-fade time that the sample will perform whenever it receives the key-off message at any time.
The "Release" parameter skips the hold, decay and sustain parameters as soon as the "note-off" message arrives and goes directly to the release position.
If the key-off occurs before the sample length reaches the end, "release" is applied on the remaining sample-time. But if the sample reaches the end before the "key-off", no action can be taken, because there is nothing else to play.
To avoid this, the sample must have a loop, at least in the last part. so when the sample reaches the end, the loop part is repeated and allows the release. -
I think that Polyphone uses a 2 second time interval to make the sustain visible in the envelope editor.
In the example below, Attack = 1, Hold = 1, Decay = 1. Then there is a 2 second Sustain, followed by the Release.
So the full length of the envelope in the editor window will always be Attack + Hold + Decay + 2 + Release.
To have a sample sound completely, regardless of when the key is released, the only way seems to be to make the Release as long as possible (102 seconds). Even then, the decrease in volume of a 30 second sample is more than noticeable. And —worse— even though the sound has long stopped, resources will be tied up the full 102 seconds, possibly blocking other samples from sounding. -
If we're talking about percussion samples, the situation will be a little weirder.
I suggest completely ignoring the display in the AHDSR window.
If you want the entire sample to be played, look at the sample's duration and multiply that by 6. //and don't ask why, this is an average constant found by trial and error.
And then just write the number you found in the release time without writing anything to the attack, decay and sustain parameters.
example: sample time 2.365s
2.365 x 6 = 14.19 <= This is the result you will use for release time. -
Within the SFZ-format this issue is fixed with the opcode [loop_mode=one_shot]
I personally avoid this, also for samples such as snares. Even when you'll use at least 8 different sound recordings for the snare which will be heared round robin by pressing its refering keys (opcodes [lorand] and [hirand]) with the purpose to avoid an unnatural repetition effect, the listener will still notice very much it's a sampled snare instead of an acoustic one. With the mode one_shot the samples will be played whole including the last part containing only a bit of reverb and some recording-noise. Despite the low amplitude that last part of the recording is very much responsible for giving away it's a sampled instrument.
You can't completely simulate an acoustic sound or music instrument with sampling only. However the release is very important for the creation of a dynamic and pleasant sounding instrument.
Suppose the sample of a recorded snare is 1.5 seconds long. I'll use that sample for a soundfont a I'll set the release time to be 6 seconds. Then you'll hear the whole sample with a short-holding keystroke, though you'll hear very much as well the amplitude fades away instead of the sample will be played as it really is. However because all the keystrokes on the keyboard are unique - you cannot force yourself to press a key for an exact amount of time - the release time of the envelope becomes very much influencable for the dynamics.
(I am aware I can sound like an arrogant clever dick. But it's not meant to be disrespectfull towards anyone. It's just my opinion and it's of course okay when you disagree with me.) -
@Michael: Your way of expressing your opinion is perfectly normal. Besides, I always make direct statements and I don't think it's rude to the other person. Or maybe I just don't like unnecessary politeness.
I wonder which percussion instrument lasts 18 seconds; maybe a large bell-tree or a rain-stick?
Even with these, a release time of 1 or 1.5 seconds is sufficient (in polyphone: 6s or 9s).
Because it is certain that the sound will end with a nice fade-out in an average of 1 or 1.5 second after the key is released.
Edit: (It is clear that on this instrument it will be necessary to hold down the key as long as necessary.)
NOTE: In all of what is described here: It is assumed that the key is pressed at the highest velocity value (as midi value: 127) and the sample is optimized as 0dB. At lower velocity values, the release time will decrease depending on the percentage. -
"I add a sound sample which is 25 seconds long. It is a percussion sound, so I want to sound the complete sample whenever it is invoked, regardless how long the key is pressed."
if you want to hear the full 25 seconds, you will have to keep the key pressed for 25 seconds. you are the one who is making music, not the soundfont.
regards bottrop -
bottrop, le -"I add a sound sample which is 25 seconds long. It is a percussion sound, so I want to sound the complete sample whenever it is invoked, regardless how long the key is pressed."
if you want to hear the full 25 seconds, you will have to keep the key pressed for 25 seconds. you are the one who is making music, not the soundfont.
regards bottropYou do have a point B) .
I have a collection of sound samples I made from 'singing bowls' (aka 'standing bells'). They can sound easily up to 30-60 seconds. I'm working on a tool to make automated compositions of these sounds. I thought that turning the samples into a sound font and then make the composition using MIDI would make things easier. But apparently I'm hitting limits here.
No problem! It was a nice exercise and I learned a lot about soundfonts and the the excellent Polyphone tool. -
Message de Johan Vromans le@Michael I appreciated your information!
-
You're welcome!
For singing bowls, bells, cymbals, etc you're likely to need a relatively long release time. Enter a value you'll think you need for the reverb time and try it out. If you have a MIDI-keyboard connected to your computer you can use it with Polyphone to play and test if you're satisfied with your alterations or you need to do some more tweaks. Otherwise the virtual keyboard can be quite helpfull too.
What I regularly do as well is making use of the modulation envelope. With it I can modify the envelope of the brightness of the sound. Here's an example of a bell-like sound:
amplitude (volume) envelope:
delay time = 0.001 seconds - I'll explain later why I enter here any value
attack time = 0.001 seconds - unless you want the attack to be more softly
release time = 10 seconds (to start with. It could be you'll only need 7 seconds or less or far more seconds than 10)
When the sample itself sounds sufficient to you it's usually not needed to set parameters to the hold time, decay time or sustain value. However it can be usefull to adjust them when playing the sampled bell instrument will result in a cacophonic noise, comparable with a piano play without letting go the sustain-pedal. By shaping the envelope with adjusting the hold time, decay time and sustain value you can fix this in case it occurs. If it does not help than you need to edit the sample itself with an audio editor.
Cacophony can also be prevented by adjusting the modulation envelope.
Within soundfonts you can make use of a lowpass with a slope of 12 dB. This means the sound frequency decreases 12 dB per octave. For example when I set the cutoff-frequency to be 500 Hz the frequency of 1000 Hz will be decreased with 12 dB and so on.
So let's set the cutoff-frequency to be 500 Hz. This will make your samples sound very dull, but we're not finished yet. Do you see in the parameter Mod env → filter (c)? Set it to 12000: that's the maximum value you can enter here. It means the cutoff-frequency will be increased with 12000 Hz. (You can also set negative values here to decrease the cutoff-frequency.) Now we have to modify the filter envelope:
attack time = 0.001 seconds
release time = the same as the value you've entered within the volume envelope
Remember you've set the delay time of the amplitude envelope to 0.001 seconds? It covers up the attack time of the modulation envelope: within that 0.001 seconds the cut-off frequency goes from 500 to 12500 Hz. It's a very short amount of time, though even than it can be of influence to the sound. That's why the same amount of time is set within delay of the amplitude envelope.
When using the modulation envelope with these settings makes the sound too dull you can change it by increasing the value you've set within cutoff-frequency. Try out what happens when you change it from 500 to 750 or 1000 or higher -
I am trying to mess around with this, and it seems that no matter what I do, I can’t get the envelope graph to change at all from the default, let alone the way the sample sounds. What’s going on?
-
attach a sf2 with only one sample with your settings and we will have a look whats going on.
regards bottrop -
Here it is. Changing the envelope values does not move the graph.Test.sf2
-
1 i dont any Preset
2 i dont see any settings
3 open the attachment, select the Instrument and study the Global column
regards bottropbotTest.sf2 -
Okay, I discovered what I was doing wrong: I had been scrolling over the delay values to make them change, but one needs to press enter for it to apply. Thank you for your time!
Connectez-vous ou inscrivez-vous pour participer à la discussion.
Polyphone a besoin de vous !
Polyphone est gratuit mais il y a des coûts associés à son site web et à son développement. Un petit coup de pouce aidera beaucoup.
Faire un don
Apprenez les bases
Voir le tutoriel
Haut de
page
page