How to use the AudioAnalyser function from three

Find comprehensive JavaScript three.AudioAnalyser code examples handpicked from public code repositorys.

102
103
104
105
106
107
108
109
110
111
      visElements.sound.setLoop(visElements.loop);
      visElements.sound.setVolume(visElements.volume);
      visElements.sound.play();
  });

  analyser = new THREE.AudioAnalyser( audLoad, 32 );
}

function createMaterials() {
  defaultMaterial = new THREE.ShaderMaterial({
fork icon16
star icon0
watch icon2

34
35
36
37
38
39
40
41
42
43
  if (playOnStart) {
    if (self.sound.source.buffer) {
      self.play();
    }
  }
  self.analyser = new THREE.AudioAnalyser(self.sound, 32);
  Events.emit('audioLoaded', id);
  Events.on('pauseAll', self.pauseAll.bind(self));
  Events.on('updateScene', self.update.bind(self));
});
fork icon10
star icon33
watch icon10

221
222
223
224
225
226
227
228
229
230
  sound.setBuffer(buffer);
  sound.setLoop(true);
  sound.setVolume(0.3);
  sound.play();
});
analyser = new THREE.AudioAnalyser(sound, fftSize);
uniformsAudio = {
  tAudioData: {
    value: new THREE.DataTexture(analyser.data, fftSize / 2, 1, THREE.LuminanceFormat)
  }
fork icon0
star icon0
watch icon0

48
49
50
51
52
53
54
55
56
57
    sound.setBuffer(buffer);
    sound.setLoop(true);
    sound.setVolume(0.5);
    sound.play();
});
var analyser = new THREE.AudioAnalyser(sound, 32);
analyser.getAverageFrequency();


var clock = new THREE.Clock();
fork icon0
star icon0
watch icon0

25
26
27
28
29
30
31
32
33
  sound.setVolume(0.5);
  sound.play();
});

// create an AudioAnalyser, passing in the sound and desired fftSize
analyser = new THREE.AudioAnalyser( sound, 32 );

// LOOK: the line below is synyatic sugar for the code above. Optional, but I sort of recommend it.
// var {scene, camera, renderer, gui, stats} = framework; 
fork icon0
star icon0
watch icon1

Other functions in three

Sorted by popularity

function icon

three.Vector3 is the most popular function in three (22341 examples)