|
02-28-2015, 08:51 AM
|
#441
|
Human being with feelings
Join Date: Jul 2006
Location: Cowtown
Posts: 1,562
|
Ah, cool.
RE: Updating Xcode, you may want to look at https://github.com/devernay/xcodelegacy - a shell script that takes specific installers for Xcode 3, 5, and 6 and updates your installed Xcode with all the old SDK bits - including PPC compilers, assemblers, and linkers - and the bits to make them show back up in the Xcode UI.
I haven't tested the PPC bits, but it looks pretty clever.
Scott
|
|
|
03-05-2015, 09:36 PM
|
#442
|
Human being with feelings
Join Date: Jul 2006
Location: Cowtown
Posts: 1,562
|
Well, just a quick followup - Installed Xcode 6.1.1 and applied the script from https://github.com/devernay/xcodelegacy (latest from github) - all of my existing code seems to compile cleanly and run with no issues, although I did have to alter my command-line build scripts to sed/filter out some noise where Xcode 6 doesn't like some old project file syntax (it's a warning but our scripts think it's an error and fails to proceed with the build).
I couldn't even come close to getting things to function on Xcode 5 or 6 prior to this.
I've built on Mavericks and Yosemite, so I'm calling it progress.
Scott
|
|
|
03-08-2015, 03:23 AM
|
#443
|
Human being with feelings
Join Date: Jul 2008
Location: The Netherlands
Posts: 3,646
|
Thanks for sharing.
|
|
|
03-11-2015, 04:12 AM
|
#444
|
Human being with feelings
Join Date: Jul 2008
Location: The Netherlands
Posts: 3,646
|
FYI: I have just updated to Xcode 6.2, and all I had to do is run XcodeLegacy.sh -install again.
|
|
|
03-11-2015, 07:06 AM
|
#445
|
Human being with feelings
Join Date: Jul 2006
Location: Cowtown
Posts: 1,562
|
Quote:
Originally Posted by Tale
FYI: I have just updated to Xcode 6.2, and all I had to do is run XcodeLegacy.sh -install again.
|
Yep, as long as you don't clean up your source directory with all of the packages, it should be relatively painless to reinstall after an Xcode update. Do keep up with the github history on that script - at some point Xcode is going to change enough that the script will break...
Scott
|
|
|
03-11-2015, 09:04 AM
|
#446
|
Human being with feelings
Join Date: Feb 2015
Posts: 36
|
I would like to know if someone has this, if there is any charts/map regarding target vs host, for example:
VST 2 - Windows - x86/x64: can target Reaper, Ableton, Cubase...
VST 2 - Mac - x86/x64: same but for mac version of host above...
VST 3 - Windows - x86/x64: hum, anyone :d ?
AU - Mac - x86: Logic 9
AU - Mac - x64: Logic X
And like that for every target, at least for top 5/10 host of the market, with Windows/Mac difference...
If someone has this, or should I start to make it?
This idea comes first from the AAX build: I have difficult to see who's really using/need it; PT seems to be the "main" one for AAX build, but it also seems to support VST...
|
|
|
03-11-2015, 09:13 AM
|
#447
|
Human being with feelings
Join Date: Jul 2006
Location: Cowtown
Posts: 1,562
|
Quote:
Originally Posted by Deisss
This idea comes first from the AAX build: I have difficult to see who's really using/need it; PT seems to be the "main" one for AAX build, but it also seems to support VST...
|
What on earth makes you think that VST is supported in Pro Tools? In PT 11 ONLY AAX 64-bit is supported. In PT10 AAX 32-bit and RTAS 32-bit are supported, and in any prior version only RTAS is supported (I'm leaving out AS and TDM as AS is/can be part of RTAS, and we have no way of building TDM with current tools. Same with AAX DSP rather than AAX Native).
Pro Tools is the ONLY host that uses AAX or RTAS.
|
|
|
03-12-2015, 04:13 AM
|
#448
|
Human being with feelings
Join Date: Feb 2015
Posts: 36
|
I just check on internet, I don't have pro tools by myself, just the SDK for now
Thanks for clarity, so I've to build RTAS/AAX also
|
|
|
03-12-2015, 06:47 AM
|
#449
|
Human being with feelings
Join Date: Jul 2006
Location: Cowtown
Posts: 1,562
|
Quote:
Originally Posted by Deisss
I just check on internet, I don't have pro tools by myself, just the SDK for now
Thanks for clarity, so I've to build RTAS/AAX also
|
Are you an official Avid developer partner? If not, it won't matter if you obtained the SDK or not - you have to be able to digitally sign the plugins before they'll load in Pro Tools, and you won't get that without signing contracts and getting a license to the required signing tools.
If you're not a partner, don't bother building for AAX - you won't get it to work.
Sorry...
Scott
|
|
|
03-12-2015, 06:55 AM
|
#450
|
Human being with feelings
Join Date: Feb 2015
Posts: 36
|
Hum are you saying that having the SDK is not enough ???
I get this email "Welcome to Avid's Audio Development Partners program." which let me download SDK, and ask to a guy for a iLok key for testing purpose, I was thinking it will be enough, or I'm missing something ?
|
|
|
03-12-2015, 07:08 AM
|
#451
|
Human being with feelings
Join Date: Jul 2006
Location: Cowtown
Posts: 1,562
|
There's more to it - but ask your contact at Avid and read the documentation - we can't discuss further here in public due to the NDA (Non-Disclosure Agreement) that you (and I) had to sign to be part of the program.
Scott
|
|
|
03-12-2015, 07:10 AM
|
#452
|
Human being with feelings
Join Date: Feb 2015
Posts: 36
|
Thanks I will pay attention to that (for now I just register to it, but I didn't see any NDA, I do read what they ask me to sign up)
|
|
|
03-12-2015, 09:45 AM
|
#453
|
Human being with feelings
Join Date: Apr 2012
Posts: 279
|
...rumours are floating around that going with PACE (essential for AAX) costs you 500$/year...
... that whole NDA crap is ridiculous!
|
|
|
03-23-2015, 03:48 AM
|
#454
|
Human being with feelings
Join Date: Aug 2011
Posts: 89
|
Oli, is it possible to have anything to wrap the mouse in some way? In Spiral I added an area where you can scroll a recorded spectrogram from side to side with the mouse, what I'd want to do is make it scrollable without having the edge of the screen stopping the cursor (when I go back and click to drag it again I often end up clicking outside the window, which is kind of bad), is that possible? Actually that would be nice if knobs could do that too, like right now you want to turn a knob down but get stopped halfway because you reach the edge of the screen.
Quote:
Originally Posted by stw
...rumours are floating around that going with PACE (essential for AAX) costs you 500$/year...
... that whole NDA crap is ridiculous!
|
Ed Gray told me Avid pays the $500 for you since 2014. I seem to recall they also give you a copy of PT to test your plugins, though I didn't bother to try that myself.
All that hoop jumping (what with the plugin signing and all that) just to cover an extra 3% of the market though... It's pretty amazing they manage to thrive despite all that lock-in when the rest of the market uses much more open common formats.
|
|
|
03-23-2015, 08:52 AM
|
#455
|
Human being with feelings
Join Date: Jul 2006
Location: Cowtown
Posts: 1,562
|
Quote:
Originally Posted by A_SN
All that hoop jumping (what with the plugin signing and all that) just to cover an extra 3% of the market though... It's pretty amazing they manage to thrive despite all that lock-in when the rest of the market uses much more open common formats.
|
Not sure where you're getting your market percentages - by at least one measure (a Gearslutz favorite DAW poll for 2014/2015) Pro Tools still has about a ~14% market share. The Gearslutz poll suffers from the same problems that any forum poll does - it has pre-selection and self-selection bias, probably an insufficient sample size, and only reflects those that use DAWs AND use Gearslutz AND take the time to respond.
Note that the reported % for Pro Tools is higher than REAPER's, although not by a lot. Pretty much everyone's clock gets cleaned by Logic, which is only available on OS X...
If you have actual numbers to back up your statement, I'd be interested in seeing them. If it's just your opinion, then that's cool too, although you might want to state that instead of presenting it as a fact.
SAW/SAC's plugin format is perfectly open, as is LADSPA and LV2...yet I don't see all that many people developing for them. "Open" is no guarantee of success, just as "Proprietary" doesn't mean you'll fail.
|
|
|
03-23-2015, 10:00 AM
|
#456
|
Human being with feelings
Join Date: Aug 2011
Posts: 89
|
I seem to vaguely recall hearing that on KVR year ago (maybe I got it from there http://www.synthtopia.com/content/20...-in-the-world/ which granted has little to do with marketshare and is old). I really don't think it can be that much more. For instance I barely get more mails asking for AAX than I get mail for Linux versions. If you look at the KVR database there's more people who say they own Bitwig Studio than PT (let's not even compare with Ableton Live, Reaper, Logic or FL Studio).
But as far as I'm concerned it's not even just that, it's more how much more money would I make if I had an AAX version. That means who really needs an AAX version, who only uses PT and doesn't have a VST adapter for it (a pretty crazy choice if you ask me). I strongly doubt it's more than a handful of percents, and you know, plugin sales are very flexible, I could make an extra few percents every year by making an extra video or asking someone to do a review. So bothering with the whims of Avid (the now mandatory digital signing, the new format every few years, the NDAs, the attitude (they got mad at me cause I put out an AAX build I hadn't tested that didn't work because it wasn't signed, they complained it made them look bad... You don't get e-mails from Steinberg when you fuck your VSTs up lol) and so forth) doesn't seem worth the bother to me.
Oh but you actually sell AAX plugins, maybe you have data on what format accounts for how much? That would be interesting.
lol btw it's really hard to read ФГІБДЯС as Oligarc and not as Fgibdias/Fhibdias
Quote:
Originally Posted by sstillwell
SAW/SAC's plugin format is perfectly open, as is LADSPA and LV2...yet I don't see all that many people developing for them. "Open" is no guarantee of success, just as "Proprietary" doesn't mean you'll fail.
|
Yeah, but the comparative lack of appeal is there. On one hand you have VST/AU which are as open as they need to be and supported by pretty much everything, it's uncontrolled enough that they can't even kill the 9 year old VST 2.4 format, and you don't have to deal with a $500/year nonsense uncrackable antipiracy thingie, it's like, you do whatever you want with no one breathing down your neck, no NDA, no having to digitally sign whatever. On the other hand you have AAX, made by one company that has a history of making a few plugin formats too many, it's pretty new, you have to jump through the aforementioned hoops and it only works for one product.
Like, you can use the formats that everyone use with nothing getting in the way, and you can use the one format that just one company is trying to make happen and that is considerably more burdensome to deal with. Money and marketshare aside, why would I even want to support that approach?
Wait, I just did some googling and it looks like the Avid format situation is even worse than I thought (TDM, RTAS and AAX), it looks like there's a whole bunch of different AAX formats? What's all that stuff, Dynamics AAX, AAX AudioSuite, AAX Native, Instrument AAX, AAX DSP and so on? It looks scary.
|
|
|
04-13-2015, 02:58 PM
|
#457
|
Human being with feelings
Join Date: Apr 2009
Location: Berlin, Germany
Posts: 1,248
|
Anyone here going to Musikmesse? I'll be there thursday and friday if you fancy meeting up.
|
|
|
04-14-2015, 12:18 AM
|
#458
|
Human being with feelings
Join Date: Jul 2008
Location: The Netherlands
Posts: 3,646
|
Quote:
Originally Posted by olilarkin
Anyone here going to Musikmesse? I'll be there thursday and friday if you fancy meeting up.
|
I would have liked to go, but I just don't have the time right now. Maybe next year...
|
|
|
04-22-2015, 05:33 AM
|
#459
|
Human being with feelings
Join Date: Aug 2011
Posts: 89
|
I'm really struggling with something simple. Auvaltool fails for my plug, so naturally I want to debug it, but how do I do that with Xcode 6? What I do right now is attach the debugger in Xcode to arch (so it waits for arch to run) then in the terminal I run "arch -x86_64 auvaltool -v aufx 2hwb Phsr" and it works except I get the x86 asm disassembly instead of the more helpful original C++ sources. I'm of course using the debug build of my plug.
|
|
|
04-22-2015, 05:55 AM
|
#460
|
Human being with feelings
Join Date: Apr 2009
Location: Berlin, Germany
Posts: 1,248
|
i specify /usr/bin/auvaltool as the executable. I make a symlink to this in my home directory to make it easier to find.
On OSX 10.9+ (IIRC) auval defaults to x64. You have to specify -32 as an argument to debug the 32 bit version.
the following args (see screenshot) allow me to debug the IPlugEffect au
|
|
|
04-23-2015, 04:27 AM
|
#461
|
Human being with feelings
Join Date: Aug 2011
Posts: 89
|
Quote:
Originally Posted by olilarkin
i specify /usr/bin/auvaltool as the executable. I make a symlink to this in my home directory to make it easier to find.
On OSX 10.9+ (IIRC) auval defaults to x64. You have to specify -32 as an argument to debug the 32 bit version.
the following args (see screenshot) allow me to debug the IPlugEffect au
|
Okay thanks, I managed to do that, although only for the Run target, doesn't work with Test as it won't let me add a target to test, so I have to switch between Debug and Release in Run all the time. Xcode 6's interface sucks, there doesn't even seem to be anything anywhere for me to select between Release/Debug/Tracer like Xcode 3, only editing the Scheme.
I've figured out my crash, and it might be useful for those of you who aren't using a 2007 MacBook Pro like I am. LLVM defaulted to SSE 4.2 (which in this case used the ROUNDSD instruction introduced with SSE 4.1 for the floor() call used in InitDouble()) which my Intel Core 2 Duo doesn't support (since it's limited to SSSE 3), so you might want to watch out for which SSE level is used or users with older machines might have a mysterious bug you won't be able to reproduce. Btw the lowest option now is SSE 3?
Also Oli, is there definitely no way to capture the mouse for my dragging problem?
Edit: isn't it weird to get twice as much FPS on Windows as on Mac on the same machine? I'm talking 30 to 64 FPS vs 15 to 30 with the FPS setting maxed out.
Last edited by A_SN; 04-23-2015 at 02:33 PM.
|
|
|
04-30-2015, 03:21 AM
|
#462
|
Human being with feelings
Join Date: Feb 2015
Posts: 6
|
Non-Parameter Controls
Is there a recommended way of handling GUI controls, which are not bound to parameters?
As far as I understand, parameters are made available by WDL-OL for automation and for preset-management. If I want to implement a simple push button, which shows for example a file dialog, what is the preferred method to implement it?
|
|
|
04-30-2015, 11:27 PM
|
#463
|
Human being with feelings
Join Date: Jul 2008
Location: The Netherlands
Posts: 3,646
|
I would subclass one of the default controls, and then override its OnMouseDown().
|
|
|
05-01-2015, 12:22 AM
|
#464
|
Human being with feelings
Join Date: Oct 2014
Posts: 16
|
Quote:
Originally Posted by ThorstenS
Is there a recommended way of handling GUI controls, which are not bound to parameters?
As far as I understand, parameters are made available by WDL-OL for automation and for preset-management. If I want to implement a simple push button, which shows for example a file dialog, what is the preferred method to implement it?
|
I think it worth noting that IControl's parameter paramIdx has a default value of -1.
When paramIdx is -1 the control is not associated to any audio parameter/automation.
So you can still pGraphics->AttachControl it to your GUI, without necessarily affecting any audio parameter. I think that might be what you're after for your button.
|
|
|
05-01-2015, 11:02 AM
|
#465
|
Human being with feelings
Join Date: Feb 2015
Posts: 6
|
Overriding OnMouseDown() would require to define a new class for each different button. In turn each OnMouseDown() code would need to execute some code of the IPlug parent, in order to do something meaningful.
To provide a generic solution for all users of WDL-OL, I suggest to create a generic empty callback in IPlugBase, like:
virtual void HandleChildEvents(int sender_id, int msg, int iparam = 0, void *pparam = NULL) { /* IMutexLock lock(this); */ }
sender_id: arbitrary ID that was assigned to the control
msg: self-defined message, like ON_CLICK = 1, etc.
iparam and pparam: free to use as required
Any non-paramter-related controls, like buttons, etc. can be derived from a generic class IChildControl : public IControl
{
protected:
int m_nID;
public:
IChildControl(IPlugBase *pPlugParent, IRECT pR, int id,
IChannelBlend::EBlendMethod blendMethod = IChannelBlend::kBlendNone)
: IControl(pPlugParent, pR, -1, blendMethod),
m_nID(id)
{
}
void OnMouseUp(int x, int y, IMouseMod *pMod)
{
mPlug->HandleChildEvents(m_nID, IPlugBase::IMSG_CLICKED);
}
};
class CMyButton : public IChildControl
...
Any chances that I add something like this to WDL-OL and it will be accepted?
|
|
|
06-01-2015, 06:08 AM
|
#466
|
Human being with feelings
Join Date: Apr 2012
Posts: 279
|
Quote:
Originally Posted by Tale
FYI: I have just updated to Xcode 6.2, and all I had to do is run XcodeLegacy.sh -install again.
|
I updatet to OSX10.10.3 and XCode6.2 yesterday. After downloading all necessary older XCode versions the XcodeLegacy.sh script installed everything fine!
However I wasn't able to do successful builds afterwards. I started leaving everything untouched (coming from XCode3.6). Bunch of errors...
Then i tweaked Compiler/Deloyment/SDK settings to all kind of permutations but still couldn't succeed. At least one error shows up in all kind of settings:
Code:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld: line 37: Running: command not found
collect2: ld returned 127 exit status
Command /Applications/Xcode.app/Contents/Developer/usr/bin/g++-4.2 failed with exit code 1
Anyone here who can give some advice, an idea on how to fix it or tell me a proper Project configuration?
|
|
|
06-01-2015, 08:16 AM
|
#467
|
Human being with feelings
Join Date: Aug 2011
Posts: 89
|
You'd just have to change the compiler to llvm in the common.xcconfig (or something like that) file that WDL has.
I for one didn't run that script, I just copied the old SDKs into the Xcode package and changed the compiler to llvm.
|
|
|
06-01-2015, 09:36 AM
|
#468
|
Human being with feelings
Join Date: Apr 2012
Posts: 279
|
Quote:
Originally Posted by A_SN
You'd just have to change the compiler to llvm in the common.xcconfig (or something like that) file that WDL has.
I for one didn't run that script, I just copied the old SDKs into the Xcode package and changed the compiler to llvm.
|
Thanks for looking at it but using LLVM GCC4.2 gives the same error and using Apple LLVM 6.0 results in other errors depending on the other settings settings.
|
|
|
06-01-2015, 09:56 AM
|
#469
|
Human being with feelings
Join Date: Apr 2009
Location: Berlin, Germany
Posts: 1,248
|
if you check out a separate copy of WDL-OL without modifying anything do the examples compile?
|
|
|
06-01-2015, 10:22 AM
|
#470
|
Human being with feelings
Join Date: Apr 2012
Posts: 279
|
Quote:
Originally Posted by olilarkin
if you check out a separate copy of WDL-OL without modifying anything do the examples compile?
|
Yep... tried IPlugEffect and it runs thru. So the odds seem to be on my side. I'll verify the original settings with my project settings and report back if i find out anything...
|
|
|
06-02-2015, 09:02 AM
|
#471
|
Human being with feelings
Join Date: Apr 2012
Posts: 279
|
Quote:
Originally Posted by olilarkin
if you check out a separate copy of WDL-OL without modifying anything do the examples compile?
|
Ok, seems i was a bit to fast with my last reply. I didn't notice last time that i hadn't set the right target for the build. By mistake i had default base_32&63_intel as building scheme... sorry for that.
Today when trying to build a vst/au target the mentioned errors show up even on a fresh wdl-ol-next folder.
So maybe it's better to sort that out on a clean IPlugEffect example.
BTW: Any example on any target gets these two errors:
clang: error: unable to execute command: No such file or directory
clang: error: linker command failed due to signal (use -v to see invocation)
In detail:
Code:
Ld /Library/Audio/Plug-Ins/VST/IPlugEffect.vst/Contents/MacOS/IPlugEffect normal i386
cd /Users/stefanweyel/Desktop/wdl-ol-next/IPlugExamples/IPlugEffect
export MACOSX_DEPLOYMENT_TARGET=10.5
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch i386 -bundle -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.5.sdk -L/Users/stefanweyel/Desktop/wdl-ol-next/IPlugExamples/IPlugEffect/build-mac -F/Users/stefanweyel/Desktop/wdl-ol-next/IPlugExamples/IPlugEffect/build-mac -filelist /Users/stefanweyel/Desktop/wdl-ol-next/IPlugExamples/IPlugEffect/build-mac/IPlugEffect.build/Debug/VST2.build/Objects-normal/i386/IPlugEffect.LinkFileList -mmacosx-version-min=10.5 /Users/stefanweyel/Desktop/wdl-ol-next/WDL/lice/build-mac/Debug/lice.a -framework Cocoa -framework Carbon -o /Library/Audio/Plug-Ins/VST/IPlugEffect.vst/Contents/MacOS/IPlugEffect
Running ld for i386 ...
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld-original: fork: Resource temporarily unavailable
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld-original: line 37: Running: command not found
.
.
.
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld: line 37: Running: command not found
clang: error: unable to execute command: No such file or directory
clang: error: linker command failed due to signal (use -v to see invocation)
Maybe a simple rights management issue (though i looked into it and couldn't find anything odd)?
Now i'm really screwed
Last edited by stw; 06-02-2015 at 09:10 AM.
|
|
|
06-03-2015, 05:41 AM
|
#472
|
Human being with feelings
Join Date: Apr 2012
Posts: 279
|
just to finish the story...it works now.
Unfortunately i can't exactly say what caused the problems or what helped (i was too tired to only alter a single setting for every trial and error).
I guess one step was to run all base and lice schemes? After doing that i got other errors which i could trace all. However some XCode settings were definitely corrupted without any input from my side when moving from v3 to v6.
Anyway thanks to everyone who cared!
|
|
|
06-08-2015, 05:32 AM
|
#473
|
Human being with feelings
Join Date: Jun 2015
Location: Los Angeles, CA
Posts: 8
|
Hi Oli,
First of all, thanks for the great work, you make our life far easier
I've just finished my first plug and works perfectly, EXCEPT in SoundForge. I was debugging the last few hours and found a strange thing, so please let me know if it's my mistake:
If I should call the Reset() function from the constructor then it's my bad and forget the whole post. But somehow it seemed for me all the hosts call it so no need to call Reset() for the initialization codes, it's the host's responsibility.
So when SoundForge previewed the effect everything went perfect, but when I pressed OK for render, the output was a mess. Long story short, what I found was all the initialized variables that was initialized by Reset() function became zero (or unpredictable). I don't know who should call the Reset() function, but somehow it seems for me a new instance of the plugin is created when I press OK for render, but the Reset() function is not called before the host re-sets the parameters...
My solution was to call Reset() from the plugin's constructor and it solved the problem but somehow I have a feeling it's just a bad patch.
|
|
|
06-08-2015, 08:13 AM
|
#474
|
Human being with feelings
Join Date: Jul 2008
Location: The Netherlands
Posts: 3,646
|
I'm not Oli, but...
Quote:
Originally Posted by FineCutBodies
So when SoundForge previewed the effect everything went perfect, but when I pressed OK for render, the output was a mess. Long story short, what I found was all the initialized variables that was initialized by Reset() function became zero (or unpredictable). I don't know who should call the Reset() function, but somehow it seems for me a new instance of the plugin is created when I press OK for render, but the Reset() function is not called before the host re-sets the parameters...
|
Well (assuming VST 2.4 here as an example), the host should call effSetSampleRate and effSetBlockSize, which in turn will call your plug-in's Reset(). I really don't see how a host could skip calling effSetSampleRate, because then you would not know at which sample rate to operate (although I guess you could assume 44.1 kHz).
Quote:
Originally Posted by FineCutBodies
My solution was to call Reset() from the plugin's constructor and it solved the problem but somehow I have a feeling it's just a bad patch.
|
Well, I think this might be a good idea, because this will at least always init your variables. Not really necessary, but just to be sure you might want to move the init code from Reset() to your own internal reset method, i.e.:
Code:
MyPlug::MyPlug(IPlugInstanceInfo instanceInfo):
IPLUG_CTOR(kNumParams, kNumPrograms, instanceInfo)
{
InternalReset();
}
void MyPlug::Reset()
{
TRACE; IMutexLock lock(this);
InternalReset();
}
void MyPlug::InternalReset()
{
// Init variables here.
}
The only downside is that if your InternalReset() does some heavy lifting (e.g. resampling loads of samples), then this is possibly done twice (once at 44.1 kHz during construction, and again when the real sample rate is known).
|
|
|
06-08-2015, 07:09 PM
|
#475
|
Human being with feelings
Join Date: Jun 2015
Location: Los Angeles, CA
Posts: 8
|
Quote:
Originally Posted by Tale
I'm not Oli, but...
|
Anyway thanks Tale (btw using your plugs for a while now, great stuff)!
Quote:
Originally Posted by Tale
Well (assuming VST 2.4 here as an example), the host should call effSetSampleRate and effSetBlockSize, which in turn will call your plug-in's Reset(). I really don't see how a host could skip calling effSetSampleRate, because then you would not know at which sample rate to operate (although I guess you could assume 44.1 kHz).
|
Yes it's VST2.4 and I'm operating on 48kHz and yes it's strange, but happens I've made a little video to show how the 3 small addition to IPlugEffect can reproduce it, pretty straightforward:
https://dl.dropboxusercontent.com/u/...-OL_%2B_SF.mp4
Quote:
Originally Posted by Tale
Well, I think this might be a good idea, because this will at least always init your variables. Not really necessary, but just to be sure you might want to move the init code from Reset() to your own internal reset method, i.e.:
The only downside is that if your InternalReset() does some heavy lifting (e.g. resampling loads of samples), then this is possibly done twice (once at 44.1 kHz during construction, and again when the real sample rate is known).
|
yeah that's a good workaround, but not sure if this problem is Sony's bug or can be prevented in WDL-OL too...
Anyway thanks for the quick reply!
Last edited by FineCutBodies; 06-08-2015 at 07:17 PM.
|
|
|
06-09-2015, 03:10 AM
|
#476
|
Human being with feelings
Join Date: Jul 2008
Location: The Netherlands
Posts: 3,646
|
I have looked into this myself (using my own WDL/IPlug), but I can't confirm this issue. At my end, using Sound Forge Pro TRIAL v11.0 (Build 299) at 48 kHz, my plug-in receives both effSetSampleRate and effSetBlockSize, and so my plug-in's Reset() is certainly called. Sound Forge does seem to first call effSetSampleRate with 44.1 kHz (Sound Forge's default?), and again with 48 kHz.
Preview:
effSetSampleRate: 44100
effMainsChanged
effSetBlockSize: 4410
effSetSampleRate: 48000
effMainsChanged
effSetBlockSize: 4800
OK:
effSetSampleRate: 48000
effMainsChanged
effSetBlockSize: 4800
effMainsChanged
Note that I have only logged the VST opcodes that call Reset().
EDIT: I have just retested using WDL-OL, but I still don't see the issue.
Last edited by Tale; 06-09-2015 at 03:30 AM.
Reason: Retested using WDL-OL
|
|
|
06-10-2015, 11:49 AM
|
#477
|
Human being with feelings
Join Date: Apr 2009
Posts: 191
|
|
|
|
06-10-2015, 02:24 PM
|
#478
|
Human being with feelings
Join Date: Jun 2015
Location: Los Angeles, CA
Posts: 8
|
Quote:
Originally Posted by Tale
I have looked into this myself (using my own WDL/IPlug), but I can't confirm this issue. At my end, using Sound Forge Pro TRIAL v11.0 (Build 299) at 48 kHz, my plug-in receives both effSetSampleRate and effSetBlockSize, and so my plug-in's Reset() is certainly called. Sound Forge does seem to first call effSetSampleRate with 44.1 kHz (Sound Forge's default?), and again with 48 kHz.
Note that I have only logged the VST opcodes that call Reset().
EDIT: I have just retested using WDL-OL, but I still don't see the issue.
|
Thanks Tale, I just made a few more tests (SF10 and SF11) and my assumption was wrong and yes Reset is called, but in a strange order:
1, Constructor
2, OnParamChange
3, Reset
... so if you use any variable in OnParamChange, what should be initialized in Reset, then it won't be initialized.
Attached 2 pics (on the code I used the red dots to sign what changes I made to IPlugEffect) and you can see the output of the plugin on the other.
|
|
|
06-10-2015, 02:59 PM
|
#479
|
Human being with feelings
Join Date: Jul 2008
Location: The Netherlands
Posts: 3,646
|
Quote:
Originally Posted by FineCutBodies
Thanks Tale, I just made a few more tests (SF10 and SF11) and my assumption was wrong and yes Reset is called, but in a strange order:
1, Constructor
2, OnParamChange
3, Reset
... so if you use any variable in OnParamChange, what should be initialized in Reset, then it won't be initialized.
|
Yeah, I agree the order is sometimes a little cumbersome (especially if your computed parameter value depends on another parameter's computed value, or on the sample rate), but that is the correct order. I find it best not to depend on a particular order, especially because both OnParamChange() and Reset() can be called again (and again) later on, e.g. when a parameter changes, or when the sample rate changes, etc.
|
|
|
06-11-2015, 01:18 AM
|
#480
|
Human being with feelings
Join Date: Jun 2015
Location: Los Angeles, CA
Posts: 8
|
Quote:
Originally Posted by Tale
Yeah, I agree the order is sometimes a little cumbersome (especially if your computed parameter value depends on another parameter's computed value, or on the sample rate), but that is the correct order. I find it best not to depend on a particular order, especially because both OnParamChange() and Reset() can be called again (and again) later on, e.g. when a parameter changes, or when the sample rate changes, etc.
|
Ohh, then it was just my ignorance, thanks for clearing it!
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 07:54 AM.
|