forked from eberdahl/SaM
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathguiro.mdl
81 lines (65 loc) · 3.35 KB
/
guiro.mdl
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# MDL file for Synth-A-Modeler
#
# (c) Edgar Berdahl, 2012
# Audio Communication Group
# Technical University of Berlin
#
# -------------------------------------------------------------------
#
# The above copyright notice including the copyright holders and this
# permission notice shall be included in all copies, substantial
# portions, or derivatives of the Software and Software portions.
#
# The end-user documentation included with the redistribution, if any,
# must include the following acknowledgment: "This software was
# developed at least in part using Synth-A-Modeler, which is a modular
# and open-source environment for designing physical models (see
# https://github.com/eberdahl/SaM)", in the same place and form as other
# third-party acknowledgments. In addition, this acknowledgment must
# appear in the software itself in the same form and location as other
# such third-party acknowledgments.
#
# Alternatively, if software is generated using Synth-A-Modeler, then
# the end-user documentation included with the generated software, if
# any, must include the following statement: "This software was generated
# using Synth-A-Modeler, which is a modular and open-source environment
# for designing physical models (see https://github.com/eberdahl/SaM)",
# in the same place and form as other third-party acknowledgments. In
# addition, this acknowledgment must appear prominently in any software
# generated by Synth-A-Modeler in the same form and location as other
# such third-party acknowledgments, and in such a manner that users
# will be aware that the software was generated by Synth-A-Modeler.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 3 as
# published by the Free Software Foundation except subject to the additional
# attribution requirements described beneath the copyright notice above.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the modified GNU General Public
# License along with this program.
port(),dev0; # pos 43,285
port(),dev1; # pos 491,93
resonators(200.0,decayTime*1.0,0.01),r0; # pos 352,288
resonators(700.0,decayTime*1.0,0.01),r1; # pos 352,192
resonators(500.0,decayTime*1.0,0.01),r2; # pos 352,128
resonators(300.0,decayTime*1.0,0.01),r3; # pos 352,64
resonators(70.0,decayTime*1.0,0.01),r0cpy; # pos 352,416
resonators(150.0,decayTime*1.0,0.01),r1cpy; # pos 352,352
pluck(k*1.0,R*1.0,maxdist*1.0,0.00),p0,dev0,r0;
pluck(k*1.0,R*1.0,maxdist*1.0,0.01),p1,dev0,r1;
pluck(k*1.0,R*1.0,maxdist*1.0,0.02),p2,dev0,r2;
pluck(k*1.0,R*1.0,maxdist*1.0,0.03),p3,dev0,r3;
pluck(k*1.0,R*1.0,maxdist*1.0,-0.01),p4,dev0,r1cpy;
pluck(k*1.0,R*1.0,maxdist*1.0,-0.02),p5,dev0,r0cpy;
faustcode: k=hslider("Pluck stiffness [N/m]",140.0,50.0,800.0,10.0);
faustcode: R=hslider("Pluck damping [N/(m/s)]",0.35,0.0,0.5,0.01);
faustcode: maxdist=hslider("Pluck width [m]",0.005,0.001,0.01,0.001);
faustcode: vol=hslider("Volume",75.0,5.0,1000.0,5.0);
faustcode: decayTime=hslider("Resonator decay time [s]",0.29,0.01,3.0,0.01);
audioout,a0,r0*vol*2.0+r2*vol*6.0+r0cpy*vol*2.0; # pos 275,480
audioout,a1,r1*vol*6.0+r3*vol*4.0+r1cpy*vol*1.4; # pos 467,320