# "if metro" invalid input on Cabbage sequencer

**URL:** <https://forum.cabbageaudio.com/t/if-metro-invalid-input-on-cabbage-sequencer/5010>\
**Category:** Csound Noobs\
**Created:** [26 April 2026 10:50 UTC](https://forum.cabbageaudio.com/t/if-metro-invalid-input-on-cabbage-sequencer/5010 "2026-04-26T10:50:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![G00SEY\_LUCY](https://forum.cabbageaudio.com/letter_avatar_proxy/v4/letter/g/b9bd4f/32.png) [@G00SEY\_LUCY](https://forum.cabbageaudio.com/u/G00SEY_LUCY)\
**Post date:** [26 April 2026 10:50 UTC](https://forum.cabbageaudio.com/t/if-metro-invalid-input-on-cabbage-sequencer/5010/1 "2026-04-26T10:50:50Z")

</div>

Hey, I’m following Rory Walsh’s tutorial on a simple Csound sequencer, 5min in when he pressed play a sequence was generated but when I pressed play it was saying “if metro“ was an invalid input. Did i write it wrong or is there an alternative I could use? Any help would be appreciated, thank you!!

; Initialize the global variables.  
gkNotes init 32  
gkNotesCat init 8

instr SEQUENCER

```csound
Kcnt init 0
kNoteIndex init 0 

while Kcnt < 8 do
gkNotes[Kcnt] = 60+Kcnt
Kcnt+=1
od

if metro[1] == 1 then
event "i", "SYNTH", 0, .5, gkNotes[kNoteIndex]
kNoteIndex = kNoteIndex<6 7 kNoteIndex+1 : 0

endif 

```

endin

instr SYNTH  
a1 expon 1, p3, 0.01  
aOut oscili, a1, cpsmidinn(p4)  
out aOut_chnget:k(“gain”), aOut_chnget:k(“gain”)

endin

;causes Csound to run for about 7000 years... f0 z ;starts instrument 1 and runs it for a week i "SEQUENCER" 0 [60\*60\*24\*7]

---

<div class="post-metadata">

**Author:** ![rorywalsh](https://forum.cabbageaudio.com/user_avatar/forum.cabbageaudio.com/rorywalsh/32/165_2.png) [@rorywalsh](https://forum.cabbageaudio.com/u/rorywalsh)\
**Post date:** [27 April 2026 10:36 UTC](https://forum.cabbageaudio.com/t/if-metro-invalid-input-on-cabbage-sequencer/5010/2 "2026-04-27T10:36:13Z")

</div>

Hi @G00SEY_LUCY, welcome to the forum. So it should be `metro(1)`, not `metro[1]` 👍

---

<div class="post-metadata">

**Author:** ![G00SEY\_LUCY](https://forum.cabbageaudio.com/letter_avatar_proxy/v4/letter/g/b9bd4f/32.png) [@G00SEY\_LUCY](https://forum.cabbageaudio.com/u/G00SEY_LUCY)\
**Post date:** [29 April 2026 20:01 UTC](https://forum.cabbageaudio.com/t/if-metro-invalid-input-on-cabbage-sequencer/5010/3 "2026-04-29T20:01:44Z")

</div>

Thank you so much!!

I fixed that and some other errors in my original code but now I have “Parsing failed due to syntax errors  
Stopping on parser failure  
cannot compile orchestra“

It doesn’t specify the line in question and I double checked my work to the tutorial, is there anything I’m missing? Here is what I have now

```csound
<Cabbage>
form caption("Mango") size(400, 300), guiMode("queue") pluginId("def1")
rslider bounds(296, 162, 100, 100), channel("gain"), range(0, 1, 0, 1, .01), text("Gain"), trackerColour("lime"), outlineColour(0, 0, 0, 50), textColour("black")

</Cabbage>
<CsoundSynthesizer>
<CsOptions>
-n -d
</CsOptions>
<CsInstruments>
; Initialize the global variables. 
gkNotes[] init 32
gkNotesCat init 8

instr SEQUENCER

Kcnt init 0
kNoteIndex init 0 

while Kcnt < 8 do
gkNotes[Kcnt] = 60+Kcnt
Kcnt+=1
od

if metro(1) == 1 then
event "i", "SYNTH", 0, .5, gkNotes[kNoteIndex]
kNoteIndex = kNoteIndex<6 ? kNoteIndex+1 : 0

endif 

endin

instr SYNTH
a1 expon 1, p3, 0.01
aOut oscili, a1, cpsmidinn(p4)
out aOut\*aOut

endin

</CsInstruments>
<CsScore>
;causes Csound to run for about 7000 years...
f0 z
;starts instrument 1 and runs it for a week
i"SEQUENCER" 0 [60*60*24*7] 
</CsScore>
</CsoundSynthesizer>

```

---

<div class="post-metadata">

**Author:** ![rorywalsh](https://forum.cabbageaudio.com/user_avatar/forum.cabbageaudio.com/rorywalsh/32/165_2.png) [@rorywalsh](https://forum.cabbageaudio.com/u/rorywalsh)\
**Post date:** [30 April 2026 08:28 UTC](https://forum.cabbageaudio.com/t/if-metro-invalid-input-on-cabbage-sequencer/5010/4 "2026-04-30T08:28:09Z")

</div>

> [@G00SEY\_LUCY](#):
>
> `out aOut\*aOut`

Not sure about this code? Btw, I edited and formatted your code, to make it easier to read. Just select the code and hit the `</>` button in the editor 🙂
