devNotes 5-30-16 onFilterRead, windowing and FFTs

music-pitch-432-fibonacci (1)

note1

Note_2

Note

Frequency (Hz)

Wavelength (cm)

C0

16.05

2148.96

 C#0/Db0

17.01

2028.35

D0

18.02

1914.50

 D#0/Eb0

19.09

1807.05

E0

20.23

1705.63

F0

21.43

1609.90

 F#0/Gb0

22.70

1519.54

G0

24.05

1434.26

 G#0/Ab0

25.48

1353.76

A0

27.00

1277.78

 A#0/Bb0

28.61

1206.06

B0

30.31

1138.37

C1

32.11

1074.48

 C#1/Db1

34.02

1014.17

D1

36.04

957.25

 D#1/Eb1

38.18

903.53

E1

40.45

852.81

F1

42.86

804.95

 F#1/Gb1

45.41

759.77

G1

48.11

717.13

 G#1/Ab1

50.97

676.88

A1

54.00

638.89

 A#1/Bb1

57.21

603.03

B1

60.61

569.19

C2

64.22

537.24

 C#2/Db2

68.04

507.09

D2

72.08

478.63

 D#2/Eb2

76.37

451.76

E2

80.91

426.41

F2

85.72

402.47

 F#2/Gb2

90.82

379.89

G2

96.22

358.56

 G#2/Ab2

101.94

338.44

A2

108.00

319.44

 A#2/Bb2

114.42

301.52

B2

121.23

284.59

C3

128.43

268.62

 C#3/Db3

136.07

253.54

D3

144.16

239.31

 D#3/Eb3

152.74

225.88

E3

161.82

213.20

F3

171.44

201.24

 F#3/Gb3

181.63

189.94

G3

192.43

179.28

 G#3/Ab3

203.88

169.22

A3

216.00

159.72

 A#3/Bb3

228.84

150.76

B3

242.45

142.30

C4

256.87

134.31

 C#4/Db4

272.14

126.77

D4

288.33

119.66

 D#4/Eb4

305.47

112.94

E4

323.63

106.60

F4

342.88

100.62

 F#4/Gb4

363.27

94.97

G4

384.87

89.64

 G#4/Ab4

407.75

84.61

A4

432.00

79.86

 A#4/Bb4

457.69

75.38

B4

484.90

71.15

C5

513.74

67.15

 C#5/Db5

544.29

63.39

D5

576.65

59.83

 D#5/Eb5

610.94

56.47

E5

647.27

53.30

F5

685.76

50.31

 F#5/Gb5

726.53

47.49

G5

769.74

44.82

 G#5/Ab5

815.51

42.30

A5

864.00

39.93

 A#5/Bb5

915.38

37.69

B5

969.81

35.57

C6

1027.47

33.58

 C#6/Db6

1088.57

31.69

D6

1153.30

29.91

 D#6/Eb6

1221.88

28.24

E6

1294.54

26.65

F6

1371.51

25.15

 F#6/Gb6

1453.07

23.74

G6

1539.47

22.41

 G#6/Ab6

1631.01

21.15

A6

1728.00

19.97

 A#6/Bb6

1830.75

18.84

B6

1939.61

17.79

C7

2054.95

16.79

 C#7/Db7

2177.14

15.85

D7

2306.60

14.96

 D#7/Eb7

2443.76

14.12

E7

2589.07

13.33

F7

2743.03

12.58

 F#7/Gb7

2906.14

11.87

G7

3078.95

11.21

 G#7/Ab7

3262.03

10.58

A7

3456.00

9.98

 A#7/Bb7

3661.50

9.42

B7

3879.23

8.89

C8

4109.90

8.39

 C#8/Db8

4354.29

7.92

D8

4613.21

7.48

 D#8/Eb8

4887.52

7.06

E8

5178.15

6.66

F8

5486.06

6.29

 F#8/Gb8

5812.28

5.94

G8

6157.89

5.60

 G#8/Ab8

6524.06

5.29

A8

6912.00

4.99

 A#8/Bb8

7323.01

4.71

B8

7758.46

4.45

dfghfgh-62

Pythagoras_and_his_Monochord

Harmonics_and_Overtones_of_the_sun

http://www.roelhollander.eu/en/432-tuning/the-scale-of-fifths/

music-pitch-432-fibonacci (1)

Fundamental Frequencies and Detecting Notes

using UnityEngine;
using System.Collections;

[RequireComponent(typeof(AudioSource))]
public class MicrophoneInput : MonoBehaviour {
  public float sensitivity = 100.0f;
  public float loudness = 0.0f;
  public float frequency = 0.0f;
  public int samplerate = 11024;

  void Start() {
    audio.clip = Microphone.Start(null, true, 10, samplerate);
    audio.loop = true; // Set the AudioClip to loop
    audio.mute = true; // Mute the sound, we don't want the player to hear it
    while (!(Microphone.GetPosition(AudioInputDevice) > 0)){} // Wait until the recording has started
    audio.Play(); // Play the audio source!
  }

  void Update(){
    loudness = GetAveragedVolume() * sensitivity;
    frequency = GetFundamentalFrequency();
  }

  float GetAveragedVolume()
  {
    float[] data = new float[256];
    float a = 0;
    audio.GetOutputData(data,0);
    foreach(float s in data)
    {
      a += Mathf.Abs(s);
    }
    return a/256;
  }

  float GetFundamentalFrequency()
  {
    float fundamentalFrequency = 0.0f;
    float[] data = new float[8192];
    audio.GetSpectrumData(data,0,FFTWindow.BlackmanHarris);
    float s = 0.0f;
    int i = 0;
    for (int j = 1; j < 8192; j++)
    {
      if ( s < data[j] )
      {
        s = data[j];
        i = j;
      }
    }
    fundamentalFrequency = i * samplerate / 8192;
    return fundamentalFrequency;
  }
}

jmjmjjm

 

gfdhgdhfg1

 

rgdgfhdfhgfh

 

 

sdfgfdgsf8