Forums > Gen

Exporting gen~ to AU


April 18, 2013 | 7:36 pm

So I decided to bite the bullet and try exporting gen~ code into C++ and using it to make an AU, as explained in the wiki.

The xcode project builds completely without any issues (other than semantic issues.. loss of precision), the AU passes validation, it loads up fine in Logic Pro but doesn’t output any sound.

Its a simple gen~ patch which multiplies the input by a variable (1-1000) and clips the signal between -0.9 and 0.9.

Any advice?

April 19, 2013 | 11:55 pm

Hi Varun,

Can you provide your example and support information (about max->copy support info to clipboard), and we’ll investigate. We have a number of improvements coming in the 6.1.3 release for code export, including some other example projects for VST and iOS, but it would be good to verify that your issue has been fixed.

Thanks,
Joshua

April 20, 2013 | 7:06 am

Hi Joshua, do you plan some VST code export examples for us poor Windows based maxers :-) ?
thanks and all the best.
a.

April 20, 2013 | 8:41 pm

Hey Joshua,

Thanks for getting back. Here’s the info:

{
"version" : "Version 6.1.2 (6a3e522)",
"platform" : "mac",
"arch" : "x64",
"osversion" : "Mac OS X Version 10.7.5 x86_64",
"samplerate" : 44100,
"iovs" : 512,
"sigvs" : 64,
"scheduler_in_audio_interrupt" : "off",
"audio_drivername" : "Core Audio",
"audio_driver_subname" : "",
"eventinterval" : 2,
"overdrive" : "off",
"mixerparallel" : "on",
"mixercrossfade" : 0,
"mixerlatency" : 30.0,
"mixerramptime" : 10.0
}

I’ve also attached a zip of the xcode project + max patch + AUval log if its of any help.

Attachments:
  1. DistortMe.zip
April 25, 2013 | 6:16 am

Hi there,

It looks like you found a bug in how param objects are being parsed, in which the @default attribute is being ignored. This bug is logged as #4764 and is being worked on. There’s a quick workaround in your case however: try changing it to [param DistortMe 1 @min 1 @max 1000].

That said… currently AU params should always be in the 0..1 range (that’s the usual AU policy), so you might want to change it to [param DistortMe 0.001 @min 0.001 @max 1], and connect it to a [* 1000] object to make up the gain. Hopefully we’ll be able to introduce more flexible param range handling for code export in an update soon :-)

Graham

April 25, 2013 | 1:05 pm

It works! Thanks Graham.

I’m more of a hacker than a coder, but this is exciting stuff.

How much more complicated would it be to compile the code into a Max object?

April 25, 2013 | 5:28 pm

Another possible bug?

Creating [phasor] anywhere in the gen~ patch makes the AU plugin stop outputting sound – even if its unplugged. As a workaround I’m creating a phasor using +, wrap, history etc.

April 25, 2013 | 6:33 pm

Sorry, false alarm! All is well. It was the AU cache that needed deleting.

January 29, 2015 | 4:50 pm

hi there i was wondering if you could help me i cant get any of the example projects or any of my own exported projects to build as i get a linking error. im quite new to xcode so im not sure what it means but it is saying i have duplicate characters in my folders. its one error but its stopping me building anything :/ here is the output from xcode any help you can offer would be hugely appreciated :-

Ld DerivedData/SweetFA/Build/Products/Debug/SweetFA.component/Contents/MacOS/SweetFA normal x86_64
    cd /Users/MiRAGE/Downloads/AUGenExport-v02/SweetFA
    export MACOSX_DEPLOYMENT_TARGET=10.7
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch x86_64 -bundle -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -L/Users/MiRAGE/Downloads/AUGenExport-v02/SweetFA/DerivedData/SweetFA/Build/Products/Debug -F/Users/MiRAGE/Downloads/AUGenExport-v02/SweetFA/DerivedData/SweetFA/Build/Products/Debug -filelist /Users/MiRAGE/Downloads/AUGenExport-v02/SweetFA/DerivedData/SweetFA/Build/Intermediates/SweetFA.build/Debug/SweetFA.build/Objects-normal/x86_64/SweetFA.LinkFileList -mmacosx-version-min=10.7 -stdlib=libc++ -framework AudioToolbox -framework AudioUnit -framework CoreServices -Xlinker -dependency_info -Xlinker /Users/MiRAGE/Downloads/AUGenExport-v02/SweetFA/DerivedData/SweetFA/Build/Intermediates/SweetFA.build/Debug/SweetFA.build/Objects-normal/x86_64/SweetFA_dependency_info.dat -o /Users/MiRAGE/Downloads/AUGenExport-v02/SweetFA/DerivedData/SweetFA/Build/Products/Debug/SweetFA.component/Contents/MacOS/SweetFA

duplicate symbol __Z13sysmem_newptrm in:
    /Users/MiRAGE/Downloads/AUGenExport-v02/SweetFA/DerivedData/SweetFA/Build/Intermediates/SweetFA.build/Debug/SweetFA.build/Objects-normal/x86_64/genlib-1BEC4FAAE56AA771.o
duplicate symbol __Z18sysmem_newptrclearm in:
    /Users/MiRAGE/Downloads/AUGenExport-v02/SweetFA/DerivedData/SweetFA/Build/Intermediates/SweetFA.build/Debug/SweetFA.build/Objects-normal/x86_64/genlib-1BEC4FAAE56AA771.o
duplicate symbol __Z9my_memsetPvil in:
    /Users/MiRAGE/Downloads/AUGenExport-v02/SweetFA/DerivedData/SweetFA/Build/Intermediates/SweetFA.build/Debug/SweetFA.build/Objects-normal/x86_64/genlib-1BEC4FAAE56AA771.o
duplicate symbol __Z16sysmem_resizeptrPvm in:
    /Users/MiRAGE/Downloads/AUGenExport-v02/SweetFA/DerivedData/SweetFA/Build/Intermediates/SweetFA.build/Debug/SweetFA.build/Objects-normal/x86_64/genlib-1BEC4FAAE56AA771.o
duplicate symbol __Z21sysmem_resizeptrclearPvm in:
    /Users/MiRAGE/Downloads/AUGenExport-v02/SweetFA/DerivedData/SweetFA/Build/Intermediates/SweetFA.build/Debug/SweetFA.build/Objects-normal/x86_64/genlib-1BEC4FAAE56AA771.o
duplicate symbol __Z14sysmem_ptrsizePv in:
    /Users/MiRAGE/Downloads/AUGenExport-v02/SweetFA/DerivedData/SweetFA/Build/Intermediates/SweetFA.build/Debug/SweetFA.build/Objects-normal/x86_64/genlib-1BEC4FAAE56AA771.o
duplicate symbol __Z14sysmem_freeptrPv in:
    /Users/MiRAGE/Downloads/AUGenExport-v02/SweetFA/DerivedData/SweetFA/Build/Intermediates/SweetFA.build/Debug/SweetFA.build/Objects-normal/x86_64/genlib-1BEC4FAAE56AA771.o
duplicate symbol __Z14sysmem_copyptrPKvPvm in:
    /Users/MiRAGE/Downloads/AUGenExport-v02/SweetFA/DerivedData/SweetFA/Build/Intermediates/SweetFA.build/Debug/SweetFA.build/Objects-normal/x86_64/genlib-1BEC4FAAE56AA771.o
duplicate symbol __Z9my_memcpyPvPKvl in:
    /Users/MiRAGE/Downloads/AUGenExport-v02/SweetFA/DerivedData/SweetFA/Build/Intermediates/SweetFA.build/Debug/SweetFA.build/Objects-normal/x86_64/genlib-1BEC4FAAE56AA771.o
duplicate symbol __Z10set_zero64Pdl in:
    /Users/MiRAGE/Downloads/AUGenExport-v02/SweetFA/DerivedData/SweetFA/Build/Intermediates/SweetFA.build/Debug/SweetFA.build/Objects-normal/x86_64/genlib-1BEC4FAAE56AA771.o
duplicate symbol __Z19genlib_report_errorPKc in:
    /Users/MiRAGE/Downloads/AUGenExport-v02/SweetFA/DerivedData/SweetFA/Build/Intermediates/SweetFA.build/Debug/SweetFA.build/Objects-normal/x86_64/genlib-1BEC4FAAE56AA771.o
duplicate symbol __Z21genlib_report_messagePKc in:
    /Users/MiRAGE/Downloads/AUGenExport-v02/SweetFA/DerivedData/SweetFA/Build/Intermediates/SweetFA.build/Debug/SweetFA.build/Objects-normal/x86_64/genlib-1BEC4FAAE56AA771.o
duplicate symbol __Z13systime_ticksv in:
    /Users/MiRAGE/Downloads/AUGenExport-v02/SweetFA/DerivedData/SweetFA/Build/Intermediates/SweetFA.build/Debug/SweetFA.build/Objects-normal/x86_64/genlib-1BEC4FAAE56AA771.o
duplicate symbol __Znwm in:
    /Users/MiRAGE/Downloads/AUGenExport-v02/SweetFA/DerivedData/SweetFA/Build/Intermediates/SweetFA.build/Debug/SweetFA.build/Objects-normal/x86_64/genlib-1BEC4FAAE56AA771.o
duplicate symbol __ZdlPv in:
    /Users/MiRAGE/Downloads/AUGenExport-v02/SweetFA/DerivedData/SweetFA/Build/Intermediates/SweetFA.build/Debug/SweetFA.build/Objects-normal/x86_64/genlib-1BEC4FAAE56AA771.o
duplicate symbol __Znam in:
    /Users/MiRAGE/Downloads/AUGenExport-v02/SweetFA/DerivedData/SweetFA/Build/Intermediates/SweetFA.build/Debug/SweetFA.build/Objects-normal/x86_64/genlib-1BEC4FAAE56AA771.o
duplicate symbol __ZdaPv in:
    /Users/MiRAGE/Downloads/AUGenExport-v02/SweetFA/DerivedData/SweetFA/Build/Intermediates/SweetFA.build/Debug/SweetFA.build/Objects-normal/x86_64/genlib-1BEC4FAAE56AA771.o
duplicate symbol _genlib_obtain_reference_from_string in:
    /Users/MiRAGE/Downloads/AUGenExport-v02/SweetFA/DerivedData/SweetFA/Build/Intermediates/SweetFA.build/Debug/SweetFA.build/Objects-normal/x86_64/genlib-1BEC4FAAE56AA771.o
duplicate symbol _genlib_obtain_buffer_from_reference in:
    /Users/MiRAGE/Downloads/AUGenExport-v02/SweetFA/DerivedData/SweetFA/Build/Intermediates/SweetFA.build/Debug/SweetFA.build/Objects-normal/x86_64/genlib-1BEC4FAAE56AA771.o
duplicate symbol _genlib_buffer_edit_begin in:
    /Users/MiRAGE/Downloads/AUGenExport-v02/SweetFA/DerivedData/SweetFA/Build/Intermediates/SweetFA.build/Debug/SweetFA.build/Objects-normal/x86_64/genlib-1BEC4FAAE56AA771.o
duplicate symbol _genlib_buffer_edit_end in:
    /Users/MiRAGE/Downloads/AUGenExport-v02/SweetFA/DerivedData/SweetFA/Build/Intermediates/SweetFA.build/Debug/SweetFA.build/Objects-normal/x86_64/genlib-1BEC4FAAE56AA771.o
duplicate symbol _genlib_buffer_getinfo in:
    /Users/MiRAGE/Downloads/AUGenExport-v02/SweetFA/DerivedData/SweetFA/Build/Intermediates/SweetFA.build/Debug/SweetFA.build/Objects-normal/x86_64/genlib-1BEC4FAAE56AA771.o
duplicate symbol _genlib_reference_getname in:
    /Users/MiRAGE/Downloads/AUGenExport-v02/SweetFA/DerivedData/SweetFA/Build/Intermediates/SweetFA.build/Debug/SweetFA.build/Objects-normal/x86_64/genlib-1BEC4FAAE56AA771.o
duplicate symbol _genlib_buffer_dirty in:
    /Users/MiRAGE/Downloads/AUGenExport-v02/SweetFA/DerivedData/SweetFA/Build/Intermediates/SweetFA.build/Debug/SweetFA.build/Objects-normal/x86_64/genlib-1BEC4FAAE56AA771.o
duplicate symbol _genlib_buffer_perform_begin in:
    /Users/MiRAGE/Downloads/AUGenExport-v02/SweetFA/DerivedData/SweetFA/Build/Intermediates/SweetFA.build/Debug/SweetFA.build/Objects-normal/x86_64/genlib-1BEC4FAAE56AA771.o
duplicate symbol _genlib_buffer_perform_end in:
    /Users/MiRAGE/Downloads/AUGenExport-v02/SweetFA/DerivedData/SweetFA/Build/Intermediates/SweetFA.build/Debug/SweetFA.build/Objects-normal/x86_64/genlib-1BEC4FAAE56AA771.o
duplicate symbol _gen_msp_pow in:
    /Users/MiRAGE/Downloads/AUGenExport-v02/SweetFA/DerivedData/SweetFA/Build/Intermediates/SweetFA.build/Debug/SweetFA.build/Objects-normal/x86_64/genlib-1BEC4FAAE56AA771.o
duplicate symbol _genlib_data_setbuffer in:
    /Users/MiRAGE/Downloads/AUGenExport-v02/SweetFA/DerivedData/SweetFA/Build/Intermediates/SweetFA.build/Debug/SweetFA.build/Objects-normal/x86_64/genlib-1BEC4FAAE56AA771.o
duplicate symbol _genlib_obtain_data_from_reference in:
    /Users/MiRAGE/Downloads/AUGenExport-v02/SweetFA/DerivedData/SweetFA/Build/Intermediates/SweetFA.build/Debug/SweetFA.build/Objects-normal/x86_64/genlib-1BEC4FAAE56AA771.o
duplicate symbol _genlib_data_getinfo in:
    /Users/MiRAGE/Downloads/AUGenExport-v02/SweetFA/DerivedData/SweetFA/Build/Intermediates/SweetFA.build/Debug/SweetFA.build/Objects-normal/x86_64/genlib-1BEC4FAAE56AA771.o
duplicate symbol _genlib_data_release in:
    /Users/MiRAGE/Downloads/AUGenExport-v02/SweetFA/DerivedData/SweetFA/Build/Intermediates/SweetFA.build/Debug/SweetFA.build/Objects-normal/x86_64/genlib-1BEC4FAAE56AA771.o
duplicate symbol _genlib_data_getcursor in:
    /Users/MiRAGE/Downloads/AUGenExport-v02/SweetFA/DerivedData/SweetFA/Build/Intermediates/SweetFA.build/Debug/SweetFA.build/Objects-normal/x86_64/genlib-1BEC4FAAE56AA771.o
duplicate symbol _genlib_data_setcursor in:
    /Users/MiRAGE/Downloads/AUGenExport-v02/SweetFA/DerivedData/SweetFA/Build/Intermediates/SweetFA.build/Debug/SweetFA.build/Objects-normal/x86_64/genlib-1BEC4FAAE56AA771.o
duplicate symbol _genlib_data_resize in:
    /Users/MiRAGE/Downloads/AUGenExport-v02/SweetFA/DerivedData/SweetFA/Build/Intermediates/SweetFA.build/Debug/SweetFA.build/Objects-normal/x86_64/genlib-1BEC4FAAE56AA771.o
duplicate symbol _genlib_reset_complete in:
    /Users/MiRAGE/Downloads/AUGenExport-v02/SweetFA/DerivedData/SweetFA/Build/Intermediates/SweetFA.build/Debug/SweetFA.build/Objects-normal/x86_64/genlib-1BEC4FAAE56AA771.o
duplicate symbol __Z13fastertanfulld in:
    /Users/MiRAGE/Downloads/AUGenExport-v02/SweetFA/DerivedData/SweetFA/Build/Intermediates/SweetFA.build/Debug/SweetFA.build/Objects-normal/x86_64/SweetFA-D923611984B3EC6D.o
    /Users/MiRAGE/Downloads/AUGenExport-v02/SweetFA/DerivedData/SweetFA/Build/Intermediates/SweetFA.build/Debug/SweetFA.build/Objects-normal/x86_64/gen_exported.o
duplicate symbol __Z13fastersinfulld in:
    /Users/MiRAGE/Downloads/AUGenExport-v02/SweetFA/DerivedData/SweetFA/Build/Intermediates/SweetFA.build/Debug/SweetFA.build/Objects-normal/x86_64/SweetFA-D923611984B3EC6D.o
    /Users/MiRAGE/Downloads/AUGenExport-v02/SweetFA/DerivedData/SweetFA/Build/Intermediates/SweetFA.build/Debug/SweetFA.build/Objects-normal/x86_64/gen_exported.o
duplicate symbol __Z13fastercosfulld in:
    /Users/MiRAGE/Downloads/AUGenExport-v02/SweetFA/DerivedData/SweetFA/Build/Intermediates/SweetFA.build/Debug/SweetFA.build/Objects-normal/x86_64/SweetFA-D923611984B3EC6D.o
    /Users/MiRAGE/Downloads/AUGenExport-v02/SweetFA/DerivedData/SweetFA/Build/Intermediates/SweetFA.build/Debug/SweetFA.build/Objects-normal/x86_64/gen_exported.o
duplicate symbol __Z9fasterexpd in:
    /Users/MiRAGE/Downloads/AUGenExport-v02/SweetFA/DerivedData/SweetFA/Build/Intermediates/SweetFA.build/Debug/SweetFA.build/Objects-normal/x86_64/SweetFA-D923611984B3EC6D.o
    /Users/MiRAGE/Downloads/AUGenExport-v02/SweetFA/DerivedData/SweetFA/Build/Intermediates/SweetFA.build/Debug/SweetFA.build/Objects-normal/x86_64/gen_exported.o
duplicate symbol __Z9fasterpowdd in:
    /Users/MiRAGE/Downloads/AUGenExport-v02/SweetFA/DerivedData/SweetFA/Build/Intermediates/SweetFA.build/Debug/SweetFA.build/Objects-normal/x86_64/SweetFA-D923611984B3EC6D.o
    /Users/MiRAGE/Downloads/AUGenExport-v02/SweetFA/DerivedData/SweetFA/Build/Intermediates/SweetFA.build/Debug/SweetFA.build/Objects-normal/x86_64/gen_exported.o
ld: 40 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
  • This reply was modified 5 months by  James.
February 13, 2015 | 7:36 am

I have the same issue as ME101… any ideas?

February 18, 2015 | 3:55 pm

Yes, this is a known issue and will be fixed in the next update. There’s a workaround which you can grab from https://cycling74.com/forums/topic/urgent-help-needed-cant-compile-any-exported-gen-projects-to-au/

Viewing 11 posts - 1 through 11 (of 11 total)

Forums > Gen