From 29040316a02ee01d791ea0e8179c041c4fe5b76b Mon Sep 17 00:00:00 2001 From: Brian Heim Date: Sat, 17 Nov 2018 15:19:57 -0600 Subject: [PATCH 01/15] appveyor: add artifacts and github deployment --- .appveyor.yml | 38 ++++++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 14 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 6d8afc5290..9b36fee8ba 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -54,21 +54,31 @@ before_build: - cd build build_script: -- cmake -G "%CMAKE_GENERATOR%" -DSC_PATH=../../supercollider -DFFTW3F_INCLUDE_DIR=../fftw -DFFTW3F_LIBRARY=../fftw/libfftw3f-3.lib .. +- cmake -G "%CMAKE_GENERATOR%" -DSC_PATH=../../supercollider -DFFTW3F_INCLUDE_DIR=../fftw -DFFTW3F_LIBRARY=../fftw/libfftw3f-3.lib -DCMAKE_INSTALL_PREFIX="%APPVEYOR_BUILD_FOLDER%/build/install" .. - cmake --build . --target install --config %CMAKE_CONFIGURATION% -# TODO -# artifacts: -# - path: artifacts -# name: art_folder +after_build: +# create archive name; either the version (if tagged) or commit hash +- ps: | + if (Test-Path env:APPVEYOR_REPO_TAG_NAME) { + $env:VERSION_SLUG=$env:APPVEYOR_REPO_TAG_NAME | % { $_ -replace "Version-","" } + $env:ZIP_NAME="sc3-plugins-$env:VERSION_SLUG-Windows-$env:ARCH-VS.zip" + } else { + $env:ZIP_NAME="sc3-plugins-$env:APPVEYOR_REPO_COMMIT-Windows-$env:ARCH-VS.zip" + } +- ps: 7z a -mx7 $env:ZIP_NAME install + +artifacts: +- path: build/%ZIP_NAME% + name: Plugins -# TODO # github releases - only tags -# - provider: GitHub -# description: appveyor_$(APPVEYOR_REPO_TAG_NAME) -# artifact: installer -# auth_token: -# secure: rxXJNY+6n25Th9R4+7qI+AcnTj0wCAMSnBGH2+5s7DlVLrAGsSY6+EEDbeHWGGeI -# prerelease: true -# on: -# appveyor_repo_tag: true +deploy: +- provider: GitHub + description: appveyor_$(APPVEYOR_REPO_TAG_NAME) + artifact: Plugins + auth_token: + secure: 4uMFrJ2Vc3ju6OtWpQ9chRce/2JHNhfy/sjX+w+KFTNDvmSPD5CqdEuwFp/+Ln/s + prerelease: true + on: + appveyor_repo_tag: true From a980a838cce57a42d6f7fb3cafa3d52e1619a69e Mon Sep 17 00:00:00 2001 From: Brian Heim Date: Tue, 4 Dec 2018 20:45:16 -0600 Subject: [PATCH 02/15] cmake: remove refs to missing dirs --- source/CMakeLists.txt | 2 -- source/StkInst/CMakeLists.txt | 1 - 2 files changed, 3 deletions(-) diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index 488a8f86d0..f93b1081c1 100755 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -6,8 +6,6 @@ if (SUPERNOVA) include_directories(${SC_PATH}/external_libraries/nova-tt) # actually just boost.atomic include_directories(${SC_PATH}/external_libraries/boost) - include_directories(${SC_PATH}/external_libraries/boost_lockfree) - include_directories(${SC_PATH}/external_libraries/boost-lockfree) endif() include_directories(${CMAKE_SOURCE_DIR}/include/) diff --git a/source/StkInst/CMakeLists.txt b/source/StkInst/CMakeLists.txt index df9a064989..24ef0133b8 100644 --- a/source/StkInst/CMakeLists.txt +++ b/source/StkInst/CMakeLists.txt @@ -56,7 +56,6 @@ if(SUPERNOVA) endif() set_property(TARGET ${PROJECT}_supernova APPEND PROPERTY COMPILE_DEFINITIONS "SUPERNOVA") include_directories(${SC_PATH}/external_libraries - ${SC_PATH}/external_libraries/boost-lockfree ${SC_PATH}/external_libraries/nova-simd ${SC_PATH}/external_libraries/nova-tt ) From 2bd9a9e9c2cc6daa1545bd198a220948e053372c Mon Sep 17 00:00:00 2001 From: Yvan Volochine Date: Wed, 10 Oct 2018 11:28:08 +0200 Subject: [PATCH 03/15] travis: add build for linux Signed-off-by: Yvan Volochine --- .travis.yml | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/.travis.yml b/.travis.yml index 124d340b8a..80198b1a46 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,33 +1,31 @@ -language: objective-c +language: cpp -os: - - osx +matrix: + fast_finish: true + include: + - os: linux + sudo: required + dist: trusty + - os: osx cache: + - ccache - apt - bundler before_install: - ifmac () { if [[ $TRAVIS_OS_NAME == osx ]]; then eval $@; fi; } - iflin () { if [[ $TRAVIS_OS_NAME == linux ]]; then eval $@; fi; } - - ifmac brew install cmake || true - - iflin sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test - - iflin sudo add-apt-repository -y ppa:andykimpe/cmake # backport of cmake 2.8.12 - - iflin sudo add-apt-repository -y ppa:ondrej/php5 # libicu-dev 52 - - iflin sudo apt-get update - - iflin sudo apt-get install libicu-dev=52.1-1+debphp.org~precise+1 gcc-4.7 g++-4.7 aptitude build-essential libfftw3-dev libxt-dev pkg-config cmake=2.8.12.2-3 libstdc++5 - - iflin sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 40 --slave /usr/bin/g++ g++ /usr/bin/g++-4.6 - - iflin sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.7 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.7 - - iflin sudo update-alternatives --auto gcc + - iflin sudo apt-get install libicu-dev libfftw3-dev libxt-dev pkg-config libstdc++5 - git clone https://github.com/supercollider/supercollider.git before_script: - - mkdir BUILD - - cd BUILD + - mkdir BUILD && cd BUILD - cmake -DCMAKE_INSTALL_PREFIX:PATH=$PWD/SC3plugins -DCMAKE_BUILD_TYPE=Release -DSC_PATH=../supercollider .. script: - - make install + - iflin make -j 2 + - ifmac make install - ifmac mkdir -p $HOME/artifacts - ifmac zip -q -r $HOME/artifacts/Plugins-$TRAVIS_COMMIT.zip SC3plugins @@ -72,7 +70,6 @@ deploy: after-deploy: - "echo S3 Build Location: $S3_URL" - notifications: on_success: change on_failure: change From f2ec7aa3ab19b2cf0569755061ee958055859e40 Mon Sep 17 00:00:00 2001 From: Brian Heim Date: Tue, 4 Dec 2018 21:02:25 -0600 Subject: [PATCH 04/15] appveyor: don't clone supercollider recursively save a tiny amount of time --- .appveyor.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index 9b36fee8ba..d4baef6a43 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -37,7 +37,8 @@ install: - cmd: git submodule update --init --recursive - cmd: echo "Get SuperCollider" -- cmd: git clone --recursive --depth 1 https://github.com/supercollider/supercollider ../supercollider +# can shallow clone, no submodules needed (no supernova) +- cmd: git clone --depth 1 https://github.com/supercollider/supercollider ../supercollider # FFTW3, including lib prep - cmd: echo "Install fftw" From 123848b3f52817da637d7156d7a3adf6d4904b32 Mon Sep 17 00:00:00 2001 From: redFrik Date: Mon, 3 Dec 2018 10:43:41 +0100 Subject: [PATCH 05/15] Update DWGPluckedStiff.schelp fixed missing release argument. as reported on sc-users https://www.listarc.bham.ac.uk/lists/sc-users/msg62915.html --- .../DWGUGens/sc/HelpSource/Classes/DWGPluckedStiff.schelp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/DWGUGens/sc/HelpSource/Classes/DWGPluckedStiff.schelp b/source/DWGUGens/sc/HelpSource/Classes/DWGPluckedStiff.schelp index dbfb52a58a..f78cdfb8ab 100644 --- a/source/DWGUGens/sc/HelpSource/Classes/DWGPluckedStiff.schelp +++ b/source/DWGUGens/sc/HelpSource/Classes/DWGPluckedStiff.schelp @@ -47,10 +47,10 @@ Examples:: code:: //Define pluck synthdef ( -SynthDef(\help_dwgpluckedstiff, { |out=0, freq=440, amp=0.5, gate=1, c3=20, pan=0,fB = 80| +SynthDef(\help_dwgpluckedstiff, { |out=0, freq=440, amp=0.5, gate=1, c3=20, pan=0, rel=1, fB = 80| var env = Env.new([0,1, 1, 0],[0.001,0.006, 0.0005],[5,-5, -8]); var inp = amp * LFClipNoise.ar(2000) * EnvGen.ar(env,gate); - var son = DWGPluckedStiff.ar(freq, amp, gate,0.1,1,c3,inp,fB); + var son = DWGPluckedStiff.ar(freq, amp, gate,0.1,1,c3,inp,rel,fB); DetectSilence.ar(son, 0.001, doneAction:2); Out.ar(out, Pan2.ar(son * 0.1, pan)); }).add; @@ -69,7 +69,7 @@ Pbind( \instrument, \help_dwgpluckedstiff, \scale ,a, \delta , Pseq([1,0.5,0.5,0.5,0.5,0.5,0.5,1,0.5,0.5,1,1]*0.25,inf), - \dur , 2, + \dur , 0.9, \degree, Pseq([1,8,8,8,8,8,8,-6,Prand([9,10,11],1),1,7,8]-8, inf), \amp , Pwhite(0.2,0.8), \c3 , Pseq([Pseq([1400],24),Pseq([300],24)],inf), From 10b2e862cb12e21bcb9080a5c433c04cd1e21c32 Mon Sep 17 00:00:00 2001 From: Brian Heim Date: Tue, 4 Dec 2018 20:33:36 -0600 Subject: [PATCH 06/15] travis: minor improvements --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 80198b1a46..11eb9d4441 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,14 +17,14 @@ before_install: - ifmac () { if [[ $TRAVIS_OS_NAME == osx ]]; then eval $@; fi; } - iflin () { if [[ $TRAVIS_OS_NAME == linux ]]; then eval $@; fi; } - iflin sudo apt-get install libicu-dev libfftw3-dev libxt-dev pkg-config libstdc++5 - - git clone https://github.com/supercollider/supercollider.git + - git clone --depth 1 https://github.com/supercollider/supercollider.git before_script: - mkdir BUILD && cd BUILD - cmake -DCMAKE_INSTALL_PREFIX:PATH=$PWD/SC3plugins -DCMAKE_BUILD_TYPE=Release -DSC_PATH=../supercollider .. script: - - iflin make -j 2 + - iflin make -j - ifmac make install - ifmac mkdir -p $HOME/artifacts - ifmac zip -q -r $HOME/artifacts/Plugins-$TRAVIS_COMMIT.zip SC3plugins @@ -67,7 +67,7 @@ deploy: condition: $TRAVIS_OS_NAME = osx && ! -z $GITHUB_KEY tags: true all_branches: true -after-deploy: +after_deploy: - "echo S3 Build Location: $S3_URL" notifications: From 7576620ea97515293f557e591215ccada6ed5658 Mon Sep 17 00:00:00 2001 From: Brian Heim Date: Tue, 4 Dec 2018 20:33:43 -0600 Subject: [PATCH 07/15] travis: build supernova plugins --- .travis.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 11eb9d4441..b35c23bcd2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,10 +18,13 @@ before_install: - iflin () { if [[ $TRAVIS_OS_NAME == linux ]]; then eval $@; fi; } - iflin sudo apt-get install libicu-dev libfftw3-dev libxt-dev pkg-config libstdc++5 - git clone --depth 1 https://github.com/supercollider/supercollider.git + - cd supercollider + - git submodule update --init --depth 1 external_libraries/nova-tt external_libraries/nova-simd + - cd .. before_script: - mkdir BUILD && cd BUILD - - cmake -DCMAKE_INSTALL_PREFIX:PATH=$PWD/SC3plugins -DCMAKE_BUILD_TYPE=Release -DSC_PATH=../supercollider .. + - cmake -DCMAKE_INSTALL_PREFIX:PATH=$PWD/SC3plugins -DCMAKE_BUILD_TYPE=Release -DSC_PATH=../supercollider -DSUPERNOVA=ON .. script: - iflin make -j From c2a3104f6a645deacf8eefda72a3c6e78e3adc1d Mon Sep 17 00:00:00 2001 From: kgwgk Date: Sun, 16 Dec 2018 02:08:06 +0100 Subject: [PATCH 08/15] Wavefolder Timbre plugin --- source/CMakeLists.txt | 1 + source/VAfxUGens/Timbre.cpp | 96 +++++++++++++++++++ .../sc/HelpSource/Classes/Timbre.schelp | 29 ++++++ source/VAfxUGens/sc/Timbre.sc | 6 ++ 4 files changed, 132 insertions(+) create mode 100644 source/VAfxUGens/Timbre.cpp create mode 100644 source/VAfxUGens/sc/HelpSource/Classes/Timbre.schelp create mode 100755 source/VAfxUGens/sc/Timbre.sc diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index f93b1081c1..695461c625 100755 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -104,6 +104,7 @@ set(PLUGIN_DIRS SLUGens SummerUGens TagSystemUGens + VAfxUGens VBAPUGens VOSIMUGens ) diff --git a/source/VAfxUGens/Timbre.cpp b/source/VAfxUGens/Timbre.cpp new file mode 100644 index 0000000000..3d5df20bb4 --- /dev/null +++ b/source/VAfxUGens/Timbre.cpp @@ -0,0 +1,96 @@ +#include "SC_PlugIn.hpp" +#include + +// InterfaceTable contains pointers to functions in the host (server). +static InterfaceTable *ft; + +// declare struct to hold unit generator state +struct Timbre : public SCUnit{ + +// Constructor usually does 3 things. +// 1. set the calculation function. +// 2. initialize the unit generator state variables. +// 3. calculate one sample of output. +public: + Timbre() { + // 1. set the calculation function. + set_calc_function(); + + // 3. calculate one sample of output. + next(1); + + } + +private: + // The calculation function executes once per control period + // which is typically 64 samples. + + // calculation function for an audio rate frequency argument + void next(int inNumSamples) + { + // get the pointer to the output buffer + float *outBuf = out(0); + + // get the pointer to the input buffer + const float *sig = in(0); + const float fold = in0(1); + const float offset = in0(2); + + // perform a loop for the number of samples in the control period. + // If this unit is audio rate then inNumSamples will be 64 or whatever + // the block size is. If this unit is control rate then inNumSamples will + // be 1. + for (int i=0; i < inNumSamples; ++i) + { + float sgn; + float sigNorm; + float sigAbs; + float fold1 = 0.f; + float fold2 = 0.f; + float fold3 = 0.f; + float fold4 = 0.f; + float fold5 = 0.f; + + sigNorm = offset*0.6 + (fold*5.4 +0.6)*sig[i]; + // sigNorm = 0.5 + 2.f*sig[i]*0.6; + sigAbs = fabs(sigNorm); + sgn = copysignf(1.0, sig[i]); + + if (sigAbs >= 0.6) { + fold1 = 0.8333*sigNorm - 0.5*sgn; + fold1 *= -12.f; + if (sigAbs >= 1.8) { + fold2 = 0.5743*sigNorm - 1.0338*sgn; + fold2 *= 17.647; + if (sigAbs >= 2.994) { + fold3 = 0.3768*sigNorm - 1.1281*sgn; + fold3 *= -27.777; + if (sigAbs >= 4.08) { + fold4 = 0.2673*sigNorm - 1.0907*sgn; + fold4 *= 36.363; + if (sigAbs >= 5.46) { + fold5 = 0.2829*sigNorm - 1.5446*sgn; + fold5 *= -21.438; + } + } + } + } + } + // out must be written last for in place operation + outBuf[i] = (fold1 + fold2 + fold3 + fold4 + fold5 + 5.f * sigNorm)/3.f; + } + } + +}; + +// the entry point is called by the host when the plug-in is loaded +PluginLoad(TimbreUGens) +{ + // InterfaceTable *inTable implicitly given as argument to the load function + ft = inTable; // store pointer to InterfaceTable + + // registerUnit takes the place of the Define*Unit functions. It automatically checks for the presence of a + // destructor function. + // However, it does not seem to be possible to disable buffer aliasing with the C++ header. + registerUnit(ft, "Timbre"); +} diff --git a/source/VAfxUGens/sc/HelpSource/Classes/Timbre.schelp b/source/VAfxUGens/sc/HelpSource/Classes/Timbre.schelp new file mode 100644 index 0000000000..29ace1cead --- /dev/null +++ b/source/VAfxUGens/sc/HelpSource/Classes/Timbre.schelp @@ -0,0 +1,29 @@ +class:: Timbre +summary:: Wavefolder virtual analog model +related:: +categories:: UGens>Filters + + +Description:: +This is a model of the "timbre" circuit of the Buchla 259 Complex Wave Generator. The model follows the circuit modelling as seen on the paper link::http://www.dafx17.eca.ed.ac.uk/papers/DAFx17_paper_82.pdf::, using 5 folds. + + +classmethods:: + +method::ar + +argument::in +Input signal. + +argument::fold +Folding ammount (control rate). Useful range: [0, ..] + +argument::offset +Input offset (control rate). Useful range: [-1, 1]. + + +Examples:: + +code:: +{Timbre.ar(SinOsc.ar(200), MouseX.kr(0,3), MouseY.kr(-1,1))}.scope +:: diff --git a/source/VAfxUGens/sc/Timbre.sc b/source/VAfxUGens/sc/Timbre.sc new file mode 100755 index 0000000000..5a5e42dce1 --- /dev/null +++ b/source/VAfxUGens/sc/Timbre.sc @@ -0,0 +1,6 @@ +// without mul and add. +Timbre : UGen { + *ar { arg in, fold=0.0, offset=0.0; + ^this.multiNew('audio', in, fold, offset) + } +} From 042d288a7255873885dcefa47780384b8d778c26 Mon Sep 17 00:00:00 2001 From: George Zachos <2838804+georgezachos@users.noreply.github.com> Date: Sun, 16 Dec 2018 02:23:56 +0100 Subject: [PATCH 09/15] typo --- source/VAfxUGens/sc/HelpSource/Classes/Timbre.schelp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/VAfxUGens/sc/HelpSource/Classes/Timbre.schelp b/source/VAfxUGens/sc/HelpSource/Classes/Timbre.schelp index 29ace1cead..ac1b74bcb9 100644 --- a/source/VAfxUGens/sc/HelpSource/Classes/Timbre.schelp +++ b/source/VAfxUGens/sc/HelpSource/Classes/Timbre.schelp @@ -16,7 +16,7 @@ argument::in Input signal. argument::fold -Folding ammount (control rate). Useful range: [0, ..] +Folding amount (control rate). Useful range: [0, ..] argument::offset Input offset (control rate). Useful range: [-1, 1]. From 1509a6b13fe59d3ce0d304b02c14363ad99be3fc Mon Sep 17 00:00:00 2001 From: georgezachos Date: Thu, 27 Dec 2018 00:19:06 +0100 Subject: [PATCH 10/15] change Timbre name to BFold --- source/VAfxUGens/{Timbre.cpp => BFold.cpp} | 12 ++++++------ source/VAfxUGens/sc/{Timbre.sc => BFold.sc} | 3 +-- .../Classes/{Timbre.schelp => BFold.schelp} | 0 3 files changed, 7 insertions(+), 8 deletions(-) rename source/VAfxUGens/{Timbre.cpp => BFold.cpp} (94%) rename source/VAfxUGens/sc/{Timbre.sc => BFold.sc} (71%) rename source/VAfxUGens/sc/HelpSource/Classes/{Timbre.schelp => BFold.schelp} (100%) diff --git a/source/VAfxUGens/Timbre.cpp b/source/VAfxUGens/BFold.cpp similarity index 94% rename from source/VAfxUGens/Timbre.cpp rename to source/VAfxUGens/BFold.cpp index 3d5df20bb4..0ec62a9707 100644 --- a/source/VAfxUGens/Timbre.cpp +++ b/source/VAfxUGens/BFold.cpp @@ -5,16 +5,16 @@ static InterfaceTable *ft; // declare struct to hold unit generator state -struct Timbre : public SCUnit{ +struct BFold : public SCUnit{ // Constructor usually does 3 things. // 1. set the calculation function. // 2. initialize the unit generator state variables. // 3. calculate one sample of output. public: - Timbre() { + BFold() { // 1. set the calculation function. - set_calc_function(); + set_calc_function(); // 3. calculate one sample of output. next(1); @@ -75,10 +75,10 @@ struct Timbre : public SCUnit{ } } } - } + } // out must be written last for in place operation outBuf[i] = (fold1 + fold2 + fold3 + fold4 + fold5 + 5.f * sigNorm)/3.f; - } + } } }; @@ -92,5 +92,5 @@ PluginLoad(TimbreUGens) // registerUnit takes the place of the Define*Unit functions. It automatically checks for the presence of a // destructor function. // However, it does not seem to be possible to disable buffer aliasing with the C++ header. - registerUnit(ft, "Timbre"); + registerUnit(ft, "BFold"); } diff --git a/source/VAfxUGens/sc/Timbre.sc b/source/VAfxUGens/sc/BFold.sc similarity index 71% rename from source/VAfxUGens/sc/Timbre.sc rename to source/VAfxUGens/sc/BFold.sc index 5a5e42dce1..c54c02a981 100755 --- a/source/VAfxUGens/sc/Timbre.sc +++ b/source/VAfxUGens/sc/BFold.sc @@ -1,5 +1,4 @@ -// without mul and add. -Timbre : UGen { +BFold : UGen { *ar { arg in, fold=0.0, offset=0.0; ^this.multiNew('audio', in, fold, offset) } diff --git a/source/VAfxUGens/sc/HelpSource/Classes/Timbre.schelp b/source/VAfxUGens/sc/HelpSource/Classes/BFold.schelp similarity index 100% rename from source/VAfxUGens/sc/HelpSource/Classes/Timbre.schelp rename to source/VAfxUGens/sc/HelpSource/Classes/BFold.schelp From 32f51e15458cd3063dc0153089568735248d4487 Mon Sep 17 00:00:00 2001 From: georgezachos Date: Thu, 27 Dec 2018 03:03:19 +0100 Subject: [PATCH 11/15] 'fold' input parameter is now audio rate --- source/VAfxUGens/BFold.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/VAfxUGens/BFold.cpp b/source/VAfxUGens/BFold.cpp index 0ec62a9707..3ff8d8c21d 100644 --- a/source/VAfxUGens/BFold.cpp +++ b/source/VAfxUGens/BFold.cpp @@ -33,7 +33,7 @@ struct BFold : public SCUnit{ // get the pointer to the input buffer const float *sig = in(0); - const float fold = in0(1); + const float *fold = in(1); const float offset = in0(2); // perform a loop for the number of samples in the control period. @@ -51,7 +51,7 @@ struct BFold : public SCUnit{ float fold4 = 0.f; float fold5 = 0.f; - sigNorm = offset*0.6 + (fold*5.4 +0.6)*sig[i]; + sigNorm = offset*0.6 + (fold[i]*5.4 +0.6)*sig[i]; // sigNorm = 0.5 + 2.f*sig[i]*0.6; sigAbs = fabs(sigNorm); sgn = copysignf(1.0, sig[i]); From 1b2987790d3954d533b38ee5da584913c1e2a87b Mon Sep 17 00:00:00 2001 From: georgezachos Date: Thu, 27 Dec 2018 03:22:10 +0100 Subject: [PATCH 12/15] update help file --- source/VAfxUGens/sc/HelpSource/Classes/BFold.schelp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/VAfxUGens/sc/HelpSource/Classes/BFold.schelp b/source/VAfxUGens/sc/HelpSource/Classes/BFold.schelp index ac1b74bcb9..117f9f001e 100644 --- a/source/VAfxUGens/sc/HelpSource/Classes/BFold.schelp +++ b/source/VAfxUGens/sc/HelpSource/Classes/BFold.schelp @@ -5,7 +5,7 @@ categories:: UGens>Filters Description:: -This is a model of the "timbre" circuit of the Buchla 259 Complex Wave Generator. The model follows the circuit modelling as seen on the paper link::http://www.dafx17.eca.ed.ac.uk/papers/DAFx17_paper_82.pdf::, using 5 folds. +A model of the "timbre" circuit of the Buchla 259 Complex Wave Generator. The model follows the circuit modelling as seen on the paper link::http://www.dafx17.eca.ed.ac.uk/papers/DAFx17_paper_82.pdf::, using 5 folds. classmethods:: @@ -16,7 +16,7 @@ argument::in Input signal. argument::fold -Folding amount (control rate). Useful range: [0, ..] +Folding amount (audio rate). Useful range: [0, ..] argument::offset Input offset (control rate). Useful range: [-1, 1]. From 9e485a04b86562d50eab197957839c99da3e7723 Mon Sep 17 00:00:00 2001 From: georgezachos Date: Sun, 30 Dec 2018 16:35:07 +0100 Subject: [PATCH 13/15] schelp up to date with latest changes --- source/VAfxUGens/sc/HelpSource/Classes/BFold.schelp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/source/VAfxUGens/sc/HelpSource/Classes/BFold.schelp b/source/VAfxUGens/sc/HelpSource/Classes/BFold.schelp index 117f9f001e..dc3d9555ef 100644 --- a/source/VAfxUGens/sc/HelpSource/Classes/BFold.schelp +++ b/source/VAfxUGens/sc/HelpSource/Classes/BFold.schelp @@ -1,6 +1,5 @@ -class:: Timbre +class:: BFold summary:: Wavefolder virtual analog model -related:: categories:: UGens>Filters @@ -25,5 +24,5 @@ Input offset (control rate). Useful range: [-1, 1]. Examples:: code:: -{Timbre.ar(SinOsc.ar(200), MouseX.kr(0,3), MouseY.kr(-1,1))}.scope +{BFold.ar(SinOsc.ar(200), K2A.ar(MouseX.kr(0,3)), MouseY.kr(-1,1))}.scope :: From bbc6a908bc8741e82cd02dd5df91b38ed35bce48 Mon Sep 17 00:00:00 2001 From: georgezachos Date: Mon, 31 Dec 2018 03:36:29 +0100 Subject: [PATCH 14/15] check for valid inputs --- source/VAfxUGens/sc/BFold.sc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/source/VAfxUGens/sc/BFold.sc b/source/VAfxUGens/sc/BFold.sc index c54c02a981..c07ee6339d 100755 --- a/source/VAfxUGens/sc/BFold.sc +++ b/source/VAfxUGens/sc/BFold.sc @@ -2,4 +2,13 @@ BFold : UGen { *ar { arg in, fold=0.0, offset=0.0; ^this.multiNew('audio', in, fold, offset) } + checkInputs { + [0, 1].do { |i| + (inputs[i].rate != 'audio').if { + ^(" input at index " + i + "(" + inputs.at(i) + + ") is not audio rate"); + }; + }; + ^this.checkValidInputs; + } } From 388a90392e5b2bab01e154d122d6966d904d13a5 Mon Sep 17 00:00:00 2001 From: georgezachos Date: Fri, 4 Jan 2019 23:31:06 +0100 Subject: [PATCH 15/15] forgotten PluginLoad name from previous naming convention --- source/VAfxUGens/BFold.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/VAfxUGens/BFold.cpp b/source/VAfxUGens/BFold.cpp index 3ff8d8c21d..95206ebabf 100644 --- a/source/VAfxUGens/BFold.cpp +++ b/source/VAfxUGens/BFold.cpp @@ -84,7 +84,7 @@ struct BFold : public SCUnit{ }; // the entry point is called by the host when the plug-in is loaded -PluginLoad(TimbreUGens) +PluginLoad(VAfxUGens) { // InterfaceTable *inTable implicitly given as argument to the load function ft = inTable; // store pointer to InterfaceTable