simple sequencer

Home Forums General Programming simple sequencer

Tagged: 

Viewing 3 posts - 161 through 163 (of 163 total)
  • Author
    Posts
  • #81865
    human fly
    Participant
      • Topics: 124
      • Replies: 1070
      • Total: 1194
      • ★★★★

      have found a solution that seems to work.
      not sure i’m entirely happy with what it is doing,
      as it is shifting the index each time it runs, until
      there are no more items and thus it returns nil – at
      which point i get it to regenerate the table, and it
      starts over. no idea what this would do with timing,
      but the result is a kind of ‘active step’, like on
      the volca sequencers.

      function runCallback()
      
      local start = tbl_mods[ 1 ]
      
      if start ==nil then 
      multiselect()	--get current table again
      start = first	--first index in multiselect
      end
      	
      console(String("start="..start))
      
      -- -----------------------------------
      for i,v in ipairs(tbl_mods) do
      tbl_mods[ i ]=tbl_mods[ i+1 ]
      end 	--runs through entire table, moving all index +1, until [ 1 ] is nil
      -- ----------------------------------
      console(String("done")) --marks each timer callback
      	panel:getComponent("display5"):setPropertyString("uiLabelText",""..start)
      end
      • This reply was modified 6 years, 1 month ago by human fly. Reason: typo
      #81868
      human fly
      Participant
        • Topics: 124
        • Replies: 1070
        • Total: 1194
        • ★★★★

        here’s a demo panel

        Attachments:
        You must be logged in to view attached files.
        #81914
        human fly
        Participant
          • Topics: 124
          • Replies: 1070
          • Total: 1194
          • ★★★★

          and here’s the current sequencer, with ‘active step’.
          not quite correct yet because it restarts with any
          button change. panel >

          Attachments:
          You must be logged in to view attached files.
        Viewing 3 posts - 161 through 163 (of 163 total)
        • The forum ‘Programming’ is closed to new topics and replies.
        There is currently 0 users and 71 guests online
        No users are currently active
        Forum Statistics
        Threads: 2,495, Posts: 17,374, Members: 77,605
        Most users ever online was 12 on January 22, 2019 3:47 pm
        Ctrlr