Avatar

Please consider registering
Guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed sp_TopicIcon
Extra Meters not working
No permission to create posts
September 28, 2018
3:42 am
Avatar
TheSmile
Member
Members
Forum Posts: 28
Member Since:
June 25, 2018
sp_UserOfflineSmall Offline

Hi,

me again - seems I run into all possible problems ūüėÄ

I have now 3 projects, working fine as VST but not as AU - okay the work but "Extra Meters" don't.
All meters defined in "User Meter Bank" (the 20 Meters available in the 2Monitor Area" work as expected but all extra defined meters do not.

Any idea what I'm doing wrong?

Thanks again!

September 28, 2018
11:21 am
Avatar
W Pirkle
Admin
Forum Posts: 267
Member Since:
January 29, 2017
sp_UserOfflineSmall Offline

Is the extra meter issue AU only? I will check...

- Will

September 28, 2018
1:42 pm
Avatar
TheSmile
Member
Members
Forum Posts: 28
Member Since:
June 25, 2018
sp_UserOfflineSmall Offline

I didn't check AAX - VST/VST3 works fine ūüėČ

September 28, 2018
9:58 pm
Avatar
TheSmile
Member
Members
Forum Posts: 28
Member Since:
June 25, 2018
sp_UserOfflineSmall Offline

Only to verify i made a project with two knobs and two meters. The first meter from the User Meter Bank works. The second from Extra Meters doesnt.

September 29, 2018
3:13 pm
Avatar
W Pirkle
Admin
Forum Posts: 267
Member Since:
January 29, 2017
sp_UserOfflineSmall Offline

Hi - this issue has been fixed in v6.9.3.0 which you can now download:

http://www.willpirkle.com/rack.....downloads/

This also updates the VST projects to fix the MIDI issue you reported too. 

Open your existing RackAFX project and you should get a notice about the 6.9.3.x AU update. All this is really doing is updating one file, pluginconstants.h in your project folder. When you export the AU plugin, you will get a new file for RackAFX2AUFilter.cpp that includes the update for the added meters. This, in combination with the updated pluginconstants.h file, will set you up. 

You can then re-export as AU and get the meter fix. The AAX project did not require the fix in its native project files, but it does require the updated pluginconstants.h file when you do the export.

Thanks for your reports!

- Will

September 29, 2018
5:19 pm
Avatar
TheSmile
Member
Members
Forum Posts: 28
Member Since:
June 25, 2018
sp_UserOfflineSmall Offline

Thanks - everything seems to work great now!
got this little Error compiling: "Use of undeclared identifier 'pi_¬†in synthfunctions.h" what was easy to fix ūüėČ

Thanks again!

September 29, 2018
10:57 pm
Avatar
TheSmile
Member
Members
Forum Posts: 28
Member Since:
June 25, 2018
sp_UserOfflineSmall Offline

Only not to open another Topic (if it's okay) 

I have one more issue - when i build as Debug everything is fine.

WHen i build as Release - i get an auval error: "VERIFYING CUSTOM UI
ERROR: Cocoa Views Information cannot be retrieved"

Any idea?

And one question: Where is the preset management handled? I need to save strings and one array.

Thanks again!

October 1, 2018
9:28 am
Avatar
W Pirkle
Admin
Forum Posts: 267
Member Since:
January 29, 2017
sp_UserOfflineSmall Offline

I am not able to replicate an error with auval and the Cocoa UI. I used the ALL_BUILD scheme and changed it to Release; I also tried combinations of the plugin and cocoa UI (they are two separate targets) in debug and release and still did not get an error. I also tried Build For... in every configuration.

But I can explain what you might look for. The entire plugin is contained in the RackAFX2AUFilter.cpp file.

1. The query from the host about your cocoa UI comes in two parts: first the host (or auval) calls RackAFX2AUFilter::GetPropertyInfo( ) and you can see the code that checks your RAFX plugin to see if it has a custom GUI. This function must be succeeding because if it does not, auval won't bother looking any further for the GUI.

if(m_pRAFXPlugIn->m_bUseCustomVSTGUI)

{

     outWritable = false;

     outDataSize = sizeof(AudioUnitCocoaViewInfo);

     return noErr;

}

Next, RackAFX2AUFilter::GetProperty( ) is called when the host (or auval) queries the plugin to actually find the cocoa UI. It uses the bundle identifier and the unique cocoa view name (cocoa has a flat namespace that is a pain for the GUI component - we have to generate a unique cocoa view factory class. You can find that code in its entirety in the function. This is from my meter test plugin with bundle ID developer.audiounit.metermapiii and cocoa class factory MeterMapIII5424765_ViewFactory:

if (inScope == kAudioUnitScope_Global)

{

   switch(inID)

   {

    // --- This property allows the host application to find the UI associated with this

   case kAudioUnitProperty_CocoaUI:

   {

   // --- Look for a resource in the main bundle by name and type.

   CFBundleRef bundle = CFBundleGetBundleWithIdentifier( CFSTR("developer.audiounit.metermapiii") );

   if(bundle == NULL) return fnfErr;

   CFURLRef bundleURL = CFBundleCopyResourceURL(bundle,

      CFSTR("MeterMapIII"), // this is the name of the cocoa bundle as specified in the CocoaViewFactory.plist

      CFSTR("bundle"), // this is the extension of the cocoa bundle

      NULL);

 

   if(bundleURL == NULL) return fnfErr;

 

   CFStringRef className = CFSTR("MeterMapIII5424765_ViewFactory"); // name of the main class AUCocoaUIBase protocol

   AudioUnitCocoaViewInfo cocoaInfo = { bundleURL, {className} };

   *((AudioUnitCocoaViewInfo *)outData) = cocoaInfo;

   return noErr;

   }

   return kAudioUnitErr_InvalidProperty;

}

As long as the bundle ID and class factory match up, the function should return noErr (success). You can find the class factory and view objects in the Cocoa UI part of the XCode project. When you export with RackAFX, it generates that strange looking Cocoa UI name in an attempt to keep it unique. You can test whether it is unique by removing all the AUs from your plugin folder (below) and running AUVAL again. 

An issue here is that the bundle ID is really just a string and you can't have weird characters in it, or even the "_" -- you can check the value against the bundle ID you get from your target's INFO panel in XCode. 

2. When both the plugin and cocoa UI are compiled, the project will then packaged the UI to be *inside* of the plugin component. You can find this manually by opening the AU plugin folder where all AUs reside (~/Library/Audio/Plug-Ins/Components). Right click on the plugin and choose Show Package Contents. Navigate to Components/Resources and you will find all of the PNG files that are in your project. Among those files will be the cocoa UI, which will be named <project>.bundle (e.g. for mine above, I found it as MeterMapIII.bundle). The timestamp on that file should exactly (or within 60 seconds) match the timestamp of the plugin (<project>.component) that holds it. 

So, when you run AUVAL, it calls the functions above - if they do not succeed you get the error. If they succeed, then AUVAL tries to find the cocoa UI bundle inside of the component. If it finds it, then it is satisfied that the UI exists (note that it does not actually try to open the GUI). 

3. The presets are set in a statically declared array that is made when you export your plugin. You can find that array, which is just a list of the preset names, about a third of the way down in the .cpp file

static const int kNumberPresets = 12;

static AUPreset kPresets[kNumberPresets] = {

{ 0, CFSTR("Factory Preset") },

{ 1, CFSTR("LL") },

{ 2, CFSTR("GG") },

etc...

Unfortunately, the way the preset values are stored on your RackAFX plugin's parameters is complicated and you can't easily alter or add new presets after the fact - that should be done in RackAFX. 

Hope that helps - 

Will

October 1, 2018
2:03 pm
Avatar
TheSmile
Member
Members
Forum Posts: 28
Member Since:
June 25, 2018
sp_UserOfflineSmall Offline

Thanks - gonna check that asap.
I didn't mean presets - sorry. I meant the functions like setState() or getState() to save the plugins state within a DAW session.

October 1, 2018
5:33 pm
Avatar
TheSmile
Member
Members
Forum Posts: 28
Member Since:
June 25, 2018
sp_UserOfflineSmall Offline

Okay - that helped me out - the hint was the plugin.bundle, which (whyever) was not existent in my Release builds. Deleting all in the AU subfolders and than build Debug first and then Release works. I'll make some further tests to find out when this happens ūüėČ

I hope i don't border you with my problems - an thanks for all the time you spend and patience you have.

But - I ran into the next thing - a MIDI issue. I'll send you a Mail with a test project that you only need to build ...

Greetz & Thanks!

October 2, 2018
8:33 am
Avatar
W Pirkle
Admin
Forum Posts: 267
Member Since:
January 29, 2017
sp_UserOfflineSmall Offline

No problem with the questions - but my real job at the University of Miami prevents me from replying instantly to a lot of stuff. I'll check the MIDI issue.

As for presets, AU does not have a getState( ) or setState( ) function; the default serialization is done internally and there is a massive message loop in use. You can also try to set a breakpoint in the Reset( ) function; it is called when presets are loaded and you can back-track from that function. 

- Will

October 7, 2018
10:41 pm
Avatar
TheSmile
Member
Members
Forum Posts: 28
Member Since:
June 25, 2018
sp_UserOfflineSmall Offline

You refer to the RackAFX2AUFilter::Reset(blabla) function in RackAFXAUFilter.cpp right?

I keep on digging ūüėÄ

October 13, 2018
12:17 am
Avatar
TheSmile
Member
Members
Forum Posts: 28
Member Since:
June 25, 2018
sp_UserOfflineSmall Offline

I'm still stuck here - any hint?

THX!

Forum Timezone: America/New_York

Most Users Ever Online: 55

Currently Online:
3 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Skyler: 48

Derek: 46

Frodson: 45

Peter: 41

clau_ste: 39

Gwen: 32

JimmyM: 30

TheSmile: 28

EZB: 24

lppier: 23

Member Stats:

Guest Posters: 1

Members: 536

Moderators: 1

Admins: 4

Forum Stats:

Groups: 11

Forums: 31

Topics: 559

Posts: 2192

Newest Members:

Third Audio, LRT, TomJ, Giscard, Alejandro Florez, Tomaso, Jonas, Ralph, Wayne, Steve Duell

Moderators: W Pirkle: 267

Administrators: Tom: 67, JD Young: 80, Will Pirkle: 0, W Pirkle: 267