• bklindgren

    Thanks all for the responses!

    I think my misunderstanding was around the stair-stepping produced by the downsampling. I understand that the hardware dac needs a low pass filter to smooth out stair-stepping, but I forgot that I'd need to do the same for the artificially low sample rate situation I created.

    The below image solves the problem (for 1/8 downsampling). An original (not downsampled) osc~ and the downsampled one sound nearly identical now :)

    Screenshot 2024-03-02 at 3.15.14 PM.png

    @seb-harmonik-ar thanks for responding so quickly. did not know about the interpolation option - very cool
    @lacaca thank you for the helpful graphic
    @ddw_music super clear thank you. Example 3.audio.examples/J07.oversampling demonstrates the oversampling approach really well I think
    @jameslo thanks for sharing - personally I think the foldover sound can be really cool, but this was more of a theoretical PD question

    posted in technical issues read more
  • bklindgren

    I'm experimenting with running sub-patches at lower sample rates. In the screenshot, when I go below 1/4 sample rate (at 44.1kHz) I'm hearing some distortion. Doesn't sound like aliasing to me...

    Seems odd bc an 880 Hz sample rate should theoretically be able to handle 440Hz without aliasing, right? Am I missing something?

    Screenshot 2024-03-01 at 8.47.34 PM.png

    posted in technical issues read more
  • bklindgren

    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~ !! :)

    posted in extra~ read more
  • bklindgren

    @alexandros

    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!

    posted in extra~ read more
  • bklindgren

    @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?

    posted in extra~ read more
  • bklindgren

    thank you all for the replies! some great info here - going to dive in with this information. thank you all again

    posted in technical issues read more
  • bklindgren

    ahh sorry for the very late reply :) yes, fellow violist! -Brian

    posted in pixel# read more
  • bklindgren

    I'm trying to program a patch patch that does sample by sample calculations on a 20 minute audio file, which ends up using some pretty big numbers toward the middle/end of the file (as the file has 50 million or so samples).

    I'm using an until object, int object and (+) object to advance sample by sample, but the function is maxing out at "1.67772e+07" samples for some reason. It doesn't seem like any of these objects alone have a number size that would create this limit, but when they're used together like this my 'counter' stops at "1.67772e+07".

    I've attached a test/demo patch. Any ideas? test.pd

    posted in technical issues read more
  • bklindgren

    You can find the pix2sig help file in: ⁨~ ▸ Documents⁩ ▸ ⁨Pd⁩ ▸ ⁨externals⁩ ▸ ⁨Gem⁩

    You might be getting "no method for gem-state" if you connect an object that takes signal input to the first outlet of the pix2sig object - the signal outputs are outlets 2, 3 and 4. Outlet 1 is for the gem data to pass through.

    "bad vector size" could be because you've used block~ or switch~ to something other than the vector size you've set in your prefs. I believe PD adc and dac need to run at the same vector size as what's in the preferences. To do this you could route the signal into another pd window, and there have your dac object.

    posted in pixel# read more

Internal error.

Oops! Looks like something went wrong!