From 0ef5e931b71f291219f86cb5a8c2c9d6a6b72c0d Mon Sep 17 00:00:00 2001 From: Ceda EI Date: Wed, 30 Jan 2019 23:18:06 +0530 Subject: [PATCH] Add conditional to loop back position after it reaches num_of_notes --- sample.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sample.lua b/sample.lua index 51427c5..e01cf21 100644 --- a/sample.lua +++ b/sample.lua @@ -3,6 +3,9 @@ if position == nil then position = 0 end position = position + 1 +if position > num_of_notes then + position = 1 +end mem.position = position if pin.b then