HELLO!
I managed to get a functional script! It implements a free-circ-plate and a single-point, with a felt connections.
I think the plate pitch and the single-point frequency might need to be related. Does anyone have information about this?
Other than that, this is the reason why I am posting:
If the plate is excited at a reasonable frequency, say, more than 1 every 2 or 3 seconds, after a few iterations, an error occurs, and the script needs to be reloaded:
“maximum number of iterations exceeded in connection solver”.
then, I get information about the plate vertical position, which is not supposed to change (fix the plate into space), and the felt (equivalent to strike) position at .5 and 1.
Here is the script, and the patch, and a screen capture of the error message.
I am not sure whether it’s the code (but since it works at least at a slow pace, I doubt it), the physics of the objects, the speed of the point motion, or the implementation in Max. Any help will, as usual, be greatly appreciated.
Thanks!
new()
set_precision('float')
Point1_c1 = make_controller('DYNAMIC',1,-1,1,'Point1@modes')
Point1_c2 = make_controller('DYNAMIC', 1, -1,[1000.0],'Point1@freqs')
Point1_c3 = make_controller('DYNAMIC', 1, -1,[1.000000],'Point1@loss')
Point1_c4 = make_controller('DYNAMIC', 1, -1,[1.000000],'Point1@amps')
Point1 = make_object('single-point',Point1_c1, Point1_c2, Point1_c3, Point1_c4)
Point1_pos_in_1 = make_controller('DYNAMIC',1,-1,[1.000000],'Point1@access-in-1-position')
Point1_access_in_1 = make_access(Point1,Point1_pos_in_1,'NORMAL')
Point1_pos_out_1 = make_controller('DYNAMIC',1,-1,[1.000000],'Point1@access-out-1-position')
Point1_access_out_1 = make_access(Point1,Point1_pos_out_1,'NORMAL')
MyPlate_c1 = make_controller('DYNAMIC',1,-1,160,'MyPlate@modes')
MyPlate_c2 = make_controller('DYNAMIC',1,-1,0.5,'MyPlate@radius')
MyPlate_c3 = make_controller('DYNAMIC',1,-1,0.001,'MyPlate@thickness')
MyPlate_c4 = make_controller('DYNAMIC',1,-1,7800,'MyPlate@density')
MyPlate_c5 = make_controller('DYNAMIC',2,-1,[2.000000 11.000000],'MyPlate@young')
MyPlate_c6 = make_controller('DYNAMIC',1,-1,0.3,'MyPlate@poisson')
MyPlate_c7 = make_controller('DYNAMIC',1,-1,0.2,'MyPlate@freq-loss')
MyPlate_c8 = make_controller('DYNAMIC',1,-1,0.2,'MyPlate@const-loss')
MyPlate = make_object('free-circ-plate',MyPlate_c1,MyPlate_c2,MyPlate_c3,MyPlate_c4,MyPlate_c5,MyPlate_c6,MyPlate_c7,MyPlate_c8, )
MyPlate_pitch = make_controller('DYNAMIC',1,-1,1000.000000,'MyPlate@pitch')
set_pitch(MyPlate,'radius',MyPlate_pitch)
MyPlate_pos_in_1 = make_controller('DYNAMIC',2,-1,[0.500000 0.0000],'MyPlate@access-in-1-position')
MyPlate_access_in_1 = make_access(MyPlate,MyPlate_pos_in_1,'NORMAL')
MyPlate_pos_in_2 = make_controller('DYNAMIC',2,-1,[0.0000 0.000000],'MyPlate@access-in-2-position')
MyPlate_access_in_2 = make_access(MyPlate,MyPlate_pos_in_2,'NORMAL')
MyPlate_pos_out_1 = make_controller('DYNAMIC',2,-1,[0.500000 0.00000],'MyPlate@access-out-1-position')
MyPlate_access_out_1 = make_access(MyPlate,MyPlate_pos_out_1,'NORMAL')
MyPlate_pos_out_2 = make_controller('DYNAMIC',2,-1,[0.500000 90.000],'MyPlate@access-out-2-position')
MyPlate_access_out_2 = make_access(MyPlate,MyPlate_pos_out_2,'NORMAL')
Out1_c1 = make_controller('DYNAMIC',1,-1,1,'Out1@gain')
Out1 = make_point_output(MyPlate_access_out_1,0,Out1_c1)
Out2_c1 = make_controller('DYNAMIC',1,-1,1,'Out2@gain')
Out2 = make_point_output(MyPlate_access_out_2,1,Out2_c1)
PlateVPosition_c1 = make_controller('DYNAMIC',1,-1,0,'PlateVPosition@position')
PlateVPosition_c2 = make_controller('DYNAMIC',1,-1,1,'PlateVPosition@weight')
PlateVPosition = make_connection('POSITION',MyPlate_access_in_2,PlateVPosition_c1,PlateVPosition_c2)
FeltVPosition_c1 = make_controller('DYNAMIC',1,-1,1,'FeltVPosition@position')
FeltVPosition_c2 = make_controller('DYNAMIC',1,-1,1,'FeltVPosition@weight')
FeltVPosition = make_connection('POSITION',Point1_access_in_1,FeltVPosition_c1,FeltVPosition_c2)
Felt_c1 = make_controller('DYNAMIC',1,-1,0.01,'Felt@thickness')
Felt_c2 = make_controller('DYNAMIC',2,-1,[1.000000 9.000000],'Felt@F0')
Felt_c3 = make_controller('DYNAMIC',1,-1,6,'Felt@alpha')
Felt_c4 = make_controller('DYNAMIC',1,-1,0.5,'Felt@epsilon')
Felt_c5 = make_controller('DYNAMIC',1,-1,1e-05,'Felt@tau')
Felt_c6 = make_controller('DYNAMIC',1,-1,1,'Felt@weight')
FeltConnection = make_connection('FELT',Point1_access_out_1,0.00000,MyPlate_access_in_1,0.500000,Felt_c1, Felt_c2, Felt_c3, Felt_c4, Felt_c5, Felt_c6)
----------begin_max5_patcher----------
3311.3oc2b02iaaaF+uu7ofvX.MYymAIE0KNXcKqMnXCXEK.Kq.C4BNHaQ6S
sxRZRxWx0hlO66gjRxR1Rxz9rrkS.xcmHojdd9wm2Io9sWbynYQelmNB8ZzG
P2byu8hatQ1jngaxu9lQqb+77.2T4vFsHHJb8pQiy6xOzeEbIzCdBF9Gonin
0o7E9AY7DQmEMC2peX.OKsZiwtYyevOb48I74YJZg5XOwbLhXZJ9ks8D7XDk
NAi9X9836IolnY+7sT6Qad5QqyJd7zxGeh6JNPH2yCcmEvkDadepgm8TLW8d
GMZLZzL2vkiJeSoYOotmQEulEQIqbkDp03RDp.FHSvh198W7BwOFqIpthml5
tjW7Fx3eV97G8C7fr2j8f+7eIDFA5OPF0DPR6.HmRj.4Tr.BI3ochjVMijjV
QqlPoif8C4eBd+6v8vrVRDhJjq1f8gYo9+p7UQD7zgAGLl.MXVFBXvRAF3lA
ClY02YHHBI65uk36Ff9tn.uCDqZUp5HvqrnkKC3iNPkpbl2vpfs6f4ocycGj
NkeXVOKnjF5Fm9PT1WPlmJAECAVYgkVdrM6BqHjSqfBXg0suAr.+P9WNoPko
iTfxvoKnhdbPEsMnJ0eYnaPm1rOBLa15rrnviT6xQocYT7ylfAamKnsiEqCm
m4ug+dzMob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