OAVp5.mic.sensitivity#
variableoav-p5OAVp5.mic.sensitivityAlso: OAVp5.mic.gain
The microphone's sensitivity: 1 normally, 2 for twice as sensitive. micSensitivity() sets it; OAVp5.mic.gain is the old name.
The number multiplies what the microphone hears: on micLevel 2 adds 6 dB, on bass, mid and treble it multiplies by 2. Read it to show the current setting, and set it with micSensitivity(), which checks the number.
- Type
Number- Range
0.05..20
Starts at 1. micSensitivity(v) keeps what you give it between 0.05 and 20.
Notes
OAVp5.mic.gainis the same value under the name oav-p5 0.3.0 used. Assigning to either works (OAVp5.mic.gain = 2) but is not held between 0.05 and 20, andgainfalls back to 1 for a number that is not above 0.
Examples
function setup() {
createCanvas(400, 300);
micSensitivity(3); // a quiet or far-away microphone
}
function draw() {
background(20);
fill(255);
text('sensitivity ' + OAVp5.mic.sensitivity, 20, 30); // 3
circle(width / 2, height / 2, 50 + micLevel * 300);
}Related
micSensitivity()Makes the microphone more or less sensitive:micSensitivity(2)is twice as sensitive,micSensitivity()says what it is now.micLevelHow loud the microphone hears things, from 0 (a quiet room) to 1 (shouting).bassHow much of the microphone's sound is low (bass), middle (mid) or high (treble), each from 0 to 1.