Skip to content

Commit c3247ed

Browse files
authored
Update README.md
1 parent a460a65 commit c3247ed

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,33 @@ initAudioEngine("https://mimicproject.com/libs").then((dspEngine)=>{
6161

6262
You can change the urls appropriately if you are hosting elsewhere
6363

64+
### Running on p5.js Web Editor
65+
66+
You can see can example [here](https://editor.p5js.org/Louismac/sketches/odTpTQuv1)
67+
68+
Include the hosted library in the ``index.html``
69+
70+
```
71+
<script crossorigin src = "https://mimicproject.com/libs/maximilian.v.0.1.js"></script>
72+
```
73+
74+
Run the code in the ``sketch.js``
75+
76+
```
77+
let maxi;
78+
initAudioEngine("https://mimicproject.com/libs").then((dspEngine)=>{
79+
maxi = dspEngine;
80+
//Get audio code from script element
81+
maxi.setAudioCode(`
82+
var osc1 = new Maximilian.maxiOsc();
83+
var osc2 = new Maximilian.maxiOsc();
84+
function play() {
85+
return osc1.saw(100) + osc2.saw(100.2)
86+
}
87+
`);
88+
})
89+
```
90+
6491
### Locally hosted library
6592

6693
The recommended way to do this is to use the python server we have provided (server.py).

0 commit comments

Comments
 (0)