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: 140
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: 313
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.tb-software.com/TBProAudio
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: 389
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: 389
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: 313
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.tb-software.com/TBProAudio
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: 389
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: 313
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.tb-software.com/TBProAudio
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: 313
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.tb-software.com/TBProAudio
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: 389
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: 313
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.tb-software.com/TBProAudio
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: 389
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: 313
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.tb-software.com/TBProAudio
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: 389
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: 389
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: 313
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.tb-software.com/TBProAudio
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: 389
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: 389
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: 389
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: 313
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.tb-software.com/TBProAudio
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: 389
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: 313
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.tb-software.com/TBProAudio
TBProAudio is offline   Reply With Quote
Old 06-20-2017, 09:25 PM   #142
Bobflip
Human being with feelings
 
Join Date: Nov 2016
Posts: 74
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
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 08:21 PM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2017, vBulletin Solutions, Inc.