Old 10-31-2017, 09:27 AM   #1
Chain
Human being with feelings
 
Join Date: May 2017
Location: Italy
Posts: 19
Default @Gfx section... (need help)

I was wondering how to use the gfx section...
i tried to code the graphix of an amp envelope....
so i typed:
@gfx
gfx_w=10;
gfx_h=5;
gfx_x=Attack;
gfx_y=Decay;
gfx_lineto(x,y,aa)
but i only get a big black window... and no line...
i also tried to change the values of gfx_w and gfx_h with bigger and smaller numbers but no sucess....
then i tried this...
@gfx
gfx_w=1000;
gfx_h=500;
gfx_x=Attack;
gfx_y=Decay;
gfx_lineto(gfx_x,gfx_y,aa)
what is the aa refering to?
i know that allasing is the nyquist thing.. but i only know it from audio...
not graphics...
actually i have more then 2 points in my envelope.... there is also the sustain and the release... how do i implement them if i have only gfx_x and gfx_y?
can someone point me to the right direction?
is there a way to limit the big black window?
i still have to implement decay and sustain and release... but attack is working fine....
__________________
Instrested in everything!! Hit me up!!
Chain is offline   Reply With Quote
Old 10-31-2017, 10:58 AM   #2
Tale
Human being with feelings
 
Tale's Avatar
 
Join Date: Jul 2008
Location: Holland
Posts: 2,893
Default

Quote:
Originally Posted by Chain View Post
but i only get a big black window... and no line...
I think you need to define the color i.e.:

Code:
@gfx
gfx_r = 1; // Red
gfx_g = 0.5; // Green
gfx_b = 0; // Blue
gfx_a = 1; // Alpha
gfx_line(10, 10, 300, 200, 1);
Quote:
Originally Posted by Chain View Post
what is the aa refering to?
Setting it to 1 will draw a smooth line, 0 will draw a ragged line; the latter probably is faster but uglier.
Tale is offline   Reply With Quote
Old 10-31-2017, 03:04 PM   #3
Chain
Human being with feelings
 
Join Date: May 2017
Location: Italy
Posts: 19
Default Thanks

I managed to draw the line... now i just need to figure out how to connect those with each other... thanks!!!
__________________
Instrested in everything!! Hit me up!!
Chain is offline   Reply With Quote
Reply

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 04:35 AM.


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