User:Darija Medic/assignment: Difference between revisions

From XPUB & Lens-Based wiki
No edit summary
No edit summary
Line 1: Line 1:
[[category:2011 P1.01]]
[[category:prototyping]]


<source lang=c>


'''Unlistened inbox'''
char pat[] = "xxx xx x xx ";
void setup() {
  int patlen = strlen(pat);
 
  for (int r=0; r<12; r++) {
    for (int p=0; p<patlen; p++){
    if (pat[p] == 'x') {
      tone(13, 500, 10);
    }
    delay(200);
  }
  }
}


This script takes unread e-mail that piles up in your inbox, and translates it into, well, not specifically music for your ears, but some experimental sound artists have been known to do even worse. Unread e-mail can be a burden, a comfort zone, but in most cases tend to sit on the shelf, and remain unread. Unread words become meaningful when the letters stand for something, in this case-notation. The other matter concerns listening to data, and paranoia that can be provoked.
void loop() {}


 
<\source>
 
<source lang="bash">
 
curl -u username:password --silent "https://mail.google.com/mail/feed/atom" | tr -d '\n' | awk
-F '<entry>' '{for (i=2; i<=NF; i++) {print $i}}' | sed -n "s/<title>\(.*\)<\/title.*name>\(.*\)<\/name>(.*\)/p"
 
</source>
 
 
input becomes:
 
 
Alexandre A.R. Costa - [ARENA] CLARAS EM CASTELO no LINE UP ACTION FEST. Coimbra Sexta/22
 
Ruth Catlow - [NetBehaviour] Lunch [Re: Art Doesn&#39;t Make Us Better People]
 
James Morris - [NetBehaviour] tAYKmE2yRwEEDER
 
Alan Sondheim - Re: [NetBehaviour] Fwd: From today...
 
Pall Thayer - [NetBehaviour] You Can See It In The Cracks
 
Pall Thayer - [NetBehaviour] From today...
 
Igor Bogicevic - [razmenavestina] Frontend Developer/Frontend Application Engineer/System Engineer - SB Genomics
 
info - [NetBehaviour] Art: on screen
 
info - [NetBehaviour] Tales from the Forest.
 
Fung-Lin Hall - [NetBehaviour] James Brooks
 
marc garrett - [NetBehaviour] Interview with Johannes Grenzfurthner of monochrom Part 2.
 
info - [NetBehaviour] Drop Shadow Talk: JODI in Berlin, Nov 2.
 
johannes p osterhoff - [spectre] Drop Shadow Talk: JODI in Berlin, Nov 2
 
James Morris - [NetBehaviour] mmmmm
 
[nmf2010] - [spectre] Program - Week 43 on NewMediaFest&#39;2010
 
Alan Sondheim - [NetBehaviour] burbling
 
Infostud Znanje - Novi seminari i predavanja za mlade
 
 
next,through sed, the letters that correspond to notes, remain as they are, and the other letters become pause.
 
 
<source lang="bash">
 
s/[^a-z]//g
s/[h-z]/ r /g
s/a/ a /g
s/b/ b /g
s/c/ c /g
s/d/ d /g
s/e/ e /g
s/f/ f /g
s/g/ g /g
s/h/ h /g
 
 
</source>
 
<source lang="bash">
sed newmail1.txt -f mail.sed | bash mail.sh | midge -o mail.mid
 
timidity mail.mid
</source>
 
'''Unlistened outcome'''
 
[[File:Mail.mid | Unlistened outcome]]
 
[[File:Mail1.mid | Unlistened outcome1]]

Revision as of 08:46, 2 November 2010

<source lang=c>

char pat[] = "xxx xx x xx ";

void setup() {

 int patlen = strlen(pat);
 
 for (int r=0; r<12; r++) {
   for (int p=0; p<patlen; p++){
   if (pat[p] == 'x') {
     tone(13, 500, 10);
   }
   delay(200);
  }
 }

}

void loop() {}

<\source>