Stop current thread or run

stop  

Stops the current thread or if not in a thread, stops the current run. Does not stop any running synths triggered previously in the run/thread or kill any existing sub-threads.

Introduced in v2.5

Examples

# Example 1

sample :loop_amen
  sleep 0.5
  stop               
  sample :loop_garzul



#=> this sample is played until completion
 
#=> signal to stop executing this run
#=> this never executes



# Example 2

in_thread do
    play 60     
    stop
    sleep 0.5   
    play 72     
  end
  play 80 



 
#=> this note plays
 
#=> this sleep never happens
#=> this play never happens
 
#=> this plays as the stop only affected the above thread



# Example 3


  live_loop :foo
    sample :bd_haus
    sleep 1
    stop              
  end
  live_loop :bar      
    sample :elec_blip
    sleep 0.25
  end



# Stopping live loops
 
 
 
# live loop :foo will now stop and no longer loop
 
# live loop :bar will continue looping