forked from IMAGINARY/pink-trombone
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
132 lines (111 loc) · 3.67 KB
/
index.html
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
<html>
<!--
P I N K T R O M B O N E
Bare-handed procedural speech synthesis
version 1.1, March 2017
by Neil Thapen
venuspatrol.nfshost.com
Bibliography
Julius O. Smith III, "Physical audio signal processing for virtual musical instruments and audio effects."
https://ccrma.stanford.edu/~jos/pasp/
Story, Brad H. "A parametric model of the vocal tract area function for vowel and consonant simulation."
The Journal of the Acoustical Society of America 117.5 (2005): 3231-3254.
Lu, Hui-Ling, and J. O. Smith. "Glottal source modeling for singing voice synthesis."
Proceedings of the 2000 International Computer Music Conference. 2000.
Mullen, Jack. Physical modelling of the vocal tract with the 2D digital waveguide mesh.
PhD thesis, University of York, 2006.
Copyright 2017 Neil Thapen
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
-->
<head>
<title>Pink Trombone</title>
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="mobile-web-app-capable" content="yes" />
<link rel="stylesheet" href="vendor/quicksand/quicksand.css" />
<link rel="stylesheet" href="css/default.css" />
<script src="vendor/i18n4js/i18n4js-1.3.0.min.js"></script>
<script src="vendor/fontfaceobserver/fontfaceobserver.js"></script>
</head>
<body style="margin: 0; padding: 0; background-color: white">
<canvas
id="tractCanvas"
width="600"
height="600"
style="
position: absolute;
z-index: 1;
background-color: transparent;
margin: 0;
padding: 0;
"
>
</canvas>
<canvas
id="backCanvas"
width="600"
height="600"
style="
position: absolute;
z-index: 0;
background-color: transparent;
margin: 0;
padding: 0;
"
>
</canvas>
<script type="module">
import { start } from "./src/index.js";
function addLanguageSwitcher() {
var code = "";
var name = "";
if (IMAGINARY.i18n.getLang() === "en") {
code = "de";
name = "Deutsch";
} else {
code = "en";
name = "English";
}
var a = document.createElement("a");
var linkText = document.createTextNode(name);
a.appendChild(linkText);
a.classList.add("language-switcher");
a.title = "Change language";
a.href = "index.html?lang=" + code;
document.body.appendChild(a);
}
IMAGINARY.i18n
.init({
queryStringVariable: "lang",
translationsDirectory: "tr",
defaultLanguage: "en",
})
.then(function () {
return Promise.all([
new FontFaceObserver("Quicksand", { weight: 400 }).load(),
new FontFaceObserver("Quicksand", { weight: 700 }).load(),
]);
})
.then(function () {
start();
addLanguageSwitcher();
})
.catch(function (err) {
// Handle error
});
</script>
</body>
</html>