~ubuntu-branches/ubuntu/feisty/faust/feisty

« back to all changes in this revision

Viewing changes to examples/tester.dsp

  • Committer: Bazaar Package Importer
  • Author(s): Mario Lang
  • Date: 2006-10-09 11:05:30 UTC
  • mfrom: (1.1.1 upstream) (2.1.1 edgy)
  • Revision ID: james.westby@ubuntu.com-20061009110530-zvktdvpq5zewdxso
Tags: 0.9.8-1
* New upstream release.
* Upgrade Standards-Version to 3.7.2.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
declare name            "tester";
 
2
declare version         "1.0";
 
3
declare author          "Grame";
 
4
declare license         "BSD";
 
5
declare copyright       "� GRAME 2006";
 
6
 
1
7
//-----------------------------------------------
2
8
// Audio tester : send a sinus to a loudspeaker
3
9
//-----------------------------------------------
4
10
 
 
11
import("music.lib");
 
12
 
 
13
pink    = f : (+ ~ g) with {
 
14
        f(x)    = 0.04957526213389*x - 0.06305581334498*x' +
 
15
                  0.01483220320740*x'';
 
16
        g(x)    = 1.80116083982126*x - 0.80257737639225*x';
 
17
};
 
18
 
5
19
 
6
20
// User interface
7
21
//----------------
10
24
freq                    = hslider("1-freq", 1000, 0, 24000, 0.1);
11
25
dest                    = hslider("3-destination", 0, 0, 8, 1);
12
26
 
13
 
 
14
 
process                 = vgroup( "Audio Tester", osc(freq) <: par(i,8, *(vol*(dest==i))) );
15
 
  
 
27
testsignal              = osci(freq)*checkbox("sine wave")
 
28
                                + noise * checkbox("white noise")
 
29
                                + pink(noise) * db2linear(20)  * checkbox("pink noise");
 
30
 
 
31
process                 = vgroup( "Audio Tester", testsignal*vol <: par(i,8, *(dest==i)) );
 
32