Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER for Video Editing/Mangling

Reply
 
Thread Tools Display Modes
Old 06-09-2024, 11:31 AM   #1
sta
Human being with feelings
 
Join Date: Mar 2024
Posts: 32
Default decorative spectrum analyzer (analyzer hue)

On "analyzer hue" within decorative specturm analyzer you can control the colour..also the 3 knobs below that i think have something to do with it

but i can't get the colour i want

can i set the right colour i want within the code? where exactly can i do that and how?

thanks
sta is offline   Reply With Quote
Old 06-09-2024, 04:48 PM   #2
papagirafe
Human being with feelings
 
papagirafe's Avatar
 
Join Date: Aug 2020
Location: Brasil
Posts: 721
Default

Quote:
Originally Posted by sta View Post
On "analyzer hue" within decorative specturm analyzer you can control the colour..also the 3 knobs below that i think have something to do with it

but i can't get the colour i want

can i set the right colour i want within the code? where exactly can i do that and how?

thanks
There is a function called "set_hsv()" that that translate it back into "set(r,g,b)". I guess you could tweak it but it's not trivial.

update: you can add a color adjustment filter afterward

Last edited by papagirafe; 06-09-2024 at 05:28 PM. Reason: new idea
papagirafe is offline   Reply With Quote
Old 06-10-2024, 02:55 AM   #3
sta
Human being with feelings
 
Join Date: Mar 2024
Posts: 32
Default

Quote:
Originally Posted by papagirafe View Post
update: you can add a color adjustment filter afterward
Do you mean FX: colorize? this would work for me if it didn't affect the other tracks as well...i don't know how to keep the tracks as they are and FX colorize that track only without affecting the others
sta is offline   Reply With Quote
Old 06-10-2024, 04:14 AM   #4
papagirafe
Human being with feelings
 
papagirafe's Avatar
 
Join Date: Aug 2020
Location: Brasil
Posts: 721
Default

Quote:
Originally Posted by sta View Post
Do you mean FX: colorize? this would work for me if it didn't affect the other tracks as well...i don't know how to keep the tracks as they are and FX colorize that track only without affecting the others
Oh! I've forgotten about that one! I ran into this type of problem all the time until I wrote my own permanent fix in GiraFX lib. With stock presets you need to put your fx chain for this source on the item itself (shift-e on selected item) and then add the "image overlay" at the very end of the fx chain. That should isolate the effect.
papagirafe is offline   Reply With Quote
Old 06-10-2024, 06:48 AM   #5
sta
Human being with feelings
 
Join Date: Mar 2024
Posts: 32
Default

Quote:
Originally Posted by papagirafe View Post
Oh! I've forgotten about that one! I ran into this type of problem all the time until I wrote my own permanent fix in GiraFX lib. With stock presets you need to put your fx chain for this source on the item itself (shift-e on selected item) and then add the "image overlay" at the very end of the fx chain. That should isolate the effect.
i guess that would work but I don't have items on the track that produce the effect, they are empty and the track below it is the background i want to stay unaltered

i mananged to put the item on the track but its audio? not sure if that will do

Last edited by sta; 06-10-2024 at 09:16 AM.
sta is offline   Reply With Quote
Old 06-10-2024, 09:19 AM   #6
papagirafe
Human being with feelings
 
papagirafe's Avatar
 
Join Date: Aug 2020
Location: Brasil
Posts: 721
Default

Quote:
Originally Posted by sta View Post
i guess that would work but I don't have items on the track that produce the effect, they are empty and the track below it is the background i want to stay unaltered
Track level video fxs are almost always a problem. The trick is to insert a lenghty empty midi item on that track and move the video fx chain to this item. That should work as espected (with the fix of course)

Do you have a short sample of your project that you could share? I am not sure I fully understand the problem.

Last edited by papagirafe; 06-10-2024 at 09:37 AM.
papagirafe is offline   Reply With Quote
Old 06-10-2024, 09:21 AM   #7
sta
Human being with feelings
 
Join Date: Mar 2024
Posts: 32
Default

Quote:
Originally Posted by papagirafe View Post
Track level video fxs are almost always a problem. The trick is to insert a lenghty empty midi item on that track and move the video fx chain to this item. That should work as espected (with the fix of course)

thanks papagirafe i'll look into this! cheers!
sta is offline   Reply With Quote
Old 06-10-2024, 10:19 AM   #8
sta
Human being with feelings
 
Join Date: Mar 2024
Posts: 32
Default

Quote:
Originally Posted by papagirafe View Post
Track level video fxs are almost always a problem. The trick is to insert a lenghty empty midi item on that track and move the video fx chain to this item. That should work as espected (with the fix of course)

Do you have a short sample of your project that you could share? I am not sure I fully understand the problem.
I should have explained better

its

track 1
Decorative spectrum analyzer
JT lighten/screen overlay (i'm using this so that i can see the video below the effect)
JS video sample peaker

track 2 Has the video

track 3 - has the audio (sending to track 1)

and i'm trying to change the color of track 1 effect only as i'm not satisfied with the options of decorative spetrum analyzer knobs
sta is offline   Reply With Quote
Old 06-10-2024, 11:50 AM   #9
papagirafe
Human being with feelings
 
papagirafe's Avatar
 
Join Date: Aug 2020
Location: Brasil
Posts: 721
Default

Quote:
Originally Posted by sta View Post
I should have explained better

its

track 1
Decorative spectrum analyzer
JT lighten/screen overlay (i'm using this so that i can see the video below the effect)
JS video sample peaker

track 2 Has the video

track 3 - has the audio (sending to track 1)

and i'm trying to change the color of track 1 effect only as i'm not satisfied with the options of decorative spetrum analyzer knobs
I've done a few tests and I was able to make it work. Assuming the default value of "item in lower..." of the "video item visibility" on your project settings (video tab) then:
  • your audio track goes first
  • on the audio item itself, put the fx chain "js sampler peaker"+ "decorative spectrum..." + "colorize" + "track opacity, zoom pan"
  • your background goes on next track
papagirafe is offline   Reply With Quote
Old 06-10-2024, 12:42 PM   #10
sta
Human being with feelings
 
Join Date: Mar 2024
Posts: 32
Default

Quote:
Originally Posted by papagirafe View Post
I've done a few tests and I was able to make it work. Assuming the default value of "item in lower..." of the "video item visibility" on your project settings (video tab) then:
  • your audio track goes first
  • on the audio item itself, put the fx chain "js sampler peaker"+ "decorative spectrum..." + "colorize" + "track opacity, zoom pan"
  • your background goes on next track

i've done it,

i got it to work, i also needed the JT lighten/screen overlay after the colorize so i can see the picture below

I'm not satisfied still with the colors though! lol they look the same as before for choices nevermind thanks papagirafe!!!
sta is offline   Reply With Quote
Old 06-10-2024, 01:11 PM   #11
papagirafe
Human being with feelings
 
papagirafe's Avatar
 
Join Date: Aug 2020
Location: Brasil
Posts: 721
Default

Quote:
Originally Posted by sta View Post
i've done it,

i got it to work, i also needed the JT lighten/screen overlay after the colorize so i can see the picture below

I'm not satisfied still with the colors though! lol they look the same as before for choices nevermind thanks papagirafe!!!
Super! That was a fun challenge! My goal is to rewrite this preset to let the background show through. You might want to try this preset instead og "JT ligthen" just in case it's closer to what you are looking for:
Code:
//gradual transparency
//@param offset offset 1 0.01 10 5 0.01
input_info(0,sw,sh)?(
  colorspace='RGBA';
  gfx_img_resize(-1,sw,sh);
  gfx_blit(0);
  res=gfx_evalrect(0,0,sw,sh,"a=min(255,offset*105.8865*log10((r+g+b)/3))");
);
you need add an "image overlay" at the end of the chain for this to work.

Last edited by papagirafe; Yesterday at 06:34 AM. Reason: added the offset back into the formula
papagirafe is offline   Reply With Quote
Old 06-10-2024, 02:03 PM   #12
sta
Human being with feelings
 
Join Date: Mar 2024
Posts: 32
Default

Quote:
Originally Posted by papagirafe View Post
Super! That was a fun challenge! My goal is to rewrite this preset to let the background show through. You might want to try this preset instead og "JT ligthen" just in case it's closer to what you are looking for:
Code:
//gradual transparency
//@param offset offset 1 1 4 2.5 0.1
input_info(0,sw,sh)?(
  colorspace='RGBA';
  gfx_img_resize(-1,sw,sh);
  gfx_blit(0);
  res=gfx_evalrect(0,0,sw,sh,"a=min(255,offset*(r+g+b)/3)");
);
you need add an "image overlay" at the end of the chain for this to work.
yes thats great without the colorizer! i will play around this! cheers!
sta is offline   Reply With Quote
Old 06-10-2024, 04:10 PM   #13
papagirafe
Human being with feelings
 
papagirafe's Avatar
 
Join Date: Aug 2020
Location: Brasil
Posts: 721
Default

Quote:
Originally Posted by sta View Post
yes thats great without the colorizer! i will play around this! cheers!
I've updated the math curve for transparency. Should look even better.
papagirafe is offline   Reply With Quote
Old Yesterday, 12:29 PM   #14
Trishtrashtrush
Human being with feelings
 
Join Date: Oct 2023
Posts: 93
Default

Quote:
Originally Posted by sta View Post
On "analyzer hue" within decorative specturm analyzer you can control the colour..also the 3 knobs below that i think have something to do with it

but i can't get the colour i want

can i set the right colour i want within the code? where exactly can i do that and how?

thanks

What color do you want to change? The spectrogram only or the analyzer only? And do you want a simple color or a gradient?

Because there are the first 2 buttons that control the color of the analyzer (the starting point and the size of the color gradient), and the next 2 buttons control the color of the spectrogram in the same way.
Knowing that you only control the starting Hue, if you want a more specific color, you need to add an effect that controls the saturation and value.
You can therefore add the Brightness/Contrast preset and play with the 1st and last buttons, to have the equivalent of an HSV control.

If you don't understand anything at all from my explanations, I'll let you google "explain rgb and hsv color model" and everything will be clearer.

(and if you only want to use the analyzer, try my preset "Ashcat_lt's "Decorative Oscilloscope with Connected Dots" improvement" present in the first post, you will be able to choose your color more easily and many other options: https:// forum.cockos.com/showthread.php?t=286779)
Trishtrashtrush is online now   Reply With Quote
Old Yesterday, 01:30 PM   #15
papagirafe
Human being with feelings
 
papagirafe's Avatar
 
Join Date: Aug 2020
Location: Brasil
Posts: 721
Default

Quote:
Originally Posted by Trishtrashtrush View Post
What color do you want to change? The spectrogram only or the analyzer only? And do you want a simple color or a gradient?

<snip>
From what I understood, the color blending with the background image lead to unsatisfactory results and from my tests I can imagine why. The preset I supplied works very differently and it look very good in my tests. Here is a sample image using this chain:
js video sampler - decorative osc - "gradual transparency" - blur rightward - video to circle - image overlay
papagirafe is offline   Reply With Quote
Old Yesterday, 03:27 PM   #16
Trishtrashtrush
Human being with feelings
 
Join Date: Oct 2023
Posts: 93
Default

When I do tests, I seem to see almost the same thing in terms of colors with "gradual transparency" set to 0.6 and "image overlay; opacity=1" as with only the "image overlay; opacity=0.5" preset.
The only visible difference is for the black areas, where it looks nicer with your preset.

I think I didn't understand everything about this discussion.


Trishtrashtrush is online now   Reply With Quote
Old Yesterday, 04:46 PM   #17
papagirafe
Human being with feelings
 
papagirafe's Avatar
 
Join Date: Aug 2020
Location: Brasil
Posts: 721
Default

I increased the FFT size to 13. Just to be sure are you using the version with a logarithmic function?

Last edited by papagirafe; Yesterday at 04:56 PM.
papagirafe is offline   Reply With Quote
Old Today, 01:08 AM   #18
Trishtrashtrush
Human being with feelings
 
Join Date: Oct 2023
Posts: 93
Default

Quote:
Originally Posted by papagirafe View Post
I increased the FFT size to 13. Just to be sure are you using the version with a logarithmic function?
Yes, I took the last version. ( I played with the FFT too, but it just changes the precision, not the colors of the spectrogram ).
Trishtrashtrush is online now   Reply With Quote
Old Today, 06:06 AM   #19
papagirafe
Human being with feelings
 
papagirafe's Avatar
 
Join Date: Aug 2020
Location: Brasil
Posts: 721
Default

Quote:
Originally Posted by Trishtrashtrush View Post
Yes, I took the last version. ( I played with the FFT too, but it just changes the precision, not the colors of the spectrogram ).
It looks like the audio signal is too saturated, you need to bring down the volume. Another problem would be a track on which a limiter/expander has been applied: there won't be any interesting visual variations from the spectrogram. For my example I used a recording of my pipe organ playing with plenty of dynamic range.
papagirafe 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 02:28 PM.


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