Advertisement
Guest User

Untitled

a guest
Jul 21st, 2019
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. function init()
  2. input[1].mode('change') --default event for change is send over serial
  3.  
  4. for c=1, 4 do
  5. output[c].asl:action()
  6. end
  7. end
  8.  
  9. input[1].change = function(v)
  10. if v == 1 then
  11. output[1].asl:action('restart')
  12. else
  13. output[1].asl:action(false)
  14. end
  15. end
  16.  
  17. II.pullup(1)
  18.  
  19. output[1].action =
  20. { function() output[2].asl:action('restart') end
  21. , held{ loop{ toward(5, .05, 'sine')
  22. ,toward(3, .05)
  23. ,function() II.jf.trigger(6,1) end
  24. }}
  25. , function() II.jf.trigger( 2, 1 ) end
  26. , toward(0, .3, 'linear')
  27. }
  28.  
  29. output[2].action =
  30. { toward(10, 0.0)
  31. ,toward(0, 0.2)
  32. }
  33.  
  34. init()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement