# How do I add a bar to the…

How do I add a bar to the end of a rthm-chain? The add-bar method returns an error.

```(let* ((rch (make-rthm-chain
'test-rch 23
'((((e) e)			; 4 in total
(- s (s) (s) s -)
({ 3 (te) - te te - })
((e.) s))
(({ 3 (te) te (te) })	; what we transition to
({ 3 - te (te) te - })
({ 3 (te) - te te - })
({ 3 (te) (te) te })))
'((((q q)			; the 2/4 bars: 5 total
((q) q)
((q) q)
((q) (s) e.)
(- e e - (e) e))
(({ 3 te+te te+te te+te }) ; what we transition to
(q - s e. -)
(q (s) e.)
(q (s) - s e -)
({ 3 te+te te+te - te te - })))
((((e.) s (e) e (s) e.)	; the 3/4 bars: 4 total
(- e e - (e) e (q))
(- e. s - - +e e - (q))
(q (e.) s (q)))
(({ 3 (te) (te) te+te te+te } (q)) ; what we transition to
(- e. s - (q) (s) - s e -)
({ 3 te+te te } (q) q)
({ 3 - te te te - } (e) e { 3 (te) (te) te }))))
:players '(pno pnol)
:slow-fibonacci t
:activity-curve '(0 1 100 10)
:harmonic-rthm-curve '(0 1 100 3)
:do-sticking t
:do-sticking-curve '(0 1 25 0 50 1 75 0 100 1)
:sticking-curve '(0 0 100 10)
:sticking-repeats '(3 5 7 11 2 7 5 3 13)
:sticking-rthms '(e s. 32 e.)
:split-data '(4 7))))

(create-psps (palette rch))

(make-slippery-chicken
'+mini+
:ensemble '(((pno (piano :midi-channel 1))
(pnol (piano-lh :midi-channel 1))))
:staff-groupings '(2)
:tempo-map '((1 (q 60)))
:set-palette `((set1 ((b2 a4 d5 e5 a5 d6)))
(set2 ((b2 fs3 d4 e4 a4 d5 e5 a5 d6))))
:set-map `((1 ,(loop for i below (num-rthm-seqs rch)
collect (if (evenp i) 'set1 'set2))))
:rthm-seq-palette (palette rch)
:rthm-seq-map rch)

(add-bar rch (make-rthm-seq-bar '((5 8) e e+32 s. +q)))

;;; Output
(midi-play +mini+)			; midi file
(cmn-display +mini+)			; score display
;(lp-display +mini+) ; lilypond display
)
```