COCKOS
CONFEDERATED FORUMS
Cockos : REAPER : NINJAM : Forums
Forum Home : Register : FAQ : Members List : Search :
Old 06-12-2017, 05:49 AM   #121
HoRNet
Human being with feelings
 
Join Date: Feb 2011
Posts: 171
Default

Quote:
Originally Posted by Youlean View Post
Is this sending midi notes? If so, that would be awesome. I have implement that on AU so VST3 implementation is only missing..
No sorry it's for receiving MIDI Control change values, VST3 must expose them as plugin parameters.

It's really easy (but my code comes from the v3.5 of the VST3 sdk because 3.6 required c++11 and this breaks osx 10.6 compatibility.

Code:
// if does midi is set creates 128 fake parameters to be used to map control change since
// vst3 doesn't pass any CC to plugin but wants it mapped to a plugin parameter
if(DoesMIDI()) {
    int origParamNum = NParams();
    for (int k = 0; k < 128; k++) {
        Parameter* param = new RangeParameter( STR16("MIDI CC"),																						
            origParamNum + k,																						
            STR16(""),																						
            0,																						
            127,																						
            0,																						
            0, // continuous																						
            ParameterInfo::kCanAutomate,																						
            kRootUnitId);
        param->setPrecision (1.);
        parameters.addParameter(param);				
    }
}
This is in the initialize of the IPlugVST3
HoRNet is offline   Reply With Quote
Old 06-13-2017, 11:53 PM   #122
TBProAudio
Human being with feelings
 
TBProAudio's Avatar
 
Join Date: May 2014
Location: Germany
Posts: 643
Default

Quote:
Originally Posted by Youlean View Post
It is not the problem, though if you spot something please let me know. My fork is in the works and it will be constantly updated with a things that I need.

Here is the build script. Save it to .sh file and run it from terminal. You will only need to change deployment target and the SDK version.
Code:
#! /bin/bash

# Set build directory same as script location
export BuildDir="$(dirname "$0")"

# Set deployment target, architectures and SDK
export MACOSX_DEPLOYMENT_TARGET=10.7
export LDFLAGS="-arch i386 -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk"
export CFLAGS="-Os -arch i386 -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk"


# Build expat  =============================================
cd ${BuildDir}/expat
./configure --prefix=${BuildDir} --disable-dependency-tracking
./configure --enable-static
make
make install
sudo cp /usr/local/lib/libexpat.a ../

# End ======================================================


# Build fontconfig  ========================================
cd ${BuildDir}/fontconfig
./configure --prefix=${BuildDir} --disable-dependency-tracking
./configure --enable-static
make
make install
sudo cp /usr/local/lib/libfontconfig.a ../

# End ======================================================


# Build bzip2  =============================================
cd ${BuildDir}/bzip2
./configure --prefix=${BuildDir} --disable-dependency-tracking
./configure --enable-static
make
make install
sudo cp /usr/local/lib/libbz2.a ../

# End ======================================================


# Build freetype  ==========================================
cd ${BuildDir}/freetype
./configure --prefix=${BuildDir} --disable-dependency-tracking
./configure --enable-static --with-bzip2=no
make
make install
sudo cp /usr/local/lib/libfreetype.a ../

# End ======================================================


# Build libpng  ============================================
cd ${BuildDir}/libpng
./configure --prefix=${BuildDir} --disable-dependency-tracking
./configure --enable-static
make
make install
sudo cp /usr/local/lib/libpng16.a ../

# End ======================================================


# Build pixman  ============================================
cd ${BuildDir}/pixman
./configure --prefix=${BuildDir} --disable-dependency-tracking
./configure --enable-static
make
make install
sudo cp /usr/local/lib/libpixman-1.a ../

# End ======================================================


# Build cairo  ============================================
cd ${BuildDir}/cairo
./configure --prefix=${BuildDir} --disable-xlib --disable-dependency-tracking
./configure --enable-static --enable-ft
make
make install
sudo cp /usr/local/lib/libcairo.a ../

# End ======================================================
Thank you for sharing.
But i cannot build on Mac OS with given script and source provided here :https://github.com/Youlean/IPlug-Youlean (YCAIRO).
E.g. folder "expat" including files is missing...
BTW: Windows compiles well.

Maybe someone can tell me what i´m missing?
Thank you.
__________________
www.tbproaudio.de
TBProAudio is offline   Reply With Quote
Old 06-14-2017, 09:31 AM   #123
Youlean
Human being with feelings
 
Youlean's Avatar
 
Join Date: May 2015
Location: Serbia
Posts: 654
Default

Quote:
Originally Posted by HoRNet View Post
No sorry it's for receiving MIDI Control change values, VST3 must expose them as plugin parameters.

It's really easy (but my code comes from the v3.5 of the VST3 sdk because 3.6 required c++11 and this breaks osx 10.6 compatibility.

Code:
// if does midi is set creates 128 fake parameters to be used to map control change since
// vst3 doesn't pass any CC to plugin but wants it mapped to a plugin parameter
if(DoesMIDI()) {
    int origParamNum = NParams();
    for (int k = 0; k < 128; k++) {
        Parameter* param = new RangeParameter( STR16("MIDI CC"),																						
            origParamNum + k,																						
            STR16(""),																						
            0,																						
            127,																						
            0,																						
            0, // continuous																						
            ParameterInfo::kCanAutomate,																						
            kRootUnitId);
        param->setPrecision (1.);
        parameters.addParameter(param);				
    }
}
This is in the initialize of the IPlugVST3
Thanks. Is this the whole code? This will be handy having too...
Youlean is offline   Reply With Quote
Old 06-14-2017, 09:33 AM   #124
Youlean
Human being with feelings
 
Youlean's Avatar
 
Join Date: May 2015
Location: Serbia
Posts: 654
Default

Quote:
Originally Posted by TBProAudio View Post
Thank you for sharing.
But i cannot build on Mac OS with given script and source provided here :https://github.com/Youlean/IPlug-Youlean (YCAIRO).
E.g. folder "expat" including files is missing...
BTW: Windows compiles well.

Maybe someone can tell me what i´m missing?
Thank you.
You will need to download all sources by yourself. Don't use sources from YCAIRO. These are optimized for windows only (for now). Why don't you use provided libs for mac?
Youlean is offline   Reply With Quote
Old 06-14-2017, 10:12 AM   #125
TBProAudio
Human being with feelings
 
TBProAudio's Avatar
 
Join Date: May 2014
Location: Germany
Posts: 643
Default

Quote:
Originally Posted by Youlean View Post
You will need to download all sources by yourself. Don't use sources from YCAIRO. These are optimized for windows only (for now). Why don't you use provided libs for mac?
ok, understand.
Well, i need to compile for 10.6 as well:-(
Thank you.
__________________
www.tbproaudio.de
TBProAudio is offline   Reply With Quote
Old 06-14-2017, 10:28 AM   #126
Youlean
Human being with feelings
 
Youlean's Avatar
 
Join Date: May 2015
Location: Serbia
Posts: 654
Default

Quote:
Originally Posted by TBProAudio View Post
ok, understand.
Well, i need to compile for 10.6 as well:-(
Thank you.
Maybe Saverio can share his script...
Youlean is offline   Reply With Quote
Old 06-14-2017, 11:05 AM   #127
TBProAudio
Human being with feelings
 
TBProAudio's Avatar
 
Join Date: May 2014
Location: Germany
Posts: 643
Default

Quote:
Originally Posted by Youlean View Post
Maybe Saverio can share his script...
This would be great, but i would need the complete source as well:-(
__________________
www.tbproaudio.de
TBProAudio is offline   Reply With Quote
Old 06-15-2017, 02:55 AM   #128
TBProAudio
Human being with feelings
 
TBProAudio's Avatar
 
Join Date: May 2014
Location: Germany
Posts: 643
Default

Quote:
Originally Posted by HoRNet View Post
Thank you for your build script Youlean, I've been able to build Cairo even if I had to make some changes to your scripts, i would share it with you but it's not completely "hands free" right now i have some issue with the zlib headers required for the pnglib. If you run the configure scripts the headers found in the 10.6 sdk differ fomr the system zlib and the pnglib fails to build.
To make it work you have to manually change the version of the zlib headers in the configure generated script by pnglib.

Anyway i completed my first plugin using only Cairo for the UI, i wrote some UI widgets, nothing fancy, a knob, a switch and a dropdown, i can contribute them back.

Saverio
Maybe you can just provide the static libs for 10.6?
Thank you in advance!
__________________
www.tbproaudio.de
TBProAudio is offline   Reply With Quote
Old 06-15-2017, 01:36 PM   #129
Youlean
Human being with feelings
 
Youlean's Avatar
 
Join Date: May 2015
Location: Serbia
Posts: 654
Default

Quote:
Originally Posted by TBProAudio View Post
Maybe you can just provide the static libs for 10.6?
Thank you in advance!
I have managed to build all libs with 10.11 SDK and target 10.6. I am not sure if I can target 10.6 from 10.11 but it seems that it works OK.
https://drive.google.com/file/d/0B1l...ew?usp=sharing
Youlean is offline   Reply With Quote
Old 06-16-2017, 02:52 AM   #130
TBProAudio
Human being with feelings
 
TBProAudio's Avatar
 
Join Date: May 2014
Location: Germany
Posts: 643
Default

Quote:
Originally Posted by Youlean View Post
I have managed to build all libs with 10.11 SDK and target 10.6. I am not sure if I can target 10.6 from 10.11 but it seems that it works OK.
https://drive.google.com/file/d/0B1l...ew?usp=sharing
Many thanks for this, works perfectly.
Small thing: libpng is not needed and png_error needs to be enabled in WDL pnglib (at least for my very old WDL framework)

BTW: i tried to compile the libs on my own (OSX Maverik, 10.9) but no success with provided script:-(
__________________
www.tbproaudio.de
TBProAudio is offline   Reply With Quote
Old 06-16-2017, 03:45 AM   #131
Youlean
Human being with feelings
 
Youlean's Avatar
 
Join Date: May 2015
Location: Serbia
Posts: 654
Default

Quote:
Originally Posted by TBProAudio View Post
Small thing: libpng is not needed and png_error needs to be enabled in WDL pnglib (at least for my very old WDL framework)
Yes, I am guessing that we don't need two libpngs, but it is working in this way for now. I will check this is the future.

Quote:
BTW: i tried to compile the libs on my own (OSX Maverik, 10.9) but no success with provided script:-(
Try this script and sources: https://drive.google.com/file/d/0B1l...ew?usp=sharing

Also, check if you have anything in /usr/local/lib/. If this folder is full, delete everything (or temporary move it while you compile cairo)
Youlean is offline   Reply With Quote
Old 06-16-2017, 07:05 AM   #132
TBProAudio
Human being with feelings
 
TBProAudio's Avatar
 
Join Date: May 2014
Location: Germany
Posts: 643
Default

Quote:
Originally Posted by Youlean View Post
Yes, I am guessing that we don't need two libpngs, but it is working in this way for now. I will check this is the future.


Try this script and sources: https://drive.google.com/file/d/0B1l...ew?usp=sharing

Also, check if you have anything in /usr/local/lib/. If this folder is full, delete everything (or temporary move it while you compile cairo)
Thank you for your efforts!
But no real luck, maybe a problem with my old OS (10.9):
1) I unpacked the sources into my home folder, cleaned /usr/local/lib/ folder and started the provided script
2) Then i get this: configure: error: expected an absolute directory name for --prefix: . So i fixed this.
3) Then i changed the bash script from 10.11 SDK to 10.9, but during run it seems that there are still references to 10.11 SDK (which is not installed)

I'm not the Linux expert, so we can stop here if it is too much effort...

In any case thank you for your support!!
__________________
www.tbproaudio.de
TBProAudio is offline   Reply With Quote
Old 06-16-2017, 07:11 AM   #133
Youlean
Human being with feelings
 
Youlean's Avatar
 
Join Date: May 2015
Location: Serbia
Posts: 654
Default

Quote:
Originally Posted by TBProAudio View Post
Thank you for your efforts!
But no real luck, maybe a problem with my old OS (10.9):
1) I unpacked the sources into my home folder, cleaned /usr/local/lib/ folder and started the provided script
2) Then i get this: configure: error: expected an absolute directory name for --prefix: .
3) Finally i changed the bash script from 10.11 SDK to 10.9, but during run it seems that there are still references to 10.11 SDK (which is not installed)

I'm not the Linux expert, so we can stop here if it is too much effort...

In any case thank you for your support!!
Ok. In script you have 2 places where you should change sdk. It is on top, before make...

Also open terminal type "sudo " (without quotes) and drag and drop the script file on terminal, now hit enter. If you still have problems it might happen if you have any spaces in your script file path...
Youlean is offline   Reply With Quote
Old 06-16-2017, 07:14 AM   #134
Youlean
Human being with feelings
 
Youlean's Avatar
 
Join Date: May 2015
Location: Serbia
Posts: 654
Default

I would put the build folder on desktop...
Youlean is offline   Reply With Quote
Old 06-16-2017, 08:00 AM   #135
TBProAudio
Human being with feelings
 
TBProAudio's Avatar
 
Join Date: May 2014
Location: Germany
Posts: 643
Default

Quote:
Originally Posted by Youlean View Post
Ok. In script you have 2 places where you should change sdk. It is on top, before make...

Also open terminal type "sudo " (without quotes) and drag and drop the script file on terminal, now hit enter. If you still have problems it might happen if you have any spaces in your script file path...
Many thanks for this tip.
"Expat" compiles now :-)
Still problems with "fontconfig":

Code:
/Applications/Xcode.app/Contents/Developer/usr/bin/make  all-am
  CC       fcatomic.lo
clang: warning: no such sysroot directory: '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk'
clang: warning: no such sysroot directory: '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk'
In file included from fcatomic.c:50:
In file included from ./fcint.h:29:
In file included from ../config.h:363:
../config-fixups.h:30:11: fatal error: 'machine/endian.h' file not found
# include <machine/endian.h>
SDK set to 10.9 in main script...
__________________
www.tbproaudio.de
TBProAudio is offline   Reply With Quote
Old 06-16-2017, 08:03 AM   #136
Youlean
Human being with feelings
 
Youlean's Avatar
 
Join Date: May 2015
Location: Serbia
Posts: 654
Default

Quote:
Originally Posted by TBProAudio View Post
Many thanks for this tip.
"Expat" compiles now :-)
Still problems with "fontconfig":

Code:
/Applications/Xcode.app/Contents/Developer/usr/bin/make  all-am
  CC       fcatomic.lo
clang: warning: no such sysroot directory: '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk'
clang: warning: no such sysroot directory: '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk'
In file included from fcatomic.c:50:
In file included from ./fcint.h:29:
In file included from ../config.h:363:
../config-fixups.h:30:11: fatal error: 'machine/endian.h' file not found
# include <machine/endian.h>
SDK set to 10.9 in main script...
It might be that my script changed some source files. I will have to check this tomorrow, I am not in front of my PC now...
Youlean is offline   Reply With Quote
Old 06-18-2017, 08:21 AM   #137
Youlean
Human being with feelings
 
Youlean's Avatar
 
Join Date: May 2015
Location: Serbia
Posts: 654
Default

CRITICAL UPDATE:

Now we have proper implementation for private and public parameters. This will break old plugin save states unfortunately, but from now on it will work great. You can even add or remove parameters dynamically in the future.
Youlean is offline   Reply With Quote
Old 06-18-2017, 08:29 AM   #138
Youlean
Human being with feelings
 
Youlean's Avatar
 
Join Date: May 2015
Location: Serbia
Posts: 654
Default

Quote:
Originally Posted by Youlean View Post
It might be that my script changed some source files. I will have to check this tomorrow, I am not in front of my PC now...
I couldn't make it compile with 10.9. I was able to compile with 10.10 though.
Youlean is offline   Reply With Quote
Old 06-18-2017, 09:27 AM   #139
TBProAudio
Human being with feelings
 
TBProAudio's Avatar
 
Join Date: May 2014
Location: Germany
Posts: 643
Default

Quote:
Originally Posted by Youlean View Post
I couldn't make it compile with 10.9. I was able to compile with 10.10 though.
Thank you very much!

Ok, i see. I´m now taking fresh sources and try to compile target 10.6 with SDK 10.9. Lets see if it works out.
__________________
www.tbproaudio.de
TBProAudio is offline   Reply With Quote
Old 06-18-2017, 10:05 AM   #140
Youlean
Human being with feelings
 
Youlean's Avatar
 
Join Date: May 2015
Location: Serbia
Posts: 654
Default

Quote:
Originally Posted by TBProAudio View Post
Thank you very much!

Ok, i see. I´m now taking fresh sources and try to compile target 10.6 with SDK 10.9. Lets see if it works out.
I have tried with a fresh sources. It seems that it can't find the compiler in 10.9...
Youlean is offline   Reply With Quote
Old 06-18-2017, 09:44 PM   #141
TBProAudio
Human being with feelings
 
TBProAudio's Avatar
 
Join Date: May 2014
Location: Germany
Posts: 643
Default

Quote:
Originally Posted by Youlean View Post
I have tried with a fresh sources. It seems that it can't find the compiler in 10.9...
Thank you. On my side i have still problems to compile fontfonfig...
It looks like a tough nut :-)
__________________
www.tbproaudio.de
TBProAudio is offline   Reply With Quote
Old 06-20-2017, 09:25 PM   #142
Bobflip
Human being with feelings
 
Join Date: Nov 2016
Posts: 341
Default

Some real life got in the way for a few weeks, but back on it now. Upgraded to the new Framework and VS2017, and it's running along nicely. Got stuck into the control groups as well. Thanks for the update!
Bobflip is offline   Reply With Quote
Old 06-27-2017, 02:08 PM   #143
Anomaly
Human being with feelings
 
Anomaly's Avatar
 
Join Date: Sep 2007
Posts: 642
Default

I updated VS2017 and latest Youlean branch. Now, when trying to build an old project, I'm getting 500 errors.

E1696 cannot open source file "errno.h"
E1696 cannot open source file "float.h"
E0282 the global scope has no "acosf"
E0282 the global scope has no "asinf"
... and so on

Apparently many files are not being found on include path.

As I started visual studio/c++ just recently, I have no clear idea how to solve this. Is there any basic steps how to migrate old projects?
__________________
___________________________
Sonic Anomaly | free JSFX & VST Plugins
Anomaly is offline   Reply With Quote
Old 06-27-2017, 02:22 PM   #144
Youlean
Human being with feelings
 
Youlean's Avatar
 
Join Date: May 2015
Location: Serbia
Posts: 654
Default

Quote:
Originally Posted by Anomaly View Post
I updated VS2017 and latest Youlean branch. Now, when trying to build an old project, I'm getting 500 errors.

E1696 cannot open source file "errno.h"
E1696 cannot open source file "float.h"
E0282 the global scope has no "acosf"
E0282 the global scope has no "asinf"
... and so on

Apparently many files are not being found on include path.

As I started visual studio/c++ just recently, I have no clear idea how to solve this. Is there any basic steps how to migrate old projects?
In project settings try to set windows SDK version.
Youlean is offline   Reply With Quote
Old 06-28-2017, 05:04 AM   #145
Anomaly
Human being with feelings
 
Anomaly's Avatar
 
Join Date: Sep 2007
Posts: 642
Default

Quote:
Originally Posted by Youlean View Post
In project settings try to set windows SDK version.
Ok, got it. Thanks!
__________________
___________________________
Sonic Anomaly | free JSFX & VST Plugins
Anomaly is offline   Reply With Quote
Old 07-05-2017, 05:23 AM   #146
HoRNet
Human being with feelings
 
Join Date: Feb 2011
Posts: 171
Default

Quote:
Originally Posted by Youlean View Post
Maybe Saverio can share his script...

Sorry i simply forgot to check the thread, here's my modified build script for 10.6

Code:
#! /bin/bash

# Set build directory same as script location
#export BuildDir="$(dirname "$0")"
export BuildDir="${PWD}"

# Set deployment target, architectures and SDK
export MACOSX_DEPLOYMENT_TARGET=10.6
export LDFLAGS="-arch i386 -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk"
export CFLAGS="-Os -arch i386 -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk"
export CPPFLAGS=""

# Build expat  =============================================
cd ${BuildDir}/expat
./configure --prefix=${BuildDir} --disable-dependency-tracking --enable-static
make clean
make
make install
sudo cp ${PWD}/lib/libexpat.a ../

# End ======================================================


# Build fontconfig  ========================================
cd ${BuildDir}/fontconfig
./configure --prefix=${BuildDir} --disable-dependency-tracking --enable-static
make clean
make
make install
sudo cp ${PWD}/lib/libfontconfig.a ../

# End ======================================================


# Build bzip2  =============================================
cd ${BuildDir}/bzip2
./configure --prefix=${BuildDir} --disable-dependency-tracking --enable-static
make clean
make
make install
sudo cp ${PWD}/lib/libbz2.a ../

# End ======================================================


# Build freetype  ==========================================
cd ${BuildDir}/freetype
./configure --prefix=${BuildDir} --disable-dependency-tracking --enable-static --with-bzip2=no
make clean
make
make install
sudo cp ${PWD}/lib/libfreetype.a ../

# End ======================================================

# Build zlib  ============================================
cd ${BuildDir}/zlib
./configure --prefix=${BuildDir} --static
make clean
make
make install
sudo cp ${PWD}/lib/libz.a ../

# End ======================================================

# Build libpng  ============================================
cd ${BuildDir}/libpng
./configure --prefix=${BuildDir} --disable-dependency-tracking --enable-static --with-zlib-prefix=${BuildDir}/lib
make clean
make
make install
sudo cp ${PWD}/lib/libpng16.a ../

# End ======================================================


# Build pixman  ============================================
cd ${BuildDir}/pixman
./configure --prefix=${BuildDir} --disable-dependency-tracking --enable-static
make clean
make
make install
sudo cp ${PWD}/lib/libpixman-1.a ../

# End ======================================================


# Build cairo  ============================================
cd ${BuildDir}/cairo
./configure --prefix=${BuildDir} --disable-xlib --disable-dependency-tracking --enable-static --enable-ft --disable-xlib --enable-gl
make clean
make
make install
sudo cp ${PWD}/lib/libcairo.a ../

# End ======================================================
the issue is that libpng won't compile because of zlib conflicts between the headers found in the 10.6 sdk and the version detected by the configure script on the running MacOS (or at least it's the case on my 10.12 machine)

To fix it you have to open the pnglibconf.h file (after you have first run configure) and replace the ZLIB version number with this line:

Code:
#define PNG_ZLIB_VERNUM 0x1230
this should allow you to build pnglib

BTW for convenience, here's my static libs:

http://cloud.hor-net.com/index.php/s/wzYIEKkMLbMJFEg

I don't take any responsibility if my binaries fries your HD they work on my machine and the plugins produced with them seems to work elsewhere but i don't know if they owrk on other build environments.

(ps. here i'm with XCode 8.3.3 on MacOS 10.12.5)

Saverio
HoRNet is offline   Reply With Quote
Old 07-07-2017, 06:59 PM   #147
Youlean
Human being with feelings
 
Youlean's Avatar
 
Join Date: May 2015
Location: Serbia
Posts: 654
Default

Thanks Saverio!
Youlean is offline   Reply With Quote
Old 08-15-2017, 09:38 AM   #148
mibes
Human being with feelings
 
Join Date: Apr 2017
Posts: 36
Default

Can you think of a simple way to get a y value for a given x value along a Cairo path?

I have made a nice little multi-step envelope interface with a path including bezier curves and I'd rather read from it than have to recalculate all the data. I realise I will probably have to, but thought I would ask just in case someone had a good thought.
mibes is offline   Reply With Quote
Old 08-15-2017, 11:10 AM   #149
Youlean
Human being with feelings
 
Youlean's Avatar
 
Join Date: May 2015
Location: Serbia
Posts: 654
Default

Quote:
Originally Posted by mibes View Post
Can you think of a simple way to get a y value for a given x value along a Cairo path?

I have made a nice little multi-step envelope interface with a path including bezier curves and I'd rather read from it than have to recalculate all the data. I realise I will probably have to, but thought I would ask just in case someone had a good thought.
Unfortunately I think that you will need to manually do that. There is no easy way to do that with cairo as far as I know.
__________________
Website | Facebook Page | IPlug-Youlean
Youlean is offline   Reply With Quote
Old 08-15-2017, 01:02 PM   #150
mibes
Human being with feelings
 
Join Date: Apr 2017
Posts: 36
Default

Quote:
Originally Posted by Youlean View Post
Unfortunately I think that you will need to manually do that. There is no easy way to do that with cairo as far as I know.
yah, I figured. Got all excited when i saw the cairo_path_data_t part in the cairo API, but it just holds the control points. Nothing in between.

Didn't realise it'd be so hard to get ys for xs along a bezier. I'm thinking just finding a middle point and then doing a quadratic interpolation will be the cheapest way.
mibes is offline   Reply With Quote
Old 08-28-2017, 02:36 AM   #151
TBProAudio
Human being with feelings
 
TBProAudio's Avatar
 
Join Date: May 2014
Location: Germany
Posts: 643
Default

Hey Youlean,

i found out that resizing of VST2 does not properly work in WaveLab x64 and Audition x64.

You can fix this if you make 2 changes in your code:

IGraphicsWin.cpp: void IGraphicsWin::Resize(int w, int h)

Code:
// don't want to touch the host window in VST2/VST3/RTAS/AAX
          if((mPlug->GetAPI() != kAPIVST2) && (mPlug->GetAPI() != kAPIVST3) && (mPlug->GetAPI() != kAPIRTAS) && (mPlug->GetAPI() != kAPIAAX)) // TB28082017
          {
              if(pParent)
              {
                    SetWindowPos(pParent, 0, 0, 0, parentW + dw, parentH + dh, SETPOS_FLAGS);
              }

              if(pGrandparent)
              {
                    SetWindowPos(pGrandparent, 0, 0, 0, grandparentW + dw, grandparentH + dh, SETPOS_FLAGS);
              }
          }
In fact this remove the whole SetWindowsPos code for all parents. Resizing works now for VST2/VST3/RTAS and AAX!

IPlugVST.cpp:void IPlugVST::ResizeGraphics(int w, int h)

Code:
 IGraphics* pGraphics = GetGUI();

  if (pGraphics)
  {
    mEditRect.left = mEditRect.top = 0;
    mEditRect.right = w;
    mEditRect.bottom = h;
      
// Inform host about window resizing    
mHostCallback(&mAEffect, audioMasterSizeWindow, pGraphics->Width(), pGraphics->Height(), 0, 0.0f);

    OnWindowResize();

#ifdef USING_YCAIRO
    ResizeCairoSurface();
#endif
I hope this helps
__________________
www.tbproaudio.de
TBProAudio is offline   Reply With Quote
Old 08-29-2017, 03:57 AM   #152
Youlean
Human being with feelings
 
Youlean's Avatar
 
Join Date: May 2015
Location: Serbia
Posts: 654
Default

Quote:
Originally Posted by TBProAudio View Post
Hey Youlean,

i found out that resizing of VST2 does not properly work in WaveLab x64 and Audition x64.

You can fix this if you make 2 changes in your code:

IGraphicsWin.cpp: void IGraphicsWin::Resize(int w, int h)

Code:
// don't want to touch the host window in VST2/VST3/RTAS/AAX
          if((mPlug->GetAPI() != kAPIVST2) && (mPlug->GetAPI() != kAPIVST3) && (mPlug->GetAPI() != kAPIRTAS) && (mPlug->GetAPI() != kAPIAAX)) // TB28082017
          {
              if(pParent)
              {
                    SetWindowPos(pParent, 0, 0, 0, parentW + dw, parentH + dh, SETPOS_FLAGS);
              }

              if(pGrandparent)
              {
                    SetWindowPos(pGrandparent, 0, 0, 0, grandparentW + dw, grandparentH + dh, SETPOS_FLAGS);
              }
          }
In fact this remove the whole SetWindowsPos code for all parents. Resizing works now for VST2/VST3/RTAS and AAX!

IPlugVST.cpp:void IPlugVST::ResizeGraphics(int w, int h)

Code:
 IGraphics* pGraphics = GetGUI();

  if (pGraphics)
  {
    mEditRect.left = mEditRect.top = 0;
    mEditRect.right = w;
    mEditRect.bottom = h;
      
// Inform host about window resizing    
mHostCallback(&mAEffect, audioMasterSizeWindow, pGraphics->Width(), pGraphics->Height(), 0, 0.0f);

    OnWindowResize();

#ifdef USING_YCAIRO
    ResizeCairoSurface();
#endif
I hope this helps
Thanks for the fix! I will check it out.

BTW, I tried you dpMeterXT. Very nice, I really need to step up the game with my Loudness Meter.. :P Also I manage to crash FL Studio by moving loudness graph...
__________________
Website | Facebook Page | IPlug-Youlean
Youlean is offline   Reply With Quote
Old 08-29-2017, 04:04 AM   #153
TBProAudio
Human being with feelings
 
TBProAudio's Avatar
 
Join Date: May 2014
Location: Germany
Posts: 643
Default

Quote:
Originally Posted by Youlean View Post
Also I manage to crash FL Studio by moving loudness graph...
With dpMeterXT? Thank you.
__________________
www.tbproaudio.de
TBProAudio is offline   Reply With Quote
Old 08-29-2017, 04:06 AM   #154
Youlean
Human being with feelings
 
Youlean's Avatar
 
Join Date: May 2015
Location: Serbia
Posts: 654
Default

Quote:
Originally Posted by TBProAudio View Post
With dpMeterXT? Thank you.
Yes. I wast just switching to loudness graph and moving it, then for some reason loudness graph got zoomed in and FL crashed. I was just using click and drag with mouse on graph.
__________________
Website | Facebook Page | IPlug-Youlean
Youlean is offline   Reply With Quote
Old 08-29-2017, 04:14 AM   #155
TBProAudio
Human being with feelings
 
TBProAudio's Avatar
 
Join Date: May 2014
Location: Germany
Posts: 643
Default

Quote:
Originally Posted by Youlean View Post
Yes. I wast just switching to loudness graph and moving it, then for some reason loudness graph got zoomed in and FL crashed. I was just using click and drag with mouse on graph.
Thank you for this, i will check it.
__________________
www.tbproaudio.de
TBProAudio is offline   Reply With Quote
Old 08-29-2017, 04:15 AM   #156
Youlean
Human being with feelings
 
Youlean's Avatar
 
Join Date: May 2015
Location: Serbia
Posts: 654
Default

Quote:
Originally Posted by TBProAudio View Post
Thank you for this, i will check it.
Ok, no problem.
__________________
Website | Facebook Page | IPlug-Youlean
Youlean is offline   Reply With Quote
Old 08-29-2017, 04:20 AM   #157
TBProAudio
Human being with feelings
 
TBProAudio's Avatar
 
Join Date: May 2014
Location: Germany
Posts: 643
Default

Quote:
Originally Posted by Youlean View Post
Ok, no problem.
...reproducible?
Thank you.
__________________
www.tbproaudio.de
TBProAudio is offline   Reply With Quote
Old 08-29-2017, 04:28 AM   #158
Youlean
Human being with feelings
 
Youlean's Avatar
 
Join Date: May 2015
Location: Serbia
Posts: 654
Default

Quote:
Originally Posted by TBProAudio View Post
...reproducible?
Thank you.
Yes, every time.
Attached Files
File Type: zip bandicam 2017-08-29 13-24-26-882.zip (729.4 KB, 122 views)
__________________
Website | Facebook Page | IPlug-Youlean
Youlean is offline   Reply With Quote
Old 08-29-2017, 08:12 AM   #159
TBProAudio
Human being with feelings
 
TBProAudio's Avatar
 
Join Date: May 2014
Location: Germany
Posts: 643
Default

Quote:
Originally Posted by Youlean View Post
Yes, every time.
Fixed with 1.1.7, thank you very much.
__________________
www.tbproaudio.de
TBProAudio is offline   Reply With Quote
Old 08-29-2017, 08:26 AM   #160
Youlean
Human being with feelings
 
Youlean's Avatar
 
Join Date: May 2015
Location: Serbia
Posts: 654
Default

Quote:
Originally Posted by TBProAudio View Post
Fixed with 1.1.7, thank you very much.
No problems.
__________________
Website | Facebook Page | IPlug-Youlean
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 05:33 AM.


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