Is it possible to declare multiple synthdef at a once?

(
10.do{ |i|

	SynthDef(\r +'i', { |freq = 440, pan = 1.0|
		var env = EnvGen.kr(Env.perc(0, 0.25));
		var sig = Pulse.ar(freq);
		Out.ar(0, sig);
	}).add
}
)

I need to declare multiple same functions at once.
I think It works, but not working in a supercollider
Is there any tips for declaring same function at once with iteration method?

Two mistakes:

  1. If you want the number from the variable i, then don’t write a symbol 'i'.

  2. The + operator for symbols does not concatenate.

Write it like this: ("r" ++ i).asSymbol.

hjh

I just try different type of the varialbe because Idk how to write it, but anyway it works! thanks!