File: accesspoint2.tao

package info (click to toggle)
taopm 1.0-7
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 6,972 kB
  • sloc: sh: 9,809; cpp: 5,161; yacc: 2,298; lex: 464; makefile: 434; ansic: 57
file content (36 lines) | stat: -rwxr-xr-x 669 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// accesspoint2.tao
//
// Shows how to create two AccessPoint objects, assign them positions on two
// strings and then use them to implement a connection between the two strings. 

Audio rate: 44100;

String string1(200 Hz, 20 secs);
String string2(200 Hz, 20 secs);

AccessPoint point1, point2;

Connector connector;

Output out(2);

Init:
    string1.lockEnds();
    string2.lockEnds();
    ...

Score 5.0 secs:
    At 0 secs for 0.1 msecs:
        string1(0.05).applyForce(1.0);
	...

    ControlRate 100:
        point1=string1(linear(0,1));
	point2=string2(linear(1,0));
	...

    point1 -- connector -- point2;
    out.ch1: point1;
    out.ch2: point2;
    ...