-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathindex.html
More file actions
96 lines (83 loc) · 5.18 KB
/
Copy pathindex.html
File metadata and controls
96 lines (83 loc) · 5.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="author" content="Gerard Llorach and Mattes Ohlenbusch">
<title>Web-based vocoder</title>
<!-- Vue library -->
<script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
<!-- Bootstrap -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-eOJMYsd53ii+scO/bJGFsiCZc+5NDVN2yr8+0RDqr0Ql0h+rP48ckxlpbzKgwra6" crossorigin="anonymous">
<!-- Feather icons https://feathericons.com/ -->
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
<!--style type='text/css'>
html, body { width: 100%; height: 100%; margin: 0; padding: 0 ; background-color: black; overflow: hidden;}
</style-->
<!-- import the webpage's javascript file -->
<!--script src="script.js"></script-->
</head>
<body>
<div class="container-fluid" id="app">
<!-- Title -->
<div class="row justify-content-md-center">
<h1>Web-based vocoder</hi>
</div>
<!-- Row with buttons and 2d map" -->
<div class="row">
<!-- Column with buttons -->
<div class="col">
<button class="btn btn-success" type="button" v-on:click="playBtn" v-html="playMessage"></button>
<button class="btn" type="button" v-bind:class="[isLooping ? 'btn-primary' : 'btn-outline-secondary']" v-on:click="loopBtn" v-html="loopMessage"></button>
<button class="btn" v-bind:class="[isInputMic ? 'btn-danger' : 'btn-outline-secondary']" type="button" v-on:click="switchInputBtn" v-html="inputMessage"></button>
<!-- Dropdown audio files -->
<select class="form-control" v-model="selectedAudio" @change="changeAudioFile($event)" v-bind:disabled="isInputMic == true"> <!-- v-if="isInputMic" -->
<option value="" selected disabled>Select audio file</option>
<option v-for="audioFile in audioFiles" :value="audioFile.name" :key="audioFile.name">{{ audioFile.name }}</option>
</select>
<!-- Drag and drop audio files -->
<div class="text-center" @dragover="ondragover($event)" @drop="ondrop($event)" style="height: 70px; border: 2px dashed blue"> <span class="align-middle"> Drag and drop your audio files here</span></div>
<button type="button" class="btn-lg" v-on:click="startVocoder" v-bind:class="[isVocoderOn ? 'btn-warning' : 'btn-outline-secondary']" v-html="vocoderMessage"></button>
<button type="button" class="btn btn-default" v-bind:class="[isImpulseOn ? 'btn-primary' : 'btn-outline-secondary']" v-on:click="impulseBtn" v-if="isVocoderOn">Impulse excitation</button>
<div v-if="isVocoderOn">
<!-- Vocal tract length factor -->
<div class="slider">
<p>Vocal tract length factor: {{vocalTractLengthFactor}}x factor</p>
<input type="range" min="0.5" max="2" value="1" step="0.1" v-model="vocalTractLengthFactor" @input="vocalTractSliderInput()"></input>
</div>
<!-- Voiced/unvoiced threshold -->
<div class="slider" v-if="isImpulseOn">
<p>Voiced/unvoiced threshold: {{voicedThreshold}}</p>
<input type="range" min="0.0" max="1" value="0.4" step="0.01" v-model="voicedThreshold" @input="voicedSliderInput()"></input>
</div>
<!-- Pitch factor -->
<div class="slider" v-if="isImpulseOn">
<p>Pitch factor: {{pitchFactor}}x factor</p>
<input type="range" min="0.5" max="2" value="1" step="0.1" v-model="pitchFactor" @input="pitchSliderInput()"></input>
</div>
</div>
</div>
<div class="col text-center">
<!-- 2D voice map canvas -->
<canvas id="2Dmap" v-show="isVocoderOn" width="500" height="500" style="width:500px; height:500px; border:1px solid #000000;"></canvas>
</div>
</div>
<!-- Row with signals -->
<div id="signals" class="row">
<!-- Columns with signals -->
<signal-canvas v-for="ss in signals"
v-bind:signalname="ss"
v-bind:id="ss"></signal-canvas>
</div>
</div>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<!--
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
-->
<a href="https://github.com/Web-based-vocoder/web-based-vocoder.github.io">Take me to the Github repository</a>
<script src="script.js"></script>
</body>
</html>