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 Topic RSS sp_TopicIcon
AU Synth Book Appendix AU Template conversion to NewSynth/SampleMachine step-by-step w/errors & AU INvalidation
Avatar
patrick1983
Member
Members
August 28, 2018 - 10:32 am
Member Since: June 17, 2017
Forum Posts: 3
sp_UserOfflineSmall Offline

Below is my attempted implementation of the directions of the Synth Book's Appendix "Converting the AU Template Synth". My MacBook Pro's OS is High Sierra 10.13 and I am aware that the OS used at the time of the writing of the book was 10.10 or somewhere near there. Working through this evolution was and is still a part of the job  in some of the steps. Here it is from step 1:

1.) I copied the Template Synth directory and pasted the copy onto my Desktop naming it SampleMachine. This step has no issues.

2.) The next step said to click on the TemplateSynth.xcodeproj project file and rename it SampleMachine - I clicked on TemplateSynth and a window then popped up asking if I would like to change all of the other instances of TemplateSynth to SampleMachine and I clicked YES to do this. This step (seemingly) has no issues and accomplishes the "brute force" name replacement ordered in step 3.), the next step. (so this step also (seemingly) has no issues).

3.) Again, this step (seemingly) has no issues as I was prompted a list of name updates that (should have) accomplished the "brute force" name replacement ordered in this step.

4.) I closed Xcode and re-opened it with SampleMachine (my NewSynth). There are two targets: SampleMachine and CocoaUI as well as an AudioUnitExtensionTarget in the form of an .appex file that I added. I also see an Info and a Build Settings but no Build Phases (though I know how to navigate to it). The Appendix says to look "In the 'Info' settings" and to "open the Audio Components array but I'm pretty sure with Xcode 9 and High Sierra it is the Info.plist file that I want to open and in it I open the Audio Components array (please correct me if I am wrong about this). I have changed the Info.plist in the "Resources" directory with the following: I changed "manufacturer" to "AVMe"; "name" to "Patrick Hinkle: SampleMachine"; and "subtype" to "PGCD". I also changed "Executable File" to "SampleMachine" and "BundleIdentifier" to "developer.audiounit.patrickhinkle.SampleMachine" just because those names seemed to fit in those fields.

5.) Step 5 says to change component fields in a way that is similar to step 4 but in the AUSynth.r resources file. I have never used a .r resources file; this one just looks like a text editor version of the Info.plist file we were just working with. It looks like the whole file is commented out as it is green but the /* and // comment symbols don't comment out the actual component fields leading me to believe I should replace the appropriate fields with my own though I am unclear on how the compiler interprets this file and it's audio component fields. I changed "COMP_MANUF" to "AVMe", "COMP_SUBTYPE" to "PGCD", and "NAME" to "Patrick Hinkle: SampleMachine" in AUSynth.r.

7.) In step 7 I changed the names of the TemplateSynthView.h & .m and TemplateSynthViewFactory.h & .m (.m, & NOT .cpp as in the book - I assumed that this change from .cpp to .m is a change from C++ to Objective-C) to SampleMachineView.h & .m and SampleMachineViewFactory.h & .m. No issues in this step I believe.

8.) In step 8 I attempted to do a "brute force Find and Replace" with 2 of the 4 names (since the other 2 weren't in this Synth project that I downloaded) and I think I came pretty close or even finished with WPRotaryKnobTS being replaced with WPRotaryKnobSM and WPOptionMenuGroupTS being replaced with WPOptionMenuGroupSM as file names and code symbols. This step may have issues, though I'm not sure - no explicit errors were given though.

9.) Step 9 I didn't get (setting the .nib file's owner and view) - I guess I'm supposed to click on CocoaView.nib file, then connect by clicking and dragging from File's Owner to CocoaSynthView but the connection apparently isn't made that way. Clicking and dragging from the View to my SampleMachineView.m file, similarly, failed - I have only successfully made .xib or .nib user interfaces a couple times and they were pretty primitive. (I should say that "File's Owner"'s "uiFreshlyLoadedView" is connected "CocoaView" and "CocoaView"'s "uiFreshlyLoadedView" is connected to "File's Owner" - The black box that I think is for IBOutlets showed this. Any suggestions or pointers would be greatly appreciated.

10.) Step 10 is to set up the debugger: I clicked on Scheme -> Edit Scheme (with AUSynth checked) -> Run -> Development and AULab.app as my debug executable. This step shouldn't have issues as it is quite simple and straightforward.

When I Build & Run the project I get a hefty 14 warnings but only 2 errors (not too bad) and they look solvable. I will go over the errors as their solutions seem simple. Here are the errors (any advice would be greatly appreciated):

Apple Mach-O Linker (ld) Error // MEANS I HAVE 2 LINKER ERRORS (I THINK):

1.) "_verify_noerr", referenced from:

_addParamListener in SampleMachineView.o

      -[SampleMachineView addListeners] in SampleMachineView.o

      -[SampleMachineView removeListeners] in SampleMachineView.o

ld: symbol(s) not found for architecture x86_64

2.) clang: error: linker command failed with exit code 1 (use -v to see invocation)

// ********

(I added the numbering, 1.) and 2.) for the 2 errors).

 

BELOW, ALSO, IS MY FAILED AU VALIDATION ATTEMPT:

bash-3.2$ auval -v aumu PGCD AVMe

 

    AU Validation Tool

    Version: 1.6.1a1 

    Copyright 2003-2013, Apple Inc. All Rights Reserved.

    Specify -h (-help) for command options

 

--------------------------------------------------

VALIDATING AUDIO UNIT: 'aumu' - 'PGCD' - 'AVMe'

--------------------------------------------------

ERROR: Cannot get Component's Name strings

ERROR: Error from retrieving Component Version: -50

 

* * FAIL

--------------------------------------------------

TESTING OPEN TIMES:

FATAL ERROR: didn't find the component

Avatar
W Pirkle
Admin
August 28, 2018 - 12:13 pm
Member Since: January 29, 2017
Forum Posts: 344
sp_UserOfflineSmall Offline

It looks like your problem has to do with a change made to Xcode since the book publication. This was reported (for a different reason) in the actual AU section of the Forum here:

http://www.willpirkle.com/foru.....my-mac-os/

_verify_noerr has changed names in later versions of Xcode.

- Will

Forum Timezone: America/New_York

Most Users Ever Online: 55

Currently Online:
10 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Skyler: 48

Derek: 46

Frodson: 45

Peter: 41

clau_ste: 39

TheSmile: 37

JimmyM: 33

Gwen: 32

EZB: 24

lppier: 23

Member Stats:

Guest Posters: 1

Members: 565

Moderators: 1

Admins: 4

Forum Stats:

Groups: 12

Forums: 36

Topics: 581

Posts: 2326

Newest Members:

frankthetank, dhodgson, Wanderer, mister1234, Evan Galvanek, Rowan Fraser, patrickbarr1984, Ray C., Jon R., Pat

Moderators: W Pirkle: 344

Administrators: Tom: 69, JD Young: 80, Will Pirkle: 0, W Pirkle: 344