Ask HN: Has anyone developed a web API for sound samples?
Does such an API exist? If not, I feel like this would be an incredibly useful product that many music-oriented web developers could benefit from. There's even a good chance I'd pay for it!
Does such an API exist? If not, I feel like this would be an incredibly useful product that many music-oriented web developers could benefit from. There's even a good chance I'd pay for it!
What would have been the ideal solution for me would have been a JS script I could have included then simply instantiated with a sound (like 'bell chime') and exposes simple javascript controls like goTo, play, stop, pause etc and worked seamlessly cross-browser with HTML5 and flash fallback. I know sound players like this exist (minues he included sound bytes) but they all have the overhead of the UI for player controls.
The goal is to make client-side samplers as painless as possible, lowering the barrier to real-time music generation on the web... kind of like a modern alternative to simple MIDI instruments.
I could see this being useful not only for virtual web instruments, but also for any website that wants to utilize some form of dynamic musical feedback.
EDIT:
I could see this being implemented in a lightweight or a heavy-duty fashion:
1) Lightweight: API merely provides note-mapped URLs to the audio samples, up to the developer to decide how to pull in each sample and store/output it.
2) Heavy-duty: API takes care of storage and output. Creates an instrument object with a play method that takes a note value (MIDI value?) as input. This is more in line with what ecaroth suggested.