Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: JScript Panel script discussion/help (Read 524103 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: JScript Panel script discussion/help

Reply #1750
@LauraQ
Maybe you should read the thread a bit more and play around with the options.
SHURE SRH1840, SENNHEISER HD660S2, SENNHEISER HD620S, SENNHEISER HD 490 Pro Plus, beyerdynamic DT 1990 PRO, HiFiMAN Edition XS, HIFIMAN ANANDA, Bowers & Wilkins P7, FiiO FT5, FiiO FT1 Pro, 水月雨 (MOONDROP) 空鳴 - VOID, SONY WH1000XM5 (made a Upgrade/Balanced Cable by myself)


Re: JScript Panel script discussion/help

Reply #1752
This playlist manager is bundled with the component itself ....

https://jscript-panel.github.io/gallery/smooth-playlist-manager/

is better looking without weird yellow/red bits, obeys your UI colours by default and has a whole bunch of features detailed below the image on that page.

But the item count is not optional.

Re: JScript Panel script discussion/help

Reply #1753
This playlist manager is bundled with the component itself ....

https://jscript-panel.github.io/gallery/smooth-playlist-manager/

is better looking without weird yellow/red bits, obeys your UI colours by default and has a whole bunch of features detailed below the image on that page.

But the item count is not optional.

it looks nice but i dont see the link to download it :(

Re: JScript Panel script discussion/help

Reply #1754
I said it was bundled with the component. Open the configuration window>click the samples button.

Re: JScript Panel script discussion/help

Reply #1755
I said it was bundled with the component. Open the configuration window>click the samples button.

oh, sorry... ok I have find it but isn't so good for me.

since you are so kind I ask you another favor
I have the old foobar2000 interface, with some tabs at the top (lyrics, playlist, cover) and at the bottom the list of what to buy when I click on one of my playlists.
The songs at the bottom appear like this:
Artist name - Song title

I don't want any more info because I have them all at the top.
The only thing I would like, if possible, is to have some stars next to them that I can turn on based on the vote I give to the song and that, obviously, must be stored in some file.
Is this possible or is it science fiction? :)

I have see that, in the sample, jscript have Rating voice but I can only put a new tab and not put them next to the song titles :(

Re: JScript Panel script discussion/help

Reply #1756
Reply #1748 By: marc2k3
https://hydrogenaud.io/index.php/topic,110499.msg1049256.html#msg1049256

rainbow_stops = [
   [ 0.0, RGB(180, 220, 255) ],
   [ 0.33, RGB(45, 170, 255) ],
   [ 0.66, RGB(5, 71, 219) ],
   [ 1.0, RGB(0, 16, 93) ],
];
init();

JSP3 VU Meter - Blue

rainbow_stops = [
   [ 0.0, RGB(151, 196, 199) ],
   [ 0.33, RGB(62, 160, 180) ],
   [ 0.66, RGB(31, 80, 89)],
   [ 1.0, RGB(11, 27, 31) ],
];

JSP3 VU Meter - Green

SHURE SRH1840, SENNHEISER HD660S2, SENNHEISER HD620S, SENNHEISER HD 490 Pro Plus, beyerdynamic DT 1990 PRO, HiFiMAN Edition XS, HIFIMAN ANANDA, Bowers & Wilkins P7, FiiO FT5, FiiO FT1 Pro, 水月雨 (MOONDROP) 空鳴 - VOID, SONY WH1000XM5 (made a Upgrade/Balanced Cable by myself)

Re: JScript Panel script discussion/help

Reply #1757
Reply #1748 By: marc2k3
https://hydrogenaud.io/index.php/topic,110499.msg1049256.html#msg1049256

rainbow_stops = [
   [ 0.0, RGB(180, 220, 255) ],
   [ 0.33, RGB(45, 170, 255) ],
   [ 0.66, RGB(5, 71, 219) ],
   [ 1.0, RGB(0, 16, 93) ],
];
init();

JSP3 VU Meter - Blue

Thanks Air KEN for the Blue stops! Here is the marc2k3 4-bar for you using that scheme.  Original stops are commented out so you can revert:

Code: [Select]
// ==PREPROCESSOR==
// @name "VU Meter"
// 4 color bars
// @author "ilovefb2k + Case + marc2003"
// @import "%fb2k_component_path%helpers.txt"
// ==/PREPROCESSOR==

var timer_interval = 60; //ms
var timer_id = 0;

var font = CreateFontString("Segoe UI", 8);
var ww = 0, wh = 0;

var minDB = -60;
var RMS_level1 = RMS_level2 = Peak_level1 = Peak_level2 = prev_time = 0;

//var stops = [
// [ 1.0, RGB(227, 9, 64) ],
// [ 0.66, RGB(231, 215, 2) ],
// [ 0.33, RGB(15, 168, 149) ],
// [ 0.0, RGB(19, 115, 232) ]
//];

var stops = [
   [ 0.0, RGB(180, 220, 255) ],
   [ 0.33, RGB(45, 170, 255) ],
   [ 0.66, RGB(5, 71, 219) ],
   [ 1.0, RGB(0, 16, 93) ],
];

var brush = {
Stops : stops,
Start : [0, 0], // x and y values
End : [0, 0], // x and y values
};
var brush_str = "";

var colours = {
text : 0,
background : 0,
};

update_colours();
if (fb.IsPlaying) start_timer();

function update_colours() {
if (window.IsDefaultUI) {
colours.text = window.GetColourDUI(ColourTypeDUI.text);
colours.background = window.GetColourDUI(ColourTypeDUI.background);
} else {
colours.text = window.GetColourCUI(ColourTypeCUI.text);
colours.background = window.GetColourCUI(ColourTypeCUI.background);
}
}

function to_db(num) {
var ret = (2000 * Math.log(num) / Math.LN10 / 100);
return clamp(ret, minDB, 0);
}

function clamp(value, min, max) {
if (value < min) return min;
if (value > max) return max;
return value;
}

function start_timer() {
if (timer_id)
return;

timer_id = window.SetInterval(function() {
var cur_time = fb.PlaybackTime;
if (cur_time) {
var chunk = fb.GetAudioChunk(cur_time - prev_time);
if (chunk) {
prev_time = cur_time;
var data = chunk.Data.toArray();
if (data) {
var ch_count = chunk.ChannelCount;
var frame_len = chunk.SampleCount;
var ch2_idx = 1;
if (ch_count < 2) ch2_idx = 0;
var sum1 = 0;
var sum2 = 0;
var peak1 = 0;
var peak2 = 0;
for (var i = 0; i < data.length; i += ch_count) {
  var l = data[i];
  var r = data[i + ch2_idx];
  if (l > peak1) peak1 = l;
  if (r > peak2) peak2 = r;
  sum1 += l * l;
  sum2 += r * r;
}
RMS_level1 = Math.sqrt(sum1/frame_len);
RMS_level2 = Math.sqrt(sum2/frame_len);
Peak_level1 = peak1;
Peak_level2 = peak2;
}
}
}
window.Repaint();
}, timer_interval);
}

function stop_timer(clear) {
if (timer_id)
window.ClearInterval(timer_id);

timer_id = 0;

if (clear)
clear_meter();
}

function clear_meter() {
RMS_level1 = RMS_level2 = Peak_level1 = Peak_level2 = prev_time = 0
window.Repaint();
}

function FillRectangle(gr, x, y, w, h) {
var db = to_db(w);
var rw = Math.round(ww * ((100 + db) / 65 - 40 / 65));
gr.FillRectangle(x, y, rw, h - 1, brush_str);
}

function on_colours_changed() {
update_colours();
window.Repaint();
}

function on_paint(gr) {
gr.FillRectangle(0, 0, ww, wh, colours.background);

var h = 20;
var VU_x = 20;;
var VUy = 5;
var VUw = ww - 20;

var yL = VUy + h;
var yLM = VUy + (h * 2);
var yRM = VUy + (h * 3);
var yR = VUy + (h * 4);

// labels
gr.WriteTextSimple("FL", font, colours.text, 0, yL, VU_x, h, 2, 2);
gr.WriteTextSimple("FL", font, colours.text, 0, yLM, VU_x, h, 2, 2);
gr.WriteTextSimple("FR", font, colours.text, 0, yRM, VU_x, h, 2, 2);
gr.WriteTextSimple("FR", font, colours.text, 0, yR, VU_x, h, 2, 2);

var label_width = (ww - VU_x) / 13;
var labels = [-60, -55, -50, -45, -40, -35, -30, -25, -20, -15, -10, -5, 0];
labels.forEach(function (label, i) {
gr.WriteTextSimple(label + "dB", font, colours.text, 10 + (i * label_width), yR + h + 10, label_width, h);
});
gr.DrawLine(VU_x, yR + h + 5, ww - VU_x, yR + h + 5, 1, colours.text);

// bars
FillRectangle(gr, VU_x, yLM, RMS_level1, h);
FillRectangle(gr, VU_x, yRM, RMS_level2, h);
FillRectangle(gr, VU_x, yL, Peak_level1, h);
FillRectangle(gr, VU_x, yR, Peak_level1, h);
}

function on_playback_new_track(handle) {
start_timer();
}

function on_playback_pause(state) {
state ? stop_timer() : start_timer();
}

function on_playback_stop(reason) {
if (reason != 2) {
stop_timer(true);
}
}

function on_size() {
ww = window.Width;
wh = window.Height;

brush.End = [ww, 0];
brush_str = JSON.stringify(brush);
}


Re: JScript Panel script discussion/help

Reply #1759
@sveakul
Hi.
The 4 color bars type is also cool.
I'm using it right away
Thanks.

@marc2k3
Good idea. Thanks.
If possible, I would also like a Reset Option.
Now, we are initializing "JScript Panel Configuration > Samples > VU Meter" by running.
SHURE SRH1840, SENNHEISER HD660S2, SENNHEISER HD620S, SENNHEISER HD 490 Pro Plus, beyerdynamic DT 1990 PRO, HiFiMAN Edition XS, HIFIMAN ANANDA, Bowers & Wilkins P7, FiiO FT5, FiiO FT1 Pro, 水月雨 (MOONDROP) 空鳴 - VOID, SONY WH1000XM5 (made a Upgrade/Balanced Cable by myself)

Re: JScript Panel script discussion/help

Reply #1760
Reply #1748 By: marc2k3
https://hydrogenaud.io/index.php/topic,110499.msg1049256.html#msg1049256

rainbow_stops = [
   [ 0.0, RGB(180, 220, 255) ],
   [ 0.33, RGB(45, 170, 255) ],
   [ 0.66, RGB(5, 71, 219) ],
   [ 1.0, RGB(0, 16, 93) ],
];
init();

JSP3 VU Meter - Blue

rainbow_stops = [
   [ 0.0, RGB(151, 196, 199) ],
   [ 0.33, RGB(62, 160, 180) ],
   [ 0.66, RGB(31, 80, 89)],
   [ 1.0, RGB(11, 27, 31) ],
];

JSP3 VU Meter - Green



JSP 3 VU Meter - The three primary colors

rainbow_stops = [
    [ 0.0, RGB(109, 255, 204) ],
    [ 0.33, RGB(255, 255, 0) ],
    [ 0.66, RGB(255, 0, 255) ],
    [ 1.0, RGB(255, 0, 0) ],
];
init();

SHURE SRH1840, SENNHEISER HD660S2, SENNHEISER HD620S, SENNHEISER HD 490 Pro Plus, beyerdynamic DT 1990 PRO, HiFiMAN Edition XS, HIFIMAN ANANDA, Bowers & Wilkins P7, FiiO FT5, FiiO FT1 Pro, 水月雨 (MOONDROP) 空鳴 - VOID, SONY WH1000XM5 (made a Upgrade/Balanced Cable by myself)

Re: JScript Panel script discussion/help

Reply #1761
I said it was bundled with the component. Open the configuration window>click the samples button.

I'm learning to use your program and it's FANTASTIC!

I wanted to ask you two things, I added the cover, but it bothers me that when I go over it with the mouse a text with the path appears, is it possible not to make it appear?

Then, I saw that there is the rating script which is beautiful. Could we also add artist song title?
So as to see only:

Artist - Songtitle xxxxx (stars)

Is it possible?

Re: JScript Panel script discussion/help

Reply #1762
If possible, I would also like a Reset Option.

Not specific to the VU meter but for any panel that stores persistent settings: Hold shift+win key together. Right click panel>Clear properties.

I wanted to ask you two things, I added the cover, but it bothers me that when I go over it with the mouse a text with the path appears, is it possible not to make it appear?

Open the configuration window, add this code at the start

Code: [Select]
function _tt() {}

As for rating, there is no existing option but tooltips show the selected aritst/title when you hover your mouse over it.

The next release is going to contain a combined Text Display + Album Art + Rating like this.



Like the current rating script, you can choose between Playback Statistics (foo_playcount) or writing file tags.


Re: JScript Panel script discussion/help

Reply #1763
orange to red gradient VU meter colors

Code: [Select]
rainbow_stops = [
[ 1.0, RGB(255, 0, 0) ],
[ 0.66, RGB(255, 60, 1) ],
[ 0.33, RGB(255, 128, 0) ],
[ 0.0, RGB(255, 160, 75) ]
];

how do you get it to show the full bars for screenshots have a tone that peaks or?
PC - Teac UD-505 - Adam Audio A4V + Sub7 - DCA ÆON Open X - TinHifi P1 Max.
Samsung S23 Ultra 512GB - Galaxy Buds3 Pro.

Re: JScript Panel script discussion/help

Reply #1764
orange to red gradient VU meter colors

Code: [Select]
rainbow_stops = [
[ 1.0, RGB(255, 0, 0) ],
[ 0.66, RGB(255, 60, 1) ],
[ 0.33, RGB(255, 128, 0) ],
[ 0.0, RGB(255, 160, 75) ]
];

how do you get it to show the full bars for screenshots have a tone that peaks or?
Keep the custom rainbow stops you added if you want the orange tones
Colors:  custom, rainbow
Meter Style:  smooth

That's with the JPS3 3.6.9 meter, may have changed with 3.6.10

Re: JScript Panel script discussion/help

Reply #1765
@marc2k3
Hi.

Reply #1760: https://hydrogenaud.io/index.php/topic,110516.msg1049320.html#msg1049320

I would like to use the color change of the JSP 3 VU Meter bar in Minimal Seekbar. Thank you in advance.
(To be able to choose the color)
SHURE SRH1840, SENNHEISER HD660S2, SENNHEISER HD620S, SENNHEISER HD 490 Pro Plus, beyerdynamic DT 1990 PRO, HiFiMAN Edition XS, HIFIMAN ANANDA, Bowers & Wilkins P7, FiiO FT5, FiiO FT1 Pro, 水月雨 (MOONDROP) 空鳴 - VOID, SONY WH1000XM5 (made a Upgrade/Balanced Cable by myself)

Re: JScript Panel script discussion/help

Reply #1766
orange to red gradient VU meter colors

Code: [Select]
rainbow_stops = [
[ 1.0, RGB(255, 0, 0) ],
[ 0.66, RGB(255, 60, 1) ],
[ 0.33, RGB(255, 128, 0) ],
[ 0.0, RGB(255, 160, 75) ]
];

how do you get it to show the full bars for screenshots have a tone that peaks or?
Keep the custom rainbow stops you added if you want the orange tones
Colors:  custom, rainbow
Meter Style:  smooth

That's with the JPS3 3.6.9 meter, may have changed with 3.6.10



that makes no sense.
PC - Teac UD-505 - Adam Audio A4V + Sub7 - DCA ÆON Open X - TinHifi P1 Max.
Samsung S23 Ultra 512GB - Galaxy Buds3 Pro.

Re: JScript Panel script discussion/help

Reply #1767
If you want to fake a full bar, add this to your panel temporarily.

Code: [Select]
function to_db() {
    return Math.random();
}

 

Re: JScript Panel script discussion/help

Reply #1768
perfect, thanks Marc  8)
PC - Teac UD-505 - Adam Audio A4V + Sub7 - DCA ÆON Open X - TinHifi P1 Max.
Samsung S23 Ultra 512GB - Galaxy Buds3 Pro.

Re: JScript Panel script discussion/help

Reply #1769
If possible, I would also like a Reset Option.

Not specific to the VU meter but for any panel that stores persistent settings: Hold shift+win key together. Right click panel>Clear properties.

I wanted to ask you two things, I added the cover, but it bothers me that when I go over it with the mouse a text with the path appears, is it possible not to make it appear?

Open the configuration window, add this code at the start

Code: [Select]
function _tt() {}

As for rating, there is no existing option but tooltips show the selected aritst/title when you hover your mouse over it.

The next release is going to contain a combined Text Display + Album Art + Rating like this.



Like the current rating script, you can choose between Playback Statistics (foo_playcount) or writing file tags.


thanks for the help

I created my own skin that I really like and I don't want to change it :)

I use Columns UI, I created a Horizontal splitter - Tab task - JScript Panel 3. Click on Configure - Sample and I have select Text Display
After I have edited the script and put

function _tt() {}

under

// https://jscript-panel.github.io/gallery/text-display/

but nothing has changed :(



You're next release is very good but fom me that I hate black color and horizontal still, I prefer my ^_^




Re: JScript Panel script discussion/help

Reply #1770
and this is how I dream it could become. I pasted the rating stars where I would like them to be. Obviously nobody likes my idea but I wanted to say it  O:)
And sorry for the space taken up, I didn't understand how to make the photos smaller



Re: JScript Panel script discussion/help

Reply #1771
I don't like bright colors for the VU Metter.

This is my script:

Code: [Select]
rainbow_stops = [
   [ 0.003, RGB(255, 0, 0) ],
   [ 0.003, RGB(15, 15, 15) ],
   [ 0.66, RGB(210, 210, 210) ],
   [ 1.0, RGB(255, 0, 0) ],
];
I would like to be able to remove the red bars on the left side.

Re: JScript Panel script discussion/help

Reply #1772
orange to red gradient VU meter colors

Code: [Select]
rainbow_stops = [
[ 1.0, RGB(255, 0, 0) ],
[ 0.66, RGB(255, 60, 1) ],
[ 0.33, RGB(255, 128, 0) ],
[ 0.0, RGB(255, 160, 75) ]
];

how do you get it to show the full bars for screenshots have a tone that peaks or?
Keep the custom rainbow stops you added if you want the orange tones
Colors:  custom, rainbow
Meter Style:  smooth

That's with the JPS3 3.6.9 meter, may have changed with 3.6.10

that makes no sense.
Whether it makes sense or not, attached are the menu settings that show a "full bar with a tone that peaks", using a modified rainbow_stops addition to the config file.  I may be misinterpreting your question "how do you get it to show the full bars for screenshots have a tone that peaks or?".  Telling me what did or didn't happen would be more useful than "that makes no sense."  I see marc2k3 has given you a one-line full-bar 'fake" by all means use that I'm a rank amateur but I try.




BTW, how to make the posted images smaller:



Re: JScript Panel script discussion/help

Reply #1773

you don't get it at all dude that is NOT what I was asking for. Marc also already gave the right help.
PC - Teac UD-505 - Adam Audio A4V + Sub7 - DCA ÆON Open X - TinHifi P1 Max.
Samsung S23 Ultra 512GB - Galaxy Buds3 Pro.

Re: JScript Panel script discussion/help

Reply #1774
I don't like bright colors for the VU Metter.

This is my script:

Code: [Select]
rainbow_stops = [
   [ 0.003, RGB(255, 0, 0) ],
   [ 0.003, RGB(15, 15, 15) ],
   [ 0.66, RGB(210, 210, 210) ],
   [ 1.0, RGB(255, 0, 0) ],
];
I would like to be able to remove the red bars on the left side.

> I would like to be able to remove the red bars on the left side.
You state it yourself in the first line.
>   [ 0.003, RGB(255, 0, 0) ],

Basically it's weird.
SHURE SRH1840, SENNHEISER HD660S2, SENNHEISER HD620S, SENNHEISER HD 490 Pro Plus, beyerdynamic DT 1990 PRO, HiFiMAN Edition XS, HIFIMAN ANANDA, Bowers & Wilkins P7, FiiO FT5, FiiO FT1 Pro, 水月雨 (MOONDROP) 空鳴 - VOID, SONY WH1000XM5 (made a Upgrade/Balanced Cable by myself)