Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

surge-au: plugin.h file not found (called by aulayer.h) #34

Closed
esaruoho opened this issue Nov 24, 2018 · 17 comments
Closed

surge-au: plugin.h file not found (called by aulayer.h) #34

esaruoho opened this issue Nov 24, 2018 · 17 comments

Comments

@esaruoho
Copy link
Collaborator

while attempting to compile with Xcode 10.1, I get this:
funknown_h

seems like a plugin.h is called by aulayer.h. i'm not sure where to get that file from. any ideas?
@JureKR ?

This was referenced Nov 24, 2018
@Jurek-Raben
Copy link

xcode 10.1 is macos 10.14, right? Still on macos 10.13.4 (10.13.6 contains some nasty intel cpu spectre v3(?) firmware with max. 8% speed decrease, AFAIK Apple flashes it to the cpu, while Windows soft-loads it). Sorry, no idea.

@esaruoho
Copy link
Collaborator Author

Well, more like wondering how to create or find the plugin.h :)

@Jurek-Raben
Copy link

Are the audiounit headers installed along with xcode installation, or do you have to install it separately? What about trying to build vst2 only first?

@esaruoho
Copy link
Collaborator Author

@JureKR well with the "build vst2 only first" issue, i'm getting 128 errors. of which 108 are warnings and 20 are actual bonafide errors.

here are a couple:
caviewlayer_mm

@esaruoho
Copy link
Collaborator Author

caviewlayer_mm

@esaruoho
Copy link
Collaborator Author

caviewlayer_mm

@esaruoho
Copy link
Collaborator Author

and so on.

@Jurek-Raben
Copy link

Uh, I dunno, will try in some days, ask in the kvr thread maybe.

@esaruoho
Copy link
Collaborator Author

thread seems to be at https://www.kvraudio.com/forum/viewtopic.php?f=1&t=511922

@baconpaul
Copy link
Collaborator

Oh hey sorry IU didn’t see this issue. i put some comments in issue #49 which solves those objc errors and gets to a linked vst on a Mac.

@baconpaul
Copy link
Collaborator

So a bit more digging. It looks like there's a couple of AU problems.

1: Some files just aren't in GitHub. I think plugin.h is a name of an older file which also defines the (now gone but referenced) symbol sub3_synth which is referenced all over the au cpp code but commented out elsewhere. I'm forking a theory that in some older version - the last one where au built on mac - the core class was named sub3_synth and somewhere there was a file called plugin.h which had inside it something that looked like "class plugin { }" and "class sub3_synth { }".

2: if you do create a plugin.h stub your next two problems will be MusicDeviceBase.h and storage.h. storage.h is pretty easy. That's been renamed to "SurgeStorage.h" so changing that include fixes it. MusicDeviceBase.h, though, is part of an older AU version 2 API which is no longer on mojave

Some other things which plugin.h or MusicDeviceBase seemed to do were

1: Include <CoreFoundation/CoreFoundation.h> so all those CFSTRs can work
2: define CmoponentResult (as an OSStatus) and the stream (which has been renamed)

I don't know if I'll get anywhere but I am hacking away at it. If you want to see what I'm up to, I have a "au-build" branch on GitHub in my fork of surge.

@baconpaul
Copy link
Collaborator

Hey yeah look at this I just found in SurgeSynthesizer.cpp. I'm now convinced that sub3_synth is the old name of SurgeSynthesizer and the AU code just didn't get ported across ever. I'll keep noodling. Hope you don't mind me leaving my breadcrumbs in this issue.

/*unsigned int sub3_synth::getParameterFlags (long index)
{
        if (index<storage.getPatch().param_ptr.size())
        {
                return storage.getPatch().param_ptr[index]->ctrlstyle;
        }
        return 0;
}*/

float SurgeSynthesizer::getParameter(long index)
{
   if (index < 0)
      return 0.f;
   if (index >= metaparam_offset)
      return storage.getPatch()
          .scene[0]
          .modsources[ms_ctrl1 + index - metaparam_offset]
          ->get_output();
   if (index < storage.getPatch().param_ptr.size())
      return storage.getPatch().param_ptr[index]->get_value_f01();
   return 0.f;
}

@baconpaul
Copy link
Collaborator

Last comment for the morning I think. It is definitely the case that doing the work to replaces sub3_synth and plugin with SurgeSynthesizer then doing all the all_notes_off -> allNotesOff conversion gets me really far in building the AU. Again https://github.com/baconpaul/surge/tree/au-build shows you my latest but absolutely nothing there ready for a PR or any such.

I think we should probably start a separate issue for the AU base class stuff and leave this issue to be the plugin -> SurgeSynthesizer stuff. But I'm new here and just doing some weekend hacking so I'll leave that up to you all!

Thanks

@esaruoho
Copy link
Collaborator Author

esaruoho commented Dec 8, 2018

@baconpaul i don't mind the breadcrumbs at all! thanks heaps for thinking and looking at this in such great detail. If I can figure out how to isolate some of it into simple PRs then that's great, but whichever form this takes, I'm glad you're giving a look at it. I hope if you do a PR, @abique and @kurasu will take the time to look at it, and allow it to land so we can get a move on with this :)

@baconpaul
Copy link
Collaborator

Thanks. A path forward to an AUv3 is becoming clearer to me. I'm going to screw around for a bit in a protective branch-off-my-branch-off-my-fork and see where I can get.

AUV3 is very different than AUV2; and SurgeSynthesizer is rather different from sub3_synth. I think most of the code in src/au won't be part of Surge running in Logic 10.4 on Mojave... I just still don't quite know what source will be part of that :)

If I figure out anything useful I will start a fresh issue here.

@baconpaul
Copy link
Collaborator

#59 fixes this so we can close it. Thanks!

@esaruoho
Copy link
Collaborator Author

closing, thanks @baconpaul !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants