Comments (7)
Sorry, I am no longer using timbre.js.
If my memory is correct, the below code maybe replay repeatedly.
var T = require("timbre");
var audio_src = T("audio", {}).loadthis("cicada_2.wav");
setInterval(function(){
console.log("trigger");
audio_src.clone().play().on("ended", function() {
this.pause();
});
}, 2000);
from timbre.js.
Thank you for the quick response!
So timbre isn't really supported anymore? I wonder if you have any other suggestions for node.js audio modules that can easily trigger samples.
from timbre.js.
The WebAudio API has most of the convenience and features you're probably looking for.
There's a number of great tutorials.
I wrote a very simple wrapper on top of the audio api in order to do what you're talking about. It's called groove.js. It's not as fleshed-out as you'll probably want it to be, but it got me started on building this project.
Here's the the code might look like using coffeescript, promises and angular.js: https://github.com/jbielick/beetmachine/blob/master/app/scripts/services/sample.coffee
from timbre.js.
Thank you for the suggestion, @jbielick.
I'm working in node.js and was drawn to timbre.js because it works with the speaker module. I do see that there is a web audio module for node, though, so maybe that's the better direction.
from timbre.js.
ah, interesting. I hadn't gotten to that point yet, but I'm also interested in building / sequencing the patterns built in the browser on the server side so they can be written to file (wav). Let me know what you find if don't mind!
from timbre.js.
I think I'm going to stick with timbre for my current prototype now that I have sounds triggering. I'll keep an eye out for other options.
from timbre.js.
So has timbre become redundant because of the web audio api?That's a pity, I really liked this project. Keep up the good work!
from timbre.js.
Related Issues (20)
- Stream HOT 1
- How to get Timbre.js version? HOT 2
- noteOff() does not work HOT 2
- clarify listener registration
- update the tags to 14.11.25 HOT 2
- error with npm install HOT 3
- Dynamically adjusting ADSR and other parameters
- Unable to check demo on frontend HOT 2
- Need complete stand alone examples HOT 3
- ended event not working using array of frequencies.
- How to play chords using soundfont (mp3) capability? HOT 1
- Brown Noise
- files hosted on cdnjs HOT 1
- Documentation of available parametters T() HOT 1
- I discover
- Frequency modulation (FM)
- support on firefox?
- how do I turn off the sample?
- Loading wav's from a file not working on Chrome(59.0.3071.86) and Opera(45.0.2552.888).
- Frequency modification in realtime dephases oscillators.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from timbre.js.