# How best to use "natural frequencies"?

**URL:** <https://discourse.processing.org/t/how-best-to-use-natural-frequencies/10593>\
**Category:** Project Guidance\
**Created:** [April 24, 2019, 10:46am UTC](https://discourse.processing.org/t/how-best-to-use-natural-frequencies/10593 "2019-04-24T10:46:52Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)\
**Post date:** [April 24, 2019, 10:46am UTC](https://discourse.processing.org/t/how-best-to-use-natural-frequencies/10593/1 "2019-04-24T10:46:52Z")

</div>

for learning more about sound lib MINIM  
( @GoToLoop NO, the question is not about the library )  
i play with sound synth, using these “natural frequencies”  
you can hear about in esoteric / meditation videos… but also when you  
dig about the MALTA [Hypogeum](https://en.wikipedia.org/wiki/%C4%A6al-Saflieni_Hypogeum) and its sonic [resonance](https://interestingengineering.com/temples-resonates-frequency-111-hz)  
but personally, i like the interpretation here:  
[Have fun, create and experiment, and don’t let standards hold you back!](https://ask.audio/articles/music-theory-432-hz-tuning-separating-fact-from-fiction)

now in that kind of meditation/healing videos like [this](https://www.youtube.com/watch?v=goyZbut_KFY)  
you hear not only one tone, but also not like a melody?

( sorry long intro )  
question:  
am i supposed to play several of that tones/frequencies at the same time or only ONE and find some fitting chords for the actual one?

my start code:

```auto
// taken from MINIM examples:
/* how to patch more than one UGen to a Summer. AM*/
/* frequencyModulation FM */
/* how to use an FFT to analyze */

// natural frequencies ?
// https://ask.audio/articles/music-theory-432-hz-tuning-separating-fact-from-fiction

// https://pages.mtu.edu/~suits/notefreqs.html

// from video https://www.youtube.com/watch?v=Yimor2jRmCA 
// ancient sumerians counting 12 ( 4 finger left hand) 60 ( 12 * 5 finger right hand)
// The Fibonacci Sequence is the series of numbers: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34,
// angles sum in geometry:
// triangle 180
// rectangle 360
// pentagon 540
// heptagon 900
// six star 1440

// supposed healing frequencies

float[] hf = {
  111, //0/ Hz : cosmic basis? never see it mentioned with that music?
  174, //1/ Hz : Relieves Pain & Stress
  285, //2/ Hz : Heals Tissues & Organs
  396, //3/ Hz : Eliminates Fear
  417, //4/ Hz : Wipes out Negativity
  432, //5/ Hz : The DEEPEST Healing | Let Go Of All Negative Energy
  528, //6/ Hz : Repairs DNA, Brings Positive Transformation 
  639, //7/ Hz : Brings Love & Compassion in Life 
  741, //8/ Hz : Detoxifies Cells & Organs 
  852, //9/ Hz : Awakens Intuition, Raises Energy at Cellular Level
  963, //10/Hz : Connects to Higher Self
  0, //11/
  0, //12/
  0, //13/
  0, //14/
  0, //15/
  0, //16/
  0, //17/
  0, //18/
  0, //19/
  0.33, //20/ Hz : AM amplitude modilation freq.
  20.0, //21/ Hz : FM freq
};

import ddf.minim.*;
import ddf.minim.ugens.*;
import ddf.minim.analysis.*;

Minim minim;
AudioOutput out;
Oscil wave;
Oscil am; // the Oscil we use for AM .
Oscil fm; // the Oscil we use for FM .
FFT fft;

float vol=-34.4; // 6 .. -48 / 100 .. 0 %
boolean f1 = true, f2 = true, f3 = true;

void setup() {
  size(512, 200, P3D); 
  minim = new Minim(this);
  out = minim.getLineOut();
  out.setGain(vol);
  Summer sum = new Summer();
  wave = new Oscil( hf[5], 0.8f, Waves.SINE); // TRIANGLE //frequency 
  am = new Oscil( hf[20], 0.3f, Waves.SINE ); // create a sine wave Oscil for modulating the amplitude of wave
  am.patch( wave.amplitude ); // AM
  if (f1) wave.patch( sum );
  wave = new Oscil( hf[1], 0.2f, Waves.SINE );
  if (f2) wave.patch( sum );
  wave = new Oscil( hf[9], 0.2, Waves.SINE );
  fm = new Oscil( hf[21], 2.0, Waves.SINE ); //FM
  fm.offset.setLastValue( 2*hf[9] ); // set the offset of fm so that it generates values centered around
  fm.patch( wave.frequency );
  if (f3) wave.patch( sum );
  sum.patch( out ); // and the Summer to the output
  fft = new FFT( out.bufferSize(), out.sampleRate() ); // create an FFT object that has a time-domain buffer
}

void draw() {
  background(200, 200, 0);
  fill(100, 0, 200); // text color
  String show = "using: ";
  if (f1) show += hf[5]+" AM by "+hf[20]+" / ";
  if (f2) show += hf[1]+" / ";
  if (f3) show += hf[9]+" with FM +-"+hf[21]+" / ";
  show += " in Hz";
  text(show, 20, height/2-10);
  stroke(0, 100, 200); // line color
  for (int i = 0; i < out.bufferSize() - 1; i++) { // draw the waveform of the output
    line( i, 50 - out.left.get(i)*50, i+1, 50 - out.left.get(i+1)*50 );
    // line( i, 150 - out.right.get(i)*50, i+1, 150 - out.right.get(i+1)*50 ); //mono same, need space for FFT
  }

  fft.forward( out.mix );
  stroke(200, 0, 200); // line color
  // println(fft.specSize()); //513 use 100 first only!
  // for (int i = 0; i < fft.specSize(); i++) line( i, height, i, height - fft.getBand(i) ); 
  for (int i = 0; i < 100; i++) rect( i*5, height, 5, - fft.getBand(i) );
  if ( out.hasControl(Controller.GAIN) ) { // key [+][-] volume control 
    stroke(200, 0, 0);
    fill(200, 0, 0);
    rect(width -21, 0, 20, height);
    noStroke();
    fill(0, 200, 200);
    float h = map(vol, 6, -48, 0, height-2);
    float vpct = map(vol, -48, 6, 0, 100); //println("gain "+vol+" h "+h+" vpct "+vpct);
    rect(width -20, h, 19, height-2);
    out.setGain(vol); // if a gain control is not available, this will do nothing
    if ( mouseX > width -20 && mouseX <width ) { // mouse over slider
      if ( mousePressed ) vol = map(mouseY, 0, height-2, 6, -48); // and clicked
      text("The current gain is " + nf(out.getGain(), 1, 1) +" / "+(int)vpct+" %", 5, 15); // if a gain control is not available this will report zero
    }
  } else text("The output doesn't have a gain control.", 5, 15);
}

```

 ![SNAG-0085](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/3/3223508fdb8e0a9ecb368177356eeef7527ac617.jpeg)

someone play this already?

---

<div class="post-metadata">

**Author:** ![rand\_colors](https://avatars.discourse-cdn.com/v4/letter/r/3ab097/32.png) [@rand\_colors](https://discourse.processing.org/u/rand_colors)\
**Post date:** [April 26, 2019, 10:11am UTC](https://discourse.processing.org/t/how-best-to-use-natural-frequencies/10593/2 "2019-04-26T10:11:24Z")

</div>

I I listened to the video, to me they seem like chords or at least more frequencies at the same time,  
structured timbers.  
The timbre seems to me to be made from a noise that is then filtered, and even reverberated, with even rhythmic modulations or beats.  
Anyway, I think it might help you to see the spectrum, to understand what frequencies there are and with how much band amplitude, if I can give you some advice I would tell you to use [https://www.sonicvisualiser.org/](https://www.sonicvisualiser.org/)  
and maybe even the Chordino plug-in could work, I’m not sure because if the notes are not “standard” maybe it has problems recognizing them.  
Or you could use processing doing an FFT and setting thresholds to see which amplitude values exceed them, but you would encounter problems regarding the nonlinear perception of our ear/brain…  
I hope you find it useful.

---

<div class="post-metadata">

**Author:** ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)\
**Post date:** [April 26, 2019, 10:23am UTC](https://discourse.processing.org/t/how-best-to-use-natural-frequencies/10593/3 "2019-04-26T10:23:14Z")

</div>

> [@rand\_colors](#):
>
> use processing doing an FFT

the sound lib and the minim lib can do FFT on loaded song files,  
i did not know that works on a stream from a browser playing a YouTube video??

---

<div class="post-metadata">

**Author:** ![rand\_colors](https://avatars.discourse-cdn.com/v4/letter/r/3ab097/32.png) [@rand\_colors](https://discourse.processing.org/u/rand_colors)\
**Post date:** [April 26, 2019, 10:33am UTC](https://discourse.processing.org/t/how-best-to-use-natural-frequencies/10593/4 "2019-04-26T10:33:35Z")

</div>

Hi kll, as far as I know you can’t, the .wav or .aiff file is needed.

https://player.vimeo.com/video/138034846

> **[Programming Graphics III: Painting with Sound / tier 5 / code + videos +...](https://gumroad.com/l/ZhTeX)**
>
> tier 5 / “pi” level. code + videos + tshirt + print + drawing. why use a tier buy-in system : In the past, I’ve enjoyed using another learning based platform, my classes were $20 and that was an awesome and fair price based on the type of classes I...

1. minim

2. FFT

3. grouping the spectrum into ranges using linAverages

4. applying window filters to the audio like HAMMING, BLACKMAN, COSINE, GAUSS and others

5. understand the difference between mp3 vs wav

tell me if I can help.

---

<div class="post-metadata">

**Author:** ![rand\_colors](https://avatars.discourse-cdn.com/v4/letter/r/3ab097/32.png) [@rand\_colors](https://discourse.processing.org/u/rand_colors)\
**Post date:** [April 26, 2019, 11:09am UTC](https://discourse.processing.org/t/how-best-to-use-natural-frequencies/10593/5 "2019-04-26T11:09:20Z")

</div>

If you really want you should route the audio using Soundflower for mac [https://soundflower.it.softonic.com/mac](https://soundflower.it.softonic.com/mac) or Jack in windows [http://jackaudio.org/](http://jackaudio.org/)  
and then

```auto
import ddf.minim.*;    
import ddf.minim.analysis.*;

Minim minim;
AudioInput myAudio;
FFT myAudioFFT;

 minim.getLineIn(Minim.STEREO);
myAudioFFT = new FFT(myAudio.bufferSize(), myAudio.sampleRate());

```

and so on…

If you like I can clean an “old” project and share the code

---

<div class="post-metadata">

**Author:** ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)\
**Post date:** [April 26, 2019, 11:19am UTC](https://discourse.processing.org/t/how-best-to-use-natural-frequencies/10593/6 "2019-04-26T11:19:36Z")

</div>

thanks, sadly audacity and sonicvisualiser not install on my current win7 HD,  
( same reason a .dll missing, but when i copy it in still not recognized )  
have to switch computer.  
let me play with jackaudio and processing first.

update:  
-a- i could record a short .wav file from the video where the text says 528Hz  
-b- in an extra project ( copy the file ) i could make a FFT from it and find  
anything but that frequency. as i doubted that frequency info rechecked with an “a.wav” 440Hz file, ok  
-c- nevertheless worked on the sound generation ( main project )  
and have changed from ( vs first post version )

- select from array only one frequency
- the other 2 frequencies are harmonics like 3 and 5
- added a signal mixer with 3 signal sliders add to the master vol slider.

code [here](http://kll.engineering-news.org/kllfusion01/downloads/processing_minim_natural_frequencies.zip)  
looks like a longer project so now please find it ( and updates ) at my [BLOG](http://kll.engineering-news.org/kllfusion01/articles.php?article_id=154#here20)

next step:  
to emulate more what the video does i will try to  
build a master batch like

- each frequency play for ?10?min
- fade out/in to next freq.

far far away:

- bio feedback

---

<div class="post-metadata">

**Author:** ![rand\_colors](https://avatars.discourse-cdn.com/v4/letter/r/3ab097/32.png) [@rand\_colors](https://discourse.processing.org/u/rand_colors)\
**Post date:** [April 26, 2019, 10:18pm UTC](https://discourse.processing.org/t/how-best-to-use-natural-frequencies/10593/7 "2019-04-26T22:18:50Z")

</div>

![](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/9/99a235b09c4e8cb1c03eb403740a8ee91986ec25.png)  
697/5000

I took a look at the audio spectrum at 528Hz using sonicvisualiser, honestly I don’t see any 528Hz, the frequency that has the highest amplitude is around 65Hz.  
However I don’t think it is possible from the point of view of sound design to redo this timbre with additive synthesis.  
I think it would be better to use a bank of band-pass filters and pink noise and calibrate the filters with the main frequencies, going to look at how the spectrum is composed.  
Then I would add a reverb, with a good low-pass filter and a compressor.  
I might even add a sine wave to reinforce the lowest / main frequency.
