edit html pages focused on web audio players

master
Angeliki 6 years ago
parent 02ecbb32f2
commit 49c6c37a42

@ -2,170 +2,16 @@
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<link href="styles/app.css" rel="stylesheet" type="text/css"> <link href="project/styles/stylesheet.css" rel="stylesheet" type="text/css">
<!-- <link href="project/styles/app.css" rel="stylesheet" type="text/css">
-->
</head> </head>
<style type="text/css">
body {font-family: "Old Standard TT"; font-size: 20px; line-height: 1.4; letter-spacing: 1px;}
section {margin-bottom: 50px;margin-top: 50px;}
a {font-weight: bold; font-size: 24px; text-decoration: none; }
.internet {font-weight: regular; font-size: 18px; text-decoration: none; }
.list {
padding-top: 10px;
padding-bottom: 10px;
list-style: none;
border-top: 1px solid #47505e;
}
.description {
font-size: 12px;
float: right;
font-weight: normal !important;
}
/* .mini-player {
background-size: 100% 100%;
background-image: url(/project/images/player.png);
cursor: pointer;
}*/
.audio-mini {
width: 50px;
}
.dropbtn {
font-family: "Old Standard TT";
font-weight: bold;
font-size: 24px;
color: black;
padding: 16px;
border: none;
cursor: pointer;
}
.dropbtn:hover, .dropbtn:focus {
background-color: pink;
}
.dropdown {
position: relative;
display: inline-block;
}
.dropdown-content {
display: none;
position: absolute;
background-color: white;
min-width: 1900px;
overflow: auto;
z-index: 1;
}
.dropdown-content a {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
}
.dropdown a:hover {background-color: none;}
.show {display: block;}
/*style internet sources*/
.dropbtn2 {
font-family: "Old Standard TT";
font-weight: regular;
font-size: 24px;
color: black;
padding: 16px;
border: none;
cursor: pointer;
}
.dropbtn2:hover, .dropbtn2:focus {
background-color: pink;
}
.dropdown2 {
position: relative;
display: inline-block;
}
.dropdown-content2 {
display: none;
position: absolute;
background-color: white;
min-width: 1000px;
overflow: auto;
z-index: 1;
}
.dropdown-content2 a {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
}
.dropdown2 a:hover {background-color: none;}
.show2 {display: block;}
/*style list of podcasts*/
.dropbtn3 {
font-family: "Old Standard TT";
font-weight: regular;
font-size: 24px;
color: black;
padding: 16px;
border: none;
cursor: pointer;
}
.dropbtn3:hover, .dropbtn3:focus {
background-color: pink;
}
.dropdown3 {
position: relative;
display: inline-block;
}
.dropdown-content3 {
display: none;
position: absolute;
background-color: white;
min-width: 1000px;
overflow: auto;
z-index: 1;
}
.dropdown-content3 a {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
}
.dropdown3 a:hover {background-color: none;}
.show3 {display: block;}
</style>
<body> <body>
<h4 align="right">...a space for Angeliki Diakrousi to unpack</h4> <h4 align="right">...a space for Angeliki Diakrousi to unpack thoughts and sounds on amplification and collective voices</h4>
<div style="position:absolute; bottom:0px;right:150px;">You can send me a message here angeliki@conversations.im</div>
<link style="text-align: top;" rel="stylesheet" type="text/css" media="screen" href="https://cdn.conversejs.org/4.2.0/css/converse.min.css">
<script src="https://cdn.conversejs.org/4.2.0/dist/converse.min.js" charset="utf-8"></script>
<script>
converse.initialize({
bosh_service_url: 'https://conversejs.org/http-bind/', // Please use this connection manager only for testing purposes
show_controlbox_by_default: false
});
</script>
<!-- menu dropdown --> <!-- menu dropdown -->
<div class="dropdown"> <div class="dropdown">
<button onclick="myFunction()" class="dropbtn">Menu</button> <button onclick="myFunction()" class="dropbtn">?</button>
<div id="myDropdown" class="dropdown-content"> <div id="myDropdown" class="dropdown-content">
<li class="list"> <li class="list">
<a href="project/about.html" target="_blank">About <div class="description">WHAT?</div></a> <a href="project/about.html" target="_blank">About <div class="description">WHAT?</div></a>
@ -183,108 +29,70 @@
</li> </li>
<li class="list"> <li class="list">
<a href="project/overlapping-interface.html" target="_blank">Feedback Composition <div class="description">SOUNDWALKS, ANNOTATIVE RECORDINGS</div></a> <a href="project/overlapping-interface.html" target="_blank">Feedback Composition <div class="description">SOUNDWALKS, ANNOTATIVE RECORDINGS</div></a>
</li>
</div>
</div>
<!-- internet resources -->
<div class="dropdown2">
<button onclick="myFunction2()" class="dropbtn2">Internet sources</button>
<div id="myDropdown2" class="dropdown-content2">
<li style="list-style: none;">
<a class="internet" href="https://www.youtube.com/watch?v=JVpoOdz1AKQ&feature=youtu.be" target="popup" onclick="window.open('https://www.youtube.com/watch?v=HlvfPizooII','popup','width=600,height=600'); return false;">Angela Davis @Occupy</a>
</li>
<li style="list-style: none;">
<a class="internet" href="https://www.youtube.com/watch?v=JVpoOdz1AKQ&feature=youtu.be" target="popup" onclick="window.open('https://www.youtube.com/watch?v=JVpoOdz1AKQ&feature=youtu.be','popup','width=600,height=600'); return false;">Judith Butler @Occupy Wall Street</a>
</li>
<li style="list-style: none;">
<a class="internet" href="https://www.youtube.com/watch?v=SirOxIeuNDE" target="popup" onclick="window.open('https://www.youtube.com/watch?v=SirOxIeuNDE','popup','width=600,height=600'); return false;">Laurie Anderson - Mach 20</a>
</li>
<li style="list-style: none;">
<a class="internet" href="https://www.thisamericanlife.org/667/wartime-radio" target="popup" onclick="window.open('https://www.thisamericanlife.org/667/wartime-radio','popup','width=600,height=600'); return false;">Ballout, D. (2019) Good Morning, Kafranbel, This American Life: Wartime Radio</a>
</li> </li>
<li style="list-style: none;"> <li class="list">
<a class="internet" href="https://www.youtube.com/watch?v=TY96Ma6YdtQ" target="popup" onclick="window.open('https://www.youtube.com/watch?v=TY96Ma6YdtQ','popup','width=600,height=600'); return false;">Vocal performance of Katalin Ladik in the film Berberian Sound Studio, 2012</a> <a href="project/player.html" target="_blank">Player <div class="description">ARCHIVE</div></a>
</li> </li>
</div> </div>
</div> </div>
<br>
<!-- <div style="position:absolute; top:30%; left:26%;"> <div align="center">This is an<span style="font-size:50"> audio zine</span> on amplification of female and collective voices</div>
<img src="thesis/carson-list.jpg"></img>
</div> -->
<section style="float:right;">
<div style="position:absolute; top:35%; left:41%;">
<audio controls class="audio-mini" style="background-color: tomato;" src="project/audio/leeszaal-meetings-warming.mp3"></audio>warming up @Leeszaal <div class="tooltip-wrap">
</div> Listen to the latest podcast:
<div style="position:absolute; top:32%; left:51%;"> <div class="tooltip-content">
<audio controls class="audio-mini" style="background-color: orange;" src="project/audio/leeszaal-meetings-choir.mp3"></audio>singing vowels @Leeszaal <div id="transcriptWrapper" class='sub'>
</div> <div id="transcript">
<div style="position:absolute; top:40%; left:63%;"> <div><a data-start="10.56" href="#">00:00:10,560</a> A woman speaks in Indonesian</div>
<audio controls class="audio-mini" style="background-color: dodgerblue;" src="project/audio/description-alex2.mp3"></audio>describing/annotating <div><a data-start="24.38" href="#">00:00:24,380</a> Another woman responds back to her</div>
</div> <div><a data-start="28.36" href="#">00:00:28,360</a> By repeating only the vowels of what the previous woman said</div>
<div style="position:absolute; top:50%; left:70%;"> <div><a data-start="58.4" href="#">00:00:58,400</a> This process continues to more people that are gathered together in a circle at Leeszaal</div>
<audio controls class="audio-mini" style="background-color: mediumseagreen;" src="project/audio/finearts-meeting-discussion.mp3"></audio>discussing about voice in public @Fine Arts <div><a data-start="115.26" href="#">00:01:55,260</a> A woman once told me</div>
</div> <div><a data-start="120.62" href="#">00:02:00,620</a> That when she was a child</div>
<div style="position:absolute; top:62%; left:75%;"> <div><a data-start="124.98" href="#">00:02:04,980</a> She would speak to her mother in Dutch and her mother would reply back to her in Surinamese</div>
<audio controls class="audio-mini" style="background-color: violet;" src="project/audio/leeszaal-meetings-transcribing.mp3"></audio>transcribing vowels @Leeszaal <div><a data-start="134.7" href="#">00:02:14,700</a> Their communication would go on like that</div>
</div> <div><a data-start="138.94" href="#">00:02:18,940</a> The child was like a channel</div>
<div style="position:absolute; top:75%; left:69%;"> <div><a data-start="142.72" href="#">00:02:22,720</a> Like also her mother. The one would refuse to talk in one common language to the other.</div>
<audio controls class="audio-mini" style="background-color: orange;" src="project/audio/finearts-meeting-choir.mp3"></audio>singing vowels @Fine Arts <div><a data-start="152.62" href="#">00:02:32,620</a> But this process of translation happening inside their head...</div>
</div> <div><a data-start="160.1" href="#">00:02:40,100</a> is mediating and filtrating their speech through each others bodies</div>
<div style="position:absolute; top:85%; left:63%;"> <div><a data-start="188.24" href="#">00:03:08,240</a> In ancient medical and anatomical theory women have two mouths, the upper and the lower, connected through neck</div>
<audio controls class="audio-mini" style="background-color: greenyellow;" src="project/audio/selectionB.mp3"></audio>city sounds <div><a data-start="209.72" href="#">00:03:29,720</a> The lips of both these mouths guarded a hollow cavity and they had to remain closed</div>
</div> <div><a data-start="218.52" href="#">00:03:38,520</a> Having two mouths that speak simultaneously is confusing and embarrassing and this creates cacophony</div>
<div style="position:absolute; top:90%; left:53%;"> <div><a data-start="229.32" href="#">00:03:49,320</a> Females were expressing something directly when it should have been said indirectly</div>
<audio controls class="audio-mini" style="background-color: dodgerblue;" src="project/audio/description-eugenie-CUT-SHORT.mp3"></audio>describing/annotating <div><a data-start="294.9" href="#">00:04:54,900</a> In the end of this process this group of people sang together all the vowels they had transcribed</div>
</div> <div><a data-start="309.46" href="#">00:05:09,460</a> With a small delay of synchronization they tried to sing at the same time</div>
<div style="position:absolute; top:77%; left:33%;;"> <div><a data-start="337.58" href="#">00:05:37,580</a> In Ancient Greece there was a high-pitch utterance of women , called ololyga...</div>
<audio controls class="audio-mini" style="background-color: orange;" src="project/audio/finearts-meeting-choirhigh.mp3"></audio>singing vowels (high) @Fine Arts <div><a data-start="347.56" href="#">00:05:47,560</a> which was a ritual practice dedicated to important events in life...</div>
</div> <div><a data-start="355.02" href="#">00:05:55,020</a> such as like the birth of a child or the death of a person...</div>
<div style="position:absolute; top:53%; left:26%;;"> <div><a data-start="360.7" href="#">00:06:00,700</a> and this was considered a pollution for civic space</div>
<audio controls class="audio-mini" style="background-color: dodgerblue;" src="project/audio/description-lidia-CUT.mp3"></audio>describing/annotating <div><a data-start="393.46" href="#">00:06:33,460</a> If expressed in public they would create chaos and provoke madness</div>
</div> <div><a data-start="427.46" href="#">00:07:07,460</a> Here you listen Angela Davis speak in Occupy Wall Street</div>
<div><a data-start="452.4" href="#">00:07:32,400</a> People here act like a human microphone. They repeat all together what Angela Davis says...</div>
<div><a data-start="462.88" href="#">00:07:42,880</a> in order she could be heard more far away in the square...</div>
<div style="position:absolute; top:66%; left:28%;;"> <div><a data-start="473.26" href="#">00:07:53,260</a> in order to amplify her voice, because amplification devices were not permitted</div>
<audio controls class="audio-mini" style="background-color: mediumseagreen;" src="project/audio/leeszaal-meetings-discussion.mp3"></audio>discussing about voice in public @Leeszaal <div><a data-start="481.82" href="#">00:08:01,820</a> Vowels allow us to occupy space</div>
</div> <div><a data-start="483.82" href="#">00:08:03,820</a> Vowels vibrate us</div>
<div style="position:absolute; top:86%; left:41%;;"> <div><a data-start="485.82" href="#">00:08:05,820</a> Vowels is the common space between our languages</div>
<audio controls class="audio-mini" style="background-color: tomato;" src="project/audio/finearts-meeting-warming.mp3"></audio>warming up @Fine Arts <div><a data-start="486.68" href="#">00:08:06,680</a> A similar example with Judith Butler speaking in Occupy Wall Street
</div> Vowels is the common space between our languages</div>
<div style="position:absolute; top:43%; left:32%;"> <div><a data-start="487.82" href="#">00:08:07,820</a> Vowels make us louder and bigger
<audio controls class="audio-mini" style="background-color: violet;" src="project/audio/finearts-meeting-transcribing.mp3"></audio>transcribing vowels @Fine Arts A similar example with Judith Butler speaking in Occupy Wall Street</div>
</div> <div><a data-start="489.16" href="#">00:08:09,160</a> Vowels make us louder and bigger</div>
<div style="position:absolute; top:47%; left:29%;">
<audio controls style="background-color: violet;" src="project/audio/finearts-meeting-extracts.mp3"></audio>reading extracts @Fine Arts
</div>
<!-- https://github.com/mdn/web-dictaphone/ -->
<div class="wrapper">
<section class="main-controls">
<canvas class="visualizer" height="60px"></canvas>
<div id="buttons">
<button class="record">Record</button>
<button class="stop">Stop</button>
</div> </div>
</section> </div></div>
<section class="sound-clips"> </div>
</section>
</div>
<section style="margin-top: 400px !important;">
<div>Listen to the latest podcast:</div>
<?php <?php
//insert the folder HERE //insert the folder HERE
$files = scandir("project/podcasts", SCANDIR_SORT_DESCENDING); $files = scandir("project/podcasts", SCANDIR_SORT_DESCENDING);
$newest_file = $files[0]; $newest_file = $files[0];
echo "<audio controls src='project/podcasts/$newest_file'></audio>"; echo "<audio id='a2' controls ontimeupdate='playTranscript()' src='project/podcasts/$newest_file'></audio>";
?> ?>
<br><div style="font-size:12px;"><b>sample_rate</b>: 44100<br><b>duration</b>: 534.857143<br><b>title</b>: transformation for presence<br><b>narrator</b>: angeliki<br><b>topic</b>: female voice to male</li></ul><br><b>filename</b>: podcasts/podcast.20190501-1223-femalemale.mp3<br><b>format_name</b>: mp3<br><b>size</b>: 8558073</div> <br><div style="font-size:12px;"><b>sample_rate</b>: 44100<br><b>duration</b>: 534.857143<br><b>title</b>: transformation for presence<br><b>narrator</b>: angeliki<br><b>topic</b>: female voice to male</li></ul><br><b>filename</b>: podcasts/podcast.20190501-1223-femalemale.mp3<br><b>format_name</b>: mp3<br><b>size</b>: 8558073</div>
@ -318,12 +126,27 @@ for ($i=1; $i<count($files); $i++)
</select> </select>
<br> <br>
<b>audio zines</b>
</section> </section>
<div style="position:absolute; top:20%; left:26%;">
<img src="thesis/carson-list.jpg"></img>
</div>
<!-- https://github.com/mdn/web-dictaphone/ -->
<div class="wrapper">
<section class="main-controls">
<canvas class="visualizer" height="60px"></canvas>
<div id="buttons">
<button class="record">Record</button>
<button class="stop">Stop</button>
</div>
</section>
<section class="sound-clips">
</section>
</div>
<?php <?php
if(!is_dir("recordings")){ if(!is_dir("recordings")){
@ -410,6 +233,8 @@ fclose($fp);
}); });
} }
</script> --> </script> -->
<script> <script>
/* When the user clicks on the button, /* When the user clicks on the button,
toggle between hiding and showing the dropdown content */ toggle between hiding and showing the dropdown content */
@ -452,12 +277,83 @@ window.onclick2 = function(event) {
} }
} }
} }
</script </script>
<script src="project/scripts/mediaDevices-getUserMedia-polyfill.js"></script>
<!-- scripts for dictaphone -->
<script src="project/scripts/mediaDevices-getUserMedia-polyfill.js"></script>
<!-- Below is your custom application script --> <!-- Below is your custom application script -->
<script src="project/scripts/app.js"></script> <script src="project/scripts/app.js"></script>
<script>
function saveAudio(){
var req = null;
var url = "savefile.php";
var data = document.getElementById("save").href.toString();// document.getElementById("save").innerHTML;// = xhttp.responseText;; // you have to check how to get the data from your saveAudio() method
window.alert(data);
(window.XMLHttpRequest) ? req = new XMLHttpRequest() : (window.ActiveXObject) ? req = new ActiveXObject("Microsoft.XMLHTTP") : req = false;
req.open("POST", url, true);
req.setRequestHeader("Content-Type", "multipart/form-data");
if(data != null) //&& data != "")
{
req.setRequestHeader("Content-length", data.length);
req.send(data);
}}
</script>
<!-- script for subs and sound -->
<script>
var dialogueTimings = [10,24,28,58,115,120,124,134,138,142,152,160],
dialogues = document.querySelectorAll('#transcript>div'),
transcriptWrapper = document.querySelector('#transcriptWrapper'),
audio = document.querySelector('#a2'),
previousDialogueTime = -1;
function playTranscript() {
var currentDialogueTime = Math.max.apply(Math, dialogueTimings.filter(function(v){return v <= audio.currentTime}));
if(previousDialogueTime !== currentDialogueTime) {
previousDialogueTime = currentDialogueTime;
var currentDialogue = dialogues[dialogueTimings.indexOf(currentDialogueTime)];
transcriptWrapper.scrollTop = currentDialogue.offsetTop - 50;
var previousDialogue = document.getElementsByClassName('speaking')[0];
if(previousDialogue !== undefined)
previousDialogue.className = previousDialogue.className.replace('speaking','');
currentDialogue.className +=' speaking';
}
}
;
</script>
<?php
$save_folder = dirname(__FILE__) ."/js";
if(! file_exists($save_folder)) {
if(! mkdir($save_folder)) {
die("failed to create save folder $save_folder");
}
}
$key = 'filename';
$tmp_name = $_FILES["audiofile"]["tmp_name"];
$upload_name = $_FILES["audiofile"]["name"];
$type = $_FILES["audiofile"]["type"];
$filename = "$save_folder/$upload_name";
$saved = 0;
if(($type == 'audio/x-wav' || $type == 'application/octet-stream') && preg_match('/^[a-zA-Z0-9_\-]+\.wav$/', $upload_name) ) {
$saved = move_uploaded_file($tmp_name, $filename) ? 1 : 0;
}
//name is needed to send in the php file
?>
</body> </body>

@ -1,43 +1,8 @@
<style type="text/css"> <head>
body {font-family: "Old Standard TT"; font-size: 20px; line-height: 1.4; letter-spacing: 1px;} <meta charset="utf-8">
h2 { <meta name="viewport" content="width=device-width, initial-scale=1">
text-align: center; <link href="styles/stylesheet.css" rel="stylesheet" type="text/css">
letter-spacing: 4px; </head>
font-size: 28px;}
section {margin-bottom: 50px;}
table, th, td {vertical-align: top; border-collapse: separate; padding: 6px;}
button {width: 100px;}
.short-description{
margin-left: 40%;
margin-right: 40%;
text-align: center;
}
a {
text-decoration:none;
}
#transcriptWrapper {
overflow: hidden;
}
#transcriptWrapper3 {
overflow: hidden;
}
#transcript3 > div {
transition: all .8s ease;
list-style-type: disc;
}
.speaking3 {
font-weight:bold
}
#transcript > div {
transition: all .8s ease;
list-style-type: disc;
}
.speaking {
font-weight:bold
}
</style>
<body> <body>
<section> <section>
<h2>Feedback composition</h2> <h2>Feedback composition</h2>
@ -49,9 +14,31 @@
<section> <section>
<div> <div>
<audio style="width: 100%; background: #FFFFFF;" id="a1" controls src="audio/selection-track-extracts-1.mp3"></audio> <audio style="width: 100%; background: #FFFFFF;" id="a1" controls src="audio/selection-track-extracts-1.mp3"></audio></div>
<audio ontimeupdate="playTranscript()" style="width: 100%; background: #222;" id="a2" controls src="audio/description-lidia-CUT.mp3"></audio>
<div class="tooltip-wrap">
<audio ontimeupdate="playTranscript()" style="width: 100%; background: #222;" id="a2" controls src="audio/description-lidia-CUT.mp3"></audio>
<div class="tooltip-content">
<div id="transcriptWrapper" class='sub'>
<h3>Lidia</h3>
<div id="transcript">
<div><a data-start="0.4" href="#">00:00:00,400</a> A vint</div>
<div><a data-start="8.18" href="#">00:00:08,180</a> A bag</div>
<div><a data-start="16.54" href="#">00:00:16,540</a> Someone with a bag</div>
<div><a data-start="28.52" href="#">00:00:28,520</a> Ok. Music</div>
<div><a data-start="33.16" href="#">00:00:33,160</a> Nice music</div>
<div><a data-start="50.86" href="#">00:00:50,860</a> What is that? Oh, the car, the market. I think</div>
<div><a data-start="77.68" href="#">00:01:17,680</a> Wind</div>
<div><a data-start="120.6" href="#">00:02:00,600</a> Wow</div>
<div><a data-start="136.68" href="#">00:02:16,680</a> Children?</div>
</div></div>
</div>
</div>
<audio ontimeupdate="playTranscript3()" style="width: 100%; background: #222;" id="a3" controls src="audio/description-eugenie-CUT-SHORT.mp3"></audio> <audio ontimeupdate="playTranscript3()" style="width: 100%; background: #222;" id="a3" controls src="audio/description-eugenie-CUT-SHORT.mp3"></audio>
<audio style="width: 100%; background: #222;" id="a4" controls src="audio/description-alex1.mp3"></audio> <audio style="width: 100%; background: #222;" id="a4" controls src="audio/description-alex1.mp3"></audio>
<button id="but">listen</button> <button id="but">listen</button>
@ -60,6 +47,8 @@
<audio id="interrupt" src="audio/leeszaal-meetings-discussion.mp3"></audio> <audio id="interrupt" src="audio/leeszaal-meetings-discussion.mp3"></audio>
</section> </section>
<section> <section>
<div> <div>
<audio style="width: 100%; background: #FFFFFF;" id="b1" controls src="audio/selectionB.mp3"></audio> <audio style="width: 100%; background: #FFFFFF;" id="b1" controls src="audio/selectionB.mp3"></audio>
@ -106,6 +95,7 @@
<div><a data-start="135.4" href="#">00:02:15,400</a> Children in a swimming pool</div> <div><a data-start="135.4" href="#">00:02:15,400</a> Children in a swimming pool</div>
</div></div> </div></div>
</td> </td>
<td> <td>
<div class='sub'> <div class='sub'>
<h3>Alex</h3> <h3>Alex</h3>

@ -1,104 +1,472 @@
<!DOCTYPE html> <html lang="en">
<html>
<style type="text/css">
.audio-mini {
width: 50px;
}
li {
list-style: none;
}
td {
vertical-align:top;
}
</style>
<head> <head>
<title>Revisiting Podcasts</title> <meta charset="utf-8">
</head> <meta name="viewport" content="width=device-width, initial-scale=1">
<link href="styles/stylesheet.css" rel="stylesheet" type="text/css">
</head>
<body> <body>
<h1> <div class="short-description">
Revisiting Podcasts <p>
</h1> <a href="../index.php">Utterance</a>
</p>
<table> </div>
<tr>
<td> <!-- internet resources -->
<ul> <div class="dropdown2">
<li> <button onclick="myFunction2()" class="dropbtn2">Internet sources</button>
<audio controls class="audio-mini" style="background-color: tomato;" src="audio/leeszaal-meetings-warming.mp3"></audio>warming up @Leeszaal <div id="myDropdown2" class="dropdown-content2">
</li> <li style="list-style: none;">
<li> <a class="internet" href="https://www.youtube.com/watch?v=JVpoOdz1AKQ&feature=youtu.be" target="popup" onclick="window.open('https://www.youtube.com/watch?v=HlvfPizooII','popup','width=600,height=600'); return false;">Angela Davis @Occupy</a>
<audio controls class="audio-mini" style="background-color: tomato;" src="audio/finearts-meeting-warming.mp3"></audio>warming up @Fine Arts </li>
</li> <li style="list-style: none;">
</ul> <a class="internet" href="https://www.youtube.com/watch?v=JVpoOdz1AKQ&feature=youtu.be" target="popup" onclick="window.open('https://www.youtube.com/watch?v=JVpoOdz1AKQ&feature=youtu.be','popup','width=600,height=600'); return false;">Judith Butler @Occupy Wall Street</a>
<ul> </li>
<li> <li style="list-style: none;">
<audio controls class="audio-mini" style="background-color: tomato;" src="audio/finearts-meeting-extracts.mp3"></audio>reading extracts @Fine Arts <a class="internet" href="https://www.youtube.com/watch?v=SirOxIeuNDE" target="popup" onclick="window.open('https://www.youtube.com/watch?v=SirOxIeuNDE','popup','width=600,height=600'); return false;">Laurie Anderson - Mach 20</a>
</li> </li>
</ul> <li style="list-style: none;">
<ul> <a class="internet" href="https://www.thisamericanlife.org/667/wartime-radio" target="popup" onclick="window.open('https://www.thisamericanlife.org/667/wartime-radio','popup','width=600,height=600'); return false;">Ballout, D. (2019) Good Morning, Kafranbel, This American Life: Wartime Radio</a>
<li> </li>
<audio controls class="audio-mini" style="background-color: orange;" src="audio/leeszaal-meetings-choir.mp3"></audio>singing vowels @Leeszaal <li style="list-style: none;">
</li> <a class="internet" href="https://www.youtube.com/watch?v=TY96Ma6YdtQ" target="popup" onclick="window.open('https://www.youtube.com/watch?v=TY96Ma6YdtQ','popup','width=600,height=600'); return false;">Vocal performance of Katalin Ladik in the film Berberian Sound Studio, 2012</a>
<li> </li>
<audio controls class="audio-mini" style="background-color: orange;" src="audio/finearts-meeting-choir.mp3"></audio>singing vowels @Fine Arts
</li> </div>
<li> </div>
<audio controls class="audio-mini" style="background-color: orange;" src="audio/finearts-meeting-choirhigh.mp3"></audio>singing vowels (high) @Fine Arts
</li>
</ul> <!-- recordings -->
<ul> <section>
<li> <div style="position:absolute; top:15%; left:41%;">
<audio controls class="audio-mini" style="background-color: mediumseagreen;" src="audio/finearts-meeting-discussion.mp3"></audio>discussing about voice in public @Fine Arts <audio controls style="background-color: tomato;" src="audio/leeszaal-meetings-warming.mp3"></audio>warming up @Leeszaal
</li> </div>
<li>
<audio controls class="audio-mini" style="background-color: mediumseagreen;" src="audio/leeszaal-meetings-discussion.mp3"></audio>discussing about voice in public @Leeszaal <div class="tooltip-wrap" style="position:absolute; top:12%; left:51%;">
</li> <audio controls style="background-color: orange;" src="audio/leeszaal-meetings-choir.mp3"></audio>singing vowels @Leeszaal
</ul> <div class="tooltip-content">
<ul> <div class="row">
<li> <div class="column"><img src="images/vowels-20190328-leeszaal.jpg" width="500px" />
<audio controls class="audio-mini" style="background-color: violet;" src="audio/finearts-meeting-transcribing.mp3"></audio>transcribing vowels @Fine Arts </div>
</li> </div>
<li>
<audio controls class="audio-mini" style="background-color: violet;" src="audio/leeszaal-meetings-transcribing.mp3"></audio>transcribing vowels @Leeszaal </div>
</li> </div>
</ul>
</td>
<td> <div style="position:absolute; top:20%; left:63%;">
<ul> <audio controls style="background-color: dodgerblue;" src="audio/description-alex2.mp3"></audio>describing/annotating
<li> </div>
<audio controls class="audio-mini" style="background-color: dodgerblue;" src="audio/description-alex2.mp3"></audio>describing/annotating <div style="position:absolute; top:30%; left:70%;">
</li> <audio controls style="background-color: mediumseagreen;" src="audio/finearts-meeting-discussion.mp3"></audio>discussing about voice in public @Fine Arts
<li> </div>
<audio controls class="audio-mini" style="background-color: dodgerblue;" src="audio/description-eugenie-CUT-SHORT.mp3"></audio>describing/annotating <div style="position:absolute; top:42%; left:75%;">
</li> <audio controls style="background-color: violet;" src="audio/leeszaal-meetings-transcribing.mp3"></audio>transcribing vowels @Leeszaal
<li> </div>
<audio controls class="audio-mini" style="background-color: dodgerblue;" src="audio/description-lidia-CUT.mp3"></audio>describing/annotating <div class="tooltip-wrap" style="position:absolute; top:55%; left:69%;">
</li> <audio controls style="background-color: orange;" src="audio/finearts-meeting-choir.mp3"></audio>singing vowels @Fine Arts
</ul> <div class="tooltip-content">
<ul> <div class="row">
<li> <div class="column"><img src="images/vowels-20190329-finearts.jpg" width="500px" />
<audio controls class="audio-mini" style="background-color: greenyellow;" src="audio/selectionB.mp3"></audio>city sounds </div>
</li> </div>
</ul>
</td> </div>
</tr> </div>
</table>
<audio controls style="background-color: greenyellow; float: right;" src="podcasts/3_podcast.mp3">latest episode</audio> <div style="position:absolute; top:65%; left:63%;">
<audio controls style="background-color: greenyellow;" src="audio/selectionB.mp3"></audio>city sounds
</div>
<div style="position:absolute; top:70%; left:53%;">
<audio controls style="background-color: dodgerblue;" src="audio/description-eugenie-CUT-SHORT.mp3"></audio>describing/annotating
</div>
<div style="position:absolute; top:57%; left:33%;;">
<audio controls style="background-color: orange;" src="audio/finearts-meeting-choirhigh.mp3"></audio>singing vowels (high) @Fine Arts
</div>
<div style="position:absolute; top:33%; left:26%;;">
<audio controls style="background-color: dodgerblue;" src="audio/description-lidia-CUT.mp3"></audio>describing/annotating
</div>
<div style="position:absolute; top:46%; left:28%;;">
<audio controls style="background-color: mediumseagreen;" src="audio/leeszaal-meetings-discussion.mp3"></audio>discussing about voice in public @Leeszaal
</div>
<div style="position:absolute; top:66%; left:41%;;">
<audio controls style="background-color: tomato;" src="audio/finearts-meeting-warming.mp3"></audio>warming up @Fine Arts
</div>
<div style="position:absolute; top:23%; left:32%;">
<audio controls style="background-color: violet;" src="audio/finearts-meeting-transcribing.mp3"></audio>transcribing vowels @Fine Arts
</div>
<div style="position:absolute; top:27%; left:29%;">
<audio controls style="background-color: violet;" src="audio/finearts-meeting-extracts.mp3"></audio>reading extracts @Fine Arts
</div>
</section>
<br>
<!-- soundwalk player -->
<section style="margin-top: 700px !important;">
<div class="tooltip-wrap">
<audio style="width: 100%; background: none;" id="a1" controls src="audio/selection-track-extracts-1.mp3"></audio>
<div class="tooltip-content">
<!-- have to add id="transcriptWrapper..." -->
<div>selection of recordings while wandering around Leeszaal</div>
</div>
</div>
<div class="tooltip-wrap">
<audio ontimeupdate="playTranscript()" style="width: 100%; background: #222;" id="a2" controls src="audio/description-lidia-CUT.mp3"></audio>
<div class="tooltip-content">
<div id="transcriptWrapper" class='sub'>
<h3>Lidia</h3>
<div id="transcript">
<div><a data-start="0.4" href="#">00:00:00,400</a> A vint</div>
<div><a data-start="8.18" href="#">00:00:08,180</a> A bag</div>
<div><a data-start="16.54" href="#">00:00:16,540</a> Someone with a bag</div>
<div><a data-start="28.52" href="#">00:00:28,520</a> Ok. Music</div>
<div><a data-start="33.16" href="#">00:00:33,160</a> Nice music</div>
<div><a data-start="50.86" href="#">00:00:50,860</a> What is that? Oh, the car, the market. I think</div>
<div><a data-start="77.68" href="#">00:01:17,680</a> Wind</div>
<div><a data-start="120.6" href="#">00:02:00,600</a> Wow</div>
<div><a data-start="136.68" href="#">00:02:16,680</a> Children?</div>
</div></div>
</div></div>
<div class="tooltip-wrap">
<audio ontimeupdate="playTranscript3()" style="width: 100%; background: #222;" id="a3" controls src="audio/description-eugenie-CUT-SHORT.mp3"></audio>
<div class="tooltip-content">
<div id="transcriptWrapper3" class='sub'>
<h3>Eugenie</h3>
<div id="transcript3">
<div><a data-start="1.8" href="#">00:00:01,800</a> Children outside</div>
<div><a data-start="10.76" href="#">00:00:10,760</a> I think it's outside</div>
<div><a data-start="13.7" href="#">00:00:13,700</a> Shoes, walking people</div>
<div><a data-start="20.44" href="#">00:00:20,440</a> Or maybe papers</div>
<div><a data-start="27.48" href="#">00:00:27,480</a> Music inside</div>
<div><a data-start="31.38" href="#">00:00:31,380</a> Chilling up</div>
<div><a data-start="53.06" href="#">00:00:53,060</a> This is outside. It's a troll, it's a bag</div>
<div><a data-start="58.24" href="#">00:00:58,240</a> Wheels</div>
<div><a data-start="75.7" href="#">00:01:15,700</a> Water</div>
<div><a data-start="90.9" href="#">00:01:30,900</a> People in a room. Inside. They are moving, close</div>
<div><a data-start="114.62" href="#">00:01:54,620</a> It's inside somewhere, somewhere...</div>
<div><a data-start="135.4" href="#">00:02:15,400</a> Children in a swimming pool</div>
</div></div>
</div></div>
<div class="tooltip-wrap">
<!-- have to add ontimeupdate="playTranscript3()" -->
<audio style="width: 100%; background: #222;" id="a4" controls src="audio/description-alex1.mp3"></audio>
<div class="tooltip-content">
<!-- have to add id="transcriptWrapper..." -->
<div class='sub'>
<h3>Alex</h3>
<div><a data-start="11.74" href="#">00:00:11,740</a> Em... I hear... It sounds like walking and it's quite windy outside</div>
<div><a data-start="18.62" href="#">00:00:18,620</a> But it sounds like... It's... The microphone is inside or something</div>
<div><a data-start="26.98" href="#">00:00:26,980</a> It's probably music</div>
<div><a data-start="30.32" href="#">00:00:30,320</a> From a car maybe or from some radio?</div>
<div><a data-start="37.6" href="#">00:00:37,600</a> It's outside on the street. I hear some cars in the background</div>
<div><a data-start="48.7" href="#">00:00:48,700</a> Mmmm... It sounds like gardening sounds</div>
<div><a data-start="54.82" href="#">00:00:54,820</a> There are people in the background or maybe it's bikes</div>
<div><a data-start="65.84" href="#">00:01:05,840</a> Oh I hear a bird in the background</div>
<div><a data-start="72.12" href="#">00:01:12,120</a> A very monotone sound</div>
<div><a data-start="76.74" href="#">00:01:16,740</a> It's like driving, maybe driving in a car</div>
<div><a data-start="95.12" href="#">00:01:35,120</a> And some wind around
It seems like outside but there is some noise in the background</div>
<div><a data-start="96.58" href="#">00:01:36,580</a> It seems like outside but there is some noise in the background</div>
<div><a data-start="106.34" href="#">00:01:46,340</a> It's outside</div>
<div><a data-start="124.92" href="#">00:02:04,920</a> Oh, I hear children in the background crying</div>
<div><a data-start="124.94" href="#">00:02:04,940</a> There is some weird sound in the foreground, which I... It's hard to describe [chuckling]
Oh, I hear children in the background crying</div>
<div><a data-start="128.36" href="#">00:02:08,360</a> There is some weird sound in the foreground, which I... It's hard to describe [chuckling]</div>
<div><a data-start="134.9" href="#">00:02:14,900</a> Again it sounds like there is a kindergarten or school nearby</div>
</div>
</div></div>
<button id="but">listen</button>
<br><br> <br><br>
<ul style="text-align: right;">
<li> <!-- second sounwalk player -->
Length: 5:20 <div class="tooltip-wrap">
</li> <audio style="width: 100%; background: #FFFFFF;" id="b1" controls src="audio/selectionB.mp3"></audio>
<li> <div class="tooltip-content">
Topic: Communicating in vowels <!-- have to add id="transcriptWrapper..." -->
</li> <div>selection of recordings while wandering around Leeszaal</div>
<li> </div>
Narrator: Angeliki </div>
</li>
</ul> <div class="tooltip-wrap">
<!-- have to add ontimeupdate="playTranscript3()" -->
<audio style="width: 100%; background: #222;" id="b2" controls src="audio/description-tommi.mp3"></audio>
<div class="tooltip-content">
<!-- have to add id="transcriptWrapper..." -->
<div class='subB'>
<h3>Tommi</h3>
<div><a data-start="12.98" href="#">00:00:12,980</a> This is some water ** maybe from a fountain</div>
<div><a data-start="61.48" href="#">00:01:01,480</a> Plates</div>
<div><a data-start="64.44" href="#">00:01:04,440</a> A bus at stand by at a bus stop</div>
<div><a data-start="70.02" href="#">00:01:10,020</a> Some people are chatting</div>
<div><a data-start="76.94" href="#">00:01:16,940</a> Some kids talking talking while they are playing in the sand or something</div>
<div><a data-start="87.94" href="#">00:01:27,940</a> Two people having a conversation on a street</div>
<div><a data-start="96.28" href="#">00:01:36,280</a> One of them is walking away [chuckling]</div>
<div><a data-start="102.1" href="#">00:01:42,100</a> And now a car is passing</div>
<div><a data-start="110.6" href="#">00:01:50,600</a> It's a construction site</div>
<div><a data-start="113.3" href="#">00:01:53,300</a> Something is being hammered</div>
<div><a data-start="121.2" href="#">00:02:01,200</a> Some sports match or something</div>
<div><a data-start="124.16" href="#">00:02:04,160</a> Everyone is **</div>
<div><a data-start="132.54" href="#">00:02:12,540</a> Someone is speaking Arabic</div>
<div><a data-start="138.76" href="#">00:02:18,760</a> To a group of people</div>
<div><a data-start="142.76" href="#">00:02:22,760</a> It's like a very large voluminous space [chuckling] cause it's echoing a lot</div>
<div><a data-start="156.76" href="#">00:02:36,760</a> Some people are shouting at something at a distance</div>
<div><a data-start="163.76" href="#">00:02:43,760</a> It sounds like in a courtyard</div>
<div><a data-start="166.54" href="#">00:02:46,540</a> A baby crying</div>
</div>
</div></div>
<div class="tooltip-wrap">
<!-- have to add ontimeupdate="playTranscript3()" -->
<audio style="width: 100%; background: #222;" id="b3" controls src="audio/description-alex2.mp3"></audio>
<div class="tooltip-content">
<!-- have to add id="transcriptWrapper..." -->
<div class='subB'>
<h3>Alex</h3>
<div><a data-start="7.82" href="#">00:00:07,820</a> There is teenagers nearby and it's walking</div>
<div><a data-start="11.7" href="#">00:00:11,700</a> Oh, there is water</div>
<div><a data-start="15.24" href="#">00:00:15,240</a> That's running</div>
<div><a data-start="20.66" href="#">00:00:20,660</a> Outside probably</div>
<div><a data-start="28.88" href="#">00:00:28,880</a> Oh, that's... It sounds like there is something clapping or like hitting against a surface</div>
<div><a data-start="38.52" href="#">00:00:38,520</a> And it's very repetitive sound</div>
<div><a data-start="46.6" href="#">00:00:46,600</a> Oh, I can hear some, some radio or some music or broadcast</div>
<div><a data-start="60.2" href="#">00:01:00,200</a> That was too short. I don't know [chuckling]</div>
<div><a data-start="64.44" href="#">00:01:04,440</a> Oh, it's quite loud. It's... Maybe it's in some kind of transport</div>
<div><a data-start="76.22" href="#">00:01:16,220</a> Oh, there is a child speaking</div>
<div><a data-start="85.74" href="#">00:01:25,740</a> There are people talking outside... In a foreign language</div>
<div><a data-start="96.28" href="#">00:01:36,280</a> It's not Dutch and there is some wind</div>
<div><a data-start="102.32" href="#">00:01:42,320</a> There are more people talking</div>
<div><a data-start="112.76" href="#">00:01:52,760</a> Oh, there is sounds like there are construction works</div>
<div><a data-start="116.72" href="#">00:01:56,720</a> Or hammering</div>
<div><a data-start="120.92" href="#">00:02:00,920</a> Oh, it's very loud. Oh [chuckling], it's applause or... a crowd of people. I don't know [chuckling]</div>
<div><a data-start="132.06" href="#">00:02:12,060</a> It's inside. It sounds like a hallway... I don't know. Like inside</div>
<div><a data-start="138.26" href="#">00:02:18,260</a> Because I hear some echoing</div>
<div><a data-start="142.56" href="#">00:02:22,560</a> Ot it's inside a tunnel, where people are passing by</div>
<div><a data-start="158.2" href="#">00:02:38,200</a> It sounds like near some street outside and I hear some kids in the background</div>
<div><a data-start="166.6" href="#">00:02:46,600</a> Again, there is a child screaming or crying</div>
</div>
</div></div>
<button id="butB">listen</button>
</section>
<script>
/* When the user clicks on the button,
toggle between hiding and showing the dropdown content */
function myFunction2() {
document.getElementById("myDropdown2").classList.toggle("show2");
}
// Close the dropdown if the user clicks outside of it
window.onclick2 = function(event) {
if (!event.target.matches('.dropbtn2')) {
var dropdowns = document.getElementsByClassName("dropdown-content2");
var i;
for (i = 0; i < dropdowns.length; i++) {
var openDropdown = dropdowns[i];
if (openDropdown.classList.contains('show2')) {
openDropdown.classList.remove('show2');
}
}
}
}
</script>
<!-- scripts for the soundwalk player-->
<script>
var a1 = document.getElementById("a1"),
a2 = document.getElementById("a2"),
but = document.getElementById("but");
but.addEventListener("click", function () {
if (a1.paused) {
a1.play();
a2.play();
a3.play();
a4.play();
} else {
a1.pause();
a2.pause();
a3.pause();
a4.pause();
}
})
a1.addEventListener("play", function(){
but.innerHTML="pause"
})
a1.addEventListener("pause", function(){
but.innerHTML="listen"
})
var links=document.querySelectorAll("div.sub a")
for (var i=0, l=links.length; i<l; i++) {
var a = links[i];
a.addEventListener("click", function(e) {
console.log("CLICK", this);
var t=parseFloat(this.getAttribute("data-start"))
a1.currentTime=t
a2.currentTime=t
a3.currentTime=t
a4.currentTime=t
e.preventDefault()
a1.play();
a2.play();
a3.play();
a4.play();
})
}
var interrupt = document.getElementById("interrupt");
butI = document.getElementById("butI");
butI.addEventListener("click", function () {
if (interrupt.paused) {
b1.pause();
b2.pause();
b3.pause();
a1.pause();
a2.pause();
a3.pause();
a4.pause();
interrupt.play();
} else {
interrupt.pause();
a1.play();
a2.play();
a3.play();
a4.play();
b1.play();
b2.play();
b3.play();
}
})
interrupt.addEventListener("play", function(){
butI.innerHTML="stop interrupt"
})
interrupt.addEventListener("pause", function(){
butI.innerHTML="interrupt"
})
</script>
<script>
var b1 = document.getElementById("b1"),
b2 = document.getElementById("b2"),
butB = document.getElementById("butB");
butB.addEventListener("click", function () {
if (b1.paused) {
b1.play();
b2.play();
b3.play();
} else {
b1.pause();
b2.pause();
b3.pause();
}
})
b1.addEventListener("play", function(){
butB.innerHTML="pause"
})
b1.addEventListener("pause", function(){
butB.innerHTML="listen"
})
var links=document.querySelectorAll("div.subB a")
for (var i=0, l=links.length; i<l; i++) {
var b = links[i];
b.addEventListener("click", function(e) {
console.log("CLICK", this);
var t=parseFloat(this.getAttribute("data-start"))
b1.currentTime=t
b2.currentTime=t
b3.currentTime=t
e.preventDefault()
b1.play();
b2.play();
b3.play();
})
}
</script>
<script>
var dialogueTimings = [0,8,16,28,33,50,77,120,136],
dialogues = document.querySelectorAll('#transcript>div'),
transcriptWrapper = document.querySelector('#transcriptWrapper'),
audio = document.querySelector('#a2'),
previousDialogueTime = -1;
function playTranscript() {
var currentDialogueTime = Math.max.apply(Math, dialogueTimings.filter(function(v){return v <= audio.currentTime}));
if(previousDialogueTime !== currentDialogueTime) {
previousDialogueTime = currentDialogueTime;
var currentDialogue = dialogues[dialogueTimings.indexOf(currentDialogueTime)];
transcriptWrapper.scrollTop = currentDialogue.offsetTop - 50;
var previousDialogue = document.getElementsByClassName('speaking')[0];
if(previousDialogue !== undefined)
previousDialogue.className = previousDialogue.className.replace('speaking','');
currentDialogue.className +=' speaking';
}
}
;
var dialogueTimings3 = [1,10,13,20,27,31,53,58,135],
dialogues3 = document.querySelectorAll('#transcript3>div'),
transcriptWrapper3 = document.querySelector('#transcriptWrapper3'),
audio = document.querySelector('#a3'),
previousDialogueTime = -1;
function playTranscript3() {
var currentDialogueTime = Math.max.apply(Math, dialogueTimings3.filter(function(v){return v <= audio.currentTime}));
if(previousDialogueTime !== currentDialogueTime) {
previousDialogueTime = currentDialogueTime;
var currentDialogue = dialogues3[dialogueTimings3.indexOf(currentDialogueTime)];
transcriptWrapper3.scrollTop = currentDialogue.offsetTop - 50;
var previousDialogue = document.getElementsByClassName('speaking3')[0];
if(previousDialogue !== undefined)
previousDialogue.className = previousDialogue.className.replace('speaking3','');
currentDialogue.className +=' speaking3';
}
}
;
</script>
</body> </body>
</html> </html>

@ -0,0 +1,189 @@
// set up basic variables for app
var record = document.querySelector('.record');
var stop = document.querySelector('.stop');
var soundClips = document.querySelector('.sound-clips');
var canvas = document.querySelector('.visualizer');
var mainSection = document.querySelector('.main-controls');
// disable stop button while not recording
stop.disabled = true;
// visualiser setup - create web audio api context and canvas
var audioCtx = new (window.AudioContext || webkitAudioContext)();
var canvasCtx = canvas.getContext("2d");
//main block for doing the audio recording
if (navigator.mediaDevices.getUserMedia) {
console.log('getUserMedia supported.');
var constraints = { audio: true };
var chunks = [];
var onSuccess = function(stream) {
var mediaRecorder = new MediaRecorder(stream);
visualize(stream);
record.onclick = function() {
mediaRecorder.start();
console.log(mediaRecorder.state);
console.log("recorder started");
record.style.background = "red";
stop.disabled = false;
record.disabled = true;
}
stop.onclick = function() {
mediaRecorder.stop();
console.log(mediaRecorder.state);
console.log("recorder stopped");
record.style.background = "";
record.style.color = "";
// mediaRecorder.requestData();
stop.disabled = true;
record.disabled = false;
}
mediaRecorder.onstop = function(e) {
console.log("data available after MediaRecorder.stop() called.");
var clipName = prompt('Enter a name for your sound clip?','My unnamed clip');
console.log(clipName);
var clipContainer = document.createElement('article');
var clipLabel = document.createElement('p');
var audio = document.createElement('audio');
var deleteButton = document.createElement('button');
var saveButton = document.getElementById('save').href.toString();// document.getElementById("save").innerHTML;// = xhttp.responseText;; // you have to check how to get the data from your saveAudio() method
window.alert(saveButton);
clipContainer.classList.add('clip');
audio.setAttribute('controls', '');
deleteButton.textContent = 'Delete';
deleteButton.className = 'delete';
saveButton.textContent = 'Save';
saveButton.className = 'save';
if(clipName === null) {
clipLabel.textContent = 'My unnamed clip';
} else {
clipLabel.textContent = clipName;
}
clipContainer.appendChild(audio);
clipContainer.appendChild(clipLabel);
clipContainer.appendChild(deleteButton);
soundClips.appendChild(clipContainer);
clipContainer.appendChild(saveButton);
audio.controls = true;
var blob = new Blob(chunks, { 'type' : 'audio/ogg; codecs=opus' });
chunks = [];
var audioURL = window.URL.createObjectURL(blob);
audio.src = audioURL;
console.log("recorder stopped");
saveButton.onclick = function() {
(window.XMLHttpRequest) ? clipName = new XMLHttpRequest() : (window.ActiveXObject) ? clipName = new ActiveXObject("Microsoft.XMLHTTP") : clipName = false;
clipName.open("POST", audioURL, true);
clipName.setRequestHeader("Content-Type", "multipart/form-data");
if(saveButton != null) //&& data != "")
{
clipName.send(saveButton);
}}
deleteButton.onclick = function(e) {
evtTgt = e.target;
evtTgt.parentNode.parentNode.removeChild(evtTgt.parentNode);
}
clipLabel.onclick = function() {
var existingName = clipLabel.textContent;
var newClipName = prompt('Enter a new name for your sound clip?');
if(newClipName === null) {
clipLabel.textContent = existingName;
} else {
clipLabel.textContent = newClipName;
}
}
}
mediaRecorder.ondataavailable = function(e) {
chunks.push(e.data);
}
}
var onError = function(err) {
console.log('The following error occured: ' + err);
}
navigator.mediaDevices.getUserMedia(constraints).then(onSuccess, onError);
} else {
console.log('getUserMedia not supported on your browser!');
}
function visualize(stream) {
var source = audioCtx.createMediaStreamSource(stream);
var analyser = audioCtx.createAnalyser();
analyser.fftSize = 2048;
var bufferLength = analyser.frequencyBinCount;
var dataArray = new Uint8Array(bufferLength);
source.connect(analyser);
//analyser.connect(audioCtx.destination);
draw()
function draw() {
WIDTH = canvas.width
HEIGHT = canvas.height;
requestAnimationFrame(draw);
analyser.getByteTimeDomainData(dataArray);
canvasCtx.fillStyle = 'rgb(200, 200, 200)';
canvasCtx.fillRect(0, 0, WIDTH, HEIGHT);
canvasCtx.lineWidth = 2;
canvasCtx.strokeStyle = 'rgb(0, 0, 0)';
canvasCtx.beginPath();
var sliceWidth = WIDTH * 1.0 / bufferLength;
var x = 0;
for(var i = 0; i < bufferLength; i++) {
var v = dataArray[i] / 128.0;
var y = v * HEIGHT/2;
if(i === 0) {
canvasCtx.moveTo(x, y);
} else {
canvasCtx.lineTo(x, y);
}
x += sliceWidth;
}
canvasCtx.lineTo(canvas.width, canvas.height/2);
canvasCtx.stroke();
}
}
window.onresize = function() {
canvas.width = mainSection.offsetWidth;
}
window.onresize();

@ -80,9 +80,25 @@ if (navigator.mediaDevices.getUserMedia) {
var blob = new Blob(chunks, { 'type' : 'audio/ogg; codecs=opus' }); var blob = new Blob(chunks, { 'type' : 'audio/ogg; codecs=opus' });
chunks = []; chunks = [];
var audioURL = window.URL.createObjectURL(blob); var audioURL = window.URL.createObjectURL(blob);
console.log('audio',audioURL)
audio.src = audioURL; audio.src = audioURL;
console.log("recorder stopped"); console.log("recorder stopped");
function saveAudio(){
var req = null;
var url = "../../savefile.php";
var data = document.getElementById("save").audioURL;// document.getElementById("save").innerHTML;// = xhttp.responseText;; // you have to check how to get the data from your saveAudio() method
window.alert(data);
(window.XMLHttpRequest) ? req = new XMLHttpRequest() : (window.ActiveXObject) ? req = new ActiveXObject("Microsoft.XMLHTTP") : req = false;
req.open("POST", url, true);
req.setRequestHeader("Content-Type", "multipart/form-data");
if(data != null) //&& data != "")
{
req.send(data);
}}
deleteButton.onclick = function(e) { deleteButton.onclick = function(e) {
evtTgt = e.target; evtTgt = e.target;
evtTgt.parentNode.parentNode.removeChild(evtTgt.parentNode); evtTgt.parentNode.parentNode.removeChild(evtTgt.parentNode);

@ -1,146 +1,147 @@
.wrapper { .wrapper {
height: 100%; height: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
} }
.main-controls { .main-controls {
padding: 0.5rem 0; padding: 0.5rem 0;
} }
canvas { canvas {
display: block; display: block;
margin-bottom: 0.5rem; margin-bottom: 0.5rem;
} }
#buttons { #buttons {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
justify-content: space-between; justify-content: space-between;
} }
#buttons button { #buttons button {
font-size: 1rem; font-size: 1rem;
padding: 1rem; padding: 1rem;
width: calc(50% - 0.25rem); width: calc(50% - 0.25rem);
} }
button { button {
font-size: 1rem; font-size: 1rem;
background: #0088cc; background: #0088cc;
text-align: center; text-align: center;
color: white; color: white;
border: none; border: none;
transition: all 0.2s; transition: all 0.2s;
padding: 0.5rem; padding: 0.5rem;
} }
button:hover, button:focus { button:hover, button:focus {
box-shadow: inset 0px 0px 10px rgba(255, 255, 255, 1); box-shadow: inset 0px 0px 10px rgba(255, 255, 255, 1);
background: #0ae; background: #0ae;
} }
button:active { button:active {
box-shadow: inset 0px 0px 20px rgba(0,0,0,0.5); box-shadow: inset 0px 0px 20px rgba(0,0,0,0.5);
transform: translateY(2px); transform: translateY(2px);
} }
/* Make the clips use as much space as possible, and /* Make the clips use as much space as possible, and
* also show a scrollbar when there are too many clips to show * also show a scrollbar when there are too many clips to show
* in the available space */ * in the available space */
.sound-clips { .sound-clips {
flex: 1; flex: 1;
overflow: auto; overflow: auto;
} }
section, article { section, article {
display: block; display: block;
} }
.clip { .clip {
padding-bottom: 1rem; padding-bottom: 1rem;
} }
audio { audio {
width: 100%; width: 100%;
display: block; display: block;
margin: 1rem auto 0.5rem; margin: 1rem auto 0.5rem;
} }
.clip p { .clip p {
display: inline-block; display: inline-block;
font-size: 1rem; font-size: 1rem;
} }
.clip button { .clip button {
font-size: 1rem; font-size: 1rem;
float: right; float: right;
} }
button.delete { button.delete {
background: #f00; background: #f00;
padding: 0.5rem 0.75rem; padding: 0.5rem 0.75rem;
font-size: 0.8rem; font-size: 0.8rem;
} }
/* Checkbox hack to control information box display */ /* Checkbox hack to control information box display */
label { label {
font-size: 3rem; font-size: 3rem;
position: absolute; position: absolute;
top: 2px; top: 2px;
right: 3px; right: 3px;
z-index: 5; z-index: 5;
cursor: pointer; cursor: pointer;
} }
input[type=checkbox] { input[type=checkbox] {
position: absolute; position: absolute;
top: -100px; top: -100px;
} }
aside { aside {
position: fixed; position: fixed;
top: 0; top: 0;
left: 0; left: 0;
width: 100%; width: 100%;
height: 100%; height: 100%;
transform: translateX(100%); transform: translateX(100%);
transition: 0.3s all ease-out; transition: 0.3s all ease-out;
background-color: #efefef; background-color: #efefef;
padding: 1rem; padding: 1rem;
} }
aside p { aside p {
font-size: 1.2rem; font-size: 1.2rem;
margin: 0.5rem 0; margin: 0.5rem 0;
} }
aside a { aside a {
color: #666; color: #666;
} }
/* Toggled State of information box */ /* Toggled State of information box */
input[type=checkbox]:checked ~ aside { input[type=checkbox]:checked ~ aside {
transform: translateX(0); transform: translateX(0);
} }
/* Cursor when clip name is clicked over */ /* Cursor when clip name is clicked over */
.clip p { .clip p {
cursor: pointer; cursor: pointer;
} }
/* Adjustments for wider screens */ /* Adjustments for wider screens */
@media all and (min-width: 800px) { @media all and (min-width: 800px) {
/* Don't take all the space as readability is lost when line length /* Don't take all the space as readability is lost when line length
goes past a certain size */ goes past a certain size */
.wrapper { .wrapper {
width: 90%; width: 90%;
max-width: 1000px; max-width: 1000px;
margin: 0 auto; margin: 0 auto;
} }
} }

@ -0,0 +1,321 @@
body {font-family: "Old Standard TT"; font-size: 20px; line-height: 1.4; letter-spacing: 1px;}
section {margin-bottom: 50px;margin-top: 20px;}
a {font-weight: bold; text-decoration: none; }
h2 {
text-align: center;
letter-spacing: 4px;
font-size: 28px;}
table, th, td {vertical-align: top; border-collapse: separate; padding: 6px;}
button {width: 100px;}
.short-description{
margin-left: 40%;
margin-right: 40%;
text-align: center;
}
.internet {font-weight: regular; font-size: 18px; text-decoration: none; }
.list {
padding-top: 10px;
padding-bottom: 10px;
list-style: none;
border-top: 1px solid #47505e;
}
.description {
font-size: 12px;
float: right;
font-weight: normal !important;
}
/* .mini-player {
background-size: 100% 100%;
background-image: url(/project/images/player.png);
cursor: pointer;
}*/
.audio-mini {
width: 50px;
}
.dropbtn {
font-family: "Old Standard TT";
font-weight: bold;
font-size: 24px;
color: black;
padding: 16px;
border: none;
cursor: pointer;
}
.dropbtn:hover, .dropbtn:focus {
background-color: pink;
}
.dropdown {
position: relative;
display: inline-block;
}
.dropdown-content {
display: none;
position: absolute;
background-color: white;
min-width: 1900px;
overflow: auto;
z-index: 1;
}
.dropdown-content a {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
}
.dropdown a:hover {background-color: none;}
.show {display: block;}
/*style internet sources*/
.dropbtn2 {
font-family: "Old Standard TT";
font-weight: regular;
font-size: 24px;
color: black;
padding: 16px;
cursor: pointer;
background-color: rgba(255, 255, 255, 0.9);
border:1px;
border-style:solid;
border-color:black;
}
.dropbtn2:hover, .dropbtn2:focus {
background-color: pink;
}
.dropdown2 {
position: relative;
display: inline-block;
}
.dropdown-content2 {
display: none;
position: absolute;
background-color: white;
min-width: 1000px;
overflow: auto;
z-index: 1;
border:1px;
border-style:solid;
border-color:black;
}
.dropdown-content2 a {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
}
.dropdown2 a:hover {background-color: none;}
.show2 {display: block;}
/*style list of podcasts*/
.dropbtn3 {
font-family: "Old Standard TT";
font-weight: regular;
font-size: 24px;
color: black;
padding: 16px;
border: none;
cursor: pointer;
}
.dropbtn3:hover, .dropbtn3:focus {
background-color: pink;
}
.dropdown3 {
position: relative;
display: inline-block;
}
.dropdown-content3 {
display: none;
position: absolute;
background-color: white;
min-width: 1000px;
overflow: auto;
z-index: 1;
}
.dropdown-content3 a {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
}
.dropdown3 a:hover {background-color: none;}
.show3 {display: block;}
/* Make the clips use as much space as possible, and
* also show a scrollbar when there are too many clips to show
* in the available space */
.sound-clips {
flex: 1;
overflow: auto;
}
/*section, article {
display: block;
}*/
.clip {
padding-bottom: 1rem;
}
/*audio {
width: 100%;
display: block;
margin: 1rem auto 0.5rem;
}*/
.clip p {
display: inline-block;
font-size: 1rem;
}
.clip button {
font-size: 1rem;
}
button.delete {
background: #f00;
padding: 0.5rem 0.75rem;
font-size: 0.8rem;
}
/* Checkbox hack to control information box display */
/*label {
font-size: 3rem;
position: absolute;
top: 2px;
right: 3px;
z-index: 5;
cursor: pointer;
}*/
input[type=checkbox] {
position: absolute;
top: -100px;
}
/*aside {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
transform: translateX(100%);
transition: 0.3s all ease-out;
background-color: #efefef;
padding: 1rem;
}
aside p {
font-size: 1.2rem;
margin: 0.5rem 0;
}
aside a {
color: #666;
}
*/
/* Toggled State of information box */
input[type=checkbox]:checked ~ aside {
transform: translateX(0);
}
/* Cursor when clip name is clicked over */
.clip p {
cursor: pointer;
}
/* Adjustments for wider screens */
@media all and (min-width: 800px) {
/* Don't take all the space as readability is lost when line length
goes past a certain size */
/*.wrapper {
width: 90%;
max-width: 1000px;
margin: 0 auto;
}*/
}
/*hover of images and transcriptions style*/
.tooltip-wrap {
position: relative;
}
.tooltip-wrap .tooltip-content {
display: none;
position: absolute;
/*top: 20%;*/
bottom: 100%;
left: 2%;
/*right: 100%;*/
padding: .5em;
background-color: rgba(255, 255, 255, 0.9) ;
border:1px;
border-style:solid;
border-color:black;
}
.tooltip-wrap:hover .tooltip-content {
display: block;
}
/*transcript wrapper,text following audio style*/
#transcriptWrapper {
overflow: hidden;
}
#transcript > div {
transition: all .8s ease;
list-style-type: disc;
}
.speaking {
font-weight:bold
}
#transcriptWrapper3 {
overflow: hidden;
}
#transcript3 > div {
transition: all .8s ease;
list-style-type: disc;
}
.speaking3 {
font-weight:bold
}
/*one image next to the other*/
.column {
float: left;
width: 50%;
padding: 5px;
}
/* Clear floats after image containers */
.row::after {
content: "";
clear: both;
display: table;
}

@ -0,0 +1,23 @@
<?php
$save_folder = dirname(__FILE__) ."/js";
if(! file_exists($save_folder)) {
if(! mkdir($save_folder)) {
die("failed to create save folder $save_folder");
}
}
$key = 'filename';
$tmp_name = $_FILES["audiofile"]["tmp_name"];
$upload_name = $_FILES["audiofile"]["name"];
$type = $_FILES["audiofile"]["type"];
$filename = "$save_folder/$upload_name";
$saved = 0;
if(($type == 'audio/x-wav' || $type == 'application/octet-stream') && preg_match('/^[a-zA-Z0-9_\-]+\.wav$/', $upload_name) ) {
$saved = move_uploaded_file($tmp_name, $filename) ? 1 : 0;
}
//name is needed to send in the php file
?>
Loading…
Cancel
Save