# Confused about \`play\_pattern\_timed\`

**URL:** <https://in-thread.sonic-pi.net/t/confused-about-play-pattern-timed/1270>\
**Category:** \[P\] Patreon Support\
**Created:** [June 24, 2018, 6:58pm UTC](https://in-thread.sonic-pi.net/t/confused-about-play-pattern-timed/1270 "2018-06-24T18:58:39Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![emlyn](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/emlyn/32/1460_2.png) [@emlyn](https://in-thread.sonic-pi.net/u/emlyn)\
**Post date:** [June 25, 2018, 8:12am UTC](https://in-thread.sonic-pi.net/t/confused-about-play-pattern-timed/1270/2 "2018-06-25T08:12:07Z")

</div>

I think the documentation is wrong here, I don’t know of a way to make `play_pattern_timed` behave like that. Probably this is how it worked in an old version of Sonic Pi and it was never updated.

However, you can make your own function that does what you want:

```ruby
define :play_timed do |notes, times, **args|
  ts = times.ring
  notes.each_with_index do |note, i|
    play note, **args
    sleep ts[i]
  end
end

play_timed [40, 42, 44, 46], [1, 2, 3], amp: 2

```

This will play each note without altering the individual durations. It’s not exactly like the example though, in that it includes a final sleep after the last note, which I think makes more sense, but if you don’t want that you can change the `sleep` line to:

```ruby
    sleep ts[i] if i != notes.length - 1

```

---

_[View the full topic](https://in-thread.sonic-pi.net/t/confused-about-play-pattern-timed/1270)._
