This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const reader = new FileReader(); | |
reader.addEventListener('load', () => { | |
CSS.paintWorklet.addModule(reader.result); | |
}); | |
reader.readAsText(blob); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
avrdude -c USBasp -p m328p -b 19200 -e -U flash:w:"TransistorTester.hex":a -U eeprom:w:"TransistorTester.eep":a -U lfuse:w:0xF7:m -U hfuse:w:0xD9:m -U efuse:w:0xFC:m |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Component({ | |
selector: 'app-not-found', | |
template: ` | |
<h2> | |
404 - Page not found | |
</h2> | |
<p *ngIf="path">You might want to go to the <a [routerLink]="path">"{{ path }}" page</a></p> | |
` | |
}) | |
export class NotFoundComponent implements OnInit { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
guitarInput | |
.connect(convolver) | |
.connect(makeUpGain) | |
.connect(bassNode) | |
.connect(midNode) | |
.connect(trebleNode) | |
.connect(context.destination); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const level = 5; | |
const duration = 0.01; | |
midNode.gain.setTargetAtTime(level, context.currentTime, duration); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const bassNode = new BiquadFilterNode(context, { | |
type: 'lowshelf', | |
frequency: 500 | |
}); | |
const midNode = new BiquadFilterNode(context, { | |
type: 'peaking', | |
Q: Math.SQRT1_2, | |
frequency: 1500 | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const makeUpGain = new GainNode(context, { | |
// Need to be adjusted to a particular IR. | |
gain: 5 | |
}); | |
guitarInput | |
.connect(convolver) | |
.connect(makeUpGain) | |
.connect(context.destination); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
guitarInput.connect(convolver).connect(context.destination); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const convolver = new ConvolverNode(context); | |
fetch('impulse.wav') | |
.then(response => response.arrayBuffer()) | |
.then(buffer => { | |
context.decodeAudioData(buffer, decoded => { | |
convolver.buffer = decoded; | |
}) | |
.catch((err) => console.error(err)); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const audio = document.createElement('audio'); | |
console.log(audio.canPlayType('audio/wav')); // "maybe" | |
if (!audio.canPlayType('audio/wav')) { | |
console.log('The format is not supported!'); | |
} |
NewerOlder