Skip to content

many20/sonic-quiche

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sonic-quiche for JavaScript

Web Audio API implementation of Sonic Pi

This project tries to translate Ruby code to js, but in js there is no wait() Function and also without wait you can´t sync threads the way sonic pi does it. But the ideas for this project are nice and I want to test if the browser worker api has problems to do timing critical jobs.

I dropped the ruby-to-js thing and translated parts of the api to js and with help q.js I programmed an asyc wait.

example:

loop("loop1", (p) => {
return p
    .then(() => {

        //print("d")

        sample("drum_bass_soft", {
            finish: 0.1
        });

    })
    .delay(500)
    .then(() => {

        sample("drum_bass_hard", {
            finish: 0.1
        });

    })
    .delay(500)
});

TODO:

  • translate the complete api.js file
  • a sync or prioritisation mechanism between loops is needed, because of the delay from the worker messageing

About

Web Audio API implementation of Sonic Pi

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 64.6%
  • Ruby 25.6%
  • HTML 9.1%
  • CSS 0.7%