Skip to content

Commit

Permalink
starting audiocontext (Days 21-25)
Browse files Browse the repository at this point in the history
  • Loading branch information
stc committed Jan 9, 2019
1 parent cd20f65 commit 9d22306
Show file tree
Hide file tree
Showing 20 changed files with 4,335 additions and 4,251 deletions.
12 changes: 9 additions & 3 deletions Day-21-Dimension-Reduction/dist/main.js

Large diffs are not rendered by default.

1,699 changes: 852 additions & 847 deletions Day-21-Dimension-Reduction/package-lock.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions Day-21-Dimension-Reduction/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",
"tsne": "^1.0.1"
Expand Down
6 changes: 5 additions & 1 deletion Day-21-Dimension-Reduction/src/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import p5 from 'p5/lib/p5.min';
import Tone from 'tone';
import tsnejs from 'tsne';
import StartAudioContext from 'startaudiocontext';

const sketch = (p) => {
class DataPoint {
Expand Down Expand Up @@ -217,7 +218,10 @@ const sketch = (p) => {
if(p.key == 'm') {
p.save(Date.now() + ".jpg");
}
}
}
p.mousePressed = () => {
StartAudioContext(Tone.context).then(function(){});
}
}

export default sketch;
Expand Down
12 changes: 9 additions & 3 deletions Day-22-Hexagon-Tiling/dist/main.js

Large diffs are not rendered by default.

Loading

0 comments on commit 9d22306

Please sign in to comment.