Compare commits

..

1 Commits

Author SHA1 Message Date
Kevin Thomas
3ea03c92db Add warning message 2022-04-17 16:12:35 -07:00
5 changed files with 32 additions and 275 deletions

View File

@@ -1,42 +0,0 @@
name: Docker Image CI
on:
push:
branches: [ main ]
jobs:
buildx:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
-
name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
-
name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push linux/amd64
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/amd64
push: true
tags: noisedash/noisedash:latest
-
name: Build and push linux/arm/v7
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/arm/v7
push: true
tags: noisedash/noisedash:latest-armv7

View File

@@ -9,9 +9,9 @@ Self-hostable web tool for generating ambient noises
# Features # Features
* Generate and customize ambient noises and user-uploadable samples (leveraging [Tone.js](https://github.com/Tonejs/Tone.js/)) * Generate and customize ambient noises and user-uploadable samples (leveraging [Tone.js](https://github.com/Tonejs/Tone.js/))
* Save "noise profiles" so you can easily switch between your created soundscapes. Import and export them for easy sharing, record them for use elsewhere * Save "noise profiles" so you can easily switch between your created soundscapes
* Fine-tune your noises with audio processing tools like filters, LFOs, and effects * Fine-tune your noises with audio processing tools like filters, LFOs, and effects
* Upload and edit audio samples (e.g rain, wind, thunder) to combine with your generated noises * Upload audio samples (e.g rain, wind, thunder) to combine with your generated noises
* Use admin tools to manage multiple users * Use admin tools to manage multiple users
* Mobile friendly * Mobile friendly

View File

@@ -68,4 +68,5 @@ function onListening () {
? 'pipe ' + addr ? 'pipe ' + addr
: 'port ' + addr.port : 'port ' + addr.port
logger.log('info', 'Listening on %s', bind) logger.log('info', 'Listening on %s', bind)
logger.log('info', 'WARNING, IMPORTANT: It looks like you are using the kevinthomas0/noisedash docker image. Please update your image to noisedash/noisedash. The kevinthomas0/noisedash image will no longer receive updates.')
} }

View File

@@ -90,16 +90,18 @@
> >
<v-card> <v-card>
<v-card-title> <v-card-title>
<span class="text-h5">Save Profile As...</span> <span class="text-h5">Profile Name</span>
</v-card-title> </v-card-title>
<v-card-text> <v-card-text>
<v-container> <v-container>
<v-row> <v-row>
<v-text-field <v-col cols="12">
v-model="profileName" <v-text-field
label="Profile Name" v-model="profileName"
:rules="[rules.required()]" label="Profile Name"
/> :rules="[rules.required()]"
/>
</v-col>
</v-row> </v-row>
</v-container> </v-container>
</v-card-text> </v-card-text>
@@ -166,16 +168,6 @@
Export Profile Export Profile
</v-list-item-title> </v-list-item-title>
</v-list-item> </v-list-item>
<v-list-item
@click="openStartRecordingDialog"
>
<v-list-item-icon>
<v-icon>mdi-record</v-icon>
</v-list-item-icon>
<v-list-item-title>
Record Profile Audio
</v-list-item-title>
</v-list-item>
</v-list-item-group> </v-list-item-group>
</v-col> </v-col>
</v-row> </v-row>
@@ -260,6 +252,7 @@
:items="profileItems" :items="profileItems"
return-object return-object
label="Profiles" label="Profiles"
class="mx-3 mb-5"
/> />
</v-row> </v-row>
</v-container> </v-container>
@@ -281,90 +274,6 @@
</v-card-actions> </v-card-actions>
</v-card> </v-card>
</v-dialog> </v-dialog>
<v-dialog
v-model="startRecordingDialog"
max-width="600px"
>
<v-form
ref="startRecordingForm"
v-model="isRecordingValid"
>
<v-card>
<v-card-title>
<span class="text-h5">Start Recording</span>
</v-card-title>
<v-card-text>
<v-container>
<v-row>
<p>Select profile to record audio for. This is only supported on Chrome and Firefox.</p>
</v-row>
<v-row>
<v-select
v-model="recordedProfile"
:items="profileItems"
return-object
label="Profiles"
/>
</v-row>
<v-row>
<v-text-field
v-model="recordingFileName"
label="File Name"
:rules="[rules.required()]"
/>
</v-row>
</v-container>
</v-card-text>
<v-card-actions>
<v-spacer />
<v-btn
text
@click="startRecordingDialog = false"
>
Close
</v-btn>
<v-btn
text
:disabled="!isRecordingValid"
@click="startRecording"
>
Record
</v-btn>
</v-card-actions>
</v-card>
</v-form>
</v-dialog>
<v-dialog
v-model="recordingDialog"
max-width="600px"
persistent="true"
>
<v-card>
<v-card-title>
<span class="text-h5">Recording</span>
</v-card-title>
<v-card-text>
Time Elapsed: {{ recordingTimeElapsed }} Seconds
</v-card-text>
<v-card-actions>
<v-spacer />
<v-btn
text
@click="cancelRecording"
>
Cancel
</v-btn>
<v-btn
text
@click="stopRecording"
>
Stop and Save
</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
</v-col> </v-col>
<v-col cols="12"> <v-col cols="12">
@@ -436,7 +345,7 @@
label="Volume" label="Volume"
thumb-label thumb-label
max="0" max="0"
min="-60" min="-30"
class="mx-3" class="mx-3"
@input="updateVolume" @input="updateVolume"
/> />
@@ -639,7 +548,7 @@
label="Volume" label="Volume"
thumb-label thumb-label
max="0" max="0"
min="-60" min="-30"
class="mx-3" class="mx-3"
@input="updateSampleVolume(sample.id, index)" @input="updateSampleVolume(sample.id, index)"
/> />
@@ -737,7 +646,9 @@
<v-card-text> <v-card-text>
<v-container> <v-container>
<v-row> <v-row>
<p><strong>WARNING:</strong> Uploaded samples are publicly accessible.</p> <v-col cols="12">
<p><strong>WARNING:</strong> Uploaded samples are publicly accessible.</p>
</v-col>
</v-row> </v-row>
<v-row> <v-row>
<v-file-input <v-file-input
@@ -748,11 +659,13 @@
/> />
</v-row> </v-row>
<v-row> <v-row>
<v-text-field <v-col cols="12">
v-model="sampleName" <v-text-field
label="Sample Name" v-model="sampleName"
:rules="[rules.required()]" label="Sample Name"
/> :rules="[rules.required()]"
/>
</v-col>
</v-row> </v-row>
</v-container> </v-container>
</v-card-text> </v-card-text>
@@ -798,7 +711,7 @@
> >
<v-card> <v-card>
<v-card-title> <v-card-title>
<span class="text-h5">Edit Samples</span> <span class="text-h5">Edit Sample</span>
</v-card-title> </v-card-title>
<v-card-text> <v-card-text>
<v-container> <v-container>
@@ -809,6 +722,7 @@
item-text="name" item-text="name"
return-object return-object
label="Samples" label="Samples"
class="mx-3"
@change="loadPreviewSample" @change="loadPreviewSample"
/> />
</v-row> </v-row>
@@ -822,6 +736,7 @@
v-model="previewSampleLoopPointsEnabled" v-model="previewSampleLoopPointsEnabled"
:disabled="previewSamplePlaying" :disabled="previewSamplePlaying"
label="Use Loop Points" label="Use Loop Points"
class="mx-3"
/> />
</v-row> </v-row>
@@ -830,7 +745,7 @@
v-model="previewSampleLoopStart" v-model="previewSampleLoopStart"
type="number" type="number"
label="Loop Start Time" label="Loop Start Time"
class="mr-3" class="mx-3"
:disabled="!previewSampleLoopPointsEnabled || previewSamplePlaying" :disabled="!previewSampleLoopPointsEnabled || previewSamplePlaying"
:rules="[rules.gt(-1)]" :rules="[rules.gt(-1)]"
@change="updatePreviewSamplePlayerLoopPoints" @change="updatePreviewSamplePlayerLoopPoints"
@@ -840,7 +755,7 @@
v-model="previewSampleLoopEnd" v-model="previewSampleLoopEnd"
type="number" type="number"
label="Loop End Time" label="Loop End Time"
class="ml-3" class="mx-3"
:disabled="!previewSampleLoopPointsEnabled || previewSamplePlaying" :disabled="!previewSampleLoopPointsEnabled || previewSamplePlaying"
:rules="[rules.gt(-1), rules.lt(previewSampleLength)]" :rules="[rules.gt(-1), rules.lt(previewSampleLength)]"
@change="updatePreviewSamplePlayerLoopPoints" @change="updatePreviewSamplePlayerLoopPoints"
@@ -852,6 +767,7 @@
v-model="previewSampleFadeIn" v-model="previewSampleFadeIn"
type="number" type="number"
label="Fade In Time" label="Fade In Time"
class="mx-3"
:disabled="previewSamplePlaying" :disabled="previewSamplePlaying"
:rules="[rules.gt(-1)]" :rules="[rules.gt(-1)]"
@change="updatePreviewSamplePlayerFadeIn" @change="updatePreviewSamplePlayerFadeIn"

View File

@@ -64,12 +64,6 @@ export default {
previewSampleButtonText: 'Preview Sample', previewSampleButtonText: 'Preview Sample',
previewSampleLoading: true, previewSampleLoading: true,
previewSampleLength: 0, previewSampleLength: 0,
startRecordingDialog: false,
recordingDialog: false,
recordingTimeElapsed: 0,
recordedProfile: {},
recordingFileName: '',
isRecordingValid: false,
errorSnackbar: false, errorSnackbar: false,
errorSnackbarText: '', errorSnackbarText: '',
rules: { rules: {
@@ -104,7 +98,6 @@ export default {
this.players = new Tone.Players() this.players = new Tone.Players()
this.samplePreviewPlayer = new Tone.Player().toDestination() this.samplePreviewPlayer = new Tone.Player().toDestination()
this.samplePreviewPlayer.loop = true this.samplePreviewPlayer.loop = true
this.recorder = new Tone.Recorder()
this.populateProfileItems(0) this.populateProfileItems(0)
this.populatePreviewSampleItems() this.populatePreviewSampleItems()
@@ -256,7 +249,6 @@ export default {
this.selectedProfile = this.profileItems.find(p => p.id === profileId) this.selectedProfile = this.profileItems.find(p => p.id === profileId)
} }
this.exportedProfile = this.profileItems[0] this.exportedProfile = this.profileItems[0]
this.recordedProfile = this.profileItems[0]
this.loadProfile() this.loadProfile()
} }
} }
@@ -491,7 +483,7 @@ export default {
} }
}) })
.catch(() => { .catch(() => {
this.errorSnackbarText = 'Error Importing Profile' this.errorSnackbarText = 'Error Saving Profile'
this.errorSnackbar = true this.errorSnackbar = true
}) })
@@ -544,7 +536,7 @@ export default {
} }
}) })
.catch(() => { .catch(() => {
this.errorSnackbarText = 'Error Exporting Profile' this.errorSnackbarText = 'Error Loading Profile'
this.errorSnackbar = true this.errorSnackbar = true
}) })
@@ -639,116 +631,6 @@ export default {
if (this.previewSampleLoopStart >= 0 && this.previewSampleLoopEnd <= this.previewSampleLength) { if (this.previewSampleLoopStart >= 0 && this.previewSampleLoopEnd <= this.previewSampleLength) {
this.samplePreviewPlayer.setLoopPoints(this.previewSampleLoopStart, this.previewSampleLoopEnd) this.samplePreviewPlayer.setLoopPoints(this.previewSampleLoopStart, this.previewSampleLoopEnd)
} }
},
openStartRecordingDialog () {
this.startRecordingDialog = true
this.profileMoreDialog = false
},
startRecording () {
this.$http.get('/profiles/'.concat(this.recordedProfile.id))
.then(async response => {
if (response.status === 200) {
const profile = response.data.profile
this.isTimerEnabled = profile.isTimerEnabled
this.duration = profile.duration
this.volume = profile.volume
this.noiseColor = profile.noiseColor
this.isFilterEnabled = profile.isFilterEnabled
this.filterType = profile.filterType
this.filterCutoff = profile.filterCutoff
this.isLFOFilterCutoffEnabled = profile.isLFOFilterCutoffEnabled
this.lfoFilterCutoffFrequency = profile.lfoFilterCutoffFrequency
this.lfoFilterCutoffRange[0] = profile.lfoFilterCutoffLow
this.lfoFilterCutoffRange[1] = profile.lfoFilterCutoffHigh
this.isTremoloEnabled = profile.isTremoloEnabled
this.tremoloFrequency = profile.tremoloFrequency
this.tremoloDepth = profile.tremoloDepth
this.loadedSamples = profile.samples
this.startRecordingDialog = false
this.recordingDialog = true
this.recordingTimeElapsed = 0
await this.recorder.start()
this.recordingInterval = setInterval(() => this.recordingTimeElapsed++, 1000)
this.playProfileForRecording()
}
})
.catch(() => {
this.errorSnackbarText = 'Error Recording Profile'
this.errorSnackbar = true
})
},
playProfileForRecording () {
this.playDisabled = true
Tone.Transport.cancel()
if (!this.isFilterEnabled && !this.isTremoloEnabled) {
this.noise = new Tone.Noise({ volume: this.volume, type: this.noiseColor }).connect(this.recorder).toDestination()
} else if (!this.isFilterEnabled && this.isTremoloEnabled) {
this.tremolo = new Tone.Tremolo({ frequency: this.tremoloFrequency, depth: this.tremoloDepth }).connect(this.recorder).toDestination().start()
this.noise = new Tone.Noise({ volume: this.volume, type: this.noiseColor }).connect(this.tremolo)
} else if (this.isFilterEnabled && !this.isTremoloEnabled) {
this.filter = new Tone.Filter(this.filterCutoff, this.filterType).connect(this.recorder).toDestination()
this.noise = new Tone.Noise({ volume: this.volume, type: this.noiseColor }).connect(this.filter)
} else if (this.isFilterEnabled && this.isTremoloEnabled) {
this.tremolo = new Tone.Tremolo({ frequency: this.tremoloFrequency, depth: this.tremoloDepth }).connect(this.recorder).toDestination().start()
this.filter = new Tone.Filter(this.filterCutoff, this.filterType).connect(this.tremolo)
this.noise = new Tone.Noise({ volume: this.volume, type: this.noiseColor }).connect(this.filter)
} else {
this.tremolo = new Tone.Tremolo({ frequency: this.tremoloFrequency, depth: this.tremoloDepth }).connect(this.recorder).toDestination().start()
this.filter = new Tone.Filter(this.filterCutoff, this.filterType).connect(this.tremolo)
this.noise = new Tone.Noise({ volume: this.volume, type: this.noiseColor }).connect(this.filter)
}
if (this.isLFOFilterCutoffEnabled) {
this.lfo = new Tone.LFO({ frequency: this.lfoFilterCutoffFrequency, min: this.lfoFilterCutoffRange[0], max: this.lfoFilterCutoffRange[1] })
this.lfo.connect(this.filter.frequency).start()
}
this.loadedSamples.forEach(s => {
this.players.player(s.id).loop = true
this.players.player(s.id).fadeIn = s.fadeIn
if (s.loopPointsEnabled) {
this.players.player(s.id).setLoopPoints(s.loopStart, s.loopEnd)
}
this.players.player(s.id).volume.value = s.volume
this.players.player(s.id).connect(this.recorder)
this.players.player(s.id).unsync().sync().start(0)
})
this.noise.sync().start(0)
Tone.Transport.start()
},
async stopRecording () {
const recording = await this.recorder.stop()
// Set active profile back to the selected one
this.loadProfile()
const url = URL.createObjectURL(recording)
const anchor = document.createElement('a')
anchor.download = this.recordingFileName + '.webm'
anchor.href = url
anchor.click()
clearInterval(this.recordingInterval)
this.recordingDialog = false
this.stop()
},
async cancelRecording () {
await this.recorder.stop()
// Set active profile back to the selected one
this.loadProfile()
clearInterval(this.recordingInterval)
this.recordingDialog = false
this.stop()
} }
} }
} }