Two new (basic) ambisonic externals for Pd. They will form a large part of the new grambilib~ library I am finishing this semester, allowing a user to control angle and elevation using an audio-rate signal. They're largely based on the rg.ambi~ abstractions from 2015. All objects are written in the C programming language. Both externals collectively allow a user to use 1st (3d), 2nd (2d), and 3rd (2d) order ambisonics for mono, stereo, quad, 5.0, hexagonal, octagonal, and b-format cube (3d) array configurations.
-
grambilib~ - New ambisonics externals for Pd
-
Drop me an email: info@rickygraham.net
Maybe we can collaborate on the project.
-
-
@ricky this looks awesome!
I'm getting this error when loading: fat file, but missing compatible architecture (have 'i386,x86_64', need 'arm64)
Is there a version that runs on Apple Silicon?
-
@bklindgren you could try to compile it yourself. It's on GitHub https://github.com/rickygraham/grambilib/tree/master
There's Makefile, but I guess you could use Pd's pd-lib-builder https://github.com/pure-data/pd-lib-builder -
thanks for the suggestion! I"ve never compiled anything before, but I gave it a shot...
I'm getting this error in PD after loading the 3 compiled objects (6 files: grambidec.pd_darwin, grambidec.pd_darwin.o, grambiman.pd_darwin, grambiman.pd_darwin.o, grambipan.pd_darwin, grambipan.pd_darwin.o):
load_object: Symbol "grambiman_setup" not found in "/Users/brianlindgren/Documents/Pd/externals/grambiman.pd_darwin"
Also make is generating a bunch of warnings:
++++ info: using Makefile.pdlibbuilder version 0.7.0 ++++ info: using Pd API /Applications/Pd-0.54-1.app/Contents/Resources/src/m_pd.h ++++ info: making target all in lib grambidec~ ++++ info: making grambidec.pd_darwin.o in lib grambidec~ cc -DPD -I "/Applications/Pd-0.54-1.app/Contents/Resources/src" -DUNIX -DMACOSX -I /sw/include -Wall -Wextra -Wshadow -Winline -Wstrict-aliasing -O3 -ffast-math -funroll-loops -fomit-frame-pointer -arch arm64 -mmacosx-version-min=10.6 -o grambidec.pd_darwin.o -c grambidec.c grambidec.c:41:24: warning: unused variable 'x' [-Wunused-variable] t_grambidec_tilde *x = (t_grambidec_tilde *)(w[1]); ^ grambidec.c:43:16: warning: unused variable 'APin2' [-Wunused-variable] t_sample *APin2 = (t_sample *)(w[3]); ^ grambidec.c:44:16: warning: unused variable 'APin3' [-Wunused-variable] t_sample *APin3 = (t_sample *)(w[4]); ^ grambidec.c:45:16: warning: unused variable 'APin4' [-Wunused-variable] t_sample *APin4 = (t_sample *)(w[5]); ^ grambidec.c:69:24: warning: unused variable 'x' [-Wunused-variable] t_grambidec_tilde *x = (t_grambidec_tilde *)(w[1]); ^ grambidec.c:78:23: warning: variable 'sample2' set but not used [-Wunused-but-set-variable] t_sample sample1, sample2, sample3, sample4; ^ grambidec.c:78:41: warning: variable 'sample4' set but not used [-Wunused-but-set-variable] t_sample sample1, sample2, sample3, sample4; ^ grambidec.c:102:24: warning: unused variable 'x' [-Wunused-variable] t_grambidec_tilde *x = (t_grambidec_tilde *)(w[1]); ^ grambidec.c:113:41: warning: variable 'sample4' set but not used [-Wunused-but-set-variable] t_sample sample1, sample2, sample3, sample4; ^ grambidec.c:143:24: warning: unused variable 'x' [-Wunused-variable] t_grambidec_tilde *x = (t_grambidec_tilde *)(w[1]); ^ grambidec.c:185:24: warning: unused variable 'x' [-Wunused-variable] t_grambidec_tilde *x = (t_grambidec_tilde *)(w[1]); ^ grambidec.c:228:24: warning: unused variable 'x' [-Wunused-variable] t_grambidec_tilde *x = (t_grambidec_tilde *)(w[1]); ^ grambidec.c:282:24: warning: unused variable 'x' [-Wunused-variable] t_grambidec_tilde *x = (t_grambidec_tilde *)(w[1]); ^ grambidec.c:351:37: warning: unused parameter 's' [-Wunused-parameter] void *grambidec_tilde_new(t_symbol *s, int argc, t_atom *argv) //, t_floatarg test ^ grambidec.c:473:5: warning: performing pointer subtraction with a null pointer has undefined behavior [-Wnull-pointer-subtraction] CLASS_MAINSIGNALIN(grambidec_tilde_class, t_grambidec_tilde, APf); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Applications/Pd-0.54-1.app/Contents/Resources/src/m_pd.h:529:59: note: expanded from macro 'CLASS_MAINSIGNALIN' class_domainsignalin(c, (char *)(&((type *)0)->field) - (char *)0) ^ ~~~~~~~~~ 15 warnings generated. ++++ info: linking objects in grambidec.pd_darwin for lib grambidec~ cc -undefined suppress -flat_namespace -bundle -arch arm64 -mmacosx-version-min=10.6 -o grambidec.pd_darwin grambidec.pd_darwin.o -lc ld: warning: -undefined suppress is deprecated ld: warning: -undefined suppress is deprecated ++++ info: making grambiman.pd_darwin.o in lib grambidec~ cc -DPD -I "/Applications/Pd-0.54-1.app/Contents/Resources/src" -DUNIX -DMACOSX -I /sw/include -Wall -Wextra -Wshadow -Winline -Wstrict-aliasing -O3 -ffast-math -funroll-loops -fomit-frame-pointer -arch arm64 -mmacosx-version-min=10.6 -o grambiman.pd_darwin.o -c grambiman.c grambiman.c:64:24: warning: unused variable 'x' [-Wunused-variable] t_grambiman_tilde *x = (t_grambiman_tilde *)(w[1]); ^ grambiman.c:139:24: warning: unused variable 'x' [-Wunused-variable] t_grambiman_tilde *x = (t_grambiman_tilde *)(w[1]); ^ grambiman.c:226:24: warning: unused variable 'x' [-Wunused-variable] t_grambiman_tilde *x = (t_grambiman_tilde *)(w[1]); ^ grambiman.c:252:32: warning: variable 'sample3' set but not used [-Wunused-but-set-variable] t_sample sample1, sample2, sample3, sample4, sample10; ^ grambiman.c:306:24: warning: unused variable 'x' [-Wunused-variable] t_grambiman_tilde *x = (t_grambiman_tilde *)(w[1]); ^ grambiman.c:370:37: warning: unused parameter 's' [-Wunused-parameter] void *grambiman_tilde_new(t_symbol *s, int argc, t_atom *argv) ^ grambiman.c:436:5: warning: performing pointer subtraction with a null pointer has undefined behavior [-Wnull-pointer-subtraction] CLASS_MAINSIGNALIN(grambiman_tilde_class, t_grambiman_tilde, APf); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Applications/Pd-0.54-1.app/Contents/Resources/src/m_pd.h:529:59: note: expanded from macro 'CLASS_MAINSIGNALIN' class_domainsignalin(c, (char *)(&((type *)0)->field) - (char *)0) ^ ~~~~~~~~~ 7 warnings generated. ++++ info: linking objects in grambiman.pd_darwin for lib grambidec~ cc -undefined suppress -flat_namespace -bundle -arch arm64 -mmacosx-version-min=10.6 -o grambiman.pd_darwin grambiman.pd_darwin.o -lc ld: warning: -undefined suppress is deprecated ld: warning: -undefined suppress is deprecated ++++ info: making grambipan.pd_darwin.o in lib grambidec~ cc -DPD -I "/Applications/Pd-0.54-1.app/Contents/Resources/src" -DUNIX -DMACOSX -I /sw/include -Wall -Wextra -Wshadow -Winline -Wstrict-aliasing -O3 -ffast-math -funroll-loops -fomit-frame-pointer -arch arm64 -mmacosx-version-min=10.6 -o grambipan.pd_darwin.o -c grambipan.c grambipan.c:423:5: warning: performing pointer subtraction with a null pointer has undefined behavior [-Wnull-pointer-subtraction] CLASS_MAINSIGNALIN(grambipan_tilde_class, t_grambipan_tilde, APf); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Applications/Pd-0.54-1.app/Contents/Resources/src/m_pd.h:529:59: note: expanded from macro 'CLASS_MAINSIGNALIN' class_domainsignalin(c, (char *)(&((type *)0)->field) - (char *)0) ^ ~~~~~~~~~ 1 warning generated. ++++ info: linking objects in grambipan.pd_darwin for lib grambidec~ cc -undefined suppress -flat_namespace -bundle -arch arm64 -mmacosx-version-min=10.6 -o grambipan.pd_darwin grambipan.pd_darwin.o -lc ld: warning: -undefined suppress is deprecated ld: warning: -undefined suppress is deprecated ++++info: target all in lib grambidec~ completed
This is my Makefile:
# Makefile for mylib lib.name = grambidec~ class.sources = grambidec.c grambiman.c grambipan.c datafiles = grambilib-help.pd readme.md include Makefile.pdlibbuilder
Any suggestion? Thanks again!
-
I'll check when I have time and get back. Should be simple.
-
@bklindgren I copied your makefile and compiled with the sources I have (I guess they are the same, since in GitHub they haven't changed in eight years), and [grambiman~] loads fine. I realized though the a [grambiman] compiles as well (no tilde), which indeed can't load. Did you forget to add the tilde character when you loaded the object?
I then changed the names of the source files, by adding the tilde character, and re-compiled. This time, only tilde objects were made. Maybe a bug of the makefile. I'll send to the Pd list or open an issue on GitHub. -
thanks for your help! I got the objects compiled and loaded. it's been about two weeks so I'm a little fuzzy on what might have gone wrong before, but I modified a few file names & this is the makefile I ended up with:
# Makefile for mylib lib.name = grambi~ class.sources = grambidec~.c grambiman~.c grambipan~.c datafiles = grambilib-help.pd readme.md include Makefile.pdlibbuilder
thanks again~ !!
-
Sorry. Totally missed this. All good?