Skip to content

Commit f59d2e7

Browse files
committed
restore
1 parent 77f1d23 commit f59d2e7

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

src/components/Work/Nervous.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class Nervous {
1919

2020
constructor(detune: number) {
2121
this.delay = new FeedbackDelay(0.15, 0.1).toMaster();
22-
this.delay.wet.value = 0.2;
22+
this.delay.wet.value = 0.1;
2323
this.synth = new PolySynth(6, Synth, {
2424
oscillator: {
2525
partials: [0, 2, 3, 4]
@@ -105,9 +105,9 @@ class Nervous {
105105
for (t = 0; t < steps; t += 1) {
106106
value += randFunc();
107107
points.push(value);
108-
points.push(value);
109-
points.push(value);
110-
points.push(value);
108+
// points.push(value);
109+
// points.push(value);
110+
// points.push(value);
111111
}
112112

113113
const max = points.reduce((a, b) => {
@@ -130,7 +130,7 @@ class Nervous {
130130
play(note: string): void {
131131
// this.synth.triggerRelease(this.currentNote);
132132
// this.currentNote = note;
133-
this.synth.triggerAttackRelease(note, "5n", undefined, 0.1);
133+
this.synth.triggerAttackRelease(note, 1, undefined, 0.5);
134134
}
135135

136136
stop(): void {

src/components/Work/Project.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class ProjectInner extends React.Component<WithDispatch<OwnProps>, State> {
6060
showPixels: false
6161
};
6262
this.then = new Date();
63-
this.fpsInterval = 1000 / 750;
63+
this.fpsInterval = 1000 / 10;
6464
}
6565

6666
toggle() {
@@ -128,13 +128,13 @@ class ProjectInner extends React.Component<WithDispatch<OwnProps>, State> {
128128
this.nervousPlay();
129129
} else {
130130
this.raf = window.requestAnimationFrame(this.animate.bind(this));
131-
this.nervousPlay();
132-
// const now = Date.now();
133-
// const elapsed = now - this.then;
134-
// if (elapsed > this.fpsInterval) {
135-
// this.then = now - elapsed % this.fpsInterval;
136-
// this.nervousPlay();
137-
// }
131+
// this.nervousPlay();
132+
const now = Date.now();
133+
const elapsed = now - this.then;
134+
if (elapsed > this.fpsInterval) {
135+
this.then = now - elapsed % this.fpsInterval;
136+
this.nervousPlay();
137+
}
138138
}
139139
} else {
140140
this.nervous.stop();

0 commit comments

Comments
 (0)