forked from external-repos/noisedash
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c4642df353 | ||
|
|
aca7fbd1e0 |
2
package-lock.json
generated
2
package-lock.json
generated
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "noisedash",
|
"name": "noisedash",
|
||||||
"version": "0.6.0",
|
"version": "0.6.2",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "noisedash",
|
"name": "noisedash",
|
||||||
"version": "0.6.0",
|
"version": "0.6.2",
|
||||||
"private": true,
|
"private": true,
|
||||||
"author": "Kay Thomas <kaythomas@pm.me> (https://kaythomas.dev)",
|
"author": "Kay Thomas <kaythomas@pm.me> (https://kaythomas.dev)",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -188,6 +188,18 @@ export default {
|
|||||||
this.lfo.connect(this.filter.frequency).start()
|
this.lfo.connect(this.filter.frequency).start()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.isTimerEnabled) {
|
||||||
|
this.duration = parseInt((this.hours * 3600)) + parseInt((this.minutes * 60)) + parseInt(this.seconds)
|
||||||
|
this.timeRemaining = this.duration
|
||||||
|
this.transportInterval = setInterval(() => this.stop(), this.duration * 1000 + 100)
|
||||||
|
this.timeRemainingInterval = setInterval(() => this.startTimer(), 1000)
|
||||||
|
Tone.Transport.loopEnd = this.duration
|
||||||
|
|
||||||
|
this.noise.sync().start(0).stop(this.duration)
|
||||||
|
} else {
|
||||||
|
this.noise.sync().start(0)
|
||||||
|
}
|
||||||
|
|
||||||
this.loadedSamples.forEach(s => {
|
this.loadedSamples.forEach(s => {
|
||||||
this.players.player(s.id).loop = true
|
this.players.player(s.id).loop = true
|
||||||
this.players.player(s.id).fadeIn = s.fadeIn
|
this.players.player(s.id).fadeIn = s.fadeIn
|
||||||
@@ -206,23 +218,7 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
this.players.player(s.id).toDestination()
|
this.players.player(s.id).toDestination()
|
||||||
}
|
}
|
||||||
})
|
|
||||||
|
|
||||||
if (this.isTimerEnabled) {
|
|
||||||
this.duration = parseInt((this.hours * 3600)) + parseInt((this.minutes * 60)) + parseInt(this.seconds)
|
|
||||||
this.noise.sync().start(0).stop(this.duration)
|
|
||||||
Tone.Transport.loopEnd = this.duration
|
|
||||||
this.timeRemaining = this.duration
|
|
||||||
this.transportInterval = setInterval(() => this.stop(), this.duration * 1000 + 100)
|
|
||||||
this.timeRemainingInterval = setInterval(() => this.startTimer(), 1000)
|
|
||||||
|
|
||||||
this.loadedSamples.forEach(s => {
|
|
||||||
this.players.player(s.id).unsync().sync().start(0).stop(this.duration)
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
this.noise.sync().start(0)
|
|
||||||
|
|
||||||
this.loadedSamples.forEach(s => {
|
|
||||||
if (s.playbackMode === 'sporadic') {
|
if (s.playbackMode === 'sporadic') {
|
||||||
this.players.player(s.id).loop = false
|
this.players.player(s.id).loop = false
|
||||||
|
|
||||||
@@ -235,10 +231,14 @@ export default {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.players.player(s.id).loop = true
|
this.players.player(s.id).loop = true
|
||||||
|
|
||||||
|
if (this.isTimerEnabled) {
|
||||||
|
this.players.player(s.id).unsync().sync().start(0).stop(this.duration)
|
||||||
|
} else {
|
||||||
this.players.player(s.id).unsync().sync().start(0)
|
this.players.player(s.id).unsync().sync().start(0)
|
||||||
}
|
}
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
|
||||||
Tone.Transport.start('+0.1')
|
Tone.Transport.start('+0.1')
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user