Skip to content

Sampling engine implemented in Web Audio API (rough re-creation of Dirt)

License

Notifications You must be signed in to change notification settings

JamieBeverley/WebDirt

 
 

Repository files navigation

WebDirt is a rewrite of Alex McLean's Dirt sampling engine (by Alex McLean) to run in the web browser using the Web Audio API. Contributors are Jamie Beverley and David Ogborn.

From a JavaScript point of view it is used as follows.

  1. Make a WebDirt object:
webDirt = new WebDirt();
  1. Then, you can play samples in 4 ways:
webDirt.playSample(msg); // play an individual sample
webDirt.playScore(score); // play an array of messages (a score)
webDirt.loadAndPlayScore(url); // load a score from an arbitrary URL and play it when ready
webDirt.subscribeToTidalSocket(url,withLog); // subscribe to a TidalSocket over WebSockets, logging is off if withLog == false

You can preload a given sample (name and number) into WebDirt's sample bank to make sure it is available for immediate use:

webDirt.sampleBank.load("name",7); // to preload the 8th sample in the sample folder indexed by 'name'

For running test.html in Chrome, open Chrome with tags:

OS X: open -a 'Google Chrome' --args -allow-file-access-from-files

Windows: C:\ ... \Application\chrome.exe --allow-file-access-from-files

More info soon!!

About

Sampling engine implemented in Web Audio API (rough re-creation of Dirt)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 85.8%
  • HTML 12.6%
  • Shell 1.6%