make vowel work with node
This commit is contained in:
parent
4406dd88d1
commit
149b2ab9f9
1 changed files with 27 additions and 26 deletions
|
|
@ -6,7 +6,7 @@ export var vowelFormant = {
|
|||
o: { freqs: [430, 820, 2700, 3000, 3300], gains: [1, 0.3162, 0.0501, 0.0794, 0.01995], qs: [40, 80, 100, 120, 120] },
|
||||
u: { freqs: [370, 630, 2750, 3000, 3400], gains: [1, 0.1, 0.0708, 0.0316, 0.01995], qs: [40, 60, 100, 120, 120] },
|
||||
};
|
||||
|
||||
if (typeof GainNode !== 'undefined') {
|
||||
class VowelNode extends GainNode {
|
||||
constructor(ac, letter) {
|
||||
super(ac);
|
||||
|
|
@ -35,3 +35,4 @@ class VowelNode extends GainNode {
|
|||
AudioContext.prototype.createVowelFilter = function (letter) {
|
||||
return new VowelNode(this, letter);
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue