17 mensajes Página 1 de 1
Another change in Example of BassDLL. :awesome-1417754492: This time, I have included a Gradient LED Meter, to get a better appearance.
These bars of LED meter are standard image objects.

Imagen

Contenido Oculto: ON
	<br />Usted necesita responder en este tema para ver el contenido oculto.
sexy thing! :)

Notes:

Tblpeak = {};
bar = 3;--what use does it have this variable?
mpl = 2;--what use does it have this variable?
mpr = 2;--what use does it have this variable?
local pbar = "";
for x=1,26 do--witdh of one col audio bass-meter
        pbar = pbar.."|";
        Tblpeak[x] = pbar;
end

Tblsize = {};
local sizebar = 150;--height of one col audio bass-meter
for x=1,150 do--same question
        Tblsize[x] = sizebar;
        sizebar = sizebar - 1;
end


TblpeakT = {};
local barT = "|";
TblpeakT[1] = barT;
for x=2,26 do--start from 2 up to the maximum witdh of a col audio bass-meter
        barT = " "..barT;
        TblpeakT[x] = barT;
end
Page.StartTimer(75,60);

 
Parsed in 0.004 seconds, using GeSHi 1.0.8.9
thanks!!!
observando Gracias
COMPARTE LA INFORMACIÓN, NO TE LA GUARDES.
this line initializes the variable bar,
bar = 3;
Parsed in 0.002 seconds, using GeSHi 1.0.8.9

to be used on this code:
Image.SetSize("Image"..bar, 26, Tblsize[img_peakl]);
Image.SetSize("Image"..bar+5, 26, Tblsize[img_peakr]);
bar = bar + 1;
Parsed in 0.002 seconds, using GeSHi 1.0.8.9

Note that the variable named BAR determines through concatenation, which image will have changed size!
In each of the repeat cycle timer, the image to be changed will be the next image, until activate this code:
if bar > 7 then
                bar = 3;       
end    
Parsed in 0.002 seconds, using GeSHi 1.0.8.9


This code is used to create the strings useds on Label LED Meter:
for x=1,26 do--witdh of one col audio bass-meter
        pbar = pbar.."|";
        Tblpeak[x] = pbar;
end
 
Parsed in 0.002 seconds, using GeSHi 1.0.8.9


This code I could have done better. Instead of creating a table with 150 positions, I could have simply made an arithmetic operation within the timer.

Tblsize = {};
local sizebar = 150;--height of one col audio bass-meter
for x=1,150 do--same question
        Tblsize[x] = sizebar;
        sizebar = sizebar - 1;
end
Parsed in 0.002 seconds, using GeSHi 1.0.8.9


The right would be this:
        local img_peakl = 150 - (Math.Round((level.Left/32768)*150, 0));
        local img_peakr = 150 - (Math.Round((level.Right/32768)*150, 0));
        if img_peakl < 1 then
                img_peakl = 1;
        end
        if img_peakr < 1 then
                img_peakr = 1;
        end
       
        Image.SetSize("Image"..bar, 26, img_peakl);
        Image.SetSize("Image"..bar+5, 26, img_peakr);
        bar = bar + 1;
Parsed in 0.002 seconds, using GeSHi 1.0.8.9

Without use the table Tblsize.
gracias
sapollll
Checando...
viendo que traes y respondiendo
muy bueno
viendo que traes y respondiendo
viendo que traes y respondiendo
:friends: cam on ban rat nhieu
great share
Gracias! :awesome-1417754492: :awesome-1417754492:
Chekando
thanksssssssss
17 mensajes Página 1 de 1

¿Quién está conectado?

Usuarios navegando por este Foro: No hay usuarios registrados visitando el Foro y 4 invitados