How can I get the current position of the current ring, so I can use it in a different ring? In this example the tick position is 0 (corresponding to E4). Is there any “get ring index” function?
For clarity, it’s important to note that .tick does not increment an index for a given ring, it increments an index for the current live_loop. This is an important but subtle distinction
To look at the current value of a tick just call look or to look up the current tick value in a ring without incrementing the tick call .look.
Ticks are thread local, not scope or method local. So if both loop_name and loop_name2 are called within the same thread, the same tick will be incremented twice. Ticks belong to threads/live_loops.
If you wish to have more than two ticks running in parallel in the same live loop, then you need to give them different names. This is as simple as putting the name in () after you write tick:
# this will tick both notes
# and notes2 independently:
notes.tick(:foo)
notes2.tick(:bar)