COCKOS
CONFEDERATED FORUMS
Cockos : REAPER : NINJAM : Forums
Forum Home : Register : FAQ : Members List : Search :
Old 06-11-2017, 10:37 AM   #1
mibes
Human being with feelings
 
Join Date: Apr 2017
Posts: 36
Default LICE graphics guidance

Is there any vaguely comprehensive source, tutorial, API, anything for learning about drawing graphics with LICE for WDL audio plugins? I've looked up and down and it's just really hard to get off the ground with it.

I just want to draw audio-reactive graphs on my plugins. I looked at the FFT analyser example in the -mw fork of WDL but couldn't get it to compile. None the -ol examples seem to have anything like that in them. Any guidance would be great because I'm really keen to get on with this framework
.

Last edited by mibes; 06-11-2017 at 11:44 AM.
mibes is offline   Reply With Quote
Old 06-11-2017, 10:56 AM   #2
random_id
Human being with feelings
 
random_id's Avatar
 
Join Date: May 2012
Location: PA, USA
Posts: 356
Default

What were the error when you tried to compile it? I haven't updated the code in a long time, so there might be some conflict with some of the newer updates to WDL-OL.
__________________
Website: LVC-Audio
random_id is offline   Reply With Quote
Old 06-11-2017, 11:39 AM   #3
mibes
Human being with feelings
 
Join Date: Apr 2017
Posts: 36
Default

Quote:
Originally Posted by random_id View Post
What were the error when you tried to compile it? I haven't updated the code in a long time, so there might be some conflict with some of the newer updates to WDL-OL.
Undefined symbols for architecture x86_64:
"_WDL_fft", referenced from:
Spect_FFT::Permute(int) in IPlugSpectFFT.o
"_WDL_fft_init", referenced from:
Spect_FFT::Spect_FFT(IPlugBase*, int, int) in IPlugSpectFFT.o
"_WDL_fft_permute", referenced from:
Spect_FFT::Permute(int) in IPlugSpectFFT.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

also it doesn't like how pi is declared - "Static declaration of 'pi' follows non-static declaration "

Last edited by mibes; 06-11-2017 at 11:55 AM.
mibes is offline   Reply With Quote
Old 06-11-2017, 01:22 PM   #4
random_id
Human being with feelings
 
random_id's Avatar
 
Join Date: May 2012
Location: PA, USA
Posts: 356
Default

The errors are probably caused by the fft.c/.h files not being included. If you add them to the project, it should work. I don't have the Mac on now, but I think you can just drag the files from the Finder window into the project. The files are in the WDL directory.

As for the pi, you can probably comment it out if it is already defined.
__________________
Website: LVC-Audio
random_id is offline   Reply With Quote
Old 06-11-2017, 01:55 PM   #5
mibes
Human being with feelings
 
Join Date: Apr 2017
Posts: 36
Default

Thanks, that makes it run - nice example script, i'll be picking it apart to learn from it.

Do you have any directions to learn more specifically about the LICE stuff in WDL?
mibes is offline   Reply With Quote
Old 06-11-2017, 02:57 PM   #6
random_id
Human being with feelings
 
random_id's Avatar
 
Join Date: May 2012
Location: PA, USA
Posts: 356
Default

I would focus on what is in IGraphic.cpp for drawing instead of dealing with LICE directly. There are methods for drawing lines, filled/outlined rectangles, filled/outlined circles, etc. I do most everything with these functions. There are other things too, like curves, etc. I am pretty basic, and haven't messed with much of that.
__________________
Website: LVC-Audio
random_id is offline   Reply With Quote
Old 07-14-2017, 05:02 AM   #7
stw
Human being with feelings
 
stw's Avatar
 
Join Date: Apr 2012
Posts: 279
Default

Lack of LICE documentation really is one of the big downsides of WDL.
But maybe someone has any hints on how to accomplish my task...

My actual plug uses lots of colour variations of the same basic grayscale bitmap. I'd like to load only that one bitmap and calc/store all the variations in my plug.
My first approach was to do it with Intel ipp lib (i use it already for audio), which provides pretty easy to use functions for that. Unfortunately i fail with the simple task to get/set the image data from IBitmap to anything i can handle with ippi.
Next try was to find anything related to that in IGraphics. But no avail.
Last idea is to deal with LICE directly. But i'm a bit overwhelmed with all the functions since i'm not very familiar with image processing at all. Maybe i can do what i need with blending options. But i've no clue how to get started.
So, if anyone feels encouraged to help me out... your welcome
stw is offline   Reply With Quote
Old 07-14-2017, 07:45 AM   #8
Youlean
Human being with feelings
 
Youlean's Avatar
 
Join Date: May 2015
Location: Serbia
Posts: 654
Default

Quote:
Originally Posted by stw View Post
Lack of LICE documentation really is one of the big downsides of WDL.
But maybe someone has any hints on how to accomplish my task...

My actual plug uses lots of colour variations of the same basic grayscale bitmap. I'd like to load only that one bitmap and calc/store all the variations in my plug.
My first approach was to do it with Intel ipp lib (i use it already for audio), which provides pretty easy to use functions for that. Unfortunately i fail with the simple task to get/set the image data from IBitmap to anything i can handle with ippi.
Next try was to find anything related to that in IGraphics. But no avail.
Last idea is to deal with LICE directly. But i'm a bit overwhelmed with all the functions since i'm not very familiar with image processing at all. Maybe i can do what i need with blending options. But i've no clue how to get started.
So, if anyone feels encouraged to help me out... your welcome
Use LICE_FillRect, set color you want, set mode to LICE_BLIT_MODE_MUL and paint over your bitmap. You can experiment with other blit functions too. NOTE: I have not tested this.
Youlean is offline   Reply With Quote
Old 07-14-2017, 09:07 AM   #9
stw
Human being with feelings
 
stw's Avatar
 
Join Date: Apr 2012
Posts: 279
Default

Quote:
Originally Posted by Youlean View Post
Use LICE_FillRect, set color you want, set mode to LICE_BLIT_MODE_MUL and paint over your bitmap. You can experiment with other blit functions too. NOTE: I have not tested this.
Hey...BINGO
Thanks Youlean!! Though i had to fiddle a bit with the proper settings it finally does exactly what i need!
In case someone wants to do the same, here the line that i inserted for the LICE_FillRect (where LICE_RGBA is the color of choice)
Code:
LICE_FillRect(pGraphics->GetDrawBitmap(), mRECT.L, mRECT.T, mRECT.W(), mRECT.H(), LICE_RGBA(241,177,131,0), 1, LICE_BLIT_MODE_MUL);
stw is offline   Reply With Quote
Old 07-14-2017, 10:37 AM   #10
Youlean
Human being with feelings
 
Youlean's Avatar
 
Join Date: May 2015
Location: Serbia
Posts: 654
Default

Quote:
Originally Posted by stw View Post
Hey...BINGO
Thanks Youlean!! Though i had to fiddle a bit with the proper settings it finally does exactly what i need!
In case someone wants to do the same, here the line that i inserted for the LICE_FillRect (where LICE_RGBA is the color of choice)
Code:
LICE_FillRect(pGraphics->GetDrawBitmap(), mRECT.L, mRECT.T, mRECT.W(), mRECT.H(), LICE_RGBA(241,177,131,0), 1, LICE_BLIT_MODE_MUL);
No problem.
Youlean 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 03:32 AM.


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