Avoiding the "Machine Gun" effect
-
Leslie Sanford Leslie Sanford https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=131095
- KVRAF
- Topic Starter
- 1596 posts since 4 Dec, 2006
Say you have a single sample from an instrument. You put this sample into your favorite sampler and assign it to the appropriate note. When you play this note repeatedly, you get the dreaded "machine gun" effect. The effect is caused by the lack of sonic variation since the same sample is being repeatedly played in rapid succession. It doesn't sound natural because when playing the actual instrument, no two notes are going to be exatly the same.
The usual solution to this is to take several samples and use an algorithm of some type, e.g. round robin, randomization, etc., to ensure that the same sample isn't played twice in a row.
My question is are there any algorithms or approaches one could take to somehow modulate/alter the same sample to make it sound as though it's a different sample but not so different that it no longer sounds as though it belongs to the same instrument?
I've been playing around with some old string sample libraries. These typically didn't provide more than one sample for a range of notes, so it's not possible to use a round robin technique to avoid machine gun effect.
I've also been using a modern library that has tons of sample variations. It's like night and day. But the effect of not hearing the same sample twice in a row is very subtle. It makes me wonder if there's not a way to create an algorithmic shortcut to somehow variate the same sample to acheive the same results.
The usual solution to this is to take several samples and use an algorithm of some type, e.g. round robin, randomization, etc., to ensure that the same sample isn't played twice in a row.
My question is are there any algorithms or approaches one could take to somehow modulate/alter the same sample to make it sound as though it's a different sample but not so different that it no longer sounds as though it belongs to the same instrument?
I've been playing around with some old string sample libraries. These typically didn't provide more than one sample for a range of notes, so it's not possible to use a round robin technique to avoid machine gun effect.
I've also been using a modern library that has tons of sample variations. It's like night and day. But the effect of not hearing the same sample twice in a row is very subtle. It makes me wonder if there's not a way to create an algorithmic shortcut to somehow variate the same sample to acheive the same results.
-
- KVRian
- 995 posts since 25 Apr, 2005
How about a very slight pitch shift each time to add a subtle difference to sound? Alter velocity too and maybe a very slight offset into sample to change timing slightly? Could also try filtering subtly as well to change sound and phase?
-
- KVRian
- 1000 posts since 1 Dec, 2004
Yeah usually the first line of defense is velocity variation, then timing variations and perhaps pitch depending on the instrument, or sample playback offset if you're using a tracker.
If you're developing a new synth, you might want to try some other approaches:
- Deconstructing the sample into snippets (usually by figuring out where the impulses start), then reconstructing the sound by randomizing the timing of the snippets, the order, pitch, etc... This is essentially granular synthesis, and might work better on SFX than instrument sounds.
- Phase variation: you might want to add an allpass filter on some of the notes to offset the timing of different harmonics, or FFT the whole sample and randomize phases on new notes (kinda like PADSYNTH synthesis). Dunno how efficient this is (some famous harmonic exciters have allpass filter builtin on purpose).
- Very very light chorus: adding chorus so light that you can barely hear it seems to liven up things.
- Random pitch wobble: this is a classic effect on analog synths and tape recorders.
If you're developing a new synth, you might want to try some other approaches:
- Deconstructing the sample into snippets (usually by figuring out where the impulses start), then reconstructing the sound by randomizing the timing of the snippets, the order, pitch, etc... This is essentially granular synthesis, and might work better on SFX than instrument sounds.
- Phase variation: you might want to add an allpass filter on some of the notes to offset the timing of different harmonics, or FFT the whole sample and randomize phases on new notes (kinda like PADSYNTH synthesis). Dunno how efficient this is (some famous harmonic exciters have allpass filter builtin on purpose).
- Very very light chorus: adding chorus so light that you can barely hear it seems to liven up things.
- Random pitch wobble: this is a classic effect on analog synths and tape recorders.
-
Jeff McClintock Jeff McClintock https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=56398
- KVRist
- 414 posts since 30 Jan, 2005 from New Zealand
-
- KVRist
- 116 posts since 12 Jun, 2009 from København/Göteborg
I do this sometimes with snares...i find that velocity variation, and velocity assigned to the cutoff of a low-pass works well. It kinda mimics the fact that a snare hit gently has a more "muffled" sound than one that is hit harder. Most real instruments work that way actually, but of course it has to be subtle...velocity assigned to attacktime is also worth experimenting with, although i rarely do it. Its basically the same with attack as with harmonics...soft hit/pick etc = slightly longer attack.
If you are after realism i find that the way (how fast) the hits cut off eachother is important too.
Depending on what kind of samples you are working with, and how much of an attackfase they have, assigning samplestart to velocity works really well...but thats only when the sounds do not completely lose their sound if they lose the attackfase.
If you are after realism i find that the way (how fast) the hits cut off eachother is important too.
Depending on what kind of samples you are working with, and how much of an attackfase they have, assigning samplestart to velocity works really well...but thats only when the sounds do not completely lose their sound if they lose the attackfase.
- KVRAF
- 9453 posts since 17 Sep, 2002 from Gothenburg Sweden
Isn't part of the problem that the sound is one voice only so new notes cutoff the old ones ? I'm pretty sure some older drummachines solved the problem with polyphony. Probably not the complete solution but i thought i'd put it out there.
- Beware the Quoth
- 33178 posts since 4 Sep, 2001 from R'lyeh Oceanic Amusement Park and Funfair
i'd suggest slight pitch, filtering and transient-shaping variations.Leslie Sanford wrote:My question is are there any algorithms or approaches one could take to somehow modulate/alter the same sample to make it sound as though it's a different sample but not so different that it no longer sounds as though it belongs to the same instrument?
my other modular synth is a bugbrand
- KVRAF
- 2488 posts since 2 Dec, 2004 from Sydney, Australia
I got great results of dealing with unwanted machine gun effects (for percussive sounds) using Linplug's RMV: within the Variazer section increase style, exactness and spectrum. To make your sample further alive, add another pad of the same note with one of its drum synthesis (e.g. Hihat to add some random noise) and turn it down, make it real subtle. Just my 2c.
Cowbells!
-
Obsolete236871 Obsolete236871 https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=236871
- Banned
- 821 posts since 4 Aug, 2010
I too would think about ADSR, especially with drum sounds. Not only attack, but especially decay (a snare that is decaying faster when hit harder for example).
Many great ideas in this thread so far!
Many great ideas in this thread so far!
-
- KVRist
- 231 posts since 15 Apr, 2012 from Toronto, ON
This guy's site may have something of interest on the matter:
http://www.gatheral.co.uk
Check out the videos/section on UDK + Supercollider. He does a lot of cool stuff with generating an infinite number of variations of sounds through algorithms. There are the obvious ones like velocity, pitch, etc. There's also slight changes to timbre, resonance/filtering, reverb and reverb tails.
I think varying harmonic content by filtering/resonance can produce some fairly realistic results; and by varying the harmonic content that gets filtered by using an EQ or shelf filter helps too.
http://www.gatheral.co.uk
Check out the videos/section on UDK + Supercollider. He does a lot of cool stuff with generating an infinite number of variations of sounds through algorithms. There are the obvious ones like velocity, pitch, etc. There's also slight changes to timbre, resonance/filtering, reverb and reverb tails.
I think varying harmonic content by filtering/resonance can produce some fairly realistic results; and by varying the harmonic content that gets filtered by using an EQ or shelf filter helps too.
- KVRAF
- 5223 posts since 20 Jul, 2010
I doubt filtering would do much, at least on it's own. The sonic imprint is exactly the same, there's just slightly less of it sometimes = ear is not fooled.
I'd go with velocity to sample start and envelope modulation. That attack is what the ear is going by, different start point = different attack. The subtler the better. Maybe some random pitch too, and inaudible chorus on the snare track. You can also try making variations of the snare in a wave editor. Cool Edit's effects are really good for this, as you can make the chorus sound nothing like a chorus and just push the waveform around a bit.
Also look into microtiming of your drum hits, but that's a whole other (fascinating) topic.
It's funny that when drum machines used to exhibit the "machine gun" effect of one voice chopping off the next at triggering, people didn't like it, so the drum machine makers added polyphony to reduce the effect, but as soon as they did this, the "machine gun" style snare came into fashion quite strongly
When I'm dealing with sampled instruments I like to play up the artificiality of it, but I can imagine in other styles you'd want to avoid it like the plague.
I'd go with velocity to sample start and envelope modulation. That attack is what the ear is going by, different start point = different attack. The subtler the better. Maybe some random pitch too, and inaudible chorus on the snare track. You can also try making variations of the snare in a wave editor. Cool Edit's effects are really good for this, as you can make the chorus sound nothing like a chorus and just push the waveform around a bit.
Also look into microtiming of your drum hits, but that's a whole other (fascinating) topic.
It's funny that when drum machines used to exhibit the "machine gun" effect of one voice chopping off the next at triggering, people didn't like it, so the drum machine makers added polyphony to reduce the effect, but as soon as they did this, the "machine gun" style snare came into fashion quite strongly
When I'm dealing with sampled instruments I like to play up the artificiality of it, but I can imagine in other styles you'd want to avoid it like the plague.
http://sendy.bandcamp.com/releases < My new album at Bandcamp! Now pay what you like!
-
- KVRist
- 231 posts since 15 Apr, 2012 from Toronto, ON
Sorry, I didn't mean just filtering on it's own. But in addition to others.Sendy wrote:I doubt filtering would do much, at least on it's own. The sonic imprint is exactly the same, there's just slightly less of it sometimes = ear is not fooled.