Skip to content

Commit

Permalink
Merge pull request #3 from pierreguillot/dev/v0.0.3
Browse files Browse the repository at this point in the history
Dev/v0.0.3
  • Loading branch information
pierreguillot authored Jul 25, 2018
2 parents 698a02a + 39139b5 commit 49b9574
Show file tree
Hide file tree
Showing 29 changed files with 1,865 additions and 1,080 deletions.
10 changes: 5 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ matrix:
script:
- mkdir build && cd build
- cmake .. -GXcode -DUSE_LLVM_CONFIG=off -DLLVM_DIR=./llvm/lib/cmake/llvm
- cmake --build . --config Release --target faust_tilde_project
- cmake --build . --config Release --target faustgen_tilde_project
- os: linux
compiler: gcc
env: release_arch=Linux-amd64-32
Expand All @@ -29,16 +29,16 @@ matrix:
script:
- mkdir build && cd build
- cmake .. -DCMAKE_C_FLAGS=-m64 -DUSE_LLVM_CONFIG=off -DLLVM_DIR=./llvm/lib/cmake/llvm -DCMAKE_BUILD_TYPE=Release
- cmake --build . --config Release --target faust_tilde_project
- cmake --build . --config Release --target faustgen_tilde_project
before_deploy:
- cd $TRAVIS_BUILD_DIR
- cp -r faust/libraries external/libs
- cp src/faust_tilde.c external/faust_tilde.c
- cp src/faustgen_tilde.c external/faustgen_tilde.c
- cp README.md external/README.txt
- cp LICENSE external/LICENSE.txt
- curl -o ./external/faust-quick-reference.pdf http://faust.grame.fr/images/faust-quick-reference.pdf
- mv external faust~
- zip -r "faust_tilde-$release_arch-sources.zip" faust~
- mv external faustgen~
- zip -r "faustgen_tilde-$release_arch-sources.zip" faustgen~

deploy:
provider: releases
Expand Down
24 changes: 16 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set(CMAKE_OSX_DEPLOYMENT_TARGET 10.9)

include(pd.build/pd.cmake)

project(faust~ C)
project(faustgen~ C)

## On Linux "force" the link with stdc++
if(UNIX AND NOT APPLE)
Expand All @@ -29,17 +29,25 @@ endif()

include(FaustLib.cmake)
## Create Faust~
message(STATUS "Faust External")
message(STATUS "faustgen~ external")

## Create the Pure Data external
set_pd_sources(${PROJECT_SOURCE_DIR}/pure-data/src/)
set_pd_external_path("${PROJECT_SOURCE_DIR}/external/")
add_pd_external(faust_tilde_project faust~ ${PROJECT_SOURCE_DIR}/src/faust_tilde.c)
file(GLOB faustgen_tilde_sources
${PROJECT_SOURCE_DIR}/src/faustgen_tilde.c
${PROJECT_SOURCE_DIR}/src/faust_tilde_ui.h
${PROJECT_SOURCE_DIR}/src/faust_tilde_ui.c
${PROJECT_SOURCE_DIR}/src/faust_tilde_io.h
${PROJECT_SOURCE_DIR}/src/faust_tilde_io.c
${PROJECT_SOURCE_DIR}/src/faust_tilde_options.h
${PROJECT_SOURCE_DIR}/src/faust_tilde_options.c)
add_pd_external(faustgen_tilde_project faustgen~ "${faustgen_tilde_sources}")

## Link the Pure Data external with faustlib
include_directories(${PROJECT_SOURCE_DIR}/faust/architecture)
add_dependencies(faust_tilde_project staticlib)
target_link_libraries(faust_tilde_project staticlib)
add_dependencies(faustgen_tilde_project staticlib)
target_link_libraries(faustgen_tilde_project staticlib)

## Link the Pure Data external with llvm
find_package(LLVM REQUIRED CONFIG)
Expand All @@ -50,11 +58,11 @@ add_definitions(${LLVM_DEFINITIONS})
include_directories(${LLVM_INCLUDE_DIRS})
llvm_map_components_to_libnames(llvm_libs all)
list(REMOVE_ITEM llvm_libs LTO)
target_link_libraries(faust_tilde_project ${llvm_libs})
target_link_libraries(faustgen_tilde_project ${llvm_libs})
if(WIN32)
target_link_libraries(faust_tilde_project ws2_32)
target_link_libraries(faustgen_tilde_project ws2_32)
endif()

if(MSVC)
set_property(TARGET faust_tilde_project APPEND_STRING PROPERTY LINK_FLAGS " /ignore:4099 ")
set_property(TARGET faustgen_tilde_project APPEND_STRING PROPERTY LINK_FLAGS " /ignore:4099 ")
endif()
16 changes: 16 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
v0.0.3
- Change name from faust~ to faustgen~
- Remove abstraction faust.watcher
- Add support for autocompile method
- Add support for passive parameter
- Add support for list of active parameters
- Add support for ui glue long names
- Add support for dynamic compile options
- Improve print method

v0.0.2
- Fix Linux dependencies
- Add abstraction faust.watcher

v0.0.1
- Integration of FAUST lib inside the faust~ external (Linux/MacOS/Windows)
56 changes: 28 additions & 28 deletions FaustDeken.bat
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
@echo off
title Deken manager for Faust~ for Pure Data
title Deken manager for faustgen~ for Pure Data
set release_version=%1

rmdir /S /Q faust~
rmdir /S /Q faustgen~
del /F /S /Q /A *.dek
del /F /S /Q /A *.dek.sha256
del /F /S /Q /A *.dek.txt

del /F /Q faust_tilde_darwin.zip
curl -L https://github.com/pierreguillot/faust-pd/releases/download/v%release_version%/faust_tilde-Darwin-amd64-32-sources.zip -o faust_tilde_darwin.zip
7z x faust_tilde_darwin.zip
deken package -v%release_version% faust~
rmdir /S /Q faust~
del /F /Q faust_tilde_darwin.zip
del /F /Q faustgen_tilde_darwin.zip
curl -L https://github.com/pierreguillot/faust-pd/releases/download/v%release_version%/faustgen_tilde-Darwin-amd64-32-sources.zip -o faustgen_tilde_darwin.zip
7z x faustgen_tilde_darwin.zip
deken package -v%release_version% faustgen~
rmdir /S /Q faustgen~
del /F /Q faustgen_tilde_darwin.zip

del /F /Q faust_tilde_linux.zip
curl -L https://github.com/pierreguillot/faust-pd/releases/download/v%release_version%/faust_tilde-Linux-amd64-32-sources.zip -o faust_tilde_linux.zip
7z x faust_tilde_linux.zip
deken package -v%release_version% faust~
rmdir /S /Q faust~
del /F /Q faust_tilde_linux.zip
del /F /Q faustgen_tilde_linux.zip
curl -L https://github.com/pierreguillot/faust-pd/releases/download/v%release_version%/faustgen_tilde-Linux-amd64-32-sources.zip -o faustgen_tilde_linux.zip
7z x faustgen_tilde_linux.zip
deken package -v%release_version% faustgen~
rmdir /S /Q faustgen~
del /F /Q faustgen_tilde_linux.zip

del /F /Q faust_tilde_windows.zip
curl -L https://github.com/pierreguillot/faust-pd/releases/download/v%release_version%/faust_tilde-Windows-amd64-32-sources.zip -o faust_tilde_windows.zip
7z x faust_tilde_windows.zip
deken package -v%release_version% faust~
rmdir /S /Q faust~
del /F /Q faust_tilde_windows.zip
del /F /Q faustgen_tilde_windows.zip
curl -L https://github.com/pierreguillot/faust-pd/releases/download/v%release_version%/faustgen_tilde-Windows-amd64-32-sources.zip -o faustgen_tilde_windows.zip
7z x faustgen_tilde_windows.zip
deken package -v%release_version% faustgen~
rmdir /S /Q faustgen~
del /F /Q faustgen_tilde_windows.zip

del /F /Q faust_tilde_archive.zip
curl -L https://github.com/pierreguillot/faust-pd/archive/v%release_version%.zip -o faust_tilde_archive.zip
7z x faust_tilde_archive.zip
rename faust-pd-%release_version% faust~
deken package -v%release_version% faust~
rmdir /S /Q faust~
del /F /Q faust_tilde_archive.zip
del /F /Q faustgen_tilde_archive.zip
curl -L https://github.com/pierreguillot/faust-pd/archive/v%release_version%.zip -o faustgen_tilde_archive.zip
7z x faustgen_tilde_archive.zip
rename faust-pd-%release_version% faustgen~
deken package -v%release_version% faustgen~
rmdir /S /Q faustgen~
del /F /Q faustgen_tilde_archive.zip

rem deken upload faust~[v%release_version%](Darwin-amd64-32)(Sources).dek faust~[v%release_version%](Linux-amd64-32)(Sources).dek faust~[v%release_version%](Windows-amd64-32)(Sources).dek faust~[v%release_version%](Sources).dek
rem deken upload faustgen~[v%release_version%](Darwin-amd64-32)(Sources).dek faustgen~[v%release_version%](Linux-amd64-32)(Sources).dek faustgen~[v%release_version%](Windows-amd64-32)(Sources).dek faustgen~[v%release_version%](Sources).dek
pause
56 changes: 28 additions & 28 deletions FaustDeken.sh
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
#!/bin/bash

echo -e "title Deken manager for Faust~ for Pure Data"
echo -e "title Deken manager for faustgen~ for Pure Data"

rm -rf faust~
rm -rf faustgen~
rm -f *.dek
rm -f *.dek.sha256
rm -f *.dek.txt

rm -f faust_tilde_darwin.zip
curl -L "https://github.com/pierreguillot/faust-pd/releases/download/v$1/faust_tilde-Darwin-amd64-32-sources.zip" -o faust_tilde_darwin.zip
tar zxvf faust_tilde_darwin.zip
deken package -v$1 faust~
rm -rf faust~
rm -f faust_tilde_darwin.zip
rm -f faustgen_tilde_darwin.zip
curl -L "https://github.com/pierreguillot/faust-pd/releases/download/v$1/faustgen_tilde-Darwin-amd64-32-sources.zip" -o faustgen_tilde_darwin.zip
tar zxvf faustgen_tilde_darwin.zip
deken package -v$1 faustgen~
rm -rf faustgen~
rm -f faustgen_tilde_darwin.zip

rm -f faust_tilde_linux.zip
curl -L "https://github.com/pierreguillot/faust-pd/releases/download/v$1/faust_tilde-Linux-amd64-32-sources.zip" -o faust_tilde_linux.zip
tar zxvf faust_tilde_linux.zip
deken package -v$1 faust~
rm -rf faust~
rm -f faust_tilde_linux.zip
rm -f faustgen_tilde_linux.zip
curl -L "https://github.com/pierreguillot/faust-pd/releases/download/v$1/faustgen_tilde-Linux-amd64-32-sources.zip" -o faustgen_tilde_linux.zip
tar zxvf faustgen_tilde_linux.zip
deken package -v$1 faustgen~
rm -rf faustgen~
rm -f faustgen_tilde_linux.zip

rm -f faust_tilde_windows.zip
curl -L "https://github.com/pierreguillot/faust-pd/releases/download/v$1/faust_tilde-Windows-amd64-32-sources.zip" -o faust_tilde_windows.zip
tar zxvf faust_tilde_windows.zip
deken package -v$1 faust~
rm -rf faust~
rm -f faust_tilde_windows.zip
rm -f faustgen_tilde_windows.zip
curl -L "https://github.com/pierreguillot/faust-pd/releases/download/v$1/faustgen_tilde-Windows-amd64-32-sources.zip" -o faustgen_tilde_windows.zip
tar zxvf faustgen_tilde_windows.zip
deken package -v$1 faustgen~
rm -rf faustgen~
rm -f faustgen_tilde_windows.zip

rm -f faust_tilde_archive.zip
curl -L "https://github.com/pierreguillot/faust-pd/archive/v$1.zip" -o faust_tilde_archive.zip
tar zxvf faust_tilde_archive.zip
mv faust-pd-$1 faust~
deken package -v$1 faust~
rm -rf faust~
rm -f faust_tilde_archive.zip
rm -f faustgen_tilde_archive.zip
curl -L "https://github.com/pierreguillot/faust-pd/archive/v$1.zip" -o faustgen_tilde_archive.zip
tar zxvf faustgen_tilde_archive.zip
mv faust-pd-$1 faustgen~
deken package -v$1 faustgen~
rm -rf faustgen~
rm -f faustgen_tilde_archive.zip

# deken upload faust~[v%release_version%](Darwin-amd64-32)(Sources).dek faust~[v%release_version%](Linux-amd64-32)(Sources).dek faust~[v%release_version%](Windows-amd64-32)(Sources).dek faust~[v%release_version%](Sources).dek
# deken upload faustgen~[v%release_version%](Darwin-amd64-32)(Sources).dek faustgen~[v%release_version%](Linux-amd64-32)(Sources).dek faustgen~[v%release_version%](Windows-amd64-32)(Sources).dek faustgen~[v%release_version%](Sources).dek
2 changes: 1 addition & 1 deletion FaustLib.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ set(WASM_BACKEND OFF CACHE STRING "Include WASM ba
add_subdirectory(./faust/build EXCLUDE_FROM_ALL)

if(MSVC)
set_property(TARGET staticlib APPEND_STRING PROPERTY COMPILE_FLAGS " /EHsc /D WIN32 -D_SCL_SECURE_NO_WARNINGS ")
set_property(TARGET staticlib APPEND_STRING PROPERTY COMPILE_FLAGS " /EHsc /D WIN32 -D_SCL_SECURE_NO_WARNINGS")
set_property(TARGET staticlib APPEND_STRING PROPERTY LINK_FLAGS " /ignore:4099 ")
endif()

Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

<p align="center">
<h1 align="center">
faust~
faustgen~
</h1>
<p align="center">
The FAUST compiler embedded in a Pd external
Expand All @@ -15,7 +15,7 @@

## Presentation

The **faust~** object is an external with the [FAUST](http://faust.grame.fr/about/) just-in-time (JIT) compiler embedded that allows to load, compile and play FAUST files within the audio programming environment [Pure Data](http://msp.ucsd.edu/software.html). FAUST (Functional Audio Stream) is a functional programming language specifically designed for real-time signal processing and synthesis developed by the [GRAME](http://www.grame.fr/). The FAUST JIT compiler - built with [LLVM](https://llvm.org/) - brings together the convenience of a standalone interpreted language with the efficiency of a compiled language. The **faust~** object is a very first version with elementary features, any help and any contribution are welcome.
The **faustgen~** object is an external with the [FAUST](http://faust.grame.fr/about/) just-in-time (JIT) compiler embedded that allows to load, compile and play FAUST files within the audio programming environment [Pure Data](http://msp.ucsd.edu/software.html). FAUST (Functional Audio Stream) is a functional programming language specifically designed for real-time signal processing and synthesis developed by the [GRAME](http://www.grame.fr/). The FAUST JIT compiler - built with [LLVM](https://llvm.org/) - brings together the convenience of a standalone interpreted language with the efficiency of a compiled language. The **faustgen~** object is a very first version with elementary features, any help and any contribution are welcome.

**Dependencies:**

Expand Down Expand Up @@ -77,12 +77,12 @@ Once the binaries are compiled or uploaded with Travis and Appveyor to the relea
**FAUST website**: faust.grame.fr
**FAUST developers**: Yann Orlarey, Stéphane Letz, Dominique Fober and others

**faust~ institutions**: CICM - ANR MUSICOLL
**fauts~ website**: github.com/grame-cncm/faust-pd
**faust~ developer**: Pierre Guillot
**faustgen~ institutions**: CICM - ANR MUSICOLL
**faustgen~ website**: github.com/grame-cncm/faust-pd
**faustgen~ developer**: Pierre Guillot

## Legacy

This **faust~** object for Pd is inspired by the **faustgen~** object for Max developed by Martin Di Rollo and Stéphane Letz.
This **faustgen~** object for Pd is inspired by the **faustgen~** object for Max developed by Martin Di Rollo and Stéphane Letz.

Another **faust~** object has been developed by Albert Graef using the programming language [Pure](https://github.com/agraef/pure-lang).
4 changes: 4 additions & 0 deletions ToDoList.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- Mesure DSP time of the code
- Use automatic optimizations with compile options
- Check if the DSP process is in-place
- Check why -double option crashes
8 changes: 4 additions & 4 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,20 @@ install:
build_script:
- mkdir build%llvmplateform% && cd build%llvmplateform%
- cmake .. -G "%compiler%" -DUSE_LLVM_CONFIG=off -DLLVM_DIR=./llvm-windows-%llvmplateform%-%llvmpconfig%/lib/cmake/llvm
- msbuild faust~.sln /nologo /p:config=%configuration% /p:plateform=%platform%
- msbuild faustgen~.sln /nologo /p:config=%configuration% /p:plateform=%platform%
after_build:
- cd %APPVEYOR_BUILD_FOLDER%
- del /F /Q llvm.zip
- del /F /S /Q /A external\*.pdb
- del /F /S /Q /A external\*.ilk
- del /F /S /Q /A external\*.lib
- del /F /S /Q /A external\*.exp
- copy src\faust_tilde.c external\faust_tilde.c
- copy src\faustgen_tilde.c external\faustgen_tilde.c
- copy README.md external\README.md
- copy LICENSE external\LICENSE.txt
- xcopy /S /E /Y /I .\faust\libraries .\external\libs
- rename external faust~
- 7z a "faust_tilde-%release_arch%-sources.zip" faust~
- rename external faustgen~
- 7z a "faustgen_tilde-%release_arch%-sources.zip" faustgen~

artifacts:
- path: '*.zip'
Expand Down
6 changes: 6 additions & 0 deletions external/examples/dummy.dsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
declare name "Dummy";
declare version "1.0";
declare author "Heu... me...";


process = _, _, _, _ :> _, _;
7 changes: 7 additions & 0 deletions external/examples/gain.dsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import("stdfaust.lib");

process = _ * (gain)
with
{
gain = vslider("gain [unit:linear]", 0,0,1,0.001);
};
7 changes: 7 additions & 0 deletions external/examples/mixer.dsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
declare name "mixer";
declare version "1.0";
declare author "Grame";
declare license "BSD";
declare copyright "(c)GRAME 2006";

process = _;
11 changes: 11 additions & 0 deletions external/examples/resonator.dsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import("stdfaust.lib");

// Example programmed by Christophe Lebreton - GRAME

f(i) = hslider("freq%3i", 160.,-0.,20000.,0.001);
r(i) = hslider("decay%3i", 0.,0.,1.,0.001):((pow(4.78)*6)+0.0001):ba.tau2pole;
g(i) = hslider("gain%3i", 0.,0.,1.,0.0001);

resonator(n) = _<:par(i,n,*(g(i)):fi.nlf2(f(i),r(i)):_,!:*(ba.db2linear((100*(log(1/r(i))))))):>*(0.003162);

process = resonator(20) ;
43 changes: 0 additions & 43 deletions external/faust.watcher-help.pd

This file was deleted.

Loading

0 comments on commit 49b9574

Please sign in to comment.