SwingOSC – Java-based GUI classes

JSCPeakMeter

Warning: experimental stage, subject to changes!

Note: please use the abstraction layer GUI.peakMeterView if possible! (see GUI). See also JSCView.

s.boot;


(

    w = JSCWindow( "Meter", Rect( 200, 200, 128, 225 ), false );

    b = JSCPeakMeter( w, Rect( 4, 4, 56, 217 ));

    b.bus = Bus( \audio, s.options.numOutputBusChannels, 2, s );

    w.front;

)


b.border = true;

b.border = false;

b.caption = true;

b.caption = false;

b.caption = true;

b.font = JFont( "Eurostile", 11 );

b.font = JFont( "Andale Mono", 13 );

b.captionVisible = false;

b.captionVisible = true;

b.captionPosition = \right;

b.captionPosition = \left;

b.captionPosition = \center;

b.rmsPainted = false;

b.rmsPainted = true;

b.holdPainted = false;

b.holdPainted = true;


b.mouseDownAction = { "Doing!".postln };


b.active = false;

b.active = true;



// check the server metering:

JSCPeakMeter.meterServer( s );


x = { Dust.ar( 1 ! s.options.numOutputBusChannels ) * 0.7 }.play

x.free;


// WARNING:

quitting scsynth while the meters are up are probably ending in confusing in this version. this needs to be fixed soon.