WetterReim

Weather Forecast at your Fingertips


WetterReim provides you with the latest Information on your local weather; at your fingertips. 


You need:

- a transducer microphone, e.g AKG C411 PP, or (cheaper) a piezo-based transducer like the Schaller Oyester 723

- either a phantom powered line-in, or a normal line in

- an audio device capable to capture and play back sound

- loudspeakers

- a computer keyboard

- A Python installation.

Additionally requires simpleOSC by ixi. 

Please, get it here http://www.ixi-software.net/content/body_backyard_python.html, and install it as explained in its README.




attachments/WetterReim/Pasted Graphic.png



(

// create a Dictionary to put everything

q = ();


// set basic adjustment parameters (there are defautl values set in the loaded file below)

q.server = s;

q.sourceChannel = 0;  // the audio in channel where the transducer is located (using SoundIn)

//q.outChannel = [6, 7]; // channel where to play back the auditory augmentation (Using Out)

q.outChannel = 0; // channel where to play back the auditory augmentation (Using Out)


// load the default setup for wetterReim

"%/WetterReim-TrendSetup.scd".format(Document.current.path.dirname).load;

/*

Document.open("%/WetterReim-TrendSetup.scd".format(Document.current.dir)); // */


q.prepareServer;

q.startServer

)


q.init;



(

// a GUI, currently, you have to kill the automatic acquire process by hand...

q.win = Window.new("The Four Noble Truths").decorate;

q.counter = 0;

q.data = [

// cold, no wind

['temp', 0, 'hum', 45.0, 'wind', 0, 'press', 1000.0],

// ultracold, windy

['temp', -10, 'hum', 55.0, 'wind', 40.01, 'press', 950.0],

// warm, windy, humid

['temp', 30, 'hum', 85.0, 'wind', 20.01, 'press', 1000.0],

// summer, approx. no wind

['temp', 16, 'hum', 65.0, 'wind', 3, 'press', 10016.0]

];

// the Example Data send Button

q.button = Button(q.win, Rect(20,20,390,60))

.states_([

["Example Data"]

]);

q.button.action_({ arg butt;

q.data[q.counter].postln;

NetAddr.localAddr.sendMsg("/weather", *q.data[q.counter]);

q.counter = (q.counter + 1) % q.data.size; 

});

// the start acquition button

q.button = Button(q.win, Rect(20,20,390,60))

.states_([

["Start Acquisition"]

]);

q.button.action_({ arg butt;

q.startAcquireProcess;

});

q.win.front;

)


/* (re)start a data acquisition process

q.startAcquireProcess; // */


// alternatively, you may want to send weather information by hand:

/*

Document.open("%/ExampleWeather.scd".format(Document.current.path.dirname)); // */




q.addFilterPresets;


q.startAll


// a preset using multiFreqReso and playing it back to outChannel


// till

//Ndef(\reims).set(\ringtime, 0.3, \amp, 0.2, \highFreq, 20000, \baseFreq, 50.midicps);

//Ndef(\reimsched).set(\ringtime, 3, \amp, 0.2, \highFreq, 20000, \baseFreq, 50.midicps);


Ndef(\reims).set(\ringtime, 0.13, \amp, 0.2, \highFreq, 20000, \baseFreq, 62.midicps);

Ndef(\reimsched).set(\ringtime, 3, \amp, 0.2, \highFreq, 20000, \baseFreq, 62.midicps);



// rene

//Ndef(\reims).set(\ringtime, 0.3, \amp, 0.2, \highFreq, 20000, \baseFreq, 23.midicps);

//Ndef(\reimsched).set(\ringtime, 3, \amp, 0.2, \highFreq, 20000, \baseFreq, 23.midicps);



NdefMixer(s);

(

Ndef(\reims, {|amp = 1, vol = 2|

var in = LeakDC.ar(SoundIn.ar(q.sourceChannel));

Mix([

ReimFilter.ar(\multiFreqReso, in*amp, q.reimData),

ReimFilter.ar(\multiFreqReso, in*amp, q.historyData) * 0.5

]) * vol

}).playN(q.outChannel);


// a preset ringing every 15 minutes

Ndef(\reimsched, {|amp = 0.5, t_trig = 0|

/* ring every 15 minutes */

var in = Impulse.ar(1/(15*60) , 0, 0.1) + t_trig;

in = EnvGen.ar(Env([0, 0.1, 0.1, 0], [0.01, 0.08, 0.01]*0.5), gate: in) * BrownNoise.ar;

Mix([

ReimFilter.ar(\multiFreqReso, in*amp, q.reimData),

//ReimFilter.ar(\multiFreqReso, in*amp, q.historyData) * 0.8

ReimFilter.ar(\multiFreqReso, in*amp, q.historyData) * 0.5


])

}).playN(q.outChannel, fadeTime: 0);

)



(

// stop playback and acquisition

Ndef(\reimsched).stop;

Ndef(\reims).stop;

q.stopAll

// currently you have to kill the data acquisition by hand. sorry for this

)

ReimFilter.write