Skip to content

Commit

Permalink
Fixed deformance in the wrong place
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-calderwood committed Mar 13, 2024
1 parent e6e2346 commit 61c4b33
Show file tree
Hide file tree
Showing 9 changed files with 1,580 additions and 50 deletions.
31 changes: 31 additions & 0 deletions cert.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
-----BEGIN CERTIFICATE-----
MIIFazCCA1OgAwIBAgIUSKDRncFxolkRACkJ52oYnL5AIoowDQYJKoZIhvcNAQEL
BQAwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoM
GEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDAeFw0yMzEyMDcwMzQ2NDdaFw0yNDEy
MDYwMzQ2NDdaMEUxCzAJBgNVBAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEw
HwYDVQQKDBhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQwggIiMA0GCSqGSIb3DQEB
AQUAA4ICDwAwggIKAoICAQC5BiOVf7DD2MatItRGHEbHMVK6pWr3NwfhzWsLIAfq
OVHkb+JwPrsvHwSrsZe8Pye8JTYDosKSnzNvzWd2HDgXey+zpV+NphLmKuEwLNwd
x/D6Mi55o75qYx7T6CK0Bu7oYWt2gXafSNooEgm5xbnyMf30Vv1ef8hPTMZoQYG4
Dlz0fferxAW+zwzuSIpSBesWS6jk4qAO2GesHDLx1DF2zYod00BYfyxPFP7Hqjvt
Wav/n7C/Jx19n62k6KDVbnZili5A/YBgMgvWm0oIY8PUpcMKY9mlUeVyOL8TzSFn
LTzvMB0zzS7UcZbosE2JNj48P8RizX642stZ6vFjdSlsLOuOa7L5bo1qcPkpyqic
9972LTLZ/vHHTeGLW2bGgE6RfMKBcrbY94lMcYdc38HNX3vRA75qU6atVJy1Ca/c
05rm9du11X45R4IITL17mBmujWwAcjfmy7PSgrixHjy00wviRAnlnf2XJ2liOZ9F
33W+tzkTLOKCqHDIeUaJcA3UHfBO1jT1OJajizQZADVaWA0XN0GskOthbfUcAsLc
t2yvOyGKKLIxrBioY0+Hq3jposL8xfEI/WQhiWq6uUtnXhQgB/h6Yg20wQFSi3Cc
O1jgx26Sd06gp1yoIS4l8Xo3xDmYDUPh2Vz6XZv4Ea3Dhl+hapFaL0VkzYRRqYq9
iwIDAQABo1MwUTAdBgNVHQ4EFgQUMcq/doq2/kUvPd5anm79j1gheVEwHwYDVR0j
BBgwFoAUMcq/doq2/kUvPd5anm79j1gheVEwDwYDVR0TAQH/BAUwAwEB/zANBgkq
hkiG9w0BAQsFAAOCAgEAIr1aXEh1LlEUJNfUXzK7R1BhIOUshfkCusAhOF/eyumQ
ZnOj3yLxZJPsBftgjRJvHLn6NvVVt5SyU03vO324J0eFabtG7Jb0ksMkldqPTgpX
SH7mobR8JZm2izE5JX/47SSd4i4710R9EO3XPoLYnWQwK5Z1NgD0hjonGyZcl3PE
DmS+gRNQpQ6ixkhnLIptEnVyLN6Ctv1srwmapjIW+f1is+eOBjraNQJE85slaDsC
qHsys9spkVCA+Qp0hEBsCIpU+dEyFqaGXXmkfOSjQuFa/EnHrFxFTrOIV7w9JatB
wSgYN44YAUyNn4yDG/3m4/25Ag5TPBdQBgHdZBJQIMM9uOEMycW5iEIhbhYxPZE4
2S4qrmfWEc7iHTp3Dc+7WSltvZgz5tw8lvQILis9sI38x7BhubLP+cL3uxitk0dz
k26oosNqZwSxq+MLV/kucAy8gt4gOyQ06FPGaNkwPxrhQfb2vGTjyenxLbJb5MkY
2bdeyOcS4OV+mAyUsJ4PKzLfq6Lqs4TJLxhgCHohORqj/cGsbFpdE2djBpGoDN9p
2NKlzQ74jizQc0phhM/cDuvhXFKkDp9mCYrt9KIiRF3ruNDosBM4HX04HJQ6pN0u
/M7WIxoABtJxHq7ZCdknBHEE68a71WnOZkqpdHovbu8XbpXtCiAzPQSEJzzjkRg=
-----END CERTIFICATE-----
153 changes: 153 additions & 0 deletions instrument/html/redo.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Textual Instrument</title>
<style>
body {
margin: 0;
padding: 0;
overflow: hidden; /* This can be used to remove scrollbars if needed. */
}

#canvas-container {
position: relative;
width: 100%;
height: 100vh; /* Set the height to 100% of the viewport height */
}

.p5-canvas {
position: absolute;
width: 100%;
height: 100%; /* Set the canvas dimensions to 100% of the container */
}

/* Make the background black */
html, body {
background-color: #000;
}

/* Make the text white and background black */
textarea {
color: #fff;
background-color: #000;
width: 100%; /* Make textareas fill the available space */
height: 80%; /* Make textareas fill the available space */
border: none; /* Remove textarea border */
/* make the background of the scroll bar black */
scrollbar-color: #000 #000;
scrollbar-width: thin;
}

/* Style for the side-by-side text areas */
#textboxes {
display: flex; /* Use flexbox to align elements side by side */
justify-content: space-between; /* Space them evenly */
padding: 5px; /* Add some padding for spacing */
/* width: 100%; Make the text areas fill the available space */
}

.options {
display: flex; /* Use flexbox to align elements side by side */
justify-content: space-between; /* Space them evenly */
padding: 5px; /* Add some padding for spacing */
}

.text {
display: fixed;
padding: 20px;
width: 25%;
}

/* Style for the submit button */
.submit_button {
width: 100%; /* Make the button fill the available space */
height: 20%;
margin: 0px;
margin-bottom: 20px;
/* make the border and text white */
color: #fff;
background-color: #000;
border: 1px solid #fff;
padding: 10px;
cursor: pointer; /* Change cursor on hover */
}

.submit_button.selected {
background-color: #fff;
color: #000;
}

.submit_button:hover {
background-color: #fff;
color: #000;
}

.userInput {
width: 50%;
height: 20%;
margin: 0px;
margin-bottom: 20px;
/* make the border and text white */
color: #fff;
background-color: #000;
border: 1px solid #fff;
padding: 10px;
cursor: pointer; /* Change cursor on hover */
text-align: center;
}

.settingLabel {
color: #fff;
}

::-webkit-scrollbar { width: 8px; height: 3px;}
::-webkit-scrollbar-button { background-color: #666; }
::-webkit-scrollbar-track { background-color: #646464;}
::-webkit-scrollbar-track-piece { background-color: #000;}
::-webkit-scrollbar-thumb { height: 50px; background-color: #666; border-radius: 3px;}
::-webkit-scrollbar-corner { background-color: black;}
::-webkit-resizer { background-color: black;}

</style>
<!-- https://github.com/spencermountain/compromise -->
<script type="text/javascript" src="../lib/compromise.js"></script>
<script type="text/javascript" src="../lib/p5.js"></script>
</head>
<body>

<div class="options">
<button class="submit_button" onclick="openPerformTab()">Perform</button>
<button id="deformButton" class="submit_button" onclick="toggleDeform()">Deform</button>
<input value="5" class="userInput" id="deformRate"" title="Deform Rate (s)">
<input value="5" class="userInput" id="minVelocity" onsubmit="updateMinVelocity()" title="Minimum Velocity">
</div>
<div id="textboxes">
<div class="text" id="free">
<textarea id="corpus1" rows="10" cols="50" placeholder="cut up text here"></textarea>
<button class="submit_button" id="submit1" onclick="submitCallback(1)">&#x2702;</button>
</div>
<div class="text" id="free2">
<textarea id="corpus2" rows="10" cols="50" placeholder="cut up text here"></textarea>
<button class="submit_button" id="submit2" onclick="submitCallback(2)">&#x2702;</button>
</div>
<div class="text" id="free3">
<textarea id="corpus3" rows="10" cols="50" placeholder="cut up text here"></textarea>
<button class="submit_button" id="submit3" onclick="submitCallback(3)">&#x2702;</button>
</div>
<div class="text" id="fixed">
<textarea class="realization" id="corpus4" rows="10" cols="50" oninput="realizationEditCallback(this.value)"></textarea>
<button class="submit_button" id="submit3" onclick="submitCallback(4)">&#x2702;</button>
</div>
</div>

<div id="canvas-container">

</div>
<script type="text/javascript" src="../js/noteToWord.js"></script>
<script type="text/javascript" src="../js/redo.js"></script>

</body>
</html>


95 changes: 95 additions & 0 deletions instrument/html/redo_performance.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Redo Text</title>
<style>
body {
margin: 0;
padding: 0;
overflow: hidden; /* This can be used to remove scrollbars if needed. */
}

#canvas-container {
position: relative;
width: 100%;
height: 100vh; /* Set the height to 100% of the viewport height */
}

.p5-canvas {
position: absolute;
width: 100%;
height: 100%; /* Set the canvas dimensions to 100% of the container */
}

/* Make the background black */
html, body {
background-color: #000;
}

/* Make the text white and background black */
textarea {
color: #fff;
background-color: #000;
width: 100%; /* Make textareas fill the available space */
height: 80%; /* Make textareas fill the available space */
border: none; /* Remove textarea border */
/* make the background of the scroll bar black */
scrollbar-color: #000 #000;
scrollbar-width: thin;
}

/* Style for the side-by-side text areas */
#textboxes {
display: flex; /* Use flexbox to align elements side by side */
justify-content: space-between; /* Space them evenly */
padding: 5px; /* Add some padding for spacing */
/* width: 100%; Make the text areas fill the available space */
}

.text {
display: fixed;
padding: 20px;
width: 25%;
}

/* Style for the submit button */
.submit_button {
width: 100%; /* Make the button fill the available space */
height: 20%;
margin: 0px;
margin-bottom: 20px;
/* make the border and text white */
color: #fff;
background-color: #000;
border: 1px solid #fff;
padding: 10px;
cursor: pointer; /* Change cursor on hover */
}
.submit_button:hover {
background-color: #fff;
color: #000;
}

::-webkit-scrollbar { width: 8px; height: 3px;}
::-webkit-scrollbar-button { background-color: #666; }
::-webkit-scrollbar-track { background-color: #646464;}
::-webkit-scrollbar-track-piece { background-color: #000;}
::-webkit-scrollbar-thumb { height: 50px; background-color: #666; border-radius: 3px;}
::-webkit-scrollbar-corner { background-color: black;}
::-webkit-resizer { background-color: black;}

</style>
<script type="text/javascript" src="../lib/p5.js"></script>
</head>
<body>

<div id="canvas-container">

</div>
<script type="text/javascript" src="../js/redo_performance.js"></script>

</body>
</html>


3 changes: 3 additions & 0 deletions instrument/js/noteToWord.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ function callBERT(leftwords, rightwords, badwords) {
}
word = word.toUpperCase();
word = word.replace("##", "") // Eventually we may want to concat these
console.log("Calling BERT", 'left', leftwords, 'right', rightwords, 'result', word);
return word;
})
} catch (error) {
Expand Down Expand Up @@ -80,6 +81,8 @@ class Worder {
}

addWordToContext(word) {
word = Object.assign({}, word);
console.log("adding word", word);
this.words[word.id] = word;
if (word.after) {
let index = this.wordOrder.indexOf(word.after);
Expand Down
Loading

0 comments on commit 61c4b33

Please sign in to comment.