COCKOS
CONFEDERATED FORUMS
Cockos : REAPER : NINJAM : Forums
Forum Home : Register : FAQ : Members List : Search :
Prev Previous Post   Next Post Next
Old 04-08-2017, 06:05 PM   #1
CaptnWillie
Human being with feelings
 
Join Date: Dec 2016
Posts: 51
Default Gain Over Time display

Hey guys,

All the help has been tremendous so far, so thanks again. But I have been trying to draw a loudness meter over time for a compressor that I am working on, so I can draw the gain above the threshold over time, similar to meters shown here:

http://www.musictech.net/2016/10/loudness-meters/

but I can't quite figure out how I should do it. I am using Youlean's awesome Cairo framework which is awesome, and I have a class where I do some drawing with rectangles inside a draw function:

Code:
    int i;
            //
            for (i=1; i < 500; i++)
               
            cairo_rectangle (cr, i, top + height / 2, 1, - fabs(rightInput[i]) * 550);
            cairo_set_source_rgba(cr, .5, 0.7, 0, 0.9);
            cairo_fill (cr);
my goal was to make something that will be a slider that will show gain over the last 2 seconds or so as it slides, I was thinking of a shift register, plotting a series of rectangles w the height that slide.
Which I wanted to rectify the signal, plot successive rectangles with a height relative to the magnitude of the signal. This ended up drawing a pseudo waveform that constantly refreshes. As always, if anyone can suggest a good way to draw that would be very appreciated!
CaptnWillie is offline   Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 07:32 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.