Selecting is not working

This is really killing
Scroll down to the last Pdef\kick
The parenth.are placed correctly around the code ,
If I place my cursor outsie the last parenth, the block turns blue ( dracula theme ) ndicating everything is selected
yet SC does not make an accurate execution
If I select them line by line by holding shift , then it works , or double clicking inside the code
Frustrating !



//////Select Synthdefs
(
(
SynthDef(\twoop,
{
|fmamt=2,modoffset=24,moatt=0.001,modrel=0.500,ampatt=0.001,amprel=0.800,pitch=48,outt=0.3,pan=0.2,feed=0.2|
var mod,modenv,ampenv,carr;

		mod=SinOscFB.ar((pitch+modoffset).midicps,feedback:feed)*fmamt;
		modenv=EnvGen.ar(Env.perc(moatt,modrel),doneAction:0);
		ampenv=EnvGen.ar(Env.perc(ampatt,amprel),doneAction:2);
		carr=SinOsc.ar(pitch.midicps,(mod*modenv))*ampenv*outt;
		carr=Pan2.ar(carr,pos:pan);
		Out.ar(0,carr);
}).add
);


///////////////////////

(
SynthDef (\simple,
{
|att=0.001,dec=0.200,mod=500,pitch=0,filterfreq=400,reso=0.5,vol=0.5,pan=0|
var sig,env;

		env=EnvGen.ar(Env([0,1,0],[att,dec],[0,-5]),doneAction:2);
		sig=Pulse.ar(pitch.midicps,mul:0.5)+Saw.ar((pitch+0.2).midicps,mul:0.5);///////I an
		sig=RLPF.ar(sig,filterfreq+(env*mod).clip(40,20000),rq:reso);
		sig=sig*env;
		sig=Pan2.ar(sig,pos:pan);
		Out.ar(0,sig*vol)
}).add
);

///////////
(
SynthDef (\kick,
{
		arg pitch=50,patt=0.001,pdec=0.325,pcurve=(-50),pamt=100,att=0.001,dec=0.700,noisefreq=100,shamt=4,vol=0.3;
		var kick,penv,ampenv,noiseosc;
		penv=EnvGen.ar(Env([0,1,0],[patt,pdec],[0,pcurve]),doneAction:2);
		kick=SinOsc.ar(pitch+(penv*pamt))*0.9;
		noiseosc=LPF.ar(WhiteNoise.ar(0.1),noisefreq);
		kick=(noiseosc+kick)*EnvGen.ar(Env([0,1,0],[att,dec],[0,-5]))!2;
		kick=SineShaper.ar(kick*shamt)*vol;
		kick=HPF.ar(kick,50);
		Out.ar(0,kick);
}).add
);
)

///////Select pdefs
(
(
Pdef(
	\crt,
	Pbind(
		\instrument,
		\twoop,
		\pitch,Pseq([Pseq([30,32]-10,4),Pseq([37,35,47,47]-17,2),Pseq([41,41,41,41,39]-15,2)],inf)+12,
		\dur,Pseq([1/4,1/8,1/4,1/4,1/8,1/4,1/8,1/4],inf),
		\fmamt,Prand([2,10,3,4],inf),
		\modrel,Prand([0.425,0.525,0.500,0.550,1,0.625,0.500,0.5,2.8],inf),
		\modoffset,Prand([12,0,12,24],inf),
		\feed,Pwhite(0.3,0.5,inf),
		\pan,Prand([-0.3,0,0.3],inf),
		\amprel,Pwhite (0.08,0.8,inf),
	)
)
);
///////////////([Pseq([48,72,48,\,60,48,48,48]-10,4),Pseq([48,72,48,\,60,48,48,48]-17,2),Pseq([48,72,48,\,60,48,48,48]-15,2)]
(
Pdef(\zxcv,

	Pbind(\instrument,\simple,
	\dur,Pseq([0.5,1,0.5,0.250]/0.5,inf),
		\pitch,Pseq([[60,65,67],[62,69],[65,58],Pseq([72,69,76],3)],inf)-12,
	\filterfreq,Prand([400,440,600,400,2000,400,900,350,3000],inf),
	\dec,Pseq([0.125,0.125,4.125,0.7,0.25],inf),
	\att,Pseq([0.001,0.1,0.001,0.1,0.001,0.2],inf),
	\reso,Pseq([0.5,0.5,0.5,0.2,0.5,0.5,0.5],inf),
	\vol,Pseq([0.1,0.2],inf),
	\pan,Pseq([-0.3,1,0,0.3,1],inf),
	)
));

///////////
(
Pdef(\kik,
	Pbind(\instrument,\kick,
		\dur,Pseq([1/2],inf),
		\pitch,Pseq([50,50],inf),
		\pdec,0.6,
		\shamt,Pseq([2,2,2,2],inf),
		\vol,0.8,
))
)

//////////////




Pdef(\zxcv).play;
Pdef(\zxcv).stop;



Pdef(\kik).play;
Pdef(\kik).stop;

Pdef(\crt).stop;///////////FM
Pdef(\crt).play;

You have an extra open-parenthesis here:

///////Select pdefs
(
(
Pdef(
	\crt,

If you place your cursor before the first parenthesis, the rest of the code turns red (or whatever the color is in Dracula theme), indicating there is not a matching parenthesis at the end. Even if you have matching parens in the inner blocks, they will not execute in SCIDE if the outer block doesn’t have matching parens.

I don’t know but here the ensclosure is fine for the pbind everything in parenthesis for easy selection , yet selection gives an error .
It has everything to do with the synthdef above being wip , copy pasting the Pdef in new tab showes it was just fine
So How do I tell supercollider to not look at the (unfinished )block of code above , I assumed that ////was enough

(
SynthDef(\twoop,
{
|fmamt=1,modoffset=24,moatt=0.001,modrel=0.500,ampatt=0.001,amprel=0.800,pitch=48,outt=0.3,pan=0.2,feed=0.2,output=0|
var mod,modenv,ampenv,carr;

		mod=SinOscFB.ar((pitch+modoffset).midicps,feedback:feed)*fmamt;
		modenv=EnvGen.ar(Env.perc(moatt,modrel),doneAction:0);
		ampenv=EnvGen.ar(Env.perc(ampatt,amprel),doneAction:2);
		carr=SinOsc.ar(pitch.midicps,(mod*modenv))*ampenv*outt;
		carr=Pan2.ar(carr,pos:pan);
		Out.ar(bus:output,carr);
}).add
);
/////////
SynthDef(\Revv,
	{ |input,ouput|
		
	///////////////////////


(
Pdef(
	\crt,
	Pbind(
		\instrument,
		\twoop,
		\pitch,Pseq([40,42,47,[45,52],37,34,31,28],inf),
		\dur,Pseq([1/2,1,1/2,1/4,1/4,1/4,1/4],inf),
		\fmamt,Prand([2,1,3,4],inf),
		\modrel,Prand([0.425,0.525,0.500,0.550,1,0.625,0.500,0.5,2.8],inf),
		\modoffset,Prand([12,0,12,24],inf),
		\feed,Pwhite(0.3,0.5,inf),
		\pan,Prand([-0.3,0,0.3],inf),
		\amprel,Pwhite (0.08,0.5,inf),
		\output,0,
		)
		)
)
////////////////////			


Pdef(\crt).stop;///////////FM
Pdef(\crt).play(t);
t=TempoClock(175/60)

Select the code block & press shift + enter. Might be different for different OS’s… you can change it in the Shortcuts menu.

There is no way. You don’t have to finish it but you do have to close the open brackets. For good or ill, the IDE is strict about this.

A different editor would have different interaction rules. Maybe one of them is more chill about this feature.

That’s a nice guess, but unfortunately slashes aren’t used that way in the IDE.

hjh