Pixel or line choice

For a project I want to mimic the little ‘output’ graph that appears in the Apple Music app on the current track. First I thought that it responds to levels in the track but it doesn’t, it just randomly shows moving bars, though very fluid.

My initial idea was to use three different timers that each build a bar according to a random height. Wat is the best way to doe this. Drawing the individual bars myself or use Line with a thickness of say 3 pixels?

Sub Paint(g As Graphics, areas() As REALbasic.Rect) // Window dim micro as double = Microseconds g.PenWidth = 3 for rounds as integer = 1 to 10 for i as integer = 0 to self.width step 3 G.DrawLine (i, 0, i, g.Height ) next next system.DebugLog "Line "+str(Microseconds-micro) micro = Microseconds g.ForeColor = &c00800000 for rounds as integer = 1 to 10 for i as integer = 0 to self.width step 3 G.FillRect(i,0,3,g.height) next next system.DebugLog "fillrect "+str(Microseconds-micro) End Sub

11:52:08 AM
Line 27875.88
fillrect 24905.39
11:52:31 AM
Line 19805.59
fillrect 10724.85
11:52:32 AM
fillrect 8311.232
Line 6070.488
11:52:32 AM
fillrect 7240.855
Line 6106.027
11:52:32 AM
fillrect 5987.665
Line 6007.844
fillrect 5859.967
Line 5247.979
fillrect 4325.479
11:52:32 AM
Line 5853.04
fillrect 4717.308

FillRect seems faster after a few runs.

Wow. You had that code handy I guess :slight_smile:

Thanks