Transpose a dyad - do I HAVE to use chord

Hi
this appears to be trivial, but why can I not simply transpose a dyad?

use_synth :bass_foundation

live_loop :glt12 do
  tick
  rt = [55, 59]
  trsp = 0
  play rt + trsp
  sleep 0.25
end

Delete +trsp and it works fine; I’m getting tired of always seeing “no implicit conversion of integer into array error”. Maybe I’m spoiled by SC implicit multichannel expansion via an array.

PD-Pi

The problem is that array + integer is not defined in ruby.
use_transpose trsp or with_transpose trsp will fix your code, or:

for n in rt
  play n + trsp
end

(I don’t like implicit conversion)

1 Like

Thanks @Davids-Music-Lab , for n in rt is a good (and clear) workaround

:wink:

PD-Pi