Skip to content

Commit

Permalink
starting audio context on iOS (days 26 - 30)
Browse files Browse the repository at this point in the history
  • Loading branch information
stc committed Jan 9, 2019
1 parent 9d22306 commit 4f9750e
Show file tree
Hide file tree
Showing 21 changed files with 4,257 additions and 4,171 deletions.
2 changes: 1 addition & 1 deletion Day-21-Dimension-Reduction/dist/main.js

Large diffs are not rendered by default.

12 changes: 9 additions & 3 deletions Day-26-Shepard-Tone/dist/main.js

Large diffs are not rendered by default.

1,699 changes: 852 additions & 847 deletions Day-26-Shepard-Tone/package-lock.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions Day-26-Shepard-Tone/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"dependencies": {
"@tensorflow/tfjs": "^0.13.4",
"p5": "^0.7.2",
"startaudiocontext": "^1.2.1",
"tfjs": "^0.6.0",
"tone": "^0.12.80"
}
Expand Down
6 changes: 6 additions & 0 deletions Day-26-Shepard-Tone/src/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import p5 from 'p5/lib/p5.min';
import Tone from 'tone';
import StartAudioContext from 'startaudiocontext';

const sketch = (p) => {
let context = new AudioContext();

Expand Down Expand Up @@ -95,6 +97,10 @@ const sketch = (p) => {
p.save(Date.now() + ".jpg");
}
}

p.mousePressed = () => {
StartAudioContext(Tone.context).then(function(){});
}
}
export default sketch;
new p5(sketch);
12 changes: 9 additions & 3 deletions Day-27-Random-Forest/dist/main.js

Large diffs are not rendered by default.

Loading

0 comments on commit 4f9750e

Please sign in to comment.