Skip to content

Commit

Permalink
Add -soundfile option to faust2object. Set version to 2.30.14.
Browse files Browse the repository at this point in the history
  • Loading branch information
sletz committed Feb 25, 2021
1 parent dedc21a commit 9428ccb
Show file tree
Hide file tree
Showing 17 changed files with 49 additions and 30 deletions.
2 changes: 1 addition & 1 deletion COPYING.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FAUST compiler, Version 2.30.13
FAUST compiler, Version 2.30.14
Copyright (C) 2003-2019 GRAME, Centre National de Creation Musicale
---------------------------------------------------------------------
This program is free software; you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version := 2.30.13
version := 2.30.14

system ?= $(shell uname -s)

Expand Down
4 changes: 4 additions & 0 deletions architecture/faust/dsp/cpp-dsp-adapter.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
#ifndef CPP_mydsp_adapter_H
#define CPP_mydsp_adapter_H

#if defined(SOUNDFILE)
#include "faust/gui/SoundUI.h"
#endif

class dsp;

// Factory API
Expand Down
14 changes: 7 additions & 7 deletions architecture/faust/gui/SoundUI.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,24 +42,24 @@

#if defined(JUCE_32BIT) || defined(JUCE_64BIT)
#include "faust/gui/JuceReader.h"
JuceReader gReader;
static JuceReader gReader;
#elif defined(ESP32)
#include "faust/gui/Esp32Reader.h"
Esp32Reader gReader;
static Esp32Reader gReader;
#elif defined(DAISY)
#include "faust/gui/WaveReader.h"
WaveReader gReader;
static WaveReader gReader;
#elif defined(MEMORY_READER)
#include "faust/gui/MemoryReader.h"
MemoryReader gReader;
static MemoryReader gReader;
#else
#include "faust/gui/LibsndfileReader.h"
LibsndfileReader gReader;
static LibsndfileReader gReader;
#endif

// To be used by DSP code if no SoundUI is used
std::vector<std::string> path_name_list;
Soundfile* defaultsound = gReader.createSoundfile(path_name_list, MAX_CHAN);
static std::vector<std::string> path_name_list;
static Soundfile* defaultsound = gReader.createSoundfile(path_name_list, MAX_CHAN);

class SoundUI : public SoundUIInterface
{
Expand Down
4 changes: 4 additions & 0 deletions architecture/minimal-effect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@
#include "faust/gui/meta.h"
#include "faust/dsp/dsp.h"

#if defined(SOUNDFILE)
#include "faust/gui/SoundUI.h"
#endif

using std::max;
using std::min;

Expand Down
2 changes: 1 addition & 1 deletion build/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ project (faust)

#######################################
# versions management
set (VERSION 2.30.13)
set (VERSION 2.30.14)
macro (get_major_minor_patch version)
string( REGEX REPLACE "([0-9]*)\\.([0-9]*)\\.([0-9]*)" "\\1" VERSION_MAJOR ${version} )
string( REGEX REPLACE "([0-9]*)\\.([0-9]*)\\.([0-9]*)" "\\2" VERSION_MINOR ${version} )
Expand Down
2 changes: 1 addition & 1 deletion build/MakeRelease.bat
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ echo off
IF [%1]==[] GOTO USAGE
IF NOT EXIST %1 GOTO USAGE

SET VERSION=2.30.13
SET VERSION=2.30.14
SET BUILD=%1
SET FAUSTGENVERSION=1.48
SET FAUSTLIVE=../../faustlive
Expand Down
2 changes: 1 addition & 1 deletion build/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ system := $(shell echo $(system) | grep MINGW > /dev/null && echo MINGW || echo
# output directories
FAUSTDIR ?= faustdir
IOSDIR := iosdir
VERSION := 2.30.13
VERSION := 2.30.14

#===============================================================
# current generator and backends
Expand Down
2 changes: 1 addition & 1 deletion compiler/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
% man(1) Version 2.30.13 (17-February-2021) | Faust man page
% man(1) Version 2.30.14 (25-February-2021) | Faust man page

NAME
====
Expand Down
2 changes: 1 addition & 1 deletion compiler/generator/export.hh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#ifndef __export__
#define __export__

#define FAUSTVERSION "2.30.13"
#define FAUSTVERSION "2.30.14"

#ifdef _WIN32
#define EXPORT __declspec(dllexport)
Expand Down
2 changes: 1 addition & 1 deletion documentation/man/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
% man(1) Version 2.30.13 (17-February-2021) | Faust man page
% man(1) Version 2.30.14 (25-February-2021) | Faust man page

NAME
====
Expand Down
2 changes: 1 addition & 1 deletion documentation/man/man-header.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
% man(1) Version 2.30.13 (17-February-2021) | Faust man page
% man(1) Version 2.30.14 (25-February-2021) | Faust man page

NAME
====
Expand Down
2 changes: 1 addition & 1 deletion documentation/man/man1/faust.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" Automatically generated by Pandoc 2.10.1
.\"
.TH "man" "1" "" "Version 2.30.13 (17-February-2021)" "Faust man page"
.TH "man" "1" "" "Version 2.30.14 (25-February-2021)" "Faust man page"
.hy
.SH NAME
.PP
Expand Down
3 changes: 2 additions & 1 deletion tools/benchmark/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,14 @@ Here are the available options:

The **faust2object** tool either uses the standard C++ compiler or the LLVM dynamic compilation chain (the **dynamic-faust** tool) to compile a Faust DSP to object code files (.o) and wrapper C++ header files for different CPUs. The DSP name is used in the generated C++ and object code files, thus allowing to generate distinct versions of the code that can finally be linked together in a single binary. Using a C++ wrapper, the DSP can be downsampled of upsampled by a factor, with a filter going from 0 (= no filter), then 1 (lower quality) to 4 (better quality).

`faust2object [nocona] [core2] [penryn] [bonnell] [atom] [silvermont] [slm] [goldmont] [goldmont-plus] [tremont] [nehalem] [corei7] [westmere] [sandybridge] [corei7-avx] [ivybridge] [core-avx-i] [haswell] [core-avx2] [broadwell] [skylake] [skylake-avx512] [skx] [cascadelake] [cooperlake] [cannonlake] [icelake-client] [icelake-server] [tigerlake] [knl] [knm] [k8] [athlon64] [athlon-fx] [opteron] [k8-sse3] [athlon64-sse3] [opteron-sse3] [amdfam10] [barcelona] [btver1] [btver2] [bdver1] [bdver2] [bdver3] [bdver4] [znver1] [znver2] [x86-64] [generic] [-all] [-sources] [-multi] [-multifun] [-opt native|generic] [-llvm] [-test] [-us <factor>] [-ds <factor>] [-filter <filter(0..4)>] [additional Faust options (-vec -vs 8...)] <file.dsp>`
`faust2object [nocona] [core2] [penryn] [bonnell] [atom] [silvermont] [slm] [goldmont] [goldmont-plus] [tremont] [nehalem] [corei7] [westmere] [sandybridge] [corei7-avx] [ivybridge] [core-avx-i] [haswell] [core-avx2] [broadwell] [skylake] [skylake-avx512] [skx] [cascadelake] [cooperlake] [cannonlake] [icelake-client] [icelake-server] [tigerlake] [knl] [knm] [k8] [athlon64] [athlon-fx] [opteron] [k8-sse3] [athlon64-sse3] [opteron-sse3] [amdfam10] [barcelona] [btver1] [btver2] [bdver1] [bdver2] [bdver3] [bdver4] [znver1] [znver2] [x86-64] [generic] [-all] [-soundfile] [-sources] [-multi] [-multifun] [-opt native|generic] [-llvm] [-test] [-us <factor>] [-ds <factor>] [-filter <filter(0..4)>] [additional Faust options (-vec -vs 8...)] <file.dsp>`

Here are the available options:

- `'xxx' to compile for 'xxx' CPU`
- `generic to compile for generic CPU`
- `-all to compile for all CPUs`
- `-soundfile when compiling a DSP using the 'soundfile' primitive, add required resources`
- `-sources' to only generate source files`
- `-multi to compile for several CPUs and aggregate them in a 'multi' class that choose the correct one at runtime`
- `-multifun to compile for several CPUs using GCC MultiFun feature and aggregate them in a 'multi' class that choose the correct one at runtime`
Expand Down
18 changes: 14 additions & 4 deletions tools/benchmark/faust2object
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ LLVM_ADAPTER=$FAUSTINC/faust/dsp/llvm-dsp-adapter.h
CPP_ADAPTER=$FAUSTINC/faust/dsp/cpp-dsp-adapter.h
MULTI_ADAPTER=$FAUSTINC/faust/dsp/dsp-multi.h
MULTIFUN_ADAPTER=$FAUSTINC/faust/dsp/dsp-multifun.h
SOUNDFILE="0"
SOUNDFILEDEFS=""
SOUNDFILEINCS=""
SOUNDFILELIBS=""
dspName=""

ALL_CPU_LIST="nocona core2 penryn bonnell atom silvermont slm goldmont goldmont-plus tremont nehalem corei7 westmere sandybridge corei7-avx ivybridge core-avx-i haswell core-avx2 broadwell skylake skylake-avx512 skx cascadelake cooperlake cannonlake icelake-client icelake-server tigerlake knl knm k8 athlon64 athlon-fx opteron k8-sse3 athlon64-sse3 opteron-sse3 amdfam10 barcelona btver1 btver2 bdver1 bdver2 bdver3 bdver4 znver1 znver2 x86-64 generic"
Expand All @@ -36,10 +40,11 @@ do
p=$1

if [ $p = "-help" ] || [ $p = "-h" ]; then
echo "faust2object [nocona] [core2] [penryn] [bonnell] [atom] [silvermont] [slm] [goldmont] [goldmont-plus] [tremont] [nehalem] [corei7] [westmere] [sandybridge] [corei7-avx] [ivybridge] [core-avx-i] [haswell] [core-avx2] [broadwell] [skylake] [skylake-avx512] [skx] [cascadelake] [cooperlake] [cannonlake] [icelake-client] [icelake-server] [tigerlake] [knl] [knm] [k8] [athlon64] [athlon-fx] [opteron] [k8-sse3] [athlon64-sse3] [opteron-sse3] [amdfam10] [barcelona] [btver1] [btver2] [bdver1] [bdver2] [bdver3] [bdver4] [znver1] [znver2] [x86-64] [generic] [-all] [-sources] [-multi] [-multifun] [-opt native|generic] [-llvm] [-test] [-us <factor>] [-ds <factor>] [-filter <filter(0..4)>] [additional Faust options (-vec -vs 8...)] <file.dsp>"
echo "faust2object [nocona] [core2] [penryn] [bonnell] [atom] [silvermont] [slm] [goldmont] [goldmont-plus] [tremont] [nehalem] [corei7] [westmere] [sandybridge] [corei7-avx] [ivybridge] [core-avx-i] [haswell] [core-avx2] [broadwell] [skylake] [skylake-avx512] [skx] [cascadelake] [cooperlake] [cannonlake] [icelake-client] [icelake-server] [tigerlake] [knl] [knm] [k8] [athlon64] [athlon-fx] [opteron] [k8-sse3] [athlon64-sse3] [opteron-sse3] [amdfam10] [barcelona] [btver1] [btver2] [bdver1] [bdver2] [bdver3] [bdver4] [znver1] [znver2] [x86-64] [generic] [-all] [-soundfile] [-sources] [-multi] [-multifun] [-opt native|generic] [-llvm] [-test] [-us <factor>] [-ds <factor>] [-filter <filter(0..4)>] [additional Faust options (-vec -vs 8...)] <file.dsp>"
echo "Use 'xxx' to compile for 'xxx' CPU"
echo "Use 'generic' to compile for generic CPU"
echo "Use '-all' to compile for all CPUs"
echo "Use '-soundfile' when compiling a DSP using the 'soundfile' primitive, add required resources"
echo "Use '-sources' to only generate source files"
echo "Use '-multi' to compile for several CPUs and aggregate them in a 'multi' class that choose the correct one at runtime"
echo "Use '-multifun' to compile for several CPUs using GCC MultiFun feature and aggregate them in a 'multi' class that choose the correct one at runtime"
Expand Down Expand Up @@ -80,6 +85,11 @@ do
elif [ $p = "-filter" ]; then
shift
FILTER=$1
elif [ $p = "-soundfile" ]; then
SOUNDFILE="1"
SOUNDFILEDEFS="-DSOUNDFILE"
SOUNDFILEINCS=`pkg-config --cflags sndfile`
SOUNDFILELIBS=`pkg-config --cflags --static --libs sndfile`
elif [[ -f "$p" ]]; then
FILES="$FILES $p"
elif [ ${p:0:1} = "-" ]; then
Expand Down Expand Up @@ -154,7 +164,7 @@ for p in $FILES; do

# compiling
if [ $SOURCES = false ]; then
$CXX -Ofast -march=$arch_cpu -I `faust -includedir` -c $dspName$cpu".cpp"
$CXX -Ofast -march=$arch_cpu -I `faust -includedir` $SOUNDFILEDEFS $SOUNDFILEINCS -c $dspName$cpu".cpp"
fi
fi
done
Expand Down Expand Up @@ -196,9 +206,9 @@ for p in $FILES; do
faust -inj $dspName"multi.h" -a $FAUSTARCH/minimal-bench.cpp -cn $dspName"multi" $OPTIONS $p -o $dspName"multi.cpp"

if [ $MULTI = true ]; then
$CXX -Ofast -std=c++14 $dspName"multi.cpp" -dead_strip -I `llvm-config --includedir --ldflags --libs all --system-libs` $dspName*".o" -o $dspName"multi"
$CXX -Ofast -std=c++14 $dspName"multi.cpp" -dead_strip $SOUNDFILEDEFS $SOUNDFILELIBS -I `llvm-config --includedir --ldflags --libs all --system-libs` $dspName*".o" -o $dspName"multi"
elif [ $MULTIFUN = true ]; then
$CXX -Ofast -std=c++14 $dspName"multi.cpp" $dspName"generic.cpp" -o $dspName"multi"
$CXX -Ofast -std=c++14 $dspName"multi.cpp" $dspName"generic.cpp" $SOUNDFILEDEFS $SOUNDFILELIBS -o $dspName"multi"
fi

echo "Run ./"$dspName"multi"" to test the program"
Expand Down
8 changes: 4 additions & 4 deletions windows/faust.rc
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ END
//

VS_VERSION_INFO VERSIONINFO
FILEVERSION 2,30,13,0
PRODUCTVERSION 2,30,13,0
FILEVERSION 2,30,14,0
PRODUCTVERSION 2,30,14,0
FILEFLAGSMASK 0x17L
#ifdef _DEBUG
FILEFLAGS 0x1L
Expand All @@ -68,12 +68,12 @@ BEGIN
BLOCK "040c04b0"
BEGIN
VALUE "FileDescription", "Faust compiler"
VALUE "FileVersion", "2, 30, 13, 0"
VALUE "FileVersion", "2, 30, 14, 0"
VALUE "InternalName", "Faust"
VALUE "LegalCopyright", "Copyright (C) 2009-2019 - Grame"
VALUE "OriginalFilename", "faust.exe"
VALUE "ProductName", "Faust"
VALUE "ProductVersion", "2, 30, 13, 0"
VALUE "ProductVersion", "2, 30, 14, 0"
END
END
BLOCK "VarFileInfo"
Expand Down
8 changes: 4 additions & 4 deletions windows/faustdll.rc
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ END
//

VS_VERSION_INFO VERSIONINFO
FILEVERSION 2,30,13,0
PRODUCTVERSION 2,30,13,0
FILEVERSION 2,30,14,0
PRODUCTVERSION 2,30,14,0
FILEFLAGSMASK 0x17L
#ifdef _DEBUG
FILEFLAGS 0x1L
Expand All @@ -68,12 +68,12 @@ BEGIN
BLOCK "040c04b0"
BEGIN
VALUE "FileDescription", "Faust compiler"
VALUE "FileVersion", "2, 30, 13, 0"
VALUE "FileVersion", "2, 30, 14, 0"
VALUE "InternalName", "Faust"
VALUE "LegalCopyright", "Copyright (C) 2009-2019 - Grame"
VALUE "OriginalFilename", "faust.exe"
VALUE "ProductName", "Faust"
VALUE "ProductVersion", "2, 30, 13, 0"
VALUE "ProductVersion", "2, 30, 14, 0"
END
END
BLOCK "VarFileInfo"
Expand Down

0 comments on commit 9428ccb

Please sign in to comment.