Beginner: Please help to understand the code

Explain what these titles are, Without this the script does not work

begin

2 delay_seconds          **what is mean number 2 at the beginning**
court_03
2 delay_seconds
court_05
2 delay_seconds
mouvement_fermeture_brusque
5_doigts_animation_courte_01
5 delay_seconds          **what is mean number 5 at the beginning**
sequence_double_02A
3 delay_seconds
sequence_double_02B
30 delay_seconds          **what is mean number 30 at the beginning**
court_01
2 delay_seconds
2_doigts_rapide
sequence_rapide_02
30 delay_seconds
court_03
3 delay_seconds
5_doigts_animation_courte_02 
30 delay_seconds
mouvement_petit_03
3 delay_seconds          **what is mean number 3 at the beginning**
5_doigts_animation_moyenne_04_lente
1 delay_minutes
court_04
3 delay_seconds
court_06
5_doigts_animation_moyenne_02 
court_05
2_doigts_rapide
mouvement_petit_02
sequence_double_02A
2 delay_seconds
sequence_double_02B
30 delay_seconds
court_01
lent_01 
sequence_rapide_02
10 delay_seconds
5_doigts_animation_longue_01 
5_doigts_animation_courte_02
2 delay_minutes
court_05
3 delay_seconds
5_doigts_animation_moyenne_01
2_doigts_rapide  #
5_doigts_animation_courte_02
1 delay_minutes
court_01
3 delay_seconds
mouvement_petit_02
mouvement_petit_01
mouvement_petit_03
1 delay_minutes
mouvement_petit_03 
5_doigts_animation_moyenne_04_lente
sequence_double_02A
sequence_double_02B
1 delay_minutes          **what is mean number 1 at the beginning**
sequence_double_01A
4 delay_seconds
sequence_double_01B 
1 delay_seconds
sequence_bouton_1
2 delay_minutes
court_05
3 delay_seconds
2_doigts_rapide
2 delay_seconds
5_doigts_animation_moyenne_02
mouvement_petit_01    
2 delay_seconds
court_06
1 delay_seconds
lent_01        
1 delay_seconds
sequence_rapide_02
3 delay_minutes
court_01
5 delay_seconds
fuck_04
5_doigts_animation_moyenne_04_lente 
mouvement_fermeture_brusque	
30 delay_seconds
mouvement_petit_02
2 delay_seconds
5_doigts_animation_courte_01
2 delay_minutes
court_03
4 delay_seconds
mouvement_petit_01
2 delay_seconds
5_doigts_animation_moyenne_01
1 delay_minutes
court_06        
court_05
2 delay_seconds
sequence_rapide_02
5_doigts_animation_longue_01
2 delay_minutes
court_05     
2_doigts_rapide
2 delay_seconds
mouvement_petit_02  
5_doigts_animation_moyenne_02
1 delay_minutes
court_04
10 delay_seconds
lent_01
15 delay_seconds
5_doigts_animation_longue_01_rapide
10 delay_seconds
fuck_01
1 delay_minutes 
court_01
2 delay_seconds
court_03
5_doigts_animation_courte_02
8 delay_seconds
5_doigts_animation_moyenne_04_lente  
court_05
2_doigts_rapide
1 delay_minutes
court_04
2 delay_seconds
sequence_double_02A
8 delay_seconds
sequence_double_02B
lent_01
15 delay_seconds
court_01
court_03
1 delay_seconds
mouvement_petit_03
5 delay_seconds
sequence_rapide_02
6 delay_seconds
5_doigts_animation_moyenne_02
30 delay_seconds
court_05
court_05
court_05
  
repeat

**explain how the buttons work, when I put them in my script they don't work, but in this script they work**

####################### Boutons SubRoutines #################

sub bouton_1
  6 get_position 500 less_than
  return

sub bouton_2
  7 get_position 500 less_than
  return


####################### Delay SubRoutines ###################
 
sub delay_seconds
  begin dup while      
    1 minus 1000 delay 
      bouton_1 if Sequence_bouton_1 endif
      bouton_2 if sequence_bouton_2 endif
  repeat
  drop return          

 sub delay_minutes
  begin dup while
    1 minus 60 delay_seconds 
      bouton_1 if Sequence_bouton_1 endif
      bouton_2 if sequence_bouton_2 endif
  repeat
  drop return 


################### Sequences SubRoutines: #############

# 2 doigts rapide  ------------------
sub 2_doigts_rapide
120 0 speed
120 1 speed
120 2 speed
120 3 speed
120 4 speed
40 0 acceleration
40 1 acceleration
40 2 acceleration
40 3 acceleration
40 4 acceleration
  150 4000 4000 4000 4585 5362 0 
  0 0 0 0 frame_0..5_8..11 # Frame 0
  150 4935 5828 frame_3_4 # Frame 1
  150 5284 5401 frame_3_4 # Frame 2
  150 4741 4974 frame_3_4 # Frame 3
  150 5051 5207 frame_3_4 # Frame 4
50 3 speed
50 4 speed
10 3 acceleration
10 4 acceleration
  300 4624 5556 frame_3_4 # Frame 5
  300 4896 4935 frame_3_4 # Frame 6
  250 4508 4352 frame_3_4 # Frame 7
  250 4000 4000 frame_3_4 # Frame 8

50 0 speed
50 1 speed
50 2 speed
50 3 speed
50 4 speed
10 0 acceleration
10 1 acceleration
10 2 acceleration
10 3 acceleration
10 4 acceleration
  return

# 5 doigts_animation courte_01  ---------------
sub 5_doigts_animation_courte_01
50 0 speed
50 1 speed
50 2 speed
50 3 speed
50 4 speed
10 0 acceleration
10 1 acceleration
10 2 acceleration
10 3 acceleration
10 4 acceleration
  700 4003 7382 6488 6488 6488 0 
  0 0 0 0 frame_0..5_8..11 # Frame 0
  700 4000 4000 4000 4430 5362 frame_0..4 # Frame 1
  500 4935 5867 6683 frame_2..4 # Frame 2
  500 5362 6294 7032 7304 frame_1..4 # Frame 3
  500 5323 7226 7071 frame_0..2 # Frame 4
  150 7459 frame_3 # Frame 5
  150 7925 frame_1 # Frame 6
  150 6838 6877 frame_2_4 # Frame 7
  150 7420 7498 7071 7304 frame_1..4 # Frame 8
  150 8236 7731 frame_1_3 # Frame 9
  350 7149 5867 frame_3_4 # Frame 10
  350 6993 5712 4352 frame_2..4 # Frame 11
  350 7343 5984 4042 4042 frame_1..4 # Frame 12
  350 4000 4000 4000 4000 4000 frame_0..4 # Frame 13
  return

# 5 doigts_animation courte_02   ----------------
sub 5_doigts_animation_courte_02
30 0 speed
30 1 speed
30 2 speed
30 3 speed
30 4 speed
8 0 acceleration
8 1 acceleration
8 2 acceleration
8 3 acceleration
8 4 acceleration
  250 5906 4000 4000 4000 4000 0 
  0 0 0 0 frame_0..5_8..11 # Frame 0
  500 8314 6100 frame_0_1 # Frame 1
  500 8081 7886 7265 6838 frame_1..4 # Frame 2
  500 7226 6605 5246 4857 frame_1..4 # Frame 3
  500 4000 4000 4000 4000 4000 frame_0..4 # Frame 4
  500 6799 5906 6217 7071 7265 frame_0..4 # Frame 5
  400 5323 5867 6760 frame_1..3 # Frame 6
  400 4780 5207 5867 6450 frame_1..4 # Frame 7
  400 7653 4042 4585 5013 5867 frame_0..4 # Frame 8
100 0 speed
100 1 speed
100 2 speed
100 3 speed
100 4 speed
20 0 acceleration
20 1 acceleration
20 2 acceleration
20 3 acceleration
20 4 acceleration
  200 8780 frame_0 # Frame 9
  150 7382 frame_0 # Frame 10
  300 8197 4082 4974 5945 7382 frame_0..4 # Frame 11
  200 9673 7925 frame_0_4 # Frame 12
  100 7187 frame_4 # Frame 13
  200 8158 frame_0 # Frame 14
  300 9750 5129 6178 frame_0_3_4 # Frame 15
  250 7498 4275 4663 5284 frame_0_2..4 # Frame 16
  250 6294 4081 4042 4158 frame_0_2..4 # Frame 17
  300 4000 4000 4000 4000 4000 frame_0..4 # Frame 18

50 0 speed
50 1 speed
50 2 speed
50 3 speed
50 4 speed
10 0 acceleration
10 1 acceleration
10 2 acceleration
10 3 acceleration
10 4 acceleration
  return

# 5 doigts_animation longue_01   ----------------
sub 5_doigts_animation_longue_01
50 0 speed
50 1 speed
50 2 speed
50 3 speed
50 4 speed
10 0 acceleration
10 1 acceleration
10 2 acceleration
10 3 acceleration
10 4 acceleration
  700 4003 7382 6488 6488 6488 0 
  0 0 0 0 frame_0..5_8..11 # Frame 0
  700 4000 4000 4000 4430 5362 frame_0..4 # Frame 1
  500 4935 5867 6683 frame_2..4 # Frame 2
  500 5362 6294 7032 7304 frame_1..4 # Frame 3
  500 5323 7226 7071 frame_0..2 # Frame 4
  150 7459 frame_3 # Frame 5
  150 7925 frame_1 # Frame 6
  150 6838 6877 frame_2_4 # Frame 7
  150 7420 7498 7071 7304 frame_1..4 # Frame 8
  150 8236 7731 frame_1_3 # Frame 9
  350 7149 5867 frame_3_4 # Frame 10
  350 6993 5712 4352 frame_2..4 # Frame 11
  350 7343 5984 4042 4042 frame_1..4 # Frame 12
  350 4000 4000 4000 4000 4000 frame_0..4 # Frame 13
  350 6411 5789 5595 5828 6217 frame_0..4 # Frame 14
  350 7576 6255 5867 5090 4818 frame_0..4 # Frame 15
  350 7071 4818 4896 4624 frame_0..3 # Frame 16
  350 4081 frame_0 # Frame 17
  350 6683 6333 6916 6799 frame_1..4 # Frame 18
  250 7692 8003 7226 frame_1..3 # Frame 19
  250 5401 7498 6916 7226 frame_0_1_3_4 # Frame 20
  250 8042 7576 7537 6760 frame_1..4 # Frame 21
  250 7343 6683 6178 frame_2..4 # Frame 22
  250 7343 7770 7382 7343 frame_1..4 # Frame 23
  250 8469 7653 6954 5984 frame_1..4 # Frame 24
  350 6450 6527 5789 frame_1..3 # Frame 25
  350 9867 frame_0 # Frame 26
  350 9090 6954 7459 7110 7265 frame_0..4 # Frame 27
  350 4000 4000 4000 4000 4000 frame_0..4 # Frame 28
  return

# 5 doigts_animation longue_01_rapide   ------------------
sub 5_doigts_animation_longue_01_rapide
100 0 speed
100 1 speed
100 2 speed
100 3 speed
100 4 speed
30 0 acceleration
30 1 acceleration
30 2 acceleration
30 3 acceleration
30 4 acceleration
  150 4003 7382 6488 6488 6488 0 
  0 0 0 0 frame_0..5_8..11 # Frame 0
  150 4000 4000 4000 4430 5362 frame_0..4 # Frame 1
  150 4935 5867 6683 frame_2..4 # Frame 2
  150 5362 6294 7032 7304 frame_1..4 # Frame 3
  150 5323 7226 7071 frame_0..2 # Frame 4
  150 7459 frame_3 # Frame 5
  150 7925 frame_1 # Frame 6
  150 6838 6877 frame_2_4 # Frame 7
  150 7420 7498 7071 7304 frame_1..4 # Frame 8
  150 8236 7731 frame_1_3 # Frame 9
  150 7149 5867 frame_3_4 # Frame 10
  150 6993 5712 4352 frame_2..4 # Frame 11
  150 7343 5984 4042 4042 frame_1..4 # Frame 12
  150 4000 4000 4000 4000 4000 frame_0..4 # Frame 13
  150 6411 5789 5595 5828 6217 frame_0..4 # Frame 14
  150 7576 6255 5867 5090 4818 frame_0..4 # Frame 15
  150 7071 4818 4896 4624 frame_0..3 # Frame 16
  150 4081 frame_0 # Frame 17
  150 6683 6333 6916 6799 frame_1..4 # Frame 18
  150 7692 8003 7226 frame_1..3 # Frame 19
  150 5401 7498 6916 7226 frame_0_1_3_4 # Frame 20
  150 8042 7576 7537 6760 frame_1..4 # Frame 21
  150 7343 6683 6178 frame_2..4 # Frame 22
  150 7343 7770 7382 7343 frame_1..4 # Frame 23
  150 8469 7653 6954 5984 frame_1..4 # Frame 24
  150 6450 6527 5789 frame_1..3 # Frame 25
  150 9867 frame_0 # Frame 26
60 0 speed
60 1 speed
60 2 speed
60 3 speed
60 4 speed
20 0 acceleration
20 1 acceleration
20 2 acceleration
20 3 acceleration
20 4 acceleration
  150 9090 6954 7459 7110 7265 frame_0..4 # Frame 27
30 0 speed
30 1 speed
30 2 speed
30 3 speed
30 4 speed
15 0 acceleration
15 1 acceleration
15 2 acceleration
15 3 acceleration
15 4 acceleration
  400 4000 4000 4000 4000 4000 frame_0..4 # Frame 28

50 0 speed
50 1 speed
50 2 speed
50 3 speed
50 4 speed
10 0 acceleration
10 1 acceleration
10 2 acceleration
10 3 acceleration
10 4 acceleration
  return

# 5 doigts_animation moyenne_01   ------------------- 
sub 5_doigts_animation_moyenne_01
40 0 speed
40 1 speed
40 2 speed
40 3 speed
40 4 speed
  500 7576 5168 6022 5051 5750 0 
  0 0 0 0 frame_0..5_8..11 # Frame 0
  500 8158 6333 4974 5906 6721 frame_0..4 # Frame 1
  500 7265 5789 6527 7848 frame_0_1_3_4 # Frame 2
  500 4391 5750 6488 7653 5789 frame_0..4 # Frame 3
  500 5750 7653 7071 4935 frame_0..3 # Frame 4
  500 5246 5479 8585 3537 4547 frame_0..4 # Frame 5
  500 5517 6877 6139 6061 7304 frame_0..4 # Frame 6
  500 5168 6954 7459 7420 frame_0..3 # Frame 7
  500 5362 5945 5051 5867 frame_1..4 # Frame 8
  500 6372 4042 4003 4042 4585 frame_0..4 # Frame 9
  500 5168 5090 5090 5051 5129 frame_0..4 # Frame 10
  500 7498 4275 4896 5673 6372 frame_0..4 # Frame 11
  500 6877 6527 5867 4935 3964 frame_0..4 # Frame 12
  500 5168 3925 4896 5828 6799 frame_0..4 # Frame 13
  500 4000 4000 4000 4000 4000 frame_0..4 # Frame 14

50 0 speed
50 1 speed
50 2 speed
50 3 speed
50 4 speed
10 0 acceleration
10 1 acceleration
10 2 acceleration
10 3 acceleration
10 4 acceleration
  return

# 5 doigts_animation moyenne_02   -------------------
sub 5_doigts_animation_moyenne_02
80 0 speed
80 1 speed
80 2 speed
80 3 speed
80 4 speed
15 0 acceleration
15 1 acceleration
15 2 acceleration
15 3 acceleration
15 4 acceleration
  300 4042 7809 7110 6877 6527 0 
  0 0 0 0 frame_0..5_8..11 # Frame 0
  400 8702 7692 7187 6683 frame_1..4 # Frame 1
  300 6333 7886 7420 7886 8042 frame_0..4 # Frame 2
  250 7848 8236 9051 frame_1_3_4 # Frame 3
  300 9090 7848 7498 6954 frame_1..4 # Frame 4
  200 7265 8391 7420 7382 frame_0..2_4 # Frame 5
  200 7731 7110 6683 6527 frame_1..4 # Frame 6
  300 6721 7537 8624 frame_0_3_4 # Frame 7
  400 8857 6954 6527 6372 6877 frame_0..4 # Frame 8
  300 9284 8430 7304 5789 6178 frame_0..4 # Frame 9
50 0 speed
50 1 speed
50 2 speed
50 3 speed
50 4 speed
15 0 acceleration
15 1 acceleration
15 2 acceleration
15 3 acceleration
15 4 acceleration
  400 7420 7032 7382 frame_2..4 # Frame 10
30 0 speed
30 1 speed
30 2 speed
30 3 speed
30 4 speed
  600 4000 4000 4000 4000 4000 frame_0..4 # Frame 11

50 0 speed
50 1 speed
50 2 speed
50 3 speed
50 4 speed
10 0 acceleration
10 1 acceleration
10 2 acceleration
10 3 acceleration
10 4 acceleration
  return

# 5 doigts_animation moyenne_04_lente   ------------------
sub 5_doigts_animation_moyenne_04_lente
40 0 speed
40 1 speed
40 2 speed
40 3 speed
40 4 speed
  500 5945 4000 4000 4000 4000 0 
  0 0 0 0 frame_0..5_8..11 # Frame 0
  500 7731 6061 6022 6022 6022 frame_0..4 # Frame 1
  500 8585 8469 7731 7343 7343 frame_0..4 # Frame 2
  500 7576 7226 8508 frame_1_2_4 # Frame 3
  500 9323 8780 7653 7071 7071 frame_0..4 # Frame 4
  500 9013 6760 7032 6644 frame_0..3 # Frame 5
  500 6488 frame_0 # Frame 6
  500 9051 8663 8430 8352 frame_1..4 # Frame 7
  600 7615 7809 8081 9129 frame_1..4 # Frame 8
  600 9712 8469 7615 7265 frame_1..4 # Frame 9
  600 7615 7809 8081 9129 frame_1..4 # Frame 8
  600 9712 8469 7615 7265 frame_1..4 # Frame 9
  600 7615 7809 8081 9129 frame_1..4 # Frame 8
  600 9712 8469 7615 7265 frame_1..4 # Frame 9
30 0 speed
30 1 speed
20 2 speed
20 3 speed
20 4 speed
  500 4081 4000 4000 4000 4000 frame_0..4 # Frame 10

50 0 speed
50 1 speed
50 2 speed
50 3 speed
50 4 speed
10 0 acceleration
10 1 acceleration
10 2 acceleration
10 3 acceleration
10 4 acceleration
  return

# court 01   -----------------------
sub court_01
80 0 speed
80 1 speed
80 2 speed
80 3 speed
80 4 speed
25 0 acceleration
25 1 acceleration
25 2 acceleration
25 3 acceleration
25 4 acceleration
  200 4000 4000 4818 4896 4000 0 
  0 0 0 0 frame_0..5_8..11 # Frame 0
  200 5323 5129 4042 4081 frame_0..3 # Frame 1
30 0 speed
20 1 speed
30 2 speed
20 3 speed
20 4 speed
8 0 acceleration
8 1 acceleration
8 2 acceleration
8 3 acceleration
8 4 acceleration
  600 4000 4000 4000 4469 5051 frame_0..4 # Frame 2
  100 delay # Frame 3
  600 4000 4000 frame_3_4 # Frame 4
  return


# court 03   -----------------------
sub court_03
15 0 speed
15 1 speed
5 2 speed
5 3 speed
5 4 speed
5 0 acceleration
5 1 acceleration
5 2 acceleration
5 3 acceleration
5 4 acceleration
  1000 5828 4780 4935 4935 5634 0 
  0 0 0 0 frame_0..5_8..11 # Frame 0
  1000 4000 4000 4000 4000 4000 frame_0..4 # Frame 1
  return

# court 04   -----------------------
sub court_04
150 3 speed
150 4 speed
80 3 acceleration
80 4 acceleration
  140 4000 4003 4000 3964 4780 0 
  0 0 0 0 frame_0..5_8..11 # Frame 0
  100 4702 5440 frame_3_4 # Frame 1
  800 delay # Frame 2
20 3 speed
20 4 speed
5 3 acceleration
5 4 acceleration
  500 4000 4000 4000 frame_1_3_4 # Frame 3
  return

# court 05   -----------------------
sub court_05
150 0 speed
150 1 speed
150 2 speed
150 3 speed
150 4 speed
100 0 acceleration
100 1 acceleration
100 2 acceleration
100 3 acceleration
100 4 acceleration
  100 4000 4000 5051 4000 4000 0 
  0 0 0 0 frame_0..5_8..11 # Frame 0
  150 5246 frame_2 # Frame 1
  300 4547 frame_2 # Frame 2
  100 4974 4547 frame_2_3 # Frame 3
  150 4702 4275 frame_1_2 # Frame 4
  100 4391 5090 4508 frame_1_3_4 # Frame 5
  250 4236 frame_3 # Frame 6
  100 4000 4000 4000 4000 frame_1..4 # Frame 7

50 0 speed
50 1 speed
50 2 speed
50 3 speed
50 4 speed
10 0 acceleration
10 1 acceleration
10 2 acceleration
10 3 acceleration
10 4 acceleration
  return

# court 06   -----------------------
sub court_06
15 0 speed
5 0 acceleration
  3000 8119 4000 4000 4000 4000 0 
  0 0 0 0 frame_0..5_8..11 # Frame 0
  800 delay # Frame 1
150 0 speed
80 0 acceleration
  300 7110 frame_0 # Frame 2
  300 6450 frame_0 # Frame 3
  200 5284 frame_0 # Frame 4
  200 4000 frame_0 # Frame 5
50 0 speed
50 1 speed
50 2 speed
50 3 speed
50 4 speed
10 0 acceleration
10 1 acceleration
10 2 acceleration
10 3 acceleration
10 4 acceleration
  return

# Fuck 01    -----------------------
sub Fuck_01
  600 6294 4000 4000 4000 4000 0 
  0 0 0 0 frame_0..5_8..11 # Frame 4
  1000 8430 8391 8119 7770 7615 frame_0..4 # Frame 5
  1000 delay # Frame 6
150 2 speed
50 2 acceleration
  300 4003 frame_2 # Frame 7
  600 9517 8780 frame_0_1 # Frame 8
  400 8547 7925 8469 8896 frame_0_1_3_4 # Frame 9
  400 9945 8430 8042 7886 frame_0_1_3_4 # Frame 10
  500 4000 4000 4000 4000 4000 frame_0..4 # Frame 11
50 0 speed
50 1 speed
50 2 speed
50 3 speed
50 4 speed
10 0 acceleration
10 1 acceleration
10 2 acceleration
10 3 acceleration
10 4 acceleration
  return

# Fuck 04    -----------------------
sub Fuck_04
30 0 speed
30 1 speed
30 2 speed
30 3 speed
30 4 speed
  600 6178 4000 4000 4000 4000 0 
  0 0 0 0 frame_0..5_8..11 # Frame 0
  2000 7848 7925 7770 7110 7032 frame_0..4 # Frame 1
150 2 speed
50 2 acceleration
  2000 4081 7226 frame_2_4 # Frame 2
70 0 speed
70 1 speed
70 3 speed
70 4 speed
  500 4000 4000 4000 4000 4000 frame_0..4 # Frame 3

50 0 speed
50 1 speed
50 2 speed
50 3 speed
50 4 speed
10 0 acceleration
10 1 acceleration
10 2 acceleration
10 3 acceleration
10 4 acceleration
  return

# lent 01    -----------------------
sub lent_01
10 0 speed
10 1 speed
10 2 speed
10 3 speed
10 4 speed
5 0 acceleration
5 1 acceleration
5 2 acceleration
5 3 acceleration
5 4 acceleration
  700 5556 4000 5051 4974 5051 0 
  0 0 0 0 frame_0..5_8..11 # Frame 0
  700 7382 6178 6294 6488 6760 frame_0..4 # Frame 1
  700 delay # Frame 2
  700 6993 6061 6178 frame_1_2_4 # Frame 3
  700 7848 6566 5789 frame_0_1_3 # Frame 4
  700 7498 7343 6721 5517 frame_0..2_4 # Frame 5
  700 6760 6799 6178 frame_1_3_4 # Frame 6
  700 6178 5712 frame_2_3 # Frame 7
  700 6294 5789 5284 frame_0_1_3 # Frame 8
  700 4935 5246 4197 4974 frame_0_2..4 # Frame 9
  700 4000 4000 4000 4000 4000 frame_0..4 # Frame 10
  return

# mouvement fermeture brusque   -----------------------
sub mouvement_fermeture_brusque
100 1 speed
100 2 speed
100 3 speed
100 4 speed
50 1 acceleration
50 2 acceleration
50 3 acceleration
50 4 acceleration
  500 4000 8119 7809 7459 7226 0 
  0 0 0 0 frame_0..5_8..11 # Frame 0
40 1 speed
40 2 speed
40 3 speed
40 4 speed
10 1 acceleration
10 2 acceleration
10 3 acceleration
10 4 acceleration
  200 4042 frame_1 # Frame 1
  300 4003 frame_2 # Frame 2
  400 4081 frame_3 # Frame 3
  500 4000 4000 4000 4000 frame_1..4 # Frame 4

50 0 speed
50 1 speed
50 2 speed
50 3 speed
50 4 speed
10 0 acceleration
10 1 acceleration
10 2 acceleration
10 3 acceleration
10 4 acceleration
  return

# mouvement petit 01   -----------------------
sub mouvement_petit_01
30 0 speed
30 1 speed
30 2 speed
30 3 speed
30 4 speed
  400 5673 5129 4000 5207 4702 0 
  0 0 0 0 frame_0..5_8..11 # Frame 0
  300 5401 4780 6100 6566 6993 frame_0..4 # Frame 1
  400 4663 5750 5595 6061 5595 frame_0..4 # Frame 2
  300 6178 5673 6255 6644 frame_0_1_3_4 # Frame 3
  300 7576 6916 5712 5789 frame_0_1_3_4 # Frame 4
  300 7032 6488 6527 6799 6838 frame_0..4 # Frame 5
  300 6799 5789 6294 frame_0..2 # Frame 6
  300 5634 5673 5479 frame_0_2_3 # Frame 7
  400 4000 4000 4000 4000 4000 frame_0..4 # Frame 8

50 0 speed
50 1 speed
50 2 speed
50 3 speed
50 4 speed
10 0 acceleration
10 1 acceleration
10 2 acceleration
10 3 acceleration
10 4 acceleration
  return

# mouvement petit 02   -----------------------
sub mouvement_petit_02
70 0 speed
70 1 speed
70 2 speed
70 3 speed
70 4 speed
20 0 acceleration
20 1 acceleration
20 2 acceleration
20 3 acceleration
20 4 acceleration
  200 5401 4000 4000 4000 4000 0 
  0 0 0 0 frame_0..5_8..11 # Frame 0
  200 4003 5634 frame_0_1 # Frame 1
  200 4003 5517 frame_1_2 # Frame 2
  200 4003 5401 frame_2_3 # Frame 3
  200 3925 5323 frame_3_4 # Frame 4
  200 5168 4003 frame_3_4 # Frame 5
  200 5246 4042 frame_2_3 # Frame 6
  200 5284 3964 frame_1_2 # Frame 7
40 2 speed
  300 5284 4042 frame_0_1 # Frame 8
  200 4000 4000 4000 4000 4000 frame_0..4 # Frame 9

50 0 speed
50 1 speed
50 2 speed
50 3 speed
50 4 speed
10 0 acceleration
10 1 acceleration
10 2 acceleration
10 3 acceleration
10 4 acceleration
  return

# mouvement petit 03   -----------------------
sub mouvement_petit_03
10 0 speed
10 0 acceleration
  2000 5984 4000 4000 4000 4000 0 
  0 0 0 0 frame_0..5_8..11 # Frame 0
100 0 speed
50 0 acceleration
  1500 7964 frame_0 # Frame 1
20 0 speed
10 0 acceleration
  500 4000 3964 4585 5246 frame_0_1_3_4 # delay
  500 5556 5207 frame_1_2 # Frame 3
  500 4042 frame_1 # Frame 4
  500 4003 frame_2 # Frame 5
  300 4081 frame_3 # Frame 6
100 4 speed
50 4 acceleration
  500 4000 4000 4000 4000 frame_1..4 # Frame 7

50 0 speed
50 1 speed
50 2 speed
50 3 speed
50 4 speed
10 0 acceleration
10 1 acceleration
10 2 acceleration
10 3 acceleration
10 4 acceleration
  return

# sequence bouton 1   -----------------------
sub sequence_bouton_1
80 0 speed
80 1 speed
80 2 speed
80 3 speed
80 4 speed
15 0 acceleration
15 1 acceleration
15 2 acceleration
15 3 acceleration
15 4 acceleration
  300 4042 7809 7110 6877 6527 0 
  0 0 0 0 frame_0..5_8..11 # Frame 0
  200 8702 7692 7187 6683 frame_1..4 # Frame 1
  200 6333 7886 7420 7886 8042 frame_0..4 # Frame 2
  300 5945 7848 8236 9051 frame_0_1_3_4 # Frame 3
  200 6333 9090 7848 7498 6954 frame_0..4 # Frame 4
  300 6683 8391 7420 7382 frame_0..2_4 # Frame 5
  300 6294 7731 7110 6683 6527 frame_0..4 # Frame 6
  200 6061 7537 8624 frame_0_3_4 # Frame 7
  200 8857 6954 6527 6372 6877 frame_0..4 # Frame 8
  200 9284 8430 7304 5789 6178 frame_0..4 # Frame 9
  300 7731 7032 7032 7382 frame_1..4 # Frame 10
  200 6993 5440 5556 6217 6566 frame_0..4 # Frame 11
  300 6333 6372 6954 8236 9051 frame_0..4 # Frame 3
  200 9090 7848 7498 6954 frame_1..4 # Frame 4
  300 8119 6760 7420 7382 frame_0..2_4 # Frame 5
  300 8702 7731 7110 6683 6527 frame_0..4 # Frame 6
  200 8197 7537 8624 frame_0_3_4 # Frame 7
  300 8857 6954 6527 6372 6877 frame_0..4 # Frame 8
  300 7653 frame_1 # Frame 19
  300 8702 7265 8430 frame_0_3_4 # Frame 20
  300 9789 8119 6683 6683 7149 frame_0..4 # Frame 21
  200 8780 7615 7692 9013 frame_0_1_3_4 # Frame 22
  200 9984 8197 7032 6993 7459 frame_0..4 # Frame 23
  200 9051 8236 4974 5284 6838 frame_0..4 # Frame 24
  200 9362 9867 frame_0_4 # Frame 25
  200 9984 9013 7187 6644 7770 frame_0..4 # Frame 26
  200 9750 8236 4974 5284 9906 frame_0..4 # Frame 27
50 0 speed
50 1 speed
50 2 speed
50 3 speed
50 4 speed
15 0 acceleration
15 1 acceleration
15 2 acceleration
15 3 acceleration
15 4 acceleration
  500 8469 6217 7187 frame_0_1_4 # Frame 28
30 0 speed
30 1 speed
30 2 speed
30 3 speed
30 4 speed
  600 4000 4000 4000 4000 4000 frame_0..4 # Frame 29

50 0 speed
50 1 speed
50 2 speed
50 3 speed
50 4 speed
10 0 acceleration
10 1 acceleration
10 2 acceleration
10 3 acceleration
10 4 acceleration
  return

# sequence bouton 2   -----------------------
sub sequence_bouton_2
20 0 speed
20 1 speed
20 2 speed
20 3 speed
20 4 speed
7 0 acceleration
7 1 acceleration
7 2 acceleration
7 3 acceleration
7 4 acceleration

  800 5634 4857 4818 4547 4469 0 
  0 0 0 0 frame_0..5_8..11 # Frame 0
  800 8003 7809 7537 7032 6721 frame_0..4 # Frame 1
  800 6721 6799 7925 frame_1_2_4 # Frame 2
  800 9051 8236 7653 6877 6217 frame_0..4 # Frame 3
  800 8158 6644 7226 7653 8469 frame_0..4 # Frame 4
  800 9556 8352 7848 7886 7886 frame_0..4 # Frame 5
  1500 delay # Frame 6
120 0 speed
120 1 speed
120 2 speed
120 3 speed
120 4 speed
70 0 acceleration
70 1 acceleration
70 2 acceleration
70 3 acceleration
70 4 acceleration
  300 3964 frame_2 # Frame 7
  2000 delay # Frame 8
25 0 speed
25 1 speed
25 2 speed
25 3 speed
25 4 speed
10 0 acceleration
10 1 acceleration
10 2 acceleration
10 3 acceleration
10 4 acceleration
  700 7731 9401 frame_1_4 # Frame 9
  700 9712 8780 7265 7032 frame_0_1_3_4 # Frame 10
  700 8042 6993 5595 frame_0_1_3 # Frame 11
  700 9284 7382 6683 8236 frame_0..2_4 # Frame 12
  700 5323 5401 7498 9051 frame_1..4 # Frame 13
60 0 speed
60 1 speed
60 2 speed
60 3 speed
60 4 speed
15 0 acceleration
15 1 acceleration
15 2 acceleration
15 3 acceleration
15 4 acceleration
  400 9556 7149 7110 6644 5906 frame_0..4 # Frame 14
  400 8391 6488 5945 7809 6255 frame_0..4 # Frame 15
  400 8663 7071 8236 9362 frame_0_1_3_4 # Frame 16
90 0 speed
90 1 speed
90 2 speed
90 3 speed
90 4 speed
25 0 acceleration
25 1 acceleration
25 2 acceleration
25 3 acceleration
25 4 acceleration
  200 6993 6916 5440 6255 frame_1..4 # Frame 17
  200 9789 8119 8081 7809 7692 frame_0..4 # Frame 18
  200 8430 5673 5867 4896 5517 frame_0..4 # Frame 19
120 0 speed
120 1 speed
120 2 speed
120 3 speed
120 4 speed
45 0 acceleration
45 1 acceleration
45 2 acceleration
45 3 acceleration
45 4 acceleration
  100 7809 7420 7265 7149 frame_1..4 # Frame 20
  100 8391 6760 6644 7537 8508 frame_0..4 # Frame 21
  100 9013 7770 6954 6100 4896 frame_0..4 # Frame 22
90 0 speed
90 1 speed
90 2 speed
90 3 speed
90 4 speed
25 0 acceleration
25 1 acceleration
25 2 acceleration
25 3 acceleration
25 4 acceleration
  200 8236 7848 7731 8275 frame_1..4 # Frame 23
  200 6605 7420 frame_1_2 # Frame 24
  200 7770 5673 7032 frame_0..2 # Frame 25
60 0 speed
60 1 speed
60 2 speed
60 3 speed
60 4 speed
15 0 acceleration
15 1 acceleration
15 2 acceleration
15 3 acceleration
15 4 acceleration
  300 4935 6139 6450 7615 frame_1..4 # Frame 26
  300 4275 5207 5013 5750 frame_1..4 # Frame 27
20 0 speed
20 1 speed
20 2 speed
20 3 speed
20 4 speed
10 0 acceleration
10 1 acceleration
10 2 acceleration
10 3 acceleration
10 4 acceleration
  700 4000 4000 4000 4000 4000 frame_0..4 # Frame 28
  return

# sequence double 01-A   -----------------------
sub sequence_double_01A
20 0 speed
20 1 speed
20 2 speed
20 3 speed
20 4 speed
5 0 acceleration
5 1 acceleration
5 2 acceleration
5 3 acceleration
5 4 acceleration
  600 6450 6139 5517 5129 6139 0 
  0 0 0 0 frame_0..5_8..11 # Frame 0
  return

# sequence double 01-B   -----------------------
sub sequence_double_01B
100 0 speed
100 1 speed
100 2 speed
100 3 speed
100 4 speed
30 0 acceleration
30 1 acceleration
30 2 acceleration
30 3 acceleration
30 4 acceleration

  200 6799 6450 6100 5712 6139 0 
  0 0 0 0 frame_0..5_8..11 # Frame 0
  500 delay # Frame 1
  200 5750 6255 frame_2_3 # Frame 2
  300 6022 6993 frame_1_4 # Frame 3
  300 delay # Frame 4
  300 5556 frame_4 # Frame 5
  200 5284 5207 4585 frame_1..3 # Frame 6
  200 4818 frame_0 # Frame 7
  200 delay # Frame 8
  200 4000 4000 4000 4000 4000 frame_0..4 # Frame 9

50 0 speed
50 1 speed
50 2 speed
50 3 speed
50 4 speed
10 0 acceleration
10 1 acceleration
10 2 acceleration
10 3 acceleration
10 4 acceleration
  return

# sequence double 02-A   -----------------------
sub sequence_double_02A
30 0 speed
30 1 speed
20 2 speed
20 3 speed
20 4 speed
7 0 acceleration
7 1 acceleration
7 2 acceleration
7 3 acceleration
7 4 acceleration

  500 4000 4000 4000 4857 5712 0 
  0 0 0 0 frame_0..5_8..11 # Frame 0
  500 5440 4818 5284 6022 6683 frame_0..4 # Frame 1
  500 7265 6450 6488 6527 frame_0..3 # Frame 2
  700 delay # Frame 3
  600 7925 7071 6799 frame_0..2 # Frame 4
  return

# sequence double 02-B   -----------------------
sub sequence_double_02B
20 0 speed
15 1 speed
15 2 speed
15 3 speed
15 4 speed
8 0 acceleration
8 1 acceleration
8 2 acceleration
8 3 acceleration
8 4 acceleration

  1000 9168 8391 7848 7809 8042 0 
  0 0 0 0 frame_0..5_8..11 # Frame 0
  2000 delay # Frame 1
150 0 speed
150 1 speed
150 2 speed
150 3 speed
150 4 speed
50 0 acceleration
50 1 acceleration
50 2 acceleration
50 3 acceleration
50 4 acceleration
  200 6954 6333 6721 frame_2..4 # Frame 2
  200 8391 7149 7692 7420 frame_0..2_4 # Frame 3
  200 7382 5323 6954 7886 6372 frame_0..4 # Frame 4
  200 6450 6178 7692 6760 5401 frame_0..4 # Frame 5
  200 8003 6605 5984 8081 6450 frame_0..4 # Frame 6
  200 7226 5246 6333 6022 7809 frame_0..4 # Frame 7
  200 5945 5479 4430 7187 5984 frame_0..4 # Frame 8
  200 6100 8391 6605 3226 7731 frame_0..4 # Frame 9
  200 5440 4663 5595 7226 4508 frame_0..4 # Frame 10
  200 7382 7382 6100 6294 frame_1..4 # Frame 11
60 0 speed
60 1 speed
60 2 speed
60 3 speed
60 4 speed
15 0 acceleration
15 1 acceleration
15 2 acceleration
15 3 acceleration
15 4 acceleration
  500 5906 6372 4974 5051 frame_1..4 # Frame 12
15 0 speed
15 1 speed
15 2 speed
15 3 speed
15 4 speed
10 0 acceleration
10 1 acceleration
10 2 acceleration
10 3 acceleration
10 4 acceleration
  500 4000 4000 4000 4000 4000 frame_0..4 # Frame 13

50 0 speed
50 1 speed
50 2 speed
50 3 speed
50 4 speed
10 0 acceleration
10 1 acceleration
10 2 acceleration
10 3 acceleration
10 4 acceleration
  return

# Sequence rapide 02   -----------------------
sub Sequence_rapide_02
180 0 speed
120 1 speed
120 2 speed
120 3 speed
120 4 speed
60 0 acceleration
30 1 acceleration
40 2 acceleration
40 3 acceleration
40 4 acceleration
  500 8818 8314 8003 6916 6838 0 
  0 0 0 0 frame_0..5_8..11 # Frame 0
30 0 speed
30 1 speed
30 2 speed
30 3 speed
30 4 speed
15 0 acceleration
15 1 acceleration
15 2 acceleration
15 3 acceleration
15 4 acceleration
  800 8275 frame_1 # delai
  500 8042 7187 7265 7382 8391 frame_0..4 # Frame 2
  500 8857 7925 7692 6993 6993 frame_0..4 # Frame 3
  800 delay # delai
120 0 speed
120 1 speed
120 2 speed
120 3 speed
120 4 speed
40 0 acceleration
40 1 acceleration
40 2 acceleration
40 3 acceleration
40 4 acceleration
  200 8547 4469 6061 6022 frame_0..3 # Frame 5
  200 7498 6838 5284 5051 frame_1..4 # Frame 6
  200 5207 5984 5945 6993 frame_1..4 # Frame 7
  200 7809 6760 4935 4430 frame_1..4 # Frame 8
  200 6139 5090 6217 6916 frame_0..2_4 # Frame 9
  200 6488 5401 6566 5479 frame_1..4 # Frame 10
  200 5090 5556 6566 frame_1_3_4 # Frame 11
  200 7770 7265 6644 6993 frame_1..4 # Frame 12
  200 5051 5750 4974 6022 frame_1..4 # Frame 13
  200 7226 4857 7420 6721 frame_1..4 # Frame 14
  200 4508 5284 6333 4741 4935 frame_0..4 # Frame 15
  200 4197 7925 7653 frame_0_1_3 # Frame 16
  200 4663 4508 7265 frame_1_3_4 # Frame 17
  200 4896 6916 frame_2_4 # Frame 18
  200 5673 8042 frame_3_4 # Frame 19
80 0 speed
80 1 speed
80 2 speed
80 3 speed
80 4 speed
15 0 acceleration
15 1 acceleration
15 2 acceleration
15 3 acceleration
15 4 acceleration
  500 8702 7110 4702 frame_1_2_4 # ralentissement
60 0 speed
60 1 speed
60 2 speed
60 3 speed
60 4 speed
  500 6877 5673 4508 frame_1..3 # Frame 21
40 0 speed
40 1 speed
40 2 speed
40 3 speed
40 4 speed
  500 4000 4000 4000 4000 4000 frame_0..4 # Frame 22

50 0 speed
50 1 speed
50 2 speed
50 3 speed
50 4 speed
10 0 acceleration
10 1 acceleration
10 2 acceleration
10 3 acceleration
10 4 acceleration
  return

##########################################################################

sub frame_0..5_8..11
  11 servo
  10 servo
  9 servo
  8 servo
  5 servo
  4 servo
  3 servo
  2 servo
  1 servo
  0 servo
  delay
  return

sub frame_3_4
  4 servo
  3 servo
  delay
  return

sub frame_0..4
  4 servo
  3 servo
  2 servo
  1 servo
  0 servo
  delay
  return

sub frame_2..4
  4 servo
  3 servo
  2 servo
  delay
  return

sub frame_1..4
  4 servo
  3 servo
  2 servo
  1 servo
  delay
  return

sub frame_0..2
  2 servo
  1 servo
  0 servo
  delay
  return

sub frame_3
  3 servo
  delay
  return

sub frame_1
  1 servo
  delay
  return

sub frame_2_4
  4 servo
  2 servo
  delay
  return

sub frame_1_3
  3 servo
  1 servo
  delay
  return

sub frame_0_1
  1 servo
  0 servo
  delay
  return

sub frame_1..3
  3 servo
  2 servo
  1 servo
  delay
  return

sub frame_0
  0 servo
  delay
  return

sub frame_0_4
  4 servo
  0 servo
  delay
  return

sub frame_4
  4 servo
  delay
  return

sub frame_0_3_4
  4 servo
  3 servo
  0 servo
  delay
  return

sub frame_0_2..4
  4 servo
  3 servo
  2 servo
  0 servo
  delay
  return

sub frame_0..3
  3 servo
  2 servo
  1 servo
  0 servo
  delay
  return

sub frame_0_1_3_4
  4 servo
  3 servo
  1 servo
  0 servo
  delay
  return

sub frame_1_3_4
  4 servo
  3 servo
  1 servo
  delay
  return

sub frame_0..2_4
  4 servo
  2 servo
  1 servo
  0 servo
  delay
  return

sub frame_1_2_4
  4 servo
  2 servo
  1 servo
  delay
  return

sub frame_2
  2 servo
  delay
  return

sub frame_2_3
  3 servo
  2 servo
  delay
  return

sub frame_1_2
  2 servo
  1 servo
  delay
  return

sub frame_0_1_3
  3 servo
  1 servo
  0 servo
  delay
  return

sub frame_0_2_3
  3 servo
  2 servo
  0 servo
  delay
  return

sub frame_0_1_4
  4 servo
  1 servo
  0 servo
  delay
  return

sub frame_1_4
  4 servo
  1 servo
  delay
  return

Hello.

You did not mention what product you’re using, but from the code, it looks like you’re referring to one of our Maestro servo controllers. I have moved your thread to the “Servo controllers and servos” section of the forum since it is more appropriate.

Your code is very long and it is not entirely clear to me what “titles” you’re referring to, but I did notice some questions inside of your code, most of which are about the number before calling the delay_seconds or delay_minutes subroutine, i.e.:

2 delay_seconds

That number is a value that gets put on the stack before the named subroutine is called. For example, in the line of code above, a 2 will be put on the stack, then the Maestro will run the delay_seconds subroutine, which in this case looks at the top value of the stack and uses that to set the number of times it cycles through a 1 second loop, resulting a delay that lasts the specified length in seconds.

The other question I saw in your code was asking how buttons work, referring to these subroutines:

sub bouton_1
  6 get_position 500 less_than
  return

sub bouton_2
  7 get_position 500 less_than
  return

The first part of those subroutines (i.e. 6 get_position and 7 get_position) takes a reading of the specified input channel and returns a value between 0 and 1023 for voltages between 0V and 5V, respectively. The second part (i.e. 500 less_than) compares the reading to a threshold value, in this case 500, and returns 1 if the reading is less than the threshold and 0 if it is greater than the threshold. If your buttons are connected as described in the “Attaching Servos and Peripherals” section of the Maestro user’s guide, this means that those subroutines will return 1 if the button is pressed and 0 if it is not.

If that does not answer your question, can you be more specific with your question? Can you also post the simplest complete program that shows the problem you are trying to solve?

Brandon