What about this one. When I play it I don’t see any issues with peaks be misrepresented? Sorry, I don’t have a mic right now because I moved location! But I have a feeling that the update rates really aren’t high-res enough for what you want. Note that the peaks are those which Csound records directly into a table. If Cabbage misses some of these it’s due to the screen res or size of the widget. Can you try changeing the dimensions of the widgets to see if anything improves?
<Cabbage>
form caption("Scrolling waveform") size(400, 300), colour(58, 110, 182), guiresfresh(32), pluginid("def1")
gentable bounds(2, 6, 393, 199), tablenumber(1), fill(0), identchannel("table1")
</Cabbage>
<CsoundSynthesizer>
<CsOptions>
-n -d -+rtmidi=NULL -M0 -m0d
</CsOptions>
<CsInstruments>
; Initialize the global variables.
ksmps = 64
nchnls = 2
0dbfs = 1
opcode ScrollTable, 0, aikiS
setksmps 1
aSig, iTable, kRate, iScrollPoint, SChannel xin
kSig = aSig
kIndex linseg ftlen(iTable), 5, iScrollPoint, 0, iScrollPoint
tabw kSig, kIndex, 1
STableString sprintf "tablenumber(%d)", iTable
kCnt = ftlen(iTable)
if metro(kRate) == 1 then
if kIndex == iScrollPoint then
while kCnt>iScrollPoint do
kSample tab kCnt-1, 1
tabw kSample, kCnt, 1
kCnt-=1
od
endif
chnset STableString, SChannel
endif
endop
instr 1
a1 inch 1
a1 = oscili(1, 200)*tab(phasor:a(1), 2, 1)
;sig table update rate scroll point table channel
ScrollTable a1, 1, 32, 64, "table1"
endin
</CsInstruments>
<CsScore>
f2 0 1024 7 0 256 1 [256*3] 0
f1 0 256 7 0 256 0
;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>