Monday 30 December 2019

Behind the scenes of 'Synthesizerwriter's 29 Bagpipes...'

At the very end of December 2019, my very late (too late!) non-submission for Christian Henson's '29 Bagpipes' competition finally made it onto the Pianobook Library (if you haven't visited this amazing resource for samplists, synthesists and composers yet, then you should!). This blog post aims to augment the accompanying video (included below) with additional notes, to aid anyone who wants more information on how I produced the core samples, and more discussion about the principles behind the RUSS synthesis technique that I used in Ableton Live and Native Instruments Kontakt to make some example sounds using the samples.

1 of 29...


First of all, the samples that I extracted from the source '29 bagpipes' recording are not very conventional. They are long (about 22 seconds in this case), looped (so that you can choose any start position - controlled by an LFO, velocity or any other controller), in stereo, and they are split into two parts: a harmonic part and an inharmonic part (the harmonic part contains the 'tuned' part of the sound (the bit that you might try to whistle), whilst the inharmonic bit contains all of the noisy, clunky, thumpy, bang. spectral 'rubbish' that gives the sound its character and realism). The intention is that the samples should contain no information about any timbral changes over the duration of the sample - so, although the samples contain varying mixtures of frequencies, these do not change over time in the same way that would occur for the sound that has been sampled. These are raw sound sources, although they are far removed from the rather sterile oscillators that you find in most subtractive synthesisers. I remember that one reviewer of my book on 'Sound Synthesis and Sampling' took great delight in counting exactly how many pages it took me to finally describe what an oscillator actually did - well, part of the reason is that I don't think that enough time is spent on making the raw sound sources as good as they can be... Suffice it to say that these 'samples used as oscillators' are not sterile, boring or static.

The next thing to think about is the split of the raw source material (those 29 bagpipes et al...) into two 'as-orthogonal-as-I-can-make-them' parts. One of the things that always niggled away at me when using samples was the way that the harmonic 'tuned' bit was always 'bound' with the rest of the untuned, inharmonic 'stuff', so if you changed the pitch of the sample, then the pitch of the harmonic part and the inharmonic part both changed. Now in a real instrument, if you change the pitch of a note that it is producing, then the size of the instrument, its resonances, its rattles, its clunks and bangs, do not necessarily change in pitch in the same way. So I always wanted to be able to work with the harmonic part and the inharmonic part of a sample separately - and this is what I have been researching and working on for many, many years. There's a YouTube video where someone enquires in the comments about whatever happened to me (since I'm not as visible reviewing synthesizers as I was 25 years ago), and so now you know the answer - I've been working on fundamentally changing the way that sound synthesis works. Nothing major...

When you have separate samples for the harmonic and inharmonic part, then all sorts of interesting things open up. A lot of the characteristic timbre-defining 'attack' stage of percussive instruments turns out to be mostly inharmonics, and just making changes to that part can radically change your perception of the sound. Long releases on inharmonics parts sound can sound very much like reverb, but reverb that isn't bogged down in lots of pitched 'mush'. Swapping the inharmonics from one instrument to another doesn't give a simple mixture of the two instruments as you might imagine it would - instead it is more like hearing an unusual and distant relative from the same musical instrument family of the source of the inharmonic part. And that's the disarming bit - it seems that whilst our ears love the pitched part for intelligent, clever things like tunes and melodies, the deeply interesting, satisfying, 'characterful', visceral stuff is actually in those noisy, clangorous, nasty inharmonics.


There's a lot of fine detail in taking 51-ish seconds of 29 bagpipes tuning up and turning it into looped stereo samples, and a lot of it is boring, repetitive work - there aren't many tools in this space yet!

The first thing I do is listen to the raw source material:

Audacity is my audio editor of choice, although I have been looking at Serato Studio as a 'next level up' way of assembling beats... From the looks (and sound) of this 51.1 seconds-worth, there's a pretty constant level, and a lot of interesting content: bagpipes, singing and various other background ephemera. The spectrum next:

So the loudest component is at -25 dB and is at 240 Hz - A#3, so that's going to be my first target frequency (although I might try some others...). I tend to scan across the frequency axis, looking for any peaks at multiples of the dominant peak, and there seem to be some candidates. Most notably though, is all of that broad-band noise at just under -48 dB, which looks like it is going to provide lots of inharmonics. If this was a sample of an electric piano tine, then it would look very different, with lots more easily identifiable harmonic components, and a lower 'noise' floor. But Christian deliberately provided challenging source material, so none of this is unexpected!

My current preference is to split the harmonic and inharmonic content into stereo pairs by using two different frequencies for the separation filters. A fixed difference of one hertz seems to give good results, although I've also tried halving the frequency difference per octave up the frequency axis. Because the numbers are easier with fixed differences, then that's what I used here - I will make a spreadsheet to automate the calculations when I have time (and post-Thanksgiving and 'post-'End-of-Year' offers are a big distraction at the moment...)

The extracted harmonic content looks interesting:

This is quite typical for extracted harmonic content. Notice that the dynamic range is higher than the source material, and that a lot of the high frequencies are removed by the low pass filter.

The spectrum reveals more detail:

The harmonics are now much more visible, and the 'noise' floor has dropped by about 20dB, which gives a usable margin, although a bit more time cleaning up the sample would be needed to get to the standards of Spitfire Audio, of course. But this is only a quick example to see what can be extracted from deliberately difficult material, so usable is fine. In many cases, I actually prefer the sound of 'less processed' samples - doing too many passes of separation filtering can start to sound artificial.

Repeating for the lower frequency and combining gives the stereo pair:

The variation in the two channels is not unusual when doing separation! If you listen to just the raw looped samples (which are effectively the first 20 seconds or so of this) then you get lots of interesting stereo imaging and lots of harmonic movement (dynamic timbral changes) - not at all like listening to a conventional sawtooth waveform! The long length of the separated samples is to enable lots of variation of sample start position (via round-robin, velocity, controller...) and is one of the bits of sampling technology that rarely seems to make it into synthesis (except here, as a counter example!). I'm that most dangerous type of samplists and synthesists: an impurist who will use any technique to get good sounds!

The extracted inharmonics are also interesting, but for very different reasons. You can hear some of the singing much more clearly for example. Some samples that I have processed reveal 'noises off' that weren't caught during recording...

Unlike the harmonic content, the inharmonic has less dynamic range, and since all of those high frequencies are not filtered out, it looks a lot like the original source material. But the sound is very different - there is some leakage of harmonic material (no processing is perfect!), but the majority is all of the 'other' stuff that was going on during the recording: singing, tuning up, extraneous sounds, etc.

The stereo pair is revealing:

The combination of lots of broad-band noise plus no filtering of high frequencies gives two apparently similar channels, although if you listen there are some differences. I have experimented with using broader difference frequencies, and different Q factors on the filtering, but I haven't reached any firm conclusions on the best approach yet...


Using two pairs of looped stereo samples is going to soak up computing resources - sorry! As a partial mitigation, there are only a few samples across the keyboard:

This screenshot is from Ableton Live's Instrument Rack, where I'm using multiple instances of Sampler to play back the samples. The samples are in pairs (harmonics and inharmonics) and there are only four ranges. Remember though, that the looped samples are solely a source of frequencies, and any timbral or volume variation is solely provided by 'synthesis' processing, so a lot of the clues that you get from timing of decays or attacks (or detuning) in normal sample playback are not present. RUSS synthesis is very much a mixture of sampling AND synthesis!

A quick word on inharmonics... I have always wondered why subtractive (and other) synthesizers typically give you several choices of oscillator waveform, but only one (white) or maybe a second (pink) choice for 'noise'? There are lots of other sources of inharmonic 'noise' that could be used (hey, even a ring modulator would be better than nothing!), but what tends to be provided is broad-band noise. Yes, you can do quite a lot with that noise by processing it, but, no, there's lots more to inharmonic noises than just broad-spectrum hiss. Now you may be asking: like what? The answer to which is: separated inharmonic sounds. There's a reason why I've been dissatisfied with conventional synthesis noise provision, and if you are reading this, then you are seeing part of the answer. Maybe at some stage I will release a set of inharmonic samples that are completely useless for conventional tuned sounds, but which are very useful in combination with tuned sounds...

Content tips and hints...

The example Kontakt instruments have 'Vel' as part of the name when they have velocity sensitivity built-in. I'm one of those unusual people who likes extreme levels of velocity-driven variation in sounds, and so the sounds that I make tend to incorporate velocity sensitivity. But this may be unusual, as Paul Ward intimated to me at the 2019 Synthfest UK in Sheffield (thoroughly recommended, btw!), and so if you are a 'Controller-mapper' person, then you may want to avoid the Multis with 'Vel' in the name.

Yes, I can spell 'Kontakt', although the autocorrection 'feature' in various layers between me and the Squarespace web-site for Pianobook seems to think it is spelled 'Contact'!

The Ableton Live Instrument Rack instruments didn't make it into the Pianobook Library zip file, but I will try to get an update that includes them. There's just not enough time!

And finally, some thoughts on what you can do with the inharmonic samples. First, some simple things to try.
1. Use inharmonic samples with fast attacks and decays to form the 'Attack' phase of a sound (as popularised by Roland's D-50 synth...).
2. Use the same envelopes for the harmonics and inharmonics, and then alter the keyboard scaling/tracking of the inharmonics so that it doesn't track at all (0% - and this is one reason why Kontakt lets you do this!) through to 100% or more. At zero percent you get an instrument whose size feels strange, whilst as you move towards 100% you get variations of realism. Filtering the inharmonics (or mapping them to velocity) can give some very metallic sounds.
3. Use slow envelopes for the harmonics, and slower envelopes for the inharmonics, and play with the scaling/tracking of the inharmonics (or even reverse them). Band-pass filtering can be good for placing the apparent resonances of the virtual instrument that you are synthesizing.
4. You CAN detune the inharmonics - they don't care! 5ths, 9ths or even totally out-of-tune (or inverted) are all acceptable. Your ears will hear the harmonics as the 'tuned' part, and will assume that everything else is just an integral part of the sound that the instrument makes whilst being played in that acoustic environment. Your entire life has probably been spent listening to sounds where the harmonics and inharmonics are tightly linked together, so you are exceptionally well trained in assuming that this is the case, even when you hear sounds where it isn't a valid model for how the sound has been constructed.
5. You can take the inharmonics from one sample, and play them with the harmonics from another sample. So you could take the high samples and use them in the low register and vice-versa. More broadly, I have some inharmonics taken from a 'classic' monosynth, and they contain some of the distortion, noise, intermodulation, mains hum, hiss and other artefacts that give that monosynth it's particular sound. Add them to another harmonic sample and you get a strange combination of the two 'characters'... Hmm, that's me talking myself into releasing inharmonic samples again...

If you find my writing helpful, informative or entertaining, then please consider visiting this link:

No comments:

Post a Comment