forked from eberdahl/SaM
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtouch_several_fixed_modal_resonators_with_virtual_drumstick.mdl
78 lines (62 loc) · 3.76 KB
/
touch_several_fixed_modal_resonators_with_virtual_drumstick.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
# 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.
faustcode: f0=hslider("Resonance Frequency 0",890, 40.0, 3000.0, 4.0);
faustcode: tau=hslider("Decay Time of Resonator",1.9632, 0.01, 5.0, 0.01);
resonators(f0*1,tau*1,m*1,f0*1.8315,tau*0.97297,m*0.69187,f0*2.8315,tau*0.89189,m*0.13873,f0*3.382,tau*0.54054,m*0.28468,f0*4.3708,tau*0.45946,m*0.76812,f0*5.3596,tau*0.35135,m*0.31639,f0*7.7528,tau*0.13514,m*0.06071,f0*8.1011,tau*0.13514,m*0.21944,f0*9.236,tau*0.10811,m*0.1121,f0*10.382,tau*0.13514,m*0.13839,f0*12.2247,tau*0.081081,m*0.11011,f0*15.7865,tau*0.081081,m*0.097149),reson1; # pos 384,160
port(),dev1; # pos 387,285
port(),dev2; # pos 267,157
mass(md,0.0,0.0),mdrumstick;
link(holdingStiffness,holdingDamping,0.0),ll,dev1,mdrumstick;
touch(interactionStiffness,interactionDamping,0.0),tt,reson1,mdrumstick;
faustcode: m=hslider("Mass of Resonator", 0.0043, 0.0005, 0.03, 0.0002);
faustcode: md=hslider("Mass of Drumstick", 0.006, 0.001, 0.01, 0.0002);
faustcode: holdingStiffness=hslider("Holding Stiffness", 60.0, 10.0, 150.0, 5.0);
faustcode: holdingDamping=hslider("Holding Damping", 0.1, 0.002, 0.1, 0.002);
faustcode: interactionStiffness=hslider("Touch Interaction Stiffness", 200.0, 50.0, 2500.0, 50.0);
faustcode: interactionDamping=hslider("Touch Interaction Damping", 0.082, 0.002, 0.1, 0.002);
faustcode: outputDSP=highpass(4,50.0);
faustcode: vol=hslider("Z Volume",0.3,0.01,1.0,0.01) : onePoleBLT(10.0); // LP filter with cutoff frequency at 10Hz smoothes
audioout,aLeft,reson1*100000.0:*(vol):outputDSP; # pos 355,40
audioout,aRight,reson1*100000.0:*(vol):outputDSP; # pos 555,96