how would you recreate this mixer channelstrip abstraction?
@esaruoho wrote:
16 "LFOs" to "breathe" up and down the volume slider
How does your modulation LFO look like?
Is the modulator a signal or control-object?
Does it offset or master the fader ?
Did you try what I mentioned in your other thread?
https://forum.pdpatchrepo.info/topic/14291/need-a-simpler-way-to-change-slider-background-color-when-on-and-off/6
If you update the GUI on each block
= SR/64 = 44100 /64=689 times per second,
this is overkill and is going to drag down performance, even if the two parts run asynchronously.
<25 frames per second should be enough for the GUI.
Setting many faders and their colour once in a while should not cause any trouble. Limiting the update rate might be enough to run stable. (see the patch below)
Benefit from separating GUI- and audio-parts across two PD-instances would be, if the GUI is lagging, audio still runs without drop-outs as PD-instances run asynchronous.
Ideally run the PD-instances on different CPU-cores (and audio in higher priority) by setting this in the operating system.
(btw offtopic, to complicate things even further: in case you are not aware of it:
there is also the [pd~] object, which does simple multithreading, splitting patches across the CPU-cores. But the parts are running synchronous.
Running one instance of Pure Data only, without [pd~], everything runs on one core only.)
For real-time audio a synchronous chain between input and output is important.
So no, unless you know what you are doing, don't split audio into several PD-instances.
(but yes, on different cores with [pd~], in case the audio-part runs out of CPU-time and you don't want to increase latency).
Sth like this is what I thought about in the other thread, slowing down GUI-update-rate with [metro] and [snapshot~]
and detaching it from the deterministic chain with [pipe],
while maintaining signal-rate amplitude modulation:
fader-abstraction.pd
slider-guts.pd
(I don't have Vanilla here right now, and doesn't work on web-PurrData,. But should work on Vanilla, if there is no bug!?)
EDIT: changed [pipe 5] and added [change] and set fader properties to "jump on click"
Question about [tabread4~]
I'm not sure how many of these comments are addressed to me or the other David, but in any case, I'm getting a little confused. To get back to my original post (and ignoring the issue of guard points, which I know is important but not really relevant to my question), I'd like to reiterate:
-
I didn't use Audacity to record anything, I just used it to create a sound file with one of the built-in UGEN's (create a new track, then click on 'Generate->Pluck...' in the toolbar). Really, the file could have originated anywhere, and whether or not there were timing inaccuracies when it was created is completely irrelevant. I'm just comparing the way it sounds when played back in Audacity vs. when it's played back in my Pure Data patch.
-
Someone asked me "how much is it off by"; I'm not sure how to answer that, except to say that it sounds about one semi-tone higher in Audacity than it does in Pure Data, although I don't have a very good ear for pitch. (If the problem was in Audacity, wouldn't the frequency be lower in Audacity than in Pure Data or is that an over-simplification?)
-
I don't think I mentioned this, but I'm running both on the same computer, a HP-P6230F (with a quad-core processor running at 2.60 GHz running Windows 10 64-bit). I was going to provide a link to the specs on the HP web site, but they seem to have removed the page (it's an old computer). I'm running Pure Data 0.53.2, 64-bit, and Audacity 3.2.5, 64-bit.
-
Also not previously mentioned, I tried running Pd in both real-time and non-real-time mode, but it didn't seem to make any difference.
I appreciate everyone's help, but can we limit the discussion to my original question and ignore other issues like guard points, interpolation (which I don't think applies to my question, since I'm playing the file back at the original speed) and problems related to recording in Audacity? They probably deserve a thread of their own, anyway.
faustgen~ - the FAUST compiler embedded in a Pure Data external
Hi all
@Pierre-Guillot this is a terrific project
Thanks for sharing!
I've been using the HOA library and some older stuff form you and others at CICM
Now, I've installed from Deken the faustgen~ object, and as soon as I open the faustgen~-help.pd it delivers tons of errors to the console:
menu_doc_open /Library/Pd/faustgen~ faustgen~-help.pd
/Library/PD/faustgen~/faustgen~.pd_darwin: dlopen(/Library/PD/faustgen~/faustgen~.pd_darwin, 10): Library not loaded: @rpath/libRemarks.dylib
Referenced from: /Library/PD/faustgen~/faustgen~.pd_darwin
Reason: image not found
/Library/PD/faustgen~/faustgen~.pd_darwin: dlopen(/Library/PD/faustgen~/faustgen~.pd_darwin, 10): Library not loaded: @rpath/libRemarks.dylib
Referenced from: /Library/PD/faustgen~/faustgen~.pd_darwin
Reason: image not found
/Library/Pd/faustgen~/faustgen~.pd_darwin: dlopen(/Library/Pd/faustgen~/faustgen~.pd_darwin, 10): Library not loaded: @rpath/libRemarks.dylib
Referenced from: /Library/Pd/faustgen~/faustgen~.pd_darwin
Reason: image not found
faustgen~ examples/gain -vec -lv 1
... couldn't create
... you might be able to track this down from the Find menu.
/Library/PD/faustgen~/faustgen~.pd_darwin: dlopen(/Library/PD/faustgen~/faustgen~.pd_darwin, 10): Library not loaded: @rpath/libRemarks.dylib
Referenced from: /Library/PD/faustgen~/faustgen~.pd_darwin
Reason: image not found
/Library/PD/faustgen~/faustgen~.pd_darwin: dlopen(/Library/PD/faustgen~/faustgen~.pd_darwin, 10): Library not loaded: @rpath/libRemarks.dylib
Referenced from: /Library/PD/faustgen~/faustgen~.pd_darwin
Reason: image not found
/Library/Pd/faustgen~/faustgen~.pd_darwin: dlopen(/Library/Pd/faustgen~/faustgen~.pd_darwin, 10): Library not loaded: @rpath/libRemarks.dylib
Referenced from: /Library/Pd/faustgen~/faustgen~.pd_darwin
Reason: image not found
faustgen~ examples/dummy
... couldn't create
/Library/PD/faustgen~/faustgen~.pd_darwin: dlopen(/Library/PD/faustgen~/faustgen~.pd_darwin, 10): Library not loaded: @rpath/libRemarks.dylib
Referenced from: /Library/PD/faustgen~/faustgen~.pd_darwin
Reason: image not found
/Library/PD/faustgen~/faustgen~.pd_darwin: dlopen(/Library/PD/faustgen~/faustgen~.pd_darwin, 10): Library not loaded: @rpath/libRemarks.dylib
Referenced from: /Library/PD/faustgen~/faustgen~.pd_darwin
Reason: image not found
/Library/Pd/faustgen~/faustgen~.pd_darwin: dlopen(/Library/Pd/faustgen~/faustgen~.pd_darwin, 10): Library not loaded: @rpath/libRemarks.dylib
Referenced from: /Library/Pd/faustgen~/faustgen~.pd_darwin
Reason: image not found
faustgen~ examples/gain
... couldn't create
/Library/PD/faustgen~/faustgen~.pd_darwin: dlopen(/Library/PD/faustgen~/faustgen~.pd_darwin, 10): Library not loaded: @rpath/libRemarks.dylib
Referenced from: /Library/PD/faustgen~/faustgen~.pd_darwin
Reason: image not found
/Library/PD/faustgen~/faustgen~.pd_darwin: dlopen(/Library/PD/faustgen~/faustgen~.pd_darwin, 10): Library not loaded: @rpath/libRemarks.dylib
Referenced from: /Library/PD/faustgen~/faustgen~.pd_darwin
Reason: image not found
/Library/Pd/faustgen~/faustgen~.pd_darwin: dlopen(/Library/Pd/faustgen~/faustgen~.pd_darwin, 10): Library not loaded: @rpath/libRemarks.dylib
Referenced from: /Library/Pd/faustgen~/faustgen~.pd_darwin
Reason: image not found
faustgen~ examples/parameters
... couldn't create
/Library/PD/faustgen~/faustgen~.pd_darwin: dlopen(/Library/PD/faustgen~/faustgen~.pd_darwin, 10): Library not loaded: @rpath/libRemarks.dylib
Referenced from: /Library/PD/faustgen~/faustgen~.pd_darwin
Reason: image not found
/Library/PD/faustgen~/faustgen~.pd_darwin: dlopen(/Library/PD/faustgen~/faustgen~.pd_darwin, 10): Library not loaded: @rpath/libRemarks.dylib
Referenced from: /Library/PD/faustgen~/faustgen~.pd_darwin
Reason: image not found
/Library/Pd/faustgen~/faustgen~.pd_darwin: dlopen(/Library/Pd/faustgen~/faustgen~.pd_darwin, 10): Library not loaded: @rpath/libRemarks.dylib
Referenced from: /Library/Pd/faustgen~/faustgen~.pd_darwin
Reason: image not found
faustgen~ examples/parameters
... couldn't create
/Library/PD/faustgen~/faustgen~.pd_darwin: dlopen(/Library/PD/faustgen~/faustgen~.pd_darwin, 10): Library not loaded: @rpath/libRemarks.dylib
Referenced from: /Library/PD/faustgen~/faustgen~.pd_darwin
Reason: image not found
/Library/PD/faustgen~/faustgen~.pd_darwin: dlopen(/Library/PD/faustgen~/faustgen~.pd_darwin, 10): Library not loaded: @rpath/libRemarks.dylib
Referenced from: /Library/PD/faustgen~/faustgen~.pd_darwin
Reason: image not found
/Library/Pd/faustgen~/faustgen~.pd_darwin: dlopen(/Library/Pd/faustgen~/faustgen~.pd_darwin, 10): Library not loaded: @rpath/libRemarks.dylib
Referenced from: /Library/Pd/faustgen~/faustgen~.pd_darwin
Reason: image not found
faustgen~ examples/resonator
... couldn't create
Tries uninstalling, but nothing.
Any clue?
Thanks in advance.
Best,
Alexis
Javascript pdjs - how to send a message with commas in it?
Greetings All,
I am trying to write a JavaScript program using pdjs that allows me to send messages with commas to a synth. Something like this:
| 60, 64, 67 (
|
I have a string synthesizer and when I send these three MIDI values I get a C chord. This works as expected. I have tried to emulate this in many different ways in a pdjs JavaScript file. Please see attached. If I run the first line where I send the three values one after another things work as expected. I have tried a number of different ways to create a message with commas as above, with no luck. I am probably missing something easy and would appreciate any pointers in the right direction.
inlets = 1;
outlets = 1;
function bang() {
// if send individually works fine...
messnamed("notes", 60); messnamed("notes", 64); messnamed("notes", 67); //<-works!
// none of these work
messnamed("notes", ["60", "64", "67"]); //<-no method for '60'
messnamed("notes", [60, 64, 67]); //<-plays only first note
messnamed("notes", "60, 64, 67"); //<-no method for '60, 64, 67'
messnamed("notes", 60, 64, 67); //<-plays only first note
messnamed("notes", "60", "64", "67"); //<-no method for '60'
messnamed("notes", "60, "addcomma", 64", "addcomma", "67"); //<-won't compile
messnamed("notes", ["list", 60, 64, 67]); //<-plays only first note
messnamed("notes", ["list", 60, "list", 64, "list", 67]); //<-plays only first note
messnamed("notes", ["list", "60", "64", "67"]); //<-does nothing
}
Thanks in advance for your help.!
Building on Windows - works from Git source, not from tarball
I wanted to build PD on Windows 10 to get ASIO support. I failed when I used the "Source" files from the PD website. I succeeded when I used source that I cloned from Github. I followed the same instructions from the wiki both when I failed and when I succeeded. (They are the same as in the manual, just a little more concise.)
I am sharing below my terminal output from the failed build attempts from the downloaded source code (the tar.gz file). Some of these messages suggest that there might be errors in the makefiles. I don't know anything about makefiles, so I can't really interpret the errors. But I did want to pass them along, in case a developer might find them useful. Here you go:
bhage@LAPTOP-F1TU0LRH MINGW64 /c/Users/bhage/Downloads/pd-0.51-4
$ ./autogen.sh
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'm4/config'.
libtoolize: linking file 'm4/config/config.guess'
libtoolize: linking file 'm4/config/config.sub'
libtoolize: linking file 'm4/config/install-sh'
libtoolize: linking file 'm4/config/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4/generated'.
libtoolize: linking file 'm4/generated/libtool.m4'
libtoolize: linking file 'm4/generated/ltoptions.m4'
libtoolize: linking file 'm4/generated/ltsugar.m4'
libtoolize: linking file 'm4/generated/ltversion.m4'
libtoolize: linking file 'm4/generated/lt~obsolete.m4'
configure.ac:166: warning: The macro `AC_LIBTOOL_DLOPEN' is obsolete.
configure.ac:166: You should run autoupdate.
aclocal.m4:8488: AC_LIBTOOL_DLOPEN is expanded from...
configure.ac:166: the top level
configure.ac:166: warning: AC_LIBTOOL_DLOPEN: Remove this warning and the call to _LT_SET_OPTION when you
configure.ac:166: put the 'dlopen' option into LT_INIT's first parameter.
../autoconf-2.71/lib/autoconf/general.m4:2434: AC_DIAGNOSE is expanded from...
aclocal.m4:8488: AC_LIBTOOL_DLOPEN is expanded from...
configure.ac:166: the top level
configure.ac:167: warning: The macro `AC_LIBTOOL_WIN32_DLL' is obsolete.
configure.ac:167: You should run autoupdate.
aclocal.m4:8523: AC_LIBTOOL_WIN32_DLL is expanded from...
configure.ac:167: the top level
configure.ac:167: warning: AC_LIBTOOL_WIN32_DLL: Remove this warning and the call to _LT_SET_OPTION when you
configure.ac:167: put the 'win32-dll' option into LT_INIT's first parameter.
../autoconf-2.71/lib/autoconf/general.m4:2434: AC_DIAGNOSE is expanded from...
aclocal.m4:8523: AC_LIBTOOL_WIN32_DLL is expanded from...
configure.ac:167: the top level
configure.ac:168: warning: The macro `AC_PROG_LIBTOOL' is obsolete.
configure.ac:168: You should run autoupdate.
aclocal.m4:121: AC_PROG_LIBTOOL is expanded from...
configure.ac:168: the top level
configure.ac:182: warning: The macro `AC_HEADER_STDC' is obsolete.
configure.ac:182: You should run autoupdate.
../autoconf-2.71/lib/autoconf/headers.m4:704: AC_HEADER_STDC is expanded from...
configure.ac:182: the top level
configure.ac:213: warning: The macro `AC_TYPE_SIGNAL' is obsolete.
configure.ac:213: You should run autoupdate.
../autoconf-2.71/lib/autoconf/types.m4:776: AC_TYPE_SIGNAL is expanded from...
configure.ac:213: the top level
configure.ac:235: warning: The macro `AC_CHECK_LIBM' is obsolete.
configure.ac:235: You should run autoupdate.
aclocal.m4:3879: AC_CHECK_LIBM is expanded from...
configure.ac:235: the top level
configure.ac:276: warning: The macro `AC_TRY_LINK' is obsolete.
configure.ac:276: You should run autoupdate.
../autoconf-2.71/lib/autoconf/general.m4:2920: AC_TRY_LINK is expanded from...
m4/universal.m4:14: PD_CHECK_UNIVERSAL is expanded from...
configure.ac:276: the top level
configure.ac:168: installing 'm4/config/compile'
configure.ac:9: installing 'm4/config/missing'
asio/Makefile.am: installing 'm4/config/depcomp'
bhage@LAPTOP-F1TU0LRH MINGW64 /c/Users/bhage/Downloads/pd-0.51-4
$ autoupdate
configure.ac:182: warning: The preprocessor macro `STDC_HEADERS' is obsolete.
Except in unusual embedded environments, you can safely include all
ISO C90 headers unconditionally.
configure.ac:213: warning: your code may safely assume C89 semantics that RETSIGTYPE is void.
Remove this warning and the `AC_CACHE_CHECK' when you adjust the code.
bhage@LAPTOP-F1TU0LRH MINGW64 /c/Users/bhage/Downloads/pd-0.51-4
$ ^C
bhage@LAPTOP-F1TU0LRH MINGW64 /c/Users/bhage/Downloads/pd-0.51-4
$ ./configure
configure: loading site script /etc/config.site
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a race-free mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking build system type... x86_64-w64-mingw32
checking host system type... x86_64-w64-mingw32
configure: iPhone SDK only available for arm-apple-darwin hosts, skipping tests
configure: Android SDK only available for arm-linux hosts, skipping tests
checking for as... as
checking for dlltool... dlltool
checking for objdump... objdump
checking how to print strings... printf
checking whether make supports the include directive... yes (GNU style)
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether gcc accepts -g... yes
checking for gcc option to enable C11 features... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... C:/msys64/mingw64/x86_64-w64-mingw32/bin/ld.exe
checking if the linker (C:/msys64/mingw64/x86_64-w64-mingw32/bin/ld.exe) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /mingw64/bin/nm -B
checking the name lister (/mingw64/bin/nm -B) interface... BSD nm
checking whether ln -s works... no, using cp -pR
checking the maximum length of command line arguments... 8192
checking how to convert x86_64-w64-mingw32 file names to x86_64-w64-mingw32 format... func_convert_file_msys_to_w32
checking how to convert x86_64-w64-mingw32 file names to toolchain format... func_convert_file_msys_to_w32
checking for C:/msys64/mingw64/x86_64-w64-mingw32/bin/ld.exe option to reload object files... -r
checking for objdump... (cached) objdump
checking how to recognize dependent libraries... file_magic ^x86 archive import|^x86 DLL
checking for dlltool... (cached) dlltool
checking how to associate runtime and link libraries... func_cygming_dll_for_implib
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /mingw64/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for vfork.h... no
checking for dlfcn.h... no
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -DDLL_EXPORT -DPIC
checking if gcc PIC flag -DDLL_EXPORT -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (C:/msys64/mingw64/x86_64-w64-mingw32/bin/ld.exe) supports shared libraries... yes
checking whether -lc should be explicitly linked in... yes
checking dynamic linker characteristics... Win32 ld.exe
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for gcc... (cached) gcc
checking whether the compiler supports GNU C... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to enable C11 features... (cached) none needed
checking whether gcc understands -c and -o together... (cached) yes
checking dependency style of gcc... (cached) gcc3
checking for g++... g++
checking whether the compiler supports GNU C++... yes
checking whether g++ accepts -g... yes
checking for g++ option to enable C++11 features... none needed
checking dependency style of g++... gcc3
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... C:/msys64/mingw64/x86_64-w64-mingw32/bin/ld.exe
checking if the linker (C:/msys64/mingw64/x86_64-w64-mingw32/bin/ld.exe) is GNU ld... yes
checking whether the g++ linker (C:/msys64/mingw64/x86_64-w64-mingw32/bin/ld.exe) supports shared libraries... yes
checking for g++ option to produce PIC... -DDLL_EXPORT -DPIC
checking if g++ PIC flag -DDLL_EXPORT -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (C:/msys64/mingw64/x86_64-w64-mingw32/bin/ld.exe) supports shared libraries... yes
checking dynamic linker characteristics... Win32 ld.exe
checking how to hardcode library paths into programs... immediate
checking whether make sets $(MAKE)... (cached) yes
checking whether ln -s works... no, using cp -pR
checking for grep that handles long lines and -e... (cached) /usr/bin/grep
checking for a sed that does not truncate output... (cached) /usr/bin/sed
checking for windres... windres
checking for egrep... (cached) /usr/bin/grep -E
checking for fcntl.h... yes
checking for limits.h... yes
checking for malloc.h... yes
checking for netdb.h... no
checking for netinet/in.h... no
checking for stddef.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for sys/ioctl.h... no
checking for sys/param.h... yes
checking for sys/socket.h... no
checking for sys/soundcard.h... no
checking for sys/time.h... yes
checking for sys/timeb.h... yes
checking for unistd.h... (cached) yes
checking for int16_t... yes
checking for int32_t... yes
checking for off_t... yes
checking for pid_t... yes
checking for size_t... yes
checking for working alloca.h... no
checking for alloca... yes
checking for error_at_line... no
checking for fork... no
checking for vfork... no
checking for GNU libc compatible malloc... (cached) yes
checking for GNU libc compatible realloc... (cached) yes
checking return type of signal handlers... void
checking for dup2... yes
checking for floor... yes
checking for getcwd... yes
checking for gethostbyname... no
checking for gettimeofday... yes
checking for memmove... yes
checking for memset... yes
checking for pow... yes
checking for regcomp... no
checking for select... no
checking for socket... no
checking for sqrt... yes
checking for strchr... yes
checking for strerror... yes
checking for strrchr... yes
checking for strstr... yes
checking for strtol... yes
checking for dlopen in -ldl... no
checking for cos in -lm... yes
checking for CoreAudio/CoreAudio.h... no
checking for pthread_create in -lpthread... yes
checking for msgfmt... yes
checking for sys/soundcard.h... (cached) no
checking for snd_pcm_info in -lasound... no
configure: Using included PortAudio
configure: Using included PortMidi
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating asio/Makefile
config.status: creating doc/Makefile
config.status: creating font/Makefile
config.status: creating mac/Makefile
config.status: creating man/Makefile
config.status: creating msw/Makefile
config.status: creating portaudio/Makefile
config.status: creating portmidi/Makefile
config.status: creating tcl/Makefile
config.status: creating tcl/pd-gui
config.status: creating po/Makefile
config.status: creating src/Makefile
config.status: creating extra/Makefile
config.status: creating extra/bob~/GNUmakefile
config.status: creating extra/bonk~/GNUmakefile
config.status: creating extra/choice/GNUmakefile
config.status: creating extra/fiddle~/GNUmakefile
config.status: creating extra/loop~/GNUmakefile
config.status: creating extra/lrshift~/GNUmakefile
config.status: creating extra/pd~/GNUmakefile
config.status: creating extra/pique/GNUmakefile
config.status: creating extra/sigmund~/GNUmakefile
config.status: creating extra/stdout/GNUmakefile
config.status: creating pd.pc
config.status: executing depfiles commands
config.status: executing libtool commands
configure:
pd 0.51.4 is now configured
Platform: MinGW
Debug build: no
Universal build: no
Localizations: yes
Source directory: .
Installation prefix: /mingw64
Compiler: gcc
CPPFLAGS:
CFLAGS: -g -O2 -ffast-math -funroll-loops -fomit-frame-pointer -O3
LDFLAGS:
INCLUDES:
LIBS: -lpthread
External extension: dll
External CFLAGS: -mms-bitfields
External LDFLAGS: -s -Wl,--enable-auto-import -no-undefined -lpd
fftw: no
wish(tcl/tk): wish85.exe
audio APIs: PortAudio ASIO MMIO
midi APIs: PortMidi
bhage@LAPTOP-F1TU0LRH MINGW64 /c/Users/bhage/Downloads/pd-0.51-4
$ make
CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/sh '/c/Useras/bhage/Downloads/pd-0.51-4/m4/config/missing' aclocal-1.16 -I m4/generated -I m4
configure.ac:170: error: AC_REQUIRE(): cannot be used outside of an AC_DEFUN'd macro
configure.ac:170: the top level
autom4te: error: /usr/bin/m4 failed with exit status: 1
aclocal-1.16: error: autom4te failed with exit status: 1
make: *** [Makefile:451: aclocal.m4] Error 1
bhage@LAPTOP-F1TU0LRH MINGW64 /c/Users/bhage/Downloads/pd-0.51-4
$ make app
CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/sh '/c/Users/bhage/Downloads/pd-0.51-4/m4/config/missing' aclocal-1.16 -I m4/generated -I m4
configure.ac:170: error: AC_REQUIRE(): cannot be used outside of an AC_DEFUN'd macro
configure.ac:170: the top level
autom4te: error: /usr/bin/m4 failed with exit status: 1
aclocal-1.16: error: autom4te failed with exit status: 1
make: *** [Makefile:451: aclocal.m4] Error 1
Reversing/Inverting Sawtooth alters the sound?
@Booberg Slew rate in electronics does not itself alter phase (arguable) as it is a byproduct, but there are countless things in most circuits which do alter phase. We use capacitors to block the DC voltages between different stages of the circuit so the DC voltages which set operating points for those stages don't interact with each other and alter the operating point of the other, these capacitors form filters with the resistances around them, phase is a much more fluid thing in the real world and less perfect than in the digital world. Sometimes we design out these capacitors to avoid these effects and directly couple the various stages in a circuit but this creates a teeter totter effect, altering one stage affects the others so you have to adjust them all and rebalance everything. But slew rate is not an issue in something like the transistor ladder since its effects will be insignificant compared to the effects of the filter unless the the cutoff is all the way up and Q all the way down and even then would likely be lost behind the circuits distortion and noise.
I do not know of any really good software transistor ladders, most if not all mimic the circuit as a whole instead of the individual stages which make up the circuit, this largely removes the highly interactive nature of the the stages and the controls but it is more CPU efficient and makes the filter respond as most people expect a filter to respond. The filter has four major components from the audio standpoint, input amp, the transistor ladder itself, the recovery/output amp, and the resonance path, each of these tailors the frequency response and distortion characteristic of the overall circuit and each of these influences how the others do this. Generally the primary source of distortion is the output amp loading down the ladder, but we can also overdrive the input for a different sound and high resonance settings will overdrive the ladder itself, changing the filters frequency can completely remove the distortion effects of the output amp and make the other sources primary and they each have a very different sort of distortion. We have four distinct sources of distortion and tone shaping besides the ladder at the core and all but the input circuitry are affected to some degree by the cutoff control voltage since changing the cutoff changes how the ladder loads the output amp which changes how the resonance path drives the core and loads the output stage. I know of no emulations which bothers to model all of this, they seem to all fixate on getting that handful of stereotypical sounds and call it good because they know that the first thing most people are going to do is set it for one of those sounds and if it gets that sound they will be convinced of it's authenticity, most have not spent enough time with the real thing or done extensive analysis of the circuit, they only know those stereotypical sounds, not how it responds to the musician.
Edit: I don't know if any of this actually matters or if anyone would notice the difference between the simplified emulations and an accurate one, musicians tend to be more practical than engineers and the practicality of my musician side lost out to my curiosity in such matters long ago. The real thing does respond much more like an acoustic instrument than an electronic instrument, which is why the mini was the first big success in synths, but I am not sure that plays any role these days.
LTSpice may be available for OSX, I don't actually know now that I think about it, if you have wine installed the windows version runs perfectly there. Check their site, it is free. I do not believe you would be able to run its circuits with other simulators but I could be wrong, the file syntax might just be plain old Spice.
Problems with jack on linux.
@bocanegra Thank you, i do hve librewolf (firefox) open, so i want that to work. i installed qjackctl and pulseaudio-jack on my artix (arch based) openrc system. it worked, purr data works, but librewolf audio clips and sounds like crap, i disconnected my usb headphones and reconnected them, but now librewolf outpts no audio, the same with purr data, except it shows up in the graph in qjackctl unlike librewolf which disappeared from there.
i restarted my system just now and jack won't start for some reason, but librewolf audio works fine.
error message in qjackctl:
13:31:47.206 JACK is starting...
13:31:47.208 /usr/bin/jackd -dalsa -dhw:0 -r48000 -p64
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
13:31:47.226 JACK was started with PID=3085.
Could not open component .so '/usr/lib/jack/jack_firewire.so': libffado.so.2: cannot open shared object file: No such file or directory
Could not open component .so '/usr/lib/jack/jack_firewire.so': libffado.so.2: cannot open shared object file: No such file or directory
jack_get_descriptor : dll
jack_get_descriptor returns null for 'jack_firewire.so'
Could not open component .so '/usr/lib/jack/jack_firewire.so': libffado.so.2: cannot open shared object file: No such file or directory
jackdmp 1.9.19
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2016 Grame.
Copyright 2016-2021 Filipe Coelho.
jackdmp comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
JACK server starting in realtime mode with priority 10
self-connect-mode is "Don't restrict self connect requests"
Cannot lock down 107341340 byte memory area (Cannot allocate memory)
audio_reservation_init
Acquire audio card Audio0
creating alsa driver ... hw:0|hw:0|64|2|48000|0|0|nomon|swmeter|-|32bit
ATTENTION: The playback device "hw:0" is already in use. Please stop the application using it and run JACK again
Released audio card Audio0
audio_reservation_finish
Cannot initialize driver
JackServer::Open failed with -1
Failed to open server
13:31:47.348 JACK was stopped
13:31:49.270 Could not connect to JACK server as client. - Overall operation failed. - Unable to connect to server. Please check the messages window for more info.
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
Any help?
Just Another (Drum) Sequencer...SortOf, codename: Virgo
Just Another (Drum) Sequencer...SortOf, codename: Virgo
REQUIRES: zexy, moonlib, tof (as of Pd 0.50.2, all of which are in deken) and hcs (which comes by default with Pd 0.50.2 and is in deken (for extended))
Special Features
- Unique playhead per row; each with their own metro (beat)
- Up to 8 Volume states-per-beat (by clicking multiple times on the bang; where an rms=1 is divide among the states (2 states:0=rms=0(black), 1=rms=1(red); 3 states:rms=[0|0.5|1])
- Design approach: using creation arguments to alias abstractions, so subsequently they are referred to by their creation arguments, ex. in [KITS sample] sample is referred to as [$1]; which is how they are listed below)
(notes: what I learned experimenting with this design approach, I will share as a separate post. Currently, it does not include cut-copy-paste (of regions of the pattern)). I good way to start trying it out is clicking the "R" to get a random kit and a random pattern).
virgo:[virgo/PROJECT KITS PATTERNS]
- PROJECT[KITS PATTERNS]
- $1:[KITS sample]
- GUI
- K: openpanel to load a previously saved *.txt (text object) kit of samples; on loadbang the default.txt kit is loaded
- S: save the current set of samples to the most recently opened *.txt (kit) preset
- SA: saveas a *.txt of the current set of samples
- D: foldererpanel a sample directory to load the first (alphabetically) 16 samples into the 16 slots
- RD: load a random kit from the [text samples] object where the samples where previously loaded via the "SAMPLES" bang on the right
- U: undo; return to the previously opened or saved *.txt kit, so not the previously randomized
- MASTER: master gain
- (recorder~: of the total audio~ out)
- record
- ||: pause; either recording or play;
- play: output is combined with the sequencer output just before MASTER out to [dac~]
- SAMPLES: folderpanel to load a (recursive) directory of samples for generating random kits
- ABSTRACTIONS
- $1: sample
- bang: openpanel to locate and load a sample for a track
- canvas: filename of the opened sample; filenames are indexed in alignment with track indices in the PATTERNS section
- $1: sample
- GUI
- $2:[PATTERNS row]
- GUI
- P: openpanel to load a previously saved *.txt (pattern) preset file; on loadbang the default.txt pattern is loaded; the preset file includes the beat, pattern, and effect settings for the row
- S: save the current pattern to the most recently opened pattern .txt
- SA: save as (self-explanatory)
- states: the number of possible states [2..8] of each beat;
- %: weight; chance of a beat being randomized; not chance of what it will result in; ex. 100% implies all beats are randomized ; random beats result in a value)gain) between 1 and states-1
- PLAY(reset): play the pattern from "start" or on stop reset all playheads to start
- start: which beat to start the playheads on
- length: how many beats to play [+/-32]; if negative the playheads will play in reverse/from right to left
- bpm: beats-per-minute
- rate: to change the rate of play (ie metro times) by the listed factor for all playheads
- R: randomize the total pattern (incl period and beats, but not the effect settings; beats of 1/32 are not included in the possibilities)
- CL: clear, set all beats to "0", i.e. off
- U: undo random; return to the previously opened or saved preset, ie. not the previous random one
- M: mute all tracks; the playheads continue moving but audio does not come out of any track
- ||:pause all playheads; play will resume from that location when un-paused
- per: period; if 0=randomizes the period, >0 sets the period to be used for all beats
- Edit Mode
- Check the [E] to enter edit mode (to cut, copy, or paste selected regions of the pattern)
- Entering edit mode will pause the playing of the pattern
- Play, if doing so beforehand, will resume on leavng edit mode
- The top-left most beat of the pattern grid will be selected when first entering edit mode
- Single-click a beat to select the top-left corner of the region you wish to cut or copy
- Double-click a beat to select the bottom-right corner
- You may not double-click a beat "less than" the single-clicked (top-left) beat and vice-versa
- Click [CL] to clear your selection (i.e. start over)
- The selected region will turn to dark colors
- If only one beat is selected it will be the only one darkened
- Click the operation (bang) you wish to perform, either cut [CU] or copy [CP]
- Then, hold down the CTRL key and click the top-left corner of where you want to paste the region
- The clicked cell will turn white
- And click [P] to paste the region
- Cut and copied regions may both be pasted multiple times
- The difference being, cutting sets the values (gains) for the originating region to "0"
- Click [UN] to undo either the cut, copy, or paste operation
- Undoing cut will return the gains from 0s to their original value
- Check the [E] to enter edit mode (to cut, copy, or paste selected regions of the pattern)
- (effect settings applied to all tracks)
- co: vcf-cutoff
- Q: vcf-q
- del: delay-time
- fb: delay-feedback
- dist: distortion
- reverb
- gn: gain
- ABSTRACTIONS
- $1: [row (idx) b8] (()=a property not an abstraction)
- GUI
- (index): aligns with the track number in the KITS section
- R: randomize the row; same as above, but for the row
- C: clear the row, i.e. set all beats to 0
- U: undo the randomize; return to the originally opened one, ie. not the previous random one
- M: mute the row, so no audio plays, but the playhead continues to play
- S: solo the row
- (beat): unit of the beat(period); implying metro length (as calculated with the various other parameters);1/32,1/16,1/8, etc.
- (pattern): the pattern for the row; single-click on a beat from 0 to 8 times to increment the gain of that beat as a fraction of 1 rms, where resulting rms=value/states; black is rms=0; if all beats for a row =0 (are black) then the switch for that track is turned off; double-click it to decrement it
- (effects-per-row): same as above, but per-row, ex. first column is vcf-cutoff, second is vcf-q, etc.
- ABSTRACTIONS
- $1: b8 (properties:row column)
- 8-state bang: black, red, orange, yellow, green, light-blue, blue, purple; representing a fraction of rms(gain) for the beat
- $1: b8 (properties:row column)
- GUI
- $1: [row (idx) b8] (()=a property not an abstraction)
- GUI
- $1:[KITS sample]
Credits: The included drum samples are from: https://www.musicradar.com/news/sampleradar-494-free-essential-drum-kit-samples
p.s. Though I began working on cut-copy-paste, it began to pose a Huge challenge, so backed off, in order to query the community as to 1) its utility in the current state (w/o that) and 2) just how important including it really is.
p.p.s. Please, report any inconsistencies (between the instructions as listed and what it does) and/or bugs you may find, and I will try to get an update posted as soon as enough of those have collect.
Love and Peace through sharing,
Scott
Optimizing pd performances to fit an RPI 3
Well I do not see what is the main difference with the result I've shown before, maybe now we know that vfprintf function call is linked to printf_chk, that I didn't seen before while profiling. Also we got a malloc call and some dac call, so if you got any clue of what it could meant it would be great. Then I have to agree profiling isn't easy(it's my first time doing it ^^) but trying to fix the problem as such low level coudl be the best way to find a real fix to this bottleneck.
@mnb Hello ! First I thank you to have uploaded your patches, they're great ! Then to answer you, no I'm using the groovebox 2, the one you recommend. So the problem isn't from the filter object. But since you coded this patch you maybe could run it on your config and report here how much CPU power it takes on your side. By doing this we could identify if the problem is coming from the code or my hardware(I remember reading somewhere that embed intel GPU could have crappy result with pd, so with a bit of luck i could find somekind of driver fix to this issue).
@EEight Well, when I'll get something running fine on my laptop I'll port it to the RPI and of course I'll use -nogui, even switch~ if it's possible. But on the two version of my ptach I got either 50% of my first core(whith a 2Ghz CPU) or on the v2 of the patch 4 cores running at peak over 50%. Considering that my Pi is using a Broadcom BCM2837, with 1,2 Ghz on four cores and that the frequency is lock by the system around 900 MGhz if I'm right, it's just impossible to run my patch now on the rpi. I thinked that in theory splitting the audio processing to spread the calculation over the processor I would get 1ghz of calculation devided in four and then I could reach 250-300 MHz on each cores, that could run very smoothly on a rpi. But because there is something bugging somewehre I've just multiply the audio processing ressources by FOUR ! And -no-gui(that I already use on my laptop) or other tip for optimization such as latency doesn't help the CPU on my laptop, so I don't even think of its efficency on a RPI. I also noticed that when I increased the latency of my pure data instances, CPU use goes up ! So it's not something I could use for optimization. And didn't find ways to run pd on alsa on my Pi the only way I could get it to run without crahsing when dsp is on is with jack.
Optimizing pd performances to fit an RPI 3
@Nicolas Danet Thanks for the tip, I didn't knew about Perf on linux it's very handy. I ran a test on each patch/subpatch and got the following:
So I will serach about -GI__printf_fp_l _IO-vfscanf vfprintf plus_pcrf8 and delay_tsc to see to what they match in PD. But if GI_printf and vfprintf are calls used by PD for the GUI object then @alexandros was right and I will replace all GUI object by text ones.
@EEight My problem with switch~ is not that I don't know how to use its syntax but more because splitting each sound processing patch in my patch would divide it into at least 16 different subpatch(probably more). And as far as I experimented the pd~ object I have noticed that running 9 subpatches took more ressources than just running 3. Considering this I'm not sure that implementing switch~ to my patch will introduce a significant gain of processing power. And it is the case it would be effecient if I only used few tracks out of the 8 track grroovebox that I'm working on, disable Fx ect.. and as soon I want to use the full capabilities of the patch it would crash because all the audio processing patch would run with the DSP and the CPU performances would rise again to what I got now.
Maybe I didn't explain it very clearly, so I will rapidly explain it again. My main problem here is that my intitial patch(we'll called it v1) uses 10-12% of CPU, and my motherpatch for different processes(let's call it v2) uses 18-20% + subpatch 1 running at 12-15% and subpatch 2 8-10%. So I got a v1 is runniingn 50% on one core and V2 and its subpatches is running at 30-40 with peak at 60% on four cores. Which is kind of the worst optimization of the history of computing ^^. Though ginving the Perf result I have something to investigate to see where the problem come from. I'll give you update as soon as I found out what to do.
EDIT: I did a bit of search it seems that IO-getc, GI-printf, IO-vfscanf and vfprintf are all functions used to manages stram of data. I'm not sure but I'm sending the value from my GUI/input patch to my auddi processing patch via netsend, maybe the way I'm doing it is not optimal, maybe I should switch to osc~ because it's more effective to stream large numbers of value. Maybe I messed up the way to through values into the subpatches(because if my netsending method is messy it does not explain why I see the same problematic function calls in the subpatches). It coould also be link to the GUI elements since data streaming could be used in in those. But it does not explain why there's the function call in my mother patch that isn't using any GUI elements. To get better result I will find directly in PD source code.
EDIT 2: I found vfprintf in this PD source file "pa_debugprint.c" so it don't validate the few hypothesis I made before, but in my pd window I got repeated messages like "output snd_pcm_delay failed: Unknown error 476 astate 3" they could be the reason of this. Then I also found plus.perf8 here "d_arithmetic.c" it seems relied to operators (/ * = -) I use them to set value to my synth ect... so getting rid of them would be very difficult if not impossible.