Hi there,
I created a PR that implements threaded I/O for Pd's GUI and netsend/netreceive objects. The objective is to have the audio thread free of select()s and locks wherever possible ("best effort RT-friendly"). Our Bela users have been using libpd with previous versions of these commits for almost 5 years and I thought it was about time to try and upstream the changes. It's my first big PR submission for Pd, so I am looking forward to your comments.
Details in the PR: https://github.com/pure-data/pure-data/pull/1261
Kind regards,
Giulio
I took the liberty to move this over to pd-dev
On Fri, 2021-01-08 at 03:48 -0300, Alexandre Torres Porres wrote:
> Em qui., 7 de jan. de 2021 Ã s 20:07, Roman Haefeli <
> reduzent(a)gmail.com> escreveu:
> > On Thu, 2021-01-07 at 00:14 -0300, Alexandre Torres Porres wrote:
> >
> > > we still need to sort this for linux,
> >
> > Since you seem you got it sorted (and I figured out how to compile
> > fluidsynth with no additional deps)
>
> how did that go?
I just updated pd-fluidsynth repo to get your and Lucas' most recent
changes. I didn't have to modify anything for the build process to
work.
~~~sh
cd pd-fluidsynth
make pkglibdir=$HOME/pd-src/workspace/Linux-arm7-32
make pkglibdir=$HOME/pd-src/workspace/Linux-arm7-32 install
cd $HOME/pd-src/workspace/Linux-arm7-32/fluid~
sh linuxdep32.sh
rm linuxdep32
~~~
However, the crucial part is that the included libfluidsynth.so should
not be "tainted" with support for all kinds of things. This means, you
can't take the one shipped by the distro.
> Can you describe the steps and put it in our readme (with a PR)?
You mean what steps were necessary to compile fluidsynth? I didn't have
to do anything suprising or special. I just had to figure out how to
disable everything by reading the docs about building. This is what I
came up with (I hope it is correct and complete):
~~~sh
git clone https://github.com/FluidSynth/fluidsynth/
cd fluidsynth
mkdir build
cd build
cmake -Denable-libsndfile=off -Denable-jack=off -Denable-alsa=off -Denable-oss=off -Denable-pulseaudio=off -Denable-ladspa=off -Denable-aufile=off -Denable-network=off -Denable-ipv6=off -Denable-getopt=off -Denable-sdl2=off ..
make
sudo make install
~~~
After this, I compiled fluid~ with steps from above.
Regarding the makefile of pd-fluidsynth, I don't understand the purpose
of this section:
---
define forLinux
ifeq ($(firstword $(subst -, ,$(shell $(CC) -dumpmachine))), i686)
datafiles += scripts/linuxdep32.sh
else
datafiles += scripts/linuxdep64.sh
endif
endef
---
Depending on which arch is detected, it'll add one or the other script
in the build result. I think what this is meant to do is to _execute_
the arch specific script, so that libraries get included. I'm not yet
familiar with makefiles to tell you just right away how this is done,
but according to the snippet, I'd suppose something like this:
---
define forLinux
ifeq ($(firstword $(subst -, ,$(shell $(CC) -dumpmachine))), i686)
$(shell /bin/sh scripts/linuxdep32.sh)
else
$(shell /bin/sh scripts/linuxdep32.sh)
endif
endef
---
In order to include the additional dynamic libraries, you'd add
'libfluidsynth.so*' to 'datafiles'.
However, the above detection fails for arm7 and it'll wrongly executes
scripts/linuxdep64.sh. I think instead of an if-else, it could detect
the arch and execute the appropriate script with arch in the name. If
the scripts for several archs turn out to be the same, they could be
symlinked. Just an idea.
Another thing about scripts/linuxdep*.sh script. I think they should
call cp with the -d flag. Without it, it creates three full copies of
the same .so file. With -d symlinks are preserved.
I realize it's a lot of suggestions. Sorry for that. So maybe a PR
would be easier for you to digest. Thing is I don't feel yet
sufficiently confident with these matters, but am happy to learn.
Roman
Hi -
So during lockdown here in Ireland, I bought a Sensel Morph to try and
improve my PD performance abilities. I love the device, and very quickly
graduated to trying to work with its MIDI MPE capabilities. This rapidly
led me down the road to writing an an external [mpoly] object to handle the
variety of messages that need to be dispatched for MPE. Having become
frustrated with limitations in Sensels MIDI mapping software, I then
proceeded to write a series of external objects that use the Sensel device
API to directly communicate with PD.
And it all seems stable enough to release, but I'm a bit hazy on some
aspects of publishing to deken, and was hoping someone could either answer
my questions or point me to an appropriate document (as these questions
haven't been addressed in anything I have found so far).
1 - How can I test my packaging and its installation?
2 - Can deken packages be deleted/removed/name changed?
3 - Do I need to support all architectures on day 1? (currently I build
Linux/Win)
4 - Where can I get the nice help templates used by Else/Cyclone &cet?
Everything I've found online seems to be both massively out of date
and expects that you already know how to use it.
5 - One or Two packages?
Currently, I have two separate shared libs, one requires the Sensel
library, one does not. I haven't checked the licensing yet, but I
assume
the Sensel library probably can't be distributed in a deken friendly
way.
So that's my list :) Any help would be greatly appreciated. The help
template question is particularly vexing, as I find that help files for PD
objects are *essential* to being able for me to figure things out, even
when I grab someone else's code.
Thanks in Advance
d
--
GPG Public key at http://cyber-rush.org/drr/gpg-public-key.txt
I'm looking for a solution to have the values of input and output audio
latency inside Pd. The same many DAW's show in audio preferences.
The use case is I'm writing a patch using [abl_link~], that ensure music
event synchronization whenever I set an offset parameter with the output
audio latency.
I found these:
https://stackoverflow.com/questions/37729442/how-do-you-find-the-audio-late…
which can be a start point.. or not.... once there is not jack.
Thanks for any advance!
--
Esteban Viveros
www.estebanviveros.com
Before anyone looks further into the *details* ie. compiler flags, the configure overview output gives us a clue:
> configure:
>
> pd 0.51.3 is now configured
>
> Platform: Unknown
Clearly, configure failed and it never set the platform. The platform-specific / host checks failed and it probably half-defaults to building for Linux which is why it's trying to build the OSS audio backend.
Now, looking at the beginning of the same configure log, we see:
> checking build system type... x86_64-pc-msys
> checking host system type... x86_64-pc-msys
> configure: iPhone SDK only available for arm-apple-darwin hosts, skipping tests
> configure: Android SDK only available for arm-linux hosts, skipping tests
Hmm. The canonical host it's seeing is "x86_64-pc-msys" which is not one we actually support directly. What we support for building on windows with autootols is "mingw" see
https://github.com/pure-data/pure-data/blob/master/configure.ac#L108 <https://github.com/pure-data/pure-data/blob/master/configure.ac#L108>
So I think this a configuration issue with your setup as you are somehow not building with mingw as we have listed in the INSTALL.txt. One reason for this may be using the wrong shell, ie. MSYS2 instead of the explicit MinGW64 shell. It's been a few years since I've worked directly with MinGW & Pd, so the naming may have changed... which is also why we wrote the steps in INSTALL.txt. :)
--------
Dan Wilcox
@danomatika <http://twitter.com/danomatika>
danomatika.com <http://danomatika.com/>
robotcowboy.com <http://robotcowboy.com/>
Hi -
I imagine that this is somehow my mistake, but I am having persistent
problems with building PD 0.51.x from git under the latest MSys2/Mingw64 gcc
$ gcc --version
gcc (GCC) 10.2.0
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is
NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
$ gcc -dumpmachine
x86_64-pc-msys
The issues seem to center around various WIN32 compatibility hacks. If I
use the usual
$ ./autogen.sh
$ ./configure
$ make clean
$ make all
the build fails while linking pd.exe
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld:
pd-s_audio_oss.o: in function `oss_open_audio':
/c/Users/User/git/pure-data/src/s_audio_oss.c:305: undefined reference
to `sys_setalarm'
/c/Users/User/git/pure-data/src/s_audio_oss.c:305:(.text+0xee3):
relocation truncated to fit: R_X86_64_PC32 against undefined symbol
`sys_setalarm'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld:
/c/Users/User/git/pure-data/src/s_audio_oss.c:394: undefined reference to
`sys_setalarm'
&cet
interestingly, that build also generates a warning message while compiling
s_inter.c (which defines sys_setalarm() under the right set of compiler
flags) indicating that _WIN32 is not defined.
s_inter.c: In function ‘sys_init_deken’:
s_inter.c:998:4: warning: #warning unknown OS [-Wcpp]
998 | # warning unknown OS
So if I instead build with CFLAGS=-D_WIN32, I get a different set of errors
while building s_inter.c
/usr/include/w32api/psdk_inc/_fd_types.h:100:2: warning: #warning
"fd_set and associated macros have been defined in sys/types. This can
cause runtime problems with W32 sockets" [-Wcpp]
/usr/include/w32api/winsock2.h:1025:34: error: conflicting types for
‘select’
s_inter.c:217:52: warning: passing argument 5 of ‘select’ from
incompatible pointer type [-Wincompatible-pointer-types]
/usr/include/w32api/winsock2.h:1025:116: note: expected ‘PTIMEVAL’ {aka
‘struct __ms_timeval * const’} but argument is of type ‘struct timeval *’
s_inter.c:490:17: warning: implicit declaration of function ‘write’;
did you mean ‘fwrite’? [-Wimplicit-function-declaration]
s_inter.c:1305:20: warning: implicit declaration of function ‘_spawnl’;
did you mean ‘spawnl’? [-Wimplicit-function-declaration]
s_inter.c:1305:28: error: ‘P_NOWAIT’ undeclared (first use in this
function)
s_inter.c:1493:10: warning: implicit declaration of function ‘_exit’
[-Wimplicit-function-declaration]
s_inter.c:1493:10: warning: incompatible implicit declaration of
built-in function ‘_exit’
Could someone please enlighten me? Or point me to relevant documentation?
ig gcc 10.2.0 known to be problematic?
TIA
--
GPG Public key at http://cyber-rush.org/drr/gpg-public-key.txt
Hi, when compiling ELSE for camomille in windows, me and Esteban are
getting some errors. Offending pieces of code are when trying to do things
like
t_atom at[ac];
and
t_float temp[n];
from stackflow
<https://stackoverflow.com/questions/9881777/why-do-i-get-cannot-allocate-an…>
we see "*You cannot allocate an array of unknown size with automatic
storage duration in C++. If you want a variable sized array then you need
to dynamically allocate it (or, better yet; just use a vector).*"
Thing is we don't know how to proceed here and are looking for hints, maybe
showing how other objects in Pd deal with this.
BTW, there's an issue <https://github.com/porres/pd-else/issues/881> on
ELSE's repository.
Thanks
Alex