Thx Rory! That one could be fine.
I only don’t know how to exchange the meter’s oscillator input for the input of the elements input-node.
There is a “slider-style” meter from this forum, which I brought up and running.
But I would love to have a “real” meter display instead of a moving slider.
The one, I’m talking about is this:
form caption("Input Meter Left") size(400, 310), colour(58, 110, 182), pluginID("def1")
vslider bounds(24, 4, 50, 300), channel("meterL"), range(-90, 0, -90, 1, 0.1) trackerinsideradius(0.05) trackeroutsideradius(1)
</Cabbage>
<CsoundSynthesizer>
<CsOptions>
-n -d -+rtmidi=NULL -M0 -m0d
</CsOptions>
<CsInstruments>
; Initialize the global variables.
sr = 44100
ksmps = 8
nchnls = 2
0dbfs = 1
instr 1
aInL inch 1
krms rms aInL ; scan rms
kdb = dbfsamp(krms) ; convert to db
kpeak init -90 ; initialise peak value
if metro(0.5)==1 then ; reset peak hold
kpeak = -90
endif
kpeak = kdb>kpeak?kdb:kpeak ; compare stored peak value with current db value
kpeakP port kpeak, 0.25 ; smooth changes of peak value
if metro(16)==1 then ; peg update of widgets
chnset kdb,"meterL"
endif
endin
</CsInstruments>
<CsScore>
;causes Csound to run for about 7000 years...
f0 z
;starts instrument 1 and runs it for a week
i1 0 [60*60*24*7]
</CsScore>
</CsoundSynthesizer>