Projets
Voir sur GitHub
mohayonao/pico.js
À propos
Audio processor for the cross-platform
Design et médiasProgression mesurée des étoiles
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- Historique en cours
Variations nettes sur des périodes qui se chevauchent, pas des totaux quotidiens. Les mesures absentes restent vides. Les étoiles indiquent l’intérêt, pas la qualité.
README.md
Originalpico.js
Audio processor for the cross-platform
Support
| Support | API | |
|---|---|---|
| Google Chrome 10+ | :o: | Web Audio API |
| Firefox 25+ | :o: | Web Audio API |
| Safari 6+ | :o: | Web Audio API |
| Opera 15+ | :o: | Web Audio API |
| Internet Explorer 10 | :o: | Flash fallback |
| Node.js 0.10 | :o: | node-speaker |
Installation
npm:
npm install node-pico
bower:
bower install pico.js
downloads:
- pico.js
- pico.min.js
- pico.swf - must be put in the same directory with the pico.js.
API
Pico.play(audioprocess: function): voidPico.pause(): voidPico.sampleRate: numberPico.bufferSize: numberPico.isPlaying: boolean
Example
var Pico = require("node-pico");
function sinetone() {
var x1 = 0, y1 = 440 / Pico.sampleRate;
var x2 = 0, y2 = 442 / Pico.sampleRate;
return function(e) {
var out = e.buffers;
for (var i = 0; i < e.bufferSize; i++) {
out[0][i] = Math.sin(2 * Math.PI * x1) * 0.25;
out[1][i] = Math.sin(2 * Math.PI * x2) * 0.25;
x1 += y1;
x2 += y2;
}
};
}
Pico.play(sinetone());
setTimeout(function() {
Pico.pause();
}, 5000);
How to play other examples on node.js
$ npm install .
$ npm run build
$ node examples
Development
build: 6to5 -> browserify -> uglify
npm run build
test: mocha
npm run test
coverage: istanbul
npm run cover
lint: jshint
npm run lint
License
Explorer des projets similaires
Chargement…