master
parent
0af18395fd
commit
c784f3f4ce
|
@ -5,7 +5,7 @@
|
|||
<paths name="craveteck">
|
||||
<serverdata>
|
||||
<mappings>
|
||||
<mapping deploy="/var/www/mindbost.craveteck.com" local="$PROJECT_DIR$" web="/" />
|
||||
<mapping deploy="/var/www/mindboost.craveteck.pk" local="$PROJECT_DIR$" web="/" />
|
||||
</mappings>
|
||||
</serverdata>
|
||||
</paths>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<project version="4">
|
||||
<component name="SshConfigs">
|
||||
<configs>
|
||||
<sshConfig host="46.101.77.136" id="21fb0bf5-1d7f-4512-bd29-b1d0309d6ffe" keyPath="$USER_HOME$/Documents/server keys/main Server/mykey.ppk" port="22" nameFormat="DESCRIPTIVE" username="root" useOpenSSHConfig="true" />
|
||||
<sshConfig host="138.197.70.61" id="21fb0bf5-1d7f-4512-bd29-b1d0309d6ffe" keyPath="$USER_HOME$/Documents/digitalocean" port="22" nameFormat="DESCRIPTIVE" username="root" useOpenSSHConfig="true" />
|
||||
</configs>
|
||||
</component>
|
||||
</project>
|
|
@ -3,7 +3,7 @@
|
|||
<component name="WebServers">
|
||||
<option name="servers">
|
||||
<webServer id="20d7843e-0e96-481a-8bed-9d6b23084f02" name="craveteck">
|
||||
<fileTransfer accessType="SFTP" host="46.101.77.136" port="22" sshConfigId="21fb0bf5-1d7f-4512-bd29-b1d0309d6ffe" sshConfig="root@46.101.77.136:22 key" keyPair="true">
|
||||
<fileTransfer accessType="SFTP" host="138.197.70.61" port="22" sshConfigId="21fb0bf5-1d7f-4512-bd29-b1d0309d6ffe" sshConfig="root@138.197.70.61:22 key" keyPair="true">
|
||||
<advancedOptions>
|
||||
<advancedOptions dataProtectionLevel="Private" keepAliveTimeout="0" passiveMode="true" shareSSLContext="true" />
|
||||
</advancedOptions>
|
||||
|
|
|
@ -123,7 +123,7 @@ export default {
|
|||
|
||||
|
||||
// this.$toast.success('Login Successfully....');
|
||||
this.$router.push(this.localePath('/onboarding'));
|
||||
this.$router.push(this.localePath('/onboarding/selectinput'));
|
||||
|
||||
}else{
|
||||
this.$toast.error(`Email or password is incorrect.`);
|
||||
|
|
118
pages/band.vue
118
pages/band.vue
|
@ -5,8 +5,13 @@
|
|||
<div class="row">
|
||||
<div class="col-md-3 form-group">
|
||||
<label>Attack Time:</label>
|
||||
<input type="text" v-model="timeRamp" class="form-control" placeholder="Enter time ramp to increase or decrease smoothing">
|
||||
<input type="text" v-model="attackTime" class="form-control" placeholder="Enter time ramp to increase or decrease smoothing">
|
||||
</div>
|
||||
<div class="col-md-3 form-group">
|
||||
<label>Release Time:</label>
|
||||
<input type="text" v-model="releaseTime" class="form-control" placeholder="Enter time ramp to increase or decrease smoothing">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<div class="row">
|
||||
|
@ -168,7 +173,7 @@ export default {
|
|||
selectedOutputDevice: "",
|
||||
inputDevices: [],
|
||||
outputDevices: [],
|
||||
timeRamp:4,
|
||||
timeRamp:11,
|
||||
|
||||
// This object holds all state of the app
|
||||
classes: [
|
||||
|
@ -348,6 +353,10 @@ export default {
|
|||
harmonicGainNode:{},
|
||||
currentDestination:{},
|
||||
compressorNode:{},
|
||||
attackTime:25,
|
||||
releaseTime:30,
|
||||
targetValue:0,
|
||||
currentValue:0,
|
||||
}
|
||||
|
||||
},
|
||||
|
@ -511,10 +520,6 @@ export default {
|
|||
},
|
||||
|
||||
frame() {
|
||||
// if (this.height == 100) {
|
||||
// this.stopmeasurement();
|
||||
// console.log(this.LevelValues);
|
||||
//console.log("Before",this.LevelValues65);
|
||||
|
||||
this.Percentile_Global= this.Percentile(this.LevelValues,0);
|
||||
this.Percentile_65=this.Percentile(this.LevelValues65,65)
|
||||
|
@ -526,23 +531,10 @@ export default {
|
|||
this.Percentile_4000=this.Percentile(this.LevelValues4000,4000)
|
||||
this.Percentile_8000=this.Percentile(this.LevelValues8000,8000)
|
||||
this.Percentile_16000=this.Percentile(this.LevelValues16000,16000)
|
||||
// this.Percentile(this.LevelValues65);
|
||||
// this.ResetLevelValues();
|
||||
|
||||
// console.log("After",this.LevelValues65);
|
||||
|
||||
this.height++;
|
||||
// this.ResetLevelValues();
|
||||
// console.log("OK");
|
||||
// }
|
||||
// else {
|
||||
// this.height++;
|
||||
// console.log(this.height);
|
||||
// this.value = this.height+2;
|
||||
// console.log(this.height);
|
||||
// if (this.height % 4 == 0){
|
||||
// this.secondsDown = 25 - (this.height/4);
|
||||
// }
|
||||
// }
|
||||
|
||||
},
|
||||
|
||||
startmeasurement() {
|
||||
|
@ -566,58 +558,17 @@ export default {
|
|||
|
||||
if(this.timeHeight>40){
|
||||
this.frame();
|
||||
// this.reset25();
|
||||
|
||||
// console.log("Array Counter",this.ArrayCounter);
|
||||
// console.log("Last",this.lastArrayCouhter);
|
||||
// this.lastArrayCouhter=this.ArrayCounter;
|
||||
const dBFSValue = 20 * Math.log10(this.Percentile_1000.percentile / 1);
|
||||
console.log("dbfs",dBFSValue);
|
||||
this.maskingGain1000=dBFSValue;
|
||||
// // this.Gain.setValueAtTime(dBFSValue,this.audioCtx.currentTime);
|
||||
// const gainValue = Math.pow(10, dBFSValue / 20);
|
||||
// console.log(gainValue);
|
||||
// this.Gain1000.gain.setValueAtTime(gainValue, this.audioCtx.currentTime);
|
||||
var linearGain = (this.Percentile_1000.percentile - 0) / (10 - 0);
|
||||
// const linearGain = (Math.pow(10, this.Percentile_1000.percentile / 20))*0.5;
|
||||
// this.envelop(this.maxGain1000*this.Percentile_1000.percentile);
|
||||
this.envelop(linearGain);
|
||||
|
||||
console.log('Linear Gian',linearGain);
|
||||
// this.logarithmicSmooth(linearGain,5,10);
|
||||
|
||||
var gainValue = Math.pow(10, this.Percentile_1000.percentile / 20);
|
||||
// this.Gain1000.gain.value = gainValue;
|
||||
|
||||
console.log(this.maxGain1000);
|
||||
let linearGain = this.maxGain1000 * gainValue;
|
||||
// const rmsValue = this.DBFStoRMS(this.Percentile_1000.percentile, -18);
|
||||
// const gainValue = this.RMStoGain(rmsValue);
|
||||
// this.Gain1000.gain.setValueAtTime(linearGain, this.audioCtx.currentTime);
|
||||
|
||||
// define the time (in seconds) to ramp up/down to the target gain value
|
||||
// const rampTime = 1.025;
|
||||
const rampTime = this.timeRamp;
|
||||
// const rampTime = 2;
|
||||
|
||||
|
||||
// define the time (in seconds) to start the ramp up/down
|
||||
const startTime = this.audioCtx.currentTime;
|
||||
// this.Gain1000.gain.cancelScheduledValues(startTime);
|
||||
this.Gain1000.gain.setTargetAtTime(linearGain, startTime,parseFloat(rampTime));
|
||||
// this.Gain1000.gain.value=linearGain;
|
||||
console.log(linearGain);
|
||||
|
||||
|
||||
// this.compressorNode.threshold.setValueAtTime(-2, startTime);
|
||||
// this.compressorNode.knee.setValueAtTime(20, startTime);
|
||||
// this.compressorNode.ratio.setValueAtTime(12, startTime);
|
||||
// this.compressorNode.attack.setValueAtTime(0.125, startTime);
|
||||
// this.compressorNode.release.setValueAtTime(0.75, startTime);
|
||||
// this.Gain1000.gain.value=0;
|
||||
}
|
||||
// console.log(this.ArrayCounter);
|
||||
// console.log("Last",this.lastArrayCouhter);
|
||||
// this.lastArrayCouhter=this.ArrayCounter;
|
||||
|
||||
// if(this.timeHeight <= 0){
|
||||
// this.firstArrayCounter=this.ArrayCounter;
|
||||
// // console.log("First",this.firstArrayCounter);
|
||||
// }
|
||||
++this.timeHeight
|
||||
this.totalms+=125;
|
||||
|
||||
|
@ -631,7 +582,26 @@ export default {
|
|||
this.harmonicGainNode.gain.setValueAtTime(this.harmonicGain,this.audioCtx.currentTime);
|
||||
},this.Timeframe)
|
||||
},
|
||||
envelop(targetValue){
|
||||
|
||||
const now = this.audioCtx.currentTime;
|
||||
// Cancel all previous Schedule
|
||||
this.Gain1000.gain.cancelScheduledValues(now);
|
||||
//Set the value for the previous gain
|
||||
this.Gain1000.gain.setValueAtTime(this.currentValue, now);
|
||||
//Linear ramp to the the attack time normal 25s
|
||||
this.Gain1000.gain.linearRampToValueAtTime(targetValue, now + this.attackTime);
|
||||
// Set Target
|
||||
this.Gain1000.gain.setTargetAtTime(targetValue, now + this.attackTime, this.releaseTime);
|
||||
// Store the current value for the next iteration
|
||||
this.currentValue = this.Gain1000.gain.value;
|
||||
|
||||
console.log('Current Value',this.currentValue);
|
||||
|
||||
|
||||
// Use the target value for audio processing or as needed
|
||||
console.log("Target Value:", targetValue);
|
||||
},
|
||||
CancleMeasurement() {
|
||||
this.stopmeasurement();
|
||||
this.previousPage();
|
||||
|
@ -653,7 +623,8 @@ export default {
|
|||
this.AnalyserbandPass2000.getByteTimeDomainData(this.bandPass2000Buffer)
|
||||
this.AnalyserbandPass4000.getByteTimeDomainData(this.bandPass4000Buffer)
|
||||
this.AnalyserbandPass8000.getByteTimeDomainData(this.bandPass8000Buffer)
|
||||
this.AnalyserbandPass16000.getByteTimeDomainData(this.bandPass16000Buffer)
|
||||
this.AnalyserbandPass16000.getByteTimeDomainData(this.bandPass16000Buffer);
|
||||
// console.log('Buffer 1000',this.bandPass1000Buffer);
|
||||
|
||||
for (var i = 0; i < 512; i++) {
|
||||
this.ByteToDecimal = (this.LevelBuffer[i]-128)/128;
|
||||
|
@ -808,7 +779,6 @@ export default {
|
|||
|
||||
|
||||
|
||||
|
||||
StartButtonPressed(){
|
||||
|
||||
let constraints = {
|
||||
|
@ -830,6 +800,7 @@ export default {
|
|||
this.source = this.audioCtx.createMediaStreamSource(this.stream);
|
||||
this.source100=this.audioCtx.createBufferSource()
|
||||
this.Gain1000=this.audioCtx.createGain();
|
||||
this.Gain1000.gain.setValueAtTime(0,this.audioCtx.currentTime);
|
||||
|
||||
this.compressorNode= this.audioCtx.createDynamicsCompressor();
|
||||
|
||||
|
@ -838,16 +809,17 @@ export default {
|
|||
.then(arrayBuffer => this.audioCtx.decodeAudioData(arrayBuffer))
|
||||
.then(audioBuffer => {
|
||||
// Set buffer on AudioBufferSourceNode
|
||||
const sampleRate = this.audioCtx.sampleRate;
|
||||
this.source100.buffer = audioBuffer;
|
||||
this.source100.loop = true;
|
||||
// Connect nodes
|
||||
// this.source100.connect(compressorNode);
|
||||
this.source100.connect(this.Gain1000);
|
||||
// this.Gain1000.connect(this.compressorNode);
|
||||
this.Gain1000.connect(this.audioCtx.destination);
|
||||
// this.Gain1000.gain.setValueAtTime(1,this.audioCtx.currentTime);
|
||||
// Play source node
|
||||
this.source100.start();
|
||||
|
||||
|
||||
|
||||
});
|
||||
this.SoundNode=this.audioCtx.createBufferSource();
|
||||
this.harmonicGainNode=this.audioCtx.createGain();
|
||||
|
|
|
@ -31,8 +31,8 @@
|
|||
</div>
|
||||
|
||||
<div class="row justify-content-center pt-3">
|
||||
<div class="col-md-3 text-center">
|
||||
<button class="btn col-4 next-btn" >NEXT</button>
|
||||
<div class="col-md-3 text-center" style="z-index: 1000000;">
|
||||
<NuxtLink :to="localePath('onboarding')" style="z-index: 1000000" class="btn col-4 next-btn" >NEXT</NuxtLink>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
@ -78,7 +78,7 @@ export default {
|
|||
console.log(data);
|
||||
if(data.success){
|
||||
// this.$toast.success(data.message);
|
||||
this.$router.push(this.localePath('letsgo'));
|
||||
this.$router.push(this.localePath('onboarding'));
|
||||
}
|
||||
}).catch((e)=>{
|
||||
this.$toast.error("something went wrong while saving...");
|
||||
|
|
|
@ -2,7 +2,7 @@ import axios, {AxiosInstance, AxiosRequestConfig} from "axios";
|
|||
import {useUserStore} from '@/stores/user';
|
||||
import {mapState} from 'pinia';
|
||||
export default defineNuxtPlugin((nuxtApp) => {
|
||||
const defaultUrl = "https://admin.mindboost.craveteck.com";
|
||||
const defaultUrl = "https://admin.mindboost.craveteck.pk";
|
||||
// const defaultUrl = "http://localhost:8000";
|
||||
|
||||
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue