Merge branch 'master' of git.xpub.nl:/var/www/git.xpub.nl/repos/tgc3
@ -0,0 +1,42 @@
|
||||
server {
|
||||
listen 80 default_server;
|
||||
listen [::]:80 default_server;
|
||||
|
||||
#root /var/www/html;
|
||||
root /media/floppy/noweb;
|
||||
|
||||
# Add index.php to the list if you are using PHP
|
||||
index index.html index.htm index.nginx-debian.html;
|
||||
|
||||
server_name _;
|
||||
|
||||
error_page 404 /insert.html;
|
||||
|
||||
location = /insert.html {
|
||||
root /var/www/static;
|
||||
internal;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ =404;
|
||||
}
|
||||
|
||||
location /static {
|
||||
alias /var/www/static;
|
||||
autoindex on;
|
||||
}
|
||||
|
||||
# /cgi-bin/foo.cgi ==> /media/floppy/noweb/cgi-bin/foo.cgi
|
||||
location ~ ^/cgi-bin/.*\.cgi$ {
|
||||
root /media/floppy/noweb/cgi-bin;
|
||||
rewrite ^/cgi-bin/(.*)\.cgi /$1.cgi break;
|
||||
include /etc/nginx/fastcgi_params;
|
||||
fastcgi_pass unix:/var/run/fcgiwrap.socket;
|
||||
fastcgi_param SCRIPT_FILENAME /media/floppy/noweb/cgi-bin$fastcgi_script_name;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -0,0 +1,20 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
|
||||
|
||||
|
||||
<script language="javascript" type="text/javascript" src="libraries/p5.js"></script>
|
||||
<!-- uncomment lines below to include extra p5 libraries -->
|
||||
<script language="javascript" src="libraries/p5.dom.js"></script>
|
||||
<script language="javascript" src="libraries/p5.sound.js"></script>
|
||||
<script language="javascript" type="text/javascript" src="sketch.js"></script>
|
||||
<!-- this line removes any default padding and style. you might only need one of these values set. -->
|
||||
<style> body {padding: 0; margin: 0;} </style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,267 @@
|
||||
var carrier; // this is the carrierillator we will hear
|
||||
var modulator; // this carrierillator will modulate the amplitude of the carrier
|
||||
var fft; // we'll visualize the waveform
|
||||
|
||||
var opac;
|
||||
var carrier;
|
||||
|
||||
|
||||
|
||||
function getRandomArbitrary(min, max) {
|
||||
return Math.random() * (max - min) + min;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
function setup() {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
createCanvas(innerWidth,innerHeight);
|
||||
noFill();
|
||||
|
||||
|
||||
//SETING FIRST OSCILLATOR: CARRIER
|
||||
// EXPLANATION FROM WEBSITE: The carrier is typically set at an audible frequency (i.e. 440 Hz) and connected to master output by default. The carrier.amp is set to zero because we will have the modulator control its amplitude.
|
||||
|
||||
var randomnumb = getRandomArbitrary(0, 20);
|
||||
|
||||
console.log(randomnumb);
|
||||
carrier = new p5.Oscillator(); // connects to master output by default
|
||||
carrier.freq(200 + randomnumb); // it sets the frequency of the carrier. AN AUDIBLE ONE.
|
||||
carrier.amp(1);
|
||||
// carrier's amp is 0 by default, giving our modulator total control
|
||||
|
||||
carrier.start();
|
||||
|
||||
|
||||
|
||||
|
||||
// create an fft to analyze the audio
|
||||
//an FFT (fast Fourier transform) converts a signal from its original domain (often time or space) to a representation in the frequency domain and vice versa
|
||||
|
||||
fft = new p5.FFT();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
function draw() {
|
||||
|
||||
|
||||
//depen de la alçada, la nota TOCADA se sent mes for o menys (volum = amplitud)
|
||||
if(mouseY <= height/2) {
|
||||
|
||||
var ampli = map(mouseY, 0, height, 0.01, 2.02);
|
||||
|
||||
|
||||
}else{
|
||||
|
||||
|
||||
var ampli = map(mouseY, height, 0, 0.01, 2.02);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
// change carrierillator frequency based on mouseX
|
||||
|
||||
var modFreq = 0.1;
|
||||
|
||||
|
||||
|
||||
|
||||
// si el mouseY és igual o el mateix que la meitat de l'altura, fes aixo. ((DEFINEIX LA AMPLITUD.))
|
||||
if(mouseY <= height/2) {
|
||||
|
||||
var modAmp = map(mouseY, 0, height, 0.01, 2.02);
|
||||
|
||||
}else{
|
||||
|
||||
var modAmp = map(mouseY, height, 0, 0.01, 2.02);
|
||||
|
||||
|
||||
}
|
||||
|
||||
carrier.amp(modAmp, 0.01); // fade time of 0.1 for smooth fading
|
||||
|
||||
|
||||
// analyze the waveform
|
||||
waveform = fft.waveform();
|
||||
|
||||
|
||||
|
||||
// drawText(modFreq, modAmp);
|
||||
|
||||
if (mouseIsPressed || (touches && touches.length)){
|
||||
|
||||
opac = 100;
|
||||
var mx = mouseX || (touches[0] && touches[0][0]);
|
||||
if (mx > 0 && mx < width/20 ){
|
||||
|
||||
carrier.freq(220.0);
|
||||
carrier.amp(ampli);
|
||||
|
||||
|
||||
}else if ( mx > width/20 && mx < 2*(width/20)){
|
||||
|
||||
carrier.freq(233.08);
|
||||
carrier.amp(ampli);
|
||||
|
||||
}else if (mx > 2*(width/20) && mx < 3*(width/20)){
|
||||
|
||||
carrier.freq(246.94);
|
||||
carrier.amp(ampli);
|
||||
}else if (mx > 3*(width/20) && mx < 4*(width/20)){
|
||||
|
||||
carrier.freq(261.63);
|
||||
carrier.amp(ampli);
|
||||
|
||||
|
||||
|
||||
|
||||
}else if (mx > 4*(width/20) && mx < 5*(width/20)){
|
||||
|
||||
carrier.freq(277.18);
|
||||
carrier.amp(ampli);
|
||||
}else if (mx > 5*(width/20) && mx < 6*(width/20)){
|
||||
|
||||
carrier.freq(293.66);
|
||||
carrier.amp(ampli);
|
||||
}else if (mx > 6*(width/20) && mx < 7*(width/20)){
|
||||
|
||||
carrier.freq(311.13);
|
||||
carrier.amp(ampli);
|
||||
}else if (mx > 7*(width/20) && mx < 8*(width/20)){
|
||||
|
||||
carrier.freq(329.63);
|
||||
carrier.amp(ampli);
|
||||
}else if (mx > 8*(width/20) && mx < 9*(width/20)){
|
||||
|
||||
carrier.freq(349.23);
|
||||
carrier.amp(ampli);
|
||||
}else if (mx > 9*(width/20) && mx < 10*(width/20)){
|
||||
|
||||
carrier.freq(369.99);
|
||||
carrier.amp(ampli);
|
||||
}else if (mx > 10*(width/20) && mx < 11*(width/20)){
|
||||
|
||||
carrier.freq(392.0);
|
||||
carrier.amp(ampli);
|
||||
}else if (mx > 11*(width/20) && mx < 12*(width/20)){
|
||||
|
||||
carrier.freq(415.3);
|
||||
carrier.amp(ampli);
|
||||
}else if (mx > 12*(width/20) && mx < 13*(width/20)){
|
||||
|
||||
carrier.freq(440.0);
|
||||
carrier.amp(ampli);
|
||||
}else if (mx > 13*(width/20) && mx < 14*(width/20)){
|
||||
|
||||
carrier.freq(466.16);
|
||||
carrier.amp(ampli);
|
||||
}else if (mx > 14*(width/20) && mx < 15*(width/20)){
|
||||
|
||||
carrier.freq(493.88);
|
||||
carrier.amp(ampli);
|
||||
}else if (mx > 15*(width/20) && mx < 16*(width/20)){
|
||||
|
||||
carrier.freq(523.25);
|
||||
carrier.amp(ampli);
|
||||
}else if (mx > 16*(width/20) && mx < 17*(width/20)){
|
||||
|
||||
carrier.freq(554.37);
|
||||
carrier.amp(ampli);
|
||||
}else if (mx > 17*(width/20) && mx < 18*(width/20)){
|
||||
|
||||
carrier.freq(587.33);
|
||||
carrier.amp(ampli);
|
||||
}else if (mx > 18*(width/20) && mx < 19*(width/20)){
|
||||
|
||||
carrier.freq(622.25);
|
||||
carrier.amp(ampli);
|
||||
}else if (mx > 19*(width/20) && mx < width){
|
||||
|
||||
carrier.freq(659.26);
|
||||
carrier.amp(ampli);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//draw a new line
|
||||
stroke(0,0,0);
|
||||
strokeWeight(0.5);
|
||||
|
||||
line(0, height/2,mx, mouseY);
|
||||
line(mx, mouseY, width, height/2);
|
||||
background(255, 255, 255,100);
|
||||
|
||||
|
||||
|
||||
|
||||
}else{
|
||||
|
||||
|
||||
|
||||
// IF MOUSE IS NOT PRESSED
|
||||
if(mouseY <= height/2) {
|
||||
|
||||
opac = map(mouseY, 0,height/2, 100, 0);
|
||||
|
||||
}else{
|
||||
|
||||
opac = map(mouseY, height, height/2, 100, 0);
|
||||
|
||||
|
||||
}
|
||||
|
||||
background(255,255,255,opac); // alpha
|
||||
// draw the shape of the waveform
|
||||
drawWaveform();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
function drawWaveform() {
|
||||
|
||||
|
||||
if(mouseIsPressed){
|
||||
|
||||
stroke(255,255,255);
|
||||
strokeWeight(1);
|
||||
|
||||
line(0, height/2,mx, mouseY);
|
||||
line(mx, mouseY, width, height/2);
|
||||
background(0, 0, 0,100);
|
||||
|
||||
}else{
|
||||
|
||||
stroke(0,0,0,100);
|
||||
strokeWeight(0.5);
|
||||
beginShape();
|
||||
for (var i = 0; i<waveform.length; i++){
|
||||
var x = map(i, 0, (waveform.length)/8, 0, width);
|
||||
var y = map((waveform[i])/8, -1, 1, -height/2, height/2);
|
||||
vertex(x, y + height/2);
|
||||
}
|
||||
endShape();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,94 @@
|
||||
Copyright (c) 2012 by Sorkin Type Co (www.sorkintype.com), with Reserved Font Name 'Fjalla'
|
||||
|
||||
Fjalla is a trademark of Sorkin Type Co.
|
||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||
This license is copied below, and is also available with a FAQ at:
|
||||
http://scripts.sil.org/OFL
|
||||
|
||||
|
||||
-----------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-----------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font creation
|
||||
efforts of academic and linguistic communities, and to provide a free and
|
||||
open framework in which fonts may be shared and improved in partnership
|
||||
with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply
|
||||
to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as
|
||||
distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||
or substituting -- in part or in whole -- any of the components of the
|
||||
Original Version, by changing formats or by porting the Font Software to a
|
||||
new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||
redistribute, and sell modified and unmodified copies of the Font
|
||||
Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components,
|
||||
in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the corresponding
|
||||
Copyright Holder. This restriction only applies to the primary font name as
|
||||
presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created
|
||||
using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
@ -0,0 +1,17 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" type="text/css" href="style.css">
|
||||
|
||||
|
||||
<title>The fine line - Existencialism and spirituality</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
<div id="wrap">
|
||||
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,17 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" type="text/css" href="style.css">
|
||||
|
||||
|
||||
<title>The fine line - Explanation of the project</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
<div id="wrap">
|
||||
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,40 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" type="text/css" href="style.css">
|
||||
|
||||
|
||||
<script language="javascript" type="text/javascript" src="libraries/p5.js"></script>
|
||||
<script language="javascript" src="libraries/p5.dom.js"></script>
|
||||
<script language="javascript" src="libraries/p5.sound.js"></script>
|
||||
<script language="javascript" type="text/javascript" src="sketch.js"></script>
|
||||
|
||||
<title>The fine line</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="canvasp5"></div>
|
||||
|
||||
<div id="wrap">
|
||||
|
||||
<div id="fine-line">
|
||||
<h1>"The fine line between nothing matters and everything matters"</h1>
|
||||
</div>
|
||||
|
||||
<div class="links">
|
||||
<li>
|
||||
|
||||
<ul><a href="">Existencialism and Spirituality</a></ul>
|
||||
<ul><a href="">Explanation of the project</a></ul>
|
||||
<ul><a href="">Score to find the line</a></ul>
|
||||
<ul><a href="../fine-line/index.html">The fine line</a></ul>
|
||||
|
||||
|
||||
</li>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,17 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" type="text/css" href="style.css">
|
||||
|
||||
|
||||
<title>The fine line - Score</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
<div id="wrap">
|
||||
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,112 @@
|
||||
var carrier; // this is the carrierillator we will hear
|
||||
var modulator; // this carrierillator will modulate the amplitude of the carrier
|
||||
var fft; // we'll visualize the waveform
|
||||
|
||||
var opac;
|
||||
var carrier;
|
||||
|
||||
|
||||
|
||||
function getRandomArbitrary(min, max) {
|
||||
return Math.random() * (max - min) + min;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
function setup() {
|
||||
|
||||
|
||||
var myCanvas = createCanvas(innerWidth,200);
|
||||
myCanvas.parent("canvasp5");
|
||||
|
||||
|
||||
noFill();
|
||||
|
||||
|
||||
//SETING FIRST OSCILLATOR: CARRIER
|
||||
// EXPLANATION FROM WEBSITE: The carrier is typically set at an audible frequency (i.e. 440 Hz) and connected to master output by default. The carrier.amp is set to zero because we will have the modulator control its amplitude.
|
||||
|
||||
var randomnumb = getRandomArbitrary(0, 20);
|
||||
|
||||
console.log(randomnumb);
|
||||
carrier = new p5.Oscillator(); // connects to master output by default
|
||||
carrier.freq(200 + randomnumb); // it sets the frequency of the carrier. AN AUDIBLE ONE.
|
||||
carrier.amp(1);
|
||||
// carrier's amp is 0 by default, giving our modulator total control
|
||||
|
||||
carrier.start();
|
||||
|
||||
|
||||
|
||||
|
||||
// create an fft to analyze the audio
|
||||
//an FFT (fast Fourier transform) converts a signal from its original domain (often time or space) to a representation in the frequency domain and vice versa
|
||||
|
||||
fft = new p5.FFT();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
function draw() {
|
||||
|
||||
|
||||
|
||||
|
||||
var modAmp= 1;
|
||||
|
||||
// si el mouseY és igual o el mateix que la meitat de l'altura, fes aixo. ((DEFINEIX LA AMPLITUD.))
|
||||
/* if(mouseY <= height) {
|
||||
|
||||
var modAmp = map(mouseY, 0, height, 0.01, 2.02);
|
||||
|
||||
}else{
|
||||
|
||||
var modAmp = map(mouseY, height, 0, 0.01, 2.02);
|
||||
|
||||
|
||||
}
|
||||
*/
|
||||
carrier.amp(modAmp, 0.01); // fade time of 0.1 for smooth fading
|
||||
|
||||
|
||||
// analyze the waveform
|
||||
waveform = fft.waveform();
|
||||
|
||||
|
||||
background(255,255,255,50); // alpha
|
||||
|
||||
// draw the shape of the waveform
|
||||
drawWaveform();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function drawWaveform() {
|
||||
|
||||
|
||||
stroke(0,0,0,100);
|
||||
strokeWeight(0.5);
|
||||
beginShape();
|
||||
for (var i = 0; i<waveform.length; i++){
|
||||
var x = map(i, 0, (waveform.length)/8, 0, width);
|
||||
var y = map((waveform[i])/8, -1, 1, -height/2, height/2);
|
||||
vertex(x, y + 100);
|
||||
}
|
||||
endShape();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -0,0 +1,71 @@
|
||||
@font-face {
|
||||
font-family: FjallaOne;
|
||||
src: url(Fjalla_One/FjallaOne-Regular.ttf);
|
||||
}
|
||||
|
||||
body{
|
||||
font-family: 'FjallaOne', sans-serif;
|
||||
|
||||
}
|
||||
|
||||
li{
|
||||
list-style: none;
|
||||
line-height: 0.7;
|
||||
margin-left:-40px;
|
||||
|
||||
}
|
||||
|
||||
h1{
|
||||
|
||||
font-size: 70px;
|
||||
|
||||
}
|
||||
|
||||
#wrap{
|
||||
position:relative;
|
||||
padding-top:100px;
|
||||
width:75%;
|
||||
margin: auto;
|
||||
text-align:center;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.links{
|
||||
padding-top: 300px;
|
||||
width:200px;
|
||||
margin:auto;
|
||||
text-align: left;
|
||||
|
||||
|
||||
}
|
||||
|
||||
#defaultCanvas0{
|
||||
position:absolute;
|
||||
top:30px;
|
||||
|
||||
}
|
||||
|
||||
#canvasp5{
|
||||
position:absolute;
|
||||
z-index: 0;
|
||||
top:300px;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Smartphones (portrait) ----------- */
|
||||
@media only screen and (max-width : 600px) {
|
||||
/* Styles */
|
||||
}
|
||||
|
||||
|
||||
/* iPads (portrait and landscape) ----------- */
|
||||
@media only screen and (min-device-width : 600px) and (max-device-width : 1024px) {
|
||||
/* Styles */
|
||||
}
|
||||
|
||||
/* Desktops and laptops ----------- */
|
||||
@media only screen and (min-width : 1024px) {
|
||||
/* Styles */
|
||||
}
|
@ -0,0 +1 @@
|
||||
FLOPPYLEFT - 2017
|
@ -0,0 +1,7 @@
|
||||
Author: Slavoj Žižek
|
||||
Date: 1989
|
||||
Title: The Sublime Object of Floppy
|
||||
|
||||
Description:
|
||||
|
||||
And so on, and so on, and so on.
|
@ -0,0 +1,217 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
'''
|
||||
This module contais some common routines used by other samples.
|
||||
'''
|
||||
|
||||
import numpy as np
|
||||
import cv2
|
||||
import os
|
||||
from contextlib import contextmanager
|
||||
import itertools as it
|
||||
|
||||
image_extensions = ['.bmp', '.jpg', '.jpeg', '.png', '.tif', '.tiff', '.pbm', '.pgm', '.ppm']
|
||||
|
||||
class Bunch(object):
|
||||
def __init__(self, **kw):
|
||||
self.__dict__.update(kw)
|
||||
def __str__(self):
|
||||
return str(self.__dict__)
|
||||
|
||||
def splitfn(fn):
|
||||
path, fn = os.path.split(fn)
|
||||
name, ext = os.path.splitext(fn)
|
||||
return path, name, ext
|
||||
|
||||
def anorm2(a):
|
||||
return (a*a).sum(-1)
|
||||
def anorm(a):
|
||||
return np.sqrt( anorm2(a) )
|
||||
|
||||
def homotrans(H, x, y):
|
||||
xs = H[0, 0]*x + H[0, 1]*y + H[0, 2]
|
||||
ys = H[1, 0]*x + H[1, 1]*y + H[1, 2]
|
||||
s = H[2, 0]*x + H[2, 1]*y + H[2, 2]
|
||||
return xs/s, ys/s
|
||||
|
||||
def to_rect(a):
|
||||
a = np.ravel(a)
|
||||
if len(a) == 2:
|
||||
a = (0, 0, a[0], a[1])
|
||||
return np.array(a, np.float64).reshape(2, 2)
|
||||
|
||||
def rect2rect_mtx(src, dst):
|
||||
src, dst = to_rect(src), to_rect(dst)
|
||||
cx, cy = (dst[1] - dst[0]) / (src[1] - src[0])
|
||||
tx, ty = dst[0] - src[0] * (cx, cy)
|
||||
M = np.float64([[ cx, 0, tx],
|
||||
[ 0, cy, ty],
|
||||
[ 0, 0, 1]])
|
||||
return M
|
||||
|
||||
|
||||
def lookat(eye, target, up = (0, 0, 1)):
|
||||
fwd = np.asarray(target, np.float64) - eye
|
||||
fwd /= anorm(fwd)
|
||||
right = np.cross(fwd, up)
|
||||
right /= anorm(right)
|
||||
down = np.cross(fwd, right)
|
||||
R = np.float64([right, down, fwd])
|
||||
tvec = -np.dot(R, eye)
|
||||
return R, tvec
|
||||
|
||||
def mtx2rvec(R):
|
||||
w, u, vt = cv2.SVDecomp(R - np.eye(3))
|
||||
p = vt[0] + u[:,0]*w[0] # same as np.dot(R, vt[0])
|
||||
c = np.dot(vt[0], p)
|
||||
s = np.dot(vt[1], p)
|
||||
axis = np.cross(vt[0], vt[1])
|
||||
return axis * np.arctan2(s, c)
|
||||
|
||||
def draw_str(dst, (x, y), s):
|
||||
cv2.putText(dst, s, (x+1, y+1), cv2.FONT_HERSHEY_PLAIN, 1.0, (0, 0, 0), thickness = 2, lineType=cv2.CV_AA)
|
||||
cv2.putText(dst, s, (x, y), cv2.FONT_HERSHEY_PLAIN, 1.0, (255, 255, 255), lineType=cv2.CV_AA)
|
||||
|
||||
class Sketcher:
|
||||
def __init__(self, windowname, dests, colors_func):
|
||||
self.prev_pt = None
|
||||
self.windowname = windowname
|
||||
self.dests = dests
|
||||
self.colors_func = colors_func
|
||||
self.dirty = False
|
||||
self.show()
|
||||
cv2.setMouseCallback(self.windowname, self.on_mouse)
|
||||
|
||||
def show(self):
|
||||
cv2.imshow(self.windowname, self.dests[0])
|
||||
|
||||
def on_mouse(self, event, x, y, flags, param):
|
||||
pt = (x, y)
|
||||
if event == cv2.EVENT_LBUTTONDOWN:
|
||||
self.prev_pt = pt
|
||||
if self.prev_pt and flags & cv2.EVENT_FLAG_LBUTTON:
|
||||
for dst, color in zip(self.dests, self.colors_func()):
|
||||
cv2.line(dst, self.prev_pt, pt, color, 5)
|
||||
self.dirty = True
|
||||
self.prev_pt = pt
|
||||
self.show()
|
||||
else:
|
||||
self.prev_pt = None
|
||||
|
||||
|
||||
# palette data from matplotlib/_cm.py
|
||||
_jet_data = {'red': ((0., 0, 0), (0.35, 0, 0), (0.66, 1, 1), (0.89,1, 1),
|
||||
(1, 0.5, 0.5)),
|
||||
'green': ((0., 0, 0), (0.125,0, 0), (0.375,1, 1), (0.64,1, 1),
|
||||
(0.91,0,0), (1, 0, 0)),
|
||||
'blue': ((0., 0.5, 0.5), (0.11, 1, 1), (0.34, 1, 1), (0.65,0, 0),
|
||||
(1, 0, 0))}
|
||||
|
||||
cmap_data = { 'jet' : _jet_data }
|
||||
|
||||
def make_cmap(name, n=256):
|
||||
data = cmap_data[name]
|
||||
xs = np.linspace(0.0, 1.0, n)
|
||||
channels = []
|
||||
eps = 1e-6
|
||||
for ch_name in ['blue', 'green', 'red']:
|
||||
ch_data = data[ch_name]
|
||||
xp, yp = [], []
|
||||
for x, y1, y2 in ch_data:
|
||||
xp += [x, x+eps]
|
||||
yp += [y1, y2]
|
||||
ch = np.interp(xs, xp, yp)
|
||||
channels.append(ch)
|
||||
return np.uint8(np.array(channels).T*255)
|
||||
|
||||
def nothing(*arg, **kw):
|
||||
pass
|
||||
|
||||
def clock():
|
||||
return cv2.getTickCount() / cv2.getTickFrequency()
|
||||
|
||||
@contextmanager
|
||||
def Timer(msg):
|
||||
print msg, '...',
|
||||
start = clock()
|
||||
try:
|
||||
yield
|
||||
finally:
|
||||
print "%.2f ms" % ((clock()-start)*1000)
|
||||
|
||||
class StatValue:
|
||||
def __init__(self, smooth_coef = 0.5):
|
||||
self.value = None
|
||||
self.smooth_coef = smooth_coef
|
||||
def update(self, v):
|
||||
if self.value is None:
|
||||
self.value = v
|
||||
else:
|
||||
c = self.smooth_coef
|
||||
self.value = c * self.value + (1.0-c) * v
|
||||
|
||||
class RectSelector:
|
||||
def __init__(self, win, callback):
|
||||
self.win = win
|
||||
self.callback = callback
|
||||
cv2.setMouseCallback(win, self.onmouse)
|
||||
self.drag_start = None
|
||||
self.drag_rect = None
|
||||
def onmouse(self, event, x, y, flags, param):
|
||||
x, y = np.int16([x, y]) # BUG
|
||||
if event == cv2.EVENT_LBUTTONDOWN:
|
||||
self.drag_start = (x, y)
|
||||
if self.drag_start:
|
||||
if flags & cv2.EVENT_FLAG_LBUTTON:
|
||||
xo, yo = self.drag_start
|
||||
x0, y0 = np.minimum([xo, yo], [x, y])
|
||||
x1, y1 = np.maximum([xo, yo], [x, y])
|
||||
self.drag_rect = None
|
||||
if x1-x0 > 0 and y1-y0 > 0:
|
||||
self.drag_rect = (x0, y0, x1, y1)
|
||||
else:
|
||||
rect = self.drag_rect
|
||||
self.drag_start = None
|
||||
self.drag_rect = None
|
||||
if rect:
|
||||
self.callback(rect)
|
||||
def draw(self, vis):
|
||||
if not self.drag_rect:
|
||||
return False
|
||||
x0, y0, x1, y1 = self.drag_rect
|
||||
cv2.rectangle(vis, (x0, y0), (x1, y1), (0, 255, 0), 2)
|
||||
return True
|
||||
@property
|
||||
def dragging(self):
|
||||
return self.drag_rect is not None
|
||||
|
||||
|
||||
def grouper(n, iterable, fillvalue=None):
|
||||
'''grouper(3, 'ABCDEFG', 'x') --> ABC DEF Gxx'''
|
||||
args = [iter(iterable)] * n
|
||||
return it.izip_longest(fillvalue=fillvalue, *args)
|
||||
|
||||
def mosaic(w, imgs):
|
||||
'''Make a grid from images.
|
||||
|
||||
w -- number of grid columns
|
||||
imgs -- images (must have same size and format)
|
||||
'''
|
||||
imgs = iter(imgs)
|
||||
img0 = imgs.next()
|
||||
pad = np.zeros_like(img0)
|
||||
imgs = it.chain([img0], imgs)
|
||||
rows = grouper(w, imgs, pad)
|
||||
return np.vstack(map(np.hstack, rows))
|
||||
|
||||
def getsize(img):
|
||||
h, w = img.shape[:2]
|
||||
return w, h
|
||||
|
||||
def mdot(*args):
|
||||
return reduce(np.dot, args)
|
||||
|
||||
def draw_keypoints(vis, keypoints, color = (0, 255, 255)):
|
||||
for kp in keypoints:
|
||||
x, y = kp.pt
|
||||
cv2.circle(vis, (int(x), int(y)), 2, color)
|
@ -0,0 +1,156 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import numpy as np
|
||||
import cv2, math
|
||||
import video
|
||||
|
||||
help_message = '''
|
||||
USAGE: opt_flow.py [<video_source>]
|
||||
|
||||
Keys:
|
||||
1 - toggle HSV flow visualization
|
||||
2 - toggle glitch
|
||||
|
||||
'''
|
||||
|
||||
# def draw_flow(img, flow, step=4): # size grid
|
||||
# h, w = img.shape[:2]
|
||||
# y, x = np.mgrid[step/2:h:step, step/2:w:step].reshape(2,-1)
|
||||
# fx, fy = flow[y,x].T
|
||||
# lines = np.vstack([x, y, x+fx, y+fy]).T.reshape(-1, 2, 2)
|
||||
# lines = np.int32(lines + 0.5)
|
||||
# vis = cv2.cvtColor(img, cv2.COLOR_GRAY2BGR)
|
||||
# cv2.polylines(vis, lines, 0, (0, 0, 255)) # BGR
|
||||
# for (x1, y1), (x2, y2) in lines:
|
||||
# cv2.circle(vis, (x1, y1), 1, (0, 255, 0), -1)
|
||||
# return vis
|
||||
|
||||
import OSC
|
||||
# from pythonosc import osc_message_builder
|
||||
# from pythonosc import udp_client
|
||||
import time
|
||||
|
||||
def send_flow0(img, flow, step=4): # size grid
|
||||
h, w = img.shape[:2]
|
||||
y, x = np.mgrid[step/2:h:step, step/2:w:step].reshape(2,-1)
|
||||
fx, fy = flow[y,x].T
|
||||
#print "fx, fy", fx, fy
|
||||
lines = np.vstack([x, y, x+fx, y+fy]).T.reshape(-1, 2, 2)
|
||||
lines = np.int32(lines + 0.5)
|
||||
vis = cv2.cvtColor(img, cv2.COLOR_GRAY2BGR)
|
||||
|
||||
|
||||
flines = []
|
||||
for (x1, y1), (x2, y2) in lines:
|
||||
# print ("y1", y1)
|
||||
if (x1 == 38 or x1 == 46 or x1 == 54 or x1 == 62 or x1 == 70 or x1 == 78 or x1 == 86 or x1 == 94 or x1 == 102 or x1 == 110 or x1 == 118) and y1 in range(38, 90, 8):
|
||||
flines.append(((x1,y1),(x2,y2)))
|
||||
normx = x1 / 8 - 4
|
||||
normy = 1 - ((y1 / 8 - 4) / 3.0)
|
||||
dx = x2-x1
|
||||
dy = y2 - y1
|
||||
m = int(math.sqrt( (dx*dx) + (dy*dy) ))
|
||||
if m>2:
|
||||
print ("dot", (normx, normy))
|
||||
msg = OSC.OSCMessage()
|
||||
msg.setAddress("/dot")
|
||||
#msg.append(dx)
|
||||
#msg.append(dy)
|
||||
#msg.append(m)
|
||||
msg.append(normx)
|
||||
msg.append(normy)
|
||||
client.send(msg)
|
||||
# client.send_message("/franc", m)
|
||||
|
||||
|
||||
# for (x1, y1), (x2, y2) in lines:
|
||||
# # print ("y1", y1)
|
||||
# if (y1 == 38 or y1 == 46 or y1 == 54 or y1 == 70 or y1 == 86) and x1 in range(38, 118, 8):
|
||||
# flines.append(((x1,y1),(x2,y2)))
|
||||
# dx = x2-x1
|
||||
# dy = y2 - y1
|
||||
# m = int(math.sqrt( (dx*dx) + (dy*dy) ))
|
||||
# if m>2:
|
||||
# print ("x", (dx, dy, m, x1, y1))
|
||||
# msg = OSC.OSCMessage()
|
||||
# msg.setAddress("/x")
|
||||
# msg.append(dx)
|
||||
# msg.append(dy)
|
||||
# msg.append(m)
|
||||
# msg.append(x1)
|
||||
# msg.append(y1)
|
||||
# client.send(msg)
|
||||
|
||||
|
||||
# Here goes BPM
|
||||
|
||||
|
||||
|
||||
|
||||
# for (x1, y1), (x2, y2) in lines:
|
||||
# # print ("y1", y1)
|
||||
# if (y1 == 10 or y1 == 110) and x1 in range(90, 150, 4):
|
||||
# flines.append(((x1,y1),(x2,y2)))
|
||||
# dx = x2-x1
|
||||
# dy = y2 - y1
|
||||
# m = int(math.sqrt( (dx*dx) + (dy*dy) ))
|
||||
# if m>2:
|
||||
# print ("l", (dx, dy, m, x1, y1))
|
||||
# msg = OSC.OSCMessage()
|
||||
# msg.setAddress("/left")
|
||||
# msg.append(dx)
|
||||
# msg.append(dy)
|
||||
# msg.append(m)
|
||||
# msg.append(x1)
|
||||
# msg.append(y1)
|
||||
# client.send(msg)
|
||||
|
||||
|
||||
flines = np.int32(flines)
|
||||
cv2.polylines(vis, flines, 0, (0, 40, 255)) # BGR
|
||||
for (x1, y1), (x2, y2) in flines:
|
||||
cv2.circle(vis, (x1, y1), 1, (0, 255, 0), -1)
|
||||
return vis
|
||||
|
||||
flines = np.int32(flines)
|
||||
cv2.polylines(vis, flines, 0, (0, 40, 255)) # BGR
|
||||
for (x1, y1), (x2, y2) in flines:
|
||||
cv2.circle(vis, (x1, y1), 1, (0, 255, 0), -1)
|
||||
return vis
|
||||
|
||||
# cv2.rectangle(img, pt1, pt2, color[, thickness[, lineType[, shift]]])
|
||||
|
||||
if __name__ == '__main__':
|
||||
import sys
|
||||
print help_message
|
||||
try: fn = sys.argv[1]
|
||||
except: fn = 0
|
||||
|
||||
|
||||
# connect to pd
|
||||
# Init OSC
|
||||
client = OSC.OSCClient()
|
||||
client.connect(('127.0.0.1', 9001)) # first argument is the IP of the host, second argument is the port to use
|
||||
#data="hello"
|
||||
# client = udp_client.SimpleUDPClient("127.0.0.1", 9001)
|
||||
|
||||
# connect camera
|
||||
# cam = video.create_capture(fn)
|
||||
cam = video.create_capture("0:size=160x120") #canvas size in pixels
|
||||
ret, prev = cam.read()
|
||||
prevgray = cv2.cvtColor(prev, cv2.COLOR_BGR2GRAY)
|
||||
cur_glitch = prev.copy()
|
||||
|
||||
while True:
|
||||
# print "GRAB FRAME"
|
||||
ret, img = cam.read()
|
||||
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
|
||||
flow = cv2.calcOpticalFlowFarneback(prevgray, gray, 0.5, 3, 15, 3, 5, 1.2, 0)
|
||||
prevgray = gray
|
||||
|
||||
cv2.imshow('flow', send_flow0(gray, flow))
|
||||
|
||||
ch = 0xFF & cv2.waitKey(5)
|
||||
if ch == 27:
|
||||
break
|
||||
cv2.destroyAllWindows()
|
@ -0,0 +1,66 @@
|
||||
#N canvas 136 23 897 545 10;
|
||||
#X floatatom 166 153 5 0 0 0 - - -;
|
||||
#X floatatom 282 159 5 0 0 0 - - -;
|
||||
#X obj 54 -92 tgl 15 0 empty empty empty 17 7 0 10 -262130 -1 -1 1
|
||||
1;
|
||||
#X msg 54 -54 \; pd dsp \$1;
|
||||
#X obj 267 -7 OSC/unpackOSC;
|
||||
#X obj 267 -46 iemnet/udpreceive 9001;
|
||||
#X obj 267 33 OSC/routeOSC /dot;
|
||||
#X obj 190 121 unpack f f;
|
||||
#N canvas 0 22 450 278 (subpatch) 0;
|
||||
#X array waveform 11 float 1;
|
||||
#A 0 -1 -1 -1 -1 -1 -1 -1 -0.333333 0 0.333333 -1;
|
||||
#X coords 0 1 10 -1 200 140 1 0 0;
|
||||
#X restore 494 188 graph;
|
||||
#X obj 224 247 tabwrite waveform;
|
||||
#X obj 264 189 t b f;
|
||||
#X obj 225 220 f;
|
||||
#X obj 198 354 tabread4~ waveform;
|
||||
#X obj 232 401 dac~;
|
||||
#X obj 488 116 tabread waveform;
|
||||
#X obj 543 23 + 1;
|
||||
#X obj 505 21 i;
|
||||
#X obj 504 -39 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1
|
||||
1;
|
||||
#X msg 534 78 0;
|
||||
#X floatatom 483 72 5 0 0 0 - - -;
|
||||
#X floatatom 424 254 5 0 0 0 - - -;
|
||||
#X obj 535 54 select 10;
|
||||
#X obj 204 325 *~ 10;
|
||||
#X obj 416 207 + 1;
|
||||
#X obj 506 -9 metro 100;
|
||||
#X obj 196 295 osc~;
|
||||
#X obj 364 370 line~;
|
||||
#X msg 364 342 \$1 10;
|
||||
#X obj 337 295 expr 100 + (100 * $f1);
|
||||
#X connect 2 0 3 0;
|
||||
#X connect 4 0 6 0;
|
||||
#X connect 5 0 4 0;
|
||||
#X connect 6 0 7 0;
|
||||
#X connect 7 0 0 0;
|
||||
#X connect 7 0 10 0;
|
||||
#X connect 7 1 1 0;
|
||||
#X connect 7 1 11 1;
|
||||
#X connect 10 0 11 0;
|
||||
#X connect 10 1 9 1;
|
||||
#X connect 11 0 9 0;
|
||||
#X connect 12 0 13 0;
|
||||
#X connect 12 0 13 1;
|
||||
#X connect 14 0 23 0;
|
||||
#X connect 15 0 16 1;
|
||||
#X connect 16 0 15 0;
|
||||
#X connect 16 0 19 0;
|
||||
#X connect 16 0 14 0;
|
||||
#X connect 16 0 21 0;
|
||||
#X connect 17 0 24 0;
|
||||
#X connect 18 0 16 1;
|
||||
#X connect 21 0 18 0;
|
||||
#X connect 22 0 12 0;
|
||||
#X connect 23 0 20 0;
|
||||
#X connect 23 0 28 0;
|
||||
#X connect 24 0 16 0;
|
||||
#X connect 25 0 22 0;
|
||||
#X connect 27 0 26 0;
|
||||
#X connect 28 0 27 0;
|
||||
#X connect 28 0 25 0;
|
@ -0,0 +1,116 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import numpy as np
|
||||
import cv2, math
|
||||
# import video
|
||||
from picamera.array import PiRGBArray
|
||||
from picamera import PiCamera
|
||||
import OSC
|
||||
# from pythonosc import osc_message_builder
|
||||
# from pythonosc import udp_client
|
||||
import time
|
||||
|
||||
|
||||
# def draw_flow(img, flow, step=4): # size grid
|
||||
# h, w = img.shape[:2]
|
||||
# y, x = np.mgrid[step/2:h:step, step/2:w:step].reshape(2,-1)
|
||||
# fx, fy = flow[y,x].T
|
||||
# lines = np.vstack([x, y, x+fx, y+fy]).T.reshape(-1, 2, 2)
|
||||
# lines = np.int32(lines + 0.5)
|
||||
# vis = cv2.cvtColor(img, cv2.COLOR_GRAY2BGR)
|
||||
# cv2.polylines(vis, lines, 0, (0, 0, 255)) # BGR
|
||||
# for (x1, y1), (x2, y2) in lines:
|
||||
# cv2.circle(vis, (x1, y1), 1, (0, 255, 0), -1)
|
||||
# return vis
|
||||
|
||||
|
||||
def send_flow0(img, flow, step=4): # size grid
|
||||
h, w = img.shape[:2]
|
||||
y, x = np.mgrid[step/2:h:step, step/2:w:step].reshape(2,-1)
|
||||
fx, fy = flow[y,x].T
|
||||
#print "fx, fy", fx, fy
|
||||
lines = np.vstack([x, y, x+fx, y+fy]).T.reshape(-1, 2, 2)
|
||||
lines = np.int32(lines + 0.5)
|
||||
vis = cv2.cvtColor(img, cv2.COLOR_GRAY2BGR)
|
||||
|
||||
|
||||
flines = []
|
||||
for (x1, y1), (x2, y2) in lines:
|
||||
# print ("y1", y1)
|
||||
if (x1 == 38 or x1 == 46 or x1 == 54 or x1 == 62 or x1 == 70 or x1 == 78 or x1 == 86 or x1 == 94 or x1 == 102 or x1 == 110 or x1 == 118) and y1 in range(38, 90, 8):
|
||||
flines.append(((x1,y1),(x2,y2)))
|
||||
normx = x1 / 8 - 4
|
||||
normy = 1 - ((y1 / 8 - 4) / 3.0)
|
||||
dx = x2-x1
|
||||
dy = y2 - y1
|
||||
m = int(math.sqrt( (dx*dx) + (dy*dy) ))
|
||||
if m>2:
|
||||
print ("dot", (normx, normy))
|
||||
msg = OSC.OSCMessage()
|
||||
msg.setAddress("/dot")
|
||||
#msg.append(dx)
|
||||
#msg.append(dy)
|
||||
#msg.append(m)
|
||||
msg.append(normx)
|
||||
msg.append(normy)
|
||||
client.send(msg)
|
||||
# client.send_message("/franc", m)
|
||||
|
||||
|
||||
flines = np.int32(flines)
|
||||
cv2.polylines(vis, flines, 0, (0, 40, 255)) # BGR
|
||||
for (x1, y1), (x2, y2) in flines:
|
||||
cv2.circle(vis, (x1, y1), 1, (0, 255, 0), -1)
|
||||
return vis
|
||||
|
||||
flines = np.int32(flines)
|
||||
cv2.polylines(vis, flines, 0, (0, 40, 255)) # BGR
|
||||
for (x1, y1), (x2, y2) in flines:
|
||||
cv2.circle(vis, (x1, y1), 1, (0, 255, 0), -1)
|
||||
return vis
|
||||
|
||||
# cv2.rectangle(img, pt1, pt2, color[, thickness[, lineType[, shift]]])
|
||||
|
||||
if __name__ == '__main__':
|
||||
import sys
|
||||
print help_message
|
||||
try: fn = sys.argv[1]
|
||||
except: fn = 0
|
||||
|
||||
|
||||
#data="hello"
|
||||
# client = udp_client.SimpleUDPClient("127.0.0.1", 9001)
|
||||
|
||||
# connect camera
|
||||
# cam = video.create_capture("0:size=160x120") #canvas size in pixels
|
||||
cam = PiCamera()
|
||||
framesize = (160, 120)
|
||||
camera.resolution = framesize
|
||||
camera.framerate = 32
|
||||
rawCapture = PiRGBArray(camera, size=framesize)
|
||||
# allow the camera to warmup
|
||||
time.sleep(0.25)
|
||||
|
||||
# connect to pd
|
||||
# Init OSC
|
||||
client = OSC.OSCClient()
|
||||
client.connect(('127.0.0.1', 9001)) # first argument is the IP of the host, second argument is the port to use
|
||||
|
||||
prevgray = None
|
||||
for frame in camera.capture_continuous(rawCapture, format="bgr", use_video_port=True):
|
||||
# while True:
|
||||
# print "GRAB FRAME"
|
||||
img = frame.array
|
||||
# ret, img = cam.read()
|
||||
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
|
||||
flow = cv2.calcOpticalFlowFarneback(prevgray, gray, 0.5, 3, 15, 3, 5, 1.2, 0)
|
||||
prevgray = gray
|
||||
# clear the stream in preparation for the next frame
|
||||
rawCapture.truncate(0)
|
||||
|
||||
# cv2.imshow('flow', send_flow0(gray, flow))
|
||||
|
||||
#ch = 0xFF & cv2.waitKey(5)
|
||||
#if ch == 27:
|
||||
# break
|
||||
# cv2.destroyAllWindows()
|
@ -0,0 +1 @@
|
||||
GREAT JOB!
|
@ -0,0 +1,194 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
'''
|
||||
Video capture sample.
|
||||
|
||||
Sample shows how VideoCapture class can be used to acquire video
|
||||
frames from a camera of a movie file. Also the sample provides
|
||||
an example of procedural video generation by an object, mimicking
|
||||
the VideoCapture interface (see Chess class).
|
||||
|
||||
'create_capture' is a convinience function for capture creation,
|
||||
falling back to procedural video in case of error.
|
||||
|
||||
Usage:
|
||||
video.py [--shotdir <shot path>] [source0] [source1] ...'
|
||||
|
||||
sourceN is an
|
||||
- integer number for camera capture
|
||||
- name of video file
|
||||
- synth:<params> for procedural video
|
||||
|
||||
Synth examples:
|
||||
synth:bg=../cpp/lena.jpg:noise=0.1
|
||||
synth:class=chess:bg=../cpp/lena.jpg:noise=0.1:size=640x480
|
||||
|
||||
Keys:
|
||||
ESC - exit
|
||||
SPACE - save current frame to <shot path> directory
|
||||
|
||||
'''
|
||||
|
||||
import numpy as np
|
||||
import cv2
|
||||
from time import clock
|
||||
from numpy import pi, sin, cos
|
||||
import common
|
||||
|
||||
class VideoSynthBase(object):
|
||||
def __init__(self, size=None, noise=0.0, bg = None, **params):
|
||||
self.bg = None
|
||||
self.frame_size = (640, 480)
|
||||
if bg is not None:
|
||||
self.bg = cv2.imread(bg, 1)
|
||||
h, w = self.bg.shape[:2]
|
||||
self.frame_size = (w, h)
|
||||
|
||||
if size is not None:
|
||||
w, h = map(int, size.split('x'))
|
||||
self.frame_size = (w, h)
|
||||
self.bg = cv2.resize(self.bg, self.frame_size)
|
||||
|
||||
self.noise = float(noise)
|
||||
|
||||
def render(self, dst):
|
||||
pass
|
||||
|
||||
def read(self, dst=None):
|
||||
w, h = self.frame_size
|
||||
|
||||
if self.bg is None:
|
||||
buf = np.zeros((h, w, 3), np.uint8)
|
||||
else:
|
||||
buf = self.bg.copy()
|
||||
|
||||
self.render(buf)
|
||||
|
||||
if self.noise > 0.0:
|
||||
noise = np.zeros((h, w, 3), np.int8)
|
||||
cv2.randn(noise, np.zeros(3), np.ones(3)*255*self.noise)
|
||||
buf = cv2.add(buf, noise, dtype=cv2.CV_8UC3)
|
||||
return True, buf
|
||||
|
||||
def isOpened(self):
|
||||
return True
|
||||
|
||||
class Chess(VideoSynthBase):
|
||||
def __init__(self, **kw):
|
||||
super(Chess, self).__init__(**kw)
|
||||
|
||||
w, h = self.frame_size
|
||||
|
||||
self.grid_size = sx, sy = 10, 7
|
||||
white_quads = []
|
||||
black_quads = []
|
||||
for i, j in np.ndindex(sy, sx):
|
||||
q = [[j, i, 0], [j+1, i, 0], [j+1, i+1, 0], [j, i+1, 0]]
|
||||
[white_quads, black_quads][(i + j) % 2].append(q)
|
||||
self.white_quads = np.float32(white_quads)
|
||||
self.black_quads = np.float32(black_quads)
|
||||
|
||||
fx = 0.9
|
||||
self.K = np.float64([[fx*w, 0, 0.5*(w-1)],
|
||||
[0, fx*w, 0.5*(h-1)],
|
||||
[0.0,0.0, 1.0]])
|
||||
|
||||
self.dist_coef = np.float64([-0.2, 0.1, 0, 0])
|
||||
self.t = 0
|
||||
|
||||
def draw_quads(self, img, quads, color = (0, 255, 0)):
|
||||
img_quads = cv2.projectPoints(quads.reshape(-1, 3), self.rvec, self.tvec, self.K, self.dist_coef) [0]
|
||||
img_quads.shape = quads.shape[:2] + (2,)
|
||||
for q in img_quads:
|
||||
cv2.fillConvexPoly(img, np.int32(q*4), color, cv2.CV_AA, shift=2)
|
||||
|
||||
def render(self, dst):
|
||||
t = self.t
|
||||
self.t += 1.0/30.0
|
||||
|
||||
sx, sy = self.grid_size
|
||||
center = np.array([0.5*sx, 0.5*sy, 0.0])
|
||||
phi = pi/3 + sin(t*3)*pi/8
|
||||
c, s = cos(phi), sin(phi)
|
||||
ofs = np.array([sin(1.2*t), cos(1.8*t), 0]) * sx * 0.2
|
||||
eye_pos = center + np.array([cos(t)*c, sin(t)*c, s]) * 15.0 + ofs
|
||||
target_pos = center + ofs
|
||||
|
||||
R, self.tvec = common.lookat(eye_pos, target_pos)
|
||||
self.rvec = common.mtx2rvec(R)
|
||||
|
||||
self.draw_quads(dst, self.white_quads, (245, 245, 245))
|
||||
self.draw_quads(dst, self.black_quads, (10, 10, 10))
|
||||
|
||||
|
||||
classes = dict(chess=Chess)
|
||||
|
||||
presets = dict(
|
||||
empty = 'synth:',
|
||||
lena = 'synth:bg=../cpp/lena.jpg:noise=0.1',
|
||||
chess = 'synth:class=chess:bg=../cpp/lena.jpg:noise=0.1:size=640x480'
|
||||
)
|
||||
|
||||
|
||||
def create_capture(source = 0, fallback = presets['chess']):
|
||||
'''source: <int> or '<int>|<filename>|synth [:<param_name>=<value> [:...]]'
|
||||
'''
|
||||
source = str(source).strip()
|
||||
chunks = source.split(':')
|
||||
# hanlde drive letter ('c:', ...)
|
||||
if len(chunks) > 1 and len(chunks[0]) == 1 and chunks[0].isalpha():
|
||||
chunks[1] = chunks[0] + ':' + chunks[1]
|
||||
del chunks[0]
|
||||
|
||||
source = chunks[0]
|
||||
try: source = int(source)
|
||||
except ValueError: pass
|
||||
params = dict( s.split('=') for s in chunks[1:] )
|
||||
|
||||
cap = None
|
||||
if source == 'synth':
|
||||
Class = classes.get(params.get('class', None), VideoSynthBase)
|
||||
try: cap = Class(**params)
|
||||
except: pass
|
||||
else:
|
||||
cap = cv2.VideoCapture(source)
|
||||
if 'size' in params:
|
||||
w, h = map(int, params['size'].split('x'))
|
||||
cap.set(cv2.cv.CV_CAP_PROP_FRAME_WIDTH, w)
|
||||
cap.set(cv2.cv.CV_CAP_PROP_FRAME_HEIGHT, h)
|
||||
if cap is None or not cap.isOpened():
|
||||
print 'Warning: unable to open video source: ', source
|
||||
if fallback is not None:
|
||||
return create_capture(fallback, None)
|
||||
return cap
|
||||
|
||||
if __name__ == '__main__':
|
||||
import sys
|
||||
import getopt
|
||||
|
||||
print __doc__
|
||||
|
||||
args, sources = getopt.getopt(sys.argv[1:], '', 'shotdir=')
|
||||
args = dict(args)
|
||||
shotdir = args.get('--shotdir', '.')
|
||||
if len(sources) == 0:
|
||||
sources = [ 0 ]
|
||||
|
||||
caps = map(create_capture, sources)
|
||||
shot_idx = 0
|
||||
while True:
|
||||
imgs = []
|
||||
for i, cap in enumerate(caps):
|
||||
ret, img = cap.read()
|
||||
imgs.append(img)
|
||||
cv2.imshow('capture %d' % i, img)
|
||||
ch = 0xFF & cv2.waitKey(1)
|
||||
if ch == 27:
|
||||
break
|
||||
if ch == ord(' '):
|
||||
for i, img in enumerate(imgs):
|
||||
fn = '%s/shot_%d_%03d.bmp' % (shotdir, i, shot_idx)
|
||||
cv2.imwrite(fn, img)
|
||||
print fn, 'saved'
|
||||
shot_idx += 1
|
||||
cv2.destroyAllWindows()
|
@ -0,0 +1,5 @@
|
||||
clips/
|
||||
*.DS_Store
|
||||
.DS_Store
|
||||
*.pyc
|
||||
|
@ -0,0 +1 @@
|
||||
FLOPPYLEFT - 2017
|
@ -0,0 +1,7 @@
|
||||
Author: Slavoj Žižek
|
||||
Date: 1989
|
||||
Title: The Sublime Object of Floppy
|
||||
|
||||
Description:
|
||||
|
||||
And so on, and so on, and so on.
|
@ -0,0 +1,62 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import cgi, jinja2, os, json, re
|
||||
import cgitb; cgitb.enable()
|
||||
from jinja2 import Template
|
||||
|
||||
# Directory => ITEMS list (all files with a timestamp name, grouped)
|
||||
ff = os.listdir("clips")
|
||||
tpat = re.compile(r"^(\d\d\d\d)-(\d\d)-(\d\d)-(\d\d)-(\d\d)-(\d\d)")
|
||||
items = {}
|
||||
for f in ff:
|
||||
base, ext = os.path.splitext(f)
|
||||
ext = ext[1:]
|
||||
m = tpat.match(f)
|
||||
if m:
|
||||
t = m.group(0)
|
||||
if t not in items:
|
||||
items[t] = {}
|
||||
items[t][ext] = f
|
||||
|
||||
items = [items[key] for key in sorted(items, reverse=True)]
|
||||
for i in items[1:]:
|
||||
for f in i.items():
|
||||
print "deleting ", f
|
||||
|
||||
# dump the data (debugging)
|
||||
# print "Content-type: text/plain"
|
||||
# print ""
|
||||
# print json.dumps(items, indent=2)
|
||||
|
||||
# Output template with items
|
||||
print "Content-type: text/html"
|
||||
print ""
|
||||
print Template(u"""<html>
|
||||
<head>
|
||||
<title>ADOPT A WALK</title>
|
||||
<style type="text/css">
|
||||
div.movie {
|
||||
border: 20px solid black;
|
||||
display: inline-block;
|
||||
}
|
||||
div.movie img {
|
||||
width: 400px;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<p>head<p>
|
||||
<img src="../images/header.png" width="100%"/>
|
||||
</header>
|
||||
|
||||
{% for i in items %}
|
||||
<div class="movie"><a href="../clips/{{i.mp4}}"><img src="../clips/{{i.jpg}}" /></a> </div>
|
||||
{% endfor %}
|
||||
|
||||
<div>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>""").render(items=items).encode("utf-8")
|
After Width: | Height: | Size: 499 KiB |
After Width: | Height: | Size: 99 KiB |
@ -0,0 +1,11 @@
|
||||
Gait analysis number one.
|
||||
Please state your name:
|
||||
Position yourself 2 to 3 meters away from the Tetra Gamma Circulaire.
|
||||
Walk towards the Tetra Gamma Circulaire in a straight line .
|
||||
Position yourself one meter away to the left of the Tetra Gamma Circulaire.
|
||||
Walk from left to right in front of the Tetra Gamma Circulaire.
|
||||
Turn your back to the Tetra Gamma Circulaire.
|
||||
Walk away from the Tetra Gamma Circulaire.
|
||||
Position yourself 2 to 3 meters away from the Tetra Gamma Circulaire.
|
||||
Walk towards the Tetra Gamma Circulaire on a zig zag line.
|
||||
|
@ -0,0 +1,12 @@
|
||||
#N canvas 296 315 450 300 10;
|
||||
#X obj 37 104 osc~ 440;
|
||||
#X obj 37 146 dac~;
|
||||
#X obj 161 74 loadbang;
|
||||
#X msg 161 111 \; pd dsp 1;
|
||||
#X obj 37 36 netreceive 3000;
|
||||
#X obj 46 62 print;
|
||||
#X connect 0 0 1 0;
|
||||
#X connect 0 0 1 1;
|
||||
#X connect 2 0 3 0;
|
||||
#X connect 4 0 5 0;
|
||||
#X connect 4 0 0 0;
|
@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import os, random, time
|
||||
|
||||
while True:
|
||||
freq = str(random.randint(0,10)*110)
|
||||
print(freq)
|
||||
os.system('echo "'+freq+';" | pdsend 3000')
|
||||
time.sleep(0.25)
|
||||
|
||||
|
||||
|
@ -0,0 +1 @@
|
||||
GREAT JOB!
|
@ -0,0 +1,17 @@
|
||||
#! /usr/bin/env python
|
||||
import subprocess
|
||||
from time import sleep
|
||||
|
||||
# requires: espeak to be installed
|
||||
|
||||
waittimes = [1,2,1,4,1,4,1,4,1,4]
|
||||
|
||||
f=open("instructions.txt","r")
|
||||
txt=f.readlines()
|
||||
|
||||
for i, line in enumerate(txt):
|
||||
waittime = waittimes[i]
|
||||
print i, waittime #, line,
|
||||
subprocess.call(["espeak", line, "-v", "en"]) # character speaks: his/her line
|
||||
sleep(waittime) # make pause after each text line
|
||||
|
@ -0,0 +1,64 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import numpy as np
|
||||
import cv2
|
||||
import video
|
||||
|
||||
|
||||
def draw_flow(img, flow, step=16):
|
||||
h, w = img.shape[:2]
|
||||
y, x = np.mgrid[step/2:h:step, step/2:w:step].reshape(2,-1)
|
||||
fx, fy = flow[y,x].T
|
||||
lines = np.vstack([x, y, x+fx, y+fy]).T.reshape(-1, 2, 2)
|
||||
lines = np.int32(lines + 0.5)
|
||||
vis = cv2.cvtColor(img, cv2.COLOR_GRAY2BGR)
|
||||
|
||||
cv2.polylines(vis, lines, 0, (0, 0, 0))
|
||||
# for (x1, y1), (x2, y2) in lines:
|
||||
# cv2.circle(vis, (x1, y1), 1, (0, 255, 0), -1)
|
||||
return vis
|
||||
|
||||
def draw_hsv(flow):
|
||||
h, w = flow.shape[:2]
|
||||
fx, fy = flow[:,:,0], flow[:,:,1]
|
||||
ang = np.arctan2(fy, fx) + np.pi
|
||||
v = np.sqrt(fx*fx+fy*fy)
|
||||
|
||||
# hsv = np.zeros((h, w, 3), np.uint8)
|
||||
# hsv[...,0] = ang*(180/np.pi/2)
|
||||
# hsv[...,1] = 255
|
||||
# hsv[...,2] = np.minimum(v*4, 255)
|
||||
# bgr = cv2.cvtColor(hsv, cv2.COLOR_HSV2BGR)
|
||||
|
||||
f = np.zeros((h, w, 3), np.uint8)
|
||||
f[...,0] = 0 #np.minimum(v*10, 255)
|
||||
|
||||
f[...,1] = 0
|
||||
f[...,2] = 255- np.minimum(v**2, 255) #ang*(180/np.pi/2)
|
||||
bgr = cv2.cvtColor(f, cv2.COLOR_HSV2BGR)
|
||||
|
||||
return bgr
|
||||
|
||||
width, height = 640, 480
|
||||
cam = video.create_capture("0:size="+str(width)+"x"+str(height))
|
||||
|
||||
while True:
|
||||
ret, prev = cam.read()
|
||||
prevgray = cv2.cvtColor(prev, cv2.COLOR_BGR2GRAY)
|
||||
if prevgray.shape == (height, width):
|
||||
break
|
||||
|
||||
while True:
|
||||
ret, img = cam.read()
|
||||
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
|
||||
print prevgray.shape, gray.shape
|
||||
flow = cv2.calcOpticalFlowFarneback(prevgray, gray, 0.5, 3, 15, 3, 5, 1.2, 0)
|
||||
prevgray = gray
|
||||
|
||||
# cv2.imshow('flow', draw_flow(gray, flow))
|
||||
cv2.imshow('flow', draw_hsv(flow))
|
||||
|
||||
ch = 0xFF & cv2.waitKey(5)
|
||||
if ch == 27:
|
||||
break
|
||||
cv2.destroyAllWindows()
|
@ -0,0 +1,93 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
from __future__ import print_function
|
||||
import cv2, os, sys, time
|
||||
import numpy as np
|
||||
from argparse import ArgumentParser
|
||||
|
||||
|
||||
def draw(flow):
|
||||
h, w = flow.shape[:2]
|
||||
fx, fy = flow[:,:,0], flow[:,:,1]
|
||||
ang = np.arctan2(fy, fx) + np.pi
|
||||
v = np.sqrt(fx*fx+fy*fy)
|
||||
|
||||
# hsv = np.zeros((h, w, 3), np.uint8)
|
||||
# hsv[...,0] = ang*(180/np.pi/2)
|
||||
# hsv[...,1] = 255
|
||||
# hsv[...,2] = np.minimum(v*4, 255)
|
||||
# bgr = cv2.cvtColor(hsv, cv2.COLOR_HSV2BGR)
|
||||
|
||||
f = np.zeros((h, w, 3), np.uint8)
|
||||
f[...,0] = 0 #np.minimum(v*10, 255)
|
||||
|
||||
f[...,1] = 0
|
||||
f[...,2] = 255- np.minimum(v**3, 255) #ang*(180/np.pi/2)
|
||||
bgr = cv2.cvtColor(f, cv2.COLOR_HSV2BGR)
|
||||
|
||||
return bgr
|
||||
|
||||
p = ArgumentParser("")
|
||||
p.add_argument("--video", type=int, default=0, help="video, default: 0")
|
||||
p.add_argument("--output", default=None, help="path to save movie, default: None (show live)")
|
||||
p.add_argument("--width", type=int, default=640, help="pre-detect resize width")
|
||||
p.add_argument("--height", type=int, default=480, help="pre-detect resize height")
|
||||
p.add_argument("--fourcc", default="XVID", help="MJPG,mp4v,XVID")
|
||||
p.add_argument("--framerate", type=float, default=25, help="output frame rate")
|
||||
p.add_argument("--show", default=False, action="store_true")
|
||||
p.add_argument("--frames", type=int, default=100)
|
||||
args = p.parse_args()
|
||||
|
||||
fourcc = None
|
||||
cam = cv2.VideoCapture(args.video)
|
||||
cam.set(cv2.cv.CV_CAP_PROP_FRAME_WIDTH, args.width)
|
||||
cam.set(cv2.cv.CV_CAP_PROP_FRAME_HEIGHT, args.height)
|
||||
|
||||
if args.output:
|
||||
try:
|
||||
fourcc = cv2.cv.CV_FOURCC(*args.fourcc)
|
||||
except AttributeError:
|
||||
fourcc = cv2.VideoWriter_fourcc(*args.fourcc)
|
||||
out = cv2.VideoWriter()
|
||||
out.open(args.output, fourcc, args.framerate, (args.width, args.height))
|
||||
else:
|
||||
out = None
|
||||
|
||||
while True:
|
||||
ret, prev = cam.read()
|
||||
prevgray = cv2.cvtColor(prev, cv2.COLOR_BGR2GRAY)
|
||||
if prevgray.shape == (args.height, args.width):
|
||||
break
|
||||
|
||||
count = 0
|
||||
try:
|
||||
while True:
|
||||
ret, frame = cam.read()
|
||||
|
||||
gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
|
||||
flow = cv2.calcOpticalFlowFarneback(prevgray, gray, 0.5, 3, 15, 3, 5, 1.2, 0)
|
||||
prevgray = gray
|
||||
frame = draw(flow)
|
||||
|
||||
if out != None:
|
||||
out.write(frame)
|
||||
count += 1
|
||||
if args.show:
|
||||
cv2.imshow('display', frame)
|
||||
if cv2.waitKey(5) & 0xFF == ord('q'):
|
||||
break
|
||||
if args.frames != None:
|
||||
if (count >= args.frames):
|
||||
break
|
||||
|
||||
except KeyboardInterrupt:
|
||||
pass
|
||||
|
||||
print ("\nCleaning up... Wrote", count, "frames")
|
||||
if out:
|
||||
out.release()
|
||||
if args.show:
|
||||
cv2.destroyAllWindows()
|
||||
|
||||
|
||||
|
@ -0,0 +1,70 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
from __future__ import print_function
|
||||
import cv2, os, sys, time
|
||||
from argparse import ArgumentParser
|
||||
|
||||
|
||||
p = ArgumentParser("")
|
||||
p.add_argument("--video", type=int, default=0, help="video, default: 0")
|
||||
p.add_argument("--output", default=None, help="path to save movie, default: None (show live)")
|
||||
p.add_argument("--width", type=int, default=640, help="pre-detect resize width")
|
||||
p.add_argument("--height", type=int, default=480, help="pre-detect resize height")
|
||||
p.add_argument("--fourcc", default="XVID", help="MJPG,mp4v,XVID")
|
||||
p.add_argument("--framerate", type=float, default=25, help="output frame rate")
|
||||
p.add_argument("--show", default=False, action="store_true")
|
||||
p.add_argument("--time", type=float, default=None)
|
||||
args = p.parse_args()
|
||||
|
||||
fourcc = None
|
||||
cam = cv2.VideoCapture(args.video)
|
||||
cam.set(cv2.cv.CV_CAP_PROP_FRAME_WIDTH, args.width)
|
||||
cam.set(cv2.cv.CV_CAP_PROP_FRAME_HEIGHT, args.height)
|
||||
|
||||
if args.output:
|
||||
try:
|
||||
fourcc = cv2.cv.CV_FOURCC(*args.fourcc)
|
||||
except AttributeError:
|
||||
fourcc = cv2.VideoWriter_fourcc(*args.fourcc)
|
||||
out = cv2.VideoWriter()
|
||||
out.open(args.output, fourcc, args.framerate, (args.width, args.height))
|
||||
else:
|
||||
out = None
|
||||
|
||||
count=0
|
||||
try:
|
||||
if args.time != None:
|
||||
start = time.time()
|
||||
while True:
|
||||
ret, frame = cam.read()
|
||||
if out != None:
|
||||
out.write(frame)
|
||||
count += 1
|
||||
if args.show:
|
||||
cv2.imshow('display', frame)
|
||||
if cv2.waitKey(5) & 0xFF == ord('q'):
|
||||
break
|
||||
if args.time != None:
|
||||
elapsed = time.time() - start
|
||||
if (elapsed >= args.time):
|
||||
break
|
||||
|
||||
except KeyboardInterrupt:
|
||||
pass
|
||||
|
||||
print ("\nCleaning up... Wrote", count, "frames")
|
||||
if out:
|
||||
out.release()
|
||||
if args.show:
|
||||
cv2.destroyAllWindows()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -0,0 +1 @@
|
||||
python -m CGIHTTPServer
|
@ -0,0 +1,95 @@
|
||||
|
||||
espeak "Gait analysis number one." -v en
|
||||
sleep 1
|
||||
|
||||
espeak "Please state your name:" -v en
|
||||
sleep 1
|
||||
|
||||
espeak "Position yourself 2 to 3 meters away from the Tetra Gamma Circulaire." -v en
|
||||
sleep 2
|
||||
|
||||
espeak "Walk towards the Tetra Gamma Circulaire in a straight line ." -v en
|
||||
sleep 0.2
|
||||
|
||||
play sweep_up.wav
|
||||
|
||||
basename=clips/$(date +%Y-%m-%d-%H-%M-%S)
|
||||
echo recording $basename.avi...
|
||||
scripts/black2.py --output $basename.avi --frames 50 --framerate 4 --width 320 --height 240
|
||||
# convert to mp4
|
||||
ffmpeg -i $basename.avi -y $basename.mp4
|
||||
# make a thumnail image
|
||||
ffmpeg -i $basename.avi -vframes 1 -ss 0.5 -y $basename.jpg
|
||||
# rm $basename.avi
|
||||
|
||||
play sweep_up.wav
|
||||
|
||||
espeak "Position yourself one meter away to the left of the Tetra Gamma Circulaire." -v en
|
||||
sleep 1
|
||||
|
||||
espeak "Walk from left to right in front of the Tetra Gamma Circulaire.
|
||||
" -v en
|
||||
sleep 0.2
|
||||
|
||||
play sweep_up.wav
|
||||
|
||||
basename=clips/$(date +%Y-%m-%d-%H-%M-%S)
|
||||
echo recording $basename.avi...
|
||||
scripts/black2.py --output $basename.avi --frames 50 --framerate 4 --width 320 --height 240
|
||||
# convert to mp4
|
||||
ffmpeg -i $basename.avi -y $basename.mp4
|
||||
# make a thumnail image
|
||||
ffmpeg -i $basename.avi -vframes 1 -ss 0.5 -y $basename.jpg
|
||||
# rm $basename.avi
|
||||
|
||||
play sweep_up.wav
|
||||
|
||||
espeak "Turn your back to the Tetra Gamma Circulaire." -v en
|
||||
sleep 1
|
||||
|
||||
espeak "Walk away from the Tetra Gamma Circulaire.
|
||||
" -v en
|
||||
sleep 0.2
|
||||
|
||||
play sweep_up.wav
|
||||
|
||||
basename=clips/$(date +%Y-%m-%d-%H-%M-%S)
|
||||
echo recording $basename.avi...
|
||||
scripts/black2.py --output $basename.avi --frames 50 --framerate 4 --width 320 --height 240
|
||||
# convert to mp4
|
||||
ffmpeg -i $basename.avi -y $basename.mp4
|
||||
# make a thumnail image
|
||||
ffmpeg -i $basename.avi -vframes 1 -ss 0.5 -y $basename.jpg
|
||||
# rm $basename.avi
|
||||
|
||||
play sweep_up.wav
|
||||
espeak "Position yourself 2 to 3 meters away from the Tetra Gamma Circulaire." -v en
|
||||
sleep 1
|
||||
|
||||
espeak "Walk towards the Tetra Gamma Circulaire on a zig zag line.
|
||||
" -v en
|
||||
sleep 0.2
|
||||
|
||||
play sweep_up.wav
|
||||
|
||||
basename=clips/$(date +%Y-%m-%d-%H-%M-%S)
|
||||
echo recording $basename.avi...
|
||||
scripts/black2.py --output $basename.avi --frames 50 --framerate 4 --width 320 --height 240
|
||||
# convert to mp4
|
||||
ffmpeg -i $basename.avi -y $basename.mp4
|
||||
# make a thumnail image
|
||||
ffmpeg -i $basename.avi -vframes 1 -ss 0.5 -y $basename.jpg
|
||||
# rm $basename.avi
|
||||
|
||||
play sweep_up.wav
|
||||
|
||||
# subprocess.call(["espeak", "Please state your name:", "-v", "en"])
|
||||
# sleep(2)
|
||||
# Position yourself 2 to 3 meters away from the Tetra Gamma Circulaire.
|
||||
# Walk towards the Tetra Gamma Circulaire in a straight line .
|
||||
# Position yourself one meter away to the left of the Tetra Gamma Circulaire.
|
||||
# Walk from left to right in front of the Tetra Gamma Circulaire.
|
||||
# Turn your back to the Tetra Gamma Circulaire.
|
||||
# Walk away from the Tetra Gamma Circulaire.
|
||||
# Position yourself 2 to 3 meters away from the Tetra Gamma Circulaire.
|
||||
# Wal
|
@ -0,0 +1 @@
|
||||
FLOPPYLEFT - 2017
|
@ -0,0 +1,7 @@
|
||||
Author: Slavoj Žižek
|
||||
Date: 1989
|
||||
Title: The Sublime Object of Floppy
|
||||
|
||||
Description:
|
||||
|
||||
And so on, and so on, and so on.
|
@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import cgi, os
|
||||
import cgitb; cgitb.enable()
|
||||
import subprocess
|
||||
|
||||
f = cgi.FieldStorage()
|
||||
p = f.getvalue("p", "Bump.mp3")
|
||||
p = os.path.join("voice", p)
|
||||
out = subprocess.check_output(["mplayer", p], stderr=subprocess.STDOUT)
|
||||
|
||||
# print "Location: /pushingscore-Karina.html"
|
||||
# print
|
||||
|
||||
print "Content-type:text/html; charset=utf-8"
|
||||
print
|
||||
print """<html>
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;url=/pushingscore-Karina.html" />
|
||||
</head>
|
||||
<body>
|
||||
</body>
|
||||
</html>"""
|
After Width: | Height: | Size: 5.2 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 6.9 KiB |
@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import os, random, time
|
||||
|
||||
while True:
|
||||
freq = str(random.randint(0,10)*110)
|
||||
print(freq)
|
||||
os.system('echo "'+freq+';" | pdsend 3000')
|
||||
time.sleep(0.25)
|
||||
|
||||
|
||||
|
@ -0,0 +1 @@
|
||||
GREAT JOB!
|
@ -0,0 +1,53 @@
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<style>
|
||||
form.buttons input {
|
||||
width: 160px;
|
||||
height: 160px;
|
||||
/*hide the labels*/
|
||||
font-size: 0;
|
||||
line-height: 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<form action="cgi-bin/play.cgi" class="buttons">
|
||||
<input type="submit" name="p" value="BasicTurn.mp3" style="background:url(images/Choreology-BasicTurn.png) no-repeat;" />
|
||||
<input type="submit" name="p" value="Follow.mp3" />
|
||||
<input type="submit" name="p" value="AmericanSpin.mp3" />
|
||||
<input type="submit" name="p" value="Bump.mp3" />
|
||||
<input type="submit" name="p" value="StopAndGo.mp3" />
|
||||
<input type="submit" name="p" value="Windmill.mp3" />
|
||||
<input type="submit" name="p" value="SpanishArms.mp3" />
|
||||
<input type="submit" name="p" value="Hucklebuck.mp3" />
|
||||
<input type="submit" name="p" value="TheWhip.mp3" />
|
||||
<input type="submit" name="p" value="Whip.mp3" />
|
||||
<input type="submit" name="p" value="ChickenWalks.mp3" />
|
||||
<div class="tempo">
|
||||
<input id="slider3" type="range" min ="100" max="180" step ="1" style="width: 640px" />
|
||||
<!-- <input id="slider3" type="range" min ="100" max="180" step ="1" orient="vertical" style="-webkit-appearance: slider-vertical; writing-mode: bt-lr" />
|
||||
-->
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -0,0 +1 @@
|
||||
python -m CGIHTTPServer
|
@ -0,0 +1,10 @@
|
||||
import subprocess
|
||||
p = subprocess.Popen(["cvlc", "--loop", "0", "inthemood.mp3"], stdin=subprocess.PIPE)
|
||||
|
||||
from time import sleep
|
||||
|
||||
while True:
|
||||
sleep(1)
|
||||
p.stdin.write("+")
|
||||
print ("FASTER")
|
||||
|
@ -0,0 +1,4 @@
|
||||
import requests
|
||||
|
||||
r = requests.get("http://localhost:9000/requests/status.xml", params={'command': 'rate', 'val': '2.0'}, auth=('', 'foo'))
|
||||
print r
|
@ -0,0 +1,8 @@
|
||||
cvlc inthemood.mp3 \
|
||||
--loop 0 \
|
||||
--key-faster f \
|
||||
--control http \
|
||||
--http-host localhost \
|
||||
--http-port 9000 \
|
||||
--http-password "foo"
|
||||
|
@ -0,0 +1,52 @@
|
||||
import csv
|
||||
from datetime import datetime
|
||||
from time import sleep
|
||||
import OSC
|
||||
|
||||
|
||||
# open a connection to pd
|
||||
client = OSC.OSCClient()
|
||||
address = '127.0.0.1', 4000 # 57120==SC
|
||||
client.connect( address ) # set the address for all following messages
|
||||
print client
|
||||
|
||||
|
||||
msg = OSC.OSCMessage() # OSCresponder name: '/touch'
|
||||
msg.setAddress("/twitter-ikstem")
|
||||
#msg.append('hello from python')
|
||||
#client.send(msg)
|
||||
|
||||
|
||||
|
||||
then = None
|
||||
with open('final-ikstem-openinghours.csv', 'rU') as csvfile:
|
||||
file = csv.DictReader(csvfile)
|
||||
print file
|
||||
#csv.DictReader(csvfile)(["time"] + ['time'])
|
||||
i=0
|
||||
sleep_time=1
|
||||
for row in file:
|
||||
#print row
|
||||
i+=1
|
||||
t = row['time']
|
||||
t = float(t)
|
||||
now = datetime.fromtimestamp(t) #[]dictreader reads the rowheader
|
||||
print now, row
|
||||
if then:
|
||||
ti = (now-then).total_seconds()
|
||||
#print ti/100
|
||||
sleep_time = ti/15
|
||||
|
||||
if "#ikstem" in row['text'].lower() and '#gestemd' in row['text'].lower():
|
||||
msg.append( ['both', str(now)] )
|
||||
elif '#ikstem' in row['text'].lower():
|
||||
msg.append( ['#ikstem', str(now) ])
|
||||
elif '#gestemd' in row['text'].lower():
|
||||
msg.append( ['#gestemd', str(now)] )
|
||||
|
||||
# send an osc message to pd
|
||||
print msg#[ i, row['text'], str(now)]
|
||||
sleep(sleep_time)
|
||||
client.send(msg)
|
||||
msg.clearData()
|
||||
then = now
|
@ -0,0 +1 @@
|
||||
#N canvas 518 144 450 300 10;
|
@ -0,0 +1,383 @@
|
||||
Chapter 1
|
||||
section 1
|
||||
sub 1
|
||||
foot 1
|
||||
sub 2
|
||||
foot 1
|
||||
foot 2
|
||||
sub 3
|
||||
sub 4
|
||||
section 2
|
||||
sub 1
|
||||
foot 1
|
||||
sub 2
|
||||
foot 1
|
||||
foot 2
|
||||
sub 3
|
||||
foot 1
|
||||
sub 4
|
||||
sub 5
|
||||
foot 1
|
||||
foot 2
|
||||
subsub 1
|
||||
sub 6
|
||||
sub 7
|
||||
foot 1
|
||||
sub 8
|
||||
sub 9
|
||||
sub 10
|
||||
foot 1
|
||||
subsub 1
|
||||
subsub 2
|
||||
subsubsub 1
|
||||
subsubsub 2
|
||||
subsubsub 3
|
||||
sub 11
|
||||
sub 12
|
||||
sub 13
|
||||
foot 1
|
||||
foot 2
|
||||
sub 14
|
||||
foot 1
|
||||
section 3
|
||||
sub 1
|
||||
foot 1
|
||||
subsub 1
|
||||
subsub 2
|
||||
subsub 3
|
||||
subsub 4
|
||||
sub 2
|
||||
section 4
|
||||
sub 1
|
||||
foot 1
|
||||
sub 2
|
||||
foot 1
|
||||
sub 3
|
||||
section 5
|
||||
sub 1
|
||||
subsub 1
|
||||
subsub 2
|
||||
foot 1
|
||||
section 6
|
||||
sub 1
|
||||
sub 2
|
||||
sub 3
|
||||
sub 4
|
||||
sub 5
|
||||
foot 1
|
||||
sub 6
|
||||
foot 1
|
||||
sub 7
|
||||
sub 8
|
||||
sub 9
|
||||
foot 1
|
||||
|
||||
section 7
|
||||
sub 1
|
||||
sub 2
|
||||
foot 1
|
||||
sub 3
|
||||
sub 4
|
||||
section 8
|
||||
sub 1
|
||||
sub 2
|
||||
sub 3
|
||||
subsub 1
|
||||
subsub 2
|
||||
subsub 3
|
||||
foot 1
|
||||
sub 4
|
||||
sub 5
|
||||
foot 1
|
||||
sub 6
|
||||
subsub 1
|
||||
subsub 2
|
||||
subsub 3
|
||||
subsub 4
|
||||
foot 1
|
||||
subsub 5
|
||||
subsub 6
|
||||
subsub 7
|
||||
subsub 8
|
||||
subsub 9
|
||||
sub 7
|
||||
sub 8
|
||||
sub 9
|
||||
section 9
|
||||
sub 1
|
||||
foot 1
|
||||
sub 2
|
||||
subsub 1
|
||||
subsub 2
|
||||
subsub 3
|
||||
foot 1
|
||||
subsub 4
|
||||
sub 3
|
||||
sub 4
|
||||
sub 5
|
||||
sub 6
|
||||
subsub 1
|
||||
subsub 2
|
||||
sub 7
|
||||
subsub 1
|
||||
subsub 2
|
||||
foot 1
|
||||
subsubsub 1
|
||||
foot 1
|
||||
subsubsub 2
|
||||
subsubsub 3
|
||||
subsubsub 4
|
||||
subsubsub 5
|
||||
sub 8
|
||||
sub 9
|
||||
foot 1
|
||||
sub 10
|
||||
foot 1
|
||||
subsub 1
|
||||
foot 1
|
||||
subsub 2
|
||||
subsubsub 1
|
||||
subsubsubsub 1
|
||||
subsubsubsub 2
|
||||
subsubsubsub 3
|
||||
subsubsubsub 4
|
||||
subsubsubsub 5
|
||||
subsubsubsub 6
|
||||
subsubsubsub 7
|
||||
subsubsub 2
|
||||
sub 11
|
||||
sub 12
|
||||
subsub 1
|
||||
censored 2
|
||||
subsub 2
|
||||
subsub 3
|
||||
subsub 4
|
||||
sub 13
|
||||
subsub 1
|
||||
subsubsub 1
|
||||
subsubsub 2
|
||||
subsubsub 3
|
||||
subsubsub 4
|
||||
subsub 2
|
||||
subsub 3
|
||||
subsub 4
|
||||
subsub 5
|
||||
subsub 6
|
||||
sub 14
|
||||
sub 15
|
||||
sub 16
|
||||
section 10
|
||||
sub 1
|
||||
sub 2
|
||||
sub 3
|
||||
subsub 1
|
||||
subsub 2
|
||||
subsub 3
|
||||
foot 1
|
||||
sub 4
|
||||
sub 5
|
||||
section 11
|
||||
sub 1
|
||||
sub 2
|
||||
foot 1
|
||||
sub 3
|
||||
sub 4
|
||||
sub 5
|
||||
section 12
|
||||
sub 1
|
||||
|
||||
Chapter 2
|
||||
section 1
|
||||
sub 1
|
||||
section 2
|
||||
sub 1
|
||||
subsub1
|
||||
sub 2
|
||||
sub 3
|
||||
sub 4
|
||||
subsub 1
|
||||
subsub 2
|
||||
subsubsub 1
|
||||
subsubsub 2
|
||||
subsubsub 3
|
||||
subsubsub 4
|
||||
foot 1
|
||||
subsubsub 5
|
||||
foot 1
|
||||
subsubsub 6
|
||||
subsub 3
|
||||
foot 1
|
||||
subsubsub 1
|
||||
subsubsub 2
|
||||
subsubsub 3
|
||||
subsubsub 4
|
||||
subsubsub 5
|
||||
subsubsub 6
|
||||
subsubsub 7
|
||||
subsubsub 8
|
||||
subsubsub 9
|
||||
subsubsub 10
|
||||
section 3
|
||||
sub 1
|
||||
sub 2
|
||||
subsub 1
|
||||
subsub 2
|
||||
subsub 3
|
||||
subsub 4
|
||||
subsub 5
|
||||
subsub 6
|
||||
subsub 7
|
||||
Chapter 3
|
||||
section 1
|
||||
sub 1
|
||||
sub 2
|
||||
section 2
|
||||
sub 1
|
||||
sub 2
|
||||
sub 3
|
||||
sub 4
|
||||
sub 5
|
||||
sub 6
|
||||
sub 7
|
||||
subsub 1
|
||||
subsub 2
|
||||
subsub 3
|
||||
subsub 4
|
||||
section 3
|
||||
sub 1
|
||||
subsub 1
|
||||
subsub 2
|
||||
sub 2
|
||||
subsub 1
|
||||
subsub 2
|
||||
subsub 3
|
||||
subsub 4
|
||||
section 4
|
||||
sub 1
|
||||
subsub 1
|
||||
sub 2
|
||||
subsub 1
|
||||
subsub 2
|
||||
subsub 3
|
||||
subsub 4
|
||||
subsubsub 1
|
||||
subsubsubsub 1
|
||||
subsubsubsub 2
|
||||
subsubsubsub 3
|
||||
subsubsubsub 4
|
||||
subsub 5
|
||||
subsubsub 1
|
||||
subsub 6
|
||||
subsub 7
|
||||
subsub 8
|
||||
subsubsub 1
|
||||
subsub 9
|
||||
subsubsub 1
|
||||
subsub 10
|
||||
subsub 11
|
||||
subsub 12
|
||||
subsub 13
|
||||
section 5
|
||||
sub 1
|
||||
subsub 1
|
||||
subsubsub 1
|
||||
subsubsubsub 1
|
||||
subsubsubsub 2
|
||||
subsubsub 2
|
||||
subsubsub 3
|
||||
subsub 2
|
||||
subsub 3
|
||||
subsub 4
|
||||
subsub 5
|
||||
subsub 6
|
||||
subsubsub 1
|
||||
subsubsub 2
|
||||
subsubsub 3
|
||||
subsubsub 4
|
||||
subsubsub 5
|
||||
subsub 7
|
||||
section 6
|
||||
sub 1
|
||||
subsub 1
|
||||
subsubsub 1
|
||||
subsubsub 2
|
||||
subsubsub 3
|
||||
subsubsub 4
|
||||
subsub 2
|
||||
subsub 3
|
||||
sub 2
|
||||
subsub 1
|
||||
sub 3
|
||||
subsub 1
|
||||
subsubsub 1
|
||||
subsubsub 2
|
||||
subsub 2
|
||||
section 7
|
||||
sub 1
|
||||
subsub 1
|
||||
subsub 2
|
||||
subsub 3
|
||||
subsub 4
|
||||
subsub 5
|
||||
subsub 6
|
||||
subsub 7
|
||||
subsub 8
|
||||
subsub 9
|
||||
subsub 10
|
||||
subsub 11
|
||||
subsub 12
|
||||
subsub 13
|
||||
subsub 15
|
||||
subsub 16
|
||||
subsub 17
|
||||
subsub 18
|
||||
subsub 19
|
||||
subsub 20
|
||||
subsub 21
|
||||
subsub 22
|
||||
subsub 23
|
||||
subsub 24
|
||||
subsub 25
|
||||
subsub 26
|
||||
subsub 27
|
||||
subsub 28
|
||||
subsub 29
|
||||
subsub 30
|
||||
subsub 31
|
||||
subsub 32
|
||||
subsub 33
|
||||
subsub 34
|
||||
subsub 35
|
||||
subsub 36
|
||||
subsub 37
|
||||
subsub 38
|
||||
subsub 39
|
||||
subsub 40
|
||||
subsub 41
|
||||
subsub 42
|
||||
subsub 43
|
||||
subsub 44
|
||||
subsub 45
|
||||
subsub 46
|
||||
Chapter 4
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -0,0 +1,124 @@
|
||||
#N canvas 225 100 1066 716 10;
|
||||
#X obj 96 208 textfile;
|
||||
#X obj 81 290 print;
|
||||
#X msg 134 151 bang;
|
||||
#X msg 37 93 rewind;
|
||||
#X msg 103 93 read drone.txt cr;
|
||||
#X obj 52 47 t b b;
|
||||
#X obj 34 8 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
|
||||
-1;
|
||||
#X floatatom 175 361 5 0 0 0 - - -, f 5;
|
||||
#X floatatom 251 355 5 0 0 0 - - -, f 5;
|
||||
#X floatatom 308 356 5 0 0 0 - - -, f 5;
|
||||
#X floatatom 363 357 5 0 0 0 - - -, f 5;
|
||||
#X floatatom 416 357 5 0 0 0 - - -, f 5;
|
||||
#X floatatom 579 361 5 0 0 0 - - -, f 5;
|
||||
#X obj 212 291 b;
|
||||
#X msg 214 323 0;
|
||||
#X obj 269 295 b;
|
||||
#X msg 271 327 0;
|
||||
#X obj 327 294 b;
|
||||
#X msg 329 326 0;
|
||||
#X obj 380 297 b;
|
||||
#X msg 379 328 0;
|
||||
#X obj 442 296 b;
|
||||
#X msg 443 327 0;
|
||||
#X floatatom 469 358 5 0 0 0 - - -, f 5;
|
||||
#N canvas 667 215 664 530 sample 1;
|
||||
#N canvas 0 22 450 278 (subpatch) 0;
|
||||
#X array drone 668457 float 2;
|
||||
#X coords 0 1 668457 -1 200 140 1 0 0;
|
||||
#X restore 379 157 graph;
|
||||
#X obj 147 106 soundfiler;
|
||||
#X floatatom 196 212 8 0 0 0 - - -, f 8;
|
||||
#X obj 139 9 loadbang;
|
||||
#X obj 166 268 /;
|
||||
#X msg 126 217 1;
|
||||
#X obj 167 305 * 44100;
|
||||
#X floatatom 167 367 8 0 0 0 - - -, f 8;
|
||||
#X obj 328 390 send rate;
|
||||
#X obj 147 170 t b f;
|
||||
#X msg 164 71 read -resize drone.wav drone;
|
||||
#X obj 258 345 / 10;
|
||||
#X connect 1 0 9 0;
|
||||
#X connect 2 0 4 1;
|
||||
#X connect 3 0 10 0;
|
||||
#X connect 4 0 6 0;
|
||||
#X connect 5 0 4 0;
|
||||
#X connect 6 0 7 0;
|
||||
#X connect 6 0 11 0;
|
||||
#X connect 9 0 5 0;
|
||||
#X connect 9 1 2 0;
|
||||
#X connect 10 0 1 0;
|
||||
#X connect 11 0 8 0;
|
||||
#X restore 728 79 pd sample;
|
||||
#X obj 876 557 dac~;
|
||||
#X obj 871 453 catch~ watchlist;
|
||||
#X obj 236 112 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1
|
||||
1;
|
||||
#X msg 152 322 0;
|
||||
#X obj 168 410 player Chapter;
|
||||
#X obj 319 461 player sub;
|
||||
#X obj 223 439 player section;
|
||||
#X obj 419 509 player subsubsub;
|
||||
#X obj 364 486 player subsub;
|
||||
#X obj 483 536 player subsubsubsub;
|
||||
#X obj 873 503 /~ 6;
|
||||
#X obj 204 149 metro 3000;
|
||||
#X obj 201 260 route Chapter section sub subsub subsubsub subsubsubsub
|
||||
foot Appendix, f 70;
|
||||
#X obj 498 295 b;
|
||||
#X msg 499 326 0;
|
||||
#X floatatom 525 357 5 0 0 0 - - -, f 5;
|
||||
#X connect 0 0 1 0;
|
||||
#X connect 0 0 37 0;
|
||||
#X connect 2 0 0 0;
|
||||
#X connect 3 0 0 0;
|
||||
#X connect 4 0 0 0;
|
||||
#X connect 5 0 3 0;
|
||||
#X connect 5 1 4 0;
|
||||
#X connect 5 1 28 0;
|
||||
#X connect 6 0 5 0;
|
||||
#X connect 7 0 13 0;
|
||||
#X connect 7 0 29 1;
|
||||
#X connect 8 0 15 0;
|
||||
#X connect 8 0 31 1;
|
||||
#X connect 9 0 17 0;
|
||||
#X connect 9 0 30 1;
|
||||
#X connect 10 0 19 0;
|
||||
#X connect 10 0 33 1;
|
||||
#X connect 11 0 21 0;
|
||||
#X connect 11 0 32 1;
|
||||
#X connect 13 0 14 0;
|
||||
#X connect 14 0 8 0;
|
||||
#X connect 14 0 16 0;
|
||||
#X connect 15 0 16 0;
|
||||
#X connect 16 0 9 0;
|
||||
#X connect 16 0 18 0;
|
||||
#X connect 17 0 18 0;
|
||||
#X connect 18 0 10 0;
|
||||
#X connect 18 0 20 0;
|
||||
#X connect 19 0 20 0;
|
||||
#X connect 20 0 11 0;
|
||||
#X connect 20 0 22 0;
|
||||
#X connect 21 0 22 0;
|
||||
#X connect 22 0 23 0;
|
||||
#X connect 23 0 34 1;
|
||||
#X connect 23 0 38 0;
|
||||
#X connect 26 0 35 0;
|
||||
#X connect 27 0 36 0;
|
||||
#X connect 28 0 7 0;
|
||||
#X connect 28 0 14 0;
|
||||
#X connect 35 0 25 0;
|
||||
#X connect 35 0 25 1;
|
||||
#X connect 36 0 0 0;
|
||||
#X connect 37 0 7 0;
|
||||
#X connect 37 1 8 0;
|
||||
#X connect 37 2 9 0;
|
||||
#X connect 37 3 10 0;
|
||||
#X connect 37 4 11 0;
|
||||
#X connect 37 5 23 0;
|
||||
#X connect 37 6 40 0;
|
||||
#X connect 37 7 12 0;
|
||||
#X connect 38 0 39 0;
|
||||
#X connect 39 0 40 0;
|
After Width: | Height: | Size: 931 KiB |
@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 21.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 300 300" style="enable-background:new 0 0 300 300;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:none;stroke:#FFFFFF;stroke-width:0.495;stroke-miterlimit:10;}
|
||||
</style>
|
||||
<g>
|
||||
<path d="M29.3,188.4c0,0,1.2,1.6,0.6,3.6s-2.9,8.7-2.9,8.7l0.8,8.3l4.1-8.3l2.2-7.2l-2-5.1H29.3z"/>
|
||||
<path d="M270.3,188.6c0,0-1.2,1.6-0.6,3.6c0.6,1.9,2.9,8.7,2.9,8.7l-0.8,8.3l-4.1-8.3l-2.2-7.2l2-5.1H270.3z"/>
|
||||
<path d="M164.8,141.5c0,0-3.7-2.3-6-4.9c-2.3-2.6-2.6-5.5-2.6-5.5v-15.9c0-12.2-0.9-11.9-3.2-14.2c-2.3-2.3-3.3-4.4-3.3-4.4
|
||||
s-1,2.1-3.3,4.4c-2.3,2.3-3.2,2-3.2,14.2v15.9c0,0-0.4,2.9-2.6,5.5c-2.3,2.6-6,4.9-6,4.9l-1.7,17.7l2.9,1.3v0.5c0,0,1-1.7,4.3-1.7
|
||||
c3.3,0,2.5,3.1,2.5,3.7V180c0,0,0.4,13,3.4,18.6c0,0,1.9-0.9,3.5-0.9c1.6,0,3.5,0.9,3.5,0.9c3.1-5.6,3.4-18.6,3.4-18.6v-16.9
|
||||
c0-0.6-0.7-3.7,2.5-3.7c3.3,0,4.3,1.7,4.3,1.7v-0.5l3-1.3L164.8,141.5z"/>
|
||||
<line x1="149.7" y1="97.7" x2="149.7" y2="89.8"/>
|
||||
<path d="M146.9,198.7c0,0-5.5-0.5-10.1,0.6c0,0,5.2,0.7,8.3,0.7C146.4,200.1,146.9,198.7,146.9,198.7"/>
|
||||
<path d="M151.6,198.7c0,0,5.5-0.5,10.1,0.6c0,0-5.2,0.7-8.3,0.7C152.2,200.1,151.6,198.7,151.6,198.7"/>
|
||||
<path d="M145.9,200.1c0,0,0.9,5.2,3.3,7.6c0,0,3-3.6,3.4-7.5c0.4-3.9,0,0.2,0,0.2s0.2-2.1-2.8-2.1S145.9,200.1,145.9,200.1"/>
|
||||
<path d="M135.9,140.8v19.7l-104,40.2v-10.1c0,0-0.8-2.3-1.6-2.2c-0.8,0.1-2.3-0.3-2.3-0.3s-1.1-1.1,1.9-2.3
|
||||
C32.9,184.6,122.4,148,135.9,140.8"/>
|
||||
<path d="M163.7,141v19.7l104,40.1v-10.1c0,0,0.8-2.3,1.6-2.2c0.8,0.1,2.3-0.3,2.3-0.3s1.1-1.1-1.9-2.3
|
||||
C266.7,184.8,177.2,148.2,163.7,141"/>
|
||||
<path d="M153,127.9c0,1.3-1.5,2.4-3.3,2.4c-1.8,0-3.3-1.1-3.3-2.4c0-1.3,1.5-2.4,3.3-2.4C151.5,125.5,153,126.5,153,127.9"/>
|
||||
<line class="st0" x1="135.2" y1="136.5" x2="135.2" y2="172.3"/>
|
||||
<line class="st0" x1="165.2" y1="136.5" x2="165.2" y2="172.3"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.0 KiB |
@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 21.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 300 300" style="enable-background:new 0 0 300 300;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:none;stroke:#FFFFFF;stroke-width:0.5;stroke-miterlimit:10;}
|
||||
</style>
|
||||
<g>
|
||||
<polygon points="155.7,188.5 237.8,208.4 237.8,225 156,225 "/>
|
||||
<polygon points="136.7,188.5 54.6,208.4 54.6,225 136.5,225 "/>
|
||||
<path d="M156.2,95.2c1.6,0.4,36.8,10.9,36.8,10.9v10.7h-36.6l-0.6-21.2"/>
|
||||
<path d="M136.9,95.2c-1.6,0.4-36.8,10.9-36.8,10.9v10.7h36.6l0.6-21.2"/>
|
||||
<path d="M136,93c0,0,1.5-34.3,10.4-34.3c8.9,0,10.5,34.8,10.5,34.8"/>
|
||||
<rect x="141" y="230.2" width="11.1" height="3.3"/>
|
||||
<rect x="135.9" y="92.7" width="21" height="137.9"/>
|
||||
<rect x="135.9" y="92.7" class="st0" width="21" height="137.9"/>
|
||||
<rect x="144.3" y="186.4" width="5.2" height="43.8"/>
|
||||
<rect x="144.3" y="186.4" class="st0" width="5.2" height="43.8"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.1 KiB |
@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 21.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 300 300" style="enable-background:new 0 0 300 300;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:10;}
|
||||
.st1{fill:none;stroke:#FFFFFF;stroke-width:0.495;stroke-miterlimit:10;}
|
||||
.st2{fill:none;stroke:#FFFFFF;stroke-width:0.499;stroke-miterlimit:10;}
|
||||
</style>
|
||||
<g>
|
||||
<line class="st0" x1="151.1" y1="78.8" x2="151.1" y2="86.9"/>
|
||||
<line class="st0" x1="157" y1="78.8" x2="157" y2="86.9"/>
|
||||
<polygon points="160.8,146.6 282.8,148.7 282.8,159.8 160.8,164.5 "/>
|
||||
<polygon points="147.7,146.6 25.7,148.7 25.7,159.8 147.7,164.5 "/>
|
||||
<path d="M154.6,85.3c0,0-9.1,0.9-9.1,14.7s1.7,19,1.7,27.8v63.5v12.2c0,0,0.4,10.1,3.4,14.5h7.2c2.6-3.8,3.3-13.8,3.3-13.8
|
||||
l0.7-12.9v-63.5c0-8.8,1.7-13.9,1.7-27.8S154.6,85.3,154.6,85.3"/>
|
||||
<path class="st1" d="M154.6,85.3c0,0-9.1,0.9-9.1,14.7s1.7,19,1.7,27.8v63.5v12.2c0,0,0.4,10.1,3.4,14.5h7.2
|
||||
c2.6-3.8,3.3-13.8,3.3-13.8l0.7-12.9v-63.5c0-8.8,1.7-13.9,1.7-27.8S154.6,85.3,154.6,85.3"/>
|
||||
<path d="M162.3,160c1,0.4,121.3-4.2,121.3-4.2"/>
|
||||
<path class="st2" d="M162.3,160c1,0.4,121.3-4.2,121.3-4.2"/>
|
||||
<path d="M146.6,160c-1,0.4-121.3-4.2-121.3-4.2"/>
|
||||
<path class="st2" d="M146.6,160c-1,0.4-121.3-4.2-121.3-4.2"/>
|
||||
<line class="st1" x1="147.2" y1="134.1" x2="162.1" y2="134.1"/>
|
||||
<line class="st1" x1="146.8" y1="174.5" x2="161.9" y2="174.5"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.6 KiB |
@ -0,0 +1,43 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<link href="https://fonts.googleapis.com/css?family=Roboto+Mono|Source+Code+Proo|Ubuntu" rel="stylesheet">
|
||||
<link rel="stylesheet" href="style.css">
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js" type="text/javascript"></script>
|
||||
<script src="autoscroll.js" type="text/javascript"></script>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta charset="UTF-8">
|
||||
<title>Drone</title>
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<div class="title"><span>Table of contents from the <br>National Couterterrorism Center's (NCC) <br> <a href="https://theintercept.com/document/2014/07/23/march-2013-watchlisting-guidance/" target="_blank">'Watchlisting Guidance'</a></span>
|
||||
</div>
|
||||
|
||||
<p class="instructions">
|
||||
<span class="shoes">Please remove your shoes, put your head back and enjoy the sound of drones!</span>
|
||||
</p>
|
||||
|
||||
</header>
|
||||
|
||||
|
||||
<div class="transcript" id="transcroll">
|
||||
<embed id="watchlist" scrolling="yes" src="txt/watchlist.txt" height="500px"></embed>
|
||||
</div><!-- /end transcript -->
|
||||
|
||||
<div><a href="http://www.warrug.com"></a>Buy war rugs here...</div>
|
||||
|
||||
<img src="img/drone1.svg" alt="">
|
||||
<img src="img/drone2.svg" alt="">
|
||||
<img src="img/drone3.svg" alt="">
|
||||
|
||||
<script type="text/javascript">
|
||||
$('#transcroll,body,html').animate({ scrollTop: $('body').height() }, 100000);
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
|
||||
|
@ -0,0 +1,106 @@
|
||||
|
||||
body{
|
||||
background-image: url("img/carpet.jpg");
|
||||
background-attachment: fixed;
|
||||
background-position: center;
|
||||
background-size: 100%;
|
||||
font-family: 'Roboto Mono', monospace;
|
||||
}
|
||||
header{}
|
||||
.title {text-align: center;
|
||||
font-size: 45px;
|
||||
margin-top: 50px;
|
||||
color: black;
|
||||
font-weight: 700;
|
||||
margin-left: 20px;
|
||||
margin-right:20px;
|
||||
}
|
||||
.title a {color:black;
|
||||
text-decoration: underline;}
|
||||
a{text-decoration: none;
|
||||
}
|
||||
.title span{
|
||||
background-color: rgba(255,255,255,.9);
|
||||
}
|
||||
.subtitle{font-size: 50px;
|
||||
text-align: center;
|
||||
font-weight: 100;
|
||||
color: black;
|
||||
}
|
||||
.shoes{font-size: 20px;
|
||||
font-style: normal;}
|
||||
.subtitle span{
|
||||
background-color: rgba(255,255,255,.8);
|
||||
}
|
||||
.instructions span{background-color: rgba(0,0,20,.85)}
|
||||
.instructions{
|
||||
max-width: 300px;
|
||||
line-height: 22px
|
||||
font-size: 30px;
|
||||
margin-bottom: 20px;
|
||||
font-weight: 100;
|
||||
color: white;
|
||||
font-style: italic;}
|
||||
|
||||
audio{
|
||||
width: 100%;
|
||||
margin-bottom: -5px;}
|
||||
|
||||
.wrap{width: 100%;
|
||||
}
|
||||
|
||||
.transcript{
|
||||
width:40%;
|
||||
margin:auto;
|
||||
height:5500px;
|
||||
overflow: hidden;
|
||||
border: 4px solid;
|
||||
|
||||
}
|
||||
.title-transcript{
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
padding: 35px;
|
||||
color: white;
|
||||
background-color: rgba(0,0,20,.9);
|
||||
font-weight: 500;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.title-transcript a{ text-decoration: none;
|
||||
color: white; }
|
||||
|
||||
.transcript embed{
|
||||
background-color: rgba(255,255,255,.9);
|
||||
height:5500px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
embed::-webkit-scrollbar-track
|
||||
{
|
||||
/*border: 1px solid black;
|
||||
*/ background-color: #F5F5F5;
|
||||
}
|
||||
|
||||
embed::-webkit-scrollbar
|
||||
{
|
||||
width: 3px;
|
||||
background-color: #F5F5F5;
|
||||
}
|
||||
|
||||
embed::-webkit-scrollbar-thumb
|
||||
{
|
||||
background-color: #000000;
|
||||
}
|
||||
/*////////mobile///////*/
|
||||
|
||||
@media screen and (max-width:767px) {
|
||||
.title{font-size: 35px;}
|
||||
.transcript{
|
||||
|
||||
width:90%;
|
||||
height: 500px;
|
||||
}
|
||||
|
||||
|
||||
}/*end of 767*/
|
@ -0,0 +1,383 @@
|
||||
Chapter 1
|
||||
section 1
|
||||
sub 1
|
||||
foot 1
|
||||
sub 2
|
||||
foot 1
|
||||
foot 2
|
||||
sub 3
|
||||
sub 4
|
||||
section 2
|
||||
sub 1
|
||||
foot 1
|
||||
sub 2
|
||||
foot 1
|
||||
foot 2
|
||||
sub 3
|
||||
foot 1
|
||||
sub 4
|
||||
sub 5
|
||||
foot 1
|
||||
foot 2
|
||||
subsub 1
|
||||
sub 6
|
||||
sub 7
|
||||
foot 1
|
||||
sub 8
|
||||
sub 9
|
||||
sub 10
|
||||
foot 1
|
||||
subsub 1
|
||||
subsub 2
|
||||
subsubsub 1
|
||||
subsubsub 2
|
||||
subsubsub 3
|
||||
sub 11
|
||||
sub 12
|
||||
sub 13
|
||||
foot 1
|
||||
foot 2
|
||||
sub 14
|
||||
foot 1
|
||||
section 3
|
||||
sub 1
|
||||
foot 1
|
||||
subsub 1
|
||||
subsub 2
|
||||
subsub 3
|
||||
subsub 4
|
||||
sub 2
|
||||
section 4
|
||||
sub 1
|
||||
foot 1
|
||||
sub 2
|
||||
foot 1
|
||||
sub 3
|
||||
section 5
|
||||
sub 1
|
||||
subsub 1
|
||||
subsub 2
|
||||
foot 1
|
||||
section 6
|
||||
sub 1
|
||||
sub 2
|
||||
sub 3
|
||||
sub 4
|
||||
sub 5
|
||||
foot 1
|
||||
sub 6
|
||||
foot 1
|
||||
sub 7
|
||||
sub 8
|
||||
sub 9
|
||||
foot 1
|
||||
|
||||
section 7
|
||||
sub 1
|
||||
sub 2
|
||||
foot 1
|
||||
sub 3
|
||||
sub 4
|
||||
section 8
|
||||
sub 1
|
||||
sub 2
|
||||
sub 3
|
||||
subsub 1
|
||||
subsub 2
|
||||
subsub 3
|
||||
foot 1
|
||||
sub 4
|
||||
sub 5
|
||||
foot 1
|
||||
sub 6
|
||||
subsub 1
|
||||
subsub 2
|
||||
subsub 3
|
||||
subsub 4
|
||||
foot 1
|
||||
subsub 5
|
||||
subsub 6
|
||||
subsub 7
|
||||
subsub 8
|
||||
subsub 9
|
||||
sub 7
|
||||
sub 8
|
||||
sub 9
|
||||
section 9
|
||||
sub 1
|
||||
foot 1
|
||||
sub 2
|
||||
subsub 1
|
||||
subsub 2
|
||||
subsub 3
|
||||
foot 1
|
||||
subsub 4
|
||||
sub 3
|
||||
sub 4
|
||||
sub 5
|
||||
sub 6
|
||||
subsub 1
|
||||
subsub 2
|
||||
sub 7
|
||||
subsub 1
|
||||
subsub 2
|
||||
foot 1
|
||||
subsubsub 1
|
||||
foot 1
|
||||
subsubsub 2
|
||||
subsubsub 3
|
||||
subsubsub 4
|
||||
subsubsub 5
|
||||
sub 8
|
||||
sub 9
|
||||
foot 1
|
||||
sub 10
|
||||
foot 1
|
||||
subsub 1
|
||||
foot 1
|
||||
subsub 2
|
||||
subsubsub 1
|
||||
subsubsubsub 1
|
||||
subsubsubsub 2
|
||||
subsubsubsub 3
|
||||
subsubsubsub 4
|
||||
subsubsubsub 5
|
||||
subsubsubsub 6
|
||||
subsubsubsub 7
|
||||
subsubsub 2
|
||||
sub 11
|
||||
sub 12
|
||||
subsub 1
|
||||
censored 2
|
||||
subsub 2
|
||||
subsub 3
|
||||
subsub 4
|
||||
sub 13
|
||||
subsub 1
|
||||
subsubsub 1
|
||||
subsubsub 2
|
||||
subsubsub 3
|
||||
subsubsub 4
|
||||
subsub 2
|
||||
subsub 3
|
||||
subsub 4
|
||||
subsub 5
|
||||
subsub 6
|
||||
sub 14
|
||||
sub 15
|
||||
sub 16
|
||||
section 10
|
||||
sub 1
|
||||
sub 2
|
||||
sub 3
|
||||
subsub 1
|
||||
subsub 2
|
||||
subsub 3
|
||||
foot 1
|
||||
sub 4
|
||||
sub 5
|
||||
section 11
|
||||
sub 1
|
||||
sub 2
|
||||
foot 1
|
||||
sub 3
|
||||
sub 4
|
||||
sub 5
|
||||
section 12
|
||||
sub 1
|
||||
|
||||
Chapter 2
|
||||
section 1
|
||||
sub 1
|
||||
section 2
|
||||
sub 1
|
||||
subsub1
|
||||
sub 2
|
||||
sub 3
|
||||
sub 4
|
||||
subsub 1
|
||||
subsub 2
|
||||
subsubsub 1
|
||||
subsubsub 2
|
||||
subsubsub 3
|
||||
subsubsub 4
|
||||
foot 1
|
||||
subsubsub 5
|
||||
foot 1
|
||||
subsubsub 6
|
||||
subsub 3
|
||||
foot 1
|
||||
subsubsub 1
|
||||
subsubsub 2
|
||||
subsubsub 3
|
||||
subsubsub 4
|
||||
subsubsub 5
|
||||
subsubsub 6
|
||||
subsubsub 7
|
||||
subsubsub 8
|
||||
subsubsub 9
|
||||
subsubsub 10
|
||||
section 3
|
||||
sub 1
|
||||
sub 2
|
||||
subsub 1
|
||||
subsub 2
|
||||
subsub 3
|
||||
subsub 4
|
||||
subsub 5
|
||||
subsub 6
|
||||
subsub 7
|
||||
Chapter 3
|
||||
section 1
|
||||
sub 1
|
||||
sub 2
|
||||
section 2
|
||||
sub 1
|
||||
sub 2
|
||||
sub 3
|
||||
sub 4
|
||||
sub 5
|
||||
sub 6
|
||||
sub 7
|
||||
subsub 1
|
||||
subsub 2
|
||||
subsub 3
|
||||
subsub 4
|
||||
section 3
|
||||
sub 1
|
||||
subsub 1
|
||||
subsub 2
|
||||
sub 2
|
||||
subsub 1
|
||||
subsub 2
|
||||
subsub 3
|
||||
subsub 4
|
||||
section 4
|
||||
sub 1
|
||||
subsub 1
|
||||
sub 2
|
||||
subsub 1
|
||||
subsub 2
|
||||
subsub 3
|
||||
subsub 4
|
||||
subsubsub 1
|
||||
subsubsubsub 1
|
||||
subsubsubsub 2
|
||||
subsubsubsub 3
|
||||
subsubsubsub 4
|
||||
subsub 5
|
||||
subsubsub 1
|
||||
subsub 6
|
||||
subsub 7
|
||||
subsub 8
|
||||
subsubsub 1
|
||||
subsub 9
|
||||
subsubsub 1
|
||||
subsub 10
|
||||
subsub 11
|
||||
subsub 12
|
||||
subsub 13
|
||||
section 5
|
||||
sub 1
|
||||
subsub 1
|
||||
subsubsub 1
|
||||
subsubsubsub 1
|
||||
subsubsubsub 2
|
||||
subsubsub 2
|
||||
subsubsub 3
|
||||
subsub 2
|
||||
subsub 3
|
||||
subsub 4
|
||||
subsub 5
|
||||
subsub 6
|
||||
subsubsub 1
|
||||
subsubsub 2
|
||||
subsubsub 3
|
||||
subsubsub 4
|
||||
subsubsub 5
|
||||
subsub 7
|
||||
section 6
|
||||
sub 1
|
||||
subsub 1
|
||||
subsubsub 1
|
||||
subsubsub 2
|
||||
subsubsub 3
|
||||
subsubsub 4
|
||||
subsub 2
|
||||
subsub 3
|
||||
sub 2
|
||||
subsub 1
|
||||
sub 3
|
||||
subsub 1
|
||||
subsubsub 1
|
||||
subsubsub 2
|
||||
subsub 2
|
||||
section 7
|
||||
sub 1
|
||||
subsub 1
|
||||
subsub 2
|
||||
subsub 3
|
||||
subsub 4
|
||||
subsub 5
|
||||
subsub 6
|
||||
subsub 7
|
||||
subsub 8
|
||||
subsub 9
|
||||
subsub 10
|
||||
subsub 11
|
||||
subsub 12
|
||||
subsub 13
|
||||
subsub 15
|
||||
subsub 16
|
||||
subsub 17
|
||||
subsub 18
|
||||
subsub 19
|
||||
subsub 20
|
||||
subsub 21
|
||||
subsub 22
|
||||
subsub 23
|
||||
subsub 24
|
||||
subsub 25
|
||||
subsub 26
|
||||
subsub 27
|
||||
subsub 28
|
||||
subsub 29
|
||||
subsub 30
|
||||
subsub 31
|
||||
subsub 32
|
||||
subsub 33
|
||||
subsub 34
|
||||
subsub 35
|
||||
subsub 36
|
||||
subsub 37
|
||||
subsub 38
|
||||
subsub 39
|
||||
subsub 40
|
||||
subsub 41
|
||||
subsub 42
|
||||
subsub 43
|
||||
subsub 44
|
||||
subsub 45
|
||||
subsub 46
|
||||
Chapter 4
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -0,0 +1,48 @@
|
||||
#N canvas 617 41 665 546 10;
|
||||
#X obj 168 326 tabread4~ drone;
|
||||
#X floatatom 168 266 5 0 0 0 - - -, f 5;
|
||||
#X obj 244 271 *~ 668457;
|
||||
#X obj 267 232 phasor~;
|
||||
#X obj 244 196 sig~;
|
||||
#X floatatom 252 29 5 0 0 0 - - -, f 5;
|
||||
#X obj 171 438 throw~ watchlist;
|
||||
#X obj 105 11 inlet;
|
||||
#X obj 366 61 receive rate;
|
||||
#X obj 170 375 *~;
|
||||
#X msg 224 381 1;
|
||||
#X msg 223 403 0;
|
||||
#X obj 335 17 inlet;
|
||||
#X obj 394 211 != 0;
|
||||
#X obj 307 132 *;
|
||||
#X obj 356 300 line, f 6;
|
||||
#X floatatom 357 354 5 0 0 0 - - -, f 5;
|
||||
#X obj 375 238 select 1 0;
|
||||
#X obj 301 97 line;
|
||||
#X msg 352 266 1 200;
|
||||
#X msg 404 266 0 100;
|
||||
#X msg 302 76 \$1 200;
|
||||
#X obj 305 49 / 2;
|
||||
#X connect 0 0 9 0;
|
||||
#X connect 1 0 0 0;
|
||||
#X connect 2 0 0 0;
|
||||
#X connect 3 0 2 0;
|
||||
#X connect 4 0 3 0;
|
||||
#X connect 5 0 4 0;
|
||||
#X connect 7 0 4 0;
|
||||
#X connect 8 0 14 1;
|
||||
#X connect 9 0 6 0;
|
||||
#X connect 10 0 9 1;
|
||||
#X connect 11 0 9 1;
|
||||
#X connect 12 0 13 0;
|
||||
#X connect 12 0 22 0;
|
||||
#X connect 13 0 17 0;
|
||||
#X connect 14 0 4 0;
|
||||
#X connect 15 0 9 1;
|
||||
#X connect 15 0 16 0;
|
||||
#X connect 17 0 19 0;
|
||||
#X connect 17 1 20 0;
|
||||
#X connect 18 0 14 0;
|
||||
#X connect 19 0 15 0;
|
||||
#X connect 20 0 15 0;
|
||||
#X connect 21 0 18 0;
|
||||
#X connect 22 0 21 0;
|
@ -0,0 +1,49 @@
|
||||
#! /usr/bin/env python
|
||||
import re, subprocess, random
|
||||
from time import sleep
|
||||
|
||||
# requires: espeak to be installed
|
||||
|
||||
dic={
|
||||
"narrator": "en-us",
|
||||
"Pilot": "klatt",
|
||||
"Sensor": "whisper",
|
||||
"MC": "pt",
|
||||
"Jag25": "mb-us2",
|
||||
"Unknown": "f1"
|
||||
}
|
||||
|
||||
f=open("transcripts-drone-attack.txt","r")
|
||||
txt=f.readlines()
|
||||
p= re.compile(r"^(\d\d\:\d\d) \((.*?)\)\: (.*)") # regex for capturing groups: time, character, sentence
|
||||
for line in txt:
|
||||
print line
|
||||
if p.findall(line):
|
||||
time,char,sentence = (p.findall(line))[0]
|
||||
print char.upper()
|
||||
voice=dic[char]
|
||||
# play time
|
||||
subprocess.call(["espeak", time +" "+char, "-v", dic['narrator'], "-p", "20"]) # narrator speaks: time and character
|
||||
sleep(0.5) #short pause before sentence
|
||||
print sentence
|
||||
if "*expletive*" in sentence: #"*expletive*" in sentence is True:
|
||||
sentence_parts=re.split(r"(\*\w+\*)", sentence)
|
||||
print sentence_parts
|
||||
for part in sentence_parts:
|
||||
if part == '*expletive*':
|
||||
print 'EXPLETIVE', part
|
||||
subprocess.call(["aplay", 'swear.wav'])
|
||||
else:
|
||||
print 'SPEECH', part
|
||||
subprocess.call(["espeak", part, "-v", voice]) # character speaks: his
|
||||
sleep(float(random.randint(1,10))/100)
|
||||
else:
|
||||
subprocess.call(["espeak", sentence, "-v", voice]) # character speaks: his
|
||||
|
||||
#
|
||||
else: # line w/out time or character (narrator)
|
||||
print "NARRATOR"
|
||||
subprocess.call(["espeak", line, "-v", dic['narrator'], "-p", "20"])
|
||||
|
||||
sleep(1) # make pause after each text line
|
||||
|
@ -0,0 +1,100 @@
|
||||
number 1.
|
||||
date: thirteenth of January 2006.
|
||||
location: Damadola Bajaur Agency.
|
||||
dead: 16.
|
||||
injured: 0.
|
||||
local: 16.
|
||||
non-local: 0.
|
||||
remarks: 5 children, 5 women, 6 men, all civilians.
|
||||
|
||||
number 2.
|
||||
date: 30th of October 2006.
|
||||
location: Attack on a seminary at village Chinagai.
|
||||
dead: 81.
|
||||
injured: 0.
|
||||
local: 81.
|
||||
non-local: 0.
|
||||
remarks: 80 children, 1 man, all civilian.
|
||||
|
||||
number 3.
|
||||
date: 29th of January 2008.
|
||||
location: Attack on Village Khushal, Tehsil Mirali.
|
||||
dead: 12.
|
||||
injured: 2.
|
||||
local: 12.
|
||||
non-local: 0.
|
||||
remarks: Civilian.
|
||||
|
||||
number 4.
|
||||
date: 28th of February 2008.
|
||||
location: Attack on Kalosha/Azam Warsak, South.
|
||||
dead: 10.
|
||||
injured: 6.
|
||||
local: 4.
|
||||
non-local: 6.
|
||||
remarks: none.
|
||||
|
||||
number 5.
|
||||
date: 16th of March 2008.
|
||||
location: Attack on Village Doag Wana proper, South Waz. Agency.
|
||||
dead: 18.
|
||||
injured: 7.
|
||||
local: 0.
|
||||
non-local: 18.
|
||||
remarks: 0.
|
||||
|
||||
number 6.
|
||||
date: 14th May 2008
|
||||
location: Attack on a Madrassa at Damadola,Bajaur Agency
|
||||
dead: 18
|
||||
injured: 18
|
||||
local: 18
|
||||
non-local: 0
|
||||
remarks: Civilian
|
||||
|
||||
number 7.
|
||||
date: 11th of June 2008
|
||||
location: Attack on ANA at Gorraparai FC Post in Mohmand Agency. Nato Aircraft attacked the same post causing killing/injuries to LEAs and civillians.
|
||||
dead: 18.
|
||||
injured: 18.
|
||||
local: 18.
|
||||
non-local: 0.
|
||||
remarks: Civilian.
|
||||
|
||||
number 12.
|
||||
date: 31th of August 2008.
|
||||
location: Attack on village Tapai, Dawar, N WAs Agency.
|
||||
dead: 11.
|
||||
injured: 1.
|
||||
local: 0.
|
||||
non-local: 11.
|
||||
remarks: 3 female, 4 children, non local 1 wife + 1 daughter of Ihsanullha local died.
|
||||
|
||||
number 13.
|
||||
date: 30th of August 2008.
|
||||
location: Missile Attack at the house of *CLASSIFIED* at Karez Kot Gangi Kshel Tehsil Datta Khel Miranshah.
|
||||
dead: 18.
|
||||
injured: 18.
|
||||
local: 18.
|
||||
non-local: 0.
|
||||
remarks: Civilian.
|
||||
|
||||
number 62.
|
||||
date: 9th of May 2009.
|
||||
location: US Drone fired four missiles and hit the house of *CLASSIFIED* Miami Kabul Khel, DreNashtar Tehsil Shawal on the boundary of North and South Waziristan Agencies.
|
||||
dead: 5.
|
||||
injured: 0.
|
||||
local: 5.
|
||||
non-local: 0.
|
||||
remarks: none.
|
||||
|
||||
number 65
|
||||
date: 19th of June 2009
|
||||
location: Five Missiles were fires from Drone at Markaz of Gangi Khel Taliban commander.
|
||||
dead: 18
|
||||
injured:
|
||||
local: 8
|
||||
non-local: 10
|
||||
remarks: reportedly among the dead 1 non local 2 afghanis 4 arabs 3 Turkamans are included
|
||||
|
||||
|