Re: measuring frequencies and then doing something....

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Aaron,

Here's one for ya.

I'd like to have a program which "checks" for a certain frequency every 20 minutes or so while I'm not in the room.

If this frequency happens (and my microphone picks it up, of course) something happens,
If I understand correctly what you mean (detecting a single 'pitch' (frequency)) the simple attached Pd patch should do it.

I'm thinking something web-like.
Pd has has netsend to do network or popen to start shell commands (.. look at the docs.

Lorenzo.

The function below sucks and I'm aware of that.

Just fishing for any ideas.

Thanks, amigos!

-Aaron


$curr_frequency(){
    wicked function which listens to the mic every 20 minutes
}

$frequency = '';
if ($time >= 1200000 )  {  //20 minutes
  curr_frequency (&$curr_frequency, $time);
  return $frequency;
};
        if ($frequency == '2500hz')  //maybe make this a range {
       do something neato;
  }

}
_______________________________________________ Linux-audio-user mailing list Linux-audio-user@xxxxxxxxxxxxxxxxxxxx http://lists.linuxaudio.org/listinfo/linux-audio-user
#N canvas 227 65 680 559 10;
#X floatatom 20 179 5 0 0 0 - - -;
#X obj 20 207 mtof;
#X floatatom 20 235 10 0 0 0 - - -;
#X floatatom 20 397 5 0 0 0 - - -;
#X msg 177 16 220;
#X obj 20 369 expr $f1>$f2 && $f1 < $f3;
#X obj 20 300 t f b b;
#X floatatom 120 313 5 0 0 0 - - -;
#X obj 93 342 f 218;
#X obj 167 343 f 222;
#X obj 20 147 sigmund~ notes -hop 4096;
#X floatatom 194 313 5 0 0 0 - - -;
#X obj 425 506 bng 40 250 50 0 empty empty empty 17 7 0 10 -1 -4034
-4034;
#X obj 425 124 metro 1000;
#X obj 456 181 + 1;
#X obj 425 209 mod 1200;
#X obj 425 181 f 0;
#X obj 425 236 == 1199;
#X floatatom 384 238 5 0 0 0 - - -;
#X obj 425 82 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1
1;
#X msg 502 124 0;
#X obj 425 261 sel 1;
#X obj 425 438 f;
#X obj 177 45 osc~ 0;
#X obj 425 473 sel 1;
#X floatatom 487 209 5 0 0 0 - - -;
#X msg 208 16 440;
#X obj 24 22 adc~;
#X obj 178 97 *~ 0;
#X obj 199 68 tgl 18 0 empty empty empty 17 7 0 10 -262144 -1 -1 1
1;
#X obj 42 55 tgl 18 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1
;
#X obj 21 97 *~ 0;
#X text 220 66 on/off;
#X text 64 54 on/off;
#X text 1 0 main audio input;
#X text 179 -4 test-tone;
#X text 236 16 Hz;
#X text 103 292 min-range;
#X text 183 292 max-range;
#X text 151 276 (Hz);
#X text 88 235 Detected pitch (Hz);
#X text 174 133 Detects pitch. With the;
#X text 174 148 notes param only on new;
#X text 174 163 note (see help);
#X text 532 124 reset;
#X text 448 77 Start timer;
#X text 487 235 every 1200 seconds (20 minutes);
#X text 183 368 if in frequency range will output 1;
#X text 463 473 if 1 bang;
#X text 473 516 do something;
#X text 455 287 one could also turn on the;
#X text 456 301 audio input only every 20 minutes;
#X obj 356 -1 tgl 20 0 empty empty empty 17 7 0 10 -262130 -1 -1 0
1;
#X msg 356 25 \; pd dsp \$1;
#X text 389 -1 Mains on/off (turn this on to work);
#X obj 566 506 print detected!;
#X obj 438 401 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
-1 -1;
#X text 456 400 test now;
#X connect 0 0 1 0;
#X connect 1 0 2 0;
#X connect 2 0 6 0;
#X connect 3 0 22 1;
#X connect 4 0 23 0;
#X connect 5 0 3 0;
#X connect 6 0 5 0;
#X connect 6 1 8 0;
#X connect 6 2 9 0;
#X connect 7 0 8 1;
#X connect 8 0 5 1;
#X connect 9 0 5 2;
#X connect 10 0 0 0;
#X connect 11 0 9 1;
#X connect 13 0 16 0;
#X connect 14 0 16 1;
#X connect 15 0 17 0;
#X connect 15 0 18 0;
#X connect 16 0 15 0;
#X connect 16 0 14 0;
#X connect 17 0 21 0;
#X connect 19 0 13 0;
#X connect 20 0 16 1;
#X connect 21 0 22 0;
#X connect 22 0 24 0;
#X connect 23 0 28 0;
#X connect 24 0 12 0;
#X connect 24 0 55 0;
#X connect 25 0 17 1;
#X connect 26 0 23 0;
#X connect 27 0 31 0;
#X connect 27 1 31 0;
#X connect 28 0 10 0;
#X connect 29 0 28 1;
#X connect 30 0 31 1;
#X connect 31 0 10 0;
#X connect 52 0 53 0;
#X connect 56 0 22 0;
_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@xxxxxxxxxxxxxxxxxxxx
http://lists.linuxaudio.org/listinfo/linux-audio-user

[Index of Archives]     [Linux Sound]     [ALSA Users]     [Pulse Audio]     [ALSA Devel]     [Sox Users]     [Linux Media]     [Kernel]     [Photo Sharing]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux