Quantcast

Bell sounds and the mind

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Bell sounds and the mind

tedorsc
Hello,

I am wondering about these two things:

1) Different approaches (SynthDefs) to synthesise bell sounds in SC.

2) The difference between how the mind/brain is affected by a complex aperiodic sound (e.g. white noise), a simple aperiodic sound (e.g. bell) and a periodic sound (e.g. a note on a piano). Has there been a measurable difference seen (perhaps in EEG) in related fields?

Any tips greatly appreciated!

k
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Bell sounds and the mind

Tom Hall-2
Re your 1), the example below not a bad start, from Peter Fitton's book, 'Programming digital music with SuperCollider'

The code and further details here:

http://www.fittonmusic.com/resources.html


/*** bell.scd: a bell sound using additive synthesis ***/
(
SynthDef (\bell, {|fund=440, dur=1|
var freqs, offsets, amps, durs, env, envBell, mixer;
freqs = [0.58, 0.58, 0.91, 0.91, 1.6, 1.2, 2, 2.7, 3, 3.75, 4.09];
offsets = [0, 1, 0, 1.7, 0, 0, 0, 0, 0, 0, 0];
amps = [1, 0.67, 1, 1.8, 1.67, 2.67, 1.46, 1.33, 1.33, 1, 1.33].normalizeSum;
durs = [1, 0.9, 0.65, 0.55, 0.35, 0.325, 0.25, 0.2, 0.15, 0.1, 0.075];
mixer = Mix.fill(freqs.size, {|i|
var amp, freq;
freq = fund*freqs[i]+offsets[i];
amp = amps[i];
env = EnvGen.kr(Env.perc(releaseTime:dur*durs[i]-0.01));
SinOsc.ar(freq, mul:amp*env)
});
envBell = EnvGen.kr(Env.perc(releaseTime:dur-0.01), doneAction:2);
Out.ar(0, mixer*envBell)
}).add;
)
Synth(\bell, [\dur, 10, \fund, 440]);

Some ideas here:

http://cnx.org/contents/ubQNaUYk@1/-mini-project--Risset-Bell-Syn



> On 3 Mar 2017, at 15:23, tedorsc <[hidden email]> wrote:
>
> Hello,
>
> I am wondering about these two things:
>
> 1) Different approaches (SynthDefs) to synthesise bell sounds in SC.
>
> 2) The difference between how the mind/brain is affected by a complex
> aperiodic sound (e.g. white noise), a simple aperiodic sound (e.g. bell) and
> a periodic sound (e.g. a note on a piano). Has there been a measurable
> difference seen (perhaps in EEG) in related fields?
>
> Any tips greatly appreciated!
>
> k
>
>
>
> --
> View this message in context: http://new-supercollider-mailing-lists-forums-use-these.2681727.n2.nabble.com/Bell-sounds-and-the-mind-tp7630987.html
> Sent from the SuperCollider Users New (Use this!!!!) mailing list archive at Nabble.com.
>
> _______________________________________________
> sc-users mailing list
>
> info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
> archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
> search: http://www.listarc.bham.ac.uk/lists/sc-users/search/


_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Bell sounds and the mind

Tim Walters
Phase modulation is another technique:

(
SynthDef(\fmBell, { |out=0, freq=110, attack = 0.02, decay=8.0, amp=0.125|
    var mod2 = EnvGen.kr(Env.perc(attack, decay/3)) * SinOsc.ar(freq * 11.47);
    var mod1 = EnvGen.kr(Env.perc(attack, decay * 2/3)) * SinOsc.ar(freq * 9.86, mod2 * 1.5);
    var sig = EnvGen.kr(Env.perc(attack, decay), doneAction: 2) * SinOsc.ar(freq * [0.99, 1.01], mod1 * 1.5);
    OffsetOut.ar(out, sig * amp)
}).add;
)

a = Synth(\fmBell);


On 3/3/17 9:02 AM, Tom HALL wrote:
(
SynthDef (\bell, {|fund=440, dur=1|
var freqs, offsets, amps, durs, env, envBell, mixer;
freqs = [0.58, 0.58, 0.91, 0.91, 1.6, 1.2, 2, 2.7, 3, 3.75, 4.09];
offsets = [0, 1, 0, 1.7, 0, 0, 0, 0, 0, 0, 0];
amps = [1, 0.67, 1, 1.8, 1.67, 2.67, 1.46, 1.33, 1.33, 1, 1.33].normalizeSum;
durs = [1, 0.9, 0.65, 0.55, 0.35, 0.325, 0.25, 0.2, 0.15, 0.1, 0.075];
mixer = Mix.fill(freqs.size, {|i|
var amp, freq;
freq = fund*freqs[i]+offsets[i];
amp = amps[i];
env = EnvGen.kr(Env.perc(releaseTime:dur*durs[i]-0.01));
SinOsc.ar(freq, mul:amp*env)
});
envBell = EnvGen.kr(Env.perc(releaseTime:dur-0.01), doneAction:2);
Out.ar(0, mixer*envBell)
}).add;
)
Synth(\bell, [\dur, 10, \fund, 440]);

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Bell sounds and the mind

Stefano_Catena
In reply to this post by Tom Hall-2
I feel very good in using PinkNoise and DynKlank.ar for bells: 

~bellA = [-19.4, -18.2, -17, -14.8, -23.2, -19, -19.4, -26.7, -21, -27.1, -39, -36.3];
~bellF = [1, 2.010752688172, 2.4408602150538, 4.0537634408602, 5.0430107526882, 5.9784946236559, 8.1827956989247, 10.559139784946, 13.021505376344, 15.58064516129, 18.172043010753, 20.806451612903];
~bellRing = [10, 8, 7, 9, 5, 6, 6, 8, 5, 4, 3, 7];


SynthDef(\bell, {
arg f = 50, randLo, randHi, dur, out;
var sig, env;
env = EnvGen.kr(Env.new([1, 0.001], [1], \exp), 1, timeScale:dur, doneAction:2);
sig = LPF.ar(PinkNoise.ar, 10000);
sig = DynKlank.ar(`[(~bellF*f)+ExpRand(randLo, randHi), ~bellA.dbamp, ~bellRing], sig)*0.025;
Out.ar(out, sig*env);
}).add;
Synth(\bell, [\f, 93, \randLo, 1, \randHi, 1, \dur, 10]);

This makes a pretty convincing bell sound, rather than using additive synthesis!
Beware that the higher you go with the fundamental frequency and less convincing will be the resynthesis. 
I made this by just analysing a bell sound in Audacity.

Stefano

On Fri, Mar 3, 2017 at 12:02 PM, Tom HALL <[hidden email]> wrote:
Re your 1), the example below not a bad start, from Peter Fitton's book, 'Programming digital music with SuperCollider'

The code and further details here:

http://www.fittonmusic.com/resources.html


/*** bell.scd: a bell sound using additive synthesis ***/
(
SynthDef (\bell, {|fund=440, dur=1|
var freqs, offsets, amps, durs, env, envBell, mixer;
freqs = [0.58, 0.58, 0.91, 0.91, 1.6, 1.2, 2, 2.7, 3, 3.75, 4.09];
offsets = [0, 1, 0, 1.7, 0, 0, 0, 0, 0, 0, 0];
amps = [1, 0.67, 1, 1.8, 1.67, 2.67, 1.46, 1.33, 1.33, 1, 1.33].normalizeSum;
durs = [1, 0.9, 0.65, 0.55, 0.35, 0.325, 0.25, 0.2, 0.15, 0.1, 0.075];
mixer = Mix.fill(freqs.size, {|i|
var amp, freq;
freq = fund*freqs[i]+offsets[i];
amp = amps[i];
env = EnvGen.kr(Env.perc(releaseTime:dur*durs[i]-0.01));
SinOsc.ar(freq, mul:amp*env)
});
envBell = EnvGen.kr(Env.perc(releaseTime:dur-0.01), doneAction:2);
Out.ar(0, mixer*envBell)
}).add;
)
Synth(\bell, [\dur, 10, \fund, 440]);

Some ideas here:

http://cnx.org/contents/ubQNaUYk@1/-mini-project--Risset-Bell-Syn



> On 3 Mar 2017, at 15:23, tedorsc <[hidden email]> wrote:
>
> Hello,
>
> I am wondering about these two things:
>
> 1) Different approaches (SynthDefs) to synthesise bell sounds in SC.
>
> 2) The difference between how the mind/brain is affected by a complex
> aperiodic sound (e.g. white noise), a simple aperiodic sound (e.g. bell) and
> a periodic sound (e.g. a note on a piano). Has there been a measurable
> difference seen (perhaps in EEG) in related fields?
>
> Any tips greatly appreciated!
>
> k
>
>
>
> --
> View this message in context: http://new-supercollider-mailing-lists-forums-use-these.2681727.n2.nabble.com/Bell-sounds-and-the-mind-tp7630987.html
> Sent from the SuperCollider Users New (Use this!!!!) mailing list archive at Nabble.com.
>
> _______________________________________________
> sc-users mailing list
>
> info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
> archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
> search: http://www.listarc.bham.ac.uk/lists/sc-users/search/


_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Bell sounds and the mind

ddw_music
In reply to this post by tedorsc
tedorsc wrote
1) Different approaches (SynthDefs) to synthesise bell sounds in SC.
My favorite technique for bells is modal synthesis:

- A noise burst with a very short percussive envelope,
- ... fed into a bank of ringing filters.

The ringing filters effectively act like the additive synthesis that Tom mentioned, except that you get the exponentially-decaying envelopes for each partial "for free" from the filter's impulse response, *and* each note sounds a little different. Why? Noise has a consistent spectrum when averaged over long periods of time, but the localized, moment-to-moment spectrum is constantly changing. The short percussive envelope "freezes" a localized spectrum, which is very likely to be different from its neighbors, and these subtle changes means that the filter responses will be slightly stronger or weaker -- kind of like, you can't strike a physical bell twice in exactly the same place with exactly the same force.

// noise burst spectra
(
var size = 2048,
env = Env.perc(0.01, 0.08).discretize(size),
// if you have the ddwPatterns quark, Pmcvoss = pink noise;
// otherwise fall back to white noise
pattern = if('Pmcvoss'.asClass.notNil) {
        'Pmcvoss'.asClass.new(-1, 1, 8, size)
} {
        Pwhite(-1, 1, size)
},
n = 3;

n.collect {
        var noise = pattern.asStream.all * env,
        fft = noise.as(Signal).fft(Signal.newClear(size), Signal.fftCosTable(size)).asPolar;
        fft.rho[0 .. size div: 2].as(Array)
}.lace(size * n div: 2).plot(numChannels: n);
)

And, a basic synth -- tune the partials, amps and durs to taste. (A useful trick: I find often, with ringing filters, that an impulse at the beginning causes a click. For a single ringing filter, Formlet.ar deals with that by subtracting a shorter impulse response from a longer one. That is: Formlet = Ringz(... decay) - Ringz(... attack). Klank = bank of Ringz. So, a bank of Formlets can be done by Klank(... decay) - Klank(... attack)!)

a = { |freq = 110, atk = 0.05, dcy = 2, amp = 0.01|
        var exc = PinkNoise.ar(amp) * EnvGen.ar(Env.perc(0.005, 0.04)),
        n = 8,
        partials = Array.fill(n, { |i| (i + 1) * (Rand(-0.5, 0.5).midiratio) }),
        amps = Array.fill(n, 1),
        durs = Array.fill(n, 1),
        sig = Klank.ar(`[partials, amps, durs], exc, freq, decayscale: dcy)
        - Klank.ar(`[partials, amps, durs], exc, freq, decayscale: atk);
        DetectSilence.ar(sig, doneAction: 2);
        sig.dup
}.play;

Some recent work of mine, using this technique extensively:

https://soundcloud.com/dewdrop_world/jupiter-chimes

Question #2, I have no idea.

hjh
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Bell sounds and the mind

tedorsc
Thanks for these examples. They are all very different, which I like as they provide different perspectives to look at the same thing.

The first one from Tom is the easiest to understand. Great!

Tim's phase modulation is interesting. I broke the code down to pieces so I can understand how exactly the different lengths for the frequencies are generated by the EnvGen.

(
(
SynthDef(\fmBell, { |out=0, freq=110, attack = 0.02, decay=8.0, amp=0.125|
        var mod2 = EnvGen.kr(Env.perc(attack, decay/3)) * SinOsc.ar(freq * 11.47);
        var mod1 = EnvGen.kr(Env.perc(attack, decay * 2/3)) * SinOsc.ar(freq * 9.86, mod2 * 1.5);
        // var mod01 = SinOsc.ar(freq * 9.86, mod2 * 1.5);
        // var mod02 = SinOsc.ar(freq * 9.86, 1);
        // var mod03 = SinOsc.ar(freq, 1);
        var mod04 = 1;
        var env = EnvGen.kr(Env.perc(attack, decay), doneAction: 2);
        var sig = SinOsc.ar([freq,freq], mod04) * env;
        OffsetOut.ar(out, sig * amp)
}).add;
).play;
)

Example by Stefano sounds the most natural I think. What exactly did you do in Audacity? Also, what would I use to analyse a soundfile in SuperCollider to see the same results?

In the fourth example by James, this modal synthesis is also interesting. Changing the size of the envelope can make interesting sounds as well, although sometimes there was distortion.

There is still some learning to do here: I will try to understand the connection between ring modulation and Klank.

When it comes to bells, this site seems to be useful:

"http://www.hibberts.co.uk/".openOS;

Thank you, k
Loading...