-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdiamond.html
208 lines (188 loc) · 7.29 KB
/
diamond.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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
<!DOCTYPE html>
<html lang="pt">
<head>
<meta charset="utf-8">
<title style="text-align: center;">Diamond Tonality</title>
<style>
#canvas {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
/* make it bigger */
}
input[type="text"] {
width: 10%;
box-sizing: border-box;
border: 2px solid #ccc;
border-radius: 4px;
font-size: 16px;
background-color: white;
background-position: 10px 10px;
transition: width 0.4s ease-in-out;
}
input[type="text"]:focus {
width: 5.5%;
}
input[type="submit"] {
width: 15%;
height: 3.5%;
background-color: #366fc5;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
}
input[type="checkbox"] {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
display: inline-block;
position: relative;
background-color: #d1d1d1;
border: 1px solid #000000;
border-radius: 3px;
width: 20px;
height: 20px;
vertical-align: middle;
cursor: pointer;
}
input[type="checkbox"]:checked {
background-color: #366fc5;
}
input[type="checkbox"]:checked:after {
content: '\2713';
font-size: 14px;
position: absolute;
top: 0px;
left: 3px;
color: #fff;
}
div {
border-radius: 10px;
background-color: #f2f2f2;
padding: 20px;
}
</style>
</head>
<body>
<a href="https://www.nucleomusicanova.com.br/">
<img src="resources/NucleoMusicaNova.png" alt="diamond" style="width: 50px; height: 50px; position: absolute; top: 15px; left: 20px;">
</a>
<a href="https://www.nucleomusicanova.com.br/">
<img src="resources/unespar.png" alt="diamond" style="width: 50px; height: 50px; position: absolute; top: 15px; left: 80px;">
</a>
<a href="https://www.nucleomusicanova.com.br/">
<img src="resources/usp.png" alt="diamond" style="width: 50px; height: 50px; position: absolute; top: 15px; left: 140px;">
</a>
<h1 style="text-align: center;">Diamond Tonality</h1>
<hr>
<form action="javascript:newDiamondLimit(document.getElementById('Partchlimit').value)" style="margin-left: 0px; margin-right: calc(100% - 550px);">
<div style="text-align: center;">
<label for="Partchlimit" style="text-align: center; margin-right: 10px;">Limit</label>
<input type="text" id="Partchlimit" name="Partchlimit" placeholder="Limit of Diamond">
<input type="submit" value="Generate">
<label style="font-weight: bold; margin-left: 4px;">
Turn Audio On
<input type="checkbox" id="transportButton" onchange="toggleTransport();">
</label>
<label style="font-weight: bold; margin-left: 4px;">
Reduce Octave
<input type="checkbox" id="reduceOctave" onchange="newDiamondLimit(document.getElementById('Partchlimit').value)">
</label>
</div>
</form>
<input type="range" min="50" max="1000" value="261" class="slider" id="fundRange" style="margin-left: 40px; width: 485px;">
<section style="margin-left: 600px; margin-right: 20px; line-height: 25px; top: 10%; position: absolute;">
<!-- add indent in cite (not just in first line)) -->
<p>
É de conhecimento comum na comunidade musical que a escala temperada com 12 sons foi amplamente utilizada pela grande maioria dos compositores. Partch, por sua vez, propôs uma nova teoria para a geração de escalas: a teoria da Tonalidade Diamante (ou tonalidade losango como a chama Franck Jedrzejewski). Partch define Tonalidade Diamante como sendo
</p>
<!-- use text-indent in cite, italic, font is smaller -->
<p style="padding-left: 300px; font-style: italic; font-size: 15px;">
um arranjo arbitrário das proporções monofônicas, projetadas para constituir uma prova evidente, pelo menos da dupla identidade de cada proporção e, consequentemente, da capacidade de um sistema monofônico de afinação justa de fornecer tons que possam, cada um deles, serem percebidos em mais de um sentido (Partch, 1974, p. 74-75).
</p>
<p>
A Tonalidade Diamante é baseada na afinação justa, ou seja, frequências que podem ser expressas por proporções de números inteiros, na qual se aplicam conceitos de limite de identidade. Dentro deste campo de compreensão, Partch elenca fatores importantes para a definição de Identidade:
</p>
<p style="padding-left: 300px; font-style: italic; font-size: 15px;">
um dos correlativos, “maior” ou “menor”, em uma tonalidade; um dos ingredientes de número-ímpar, um ou vários ou todos que ajam como um polo de tonalidade: 1-3-5-7-9-11 nesta teoria. Este termo não deve ser confundido com os ingredientes de conteúdo harmônico, ou com parciais (Partch, 1974, p. 71).
</p>
<p>
Para o conceito de identidade, Partch aplicou limites dentro da teoria de Tonalidade Diamante: no limite-5, as frações têm numeradores e denominadores baseados nas identidades 1, 3 e 5; no limite-7 temos 1, 3, 5 e 7, e assim sucessivamente (sempre com números ímpares).
</p>
<hr>
<!-- add section to related works -->
<h2>Referências</h2>
<p>
Partch, Harry. (1974). Genesis of a Music. New York: Da Capo Press.
</p>
<p>
Neimog, Charles Klippel, and Felipe de Almeida Ribeiro. “Investigando Os Sistemas de Afinação de Harry Partch e Ben Johnston.” Musica Theorica, vol. 1, no. 2, Apr. 2017. DOI.org (Crossref), https://doi.org/10.52930/mt.v1i2.15.
</p>
</section>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/lib/p5.js"></script>
<script src="src/soundfont-player.js" type="text/javascript"></script>
<script src="src/diamond.js"></script>
<script src="src/plug.js"></script>
<script type="text/javascript">
var heavyModule = null;
var loader = null;
var ac;
var sf;
window.onload = function() {
plug_Module().then(loadedModule => {
heavyModule = loadedModule;
moduleLoaded();
});
document.getElementById("transportButton").style.visibility = "hidden";
}
function moduleLoaded() {
loader = new heavyModule.AudioLibLoader();
document.getElementById("transportButton").style.visibility = "visible";
}
function start() {
if (!loader.webAudioContext) {
loader.init({
blockSize: 2048,
printHook: onPrint,
sendHook: onFloatMessage,
webAudioContext: null
}).then(() => {});
}
loader.start();
}
function stop() {
loader.stop();
}
function toggleTransport(element) {
(loader.isPlaying) ? stop(): start();
ac = new AudioContext();
sf = Soundfont.instrument(new AudioContext(), 'celesta').then(function(celesta) {
sf = celesta;
});
}
function onPrint(message) {
console.log(message);
}
function onFloatMessage(sendName, floatValue) {
console.log(sendName, floatValue);
}
// randomizer
function randomiseParameters() {}
// Generated Event Update Methods
function sendEvent_trigger() {
if (loader.webAudioWorklet) {
loader.sendEvent("trigger");
} else {
loader.audiolib.sendEvent("trigger");
}
soundIsOn = true;
}
</script>
<script>
document.getElementById("transportButton").checked = false;
document.getElementById("Partchlimit").value = 5;
</script>
</body>
</html>