|
|
|
|
|
by md224
5370 days ago
|
|
Certainly... if I wanted to create an app where a user could play a virtual "instrument" via the computer keyboard, I would want to trigger a specific audio sample (e.g. a piano note or a drum hit) when the user presses a key. There are already several libraries out there (SoundManager2 comes to mind) that allow for fairly simple cross-browser audio output, but the problem is procuring the audio samples themselves. I could go to the trouble of scouring the internet for solid sound samples, uploading all of them to my server, and setting up all of the note/sample mappings... however, much like Google has made it unnecessary for every web developer to upload all the custom fonts they want to their server, I'd like an API that allows me to browse and include instrument sample packs without having to first track down the samples, upload them, and manually map everything. 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. |
|