Can cords be embedded in lists?

I’m trying to code Happy Birthday using a list for notes and another list for beats, everything was going well until I reached the e3 d3 cord. Can cords be included in a list if so how? [:r,:g4,:g4,:a5,:g4,:c5,:e3:d3] doesn’t work…

If cords cannot be included in a list what’s the best way to include a cord?

I get a syntax error
Syntax Error: [buffer 0, line 11]
syntax error, unexpected ‘:’, expecting ‘]’
[Line 11]: birthdayTune=[:r,:g4,:g4,:a5,:g4,:c5,:e3 :d3]

birthday=[:r,:g4,:g4,:a5,:g4,:c5]
#birthdaylenghts is a list of the note duration in the tune
#1 is a crotchet, 0.5 a quaver, 2 a minim,4 a breve
birthdaylengths=[2,0.75,0.25,1,1,1,1]

For a chord in a list of notes just put it in square brackets eg
list = [ :r,:g4,:g4,:a5,:g4,:c5,[:e3,:d3]]

1 Like

Thanks. Let me try that I think that will slove my problem