Sending MIDI CC via Ndef

Hello, is it possible to send MIDI CC using server side (Ndef) ?
I would like to use some noise generators to control paramaters value of my external hardware unit, for example:

(
Ndef(\zzz, {

var ctrl;

ctrl  = LFDNoise3.kr(1).range(70, 127) ;   // sending that to MIDI CC number 7 ???

}).play;
)

It would be extremely convenient for my work
Thanks a lot !

From similar questions in the past – and not from my own experience, beware – i believe you have to send the data back to the client first. The server only speaks to the client.

See e.g. SendReply | SuperCollider 3.11.1 Help

It may appear a bit cumbersome at first, but then you have all the flexibility the client offers (filtering, throttling, delaying, usw.), so it’s worth the effort.

Cheers,
eddi
https://alln4tural.bandcamp.com

simple example using a control rate bus together with a Tdef.

s.boot

(
MIDIClient.init;
m= MIDIOut(0);
b.free; b= Bus.control(s);
)

(
Ndef(\zzz, {
	LFDNoise3.kr(1).range(70, 127) ;
}).setBus(b);
Tdef(\zzzOutputMidi, {loop{m.control(0, 7, b.getSynchronous.round.asInteger.postln); 0.1.wait}}).play;
)