Group Admins

  • Profile picture of Robert P.

Modalys

Public Group active 4 days, 13 hours ago

Modalys physical modeling sound synthesis user group

script working but max number of iterations exceeded in connection solver error

Author 1 Subscribed Users |
Profile photo of coraliediatkine
coraliediatkine

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)

— Pasted Max Patch, click to expand. —
Attachments:
  1. Capture-d’écran-2016-09-22-à-09.42.07

    Capture-d’écran-2016-09-22-à-09.42.07.png

September 22, 2016 at 08:59 #19132

You must be logged in to reply to this topic.

Log in now