A CS1010R javascript project by Yang Mansheng and Yang Zhixing, supervised by Associate Professor Martin Henz and Srikumar Karaikudi Subramaniam, in collaboration with Lee Zhi Xin and Rose Marie Tan who worked on the Generative Grammar(https://github.com/rosemarietan/GenerativeGrammar/) Project.
http://lightyang.github.com/PolymetricExpression/
http://bolprocessor.sourceforge.net/docs/bp2-Polyrhy.html
http://bolprocessor.sourceforge.net/docs/bp2-Polymet.html
-
The easiest way
Files needed: pe-lib/*, sample-manager.js, player-facade.js
player-facade.js provides an easy way to play polymetric expression, assuming you want to use sample-manager.js to load the samples.
There are 4 steps:- Create a playerFacade object
- (Optional) Set playerFacade.continuousPredicate to enable adding continuous sound object
-
Call playerFacade.loadSamples to load the samples
sampleUrl is the url of the folder your sample files are located in. The folder should contains a mapping.js file.
Look at "acoustic-kit" folder for an example of the structure. - Call playerFacade.play with the expression you want to play
- (Optional) Call playerFacade.stop when you want to
-
Need more control
Files needed: pe-lib/*
<p> If you need more control, you can use pe-player.js directly but this way is a bit more complicated. Look at pe-player.js for more information. <br/> You can use demo.js as an example. </p>