# Play\_pattern\_timed problems

**URL:** <https://in-thread.sonic-pi.net/t/play-pattern-timed-problems/3495>\
**Category:** General\
**Created:** [March 23, 2020, 12:45am UTC](https://in-thread.sonic-pi.net/t/play-pattern-timed-problems/3495 "2020-03-23T00:45:59Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ko-peInefable](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/ko-peinefable/32/1042_2.png) [@Ko-peInefable](https://in-thread.sonic-pi.net/u/Ko-peInefable)\
**Post date:** [March 23, 2020, 12:45am UTC](https://in-thread.sonic-pi.net/t/play-pattern-timed-problems/3495/1 "2020-03-23T00:45:59Z")

</div>

Hi everyone

I want to use `play_pattern_timed` [“_and put chords here_”], [“_sleep numbers_”]  
I couldn’t find a way to put chords there.  
Can you guide me please

---

<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:** [March 23, 2020, 8:33am UTC](https://in-thread.sonic-pi.net/t/play-pattern-timed-problems/3495/2 "2020-03-23T08:33:51Z")

</div>

> [@Ko-peInefable](#):
>
> `play_pattern_timed` [“ _and put chords here_ ”], [“ _sleep numbers_ ”]

Hi @Ko-peInefable - you’re almost there! Just put chords instead of notes 🙂

```ruby
em = (chord :e, :minor)
c = (chord :c, :major)
gm = (chord :g, :minor)

play_pattern_timed [em, c, gm], [1, 0.5]

```

You can also do this inline:

```ruby
play_pattern_timed [[70, 75, 82], [68, 73, 80], [70, 75, 82]], [1, 0.5]

```

---

<div class="post-metadata">

**Author:** ![Ko-peInefable](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/ko-peinefable/32/1042_2.png) [@Ko-peInefable](https://in-thread.sonic-pi.net/u/Ko-peInefable)\
**Post date:** [March 23, 2020, 11:34am UTC](https://in-thread.sonic-pi.net/t/play-pattern-timed-problems/3495/3 "2020-03-23T11:34:11Z")

</div>

thanks @samaaron

I’m trying to use `knit` to repeat a chord several times but it appears to me as a ring null

> em = (chord :e, :minor)  
> c = (chord :c, :major)
> 
> play\_pattern\_timed [(knit em, 4,c,4)], [(knit 1,4, 0.5,4)]

---

<div class="post-metadata">

**Author:** ![ethancrawford](https://avatars.discourse-cdn.com/v4/letter/e/a88e4f/32.png) [@ethancrawford](https://in-thread.sonic-pi.net/u/ethancrawford)\
**Post date:** [March 23, 2020, 2:01pm UTC](https://in-thread.sonic-pi.net/t/play-pattern-timed-problems/3495/4 "2020-03-23T14:01:17Z")

</div>

Hi @Ko-peInefable,

> [@](#):
>
> I’m trying to use `knit` to repeat a chord several times but it appears to me as a ring null

For me, removing the array brackets around the rings works. Try this:

```ruby
em = (chord :e, :minor)
c = (chord :c, :major)

play_pattern_timed (knit em, 4,c,4), (knit 1,4, 0.5,4)

```

---

<div class="post-metadata">

**Author:** ![nlb](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/nlb/32/997_2.png) [@nlb](https://in-thread.sonic-pi.net/u/nlb)\
**Post date:** [March 24, 2020, 7:31am UTC](https://in-thread.sonic-pi.net/t/play-pattern-timed-problems/3495/5 "2020-03-24T07:31:45Z")

</div>

If you want to add some bass and other stuff

```ruby
em = (chord :e, :minor)

c = (chord :c, :major)

live_loop :chords do
  use_synth :chiplead
  use_synth_defaults delay: 0.25
  
  with_fx :lpf do
    play_pattern_timed (knit em,3,c,2), (knit 1,3, 0.5,2)
  end
end

live_loop :bass do
  use_synth :fm
  use_synth_defaults sustain: 0.1
  use_octave -1
  with_fx :compressor do
play_pattern_timed (knit em[0],2,em[4],1, [c[3], em[2]].tick,3), (knit 1,3, 0.333333,3)
  end
end

live_loop :wwwwwwwaaaaaaaaaa do
  use_synth :prophet
  use_synth_defaults delay: 0.25, amp: 0.5, cutoff: 80
  use_octave -1
  with_fx :echo do
    # play_pattern_timed (knit em[0],2, knit c[5],2), (1)
    play_pattern_timed (knit em[0],2, c[5],1, em[7],1), (1)
  end
end

```

---

<div class="post-metadata">

**Author:** ![Ko-peInefable](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/ko-peinefable/32/1042_2.png) [@Ko-peInefable](https://in-thread.sonic-pi.net/u/Ko-peInefable)\
**Post date:** [March 24, 2020, 11:18pm UTC](https://in-thread.sonic-pi.net/t/play-pattern-timed-problems/3495/6 "2020-03-24T23:18:55Z")

</div>

@samaaron  
thank you very much, now it is much clearer how to use this function

@ethancrawford  
Now yes, I was having a lot of trouble with array brackets

@nlb  
I didn’t know that you could do that. Thanks a lot

---

<div class="post-metadata">

**Author:** ![Eli](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/eli/32/116_2.png) [@Eli](https://in-thread.sonic-pi.net/u/Eli)\
**Post date:** [March 25, 2020, 2:05am UTC](https://in-thread.sonic-pi.net/t/play-pattern-timed-problems/3495/7 "2020-03-25T02:05:05Z")

</div>

Thats pretty cool Nlb… nice to see you posting music again.

I went a different route…

```ruby
em = (chord :e, :minor)
c = (chord :c, :major)
d = (chord :d, :minor)

notes=(knit em, 4,c,4,d, 4,c,4).ring
sleeps=(knit 1,4, 0.5,1,0.5,1,1,4, 0.5,1,0.5,1).ring

live_loop :blade do
  #sync :metro
  use_synth :blade
  play_pattern_timed notes, sleeps * 1.75, amp: 2
end

live_loop :guitar do
  # sync :metro
  use_synth :pluck
  play_pattern_timed notes, sleeps * 2, amp: 2
end

live_loop :background do
  #sync :metro
  use_synth [:dpulse, :pulse].choose
  play_pattern_timed notes, sleeps
 
  use_synth :subpulse
  play_pattern_timed notes, sleeps
  
end

```

Eli…

---

<div class="post-metadata">

**Author:** ![nlb](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/nlb/32/997_2.png) [@nlb](https://in-thread.sonic-pi.net/u/nlb)\
**Post date:** [March 25, 2020, 7:45am UTC](https://in-thread.sonic-pi.net/t/play-pattern-timed-problems/3495/8 "2020-03-25T07:45:43Z")

</div>

hello @Eli  
I think i can help more with technic stuff than music which is more personal preferences. 🙂  
In my example with bass, the idea is to show how to pick one note of a chord with its index.

Using variables is a good point to get more readable code. So your `notes` is indeed chords so `progression_chords` would be more significant no ?  
Cheers
