simple email notification sonification
This will sonify the actual text of the subject and the name of the sender with SuperCollider. The sonification is very basic, but can be changed to anything you’d want.
You need:
- Thunderbird with the Mailbox Alert-AddOn
- SuperCollider
- some command line tool to send osc-messages, for example oscsend (part of liblo)
And this is how I did it:
- Install the Addon and activate it for one of your folders.
- Choose to execute a command as notification. For example this sends two strings to SuperCollider (the name of the sender and the subject):
/usr/bin/oscsend localhost 57120 /mail/newmsg ss %sendername %subject
- Set up an OSCresponder in SuperCollider to sonify your message:
(
a = OSCresponder(nil, '/mail/newmsg', { |t, r, msg|
var string = (msg[1].asString) ++ (msg[2].asString); // concatenate the two strings
var pat = [];
var lenSender = msg[1].ascii.size;
var lenSubject = msg[2].ascii.size;
string.do{ |i,index|
pat = pat.add(
if(
i.isAlphaNum,
{ i.digit }, // converts numbers and chars to numbers between 0 and 35
if(i.isPunct,
-12, // punctuation gets a note an octave lower
\rest));)}; // the rest is silencePbind(
\instrument, \ping,
\note, Pseq(pat),
\octave, 4,
\legato, Pwhite(2,0.8),
// play a longer note at the end of the sender:
\dur, Pseq([Pn(0.1, lenSender - 1), 1, Pn(0.1, lenSubject)])).play;
}).add;
)
- enjoy…
Keine Kommentare
Kommentar abgeben | Kommentare als Feed | Trackback