Skip to content

Commit

Permalink
Add warning when -msi used with faust2pd.
Browse files Browse the repository at this point in the history
  • Loading branch information
sletz committed Jul 14, 2024
1 parent 26fd9e4 commit f0c7f1f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
8 changes: 6 additions & 2 deletions architecture/puredata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
************************************************************************
FAUST Architecture File
Copyright (C) 2006-2011 Albert Graef <Dr.Graef@t-online.de>
Copyright (C) 2024 Christof Ressi <christof.ressi@gmx.at>
---------------------------------------------------------------------
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
Expand All @@ -20,10 +21,13 @@
************************************************************************
************************************************************************/

/* Pd architecture file, written by Albert Graef <Dr.Graef@t-online.de>.
/*
Pd architecture file, written by Albert Graef <Dr.Graef@t-online.de>
and Christof Ressi <christof.ressi@gmx.at>.
This was derived from minimal.cpp included in the Faust distribution.
Please note that this is to be compiled as a shared library, which is
then loaded dynamically by Pd as an external. */
then loaded dynamically by Pd as an external.
*/

#include <assert.h>
#include <stdlib.h>
Expand Down
14 changes: 9 additions & 5 deletions tools/faust2appls/faust2puredata
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ echoHelp()
option -arch32 "compile a 32 bits architecture."
option -arch64 "compile a 64 bits architecture."
option -poly "generates a polyphonic self-contained DSP."
option -msi "message and signal first inlet."
option -msi "use a first inlet handing messages and signal."
option -tosource "skip the C++ compiling step and only generate the C++ source file."
option "Faust options"
exit
Expand Down Expand Up @@ -69,7 +69,7 @@ for p in $@; do
OPTIONS="$OPTIONS $p"
fi
done

#-------------------------------------------------------------------
# Check darwin specifics
#
Expand Down Expand Up @@ -129,15 +129,19 @@ for p in $FILES; do
$CXX $CXXFLAGS $FAUSTTOOLSFLAGS $PROCARCH $OMP $LIB -Dmydsp=${f%.dsp} -o ${f%.dsp}$EXT $CXX_SOURCE || exit
fi
if [ $(which faust2pd) ]; then
faust2pd -s $F2PDPOLY $f.xml
if [ "$MI" == "1" ]; then
faust2pd -s $F2PDPOLY $f.xml
else
echo "WARNING : -msi cannot yet be used with faust2pd"
fi
fi
) > /dev/null || exit

rm -rf "$SRCDIR/${f%.dsp}$EXT"
cp "$TMP/${f%.dsp}$EXT" "$SRCDIR/${f%.dsp}$EXT"
# collects all the files produced
OUTPUTS="$OUTPUTS$SRCDIR/${f%.dsp}$EXT;"
if [ $(which faust2pd) ]; then
if [[ $(which faust2pd) && "$MI" == "1" ]]; then
cp "$TMP/${f%.dsp}.pd" "$SRCDIR/${f%.dsp}.pd"
OUTPUTS="$OUTPUTS$SRCDIR/${f%.dsp}.pd;"
fi
Expand Down

0 comments on commit f0c7f1f

Please sign in to comment.