# Arrays work the same as rings in 3.2?

**URL:** <https://in-thread.sonic-pi.net/t/arrays-work-the-same-as-rings-in-3-2/3705>\
**Category:** Support, Help & Resources\
**Created:** [April 24, 2020, 2:48pm UTC](https://in-thread.sonic-pi.net/t/arrays-work-the-same-as-rings-in-3-2/3705 "2020-04-24T14:48:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mrbombmusic](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/mrbombmusic/32/2282_2.png) [@mrbombmusic](https://in-thread.sonic-pi.net/u/mrbombmusic)\
**Post date:** [April 24, 2020, 2:48pm UTC](https://in-thread.sonic-pi.net/t/arrays-work-the-same-as-rings-in-3-2/3705/1 "2020-04-24T14:48:48Z")

</div>

I am making a video for my students about how to use arrays and rings.  
I made the following example of an array where I was anticipating it to only play each note in the array once and then produce rests as it went through the remaining number of times since this is the behavior I have seen when using arrays in this way

```ruby
21.times do
  play [60, 67, 64, 70, 72, 74, 76].tick
  sleep 0.25
end

```

However, to my surprise, after playing each note once it went back to the beginning of the array and played all the notes again, just like it would if it was a ring.

Is this a new feature to 3.2? Did I miss something?

---

<div class="post-metadata">

**Author:** ![samaaron](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/samaaron/32/7_2.png) [@samaaron](https://in-thread.sonic-pi.net/u/samaaron)\
**Post date:** [April 24, 2020, 2:50pm UTC](https://in-thread.sonic-pi.net/t/arrays-work-the-same-as-rings-in-3-2/3705/2 "2020-04-24T14:50:49Z")

</div>

Yep, this is new in v3.2. See the release notes:

> Calling .tick and .look on a normal array such as [1, 2, 3] will  
> now automatically convert it to a ring first.

> **[Release Tau · sonic-pi-net/sonic-pi](https://github.com/sonic-pi-net/sonic-pi/releases/tag/v3.2.0)**
>
> Version 3.2.0 - 'Tau'
> 28th Feb, 2020
> After a long 2 years without updates, we are threaded with excitement to
> bring you Sonic Pi's first fully independent release. Sam Aaron's work
> on this release ...

Just to be clear, Arrays are still _not_ the same as Rings. Just that calling `.tick` on either works similarly (as arrays are automatically converted to rings first).

---

<div class="post-metadata">

**Author:** ![mrbombmusic](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/mrbombmusic/32/2282_2.png) [@mrbombmusic](https://in-thread.sonic-pi.net/u/mrbombmusic)\
**Post date:** [April 24, 2020, 2:55pm UTC](https://in-thread.sonic-pi.net/t/arrays-work-the-same-as-rings-in-3-2/3705/3 "2020-04-24T14:55:13Z")

</div>

Ok. I figured that’s what it must be.  
Thanks!

---

<div class="post-metadata">

**Author:** ![samaaron](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/samaaron/32/7_2.png) [@samaaron](https://in-thread.sonic-pi.net/u/samaaron)\
**Post date:** [April 24, 2020, 3:09pm UTC](https://in-thread.sonic-pi.net/t/arrays-work-the-same-as-rings-in-3-2/3705/4 "2020-04-24T15:09:11Z")

</div>

If you want to make a clear demonstration of the indexing differences of Arrays and Rings, just use the `[idx]` mechanism for extracting a value at index `idx`.

```ruby
[:a, :b, :c][3] #=> nil
(ring :a, :b, :c)[3] #=> :a   

```
