open-audiovisual
Search GitHub

oav-p5 reference · Microphone and audio analysis

OAVp5.mic.floor#

variableoav-p5
OAVp5.mic.floor

The room's own noise as oav-p5 has measured it, in dBFS: the level that micLevel treats as silence (plus 6 dB).

A humming classroom should not read as loud, so micLevel is measured from the room itself: this floor follows the quietest recent readings. It drops within a second when the room gets quieter and rises at most 1.5 dB a second when it gets noisier, so a voice never becomes the new silence. 6 dB above the floor reads 0 on micLevel.

Type
Number
Range
-70..-45

Starts at −60 and is always held between −70 and −45. Updated once per display frame while the microphone is on.

Notes

  • Stopping the microphone does not reset it: the next start continues from the last floor.

Examples

jsOpenProcessing ↗
function setup() {
  createCanvas(400, 300);
  startMic();
}

function draw() {
  background(20);
  fill(255);
  text('level ' + nf(OAVp5.mic.db, 1, 1) + ' dBFS', 20, 30);
  text('room noise ' + nf(OAVp5.mic.floor, 1, 1) + ' dBFS', 20, 60);
  text('micLevel ' + nf(OAVp5.mic.level, 1, 2), 20, 90);
}
Shows the level, the room's noise floor and the resulting micLevel. Keep quiet for a few seconds and watch the floor settle. Asks for the microphone

Related

  • micLevel How loud the microphone hears things, from 0 (a quiet room) to 1 (shouting).
  • OAVp5.mic.db The loudness of the microphone in decibels relative to full scale (dBFS): 0 is as loud as it gets, −100 is silence or the microphone being off.
  • OAVp5.mic.rms The raw loudness of the microphone: a smoothed RMS, 0 to 1, before oav-p5 turns it into the decibel scale of micLevel.
  • OAVp5.mic.level The same 0 to 1 loudness as micLevel, read without ever turning the microphone on.

p5/oav-p5.js, line 900

↑ Back to top · All names