can someone please explain in layperson's terms what "sample and hold" is?
-
- KVRAF
- Topic Starter
- 2338 posts since 5 Oct, 2003
Would really like to understand this and am having a hard time wrapping my head around it.
thanks!
Greg K.
thanks!
Greg K.
- KVRAF
- 5144 posts since 22 Jul, 2006 from Tasmania, Australia
sample and hold is like decimation sorta.
If you have an audiorate signal,
and read it's value at less than audiorate,
it becomes a sample and hold.
so it would turn noise audio into a random step-lfo.
So to sample a value, or to take it-
then hold it until you take the next one.
If you have an audiorate signal,
and read it's value at less than audiorate,
it becomes a sample and hold.
so it would turn noise audio into a random step-lfo.
So to sample a value, or to take it-
then hold it until you take the next one.
-
- KVRAF
- 3477 posts since 27 Dec, 2002 from North East England
I like to think of sample and hold as a series of 'triggers'.
Each time a trigger goes off, the value coming through at that exact instant is frozen in place until the next trigger goes off. The spacing of the 'triggers' is determined by the sample and hold rate.
Applied to a sine wave, it would look like this:
Each time a trigger goes off, the value coming through at that exact instant is frozen in place until the next trigger goes off. The spacing of the 'triggers' is determined by the sample and hold rate.
Applied to a sine wave, it would look like this:
-
- KVRAF
- 35436 posts since 11 Apr, 2010 from Germany
What about the sequence you have when using a sample and hold waveform in LFO's though? Is that just a random sequence, or waveform, but, sort of, bit reduced? Or are the sample and hold waveforms always same-ish?
-
- KVRAF
- 3477 posts since 27 Dec, 2002 from North East England
Exactly the same as in the image above. The sine wave in the image could be an audio signal or an LFO. Obviously with an LFO, you'll be spacing your 'triggers' much further apart than in an audio rate signal and you'll be able to hear each 'freeze' on the parameter the LFO is modulating.chk071 wrote:What about the sequence you have when using a sample and hold waveform in LFO's though? Is that just a random sequence, or waveform, but, sort of, bit reduced? Or are the sample and hold waveforms always same-ish?
- KVRAF
- 6095 posts since 5 Jul, 2001 from Just about .... there
The sample and trigger rate would determine how "random" it is. If the wave repeats equally, such as a sine or triangle during each duty cycle, you could technically get a repeating sequence if the sample and trigger rate was used with certain divisions of the duty cycle. Basically the sample would be taken on the same spot every time, held the same duration etc..chk071 wrote:What about the sequence you have when using a sample and hold waveform in LFO's though? Is that just a random sequence, or waveform, but, sort of, bit reduced? Or are the sample and hold waveforms always same-ish?
If you have to ask, you can't afford the answer
-
- KVRAF
- Topic Starter
- 2338 posts since 5 Oct, 2003
thanks! I don't get why it has to be noise audio signal. Can't it be applied to any regular audio recording? And what is it for to begin with. I was introduced to it in a synth that uses it to create atmospheric drone type sounds, but it seems like the held bits are "blended" together.
This is really hard to grasp. The use for it and the reason someone came up with it in the first place!
This is really hard to grasp. The use for it and the reason someone came up with it in the first place!
- KVRAF
- 12555 posts since 7 Dec, 2004
It's a low-pass filter where the cutoff is controlled by an input. If the cutoff = zero, the signal is "held". If the cutoff = maximum, the signal is tracked at the resulting frequency.
You can set this up in your favorite synthesizer by applying a pulse LFO to the filter cutoff. Ideally you'd want to use a 6 dB low-pass (this is how a real sample&hold circuit is constructed), although other low-pass filter types will work.
Ideally you want the sample pulse to be as narrow as possible. This requires an LFO with adjustable width.
This can be accomplished in Xhip for example, or using an MS-20 or similar analog synthesizer.
If the cutoff is normally held as low as possible the signal is "held" at that frequency. When the LFO input goes positive the cutoff is allowed to rise for a short period and the input signal is then tracked at the resulting cutoff frequency. When the LFO input goes negative again, the cutoff is set back to the low frequency and the input signal is then held at the level it was when the cutoff was reduced.
Why does it exist? It's analog memory. You can store a value.
It was invented to allow the first computers used by Alan Turing and others during WW2 to decode nazi communications. If you really needed a reason that one sounds good enough to me.
You can set this up in your favorite synthesizer by applying a pulse LFO to the filter cutoff. Ideally you'd want to use a 6 dB low-pass (this is how a real sample&hold circuit is constructed), although other low-pass filter types will work.
Ideally you want the sample pulse to be as narrow as possible. This requires an LFO with adjustable width.
This can be accomplished in Xhip for example, or using an MS-20 or similar analog synthesizer.
If the cutoff is normally held as low as possible the signal is "held" at that frequency. When the LFO input goes positive the cutoff is allowed to rise for a short period and the input signal is then tracked at the resulting cutoff frequency. When the LFO input goes negative again, the cutoff is set back to the low frequency and the input signal is then held at the level it was when the cutoff was reduced.
Why does it exist? It's analog memory. You can store a value.
It was invented to allow the first computers used by Alan Turing and others during WW2 to decode nazi communications. If you really needed a reason that one sounds good enough to me.
Free plug-ins for Windows, MacOS and Linux. Xhip Synthesizer v8.0 and Xhip Effects Bundle v6.7.
The coder's credo: We believe our work is neither clever nor difficult; it is done because we thought it would be easy.
Work less; get more done.
The coder's credo: We believe our work is neither clever nor difficult; it is done because we thought it would be easy.
Work less; get more done.
-
- KVRAF
- Topic Starter
- 2338 posts since 5 Oct, 2003
haha! thanks aciddose!
I found this. Pretty interesting:
https://www.youtube.com/watch?v=izjVtko6YAM
I found this. Pretty interesting:
https://www.youtube.com/watch?v=izjVtko6YAM
- KVRAF
- 6113 posts since 7 Jan, 2005 from Corporate States of America
I think of it as a modulation that spends a moment staying at one value before changing to the next value.
- dysamoria.com
my music @ SoundCloud
my music @ SoundCloud
-
- KVRAF
- Topic Starter
- 2338 posts since 5 Oct, 2003
what is actually creating the resulting sound? Or where in the synth is the actual sound coming from?
- KVRAF
- 5144 posts since 22 Jul, 2006 from Tasmania, Australia
-
- KVRAF
- 3477 posts since 27 Dec, 2002 from North East England
'True' sample and hold is when you take a waveform and 'hold' it via the triggers thing I mentioned above. So in a 'complete' implementation of sample and hold, you'd have control over both the audio going into the S&H module and the sample and hold (i.e. trigger) rate.killmaster wrote:what is actually creating the resulting sound? Or where in the synth is the actual sound coming from?
I find that most synths which offer an S&H LFO don't show you this. All you can change is the 'trigger' rate and it doesn't tell you what waveform is actually being sampled and held. It's usually noise in most synths from what I can tell, as each 'trigger' results in a random value with no obvious underlying pattern, even when you turn the sample and hold rate (speed of the triggers) way up.
An S&Hed signal (probably noise) is being used to modulate other parameters in the video above, so each time there's a 'trigger' (determined by the sample and hold rate) each parameter it's assigned to jumps to a new random value and stays there until the next trigger hits.
Remember that an LFO and an audio oscillator are essentially the same thing (well, Low Frequency Oscillator!). - it's just that an audio oscillator's frequency is high enough for us to hear (about 20 Hz+) while an LFO's is (usually) too low for us to hear, so we use the 'motion' of the LFO to control other parameters instead.
Modular synths like Bazille often make no distinction between audio and control signals, so there's nothing to stop you jacking an LFO's frequency above 20hz (generally the lowest freqeuncy we can hear) and patching it to the audio output so you can listen to it - and similarly there's nothing stopping you plugging an audio frequency oscillator into a control jack and using that to whack your parameter up and down at audio rates.
Sample and hold works exactly the same on LFOs as it does audio oscillators.
- KVRAF
- 12555 posts since 7 Dec, 2004
http://xhip.net/effects/?p=Quantizer
Quantizer
A combination of a time axis (sample and hold) and amplitude axis ("bit reduction") quantization.
Parameters
Sample & Hold
Rate - The sample-rate at which to sample&hold the input. 400hz to 40khz.
Jitter - How much to modulate the fractional sample position, up to one sample period.
Bit Reduction
Bits - The number of bits which represent the amplitude axis from -inf to 0db, 2 to 16, including the sign.
Dither - How much white-noise to mix before amplitude quantization.
Zero - Whether the amplitude axis quantization uses two's complement. The result is either to square a low-level signal (2sc) or to zero it.
Comments
Quantization n. A procedure in which a value is limited from a continuous range of values (real numbers) to a set of discrete values (integers).
In the case of the quantizer plugin we are actually taking one set of discrete values and reducing them to another set of discrete values.
https://soundcloud.com/xhip/feeling-nothing
Quantizer
A combination of a time axis (sample and hold) and amplitude axis ("bit reduction") quantization.
Parameters
Sample & Hold
Rate - The sample-rate at which to sample&hold the input. 400hz to 40khz.
Jitter - How much to modulate the fractional sample position, up to one sample period.
Bit Reduction
Bits - The number of bits which represent the amplitude axis from -inf to 0db, 2 to 16, including the sign.
Dither - How much white-noise to mix before amplitude quantization.
Zero - Whether the amplitude axis quantization uses two's complement. The result is either to square a low-level signal (2sc) or to zero it.
Comments
Quantization n. A procedure in which a value is limited from a continuous range of values (real numbers) to a set of discrete values (integers).
In the case of the quantizer plugin we are actually taking one set of discrete values and reducing them to another set of discrete values.
https://soundcloud.com/xhip/feeling-nothing
Free plug-ins for Windows, MacOS and Linux. Xhip Synthesizer v8.0 and Xhip Effects Bundle v6.7.
The coder's credo: We believe our work is neither clever nor difficult; it is done because we thought it would be easy.
Work less; get more done.
The coder's credo: We believe our work is neither clever nor difficult; it is done because we thought it would be easy.
Work less; get more done.
-
- KVRAF
- Topic Starter
- 2338 posts since 5 Oct, 2003
Wow! thanks for the great explanation!! I think I'm actually starting to grasp it...cron wrote:'True' sample and hold is when you take a waveform and 'hold' it via the triggers thing I mentioned above. So in a 'complete' implementation of sample and hold, you'd have control over both the audio going into the S&H module and the sample and hold (i.e. trigger) rate.killmaster wrote:what is actually creating the resulting sound? Or where in the synth is the actual sound coming from?
I find that most synths which offer an S&H LFO don't show you this. All you can change is the 'trigger' rate and it doesn't tell you what waveform is actually being sampled and held. It's usually noise in most synths from what I can tell, as each 'trigger' results in a random value with no obvious underlying pattern, even when you turn the sample and hold rate (speed of the triggers) way up.
An S&Hed signal (probably noise) is being used to modulate other parameters in the video above, so each time there's a 'trigger' (determined by the sample and hold rate) each parameter it's assigned to jumps to a new random value and stays there until the next trigger hits.
Remember that an LFO and an audio oscillator are essentially the same thing (well, Low Frequency Oscillator!). - it's just that an audio oscillator's frequency is high enough for us to hear (about 20 Hz+) while an LFO's is (usually) too low for us to hear, so we use the 'motion' of the LFO to control other parameters instead.
Modular synths like Bazille often make no distinction between audio and control signals, so there's nothing to stop you jacking an LFO's frequency above 20hz (generally the lowest freqeuncy we can hear) and patching it to the audio output so you can listen to it - and similarly there's nothing stopping you plugging an audio frequency oscillator into a control jack and using that to whack your parameter up and down at audio rates.
Sample and hold works exactly the same on LFOs as it does audio oscillators.