misceffects.lib
-
This library contains a collection of audio effects. Its official prefix is ef
.
+
Collection of audio effects library. Its official prefix is ef
.
+
The library is organized into 7 sections:
+
References
- https://github.com/grame-cncm/faustlibraries/blob/master/misceffects.lib
diff --git a/docs/search/search_index.json b/docs/search/search_index.json
index 8f42e2d6..69a07624 100644
--- a/docs/search/search_index.json
+++ b/docs/search/search_index.json
@@ -1 +1 @@
-{"config":{"indexing":"full","lang":["en"],"min_search_length":3,"prebuild_index":false,"separator":"[\\s\\-]+"},"docs":[{"location":"","text":"Faust Libraries The Faust libraries implement hundreds of DSP functions for audio processing and synthesis. They are organized by types in a set of .lib files (e.g., envelopes.lib , filters.lib , etc.). This website serves as the main documentation of the Faust libraries . The main Faust website can be found at the following URL: https://faust.grame.fr Using the Faust Libraries The easiest and most standard way to use the Faust libraries is to import stdfaust.lib in your Faust code: import(\"stdfaust.lib\"); This will give you access to all the Faust libraries through a series of environments: sf : all.lib aa : aanl.lib an : analyzers.lib ba : basics.lib co : compressors.lib de : delays.lib dm : demos.lib dx : dx7.lib en : envelopes.lib fd : fds.lib fi : filters.lib ho : hoa.lib it : interpolators.lib ma : maths.lib mi : mi.lib ef : misceffects.lib os : oscillators.lib no : noises.lib pf : phaflangers.lib pm : physmodels.lib qu : quantizers.lib rm : reducemaps.lib re : reverbs.lib ro : routes.lib si : signals.lib so : soundfiles.lib sp : spats.lib sy : synths.lib ve : vaeffects.lib vl : version.lib wa : webaudio.lib wd : wdmodels.lib Environments can then be used as follows in your Faust code: import(\"stdfaust.lib\"); process = os.osc(440); In this case, we're calling the osc function from oscillators.lib . You can also access all the functions of all the libraries directly using the sf environment: import(\"stdfaust.lib\"); process = sf.osc(440); Alternatively, environments can be created by hand: os = library(\"oscillators.lib\"); process = os.osc(440); Finally, libraries can be simply imported in the Faust code (not recommended): import(\"oscillators.lib\"); process = osc(440); Organization of This Documentation The Overview tab in the upper menu provides additional information about the general organization of the libraries, licensing/copyright, and guidelines on how to contribute to the Faust libraries. The Libraries tab contain the actual documentation of the Faust libraries.","title":"Faust Libraries"},{"location":"#faust-libraries","text":"The Faust libraries implement hundreds of DSP functions for audio processing and synthesis. They are organized by types in a set of .lib files (e.g., envelopes.lib , filters.lib , etc.). This website serves as the main documentation of the Faust libraries . The main Faust website can be found at the following URL: https://faust.grame.fr","title":"Faust Libraries"},{"location":"#using-the-faust-libraries","text":"The easiest and most standard way to use the Faust libraries is to import stdfaust.lib in your Faust code: import(\"stdfaust.lib\"); This will give you access to all the Faust libraries through a series of environments: sf : all.lib aa : aanl.lib an : analyzers.lib ba : basics.lib co : compressors.lib de : delays.lib dm : demos.lib dx : dx7.lib en : envelopes.lib fd : fds.lib fi : filters.lib ho : hoa.lib it : interpolators.lib ma : maths.lib mi : mi.lib ef : misceffects.lib os : oscillators.lib no : noises.lib pf : phaflangers.lib pm : physmodels.lib qu : quantizers.lib rm : reducemaps.lib re : reverbs.lib ro : routes.lib si : signals.lib so : soundfiles.lib sp : spats.lib sy : synths.lib ve : vaeffects.lib vl : version.lib wa : webaudio.lib wd : wdmodels.lib Environments can then be used as follows in your Faust code: import(\"stdfaust.lib\"); process = os.osc(440); In this case, we're calling the osc function from oscillators.lib . You can also access all the functions of all the libraries directly using the sf environment: import(\"stdfaust.lib\"); process = sf.osc(440); Alternatively, environments can be created by hand: os = library(\"oscillators.lib\"); process = os.osc(440); Finally, libraries can be simply imported in the Faust code (not recommended): import(\"oscillators.lib\"); process = osc(440);","title":"Using the Faust Libraries"},{"location":"#organization-of-this-documentation","text":"The Overview tab in the upper menu provides additional information about the general organization of the libraries, licensing/copyright, and guidelines on how to contribute to the Faust libraries. The Libraries tab contain the actual documentation of the Faust libraries.","title":"Organization of This Documentation"},{"location":"about/","text":"The Faust Project The Faust Project has started in 2002. It is actively developed by the GRAME-CNCM Research Department . Many persons are contributing to the Faust project, by providing code for the compiler, architecture files, libraries, examples, documentation, scripts, bug reports, ideas, etc. We would like in particular to thank: Fons Adriaensen, Karim Barkati, J\u00e9r\u00f4me Barth\u00e9lemy, Tim Blechmann, Tiziano Bole, Alain Bonardi, Thomas Charbonnel, Raffaele Ciavarella, Julien Colafrancesco, Damien Cramet, Sarah Denoux, \u00c9tienne Gaudrin, Olivier Guillerminet, Pierre Guillot, Albert Gr\u00e4f, Pierre Jouvelot, Stefan Kersten, Victor Lazzarini, Matthieu Leberre, Mathieu Leroi, Fernando Lopez-Lezcano, Kjetil Matheussen, Hermann Meyer, R\u00e9my Muller, Raphael Panis, Eliott Paris, Reza Payami, Laurent Pottier, Sampo Savolainen, Nicolas Scaringella, Anne Sedes, Priyanka Shekar, Stephen Sinclair, Travis Skare, Julius Smith, Mike Solomon, Michael Wilson, Bart Brouns, Dirk Roosenburg, Riccardo Russo. as well as our colleagues at GRAME : Dominique Fober Christophe Lebreton St\u00e9phane Letz Romain Michon Yann Orlarey We would like also to thank for their financial support: the French Ministry of Culture , the Auvergne-Rh\u00f4ne-Alpes Region , the City of Lyon , the French National Research Agency (ANR) .","title":"About"},{"location":"about/#the-faust-project","text":"The Faust Project has started in 2002. It is actively developed by the GRAME-CNCM Research Department . Many persons are contributing to the Faust project, by providing code for the compiler, architecture files, libraries, examples, documentation, scripts, bug reports, ideas, etc. We would like in particular to thank: Fons Adriaensen, Karim Barkati, J\u00e9r\u00f4me Barth\u00e9lemy, Tim Blechmann, Tiziano Bole, Alain Bonardi, Thomas Charbonnel, Raffaele Ciavarella, Julien Colafrancesco, Damien Cramet, Sarah Denoux, \u00c9tienne Gaudrin, Olivier Guillerminet, Pierre Guillot, Albert Gr\u00e4f, Pierre Jouvelot, Stefan Kersten, Victor Lazzarini, Matthieu Leberre, Mathieu Leroi, Fernando Lopez-Lezcano, Kjetil Matheussen, Hermann Meyer, R\u00e9my Muller, Raphael Panis, Eliott Paris, Reza Payami, Laurent Pottier, Sampo Savolainen, Nicolas Scaringella, Anne Sedes, Priyanka Shekar, Stephen Sinclair, Travis Skare, Julius Smith, Mike Solomon, Michael Wilson, Bart Brouns, Dirk Roosenburg, Riccardo Russo. as well as our colleagues at GRAME : Dominique Fober Christophe Lebreton St\u00e9phane Letz Romain Michon Yann Orlarey We would like also to thank for their financial support: the French Ministry of Culture , the Auvergne-Rh\u00f4ne-Alpes Region , the City of Lyon , the French National Research Agency (ANR) .","title":"The Faust Project"},{"location":"community/","text":"Libraries from the community A lot of libraries have been developed by the community. They are presented in the following sections. abclib library 20 years of research, teaching and creation in mixed music using Faust language. abclib library is released by the CICM / MUSIDANSE (Centre de Recherches Informatique et Cr\u00e9ation Musicale, Paris 8 University) and is the result of 20 years of research, teaching and creation in mixed music, expressed as a set of codes in Faust language. The main topics addressed are: spatial sound processing and synthesis using ambisonics, multi-channel sound processing, utility objects for mixed music. Edge of Chaos This repository contains libraries including some essential building blocks for the implementation of musical complex adaptive systems in Faust programming. It includes a set of time-domain algorithms, some of which are original, for the processing of low-level and high-level information as well as the processing of sound using standard and non-conventional techniques. It also includes functions for the realisation of networks with different topologies, linear and nonlinear mapping strategies to render positive and negative feedback relationships, and different kinds of energy-preserving techniques for the stability of self-oscillating systems. realfaust This library contains a set of functions representing domain-limited versions of all Faust primitives and math functions that can potentially generate INF or NaN values. The goal of the library is to be able to implement DSP networks that, structurally, are free from INF and NaN values. Hence, the resulting programs should be rock-solid during real-time performance and virtually immune to crashes regardless of how mercilessly a network is modulated or how unstable a recursive system is made. bitDSP-faust BitDSP is a set of Faust library functions aimed to help explore and research artistic possibilities of bit-based algorithms. BitDSP currently includes implementations of bit-based functions ranging from simple bit operations over classic delta-sigma modulations to more experimental approaches like cellular automata, recursive Boolean networks, and linear feedback shift registers. A detailed overview of the functionality is in the paper \"Creative use of bit-stream DSP in Faust\" presented at IFC 2020 . SEAM library Sustained Electro-Acoustic Music is a project inspired by Alvise Vidolin and Nicola Bernardini . The SEAM libraries have been developed for this project. Ambitools library Ambitools is an implementation of several Ambisonic tools with the FAUST language. The code is designed to be scalable and flexible, offering tools working at various Ambisonic order and compiled for various architectures. The implementation of the spherical harmonics for an efficient computation is detailed. See the Ambitools : Tools For Sound Field Synthesis With Higher Order Ambisonic - V1.0 paper. Faust Tap Library Tap a complicated expression to pull out specific outputs, without having to manually route those outputs, just like how named function parameters remove the need to manually route inputs. MoreFilters library A Faust library implementing following highpass/lowpass filters using fi.svf : Biquad Butterworth (2nd, 4th, 6th, 8th order) Bessel (2nd, 4th, 6th, 8th order) Linkwitz Riley (4th, 8th, 12th and 16th order) Awesome library Feel free to contribute by forking this project and creating a pull request , or by mailing the library description here . Additional DSP resources Heres is a list of additional DSP resources. Granulation A list of projects related to granulation: Dario Sanfilippo Live concatenative granular processing project Mykle Hansen Weather Organ project Jean-Louis Paquelin Granola monophonic granular live feed processor Mayank Sanganeria granulator.dsp project Henrik von Coler material on granulation with Faust code Material in the abclib library basic granulator in Faust based on a delay line , with the granulator function spatial granulation in ambisonics in abc_2d_fx_grain_ui and abc_2d_syn_grain_ui functions multichannel granulation in abc_multigrain_ui function","title":" Community "},{"location":"community/#libraries-from-the-community","text":"A lot of libraries have been developed by the community. They are presented in the following sections.","title":"Libraries from the community"},{"location":"community/#abclib-library","text":"20 years of research, teaching and creation in mixed music using Faust language. abclib library is released by the CICM / MUSIDANSE (Centre de Recherches Informatique et Cr\u00e9ation Musicale, Paris 8 University) and is the result of 20 years of research, teaching and creation in mixed music, expressed as a set of codes in Faust language. The main topics addressed are: spatial sound processing and synthesis using ambisonics, multi-channel sound processing, utility objects for mixed music.","title":"abclib library"},{"location":"community/#edge-of-chaos","text":"This repository contains libraries including some essential building blocks for the implementation of musical complex adaptive systems in Faust programming. It includes a set of time-domain algorithms, some of which are original, for the processing of low-level and high-level information as well as the processing of sound using standard and non-conventional techniques. It also includes functions for the realisation of networks with different topologies, linear and nonlinear mapping strategies to render positive and negative feedback relationships, and different kinds of energy-preserving techniques for the stability of self-oscillating systems.","title":"Edge of Chaos"},{"location":"community/#realfaust","text":"This library contains a set of functions representing domain-limited versions of all Faust primitives and math functions that can potentially generate INF or NaN values. The goal of the library is to be able to implement DSP networks that, structurally, are free from INF and NaN values. Hence, the resulting programs should be rock-solid during real-time performance and virtually immune to crashes regardless of how mercilessly a network is modulated or how unstable a recursive system is made.","title":"realfaust"},{"location":"community/#bitdsp-faust","text":"BitDSP is a set of Faust library functions aimed to help explore and research artistic possibilities of bit-based algorithms. BitDSP currently includes implementations of bit-based functions ranging from simple bit operations over classic delta-sigma modulations to more experimental approaches like cellular automata, recursive Boolean networks, and linear feedback shift registers. A detailed overview of the functionality is in the paper \"Creative use of bit-stream DSP in Faust\" presented at IFC 2020 .","title":"bitDSP-faust"},{"location":"community/#seam-library","text":"Sustained Electro-Acoustic Music is a project inspired by Alvise Vidolin and Nicola Bernardini . The SEAM libraries have been developed for this project.","title":"SEAM library"},{"location":"community/#ambitools-library","text":"Ambitools is an implementation of several Ambisonic tools with the FAUST language. The code is designed to be scalable and flexible, offering tools working at various Ambisonic order and compiled for various architectures. The implementation of the spherical harmonics for an efficient computation is detailed. See the Ambitools : Tools For Sound Field Synthesis With Higher Order Ambisonic - V1.0 paper.","title":"Ambitools library"},{"location":"community/#faust-tap-library","text":"Tap a complicated expression to pull out specific outputs, without having to manually route those outputs, just like how named function parameters remove the need to manually route inputs.","title":"Faust Tap Library"},{"location":"community/#morefilters-library","text":"A Faust library implementing following highpass/lowpass filters using fi.svf : Biquad Butterworth (2nd, 4th, 6th, 8th order) Bessel (2nd, 4th, 6th, 8th order) Linkwitz Riley (4th, 8th, 12th and 16th order)","title":"MoreFilters library"},{"location":"community/#awesome-library","text":"Feel free to contribute by forking this project and creating a pull request , or by mailing the library description here .","title":"Awesome library"},{"location":"community/#additional-dsp-resources","text":"Heres is a list of additional DSP resources.","title":"Additional DSP resources"},{"location":"community/#granulation","text":"","title":"Granulation"},{"location":"community/#a-list-of-projects-related-to-granulation","text":"Dario Sanfilippo Live concatenative granular processing project Mykle Hansen Weather Organ project Jean-Louis Paquelin Granola monophonic granular live feed processor Mayank Sanganeria granulator.dsp project Henrik von Coler material on granulation with Faust code","title":"A list of projects related to granulation:"},{"location":"community/#material-in-the-abclib-library","text":"basic granulator in Faust based on a delay line , with the granulator function spatial granulation in ambisonics in abc_2d_fx_grain_ui and abc_2d_syn_grain_ui functions multichannel granulation in abc_multigrain_ui function","title":"Material in the abclib library"},{"location":"contributing/","text":"Contributing In general, libraries are organised in a stacked manner : the base ones define functions or constants without any dependancies, and additional ones are gradually built on top of simpler ones, layer by layer. Dependency loops must be avoided as much as possible . The resources folder contains tools to build and visualise the libraries dependencies graphs. If you wish to add a function to any of these libraries or if you plan to add a new library, make sure that you observe the following conventions: New Functions All functions must be preceded by a markdown documentation header respecting the following format (open the source code of any of the libraries for an example): //-----------------functionName-------------------- // Description // // #### Usage // // ``` // Usage Example // ``` // // Where: // // * argument1: argument 1 description //------------------------------------------------- Every time a new function is added, the documentation should be updated simply by running make doclib . The environment system (e.g. os.osc ) should be used when calling a function declared in another library (see the section on Library Import ). Try to reuse existing functions as much as possible. The Usage line must show the input/output shape (the number of inputs and outputs) of the function, like gen: _ for a mono generator, _ : filter : _ for a mono effect, etc. Some functions use parameters that are constant numerical expressions . The convention is to label them in capital letters and document them preferably to be constant numerical expressions (or known at compile time in existing libraries). Functions with several parameters should better be written by putting the more constant parameters (like control, setup...) at the beginning of the parameter list, and audio signals to be processed at the end. This allows to do partial-application. So prefer the following clip(low, high, x) = min(max(x, low), high); form where clip(-1, 1) partially applied version can be used later on in different contexts, better than clip(x, low, high) = min(max(x, low), high); version. New Libraries Any new \"standard\" library should be declared in stdfaust.lib with its own environment (2 letters - see stdfaust.lib ). Any new \"standard\" library must be added to generateDoc . Functions must be organized by sections. Any new library should at least declare a name and a version . Any new library has to use a prefix declared in the header section with the following kind of syntax: Its official prefix is 'qu' (look at an existing library to follow the exact syntax). Be sure to add the appropriate kind of ma = library(\"maths.lib\"); import library line, for each external library function used in the new library (for instance ma.foo that would be used somewhre in the code). The comment based markdown documentation of each library must respect the following format (open the source code of any of the libraries for an example): //############### libraryName ################## // Description // // * Section Name 1 // * Section Name 2 // * ... // // It should be used using the `[...]` environment: // // ``` // [...] = library(\"libraryName\"); // process = [...].functionCall; // ``` // // Another option is to import `stdfaust.lib` which already contains the `[...]` // environment: // // ``` // import(\"stdfaust.lib\"); // process = [...].functionCall; // ``` //############################################## //================= Section Name =============== // Description //============================================== Coding Conventions In order to have a uniformized library system, we established the following conventions (that hopefully will be followed by others when making modifications to them). Function Naming [WIP] JOS proposal: using terms used in the field of digital signal processing, as follows: impulse : ...,0,1,0,... pulse : ...,0,1,1,0,... or longer impulse_train pulse_train gate = pulse controlled externally (e.g., by NoteOn,NoteOff) trigger = impulse controlled externally (gate - gate' > 0) == gate rising edge [/WIP] Variable Argument List Strictly speaking, there are no lists in Faust. But list operations can be simulated (in part) using the parallel binary composition operation , and pattern matching. Thus functions expecting a variable number of arguments can use this mechanism, like a foo function that would be used this way: foo((a,b,c,d)) . See fi.iir and fi.fir examples. Documentation All the functions that we want to be \"public\" are documented. We used the faust2md \"standards\" for each library: //### for main title (library name - equivalent to # in markdown), //=== for section declarations (equivalent to ## in markdown) and //--- for function declarations (equivalent to #### in markdown - see basics.lib for an example). Sections in function documentation should be declared as #### markdown title. Each function documentation provides a \"Usage\" section (see basics.lib ). The full documentation can be generated using the doc/Makefile script. Use make help to see all possible commands. If you plan to create a pull-request, do not commit the full generated code but only the modified .lib files. Each function can have declare author \"name\"; , declare copyright \"XXX\"; and declare licence \"YYY\"; declarations. Each library has a declare version \"xx.yy.zz\"; semantic version number to be raised each time a modification is done. The global version number in version.lib also has to be adapted according to the change. Library Import To prevent cross-references between libraries, we generalized the use of the library(\"\") system for function calls in all the libraries. This means that everytime a function declared in another library is called, the environment corresponding to this library needs to be called too. To make things easier, a stdfaust.lib library was created and is imported by all the libraries: aa = library(\"aanl.lib\"); sf = library(\"all.lib\"); an = library(\"analyzers.lib\"); ba = library(\"basics.lib\"); co = library(\"compressors.lib\"); de = library(\"delays.lib\"); dm = library(\"demos.lib\"); dx = library(\"dx7.lib\"); en = library(\"envelopes.lib\"); fd = library(\"fds.lib\"); fi = library(\"filters.lib\"); ho = library(\"hoa.lib\"); it = library(\"interpolators.lib\"); ma = library(\"maths.lib\"); mi = library(\"mi.lib\"); ef = library(\"misceffects.lib\"); os = library(\"oscillators.lib\"); no = library(\"noises.lib\"); pf = library(\"phaflangers.lib\"); pm = library(\"physmodels.lib\"); qu = library(\"quantizers.lib\"); rm = library(\"reducemaps.lib\"); re = library(\"reverbs.lib\"); ro = library(\"routes.lib\"); si = library(\"signals.lib\"); so = library(\"soundfiles.lib\"); sp = library(\"spats.lib\"); sy = library(\"synths.lib\"); ve = library(\"vaeffects.lib\"); vl = library(\"version.lib\"); wa = library(\"webaudio.lib\"); wd = library(\"wdmodels.lib\"); For example, if we wanted to use the smooth function which is now declared in signals.lib , we would do the following: import(\"stdfaust.lib\"); process = si.smooth(0.999); This standard is only used within the libraries: nothing prevents coders to still import signals.lib directly and call smooth without ro. , etc. It means symbols and function names defined within a library have to be unique to not collide with symbols of any other libraries . \"Demo\" Functions \"Demo\" functions are placed in demos.lib and have a built-in user interface (UI). Their name ends with the _demo suffix. Each of these function have a .dsp file associated to them in the /examples folder. Any function containing UI elements should be placed in this library and respect these standards. \"Standard\" Functions \"Standard\" functions are here to simplify the life of new (or not so new) Faust coders. They are declared in /libraries/doc/standardFunctions.md and allow to point programmers to preferred functions to carry out a specific task. For example, there are many different types of lowpass filters declared in filters.lib and only one of them is considered to be standard, etc. Testing the library Before preparing a pull-request, the new library must be carefully tested: all functions defined in the library must be tested by preparing a DSP test program the compatibilty library all.lib imports all libraries in a same namespace, so check functions names collisions using the following test program: import(\"all.lib\"); process = _; Library deployment For GRAME maintainers: regenerate the PDF documentation using make pdf target in the doc folder update the library submodule in faust , recompile and deploy WebAssembly libfaust in fausteditor , faustplayground and faustide update the library submodule in faustlive update the library list in this fausteditor page as well as the snippets (using the faust2atomsnippets tool). update the library list in this faustide page and those files update the library list in the faustgen~ code update the Faust Syntax Highlighting Files make an update PR for vscode-faust project","title":" Contributing "},{"location":"contributing/#contributing","text":"In general, libraries are organised in a stacked manner : the base ones define functions or constants without any dependancies, and additional ones are gradually built on top of simpler ones, layer by layer. Dependency loops must be avoided as much as possible . The resources folder contains tools to build and visualise the libraries dependencies graphs. If you wish to add a function to any of these libraries or if you plan to add a new library, make sure that you observe the following conventions:","title":"Contributing"},{"location":"contributing/#new-functions","text":"All functions must be preceded by a markdown documentation header respecting the following format (open the source code of any of the libraries for an example): //-----------------functionName-------------------- // Description // // #### Usage // // ``` // Usage Example // ``` // // Where: // // * argument1: argument 1 description //------------------------------------------------- Every time a new function is added, the documentation should be updated simply by running make doclib . The environment system (e.g. os.osc ) should be used when calling a function declared in another library (see the section on Library Import ). Try to reuse existing functions as much as possible. The Usage line must show the input/output shape (the number of inputs and outputs) of the function, like gen: _ for a mono generator, _ : filter : _ for a mono effect, etc. Some functions use parameters that are constant numerical expressions . The convention is to label them in capital letters and document them preferably to be constant numerical expressions (or known at compile time in existing libraries). Functions with several parameters should better be written by putting the more constant parameters (like control, setup...) at the beginning of the parameter list, and audio signals to be processed at the end. This allows to do partial-application. So prefer the following clip(low, high, x) = min(max(x, low), high); form where clip(-1, 1) partially applied version can be used later on in different contexts, better than clip(x, low, high) = min(max(x, low), high); version.","title":"New Functions"},{"location":"contributing/#new-libraries","text":"Any new \"standard\" library should be declared in stdfaust.lib with its own environment (2 letters - see stdfaust.lib ). Any new \"standard\" library must be added to generateDoc . Functions must be organized by sections. Any new library should at least declare a name and a version . Any new library has to use a prefix declared in the header section with the following kind of syntax: Its official prefix is 'qu' (look at an existing library to follow the exact syntax). Be sure to add the appropriate kind of ma = library(\"maths.lib\"); import library line, for each external library function used in the new library (for instance ma.foo that would be used somewhre in the code). The comment based markdown documentation of each library must respect the following format (open the source code of any of the libraries for an example): //############### libraryName ################## // Description // // * Section Name 1 // * Section Name 2 // * ... // // It should be used using the `[...]` environment: // // ``` // [...] = library(\"libraryName\"); // process = [...].functionCall; // ``` // // Another option is to import `stdfaust.lib` which already contains the `[...]` // environment: // // ``` // import(\"stdfaust.lib\"); // process = [...].functionCall; // ``` //############################################## //================= Section Name =============== // Description //==============================================","title":"New Libraries"},{"location":"contributing/#coding-conventions","text":"In order to have a uniformized library system, we established the following conventions (that hopefully will be followed by others when making modifications to them).","title":"Coding Conventions"},{"location":"contributing/#function-naming","text":"[WIP] JOS proposal: using terms used in the field of digital signal processing, as follows: impulse : ...,0,1,0,... pulse : ...,0,1,1,0,... or longer impulse_train pulse_train gate = pulse controlled externally (e.g., by NoteOn,NoteOff) trigger = impulse controlled externally (gate - gate' > 0) == gate rising edge [/WIP]","title":"Function Naming"},{"location":"contributing/#variable-argument-list","text":"Strictly speaking, there are no lists in Faust. But list operations can be simulated (in part) using the parallel binary composition operation , and pattern matching. Thus functions expecting a variable number of arguments can use this mechanism, like a foo function that would be used this way: foo((a,b,c,d)) . See fi.iir and fi.fir examples.","title":"Variable Argument List"},{"location":"contributing/#documentation","text":"All the functions that we want to be \"public\" are documented. We used the faust2md \"standards\" for each library: //### for main title (library name - equivalent to # in markdown), //=== for section declarations (equivalent to ## in markdown) and //--- for function declarations (equivalent to #### in markdown - see basics.lib for an example). Sections in function documentation should be declared as #### markdown title. Each function documentation provides a \"Usage\" section (see basics.lib ). The full documentation can be generated using the doc/Makefile script. Use make help to see all possible commands. If you plan to create a pull-request, do not commit the full generated code but only the modified .lib files. Each function can have declare author \"name\"; , declare copyright \"XXX\"; and declare licence \"YYY\"; declarations. Each library has a declare version \"xx.yy.zz\"; semantic version number to be raised each time a modification is done. The global version number in version.lib also has to be adapted according to the change.","title":"Documentation"},{"location":"contributing/#library-import","text":"To prevent cross-references between libraries, we generalized the use of the library(\"\") system for function calls in all the libraries. This means that everytime a function declared in another library is called, the environment corresponding to this library needs to be called too. To make things easier, a stdfaust.lib library was created and is imported by all the libraries: aa = library(\"aanl.lib\"); sf = library(\"all.lib\"); an = library(\"analyzers.lib\"); ba = library(\"basics.lib\"); co = library(\"compressors.lib\"); de = library(\"delays.lib\"); dm = library(\"demos.lib\"); dx = library(\"dx7.lib\"); en = library(\"envelopes.lib\"); fd = library(\"fds.lib\"); fi = library(\"filters.lib\"); ho = library(\"hoa.lib\"); it = library(\"interpolators.lib\"); ma = library(\"maths.lib\"); mi = library(\"mi.lib\"); ef = library(\"misceffects.lib\"); os = library(\"oscillators.lib\"); no = library(\"noises.lib\"); pf = library(\"phaflangers.lib\"); pm = library(\"physmodels.lib\"); qu = library(\"quantizers.lib\"); rm = library(\"reducemaps.lib\"); re = library(\"reverbs.lib\"); ro = library(\"routes.lib\"); si = library(\"signals.lib\"); so = library(\"soundfiles.lib\"); sp = library(\"spats.lib\"); sy = library(\"synths.lib\"); ve = library(\"vaeffects.lib\"); vl = library(\"version.lib\"); wa = library(\"webaudio.lib\"); wd = library(\"wdmodels.lib\"); For example, if we wanted to use the smooth function which is now declared in signals.lib , we would do the following: import(\"stdfaust.lib\"); process = si.smooth(0.999); This standard is only used within the libraries: nothing prevents coders to still import signals.lib directly and call smooth without ro. , etc. It means symbols and function names defined within a library have to be unique to not collide with symbols of any other libraries .","title":"Library Import"},{"location":"contributing/#demo-functions","text":"\"Demo\" functions are placed in demos.lib and have a built-in user interface (UI). Their name ends with the _demo suffix. Each of these function have a .dsp file associated to them in the /examples folder. Any function containing UI elements should be placed in this library and respect these standards.","title":"\"Demo\" Functions"},{"location":"contributing/#standard-functions","text":"\"Standard\" functions are here to simplify the life of new (or not so new) Faust coders. They are declared in /libraries/doc/standardFunctions.md and allow to point programmers to preferred functions to carry out a specific task. For example, there are many different types of lowpass filters declared in filters.lib and only one of them is considered to be standard, etc.","title":"\"Standard\" Functions"},{"location":"contributing/#testing-the-library","text":"Before preparing a pull-request, the new library must be carefully tested: all functions defined in the library must be tested by preparing a DSP test program the compatibilty library all.lib imports all libraries in a same namespace, so check functions names collisions using the following test program: import(\"all.lib\"); process = _;","title":"Testing the library"},{"location":"contributing/#library-deployment","text":"For GRAME maintainers: regenerate the PDF documentation using make pdf target in the doc folder update the library submodule in faust , recompile and deploy WebAssembly libfaust in fausteditor , faustplayground and faustide update the library submodule in faustlive update the library list in this fausteditor page as well as the snippets (using the faust2atomsnippets tool). update the library list in this faustide page and those files update the library list in the faustgen~ code update the Faust Syntax Highlighting Files make an update PR for vscode-faust project","title":"Library deployment"},{"location":"organization/","text":"General Organization Only the libraries that are considered to be \"standard\" are documented: aanl.lib analyzers.lib basics.lib compressors.lib delays.lib demos.lib dx7.lib envelopes.lib fds.lib filters.lib hoa.lib interpolators.lib maths.lib mi.lib misceffects.lib oscillators.lib noises.lib phaflangers.lib physmodels.lib reducemaps.lib reverbs.lib routes.lib signals.lib soundfiles.lib spats.lib synths.lib tonestacks.lib (not documented but example in /examples/misc ) tubes.lib (not documented but example in /examples/misc ) vaeffects.lib version.lib wdmodels.lib webaudio.lib Other deprecated libraries such as music.lib , etc. are present but are not documented to not confuse new users. The documentation of each library can be found in /documentation/library.html or in /documentation/library.pdf . Versioning A global version number for the standard libraries is defined in version.lib . It follows the semantic versioning structure: MAJOR, MINOR, PATCH. The MAJOR number is increased when we make incompatible changes. The MINOR number is increased when we add functionality in a backwards compatible manner, and the PATCH number when we make backwards compatible bug fixes. By looking at the generated code or the diagram of process = vl.version; one can see the current version of the libraries. Examples The Faust distribution /examples directory contains a lot of DSP examples. They are organized by types in different folders. The /examples/old folder contains examples that are fully deprecated, probably because they were integrated to the libraries and fully rewritten (see freeverb.dsp for example). Examples using deprecated libraries were integrated to the general tree, but a warning comment was added at their beginning to point readers to the right library and function.","title":" Organization "},{"location":"organization/#general-organization","text":"Only the libraries that are considered to be \"standard\" are documented: aanl.lib analyzers.lib basics.lib compressors.lib delays.lib demos.lib dx7.lib envelopes.lib fds.lib filters.lib hoa.lib interpolators.lib maths.lib mi.lib misceffects.lib oscillators.lib noises.lib phaflangers.lib physmodels.lib reducemaps.lib reverbs.lib routes.lib signals.lib soundfiles.lib spats.lib synths.lib tonestacks.lib (not documented but example in /examples/misc ) tubes.lib (not documented but example in /examples/misc ) vaeffects.lib version.lib wdmodels.lib webaudio.lib Other deprecated libraries such as music.lib , etc. are present but are not documented to not confuse new users. The documentation of each library can be found in /documentation/library.html or in /documentation/library.pdf .","title":"General Organization"},{"location":"organization/#versioning","text":"A global version number for the standard libraries is defined in version.lib . It follows the semantic versioning structure: MAJOR, MINOR, PATCH. The MAJOR number is increased when we make incompatible changes. The MINOR number is increased when we add functionality in a backwards compatible manner, and the PATCH number when we make backwards compatible bug fixes. By looking at the generated code or the diagram of process = vl.version; one can see the current version of the libraries.","title":"Versioning"},{"location":"organization/#examples","text":"The Faust distribution /examples directory contains a lot of DSP examples. They are organized by types in different folders. The /examples/old folder contains examples that are fully deprecated, probably because they were integrated to the libraries and fully rewritten (see freeverb.dsp for example). Examples using deprecated libraries were integrated to the general tree, but a warning comment was added at their beginning to point readers to the right library and function.","title":"Examples"},{"location":"standardFunctions/","text":"Standard Functions Dozens of functions are implemented in the Faust libraries and many of them are very specialized and not useful to beginners or to people who only need to use Faust for basic applications. This section offers an index organized by categories of the \"standard Faust functions\" (basic filters, effects, synthesizers, etc.). This index only contains functions without a user interface (UI). Faust functions with a built-in UI can be found in demos.lib . Analysis Tools Function Type Function Name Description Amplitude Follower an. amp_follower Classic analog audio envelope follower Octave Analyzers an. mth_octave_analyzer[N] Octave analyzers Basic Elements Function Type Function Name Description Beats ba. beat Pulses at a specific tempo Block si. block Terminate n signals Break Point Function ba. bpf Beak Point Function (BPF) Bus si. bus Bus of n signals Bypass (Mono) ba. bypass1 Mono bypass Bypass (Stereo) ba. bypass2 Stereo bypass Count Elements ba. count Count elements in a list Count Down ba. countdown Samples count down Count Up ba. countup Samples count up Delay (Integer) de. delay Integer delay Delay (Float) de. fdelay Fractional delay Down Sample ba. downSample Down sample a signal Impulsify ba. impulsify Turns a signal into an impulse Sample and Hold ba. sAndH Sample and hold Signal Crossing ro. cross Cross n signals Smoother (Default) si. smoo Exponential smoothing Smoother si. smooth Exponential smoothing with controllable pole Take Element ba. take Take en element from a list Time ba. time A simple timer Conversion Function Type Function Name Description dB to Linear ba. db2linear Converts dB to linear values Linear to dB ba. linear2db Converts linear values to dB MIDI Key to Hz ba. midikey2hz Converts a MIDI key number into a frequency Hz to MIDI Key ba. hz2midikey Converts a frequency into MIDI key number Pole to T60 ba. pole2tau Converts a pole into a time constant (t60) T60 to Pole ba. tau2pole Converts a time constant (t60) into a pole Samples to Seconds ba. samp2sec Converts samples to seconds Seconds to Samples ba. sec2samp Converts seconds to samples Semitones to Frequency ratio ba. semi2ratio Converts semitones in a frequency multiplicative ratio Frequency ratio to semintones ba. ratio2semi Converts a frequency multiplicative ratio in semitones Effects Function Type Function Name Description Auto Wah ve. autowah Auto-Wah effect Compressor co. compressor_mono Dynamic range compressor Distortion ef. cubicnl Cubic nonlinearity distortion Crybaby ve. crybaby Crybaby wah pedal Echo ef. echo Simple echo Flanger pf. flanger_stereo Flanging effect Gate ef. gate_mono Mono signal gate Limiter co. limiter_1176_R4_mono Limiter Phaser pf. phaser2_stereo Phaser effect Reverb (FDN) re. fdnrev0 Feedback delay network reverberator Reverb (Freeverb) re. mono_freeverb Most \"famous\" Schroeder reverberator Reverb (Simple) re. jcrev Simple Schroeder reverberator Reverb (Zita) re. zita_rev1_stereo High quality FDN reverberator Panner sp. panner Linear stereo panner Pitch Shift ef. transpose Simple pitch shifter Panner sp. spat N outputs spatializer Speaker Simulator ef. speakerbp Simple speaker simulator Stereo Width ef. stereo_width Stereo width effect Vocoder ve. vocoder Simple vocoder Wah ve. wah4 Wah effect Envelope Generators Function Type Function Name Description ADSR en. adsr Attack/Decay/Sustain/Release envelope generator AR en. ar Attack/Release envelope generator ASR en. asr Attack/Sustain/Release envelope generator Exponential en. smoothEnvelope Exponential envelope generator Filters Function Type Function Name Description Bandpass (Butterworth) fi. bandpass Generic butterworth bandpass Bandpass (Resonant) fi. resonbp Virtual analog resonant bandpass Bandstop (Butterworth) fi. bandstop Generic butterworth bandstop Biquad fi. tf2 \"Standard\" biquad filter Comb (Allpass) fi. allpass_fcomb Schroeder allpass comb filter Comb (Feedback) fi. fb_fcomb Feedback comb filter Comb (Feedforward) fi. ff_fcomb Feed-forward comb filter. DC Blocker fi. dcblocker Default dc blocker Filterbank fi. filterbank Generic filter bank FIR (Arbitrary Order) fi. fir Nth-order FIR filter High Shelf fi. high_shelf High shelf Highpass (Butterworth) fi. highpass Nth-order Butterworth highpass Highpass (Resonant) fi. resonhp Virtual analog resonant highpass IIR (Arbitrary Order) fi. iir Nth-order IIR filter Level Filter fi. levelfilter Dynamic level lowpass Low Shelf fi. low_shelf Low shelf Lowpass (Butterworth) fi. lowpass Nth-order Butterworth lowpass Lowpass (Resonant) fi. resonlp Virtual analog resonant lowpass Notch Filter fi. notchw Simple notch filter Peak Equalizer fi. peak_eq Peaking equalizer section Oscillators/Sound Generators Function Type Function Name Description Impulse os. impulse Generate an impulse on start-up Impulse Train os. imptrain Band-limited impulse train Phasor os. phasor Simple phasor Pink Noise no. pink_noise Pink noise generator Pulse Train os. pulsetrain Band-limited pulse train Pulse Train (Low Frequency) os. lf_imptrain Low-frequency pulse train Sawtooth os. sawtooth Band-limited sawtooth wave Sawtooth (Low Frequency) os. lf_saw Low-frequency sawtooth wave Sine (Filter-Based) os. oscs Sine oscillator (filter-based) Sine (Table-Based) os. osc Sine oscillator (table-based) Square os. square Band-limited square wave Square (Low Frequency) os. lf_squarewave Low-frequency square wave Triangle os. triangle Band-limited triangle wave Triangle (Low Frequency) os. lf_triangle Low-frequency triangle wave White Noise no. noise White noise generator Synths Function Type Function Name Description Additive Drum sy. additiveDrum Additive synthesis drum Bandpassed Sawtooth sy. dubDub Sawtooth through resonant bandpass Comb String sy. combString String model based on a comb filter FM sy. fm Frequency modulation synthesizer Lowpassed Sawtooth sy. sawTrombone \"Trombone\" based on a filtered sawtooth Popping Filter sy. popFilterPerc Popping filter percussion instrument (function() { $('div.table-begin').nextUntil('div.table-end', 'table').addClass('table table-bordered'); })();","title":" Standard Functions "},{"location":"standardFunctions/#standard-functions","text":"Dozens of functions are implemented in the Faust libraries and many of them are very specialized and not useful to beginners or to people who only need to use Faust for basic applications. This section offers an index organized by categories of the \"standard Faust functions\" (basic filters, effects, synthesizers, etc.). This index only contains functions without a user interface (UI). Faust functions with a built-in UI can be found in demos.lib .","title":"Standard Functions"},{"location":"standardFunctions/#analysis-tools","text":"Function Type Function Name Description Amplitude Follower an. amp_follower Classic analog audio envelope follower Octave Analyzers an. mth_octave_analyzer[N] Octave analyzers","title":"Analysis Tools"},{"location":"standardFunctions/#basic-elements","text":"Function Type Function Name Description Beats ba. beat Pulses at a specific tempo Block si. block Terminate n signals Break Point Function ba. bpf Beak Point Function (BPF) Bus si. bus Bus of n signals Bypass (Mono) ba. bypass1 Mono bypass Bypass (Stereo) ba. bypass2 Stereo bypass Count Elements ba. count Count elements in a list Count Down ba. countdown Samples count down Count Up ba. countup Samples count up Delay (Integer) de. delay Integer delay Delay (Float) de. fdelay Fractional delay Down Sample ba. downSample Down sample a signal Impulsify ba. impulsify Turns a signal into an impulse Sample and Hold ba. sAndH Sample and hold Signal Crossing ro. cross Cross n signals Smoother (Default) si. smoo Exponential smoothing Smoother si. smooth Exponential smoothing with controllable pole Take Element ba. take Take en element from a list Time ba. time A simple timer","title":"Basic Elements"},{"location":"standardFunctions/#conversion","text":"Function Type Function Name Description dB to Linear ba. db2linear Converts dB to linear values Linear to dB ba. linear2db Converts linear values to dB MIDI Key to Hz ba. midikey2hz Converts a MIDI key number into a frequency Hz to MIDI Key ba. hz2midikey Converts a frequency into MIDI key number Pole to T60 ba. pole2tau Converts a pole into a time constant (t60) T60 to Pole ba. tau2pole Converts a time constant (t60) into a pole Samples to Seconds ba. samp2sec Converts samples to seconds Seconds to Samples ba. sec2samp Converts seconds to samples Semitones to Frequency ratio ba. semi2ratio Converts semitones in a frequency multiplicative ratio Frequency ratio to semintones ba. ratio2semi Converts a frequency multiplicative ratio in semitones","title":"Conversion"},{"location":"standardFunctions/#effects","text":"Function Type Function Name Description Auto Wah ve. autowah Auto-Wah effect Compressor co. compressor_mono Dynamic range compressor Distortion ef. cubicnl Cubic nonlinearity distortion Crybaby ve. crybaby Crybaby wah pedal Echo ef. echo Simple echo Flanger pf. flanger_stereo Flanging effect Gate ef. gate_mono Mono signal gate Limiter co. limiter_1176_R4_mono Limiter Phaser pf. phaser2_stereo Phaser effect Reverb (FDN) re. fdnrev0 Feedback delay network reverberator Reverb (Freeverb) re. mono_freeverb Most \"famous\" Schroeder reverberator Reverb (Simple) re. jcrev Simple Schroeder reverberator Reverb (Zita) re. zita_rev1_stereo High quality FDN reverberator Panner sp. panner Linear stereo panner Pitch Shift ef. transpose Simple pitch shifter Panner sp. spat N outputs spatializer Speaker Simulator ef. speakerbp Simple speaker simulator Stereo Width ef. stereo_width Stereo width effect Vocoder ve. vocoder Simple vocoder Wah ve. wah4 Wah effect","title":"Effects"},{"location":"standardFunctions/#envelope-generators","text":"Function Type Function Name Description ADSR en. adsr Attack/Decay/Sustain/Release envelope generator AR en. ar Attack/Release envelope generator ASR en. asr Attack/Sustain/Release envelope generator Exponential en. smoothEnvelope Exponential envelope generator","title":"Envelope Generators"},{"location":"standardFunctions/#filters","text":"Function Type Function Name Description Bandpass (Butterworth) fi. bandpass Generic butterworth bandpass Bandpass (Resonant) fi. resonbp Virtual analog resonant bandpass Bandstop (Butterworth) fi. bandstop Generic butterworth bandstop Biquad fi. tf2 \"Standard\" biquad filter Comb (Allpass) fi. allpass_fcomb Schroeder allpass comb filter Comb (Feedback) fi. fb_fcomb Feedback comb filter Comb (Feedforward) fi. ff_fcomb Feed-forward comb filter. DC Blocker fi. dcblocker Default dc blocker Filterbank fi. filterbank Generic filter bank FIR (Arbitrary Order) fi. fir Nth-order FIR filter High Shelf fi. high_shelf High shelf Highpass (Butterworth) fi. highpass Nth-order Butterworth highpass Highpass (Resonant) fi. resonhp Virtual analog resonant highpass IIR (Arbitrary Order) fi. iir Nth-order IIR filter Level Filter fi. levelfilter Dynamic level lowpass Low Shelf fi. low_shelf Low shelf Lowpass (Butterworth) fi. lowpass Nth-order Butterworth lowpass Lowpass (Resonant) fi. resonlp Virtual analog resonant lowpass Notch Filter fi. notchw Simple notch filter Peak Equalizer fi. peak_eq Peaking equalizer section","title":"Filters"},{"location":"standardFunctions/#oscillatorssound-generators","text":"Function Type Function Name Description Impulse os. impulse Generate an impulse on start-up Impulse Train os. imptrain Band-limited impulse train Phasor os. phasor Simple phasor Pink Noise no. pink_noise Pink noise generator Pulse Train os. pulsetrain Band-limited pulse train Pulse Train (Low Frequency) os. lf_imptrain Low-frequency pulse train Sawtooth os. sawtooth Band-limited sawtooth wave Sawtooth (Low Frequency) os. lf_saw Low-frequency sawtooth wave Sine (Filter-Based) os. oscs Sine oscillator (filter-based) Sine (Table-Based) os. osc Sine oscillator (table-based) Square os. square Band-limited square wave Square (Low Frequency) os. lf_squarewave Low-frequency square wave Triangle os. triangle Band-limited triangle wave Triangle (Low Frequency) os. lf_triangle Low-frequency triangle wave White Noise no. noise White noise generator","title":"Oscillators/Sound Generators"},{"location":"standardFunctions/#synths","text":"Function Type Function Name Description Additive Drum sy. additiveDrum Additive synthesis drum Bandpassed Sawtooth sy. dubDub Sawtooth through resonant bandpass Comb String sy. combString String model based on a comb filter FM sy. fm Frequency modulation synthesizer Lowpassed Sawtooth sy. sawTrombone \"Trombone\" based on a filtered sawtooth Popping Filter sy. popFilterPerc Popping filter percussion instrument (function() { $('div.table-begin').nextUntil('div.table-end', 'table').addClass('table table-bordered'); })();","title":"Synths"},{"location":"libs/","text":"Faust Libraries Index aanl (aa.)clip (aa.)Rsqrt (aa.)Rlog (aa.)Rtan (aa.)Racos (aa.)Rasin (aa.)Racosh (aa.)Rcosh (aa.)Rsinh (aa.)Ratanh (aa.)ADAA1 (aa.)ADAA2 (aa.)hardclip (aa.)hardclip2 (aa.)cubic1 (aa.)parabolic (aa.)parabolic2 (aa.)hyperbolic (aa.)hyperbolic2 (aa.)sinarctan (aa.)sinarctan2 (aa.)tanh1 (aa.)arctan (aa.)arctan2 (aa.)asinh1 (aa.)asinh2 (aa.)cosine1 (aa.)cosine2 (aa.)arccos (aa.)arccos2 (aa.)acosh1 (aa.)acosh2 (aa.)sine (aa.)sine2 (aa.)arcsin (aa.)arcsin2 (aa.)tangent (aa.)atanh1 (aa.)atanh2 analyzers (an.)abs_envelope_rect (an.)abs_envelope_tau (an.)abs_envelope_t60 (an.)abs_envelope_t19 (an.)amp_follower (an.)amp_follower_ud (an.)amp_follower_ar (an.)ms_envelope_rect (an.)ms_envelope_tau (an.)ms_envelope_t60 (an.)ms_envelope_t19 (an.)rms_envelope_rect (an.)rms_envelope_tau (an.)rms_envelope_t60 (an.)rms_envelope_t19 (an.)zcr (an.)pitchTracker (an.)spectralCentroid (an.)mth_octave_analyzer (an.)mth_octave_spectral_level6e (an.)[third|half] octave [analyzer|filterbank] (an.)analyzer (an.)goertzelOpt (an.)goertzelComp (an.)goertzel (an.)fft (an.)ifft basics (ba.)samp2sec (ba.)sec2samp (ba.)db2linear (ba.)linear2db (ba.)lin2LogGain (ba.)log2LinGain (ba.)tau2pole (ba.)pole2tau (ba.)midikey2hz (ba.)hz2midikey (ba.)semi2ratio (ba.)ratio2semi (ba.)cent2ratio (ba.)ratio2cent (ba.)pianokey2hz (ba.)hz2pianokey (ba.)counter (ba.)countdown (ba.)countup (ba.)sweep (ba.)time (ba.)ramp (ba.)line (ba.)tempo (ba.)period (ba.)pulse (ba.)pulsen (ba.)cycle (ba.)beat (ba.)pulse_countup (ba.)pulse_countdown (ba.)pulse_countup_loop (ba.)pulse_countdown_loop (ba.)resetCtr (ba.)count (ba.)take (ba.)subseq (ba.)tabulate (ba.)tabulate_chebychev (ba.)tabulateNd (ba.)if (ba.)ifNc (ba.)ifNcNo (ba.)selector (ba.)select2stereo (ba.)selectn (ba.)selectmulti (ba.)selectoutn (ba.)latch (ba.)sAndH (ba.)downSample (ba.)peakhold (ba.)peakholder (ba.)impulsify (ba.)automat (ba.)bpf (ba.)listInterp (ba.)bypass1 (ba.)bypass2 (ba.)bypass1to2 (ba.)bypass_fade (ba.)toggle (ba.)on_and_off (ba.)bitcrusher (ba.)slidingReduce (ba.)slidingSum (ba.)slidingSump (ba.)slidingMax (ba.)slidingMin (ba.)slidingMean (ba.)slidingMeanp (ba.)slidingRMS (ba.)slidingRMSp (ba.)parallelOp (ba.)parallelMax (ba.)parallelMin (ba.)parallelMean (ba.)parallelRMS compressors (co.)peak_compression_gain_mono_db (co.)peak_compression_gain_N_chan_db (co.)FFcompressor_N_chan (co.)FBcompressor_N_chan (co.)FBFFcompressor_N_chan (co.)RMS_compression_gain_mono_db (co.)RMS_compression_gain_N_chan_db (co.)RMS_FBFFcompressor_N_chan (co.)RMS_FBcompressor_peak_limiter_N_chan (co.)peak_compression_gain_mono (co.)peak_compression_gain_N_chan (co.)RMS_compression_gain_mono (co.)RMS_compression_gain_N_chan (co.)compressor_lad_mono (co.)compressor_mono (co.)compressor_stereo (co.)compression_gain_mono (co.)limiter_1176_R4_mono (co.)limiter_1176_R4_stereo (co.)peak_expansion_gain_N_chan_db (co.)expander_N_chan (co.)expanderSC_N_chan (co.)limiter_lad_N (co.)limiter_lad_mono (co.)limiter_lad_stereo (co.)limiter_lad_quad (co.)limiter_lad_bw delays (de.)delay (de.)fdelay (de.)sdelay (de.)fdelaylti and (de.)fdelayltv (de.)fdelay[N] (de.)fdelay[N]a demos (dm.)mth_octave_spectral_level_demo (dm.)parametric_eq_demo (dm.)spectral_tilt_demo (dm.)mth_octave_filterbank_demo and (dm.)filterbank_demo (dm.)cubicnl_demo (dm.)gate_demo (dm.)compressor_demo (dm.)moog_vcf_demo (dm.)wah4_demo (dm.)crybaby_demo (dm.)flanger_demo (dm.)phaser2_demo (dm.)freeverb_demo (dm.)stereo_reverb_tester (dm.)fdnrev0_demo (dm.)zita_rev_fdn_demo (dm.)zita_light (dm.)zita_rev1 (dm.)dattorro_rev_demo (dm.)jprev_demo (dm.)greyhole_demo (dm.)sawtooth_demo (dm.)virtual_analog_oscillator_demo (dm.)oscrs_demo (dm.)velvet_noise_demo (dm.)latch_demo (dm.)envelopes_demo (dm.)fft_spectral_level_demo (dm.)reverse_echo_demo(nChans) (dm.)pospass_demo (dm.)exciter (dm.)vocoder_demo (dm.)colored_noise_demo dx7 (dx.)dx7_ampf (dx.)dx7_egraterisef (dx.)dx7_egraterisepercf (dx.)dx7_egratedecayf (dx.)dx7_egratedecaypercf (dx.)dx7_eglv2peakf (dx.)dx7_velsensf (dx.)dx7_fdbkscalef (dx.)dx7_op (dx.)dx7_algo (dx.)dx7_ui envelopes (en.)ar (en.)asr (en.)adsr (en.)smoothEnvelope (en.)arfe (en.)are (en.)asre (en.)adsre (en.)ahdsre (en.)dx7envelope fds (fd.)model1D (fd.)model2D (fd.)stairsInterp1D (fd.)stairsInterp2D (fd.)linInterp1D (fd.)linInterp2D (fd.)stairsInterp1DOut (fd.)stairsInterp2DOut (fd.)linInterp1DOut (fd.)stairsInterp2DOut (fd.)route1D (fd.)route2D (fd.)schemePoint (fd.)buildScheme1D (fd.)buildScheme2D (fd.)hammer (fd.)bow filters (fi.)zero (fi.)pole (fi.)integrator (fi.)dcblockerat (fi.)dcblocker (fi.)lptN (fi.)ff_comb (fi.)ff_fcomb (fi.)ffcombfilter (fi.)fb_comb (fi.)fb_fcomb (fi.)rev1 (fi.)fbcombfilter and (fi.)ffbcombfilter (fi.)allpass_comb (fi.)allpass_fcomb (fi.)rev2 (fi.)allpass_fcomb5 and (fi.)allpass_fcomb1a (fi.)iir (fi.)fir (fi.)conv and (fi.)convN (fi.)tf1, (fi.)tf2 and (fi.)tf3 (fi.)notchw (fi.)tf21, (fi.)tf22, (fi.)tf22t and (fi.)tf21t (fi.)av2sv (fi.)bvav2nuv (fi.)iir_lat2 (fi.)allpassnt (fi.)iir_kl (fi.)allpassnklt (fi.)iir_lat1 (fi.)allpassn1mt (fi.)iir_nl (fi.)allpassnnlt (fi.)tf2np (fi.)wgr (fi.)nlf2 (fi.)apnl (fi.)allpassn (fi.)allpassnn (fi.)allpassnkl (fi.)allpass1m (fi.)tf2s and (fi.)tf2snp (fi.)tf1snp (fi.)tf3slf (fi.)tf1s (fi.)tf2sb (fi.)tf1sb (fi.)resonlp (fi.)resonhp (fi.)resonbp (fi.)lowpass (fi.)highpass (fi.)lowpass0_highpass1 (fi.)lowpass_plus|minus_highpass (fi.)lowpass3e (fi.)lowpass6e (fi.)highpass3e (fi.)highpass6e (fi.)bandpass (fi.)bandstop (fi.)bandpass6e (fi.)bandpass12e (fi.)pospass (fi.)low_shelf (fi.)high_shelf (fi.)peak_eq (fi.)peak_eq_cq (fi.)peak_eq_rm (fi.)spectral_tilt (fi.)levelfilter (fi.)levelfilterN (fi.)mth_octave_filterbank[n] (fi.)filterbank (fi.)filterbanki (fi.)svf (fi.)lowpassLR4 (fi.)highpassLR4 (fi.)crossover2LR4 (fi.)crossover3LR4 (fi.)crossover4LR4 (fi.)crossover8LR4 (fi.)itu_r_bs_1770_4_kfilter (fi.)avg_rect (fi.)avg_tau (fi.)avg_t60 (fi.)avg_t19 hoa (ho.)encoder (ho.)rEncoder (ho.)stereoEncoder (ho.)multiEncoder (ho.)decoder (ho.)decoderStereo (ho.)iBasicDecoder (ho.)circularScaledVBAP (ho.)imlsDecoder (ho.)iDecoder (ho.)optimBasic (ho.)optimMaxRe (ho.)optimInPhase (ho.)optim (ho.)wider (ho.)mirror (ho.)map (ho.)rotate (ho.)scope (ho.).fxDecorrelation (ho.).synDecorrelation (ho.).fxRingMod (ho.).synRingMod (ho.)encoder3D (ho.)rEncoder3D (ho.)optimBasic3D (ho.)optimMaxRe3D (ho.)optimInPhase3D (ho.)optim3D interpolators (it.)interpolate_linear (it.)interpolate_cosine (it.)interpolate_cubic (it.)interpolator_two_points (it.)interpolator_linear (it.)interpolator_cosine (it.)interpolator_four_points (it.)interpolator_cubic (it.)interpolator_select (it.)lagrangeCoeffs(N, xCoordsList) (it.)lagrangeInterpolation(N, xCoordsList) (it.)frdtable(N, S) (it.)frwtable(N, S) (it.)remap maths (ma.)SR (ma.)T (ma.)BS (ma.)PI (ma.)deg2rad (ma.)rad2deg (ma.)E (ma.)EPSILON (ma.)MIN (ma.)MAX (ma.)FTZ (ma.)copysign (ma.)neg (ma.)sub(x,y) (ma.)inv (ma.)cbrt (ma.)hypot (ma.)ldexp (ma.)scalb (ma.)log1p (ma.)logb (ma.)ilogb (ma.)log2 (ma.)expm1 (ma.)acosh (ma.)asinh (ma.)atanh (ma.)sinh (ma.)cosh (ma.)tanh (ma.)erf (ma.)erfc (ma.)gamma (ma.)lgamma (ma.)J0 (ma.)J1 (ma.)Jn (ma.)Y0 (ma.)Y1 (ma.)Yn (ma.)fabs, (ma.)fmax, (ma.)fmin (ma.)np2 (ma.)frac (ma.)modulo (ma.)isnan (ma.)isinf (ma.)chebychev (ma.)chebychevpoly (ma.)diffn (ma.)signum (ma.)nextpow2 (ma.)zc mi (mi.)initState (mi.)mass (mi.)oscil (mi.)ground (mi.)posInput (mi.)spring (mi.)damper (mi.)springDamper (mi.)nlSpringDamper2 (mi.)nlSpringDamper3 (mi.)nlSpringDamperClipped (mi.)nlPluck (mi.)nlBow (mi.)collision (mi.)nlCollisionClipped misceffects (ef.)cubicnl (ef.)gate_mono (ef.)gate_stereo (ef.)speakerbp (ef.)piano_dispersion_filter (ef.)stereo_width (ef.)mesh_square (ef.)reverseEchoN(nChans,delay) (ef.)reverseDelayRamped(delay,phase) (ef.)uniformPanToStereo(nChans) (ef.)dryWetMixer (ef.)dryWetMixerConstantPower (ef.)echo (ef.)transpose (ef.)softclipQuadratic (ef.)wavefold oscillators (os.)sinwaveform (os.)coswaveform (os.)phasor (os.)hs_phasor (os.)hsp_phasor (os.)oscsin (os.)hs_oscsin (os.)osccos (os.)hs_osccos (os.)oscp (os.)osci (os.)osc (os.)m_oscsin (os.)m_osccos (os.)lf_imptrain (os.)lf_pulsetrainpos (os.)lf_pulsetrain (os.)lf_squarewavepos (os.)lf_squarewave (os.)lf_trianglepos (os.)lf_triangle (os.)lf_rawsaw (os.)lf_sawpos (os.)lf_sawpos_phase (os.)lf_sawpos_reset (os.)lf_sawpos_phase_reset (os.)lf_saw (os.)sawN (os.)sawNp (os.)saw2, (os.)saw3, (os.)saw4 (os.)saw2ptr (os.)saw2dpw (os.)sawtooth (os.)saw2f2, (os.)saw2f4 (os.)impulse (os.)pulsetrainN (os.)pulsetrain (os.)squareN (os.)square (os.)imptrainN (os.)imptrain (os.)triangleN (os.)triangle (os.)oscb (os.)oscrq (os.)oscrs (os.)oscrc (os.)oscs (os.)quadosc (os.)oscwc (os.)oscws (os.)oscq (os.)oscw (os.)CZsaw (os.)CZsawP (os.)CZsquare (os.)CZsquareP (os.)CZpulse (os.)CZpulseP (os.)CZsinePulse (os.)CZsinePulseP (os.)CZhalfSine (os.)CZhalfSineP (os.)CZresSaw (os.)CZresTriangle (os.)CZresTrap (os.)polyblep (os.)polyblep_saw (os.)polyblep_square (os.)polyblep_triangle noises (no.)noise (no.)multirandom (no.)multinoise (no.)noises (no.)randomseed (no.)rnoise (no.)rmultirandom (no.)rmultinoise (no.)rnoises (no.)pink_noise (no.)pink_noise_vm (no.)lfnoise, (no.)lfnoise0 and (no.)lfnoiseN (no.)sparse_noise (no.)velvet_noise_vm (no.)gnoise (no.)colored_noise phaflangers (pf.)flanger_mono (pf.)flanger_stereo (pf.)phaser2_mono (pf.)phaser2_stereo physmodels (pm.)speedOfSound (pm.)maxLength (pm.)f2l (pm.)l2f (pm.)l2s (pm.)basicBlock (pm.)chain (pm.)inLeftWave (pm.)inRightWave (pm.)in (pm.)outLeftWave (pm.)outRightWave (pm.)out (pm.)terminations (pm.)lTermination (pm.)rTermination (pm.)closeIns (pm.)closeOuts (pm.)endChain (pm.)waveguideN (pm.)waveguide (pm.)bridgeFilter (pm.)modeFilter (pm.)stringSegment (pm.)openString (pm.)nylonString (pm.)steelString (pm.)openStringPick (pm.)openStringPickUp (pm.)openStringPickDown (pm.)ksReflexionFilter (pm.)rStringRigidTermination (pm.)lStringRigidTermination (pm.)elecGuitarBridge (pm.)elecGuitarNuts (pm.)guitarBridge (pm.)guitarNuts (pm.)idealString (pm.)ks (pm.)ks_ui_MIDI (pm.)elecGuitarModel (pm.)elecGuitar (pm.)elecGuitar_ui_MIDI (pm.)guitarBody (pm.)guitarModel (pm.)guitar (pm.)guitar_ui_MIDI (pm.)nylonGuitarModel (pm.)nylonGuitar (pm.)nylonGuitar_ui_MIDI (pm.)modeInterpRes (pm.)modularInterpBody (pm.)modularInterpStringModel (pm.)modularInterpInstr (pm.)modularInterpInstr_ui_MIDI (pm.)bowTable (pm.)violinBowTable (pm.)bowInteraction (pm.)violinBow (pm.)violinBowedString (pm.)violinNuts (pm.)violinBridge (pm.)violinBody (pm.)violinModel (pm.)violin_ui (pm.)violin_ui_MIDI (pm.)openTube (pm.)reedTable (pm.)fluteJetTable (pm.)brassLipsTable (pm.)clarinetReed (pm.)clarinetMouthPiece (pm.)brassLips (pm.)fluteEmbouchure (pm.)wBell (pm.)fluteHead (pm.)fluteFoot (pm.)clarinetModel (pm.)clarinetModel_ui (pm.)clarinet_ui (pm.)clarinet_ui_MIDI (pm.)brassModel (pm.)brassModel_ui (pm.)brass_ui (pm.)brass_ui_MIDI (pm.)fluteModel (pm.)fluteModel_ui (pm.)flute_ui (pm.)flute_ui_MIDI (pm.)impulseExcitation (pm.)strikeModel (pm.)strike (pm.)pluckString (pm.)blower (pm.)blower_ui (pm.)djembeModel (pm.)djembe (pm.)djembe_ui_MIDI (pm.)marimbaBarModel (pm.)marimbaResTube (pm.)marimbaModel (pm.)marimba (pm.)marimba_ui_MIDI (pm.)churchBellModel (pm.)churchBell (pm.)churchBell_ui (pm.)englishBellModel (pm.)englishBell (pm.)englishBell_ui (pm.)frenchBellModel (pm.)frenchBell (pm.)frenchBell_ui (pm.)germanBellModel (pm.)germanBell (pm.)germanBell_ui (pm.)russianBellModel (pm.)russianBell (pm.)russianBell_ui (pm.)standardBellModel (pm.)standardBell (pm.)standardBell_ui (pm.)formantValues (pm.)voiceGender (pm.)skirtWidthMultiplier (pm.)autobendFreq (pm.)vocalEffort (pm.)fof (pm.)fofSH (pm.)fofCycle (pm.)fofSmooth (pm.)formantFilterFofCycle (pm.)formantFilterFofSmooth (pm.)formantFilterBP (pm.)formantFilterbank (pm.)formantFilterbankFofCycle (pm.)formantFilterbankFofSmooth (pm.)formantFilterbankBP (pm.)SFFormantModel (pm.)SFFormantModelFofCycle (pm.)SFFormantModelFofSmooth (pm.)SFFormantModelBP (pm.)SFFormantModelFofCycle_ui (pm.)SFFormantModelFofSmooth_ui (pm.)SFFormantModelBP_ui (pm.)SFFormantModelFofCycle_ui_MIDI (pm.)SFFormantModelFofSmooth_ui_MIDI (pm.)SFFormantModelBP_ui_MIDI (pm.)allpassNL (pm).modalModel quantizers (qu.)quantize (qu.)quantizeSmoothed (qu.)ionian (qu.)dorian (qu.)phrygian (qu.)lydian (qu.)mixo (qu.)eolian (qu.)locrian (qu.)pentanat (qu.)kumoi (qu.)natural (qu.)dodeca (qu.)dimin (qu.)penta reducemaps (rm.)parReduce (rm.)topReduce (rm.)botReduce (rm.)reduce (rm.)reducemap reverbs (re.)jcrev (re.)satrev (re.)fdnrev0 (re.)zita_rev_fdn (re.)zita_rev1_stereo (re.)zita_rev1_ambi (re.)mono_freeverb (re.)stereo_freeverb (re.)dattorro_rev (re.)dattorro_rev_default (re.)jpverb (re.)greyhole routes (ro.)cross (ro.)crossnn (ro.)crossn1 (ro.)cross1n (ro.)crossNM (ro.)interleave (ro.)butterfly (ro.)hadamard (ro.)recursivize (ro.)bubbleSort signals (si.)bus (si.)block (si.)interpolate (si.)smoo (si.)polySmooth (si.)smoothAndH (si.)bsmooth (si.)dot (si.)smooth (si.)cbus (si.)cmul (si.)cconj (si.)onePoleSwitching (si.)rev (si.)vecOp soundfiles (so.)loop (so.)loop_speed (so.)loop_speed_level spats (sp.)panner (sp.)constantPowerPan (sp.)spat (sp.)stereoize synths (sy.)popFilterDrum (sy.)dubDub (sy.)sawTrombone (sy.)combString (sy.)additiveDrum (sy.)fm (sy.)kick (sy.)clap (sy.)hat vaeffects (ve.)moog_vcf (ve.)moog_vcf_2b[n] (ve.)moogLadder (ve.)moogHalfLadder (ve.)diodeLadder (ve.)korg35LPF (ve.)korg35HPF (ve.)oberheim (ve.)oberheimBSF (ve.)oberheimBPF (ve.)oberheimHPF (ve.)oberheimLPF (ve.)sallenKeyOnePole (ve.)sallenKeyOnePoleLPF (ve.)sallenKeyOnePoleHPF (ve.)sallenKey2ndOrder (ve.)sallenKey2ndOrderLPF (ve.)sallenKey2ndOrderBPF (ve.)sallenKey2ndOrderHPF (ve.)wah4 (ve.)autowah (ve.)crybaby (ve.)vocoder version (vl.)version wdmodels (wd.)resistor (wd.)resistor_Vout (wd.)resistor_Iout (wd.)u_voltage (wd.)u_current (wd.)resVoltage (wd.)resVoltage_Vout (wd.)u_resVoltage (wd.)resCurrent (wd.)u_resCurrent (wd.)u_switch (wd.)capacitor (wd.)capacitor_Vout (wd.)inductor (wd.)inductor_Vout (wd.)u_idealDiode (wd.)u_chua (wd.)lambert (wd.)u_diodePair (wd.)u_diodeSingle (wd.)u_diodeAntiparallel (wd.)u_parallel2Port (wd.)parallel2Port (wd.)u_series2Port (wd.)series2Port (wd.)parallelCurrent (wd.)seriesVoltage (wd.)u_transformer (wd.)transformer (wd.)u_transformerActive (wd.)transformerActive (wd.)parallel (wd.)series (wd.)u_sixportPassive (wd.)genericNode (wd.)genericNode_Vout (wd.)genericNode_Iout (wd.)u_genericNode (wd.)builddown (wd.)buildup (wd.)getres (wd.)parres (wd.)buildout (wd.)buildtree webaudio (wa.)lowpass2 (wa.)highpass2 (wa.)bandpass2 (wa.)notch2 (wa.)allpass2 (wa.)peaking2 (wa.)lowshelf2 (wa.)highshelf2","title":"Index"},{"location":"libs/#faust-libraries-index","text":"","title":"Faust Libraries Index"},{"location":"libs/#aanl","text":"(aa.)clip (aa.)Rsqrt (aa.)Rlog (aa.)Rtan (aa.)Racos (aa.)Rasin (aa.)Racosh (aa.)Rcosh (aa.)Rsinh (aa.)Ratanh (aa.)ADAA1 (aa.)ADAA2 (aa.)hardclip (aa.)hardclip2 (aa.)cubic1 (aa.)parabolic (aa.)parabolic2 (aa.)hyperbolic (aa.)hyperbolic2 (aa.)sinarctan (aa.)sinarctan2 (aa.)tanh1 (aa.)arctan (aa.)arctan2 (aa.)asinh1 (aa.)asinh2 (aa.)cosine1 (aa.)cosine2 (aa.)arccos (aa.)arccos2 (aa.)acosh1 (aa.)acosh2 (aa.)sine (aa.)sine2 (aa.)arcsin (aa.)arcsin2 (aa.)tangent (aa.)atanh1 (aa.)atanh2","title":"aanl"},{"location":"libs/#analyzers","text":"(an.)abs_envelope_rect (an.)abs_envelope_tau (an.)abs_envelope_t60 (an.)abs_envelope_t19 (an.)amp_follower (an.)amp_follower_ud (an.)amp_follower_ar (an.)ms_envelope_rect (an.)ms_envelope_tau (an.)ms_envelope_t60 (an.)ms_envelope_t19 (an.)rms_envelope_rect (an.)rms_envelope_tau (an.)rms_envelope_t60 (an.)rms_envelope_t19 (an.)zcr (an.)pitchTracker (an.)spectralCentroid (an.)mth_octave_analyzer (an.)mth_octave_spectral_level6e (an.)[third|half] octave [analyzer|filterbank] (an.)analyzer (an.)goertzelOpt (an.)goertzelComp (an.)goertzel (an.)fft (an.)ifft","title":"analyzers"},{"location":"libs/#basics","text":"(ba.)samp2sec (ba.)sec2samp (ba.)db2linear (ba.)linear2db (ba.)lin2LogGain (ba.)log2LinGain (ba.)tau2pole (ba.)pole2tau (ba.)midikey2hz (ba.)hz2midikey (ba.)semi2ratio (ba.)ratio2semi (ba.)cent2ratio (ba.)ratio2cent (ba.)pianokey2hz (ba.)hz2pianokey (ba.)counter (ba.)countdown (ba.)countup (ba.)sweep (ba.)time (ba.)ramp (ba.)line (ba.)tempo (ba.)period (ba.)pulse (ba.)pulsen (ba.)cycle (ba.)beat (ba.)pulse_countup (ba.)pulse_countdown (ba.)pulse_countup_loop (ba.)pulse_countdown_loop (ba.)resetCtr (ba.)count (ba.)take (ba.)subseq (ba.)tabulate (ba.)tabulate_chebychev (ba.)tabulateNd (ba.)if (ba.)ifNc (ba.)ifNcNo (ba.)selector (ba.)select2stereo (ba.)selectn (ba.)selectmulti (ba.)selectoutn (ba.)latch (ba.)sAndH (ba.)downSample (ba.)peakhold (ba.)peakholder (ba.)impulsify (ba.)automat (ba.)bpf (ba.)listInterp (ba.)bypass1 (ba.)bypass2 (ba.)bypass1to2 (ba.)bypass_fade (ba.)toggle (ba.)on_and_off (ba.)bitcrusher (ba.)slidingReduce (ba.)slidingSum (ba.)slidingSump (ba.)slidingMax (ba.)slidingMin (ba.)slidingMean (ba.)slidingMeanp (ba.)slidingRMS (ba.)slidingRMSp (ba.)parallelOp (ba.)parallelMax (ba.)parallelMin (ba.)parallelMean (ba.)parallelRMS","title":"basics"},{"location":"libs/#compressors","text":"(co.)peak_compression_gain_mono_db (co.)peak_compression_gain_N_chan_db (co.)FFcompressor_N_chan (co.)FBcompressor_N_chan (co.)FBFFcompressor_N_chan (co.)RMS_compression_gain_mono_db (co.)RMS_compression_gain_N_chan_db (co.)RMS_FBFFcompressor_N_chan (co.)RMS_FBcompressor_peak_limiter_N_chan (co.)peak_compression_gain_mono (co.)peak_compression_gain_N_chan (co.)RMS_compression_gain_mono (co.)RMS_compression_gain_N_chan (co.)compressor_lad_mono (co.)compressor_mono (co.)compressor_stereo (co.)compression_gain_mono (co.)limiter_1176_R4_mono (co.)limiter_1176_R4_stereo (co.)peak_expansion_gain_N_chan_db (co.)expander_N_chan (co.)expanderSC_N_chan (co.)limiter_lad_N (co.)limiter_lad_mono (co.)limiter_lad_stereo (co.)limiter_lad_quad (co.)limiter_lad_bw","title":"compressors"},{"location":"libs/#delays","text":"(de.)delay (de.)fdelay (de.)sdelay (de.)fdelaylti and (de.)fdelayltv (de.)fdelay[N] (de.)fdelay[N]a","title":"delays"},{"location":"libs/#demos","text":"(dm.)mth_octave_spectral_level_demo (dm.)parametric_eq_demo (dm.)spectral_tilt_demo (dm.)mth_octave_filterbank_demo and (dm.)filterbank_demo (dm.)cubicnl_demo (dm.)gate_demo (dm.)compressor_demo (dm.)moog_vcf_demo (dm.)wah4_demo (dm.)crybaby_demo (dm.)flanger_demo (dm.)phaser2_demo (dm.)freeverb_demo (dm.)stereo_reverb_tester (dm.)fdnrev0_demo (dm.)zita_rev_fdn_demo (dm.)zita_light (dm.)zita_rev1 (dm.)dattorro_rev_demo (dm.)jprev_demo (dm.)greyhole_demo (dm.)sawtooth_demo (dm.)virtual_analog_oscillator_demo (dm.)oscrs_demo (dm.)velvet_noise_demo (dm.)latch_demo (dm.)envelopes_demo (dm.)fft_spectral_level_demo (dm.)reverse_echo_demo(nChans) (dm.)pospass_demo (dm.)exciter (dm.)vocoder_demo (dm.)colored_noise_demo","title":"demos"},{"location":"libs/#dx7","text":"(dx.)dx7_ampf (dx.)dx7_egraterisef (dx.)dx7_egraterisepercf (dx.)dx7_egratedecayf (dx.)dx7_egratedecaypercf (dx.)dx7_eglv2peakf (dx.)dx7_velsensf (dx.)dx7_fdbkscalef (dx.)dx7_op (dx.)dx7_algo (dx.)dx7_ui","title":"dx7"},{"location":"libs/#envelopes","text":"(en.)ar (en.)asr (en.)adsr (en.)smoothEnvelope (en.)arfe (en.)are (en.)asre (en.)adsre (en.)ahdsre (en.)dx7envelope","title":"envelopes"},{"location":"libs/#fds","text":"(fd.)model1D (fd.)model2D (fd.)stairsInterp1D (fd.)stairsInterp2D (fd.)linInterp1D (fd.)linInterp2D (fd.)stairsInterp1DOut (fd.)stairsInterp2DOut (fd.)linInterp1DOut (fd.)stairsInterp2DOut (fd.)route1D (fd.)route2D (fd.)schemePoint (fd.)buildScheme1D (fd.)buildScheme2D (fd.)hammer (fd.)bow","title":"fds"},{"location":"libs/#filters","text":"(fi.)zero (fi.)pole (fi.)integrator (fi.)dcblockerat (fi.)dcblocker (fi.)lptN (fi.)ff_comb (fi.)ff_fcomb (fi.)ffcombfilter (fi.)fb_comb (fi.)fb_fcomb (fi.)rev1 (fi.)fbcombfilter and (fi.)ffbcombfilter (fi.)allpass_comb (fi.)allpass_fcomb (fi.)rev2 (fi.)allpass_fcomb5 and (fi.)allpass_fcomb1a (fi.)iir (fi.)fir (fi.)conv and (fi.)convN (fi.)tf1, (fi.)tf2 and (fi.)tf3 (fi.)notchw (fi.)tf21, (fi.)tf22, (fi.)tf22t and (fi.)tf21t (fi.)av2sv (fi.)bvav2nuv (fi.)iir_lat2 (fi.)allpassnt (fi.)iir_kl (fi.)allpassnklt (fi.)iir_lat1 (fi.)allpassn1mt (fi.)iir_nl (fi.)allpassnnlt (fi.)tf2np (fi.)wgr (fi.)nlf2 (fi.)apnl (fi.)allpassn (fi.)allpassnn (fi.)allpassnkl (fi.)allpass1m (fi.)tf2s and (fi.)tf2snp (fi.)tf1snp (fi.)tf3slf (fi.)tf1s (fi.)tf2sb (fi.)tf1sb (fi.)resonlp (fi.)resonhp (fi.)resonbp (fi.)lowpass (fi.)highpass (fi.)lowpass0_highpass1 (fi.)lowpass_plus|minus_highpass (fi.)lowpass3e (fi.)lowpass6e (fi.)highpass3e (fi.)highpass6e (fi.)bandpass (fi.)bandstop (fi.)bandpass6e (fi.)bandpass12e (fi.)pospass (fi.)low_shelf (fi.)high_shelf (fi.)peak_eq (fi.)peak_eq_cq (fi.)peak_eq_rm (fi.)spectral_tilt (fi.)levelfilter (fi.)levelfilterN (fi.)mth_octave_filterbank[n] (fi.)filterbank (fi.)filterbanki (fi.)svf (fi.)lowpassLR4 (fi.)highpassLR4 (fi.)crossover2LR4 (fi.)crossover3LR4 (fi.)crossover4LR4 (fi.)crossover8LR4 (fi.)itu_r_bs_1770_4_kfilter (fi.)avg_rect (fi.)avg_tau (fi.)avg_t60 (fi.)avg_t19","title":"filters"},{"location":"libs/#hoa","text":"(ho.)encoder (ho.)rEncoder (ho.)stereoEncoder (ho.)multiEncoder (ho.)decoder (ho.)decoderStereo (ho.)iBasicDecoder (ho.)circularScaledVBAP (ho.)imlsDecoder (ho.)iDecoder (ho.)optimBasic (ho.)optimMaxRe (ho.)optimInPhase (ho.)optim (ho.)wider (ho.)mirror (ho.)map (ho.)rotate (ho.)scope (ho.).fxDecorrelation (ho.).synDecorrelation (ho.).fxRingMod (ho.).synRingMod (ho.)encoder3D (ho.)rEncoder3D (ho.)optimBasic3D (ho.)optimMaxRe3D (ho.)optimInPhase3D (ho.)optim3D","title":"hoa"},{"location":"libs/#interpolators","text":"(it.)interpolate_linear (it.)interpolate_cosine (it.)interpolate_cubic (it.)interpolator_two_points (it.)interpolator_linear (it.)interpolator_cosine (it.)interpolator_four_points (it.)interpolator_cubic (it.)interpolator_select (it.)lagrangeCoeffs(N, xCoordsList) (it.)lagrangeInterpolation(N, xCoordsList) (it.)frdtable(N, S) (it.)frwtable(N, S) (it.)remap","title":"interpolators"},{"location":"libs/#maths","text":"(ma.)SR (ma.)T (ma.)BS (ma.)PI (ma.)deg2rad (ma.)rad2deg (ma.)E (ma.)EPSILON (ma.)MIN (ma.)MAX (ma.)FTZ (ma.)copysign (ma.)neg (ma.)sub(x,y) (ma.)inv (ma.)cbrt (ma.)hypot (ma.)ldexp (ma.)scalb (ma.)log1p (ma.)logb (ma.)ilogb (ma.)log2 (ma.)expm1 (ma.)acosh (ma.)asinh (ma.)atanh (ma.)sinh (ma.)cosh (ma.)tanh (ma.)erf (ma.)erfc (ma.)gamma (ma.)lgamma (ma.)J0 (ma.)J1 (ma.)Jn (ma.)Y0 (ma.)Y1 (ma.)Yn (ma.)fabs, (ma.)fmax, (ma.)fmin (ma.)np2 (ma.)frac (ma.)modulo (ma.)isnan (ma.)isinf (ma.)chebychev (ma.)chebychevpoly (ma.)diffn (ma.)signum (ma.)nextpow2 (ma.)zc","title":"maths"},{"location":"libs/#mi","text":"(mi.)initState (mi.)mass (mi.)oscil (mi.)ground (mi.)posInput (mi.)spring (mi.)damper (mi.)springDamper (mi.)nlSpringDamper2 (mi.)nlSpringDamper3 (mi.)nlSpringDamperClipped (mi.)nlPluck (mi.)nlBow (mi.)collision (mi.)nlCollisionClipped","title":"mi"},{"location":"libs/#misceffects","text":"(ef.)cubicnl (ef.)gate_mono (ef.)gate_stereo (ef.)speakerbp (ef.)piano_dispersion_filter (ef.)stereo_width (ef.)mesh_square (ef.)reverseEchoN(nChans,delay) (ef.)reverseDelayRamped(delay,phase) (ef.)uniformPanToStereo(nChans) (ef.)dryWetMixer (ef.)dryWetMixerConstantPower (ef.)echo (ef.)transpose (ef.)softclipQuadratic (ef.)wavefold","title":"misceffects"},{"location":"libs/#oscillators","text":"(os.)sinwaveform (os.)coswaveform (os.)phasor (os.)hs_phasor (os.)hsp_phasor (os.)oscsin (os.)hs_oscsin (os.)osccos (os.)hs_osccos (os.)oscp (os.)osci (os.)osc (os.)m_oscsin (os.)m_osccos (os.)lf_imptrain (os.)lf_pulsetrainpos (os.)lf_pulsetrain (os.)lf_squarewavepos (os.)lf_squarewave (os.)lf_trianglepos (os.)lf_triangle (os.)lf_rawsaw (os.)lf_sawpos (os.)lf_sawpos_phase (os.)lf_sawpos_reset (os.)lf_sawpos_phase_reset (os.)lf_saw (os.)sawN (os.)sawNp (os.)saw2, (os.)saw3, (os.)saw4 (os.)saw2ptr (os.)saw2dpw (os.)sawtooth (os.)saw2f2, (os.)saw2f4 (os.)impulse (os.)pulsetrainN (os.)pulsetrain (os.)squareN (os.)square (os.)imptrainN (os.)imptrain (os.)triangleN (os.)triangle (os.)oscb (os.)oscrq (os.)oscrs (os.)oscrc (os.)oscs (os.)quadosc (os.)oscwc (os.)oscws (os.)oscq (os.)oscw (os.)CZsaw (os.)CZsawP (os.)CZsquare (os.)CZsquareP (os.)CZpulse (os.)CZpulseP (os.)CZsinePulse (os.)CZsinePulseP (os.)CZhalfSine (os.)CZhalfSineP (os.)CZresSaw (os.)CZresTriangle (os.)CZresTrap (os.)polyblep (os.)polyblep_saw (os.)polyblep_square (os.)polyblep_triangle","title":"oscillators"},{"location":"libs/#noises","text":"(no.)noise (no.)multirandom (no.)multinoise (no.)noises (no.)randomseed (no.)rnoise (no.)rmultirandom (no.)rmultinoise (no.)rnoises (no.)pink_noise (no.)pink_noise_vm (no.)lfnoise, (no.)lfnoise0 and (no.)lfnoiseN (no.)sparse_noise (no.)velvet_noise_vm (no.)gnoise (no.)colored_noise","title":"noises"},{"location":"libs/#phaflangers","text":"(pf.)flanger_mono (pf.)flanger_stereo (pf.)phaser2_mono (pf.)phaser2_stereo","title":"phaflangers"},{"location":"libs/#physmodels","text":"(pm.)speedOfSound (pm.)maxLength (pm.)f2l (pm.)l2f (pm.)l2s (pm.)basicBlock (pm.)chain (pm.)inLeftWave (pm.)inRightWave (pm.)in (pm.)outLeftWave (pm.)outRightWave (pm.)out (pm.)terminations (pm.)lTermination (pm.)rTermination (pm.)closeIns (pm.)closeOuts (pm.)endChain (pm.)waveguideN (pm.)waveguide (pm.)bridgeFilter (pm.)modeFilter (pm.)stringSegment (pm.)openString (pm.)nylonString (pm.)steelString (pm.)openStringPick (pm.)openStringPickUp (pm.)openStringPickDown (pm.)ksReflexionFilter (pm.)rStringRigidTermination (pm.)lStringRigidTermination (pm.)elecGuitarBridge (pm.)elecGuitarNuts (pm.)guitarBridge (pm.)guitarNuts (pm.)idealString (pm.)ks (pm.)ks_ui_MIDI (pm.)elecGuitarModel (pm.)elecGuitar (pm.)elecGuitar_ui_MIDI (pm.)guitarBody (pm.)guitarModel (pm.)guitar (pm.)guitar_ui_MIDI (pm.)nylonGuitarModel (pm.)nylonGuitar (pm.)nylonGuitar_ui_MIDI (pm.)modeInterpRes (pm.)modularInterpBody (pm.)modularInterpStringModel (pm.)modularInterpInstr (pm.)modularInterpInstr_ui_MIDI (pm.)bowTable (pm.)violinBowTable (pm.)bowInteraction (pm.)violinBow (pm.)violinBowedString (pm.)violinNuts (pm.)violinBridge (pm.)violinBody (pm.)violinModel (pm.)violin_ui (pm.)violin_ui_MIDI (pm.)openTube (pm.)reedTable (pm.)fluteJetTable (pm.)brassLipsTable (pm.)clarinetReed (pm.)clarinetMouthPiece (pm.)brassLips (pm.)fluteEmbouchure (pm.)wBell (pm.)fluteHead (pm.)fluteFoot (pm.)clarinetModel (pm.)clarinetModel_ui (pm.)clarinet_ui (pm.)clarinet_ui_MIDI (pm.)brassModel (pm.)brassModel_ui (pm.)brass_ui (pm.)brass_ui_MIDI (pm.)fluteModel (pm.)fluteModel_ui (pm.)flute_ui (pm.)flute_ui_MIDI (pm.)impulseExcitation (pm.)strikeModel (pm.)strike (pm.)pluckString (pm.)blower (pm.)blower_ui (pm.)djembeModel (pm.)djembe (pm.)djembe_ui_MIDI (pm.)marimbaBarModel (pm.)marimbaResTube (pm.)marimbaModel (pm.)marimba (pm.)marimba_ui_MIDI (pm.)churchBellModel (pm.)churchBell (pm.)churchBell_ui (pm.)englishBellModel (pm.)englishBell (pm.)englishBell_ui (pm.)frenchBellModel (pm.)frenchBell (pm.)frenchBell_ui (pm.)germanBellModel (pm.)germanBell (pm.)germanBell_ui (pm.)russianBellModel (pm.)russianBell (pm.)russianBell_ui (pm.)standardBellModel (pm.)standardBell (pm.)standardBell_ui (pm.)formantValues (pm.)voiceGender (pm.)skirtWidthMultiplier (pm.)autobendFreq (pm.)vocalEffort (pm.)fof (pm.)fofSH (pm.)fofCycle (pm.)fofSmooth (pm.)formantFilterFofCycle (pm.)formantFilterFofSmooth (pm.)formantFilterBP (pm.)formantFilterbank (pm.)formantFilterbankFofCycle (pm.)formantFilterbankFofSmooth (pm.)formantFilterbankBP (pm.)SFFormantModel (pm.)SFFormantModelFofCycle (pm.)SFFormantModelFofSmooth (pm.)SFFormantModelBP (pm.)SFFormantModelFofCycle_ui (pm.)SFFormantModelFofSmooth_ui (pm.)SFFormantModelBP_ui (pm.)SFFormantModelFofCycle_ui_MIDI (pm.)SFFormantModelFofSmooth_ui_MIDI (pm.)SFFormantModelBP_ui_MIDI (pm.)allpassNL (pm).modalModel","title":"physmodels"},{"location":"libs/#quantizers","text":"(qu.)quantize (qu.)quantizeSmoothed (qu.)ionian (qu.)dorian (qu.)phrygian (qu.)lydian (qu.)mixo (qu.)eolian (qu.)locrian (qu.)pentanat (qu.)kumoi (qu.)natural (qu.)dodeca (qu.)dimin (qu.)penta","title":"quantizers"},{"location":"libs/#reducemaps","text":"(rm.)parReduce (rm.)topReduce (rm.)botReduce (rm.)reduce (rm.)reducemap","title":"reducemaps"},{"location":"libs/#reverbs","text":"(re.)jcrev (re.)satrev (re.)fdnrev0 (re.)zita_rev_fdn (re.)zita_rev1_stereo (re.)zita_rev1_ambi (re.)mono_freeverb (re.)stereo_freeverb (re.)dattorro_rev (re.)dattorro_rev_default (re.)jpverb (re.)greyhole","title":"reverbs"},{"location":"libs/#routes","text":"(ro.)cross (ro.)crossnn (ro.)crossn1 (ro.)cross1n (ro.)crossNM (ro.)interleave (ro.)butterfly (ro.)hadamard (ro.)recursivize (ro.)bubbleSort","title":"routes"},{"location":"libs/#signals","text":"(si.)bus (si.)block (si.)interpolate (si.)smoo (si.)polySmooth (si.)smoothAndH (si.)bsmooth (si.)dot (si.)smooth (si.)cbus (si.)cmul (si.)cconj (si.)onePoleSwitching (si.)rev (si.)vecOp","title":"signals"},{"location":"libs/#soundfiles","text":"(so.)loop (so.)loop_speed (so.)loop_speed_level","title":"soundfiles"},{"location":"libs/#spats","text":"(sp.)panner (sp.)constantPowerPan (sp.)spat (sp.)stereoize","title":"spats"},{"location":"libs/#synths","text":"(sy.)popFilterDrum (sy.)dubDub (sy.)sawTrombone (sy.)combString (sy.)additiveDrum (sy.)fm (sy.)kick (sy.)clap (sy.)hat","title":"synths"},{"location":"libs/#vaeffects","text":"(ve.)moog_vcf (ve.)moog_vcf_2b[n] (ve.)moogLadder (ve.)moogHalfLadder (ve.)diodeLadder (ve.)korg35LPF (ve.)korg35HPF (ve.)oberheim (ve.)oberheimBSF (ve.)oberheimBPF (ve.)oberheimHPF (ve.)oberheimLPF (ve.)sallenKeyOnePole (ve.)sallenKeyOnePoleLPF (ve.)sallenKeyOnePoleHPF (ve.)sallenKey2ndOrder (ve.)sallenKey2ndOrderLPF (ve.)sallenKey2ndOrderBPF (ve.)sallenKey2ndOrderHPF (ve.)wah4 (ve.)autowah (ve.)crybaby (ve.)vocoder","title":"vaeffects"},{"location":"libs/#version","text":"(vl.)version","title":"version"},{"location":"libs/#wdmodels","text":"(wd.)resistor (wd.)resistor_Vout (wd.)resistor_Iout (wd.)u_voltage (wd.)u_current (wd.)resVoltage (wd.)resVoltage_Vout (wd.)u_resVoltage (wd.)resCurrent (wd.)u_resCurrent (wd.)u_switch (wd.)capacitor (wd.)capacitor_Vout (wd.)inductor (wd.)inductor_Vout (wd.)u_idealDiode (wd.)u_chua (wd.)lambert (wd.)u_diodePair (wd.)u_diodeSingle (wd.)u_diodeAntiparallel (wd.)u_parallel2Port (wd.)parallel2Port (wd.)u_series2Port (wd.)series2Port (wd.)parallelCurrent (wd.)seriesVoltage (wd.)u_transformer (wd.)transformer (wd.)u_transformerActive (wd.)transformerActive (wd.)parallel (wd.)series (wd.)u_sixportPassive (wd.)genericNode (wd.)genericNode_Vout (wd.)genericNode_Iout (wd.)u_genericNode (wd.)builddown (wd.)buildup (wd.)getres (wd.)parres (wd.)buildout (wd.)buildtree","title":"wdmodels"},{"location":"libs/#webaudio","text":"(wa.)lowpass2 (wa.)highpass2 (wa.)bandpass2 (wa.)notch2 (wa.)allpass2 (wa.)peaking2 (wa.)lowshelf2 (wa.)highshelf2","title":"webaudio"},{"location":"libs/aanl/","text":"aanl.lib A library for antialiased nonlinearities. Its official prefix is aa . This library provides aliasing-suppressed nonlinearities through first-order and second-order approximations of continuous-time signals, functions, and convolution based on antiderivatives. This technique is particularly effective if combined with low-factor oversampling, for example, operating at 96 kHz or 192 kHz sample-rate. The library contains trigonometric functions as well as other nonlinear functions such as bounded and unbounded saturators. Due to their limited domains or ranges, some of these functions may not suitable for audio nonlinear processing or waveshaping, although they have been included for completeness. Some other functions, for example, tan() and tanh(), are only available with first-order antialiasing due to the complexity of the antiderivative of the x * f(x) term, particularly because of the necessity of the dilogarithm function, which requires special implementation. Future improvements to this library may include an adaptive mechanism to set the ill-conditioned cases threshold to improve performance in varying cases. Note that the antialiasing functions introduce a delay in the path, respectively half and one-sample delay for first and second-order functions. Also note that due to division by differences, it is vital to use double-precision or more to reduce errors. The environment identifier for this library is aa . After importing the standard libraries in Faust, the functions below can be called as aa.function_name . References https://github.com/grame-cncm/faustlibraries/blob/master/aanl.lib Reducing the Aliasing in Nonlinear Waveshaping Using Continuous-time Convolution, Julian Parker, Vadim Zavalishin, Efflam Le Bivic, DAFX, 2016 http://dafx16.vutbr.cz/dafxpapers/20-DAFx-16_paper_41-PN.pdf Auxiliary Functions (aa.)clip Clipping function. (aa.)Rsqrt Real-valued sqrt(). (aa.)Rlog Real-valued log(). (aa.)Rtan Real-valued tan(). (aa.)Racos Real-valued acos(). (aa.)Rasin Real-valued asin(). (aa.)Racosh Real-valued acosh() (aa.)Rcosh Real-valued cosh(). (aa.)Rsinh Real-valued sinh(). (aa.)Ratanh Real-valued atanh(). (aa.)ADAA1 Generalised first-order ADAA function. Usage _ : ADAA1(EPS, f, F1) : _ Where: EPS : a threshold to handle ill-conditioned cases f : a function that we want to process with ADAA F1 : f's first antiderivative (aa.)ADAA2 Generalised second-order ADAA function. Usage _ : ADAA2(EPS, f, F1, F2) : _ Where: EPS : a threshold to handle ill-conditioned cases f : a function that we want to process with ADAA F1 : f's first antiderivative F2 : f's second antiderivative Main functions Saturators These antialiased saturators perform best with high-amplitude input signals. If the input is only slightly saturated, hence producing negligible aliasing, the trivial saturator may result in a better overall output, as noise can be introduced by first and second ADAA at low amplitudes. Once determining the lowest saturation level for which the antialiased functions perform adequately, it might be sensible to cross-fade between the trivial and the antialiased saturators according to the amplitude profile of the input signal. (aa.)hardclip First-order ADAA hard-clip. The domain of this function is \u211d; its theoretical range is [-1.0; 1.0]. Usage _ : aa.hardclip : _ (aa.)hardclip2 Second-order ADAA hard-clip. The domain of this function is \u211d; its theoretical range is [-1.0; 1.0]. Usage _ : aa.hardclip2 : _ (aa.)cubic1 First-order ADAA cubic saturator. The domain of this function is \u211d; its theoretical range is [-2.0/3.0; 2.0/3.0]. Usage _ : aa.cubic1 : _ (aa.)parabolic First-order ADAA parabolic saturator. The domain of this function is \u211d; its theoretical range is [-1.0; 1.0]. Usage _ : aa.parabolic : _ (aa.)parabolic2 Second-order ADAA parabolic saturator. The domain of this function is \u211d; its theoretical range is [-1.0; 1.0]. Usage _ : aa.parabolic : _ (aa.)hyperbolic First-order ADAA hyperbolic saturator. The domain of this function is \u211d; its theoretical range is ]-1.0; 1.0[. Usage _ : aa.hyperbolic : _ (aa.)hyperbolic2 Second-order ADAA hyperbolic saturator. The domain of this function is \u211d; its theoretical range is ]-1.0; 1.0[. Usage _ : aa.hyperbolic2 : _ (aa.)sinarctan First-order ADAA sin(atan()) saturator. The domain of this function is \u211d; its theoretical range is ]-1.0; 1.0[. Usage _ : aa.sinatan : _ (aa.)sinarctan2 Second-order ADAA sin(atan()) saturator. The domain of this function is \u211d; its theoretical range is ]-1.0; 1.0[. Usage _ : aa.sinarctan2 : _ (aa.)tanh1 First-order ADAA tanh() saturator. The domain of this function is \u211d; its theoretical range is ]-1.0; 1.0[. Usage _ : aa.tanh1 : _ (aa.)arctan First-order ADAA atan(). The domain of this function is \u211d; its theoretical range is ]-\u03c0/2.0; \u03c0/2.0[. Usage _ : aa.arctan : _ (aa.)arctan2 Second-order ADAA atan(). The domain of this function is \u211d; its theoretical range is ]-\u03c0/2.0; \u03c0/2.0[. Usage _ : aa.arctan2 : _ (aa.)asinh1 First-order ADAA asinh() saturator (unbounded). The domain of this function is \u211d; its theoretical range is \u211d. Usage _ : aa.asinh1 : _ (aa.)asinh2 Second-order ADAA asinh() saturator (unbounded). The domain of this function is \u211d; its theoretical range is \u211d. Usage _ : aa.asinh2 : _ Trigonometry These functions are reliable if input signals are within their domains. (aa.)cosine1 First-order ADAA cos(). The domain of this function is \u211d; its theoretical range is [-1.0; 1.0]. Usage _ : aa.cosine1 : _ (aa.)cosine2 Second-order ADAA cos(). The domain of this function is \u211d; its theoretical range is [-1.0; 1.0]. Usage _ : aa.cosine2 : _ (aa.)arccos First-order ADAA acos(). The domain of this function is [-1.0; 1.0]; its theoretical range is [\u03c0; 0.0]. Usage _ : aa.arccos : _ (aa.)arccos2 Second-order ADAA acos(). The domain of this function is [-1.0; 1.0]; its theoretical range is [\u03c0; 0.0]. Note that this function is not accurate for low-amplitude or low-frequency input signals. In that case, the first-order ADAA arccos() can be used. Usage _ : aa.arccos2 : _ (aa.)acosh1 First-order ADAA acosh(). The domain of this function is \u211d >= 1.0; its theoretical range is \u211d >= 0.0. Usage _ : aa.acosh1 : _ (aa.)acosh2 Second-order ADAA acosh(). The domain of this function is \u211d >= 1.0; its theoretical range is \u211d >= 0.0. Note that this function is not accurate for low-frequency input signals. In that case, the first-order ADAA acosh() can be used. Usage _ : aa.acosh2 : _ (aa.)sine First-order ADAA sin(). The domain of this function is \u211d; its theoretical range is \u211d. Usage _ : aa.sine : _ (aa.)sine2 Second-order ADAA sin(). The domain of this function is \u211d; its theoretical range is \u211d. Usage _ : aa.sine2 : _ (aa.)arcsin First-order ADAA asin(). The domain of this function is [-1.0, 1.0]; its theoretical range is [-\u03c0/2.0; \u03c0/2.0]. Usage _ : aa.arcsin : _ (aa.)arcsin2 Second-order ADAA asin(). The domain of this function is [-1.0, 1.0]; its theoretical range is [-\u03c0/2.0; \u03c0/2.0]. Note that this function is not accurate for low-frequency input signals. In that case, the first-order ADAA asin() can be used. Usage _ : aa.arcsin2 : _ (aa.)tangent First-order ADAA tan(). The domain of this function is [-\u03c0/2.0; \u03c0/2.0]; its theoretical range is \u211d. Usage _ : aa.tangent : _ (aa.)atanh1 First-order ADAA atanh(). The domain of this function is ]-1.0; 1.0[; its theoretical range is \u211d. Usage _ : aa.atanh1 : _ (aa.)atanh2 Second-order ADAA atanh(). The domain of this function is ]-1.0; 1.0[; its theoretical range is \u211d. Usage _ : aa.atanh2 : _","title":" antialiased "},{"location":"libs/aanl/#aanllib","text":"A library for antialiased nonlinearities. Its official prefix is aa . This library provides aliasing-suppressed nonlinearities through first-order and second-order approximations of continuous-time signals, functions, and convolution based on antiderivatives. This technique is particularly effective if combined with low-factor oversampling, for example, operating at 96 kHz or 192 kHz sample-rate. The library contains trigonometric functions as well as other nonlinear functions such as bounded and unbounded saturators. Due to their limited domains or ranges, some of these functions may not suitable for audio nonlinear processing or waveshaping, although they have been included for completeness. Some other functions, for example, tan() and tanh(), are only available with first-order antialiasing due to the complexity of the antiderivative of the x * f(x) term, particularly because of the necessity of the dilogarithm function, which requires special implementation. Future improvements to this library may include an adaptive mechanism to set the ill-conditioned cases threshold to improve performance in varying cases. Note that the antialiasing functions introduce a delay in the path, respectively half and one-sample delay for first and second-order functions. Also note that due to division by differences, it is vital to use double-precision or more to reduce errors. The environment identifier for this library is aa . After importing the standard libraries in Faust, the functions below can be called as aa.function_name .","title":"aanl.lib"},{"location":"libs/aanl/#references","text":"https://github.com/grame-cncm/faustlibraries/blob/master/aanl.lib Reducing the Aliasing in Nonlinear Waveshaping Using Continuous-time Convolution, Julian Parker, Vadim Zavalishin, Efflam Le Bivic, DAFX, 2016 http://dafx16.vutbr.cz/dafxpapers/20-DAFx-16_paper_41-PN.pdf","title":"References"},{"location":"libs/aanl/#auxiliary-functions","text":"","title":"Auxiliary Functions"},{"location":"libs/aanl/#aaclip","text":"Clipping function.","title":"(aa.)clip"},{"location":"libs/aanl/#aarsqrt","text":"Real-valued sqrt().","title":"(aa.)Rsqrt"},{"location":"libs/aanl/#aarlog","text":"Real-valued log().","title":"(aa.)Rlog"},{"location":"libs/aanl/#aartan","text":"Real-valued tan().","title":"(aa.)Rtan"},{"location":"libs/aanl/#aaracos","text":"Real-valued acos().","title":"(aa.)Racos"},{"location":"libs/aanl/#aarasin","text":"Real-valued asin().","title":"(aa.)Rasin"},{"location":"libs/aanl/#aaracosh","text":"Real-valued acosh()","title":"(aa.)Racosh"},{"location":"libs/aanl/#aarcosh","text":"Real-valued cosh().","title":"(aa.)Rcosh"},{"location":"libs/aanl/#aarsinh","text":"Real-valued sinh().","title":"(aa.)Rsinh"},{"location":"libs/aanl/#aaratanh","text":"Real-valued atanh().","title":"(aa.)Ratanh"},{"location":"libs/aanl/#aaadaa1","text":"Generalised first-order ADAA function.","title":"(aa.)ADAA1"},{"location":"libs/aanl/#usage","text":"_ : ADAA1(EPS, f, F1) : _ Where: EPS : a threshold to handle ill-conditioned cases f : a function that we want to process with ADAA F1 : f's first antiderivative","title":"Usage"},{"location":"libs/aanl/#aaadaa2","text":"Generalised second-order ADAA function.","title":"(aa.)ADAA2"},{"location":"libs/aanl/#usage_1","text":"_ : ADAA2(EPS, f, F1, F2) : _ Where: EPS : a threshold to handle ill-conditioned cases f : a function that we want to process with ADAA F1 : f's first antiderivative F2 : f's second antiderivative","title":"Usage"},{"location":"libs/aanl/#main-functions","text":"","title":"Main functions"},{"location":"libs/aanl/#saturators","text":"These antialiased saturators perform best with high-amplitude input signals. If the input is only slightly saturated, hence producing negligible aliasing, the trivial saturator may result in a better overall output, as noise can be introduced by first and second ADAA at low amplitudes. Once determining the lowest saturation level for which the antialiased functions perform adequately, it might be sensible to cross-fade between the trivial and the antialiased saturators according to the amplitude profile of the input signal.","title":"Saturators"},{"location":"libs/aanl/#aahardclip","text":"First-order ADAA hard-clip. The domain of this function is \u211d; its theoretical range is [-1.0; 1.0].","title":"(aa.)hardclip"},{"location":"libs/aanl/#usage_2","text":"_ : aa.hardclip : _","title":"Usage"},{"location":"libs/aanl/#aahardclip2","text":"Second-order ADAA hard-clip. The domain of this function is \u211d; its theoretical range is [-1.0; 1.0].","title":"(aa.)hardclip2"},{"location":"libs/aanl/#usage_3","text":"_ : aa.hardclip2 : _","title":"Usage"},{"location":"libs/aanl/#aacubic1","text":"First-order ADAA cubic saturator. The domain of this function is \u211d; its theoretical range is [-2.0/3.0; 2.0/3.0].","title":"(aa.)cubic1"},{"location":"libs/aanl/#usage_4","text":"_ : aa.cubic1 : _","title":"Usage"},{"location":"libs/aanl/#aaparabolic","text":"First-order ADAA parabolic saturator. The domain of this function is \u211d; its theoretical range is [-1.0; 1.0].","title":"(aa.)parabolic"},{"location":"libs/aanl/#usage_5","text":"_ : aa.parabolic : _","title":"Usage"},{"location":"libs/aanl/#aaparabolic2","text":"Second-order ADAA parabolic saturator. The domain of this function is \u211d; its theoretical range is [-1.0; 1.0].","title":"(aa.)parabolic2"},{"location":"libs/aanl/#usage_6","text":"_ : aa.parabolic : _","title":"Usage"},{"location":"libs/aanl/#aahyperbolic","text":"First-order ADAA hyperbolic saturator. The domain of this function is \u211d; its theoretical range is ]-1.0; 1.0[.","title":"(aa.)hyperbolic"},{"location":"libs/aanl/#usage_7","text":"_ : aa.hyperbolic : _","title":"Usage"},{"location":"libs/aanl/#aahyperbolic2","text":"Second-order ADAA hyperbolic saturator. The domain of this function is \u211d; its theoretical range is ]-1.0; 1.0[.","title":"(aa.)hyperbolic2"},{"location":"libs/aanl/#usage_8","text":"_ : aa.hyperbolic2 : _","title":"Usage"},{"location":"libs/aanl/#aasinarctan","text":"First-order ADAA sin(atan()) saturator. The domain of this function is \u211d; its theoretical range is ]-1.0; 1.0[.","title":"(aa.)sinarctan"},{"location":"libs/aanl/#usage_9","text":"_ : aa.sinatan : _","title":"Usage"},{"location":"libs/aanl/#aasinarctan2","text":"Second-order ADAA sin(atan()) saturator. The domain of this function is \u211d; its theoretical range is ]-1.0; 1.0[.","title":"(aa.)sinarctan2"},{"location":"libs/aanl/#usage_10","text":"_ : aa.sinarctan2 : _","title":"Usage"},{"location":"libs/aanl/#aatanh1","text":"First-order ADAA tanh() saturator. The domain of this function is \u211d; its theoretical range is ]-1.0; 1.0[.","title":"(aa.)tanh1"},{"location":"libs/aanl/#usage_11","text":"_ : aa.tanh1 : _","title":"Usage"},{"location":"libs/aanl/#aaarctan","text":"First-order ADAA atan(). The domain of this function is \u211d; its theoretical range is ]-\u03c0/2.0; \u03c0/2.0[.","title":"(aa.)arctan"},{"location":"libs/aanl/#usage_12","text":"_ : aa.arctan : _","title":"Usage"},{"location":"libs/aanl/#aaarctan2","text":"Second-order ADAA atan(). The domain of this function is \u211d; its theoretical range is ]-\u03c0/2.0; \u03c0/2.0[.","title":"(aa.)arctan2"},{"location":"libs/aanl/#usage_13","text":"_ : aa.arctan2 : _","title":"Usage"},{"location":"libs/aanl/#aaasinh1","text":"First-order ADAA asinh() saturator (unbounded). The domain of this function is \u211d; its theoretical range is \u211d.","title":"(aa.)asinh1"},{"location":"libs/aanl/#usage_14","text":"_ : aa.asinh1 : _","title":"Usage"},{"location":"libs/aanl/#aaasinh2","text":"Second-order ADAA asinh() saturator (unbounded). The domain of this function is \u211d; its theoretical range is \u211d.","title":"(aa.)asinh2"},{"location":"libs/aanl/#usage_15","text":"_ : aa.asinh2 : _","title":"Usage"},{"location":"libs/aanl/#trigonometry","text":"These functions are reliable if input signals are within their domains.","title":"Trigonometry"},{"location":"libs/aanl/#aacosine1","text":"First-order ADAA cos(). The domain of this function is \u211d; its theoretical range is [-1.0; 1.0].","title":"(aa.)cosine1"},{"location":"libs/aanl/#usage_16","text":"_ : aa.cosine1 : _","title":"Usage"},{"location":"libs/aanl/#aacosine2","text":"Second-order ADAA cos(). The domain of this function is \u211d; its theoretical range is [-1.0; 1.0].","title":"(aa.)cosine2"},{"location":"libs/aanl/#usage_17","text":"_ : aa.cosine2 : _","title":"Usage"},{"location":"libs/aanl/#aaarccos","text":"First-order ADAA acos(). The domain of this function is [-1.0; 1.0]; its theoretical range is [\u03c0; 0.0].","title":"(aa.)arccos"},{"location":"libs/aanl/#usage_18","text":"_ : aa.arccos : _","title":"Usage"},{"location":"libs/aanl/#aaarccos2","text":"Second-order ADAA acos(). The domain of this function is [-1.0; 1.0]; its theoretical range is [\u03c0; 0.0]. Note that this function is not accurate for low-amplitude or low-frequency input signals. In that case, the first-order ADAA arccos() can be used.","title":"(aa.)arccos2"},{"location":"libs/aanl/#usage_19","text":"_ : aa.arccos2 : _","title":"Usage"},{"location":"libs/aanl/#aaacosh1","text":"First-order ADAA acosh(). The domain of this function is \u211d >= 1.0; its theoretical range is \u211d >= 0.0.","title":"(aa.)acosh1"},{"location":"libs/aanl/#usage_20","text":"_ : aa.acosh1 : _","title":"Usage"},{"location":"libs/aanl/#aaacosh2","text":"Second-order ADAA acosh(). The domain of this function is \u211d >= 1.0; its theoretical range is \u211d >= 0.0. Note that this function is not accurate for low-frequency input signals. In that case, the first-order ADAA acosh() can be used.","title":"(aa.)acosh2"},{"location":"libs/aanl/#usage_21","text":"_ : aa.acosh2 : _","title":"Usage"},{"location":"libs/aanl/#aasine","text":"First-order ADAA sin(). The domain of this function is \u211d; its theoretical range is \u211d.","title":"(aa.)sine"},{"location":"libs/aanl/#usage_22","text":"_ : aa.sine : _","title":"Usage"},{"location":"libs/aanl/#aasine2","text":"Second-order ADAA sin(). The domain of this function is \u211d; its theoretical range is \u211d.","title":"(aa.)sine2"},{"location":"libs/aanl/#usage_23","text":"_ : aa.sine2 : _","title":"Usage"},{"location":"libs/aanl/#aaarcsin","text":"First-order ADAA asin(). The domain of this function is [-1.0, 1.0]; its theoretical range is [-\u03c0/2.0; \u03c0/2.0].","title":"(aa.)arcsin"},{"location":"libs/aanl/#usage_24","text":"_ : aa.arcsin : _","title":"Usage"},{"location":"libs/aanl/#aaarcsin2","text":"Second-order ADAA asin(). The domain of this function is [-1.0, 1.0]; its theoretical range is [-\u03c0/2.0; \u03c0/2.0]. Note that this function is not accurate for low-frequency input signals. In that case, the first-order ADAA asin() can be used.","title":"(aa.)arcsin2"},{"location":"libs/aanl/#usage_25","text":"_ : aa.arcsin2 : _","title":"Usage"},{"location":"libs/aanl/#aatangent","text":"First-order ADAA tan(). The domain of this function is [-\u03c0/2.0; \u03c0/2.0]; its theoretical range is \u211d.","title":"(aa.)tangent"},{"location":"libs/aanl/#usage_26","text":"_ : aa.tangent : _","title":"Usage"},{"location":"libs/aanl/#aaatanh1","text":"First-order ADAA atanh(). The domain of this function is ]-1.0; 1.0[; its theoretical range is \u211d.","title":"(aa.)atanh1"},{"location":"libs/aanl/#usage_27","text":"_ : aa.atanh1 : _","title":"Usage"},{"location":"libs/aanl/#aaatanh2","text":"Second-order ADAA atanh(). The domain of this function is ]-1.0; 1.0[; its theoretical range is \u211d.","title":"(aa.)atanh2"},{"location":"libs/aanl/#usage_28","text":"_ : aa.atanh2 : _","title":"Usage"},{"location":"libs/analyzers/","text":"analyzers.lib Analyzers library. Its official prefix is an . References https://github.com/grame-cncm/faustlibraries/blob/master/analyzers.lib Amplitude Tracking (an.)abs_envelope_rect Absolute value average with moving-average algorithm. Usage _ : abs_envelope_rect(period) : _ Where: period : sets the averaging frame in seconds (an.)abs_envelope_tau Absolute value average with one-pole lowpass and tau response. (See filters.lib.) Usage _ : abs_envelope_tau(period) : _ Where: period : (time to decay by 1/e) sets the averaging frame in secs (an.)abs_envelope_t60 Absolute value average with one-pole lowpass and t60 response. (See filters.lib.) Usage _ : abs_envelope_t60(period) : _ Where: period : (time to decay by 60 dB) sets the averaging frame in secs (an.)abs_envelope_t19 Absolute value average with one-pole lowpass and t19 response. (See filters.lib.) Usage _ : abs_envelope_t19(period) : _ Where: period : (time to decay by 1/e^2.2) sets the averaging frame in secs (an.)amp_follower Classic analog audio envelope follower with infinitely fast rise and exponential decay. The amplitude envelope instantaneously follows the absolute value going up, but then floats down exponentially. amp_follower is a standard Faust function. Usage _ : amp_follower(rel) : _ Where: rel : release time = amplitude-envelope time-constant (sec) going down References Musical Engineer's Handbook, Bernie Hutchins, Ithaca NY 1975 Electronotes Newsletter, Bernie Hutchins (an.)amp_follower_ud Envelope follower with different up and down time-constants (also called a \"peak detector\"). Usage _ : amp_follower_ud(att,rel) : _ Where: att : attack time = amplitude-envelope time constant (sec) going up rel : release time = amplitude-envelope time constant (sec) going down Note We assume rel >> att. Otherwise, consider rel ~ max(rel,att). For audio, att is normally faster (smaller) than rel (e.g., 0.001 and 0.01). Use amp_follower_ar below to remove this restriction. Reference \"Digital Dynamic Range Compressor Design --- A Tutorial and Analysis\", by Dimitrios Giannoulis, Michael Massberg, and Joshua D. Reiss https://www.eecs.qmul.ac.uk/~josh/documents/2012/GiannoulisMassbergReiss-dynamicrangecompression-JAES2012.pdf (an.)amp_follower_ar Envelope follower with independent attack and release times. The release can be shorter than the attack (unlike in amp_follower_ud above). Usage _ : amp_follower_ar(att,rel) : _ Where: att : attack time = amplitude-envelope time constant (sec) going up rel : release time = amplitude-envelope time constant (sec) going down (an.)ms_envelope_rect Mean square with moving-average algorithm. Usage _ : ms_envelope_rect(period) : _ Where: period : sets the averaging frame in secs (an.)ms_envelope_tau Mean square average with one-pole lowpass and tau response. (see filters.lib ) Usage _ : ms_envelope_tau(period) : _ Where: period : (time to decay by 1/e) sets the averaging frame in secs (an.)ms_envelope_t60 Mean square with one-pole lowpass and t60 response. (see filters.lib ) Usage _ : ms_envelope_t60(period) : _ Where: period : (time to decay by 60 dB) sets the averaging frame in secs (an.)ms_envelope_t19 Mean square with one-pole lowpass and t19 response. (see filters.lib ) Usage _ : ms_envelope_t19(period) : _ Where: period : (time to decay by 1/e^2.2) sets the averaging frame in secs (an.)rms_envelope_rect Root mean square with moving-average algorithm. Usage _ : rms_envelope_rect(period) : _ Where: period : sets the averaging frame in secs (an.)rms_envelope_tau Root mean square with one-pole lowpass and tau response. (see filters.lib ) Usage _ : rms_envelope_tau(period) : _ Where: period : (time to decay by 1/e) sets the averaging frame in secs (an.)rms_envelope_t60 Root mean square with one-pole lowpass and t60 response. (see filters.lib ) Usage _ : rms_envelope_t60(period) : _ Where: period : (time to decay by 60 dB) sets the averaging frame in secs (an.)rms_envelope_t19 Root mean square with one-pole lowpass and t19 response. (see filters.lib ) Usage _ : rms_envelope_t19(period) : _ Where: period : (time to decay by 1/e^2.2) sets the averaging frame in secs (an.)zcr Zero-crossing rate (ZCR) with one-pole lowpass averaging based on the tau constant. It outputs an index between 0 and 1 at a desired analysis frame. The ZCR of a signal correlates with the noisiness [Gouyon et al. 2000] and the spectral centroid [Herrera-Boyer et al. 2006] of a signal. For sinusoidal signals, the ZCR can be multiplied by ma.SR/2 and used as a frequency detector. For example, it can be deployed as a computationally efficient adaptive mechanism for automatic Larsen suppression. Usage _ : zcr(tau) : _ Where: tau : (time to decay by e^-1) sets the averaging frame in seconds. Adaptive Frequency Analysis (an.)pitchTracker This function implements a pitch-tracking algorithm by means of zero-crossing rate analysis and adaptive low-pass filtering. The design is based on the algorithm described in this tutorial (section 2.2) . Usage _ : pitchTracker(N, tau) : _ Where: N : a constant numerical expression, sets the order of the low-pass filter, which determines the sensitivity of the algorithm for signals where partials are stronger than the fundamental frequency. tau : response time in seconds based on exponentially-weighted averaging with tau time-constant. See https://ccrma.stanford.edu/~jos/st/Exponentials.html . (an.)spectralCentroid This function implements a time-domain spectral centroid by means of RMS measurements and adaptive crossover filtering. The weight difference of the upper and lower spectral powers are used to recursively adjust the crossover cutoff so that the system (minimally) oscillates around a balancing point. Unlike block processing techniques such as FFT, this algorithm provides continuous measurements and fast response times. Furthermore, when providing input signals that are spectrally sparse, the algorithm will output a logarithmic measure of the centroid, which is perceptually desirable for musical applications. For example, if the input signal is the combination of three tones at 1000, 2000, and 4000 Hz, the centroid will be the middle octave. Usage _ : spectralCentroid(nonlinearity, tau) : _ Where: nonlinearity : a boolean to activate or deactivate nonlinear integration. The nonlinear function is useful to improve stability with very short response times such as .001 <= tau <= .005 , otherwise, the nonlinearity may reduce precision. tau : response time in seconds based on exponentially-weighted averaging with tau time-constant. See https://ccrma.stanford.edu/~jos/st/Exponentials.html . Reference: Sanfilippo, D. (2021). Time-Domain Adaptive Algorithms for Low- and High-Level Audio Information Processing. Computer Music Journal, 45(1), 24-38. Example: process = os.osc(500) + os.osc(1000) + os.osc(2000) + os.osc(4000) + os.osc(8000) : an.spectralCentroid(1, .001); Spectrum-Analyzers Spectrum-analyzers split the input signal into a bank of parallel signals, one for each spectral band. They are related to the Mth-Octave Filter-Banks in filters.lib . The documentation of this library contains more details about the implementation. The parameters are: M : number of band-slices per octave (>1) N : total number of bands (>2) ftop = upper bandlimit of the Mth-octave bands (> att. Otherwise, consider rel ~ max(rel,att). For audio, att is normally faster (smaller) than rel (e.g., 0.001 and 0.01). Use amp_follower_ar below to remove this restriction.","title":"Note"},{"location":"libs/analyzers/#reference","text":"\"Digital Dynamic Range Compressor Design --- A Tutorial and Analysis\", by Dimitrios Giannoulis, Michael Massberg, and Joshua D. Reiss https://www.eecs.qmul.ac.uk/~josh/documents/2012/GiannoulisMassbergReiss-dynamicrangecompression-JAES2012.pdf","title":"Reference"},{"location":"libs/analyzers/#anamp_follower_ar","text":"Envelope follower with independent attack and release times. The release can be shorter than the attack (unlike in amp_follower_ud above).","title":"(an.)amp_follower_ar"},{"location":"libs/analyzers/#usage_6","text":"_ : amp_follower_ar(att,rel) : _ Where: att : attack time = amplitude-envelope time constant (sec) going up rel : release time = amplitude-envelope time constant (sec) going down","title":"Usage"},{"location":"libs/analyzers/#anms_envelope_rect","text":"Mean square with moving-average algorithm.","title":"(an.)ms_envelope_rect"},{"location":"libs/analyzers/#usage_7","text":"_ : ms_envelope_rect(period) : _ Where: period : sets the averaging frame in secs","title":"Usage"},{"location":"libs/analyzers/#anms_envelope_tau","text":"Mean square average with one-pole lowpass and tau response. (see filters.lib )","title":"(an.)ms_envelope_tau"},{"location":"libs/analyzers/#usage_8","text":"_ : ms_envelope_tau(period) : _ Where: period : (time to decay by 1/e) sets the averaging frame in secs","title":"Usage"},{"location":"libs/analyzers/#anms_envelope_t60","text":"Mean square with one-pole lowpass and t60 response. (see filters.lib )","title":"(an.)ms_envelope_t60"},{"location":"libs/analyzers/#usage_9","text":"_ : ms_envelope_t60(period) : _ Where: period : (time to decay by 60 dB) sets the averaging frame in secs","title":"Usage"},{"location":"libs/analyzers/#anms_envelope_t19","text":"Mean square with one-pole lowpass and t19 response. (see filters.lib )","title":"(an.)ms_envelope_t19"},{"location":"libs/analyzers/#usage_10","text":"_ : ms_envelope_t19(period) : _ Where: period : (time to decay by 1/e^2.2) sets the averaging frame in secs","title":"Usage"},{"location":"libs/analyzers/#anrms_envelope_rect","text":"Root mean square with moving-average algorithm.","title":"(an.)rms_envelope_rect"},{"location":"libs/analyzers/#usage_11","text":"_ : rms_envelope_rect(period) : _ Where: period : sets the averaging frame in secs","title":"Usage"},{"location":"libs/analyzers/#anrms_envelope_tau","text":"Root mean square with one-pole lowpass and tau response. (see filters.lib )","title":"(an.)rms_envelope_tau"},{"location":"libs/analyzers/#usage_12","text":"_ : rms_envelope_tau(period) : _ Where: period : (time to decay by 1/e) sets the averaging frame in secs","title":"Usage"},{"location":"libs/analyzers/#anrms_envelope_t60","text":"Root mean square with one-pole lowpass and t60 response. (see filters.lib )","title":"(an.)rms_envelope_t60"},{"location":"libs/analyzers/#usage_13","text":"_ : rms_envelope_t60(period) : _ Where: period : (time to decay by 60 dB) sets the averaging frame in secs","title":"Usage"},{"location":"libs/analyzers/#anrms_envelope_t19","text":"Root mean square with one-pole lowpass and t19 response. (see filters.lib )","title":"(an.)rms_envelope_t19"},{"location":"libs/analyzers/#usage_14","text":"_ : rms_envelope_t19(period) : _ Where: period : (time to decay by 1/e^2.2) sets the averaging frame in secs","title":"Usage"},{"location":"libs/analyzers/#anzcr","text":"Zero-crossing rate (ZCR) with one-pole lowpass averaging based on the tau constant. It outputs an index between 0 and 1 at a desired analysis frame. The ZCR of a signal correlates with the noisiness [Gouyon et al. 2000] and the spectral centroid [Herrera-Boyer et al. 2006] of a signal. For sinusoidal signals, the ZCR can be multiplied by ma.SR/2 and used as a frequency detector. For example, it can be deployed as a computationally efficient adaptive mechanism for automatic Larsen suppression.","title":"(an.)zcr"},{"location":"libs/analyzers/#usage_15","text":"_ : zcr(tau) : _ Where: tau : (time to decay by e^-1) sets the averaging frame in seconds.","title":"Usage"},{"location":"libs/analyzers/#adaptive-frequency-analysis","text":"","title":"Adaptive Frequency Analysis"},{"location":"libs/analyzers/#anpitchtracker","text":"This function implements a pitch-tracking algorithm by means of zero-crossing rate analysis and adaptive low-pass filtering. The design is based on the algorithm described in this tutorial (section 2.2) .","title":"(an.)pitchTracker"},{"location":"libs/analyzers/#usage_16","text":"_ : pitchTracker(N, tau) : _ Where: N : a constant numerical expression, sets the order of the low-pass filter, which determines the sensitivity of the algorithm for signals where partials are stronger than the fundamental frequency. tau : response time in seconds based on exponentially-weighted averaging with tau time-constant. See https://ccrma.stanford.edu/~jos/st/Exponentials.html .","title":"Usage"},{"location":"libs/analyzers/#anspectralcentroid","text":"This function implements a time-domain spectral centroid by means of RMS measurements and adaptive crossover filtering. The weight difference of the upper and lower spectral powers are used to recursively adjust the crossover cutoff so that the system (minimally) oscillates around a balancing point. Unlike block processing techniques such as FFT, this algorithm provides continuous measurements and fast response times. Furthermore, when providing input signals that are spectrally sparse, the algorithm will output a logarithmic measure of the centroid, which is perceptually desirable for musical applications. For example, if the input signal is the combination of three tones at 1000, 2000, and 4000 Hz, the centroid will be the middle octave.","title":"(an.)spectralCentroid"},{"location":"libs/analyzers/#usage_17","text":"_ : spectralCentroid(nonlinearity, tau) : _ Where: nonlinearity : a boolean to activate or deactivate nonlinear integration. The nonlinear function is useful to improve stability with very short response times such as .001 <= tau <= .005 , otherwise, the nonlinearity may reduce precision. tau : response time in seconds based on exponentially-weighted averaging with tau time-constant. See https://ccrma.stanford.edu/~jos/st/Exponentials.html .","title":"Usage"},{"location":"libs/analyzers/#reference_1","text":"Sanfilippo, D. (2021). Time-Domain Adaptive Algorithms for Low- and High-Level Audio Information Processing. Computer Music Journal, 45(1), 24-38.","title":"Reference:"},{"location":"libs/analyzers/#example","text":"process = os.osc(500) + os.osc(1000) + os.osc(2000) + os.osc(4000) + os.osc(8000) : an.spectralCentroid(1, .001);","title":"Example:"},{"location":"libs/analyzers/#spectrum-analyzers","text":"Spectrum-analyzers split the input signal into a bank of parallel signals, one for each spectral band. They are related to the Mth-Octave Filter-Banks in filters.lib . The documentation of this library contains more details about the implementation. The parameters are: M : number of band-slices per octave (>1) N : total number of bands (>2) ftop = upper bandlimit of the Mth-octave bands ( 4 Where: l : list of elements (ba.)take Take an element from a list. take is a standard Faust function. Usage take(P,l) take(3,(10,20,30,40)) -> 30 Where: P : position (int, known at compile time, P > 0) l : list of elements (ba.)subseq Extract a part of a list. Usage subseq(l, P, N) subseq((10,20,30,40,50,60), 1, 3) -> (20,30,40) subseq((10,20,30,40,50,60), 4, 1) -> 50 Where: l : list P : start point (int, known at compile time, 0: begin of list) N : number of elements (int, known at compile time) Note: Faust doesn't have proper lists. Lists are simulated with parallel compositions and there is no empty list. Function tabulation The purpose of function tabulation is to speed up the computation of heavy functions over an interval, so that the computation at runtime can be faster than directly using the function. Two techniques are implemented: tabulate computes the function in a table and read the points using interpolation. tabulateNd is the N dimensions version of tabulate tabulate_chebychev uses Chebyshev polynomial approximation Comparison program example process = line(50000, r0, r1) <: FX-tb,FX-ch : par(i, 2, maxerr) with { C = 0; FX = sin; NX = 50; CD = 3; r0 = 0; r1 = ma.PI; tb(x) = ba.tabulate(C, FX, NX*(CD+1), r0, r1, x).cub; ch(x) = ba.tabulate_chebychev(C, FX, NX, CD, r0, r1, x); maxerr = abs : max ~ _; line(n, x0, x1) = x0 + (ba.time%n)/n * (x1-x0); }; (ba.)tabulate Tabulate a 1D function over the range [r0, r1] for access via nearest-value, linear, cubic interpolation. In other words, the uniformly tabulated function can be evaluated using interpolation of order 0 (none), 1 (linear), or 3 (cubic). Usage tabulate(C, FX, S, r0, r1, x).(val|lin|cub) : _ C : whether to dynamically force the x value to the range [r0, r1]: 1 forces the check, 0 deactivates it (constant numerical expression) FX : unary function Y=F(X) with one output (scalar function of one variable) S : size of the table in samples (constant numerical expression) r0 : minimum value of argument x r1 : maximum value of argument x tabulate(C, FX, S, r0, r1, x).val uses the value in the table closest to x tabulate(C, FX, S, r0, r1, x).lin evaluates at x using linear interpolation between the closest stored values tabulate(C, FX, S, r0, r1, x).cub evaluates at x using cubic interpolation between the closest stored values Example test program midikey2hz(mk) = ba.tabulate(1, ba.midikey2hz, 512, 0, 127, mk).lin; process = midikey2hz(ba.time), ba.midikey2hz(ba.time); (ba.)tabulate_chebychev Tabulate a 1D function over the range [r0, r1] for access via Chebyshev polynomial approximation. In contrast to (ba.)tabulate , which interpolates only between tabulated samples, (ba.)tabulate_chebychev stores coefficients of Chebyshev polynomials that are evaluated to provide better approximations in many cases. Two new arguments controlling this are NX, the number of segments into which [r0, r1] is divided, and CD, the maximum Chebyshev polynomial degree to use for each segment. A rdtable of size NX*(CD+1) is internally used. Note that processing r1 the last point in the interval is not safe. So either be sure the input stays in [r0, r1[ or use C = 1 . Usage _ : tabulate_chebychev(C, FX, NX, CD, r0, r1) : _ C : whether to dynamically force the value to the range [r0, r1]: 1 forces the check, 0 deactivates it (constant numerical expression) FX : unary function Y=F(X) with one output (scalar function of one variable) NX : number of segments for uniformly partitioning [r0, r1] (constant numerical expression) CD : maximum polynomial degree for each Chebyshev polynomial (constant numerical expression) r0 : minimum value of argument x r1 : maximum value of argument x Example test program midikey2hz_chebychev(mk) = ba.tabulate_chebychev(1, ba.midikey2hz, 100, 4, 0, 127, mk); process = midikey2hz_chebychev(ba.time), ba.midikey2hz(ba.time); (ba.)tabulateNd Tabulate an nD function for access via nearest-value or linear or cubic interpolation. In other words, the tabulated function can be evaluated using interpolation of order 0 (none), 1 (linear), or 3 (cubic). The table size and parameter range of each dimension can and must be separately specified. You can use it anywhere you have an expensive function with multiple parameters with known ranges. You could use it to build a wavetable synth, for example. The number of dimensions is deduced from the number of parameters you give, see below. Note that processing the last point in each interval is not safe. So either be sure the inputs stay in their respective ranges, or use C = 1 . Similarly for the first point when doing cubic interpolation. Usage tabulateNd(C, function, (parameters) ).(val|lin|cub) : _ C : whether to dynamically force the parameter values for each dimension to the ranges specified in parameters: 1 forces the check, 0 deactivates it (constant numerical expression) function : the function we want to tabulate. Can have any number of inputs, but needs to have just one output. (parameters) : sizes, ranges and read values. Note: these need to be in brackets, to make them one entity. If N is the number of dimensions, we need: N times S : number of values to store for this dimension (constant numerical expression) N times r0 : minimum value of this dimension N times r1 : maximum value of this dimension N times x : read value of this dimension By providing these parameters, you indirectly specify the number of dimensions; it's the number of parameters divided by 4. The user facing functions are: tabulateNd(C, function, S, parameters).val Uses the value in the table closest to x. tabulateNd(C, function, S, parameters).lin Evaluates at x using linear interpolation between the closest stored values. tabulateNd(C, function, S, parameters).cub Evaluates at x using cubic interpolation between the closest stored values. Example test program powSin(x,y) = sin(pow(x,y)); // The function we want to tabulate powSinTable(x,y) = ba.tabulateNd(1, powSin, (sizeX,sizeY, rx0,ry0, rx1,ry1, x,y) ).lin; sizeX = 512; // table size of the first parameter sizeY = 512; // table size of the second parameter rx0 = 2; // start of the range of the first parameter ry0 = 2; // start of the range of the second parameter rx1 = 10; // end of the range of the first parameter ry1 = 10; // end of the range of the second parameter x = hslider(\"x\", rx0, rx0, rx1, 0.001):si.smoo; y = hslider(\"y\", ry0, ry0, ry1, 0.001):si.smoo; process = powSinTable(x,y), powSin(x,y); Working principle The .val function just outputs the closest stored value. The .lin and .cub functions interpolate in N dimensions. Multi dimensional interpolation To understand what it means to interpolate in N dimensions, here's a quick reminder on the general principle of 2D linear interpolation: We have a grid of values, and we want to find the value at a point (x, y) within this grid. We first find the four closest points (A, B, C, D) in the grid surrounding the point (x, y). Then, we perform linear interpolation in the x-direction between points A and B, and between points C and D. This gives us two new points E and F. Finally, we perform linear interpolation in the y-direction between points E and F to get our value. To implement this in Faust, we need N sequential groups of interpolators, where N is the number of dimensions. Each group feeds into the next, with the last \"group\" being a single interpolator, and the group before it containing one interpolator for each input of the group it's feeding. Some examples: Our 2D linear example has two interpolators feeding into one. A 3D linear interpolator has four interpolators feeding into two, feeding into one. A 2D cubic interpolater has four interpolators feeding into one. A 3D cubic interpolator has sixteen interpolators feeding into four, feeding into one. To understand which values we need to look up, let's consider the 2D linear example again. The four values going into the first group represent the four closest points (A, B, C, D) mentioned above. 1) The first interpolator gets: The closest value that is stored (A) The next value in the x dimension, keeping y fixed (B) 2) The second interpolator gets: One step over in the y dimension, keeping x fixed (C) One step over in both the x dimension and the y dimension (D) The outputs of these two interpolators are points E and F. In other words: the interpolated x values and, respectively, the following y values: The closest stored value of the y dimension One step forward in the y dimension The last interpolator takes these two values and interpolates them in the y dimension. To generalize for N dimensions and linear interpolation: The first group has 2^(n-1) parallel interpolators interpolating in the first dimension. The second group has 2^(n-2) parallel interpolators interpolating in the second dimension. The process continues until the n-th group, which has a single interpolator interpolating in the n-th dimension. The same principle applies to the cubic interpolation in nD. The only difference is that there would be 4^(n-1) parallel interpolators in the first group, compared to 2^(n-1) for linear interpolation. This is what the mixers function does. Besides the values, each interpolator also needs to know the weight of each value in it's output. Let's call this d , like in ba.interpolate . It is the same for each group of interpolators, since it correlates to a dimension. It's value is calculated the similarly to ba.interpolate : First we prepare a \"float table read-index\" for that dimension ( id in ba.tabulate ) If the table only had that dimension and it could read a float index, what would it be. Then we int the float index to get the value we have stored that is closest to, but lower than the input value; the actual index for that dimension. Our d is the difference between the float index and the actual index. The ids function calculates the id for each dimension and inside the mixer function they get turned into d s. Storage method The elephant in the room is: how do we get these indexes? For that we need to know how the values are stored. We use one big table to store everything. To understand the concept, let's look at the 2D example again, and then we'll extend it to 3d and the general nD case. Let's say we have a 2D table with dimensions A and B where: A has 3 values between 0 and 5 and B has 4 values between 0 and 1. The 1D array representation of this 2D table will have a size of 3 * 4 = 12. The values are stored in the following way: First 3 values: A is 0, then 3, then 5 while B is at 0. Next 3 values: A changes from 0 to 5 while B is at 1/3. Next 3 values: A changes from 0 to 5 while B is at 2/3. Last 3 values: A changes from 0 to 5 while B is at 1. For the 3D example, let's extend the 2D example with an additional dimension C having 2 values between 0 and 2. The total size will be 3 * 4 * 2 = 24. The values are stored like so: First 3 values: A changes from 0 to 5, B is at 0, and C is at 0. Next 3 values: A changes from 0 to 5, B is at 1/3, and C is at 0. Next 3 values: A changes from 0 to 5, B is at 2/3, and C is at 0. Next 3 values: A changes from 0 to 5, B is at 1, and C is at 0. The last 12 values are the same as the first 12, but with C at 2. For the general n-dimensional case, we iterate through all dimensions, changing the values of the innermost dimension first, then moving towards the outer dimensions. Read indexes To get the float read index ( id ) corresponding to a particular dimension, we scale the function input value to be between 0 and 1, and multiply it by the size of that dimension minus one. To understand how we get the readIndex for .val , let's work trough how we'd do it in our 2D linear example. For simplicity's sake, the ranges of the inputs to our function are both 0 to 1. Say we wanted to read the value closest to x=0.5 and y=0 , so the id of x is 1 (the second value) and the id of y is 0 (first value). In this case, the read index is just the id of x , rounded to the nearest integer, just like in ba.tabulate . If we want to read the value belonging to x=0.5 and y=2/3 , things get more complicated. The id for y is now 2 , the third value. For each step in the y direction, we need to increase the index by 3 , the number of values that are stored for x . So the influence of the y is: the size of x times the rounded id of y . The final read index is the rounded id of x plus the influence of y . For the general nD case, we need to do the same operation N times, each feeding into the next. This operation is the riN function. We take four parameters: the size of the dimension before it prevSize , the index of the previous dimension prevIX , the current size sizeX and the current id idX . riN has 2 outputs, the size, for feeding into the next dimension's prevSize , and the read index feeding into the next dimension's prevIX . The size is the sizeX times prevSize . The read index is the rounded idX times prevSize added to the prevIX . Our final readIndex is the read index output of the last dimension. To get the read values for the interpolators need a pattern of offsets in each dimension, since we are looking for the read indexes surrounding the point of interest. These offsets are best explained by looking at the code of tabulate2d , the hardcoded 2D version: tabulate2d(C,function, sizeX,sizeY, rx0,ry0, rx1,ry1, x,y) = environment { size = sizeX*sizeY; // Maximum X index to access midX = sizeX-1; // Maximum Y index to access midY = sizeY-1; // Maximum total index to access mid = size-1; // Create the table wf = function(wfX,wfY); // Prepare the 'float' table read index for X idX = (x-rx0)/(rx1-rx0)*midX; // Prepare the 'float' table read index for Y idY = ((y-ry0)/(ry1-ry0))*midY; // table creation X: wfX = rx0+float(ba.time%sizeX)*(rx1-rx0) /float(midX); // table creation Y: wfY = ry0+ ((float(ba.time-(ba.time%sizeX)) /float(sizeX)) *(ry1-ry0)) /float(midY); // Limit the table read index in [0, mid] if C = 1 rid(x,mid, 0) = x; rid(x,mid, 1) = max(0, min(x, mid)); // Tabulate a binary 'FX' function on a range [rx0, rx1] [ry0, ry1] val(x,y) = rdtable(size, wf, readIndex); readIndex = rid( rid(int(idX+0.5),midX, C) +yOffset , mid, C); yOffset = sizeX*rid(int(idY),midY,C); // Tabulate a binary 'FX' function over the range [rx0, rx1] [ry0, ry1] with linear interpolation lin = it.interpolate_linear( dy , it.interpolate_linear(dx,v0,v1) , it.interpolate_linear(dx,v2,v3)) with { i0 = rid(int(idX), midX, C)+yOffset; i1 = i0+1; i2 = i0+sizeX; i3 = i1+sizeX; dx = idX-int(idX); dy = idY-int(idY); v0 = rdtable(size, wf, rid(i0, mid, C)); v1 = rdtable(size, wf, rid(i1, mid, C)); v2 = rdtable(size, wf, rid(i2, mid, C)); v3 = rdtable(size, wf, rid(i3, mid, C)); }; // Tabulate a binary 'FX' function over the range [rx0, rx1] [ry0, ry1] with cubic interpolation cub = it.interpolate_cubic( dy , it.interpolate_cubic(dx,v0,v1,v2,v3) , it.interpolate_cubic(dx,v4,v5,v6,v7) , it.interpolate_cubic(dx,v8,v9,v10,v11) , it.interpolate_cubic(dx,v12,v13,v14,v15) ) with { i0 = i4-sizeX; i1 = i5-sizeX; i2 = i6-sizeX; i3 = i7-sizeX; i4 = i5-1; i5 = rid(int(idX), midX, C)+yOffset; i6 = i5+1; i7 = i6+1; i8 = i4+sizeX; i9 = i5+sizeX; i10 = i6+sizeX; i11 = i7+sizeX; i12 = i4+(2*sizeX); i13 = i5+(2*sizeX); i14 = i6+(2*sizeX); i15 = i7+(2*sizeX); dx = idX-int(idX); dy = idY-int(idY); v0 = rdtable(size, wf, rid(i0 , mid, C)); v1 = rdtable(size, wf, rid(i1 , mid, C)); v2 = rdtable(size, wf, rid(i2 , mid, C)); v3 = rdtable(size, wf, rid(i3 , mid, C)); v4 = rdtable(size, wf, rid(i4 , mid, C)); v5 = rdtable(size, wf, rid(i5 , mid, C)); v6 = rdtable(size, wf, rid(i6 , mid, C)); v7 = rdtable(size, wf, rid(i7 , mid, C)); v8 = rdtable(size, wf, rid(i8 , mid, C)); v9 = rdtable(size, wf, rid(i9 , mid, C)); v10 = rdtable(size, wf, rid(i10, mid, C)); v11 = rdtable(size, wf, rid(i11, mid, C)); v12 = rdtable(size, wf, rid(i12, mid, C)); v13 = rdtable(size, wf, rid(i13, mid, C)); v14 = rdtable(size, wf, rid(i14, mid, C)); v15 = rdtable(size, wf, rid(i15, mid, C)); }; }; In the interest of brevity, we'll stop explaining here. If you have any more questions, feel free to open an issue on faustlibraries and tag @magnetophon. Selectors (Conditions) (ba.)if if-then-else implemented with a select2. WARNING: since select2 is strict (always evaluating both branches), the resulting if does not have the usual \"lazy\" semantic of the C if form, and thus cannot be used to protect against forbidden computations like division-by-zero for instance. Usage if(cond, then, else) : _ Where: cond : condition then : signal selected while cond is true else : signal selected while cond is false (ba.)ifNc if-then-elseif-then-...elsif-then-else implemented on top of ba.if . Usage ifNc((cond1,then1, cond2,then2, ... condN,thenN, else)) : _ or ifNc(Nc, cond1,then1, cond2,then2, ... condN,thenN, else) : _ or cond1,then1, cond2,then2, ... condN,thenN, else : ifNc(Nc) : _ Where: Nc : number of branches/conditions (constant numerical expression) condX : condition thenX : signal selected if condX is the 1st true condition else : signal selected if all the cond1-condN conditions are false Example test program process(x,y) = ifNc((xy,+1, 0)); or process(x,y) = ifNc(2, xy,+1, 0); or process(x,y) = xy,+1, 0 : ifNc(2); outputs -1 if xy , 0 otherwise. (ba.)ifNcNo ifNcNo(Nc,No) is similar to ifNc(Nc) above but then/else branches have No outputs. Usage ifNcNo(Nc,No, cond1,then1, cond2,then2, ... condN,thenN, else) : sig.bus(No) Where: Nc : number of branches/conditions (constant numerical expression) No : number of outputs (constant numerical expression) condX : condition thenX : list of No signals selected if condX is the 1st true condition else : list of No signals selected if all the cond1-condN conditions are false Example test program process(x) = ifNcNo(2,3, x<0, -1,-1,-1, x>0, 1,1,1, 0,0,0); outputs -1,-1,-1 if x<0 , 1,1,1 if x>0 , 0,0,0 otherwise. (ba.)selector Selects the ith input among n at compile time. Usage selector(I,N) _,_,_,_ : selector(2,4) : _ // selects the 3rd input among 4 Where: I : input to select (int, numbered from 0, known at compile time) N : number of inputs (int, known at compile time, N > I) There is also cselector for selecting among complex input signals of the form (real,imag). (ba.)select2stereo Select between 2 stereo signals. Usage _,_,_,_ : select2stereo(bpc) : _,_ Where: bpc : the selector switch (0/1) (ba.)selectn Selects the ith input among N at run time. Usage selectn(N,i) _,_,_,_ : selectn(4,2) : _ // selects the 3rd input among 4 Where: N : number of inputs (int, known at compile time, N > 0) i : input to select (int, numbered from 0) Example test program N = 64; process = par(n, N, (par(i,N,i) : selectn(N,n))); (ba.)selectmulti Selects the ith circuit among N at run time (all should have the same number of inputs and outputs) with a crossfade. Usage selectmulti(n,lgen,id) Where: n : crossfade in samples lgen : list of circuits id : circuit to select (int, numbered from 0) Example test program process = selectmulti(ma.SR/10, ((3,9),(2,8),(5,7)), nentry(\"choice\", 0, 0, 2, 1)); process = selectmulti(ma.SR/10, ((_*3,_*9),(_*2,_*8),(_*5,_*7)), nentry(\"choice\", 0, 0, 2, 1)); (ba.)selectoutn Route input to the output among N at run time. Usage _ : selectoutn(N, i) : si.bus(N) Where: N : number of outputs (int, known at compile time, N > 0) i : output number to route to (int, numbered from 0) (i.e. slider) Example test program process = 1 : selectoutn(3, sel) : par(i, 3, vbargraph(\"v.bargraph %i\", 0, 1)); sel = hslider(\"volume\", 0, 0, 2, 1) : int; Other (ba.)latch Latch input on positive-going transition of trig:\"records\" the input when trig switches from 0 to 1, outputs a frozen values everytime else. Usage _ : latch(trig) : _ Where: trig : hold trigger (0 for hold, 1 for bypass) (ba.)sAndH Sample And Hold: \"records\" the input when trig is 1, outputs a frozen value when trig is 0. sAndH is a standard Faust function. Usage _ : sAndH(trig) : _ Where: trig : hold trigger (0 for hold, 1 for bypass) (ba.)downSample Down sample a signal. WARNING: this function doesn't change the rate of a signal, it just holds samples... downSample is a standard Faust function. Usage _ : downSample(freq) : _ Where: freq : new rate in Hz (ba.)peakhold Outputs current max value above zero. Usage _ : peakhold(mode) : _ Where: mode means: 0 - Pass through. A single sample 0 trigger will work as a reset. 1 - Track and hold max value. (ba.)peakholder While peak-holder functions are scarcely discussed in the literature (please do send me an email if you know otherwise), common sense tells that the expected behaviour should be as follows: the absolute value of the input signal is compared with the output of the peak-holder; if the input is greater or equal to the output, a new peak is detected and sent to the output; otherwise, a timer starts and the current peak is held for N samples; once the timer is out and no new peaks have been detected, the absolute value of the current input becomes the new peak. Usage _ : peakholder(holdTime) : _ Where: holdTime : hold time in samples (ba.)impulsify Turns a signal into an impulse with the value of the current sample (0.3,0.2,0.1 becomes 0.3,0.0,0.0). This function is typically used with a button to turn its output into an impulse. impulsify is a standard Faust function. Usage button(\"gate\") : impulsify; (ba.)automat Record and replay in a loop the successives values of the input signal. Usage hslider(...) : automat(t, size, init) : _ Where: t : tempo in BPM size : number of items in the loop init : init value in the loop (ba.)bpf bpf is an environment (a group of related definitions) that can be used to create break-point functions. It contains three functions: start(x,y) to start a break-point function end(x,y) to end a break-point function point(x,y) to add intermediate points to a break-point function A minimal break-point function must contain at least a start and an end point: f = bpf.start(x0,y0) : bpf.end(x1,y1); A more involved break-point function can contains any number of intermediate points: f = bpf.start(x0,y0) : bpf.point(x1,y1) : bpf.point(x2,y2) : bpf.end(x3,y3); In any case the x_{i} must be in increasing order (for all i , x_{i} < x_{i+1} ). For example the following definition: f = bpf.start(x0,y0) : ... : bpf.point(xi,yi) : ... : bpf.end(xn,yn); implements a break-point function f such that: f(x) = y_{0} when x < x_{0} f(x) = y_{n} when x > x_{n} f(x) = y_{i} + (y_{i+1}-y_{i})*(x-x_{i})/(x_{i+1}-x_{i}) when x_{i} <= x and x < x_{i+1} bpf is a standard Faust function. (ba.)listInterp Linearly interpolates between the elements of a list. Usage index = 1.69; // range is 0-4 process = listInterp((800,400,350,450,325),index); Where: index : the index (float) to interpolate between the different values. The range of index depends on the size of the list. (ba.)bypass1 Takes a mono input signal, route it to e and bypass it if bpc = 1 . When bypassed, e is feed with zeros so that its state is cleanup up. bypass1 is a standard Faust function. Usage _ : bypass1(bpc,e) : _ Where: bpc : bypass switch (0/1) e : a mono effect (ba.)bypass2 Takes a stereo input signal, route it to e and bypass it if bpc = 1 . When bypassed, e is feed with zeros so that its state is cleanup up. bypass2 is a standard Faust function. Usage _,_ : bypass2(bpc,e) : _,_ Where: bpc : bypass switch (0/1) e : a stereo effect (ba.)bypass1to2 Bypass switch for effect e having mono input signal and stereo output. Effect e is bypassed if bpc = 1 .When bypassed, e is feed with zeros so that its state is cleanup up. bypass1to2 is a standard Faust function. Usage _ : bypass1to2(bpc,e) : _,_ Where: bpc : bypass switch (0/1) e : a mono-to-stereo effect (ba.)bypass_fade Bypass an arbitrary (N x N) circuit with 'n' samples crossfade. Inputs and outputs signals are faded out when 'e' is bypassed, so that 'e' state is cleanup up. Once bypassed the effect is replaced by par(i,N,_) . Bypassed circuits can be chained. Usage _ : bypass_fade(n,b,e) : _ or _,_ : bypass_fade(n,b,e) : _,_ n : number of samples for the crossfade b : bypass switch (0/1) e : N x N circuit Example test program process = bypass_fade(ma.SR/10, checkbox(\"bypass echo\"), echo); process = bypass_fade(ma.SR/10, checkbox(\"bypass reverb\"), freeverb); (ba.)toggle Triggered by the change of 0 to 1, it toggles the output value between 0 and 1. Usage _ : toggle : _ Example test program button(\"toggle\") : toggle : vbargraph(\"output\", 0, 1) (an.amp_follower(0.1) > 0.01) : toggle : vbargraph(\"output\", 0, 1) // takes audio input (ba.)on_and_off The first channel set the output to 1, the second channel to 0. Usage _,_ : on_and_off : _ Example test program button(\"on\"), button(\"off\") : on_and_off : vbargraph(\"output\", 0, 1) (ba.)bitcrusher Produce distortion by reduction of the signal resolution. Usage _ : bitcrusher(nbits) : _ Where: nbits : the number of bits of the wanted resolution Sliding Reduce Provides various operations on the last n samples using a high order slidingReduce(op,n,maxN,disabledVal,x) fold-like function: slidingSum(n) : the sliding sum of the last n input samples, CPU-light slidingSump(n,maxN) : the sliding sum of the last n input samples, numerically stable \"forever\" slidingMax(n,maxN) : the sliding max of the last n input samples slidingMin(n,maxN) : the sliding min of the last n input samples slidingMean(n) : the sliding mean of the last n input samples, CPU-light slidingMeanp(n,maxN) : the sliding mean of the last n input samples, numerically stable \"forever\" slidingRMS(n) : the sliding RMS of the last n input samples, CPU-light slidingRMSp(n,maxN) : the sliding RMS of the last n input samples, numerically stable \"forever\" Working Principle If we want the maximum of the last 8 values, we can do that as: simpleMax(x) = ( ( max(x@0,x@1), max(x@2,x@3) ) :max ), ( ( max(x@4,x@5), max(x@6,x@7) ) :max ) :max; max(x@2,x@3) is the same as max(x@0,x@1)@2 but the latter re-uses a value we already computed,so is more efficient. Using the same trick for values 4 trough 7, we can write: efficientMax(x)= ( ( max(x@0,x@1), max(x@0,x@1)@2 ) :max ), ( ( max(x@0,x@1), max(x@0,x@1)@2 ) :max@4 ) :max; We can rewrite it recursively, so it becomes possible to get the maximum at have any number of values, as long as it's a power of 2. recursiveMax = case { (1,x) => x; (N,x) => max(recursiveMax(N/2,x), recursiveMax(N/2,x)@(N/2)); }; What if we want to look at a number of values that's not a power of 2? For each value, we will have to decide whether to use it or not. If n is bigger than the index of the value, we use it, otherwise we replace it with ( 0-(ma.MAX) ): variableMax(n,x) = max( max( ( (x@0 : useVal(0)), (x@1 : useVal(1)) ):max, ( (x@2 : useVal(2)), (x@3 : useVal(3)) ):max ), max( ( (x@4 : useVal(4)), (x@5 : useVal(5)) ):max, ( (x@6 : useVal(6)), (x@7 : useVal(7)) ):max ) ) with { useVal(i) = select2((n>=i) , (0-(ma.MAX)),_); }; Now it becomes impossible to re-use any values. To fix that let's first look at how we'd implement it using recursiveMax, but with a fixed n that is not a power of 2. For example, this is how you'd do it with n=3 : binaryMaxThree(x) = ( recursiveMax(1,x)@0, // the first x recursiveMax(2,x)@1 // the second and third x ):max; n=6 binaryMaxSix(x) = ( recursiveMax(2,x)@0, // first two recursiveMax(4,x)@2 // third trough sixth ):max; Note that recursiveMax(2,x) is used at a different delay then in binaryMaxThree , since it represents 1 and 2, not 2 and 3. Each block is delayed the combined size of the previous blocks. n=7 binaryMaxSeven(x) = ( ( recursiveMax(1,x)@0, // first x recursiveMax(2,x)@1 // second and third ):max, ( recursiveMax(4,x)@3 // fourth trough seventh ) ):max; To make a variable version, we need to know which powers of two are used, and at which delay time. Then it becomes a matter of: lining up all the different block sizes in parallel: sequentialOperatorParOut() delaying each the appropriate amount: sumOfPrevBlockSizes() turning it on or off: useVal() getting the maximum of all of them: parallelOp() In Faust, we can only do that for a fixed maximum number of values: maxN , known at compile time. (ba.)slidingReduce Fold-like high order function. Apply a commutative binary operation op to the last n consecutive samples of a signal x . For example : slidingReduce(max,128,128,0-(ma.MAX)) will compute the maximum of the last 128 samples. The output is updated each sample, unlike reduce, where the output is constant for the duration of a block. Usage _ : slidingReduce(op,n,maxN,disabledVal) : _ Where: n : the number of values to process maxN : the maximum number of values to process (int, known at compile time, maxN > 0) op : the operator. Needs to be a commutative one. disabledVal : the value to use when we want to ignore a value. In other words, op(x,disabledVal) should equal to x . For example, +(x,0) equals x and min(x,ma.MAX) equals x . So if we want to calculate the sum, we need to give 0 as disabledVal , and if we want the minimum, we need to give ma.MAX as disabledVal . (ba.)slidingSum The sliding sum of the last n input samples. It will eventually run into numerical trouble when there is a persistent dc component. If that matters in your application, use the more CPU-intensive ba.slidingSump . Usage _ : slidingSum(n) : _ Where: n : the number of values to process (ba.)slidingSump The sliding sum of the last n input samples. It uses a lot more CPU than ba.slidingSum , but is numerically stable \"forever\" in return. Usage _ : slidingSump(n,maxN) : _ Where: n : the number of values to process maxN : the maximum number of values to process (int, known at compile time, maxN > 0) (ba.)slidingMax The sliding maximum of the last n input samples. Usage _ : slidingMax(n,maxN) : _ Where: n : the number of values to process maxN : the maximum number of values to process (int, known at compile time, maxN > 0) (ba.)slidingMin The sliding minimum of the last n input samples. Usage _ : slidingMin(n,maxN) : _ Where: n : the number of values to process maxN : the maximum number of values to process (int, known at compile time, maxN > 0) (ba.)slidingMean The sliding mean of the last n input samples. It will eventually run into numerical trouble when there is a persistent dc component. If that matters in your application, use the more CPU-intensive ba.slidingMeanp . Usage _ : slidingMean(n) : _ Where: n : the number of values to process (ba.)slidingMeanp The sliding mean of the last n input samples. It uses a lot more CPU than ba.slidingMean , but is numerically stable \"forever\" in return. Usage _ : slidingMeanp(n,maxN) : _ Where: n : the number of values to process maxN : the maximum number of values to process (int, known at compile time, maxN > 0) (ba.)slidingRMS The root mean square of the last n input samples. It will eventually run into numerical trouble when there is a persistent dc component. If that matters in your application, use the more CPU-intensive ba.slidingRMSp . Usage _ : slidingRMS(n) : _ Where: n : the number of values to process (ba.)slidingRMSp The root mean square of the last n input samples. It uses a lot more CPU than ba.slidingRMS , but is numerically stable \"forever\" in return. Usage _ : slidingRMSp(n,maxN) : _ Where: n : the number of values to process maxN : the maximum number of values to process (int, known at compile time, maxN > 0) Parallel Operators Provides various operations on N parallel inputs using a high order parallelOp(op,N,x) function: parallelMax(N) : the max of n parallel inputs parallelMin(N) : the min of n parallel inputs parallelMean(N) : the mean of n parallel inputs parallelRMS(N) : the RMS of n parallel inputs (ba.)parallelOp Apply a commutative binary operation op to N parallel inputs. usage si.bus(N) : parallelOp(op,N) : _ where: N : the number of parallel inputs known at compile time op : the operator which needs to be commutative (ba.)parallelMax The maximum of N parallel inputs. Usage si.bus(N) : parallelMax(N) : _ Where: N : the number of parallel inputs known at compile time (ba.)parallelMin The minimum of N parallel inputs. Usage si.bus(N) : parallelMin(N) : _ Where: N : the number of parallel inputs known at compile time (ba.)parallelMean The mean of N parallel inputs. Usage si.bus(N) : parallelMean(N) : _ Where: N : the number of parallel inputs known at compile time (ba.)parallelRMS The RMS of N parallel inputs. Usage si.bus(N) : parallelRMS(N) : _ Where: N : the number of parallel inputs known at compile time","title":" basics "},{"location":"libs/basics/#basicslib","text":"A library of basic elements. Its official prefix is ba .","title":"basics.lib"},{"location":"libs/basics/#references","text":"https://github.com/grame-cncm/faustlibraries/blob/master/basics.lib","title":"References"},{"location":"libs/basics/#conversion-tools","text":"","title":"Conversion Tools"},{"location":"libs/basics/#basamp2sec","text":"Converts a number of samples to a duration in seconds at the current sampling rate (see ma.SR ). samp2sec is a standard Faust function.","title":"(ba.)samp2sec"},{"location":"libs/basics/#usage","text":"samp2sec(n) : _ Where: n : number of samples","title":"Usage"},{"location":"libs/basics/#basec2samp","text":"Converts a duration in seconds to a number of samples at the current sampling rate (see ma.SR ). samp2sec is a standard Faust function.","title":"(ba.)sec2samp"},{"location":"libs/basics/#usage_1","text":"sec2samp(d) : _ Where: d : duration in seconds","title":"Usage"},{"location":"libs/basics/#badb2linear","text":"dB-to-linear value converter. It can be used to convert an amplitude in dB to a linear gain ]0-N]. db2linear is a standard Faust function.","title":"(ba.)db2linear"},{"location":"libs/basics/#usage_2","text":"db2linear(l) : _ Where: l : amplitude in dB","title":"Usage"},{"location":"libs/basics/#balinear2db","text":"linea-to-dB value converter. It can be used to convert a linear gain ]0-N] to an amplitude in dB. linear2db is a standard Faust function.","title":"(ba.)linear2db"},{"location":"libs/basics/#usage_3","text":"linear2db(g) : _ Where: g : a linear gain","title":"Usage"},{"location":"libs/basics/#balin2loggain","text":"Converts a linear gain (0-1) to a log gain (0-1).","title":"(ba.)lin2LogGain"},{"location":"libs/basics/#usage_4","text":"lin2LogGain(n) : _ Where: n : the linear gain","title":"Usage"},{"location":"libs/basics/#balog2lingain","text":"Converts a log gain (0-1) to a linear gain (0-1).","title":"(ba.)log2LinGain"},{"location":"libs/basics/#usage_5","text":"log2LinGain(n) : _ Where: n : the log gain","title":"Usage"},{"location":"libs/basics/#batau2pole","text":"Returns a real pole giving exponential decay. Note that t60 (time to decay 60 dB) is ~6.91 time constants. tau2pole is a standard Faust function.","title":"(ba.)tau2pole"},{"location":"libs/basics/#usage_6","text":"_ : smooth(tau2pole(tau)) : _ Where: tau : time-constant in seconds","title":"Usage"},{"location":"libs/basics/#bapole2tau","text":"Returns the time-constant, in seconds, corresponding to the given real, positive pole in (0-1). pole2tau is a standard Faust function.","title":"(ba.)pole2tau"},{"location":"libs/basics/#usage_7","text":"pole2tau(pole) : _ Where: pole : the pole","title":"Usage"},{"location":"libs/basics/#bamidikey2hz","text":"Converts a MIDI key number to a frequency in Hz (MIDI key 69 = A440). midikey2hz is a standard Faust function.","title":"(ba.)midikey2hz"},{"location":"libs/basics/#usage_8","text":"midikey2hz(mk) : _ Where: mk : the MIDI key number","title":"Usage"},{"location":"libs/basics/#bahz2midikey","text":"Converts a frequency in Hz to a MIDI key number (MIDI key 69 = A440). hz2midikey is a standard Faust function.","title":"(ba.)hz2midikey"},{"location":"libs/basics/#usage_9","text":"hz2midikey(freq) : _ Where: freq : frequency in Hz","title":"Usage"},{"location":"libs/basics/#basemi2ratio","text":"Converts semitones in a frequency multiplicative ratio. semi2ratio is a standard Faust function.","title":"(ba.)semi2ratio"},{"location":"libs/basics/#usage_10","text":"semi2ratio(semi) : _ Where: semi : number of semitone","title":"Usage"},{"location":"libs/basics/#baratio2semi","text":"Converts a frequency multiplicative ratio in semitones. ratio2semi is a standard Faust function.","title":"(ba.)ratio2semi"},{"location":"libs/basics/#usage_11","text":"ratio2semi(ratio) : _ Where: ratio : frequency multiplicative ratio","title":"Usage"},{"location":"libs/basics/#bacent2ratio","text":"Converts cents in a frequency multiplicative ratio.","title":"(ba.)cent2ratio"},{"location":"libs/basics/#usage_12","text":"cent2ratio(cent) : _ Where: cent : number of cents","title":"Usage"},{"location":"libs/basics/#baratio2cent","text":"Converts a frequency multiplicative ratio in cents.","title":"(ba.)ratio2cent"},{"location":"libs/basics/#usage_13","text":"ratio2cent(ratio) : _ Where: ratio : frequency multiplicative ratio","title":"Usage"},{"location":"libs/basics/#bapianokey2hz","text":"Converts a piano key number to a frequency in Hz (piano key 49 = A440).","title":"(ba.)pianokey2hz"},{"location":"libs/basics/#usage_14","text":"pianokey2hz(pk) : _ Where: pk : the piano key number","title":"Usage"},{"location":"libs/basics/#bahz2pianokey","text":"Converts a frequency in Hz to a piano key number (piano key 49 = A440).","title":"(ba.)hz2pianokey"},{"location":"libs/basics/#usage_15","text":"hz2pianokey(freq) : _ Where: freq : frequency in Hz","title":"Usage"},{"location":"libs/basics/#counters-and-timetempo-tools","text":"","title":"Counters and Time/Tempo Tools"},{"location":"libs/basics/#bacounter","text":"Starts counting 0, 1, 2, 3..., and raise the current integer value at each upfront of the trigger.","title":"(ba.)counter"},{"location":"libs/basics/#usage_16","text":"counter(trig) : _ Where: trig : the trigger signal, each upfront will move the counter to the next integer","title":"Usage"},{"location":"libs/basics/#bacountdown","text":"Starts counting down from n included to 0. While trig is 1 the output is n. The countdown starts with the transition of trig from 1 to 0. At the end of the countdown the output value will remain at 0 until the next trig. countdown is a standard Faust function.","title":"(ba.)countdown"},{"location":"libs/basics/#usage_17","text":"countdown(n,trig) : _ Where: n : the starting point of the countdown trig : the trigger signal (1: start at n ; 0: decrease until 0)","title":"Usage"},{"location":"libs/basics/#bacountup","text":"Starts counting up from 0 to n included. While trig is 1 the output is 0. The countup starts with the transition of trig from 1 to 0. At the end of the countup the output value will remain at n until the next trig. countup is a standard Faust function.","title":"(ba.)countup"},{"location":"libs/basics/#usage_18","text":"countup(n,trig) : _ Where: n : the maximum count value trig : the trigger signal (1: start at 0; 0: increase until n )","title":"Usage"},{"location":"libs/basics/#basweep","text":"Counts from 0 to period-1 repeatedly, generating a sawtooth waveform, like os.lf_rawsaw , starting at 1 when run transitions from 0 to 1. Outputs zero while run is 0.","title":"(ba.)sweep"},{"location":"libs/basics/#usage_19","text":"sweep(period,run) : _","title":"Usage"},{"location":"libs/basics/#batime","text":"A simple timer that counts every samples from the beginning of the process. time is a standard Faust function.","title":"(ba.)time"},{"location":"libs/basics/#usage_20","text":"time : _","title":"Usage"},{"location":"libs/basics/#baramp","text":"A linear ramp with a slope of '(+/-)1/n' samples to reach the next target value.","title":"(ba.)ramp"},{"location":"libs/basics/#usage_21","text":"_ : ramp(n) : _ Where: n : number of samples to increment/decrement the value by one","title":"Usage"},{"location":"libs/basics/#baline","text":"A ramp interpolator that generates a linear transition to reach a target value: the interpolation process restarts each time a new and distinct input value is received it utilizes 'n' samples to achieve the transition to the target value after reaching the target value, the output value is maintained.","title":"(ba.)line"},{"location":"libs/basics/#usage_22","text":"_ : line(n) : _ Where: n : number of samples to reach the new target received at its input","title":"Usage"},{"location":"libs/basics/#batempo","text":"Converts a tempo in BPM into a number of samples.","title":"(ba.)tempo"},{"location":"libs/basics/#usage_23","text":"tempo(t) : _ Where: t : tempo in BPM","title":"Usage"},{"location":"libs/basics/#baperiod","text":"Basic sawtooth wave of period p .","title":"(ba.)period"},{"location":"libs/basics/#usage_24","text":"period(p) : _ Where: p : period as a number of samples","title":"Usage"},{"location":"libs/basics/#bapulse","text":"Pulses (like 10000) generated at period p .","title":"(ba.)pulse"},{"location":"libs/basics/#usage_25","text":"pulse(p) : _ Where: p : period as a number of samples","title":"Usage"},{"location":"libs/basics/#bapulsen","text":"Pulses (like 11110000) of length n generated at period p .","title":"(ba.)pulsen"},{"location":"libs/basics/#usage_26","text":"pulsen(n,p) : _ Where: n : pulse length as a number of samples p : period as a number of samples","title":"Usage"},{"location":"libs/basics/#bacycle","text":"Split nonzero input values into n cycles.","title":"(ba.)cycle"},{"location":"libs/basics/#usage_27","text":"_ : cycle(n) : si.bus(n) Where: n : the number of cycles/output signals","title":"Usage"},{"location":"libs/basics/#babeat","text":"Pulses at tempo t . beat is a standard Faust function.","title":"(ba.)beat"},{"location":"libs/basics/#usage_28","text":"beat(t) : _ Where: t : tempo in BPM","title":"Usage"},{"location":"libs/basics/#bapulse_countup","text":"Starts counting up pulses. While trig is 1 the output is counting up, while trig is 0 the counter is reset to 0.","title":"(ba.)pulse_countup"},{"location":"libs/basics/#usage_29","text":"_ : pulse_countup(trig) : _ Where: trig : the trigger signal (1: start at next pulse; 0: reset to 0)","title":"Usage"},{"location":"libs/basics/#bapulse_countdown","text":"Starts counting down pulses. While trig is 1 the output is counting down, while trig is 0 the counter is reset to 0.","title":"(ba.)pulse_countdown"},{"location":"libs/basics/#usage_30","text":"_ : pulse_countdown(trig) : _ Where: trig : the trigger signal (1: start at next pulse; 0: reset to 0)","title":"Usage"},{"location":"libs/basics/#bapulse_countup_loop","text":"Starts counting up pulses from 0 to n included. While trig is 1 the output is counting up, while trig is 0 the counter is reset to 0. At the end of the countup (n) the output value will be reset to 0.","title":"(ba.)pulse_countup_loop"},{"location":"libs/basics/#usage_31","text":"_ : pulse_countup_loop(n,trig) : _ Where: n : the highest number of the countup (included) before reset to 0 trig : the trigger signal (1: start at next pulse; 0: reset to 0)","title":"Usage"},{"location":"libs/basics/#bapulse_countdown_loop","text":"Starts counting down pulses from 0 to n included. While trig is 1 the output is counting down, while trig is 0 the counter is reset to 0. At the end of the countdown (n) the output value will be reset to 0.","title":"(ba.)pulse_countdown_loop"},{"location":"libs/basics/#usage_32","text":"_ : pulse_countdown_loop(n,trig) : _ Where: n : the highest number of the countup (included) before reset to 0 trig : the trigger signal (1: start at next pulse; 0: reset to 0)","title":"Usage"},{"location":"libs/basics/#baresetctr","text":"Function that lets through the mth impulse out of each consecutive group of n impulses.","title":"(ba.)resetCtr"},{"location":"libs/basics/#usage_33","text":"_ : resetCtr(n,m) : _ Where: n : the total number of impulses being split m : index of impulse to allow to be output","title":"Usage"},{"location":"libs/basics/#array-processingpattern-matching","text":"","title":"Array Processing/Pattern Matching"},{"location":"libs/basics/#bacount","text":"Count the number of elements of list l. count is a standard Faust function.","title":"(ba.)count"},{"location":"libs/basics/#usage_34","text":"count(l) count((10,20,30,40)) -> 4 Where: l : list of elements","title":"Usage"},{"location":"libs/basics/#batake","text":"Take an element from a list. take is a standard Faust function.","title":"(ba.)take"},{"location":"libs/basics/#usage_35","text":"take(P,l) take(3,(10,20,30,40)) -> 30 Where: P : position (int, known at compile time, P > 0) l : list of elements","title":"Usage"},{"location":"libs/basics/#basubseq","text":"Extract a part of a list.","title":"(ba.)subseq"},{"location":"libs/basics/#usage_36","text":"subseq(l, P, N) subseq((10,20,30,40,50,60), 1, 3) -> (20,30,40) subseq((10,20,30,40,50,60), 4, 1) -> 50 Where: l : list P : start point (int, known at compile time, 0: begin of list) N : number of elements (int, known at compile time)","title":"Usage"},{"location":"libs/basics/#note","text":"Faust doesn't have proper lists. Lists are simulated with parallel compositions and there is no empty list.","title":"Note:"},{"location":"libs/basics/#function-tabulation","text":"The purpose of function tabulation is to speed up the computation of heavy functions over an interval, so that the computation at runtime can be faster than directly using the function. Two techniques are implemented: tabulate computes the function in a table and read the points using interpolation. tabulateNd is the N dimensions version of tabulate tabulate_chebychev uses Chebyshev polynomial approximation","title":"Function tabulation"},{"location":"libs/basics/#comparison-program-example","text":"process = line(50000, r0, r1) <: FX-tb,FX-ch : par(i, 2, maxerr) with { C = 0; FX = sin; NX = 50; CD = 3; r0 = 0; r1 = ma.PI; tb(x) = ba.tabulate(C, FX, NX*(CD+1), r0, r1, x).cub; ch(x) = ba.tabulate_chebychev(C, FX, NX, CD, r0, r1, x); maxerr = abs : max ~ _; line(n, x0, x1) = x0 + (ba.time%n)/n * (x1-x0); };","title":"Comparison program example"},{"location":"libs/basics/#batabulate","text":"Tabulate a 1D function over the range [r0, r1] for access via nearest-value, linear, cubic interpolation. In other words, the uniformly tabulated function can be evaluated using interpolation of order 0 (none), 1 (linear), or 3 (cubic).","title":"(ba.)tabulate"},{"location":"libs/basics/#usage_37","text":"tabulate(C, FX, S, r0, r1, x).(val|lin|cub) : _ C : whether to dynamically force the x value to the range [r0, r1]: 1 forces the check, 0 deactivates it (constant numerical expression) FX : unary function Y=F(X) with one output (scalar function of one variable) S : size of the table in samples (constant numerical expression) r0 : minimum value of argument x r1 : maximum value of argument x tabulate(C, FX, S, r0, r1, x).val uses the value in the table closest to x tabulate(C, FX, S, r0, r1, x).lin evaluates at x using linear interpolation between the closest stored values tabulate(C, FX, S, r0, r1, x).cub evaluates at x using cubic interpolation between the closest stored values","title":"Usage"},{"location":"libs/basics/#example-test-program","text":"midikey2hz(mk) = ba.tabulate(1, ba.midikey2hz, 512, 0, 127, mk).lin; process = midikey2hz(ba.time), ba.midikey2hz(ba.time);","title":"Example test program"},{"location":"libs/basics/#batabulate_chebychev","text":"Tabulate a 1D function over the range [r0, r1] for access via Chebyshev polynomial approximation. In contrast to (ba.)tabulate , which interpolates only between tabulated samples, (ba.)tabulate_chebychev stores coefficients of Chebyshev polynomials that are evaluated to provide better approximations in many cases. Two new arguments controlling this are NX, the number of segments into which [r0, r1] is divided, and CD, the maximum Chebyshev polynomial degree to use for each segment. A rdtable of size NX*(CD+1) is internally used. Note that processing r1 the last point in the interval is not safe. So either be sure the input stays in [r0, r1[ or use C = 1 .","title":"(ba.)tabulate_chebychev"},{"location":"libs/basics/#usage_38","text":"_ : tabulate_chebychev(C, FX, NX, CD, r0, r1) : _ C : whether to dynamically force the value to the range [r0, r1]: 1 forces the check, 0 deactivates it (constant numerical expression) FX : unary function Y=F(X) with one output (scalar function of one variable) NX : number of segments for uniformly partitioning [r0, r1] (constant numerical expression) CD : maximum polynomial degree for each Chebyshev polynomial (constant numerical expression) r0 : minimum value of argument x r1 : maximum value of argument x","title":"Usage"},{"location":"libs/basics/#example-test-program_1","text":"midikey2hz_chebychev(mk) = ba.tabulate_chebychev(1, ba.midikey2hz, 100, 4, 0, 127, mk); process = midikey2hz_chebychev(ba.time), ba.midikey2hz(ba.time);","title":"Example test program"},{"location":"libs/basics/#batabulatend","text":"Tabulate an nD function for access via nearest-value or linear or cubic interpolation. In other words, the tabulated function can be evaluated using interpolation of order 0 (none), 1 (linear), or 3 (cubic). The table size and parameter range of each dimension can and must be separately specified. You can use it anywhere you have an expensive function with multiple parameters with known ranges. You could use it to build a wavetable synth, for example. The number of dimensions is deduced from the number of parameters you give, see below. Note that processing the last point in each interval is not safe. So either be sure the inputs stay in their respective ranges, or use C = 1 . Similarly for the first point when doing cubic interpolation.","title":"(ba.)tabulateNd"},{"location":"libs/basics/#usage_39","text":"tabulateNd(C, function, (parameters) ).(val|lin|cub) : _ C : whether to dynamically force the parameter values for each dimension to the ranges specified in parameters: 1 forces the check, 0 deactivates it (constant numerical expression) function : the function we want to tabulate. Can have any number of inputs, but needs to have just one output. (parameters) : sizes, ranges and read values. Note: these need to be in brackets, to make them one entity. If N is the number of dimensions, we need: N times S : number of values to store for this dimension (constant numerical expression) N times r0 : minimum value of this dimension N times r1 : maximum value of this dimension N times x : read value of this dimension By providing these parameters, you indirectly specify the number of dimensions; it's the number of parameters divided by 4. The user facing functions are: tabulateNd(C, function, S, parameters).val Uses the value in the table closest to x. tabulateNd(C, function, S, parameters).lin Evaluates at x using linear interpolation between the closest stored values. tabulateNd(C, function, S, parameters).cub Evaluates at x using cubic interpolation between the closest stored values.","title":"Usage"},{"location":"libs/basics/#example-test-program_2","text":"powSin(x,y) = sin(pow(x,y)); // The function we want to tabulate powSinTable(x,y) = ba.tabulateNd(1, powSin, (sizeX,sizeY, rx0,ry0, rx1,ry1, x,y) ).lin; sizeX = 512; // table size of the first parameter sizeY = 512; // table size of the second parameter rx0 = 2; // start of the range of the first parameter ry0 = 2; // start of the range of the second parameter rx1 = 10; // end of the range of the first parameter ry1 = 10; // end of the range of the second parameter x = hslider(\"x\", rx0, rx0, rx1, 0.001):si.smoo; y = hslider(\"y\", ry0, ry0, ry1, 0.001):si.smoo; process = powSinTable(x,y), powSin(x,y);","title":"Example test program"},{"location":"libs/basics/#working-principle","text":"The .val function just outputs the closest stored value. The .lin and .cub functions interpolate in N dimensions.","title":"Working principle"},{"location":"libs/basics/#multi-dimensional-interpolation","text":"To understand what it means to interpolate in N dimensions, here's a quick reminder on the general principle of 2D linear interpolation: We have a grid of values, and we want to find the value at a point (x, y) within this grid. We first find the four closest points (A, B, C, D) in the grid surrounding the point (x, y). Then, we perform linear interpolation in the x-direction between points A and B, and between points C and D. This gives us two new points E and F. Finally, we perform linear interpolation in the y-direction between points E and F to get our value. To implement this in Faust, we need N sequential groups of interpolators, where N is the number of dimensions. Each group feeds into the next, with the last \"group\" being a single interpolator, and the group before it containing one interpolator for each input of the group it's feeding. Some examples: Our 2D linear example has two interpolators feeding into one. A 3D linear interpolator has four interpolators feeding into two, feeding into one. A 2D cubic interpolater has four interpolators feeding into one. A 3D cubic interpolator has sixteen interpolators feeding into four, feeding into one. To understand which values we need to look up, let's consider the 2D linear example again. The four values going into the first group represent the four closest points (A, B, C, D) mentioned above. 1) The first interpolator gets: The closest value that is stored (A) The next value in the x dimension, keeping y fixed (B) 2) The second interpolator gets: One step over in the y dimension, keeping x fixed (C) One step over in both the x dimension and the y dimension (D) The outputs of these two interpolators are points E and F. In other words: the interpolated x values and, respectively, the following y values: The closest stored value of the y dimension One step forward in the y dimension The last interpolator takes these two values and interpolates them in the y dimension. To generalize for N dimensions and linear interpolation: The first group has 2^(n-1) parallel interpolators interpolating in the first dimension. The second group has 2^(n-2) parallel interpolators interpolating in the second dimension. The process continues until the n-th group, which has a single interpolator interpolating in the n-th dimension. The same principle applies to the cubic interpolation in nD. The only difference is that there would be 4^(n-1) parallel interpolators in the first group, compared to 2^(n-1) for linear interpolation. This is what the mixers function does. Besides the values, each interpolator also needs to know the weight of each value in it's output. Let's call this d , like in ba.interpolate . It is the same for each group of interpolators, since it correlates to a dimension. It's value is calculated the similarly to ba.interpolate : First we prepare a \"float table read-index\" for that dimension ( id in ba.tabulate ) If the table only had that dimension and it could read a float index, what would it be. Then we int the float index to get the value we have stored that is closest to, but lower than the input value; the actual index for that dimension. Our d is the difference between the float index and the actual index. The ids function calculates the id for each dimension and inside the mixer function they get turned into d s.","title":"Multi dimensional interpolation"},{"location":"libs/basics/#storage-method","text":"The elephant in the room is: how do we get these indexes? For that we need to know how the values are stored. We use one big table to store everything. To understand the concept, let's look at the 2D example again, and then we'll extend it to 3d and the general nD case. Let's say we have a 2D table with dimensions A and B where: A has 3 values between 0 and 5 and B has 4 values between 0 and 1. The 1D array representation of this 2D table will have a size of 3 * 4 = 12. The values are stored in the following way: First 3 values: A is 0, then 3, then 5 while B is at 0. Next 3 values: A changes from 0 to 5 while B is at 1/3. Next 3 values: A changes from 0 to 5 while B is at 2/3. Last 3 values: A changes from 0 to 5 while B is at 1. For the 3D example, let's extend the 2D example with an additional dimension C having 2 values between 0 and 2. The total size will be 3 * 4 * 2 = 24. The values are stored like so: First 3 values: A changes from 0 to 5, B is at 0, and C is at 0. Next 3 values: A changes from 0 to 5, B is at 1/3, and C is at 0. Next 3 values: A changes from 0 to 5, B is at 2/3, and C is at 0. Next 3 values: A changes from 0 to 5, B is at 1, and C is at 0. The last 12 values are the same as the first 12, but with C at 2. For the general n-dimensional case, we iterate through all dimensions, changing the values of the innermost dimension first, then moving towards the outer dimensions.","title":"Storage method"},{"location":"libs/basics/#read-indexes","text":"To get the float read index ( id ) corresponding to a particular dimension, we scale the function input value to be between 0 and 1, and multiply it by the size of that dimension minus one. To understand how we get the readIndex for .val , let's work trough how we'd do it in our 2D linear example. For simplicity's sake, the ranges of the inputs to our function are both 0 to 1. Say we wanted to read the value closest to x=0.5 and y=0 , so the id of x is 1 (the second value) and the id of y is 0 (first value). In this case, the read index is just the id of x , rounded to the nearest integer, just like in ba.tabulate . If we want to read the value belonging to x=0.5 and y=2/3 , things get more complicated. The id for y is now 2 , the third value. For each step in the y direction, we need to increase the index by 3 , the number of values that are stored for x . So the influence of the y is: the size of x times the rounded id of y . The final read index is the rounded id of x plus the influence of y . For the general nD case, we need to do the same operation N times, each feeding into the next. This operation is the riN function. We take four parameters: the size of the dimension before it prevSize , the index of the previous dimension prevIX , the current size sizeX and the current id idX . riN has 2 outputs, the size, for feeding into the next dimension's prevSize , and the read index feeding into the next dimension's prevIX . The size is the sizeX times prevSize . The read index is the rounded idX times prevSize added to the prevIX . Our final readIndex is the read index output of the last dimension. To get the read values for the interpolators need a pattern of offsets in each dimension, since we are looking for the read indexes surrounding the point of interest. These offsets are best explained by looking at the code of tabulate2d , the hardcoded 2D version: tabulate2d(C,function, sizeX,sizeY, rx0,ry0, rx1,ry1, x,y) = environment { size = sizeX*sizeY; // Maximum X index to access midX = sizeX-1; // Maximum Y index to access midY = sizeY-1; // Maximum total index to access mid = size-1; // Create the table wf = function(wfX,wfY); // Prepare the 'float' table read index for X idX = (x-rx0)/(rx1-rx0)*midX; // Prepare the 'float' table read index for Y idY = ((y-ry0)/(ry1-ry0))*midY; // table creation X: wfX = rx0+float(ba.time%sizeX)*(rx1-rx0) /float(midX); // table creation Y: wfY = ry0+ ((float(ba.time-(ba.time%sizeX)) /float(sizeX)) *(ry1-ry0)) /float(midY); // Limit the table read index in [0, mid] if C = 1 rid(x,mid, 0) = x; rid(x,mid, 1) = max(0, min(x, mid)); // Tabulate a binary 'FX' function on a range [rx0, rx1] [ry0, ry1] val(x,y) = rdtable(size, wf, readIndex); readIndex = rid( rid(int(idX+0.5),midX, C) +yOffset , mid, C); yOffset = sizeX*rid(int(idY),midY,C); // Tabulate a binary 'FX' function over the range [rx0, rx1] [ry0, ry1] with linear interpolation lin = it.interpolate_linear( dy , it.interpolate_linear(dx,v0,v1) , it.interpolate_linear(dx,v2,v3)) with { i0 = rid(int(idX), midX, C)+yOffset; i1 = i0+1; i2 = i0+sizeX; i3 = i1+sizeX; dx = idX-int(idX); dy = idY-int(idY); v0 = rdtable(size, wf, rid(i0, mid, C)); v1 = rdtable(size, wf, rid(i1, mid, C)); v2 = rdtable(size, wf, rid(i2, mid, C)); v3 = rdtable(size, wf, rid(i3, mid, C)); }; // Tabulate a binary 'FX' function over the range [rx0, rx1] [ry0, ry1] with cubic interpolation cub = it.interpolate_cubic( dy , it.interpolate_cubic(dx,v0,v1,v2,v3) , it.interpolate_cubic(dx,v4,v5,v6,v7) , it.interpolate_cubic(dx,v8,v9,v10,v11) , it.interpolate_cubic(dx,v12,v13,v14,v15) ) with { i0 = i4-sizeX; i1 = i5-sizeX; i2 = i6-sizeX; i3 = i7-sizeX; i4 = i5-1; i5 = rid(int(idX), midX, C)+yOffset; i6 = i5+1; i7 = i6+1; i8 = i4+sizeX; i9 = i5+sizeX; i10 = i6+sizeX; i11 = i7+sizeX; i12 = i4+(2*sizeX); i13 = i5+(2*sizeX); i14 = i6+(2*sizeX); i15 = i7+(2*sizeX); dx = idX-int(idX); dy = idY-int(idY); v0 = rdtable(size, wf, rid(i0 , mid, C)); v1 = rdtable(size, wf, rid(i1 , mid, C)); v2 = rdtable(size, wf, rid(i2 , mid, C)); v3 = rdtable(size, wf, rid(i3 , mid, C)); v4 = rdtable(size, wf, rid(i4 , mid, C)); v5 = rdtable(size, wf, rid(i5 , mid, C)); v6 = rdtable(size, wf, rid(i6 , mid, C)); v7 = rdtable(size, wf, rid(i7 , mid, C)); v8 = rdtable(size, wf, rid(i8 , mid, C)); v9 = rdtable(size, wf, rid(i9 , mid, C)); v10 = rdtable(size, wf, rid(i10, mid, C)); v11 = rdtable(size, wf, rid(i11, mid, C)); v12 = rdtable(size, wf, rid(i12, mid, C)); v13 = rdtable(size, wf, rid(i13, mid, C)); v14 = rdtable(size, wf, rid(i14, mid, C)); v15 = rdtable(size, wf, rid(i15, mid, C)); }; }; In the interest of brevity, we'll stop explaining here. If you have any more questions, feel free to open an issue on faustlibraries and tag @magnetophon.","title":"Read indexes"},{"location":"libs/basics/#selectors-conditions","text":"","title":"Selectors (Conditions)"},{"location":"libs/basics/#baif","text":"if-then-else implemented with a select2. WARNING: since select2 is strict (always evaluating both branches), the resulting if does not have the usual \"lazy\" semantic of the C if form, and thus cannot be used to protect against forbidden computations like division-by-zero for instance.","title":"(ba.)if"},{"location":"libs/basics/#usage_40","text":"if(cond, then, else) : _ Where: cond : condition then : signal selected while cond is true else : signal selected while cond is false","title":"Usage"},{"location":"libs/basics/#baifnc","text":"if-then-elseif-then-...elsif-then-else implemented on top of ba.if .","title":"(ba.)ifNc"},{"location":"libs/basics/#usage_41","text":"ifNc((cond1,then1, cond2,then2, ... condN,thenN, else)) : _ or ifNc(Nc, cond1,then1, cond2,then2, ... condN,thenN, else) : _ or cond1,then1, cond2,then2, ... condN,thenN, else : ifNc(Nc) : _ Where: Nc : number of branches/conditions (constant numerical expression) condX : condition thenX : signal selected if condX is the 1st true condition else : signal selected if all the cond1-condN conditions are false","title":"Usage"},{"location":"libs/basics/#example-test-program_3","text":"process(x,y) = ifNc((xy,+1, 0)); or process(x,y) = ifNc(2, xy,+1, 0); or process(x,y) = xy,+1, 0 : ifNc(2); outputs -1 if xy , 0 otherwise.","title":"Example test program"},{"location":"libs/basics/#baifncno","text":"ifNcNo(Nc,No) is similar to ifNc(Nc) above but then/else branches have No outputs.","title":"(ba.)ifNcNo"},{"location":"libs/basics/#usage_42","text":"ifNcNo(Nc,No, cond1,then1, cond2,then2, ... condN,thenN, else) : sig.bus(No) Where: Nc : number of branches/conditions (constant numerical expression) No : number of outputs (constant numerical expression) condX : condition thenX : list of No signals selected if condX is the 1st true condition else : list of No signals selected if all the cond1-condN conditions are false","title":"Usage"},{"location":"libs/basics/#example-test-program_4","text":"process(x) = ifNcNo(2,3, x<0, -1,-1,-1, x>0, 1,1,1, 0,0,0); outputs -1,-1,-1 if x<0 , 1,1,1 if x>0 , 0,0,0 otherwise.","title":"Example test program"},{"location":"libs/basics/#baselector","text":"Selects the ith input among n at compile time.","title":"(ba.)selector"},{"location":"libs/basics/#usage_43","text":"selector(I,N) _,_,_,_ : selector(2,4) : _ // selects the 3rd input among 4 Where: I : input to select (int, numbered from 0, known at compile time) N : number of inputs (int, known at compile time, N > I) There is also cselector for selecting among complex input signals of the form (real,imag).","title":"Usage"},{"location":"libs/basics/#baselect2stereo","text":"Select between 2 stereo signals.","title":"(ba.)select2stereo"},{"location":"libs/basics/#usage_44","text":"_,_,_,_ : select2stereo(bpc) : _,_ Where: bpc : the selector switch (0/1)","title":"Usage"},{"location":"libs/basics/#baselectn","text":"Selects the ith input among N at run time.","title":"(ba.)selectn"},{"location":"libs/basics/#usage_45","text":"selectn(N,i) _,_,_,_ : selectn(4,2) : _ // selects the 3rd input among 4 Where: N : number of inputs (int, known at compile time, N > 0) i : input to select (int, numbered from 0)","title":"Usage"},{"location":"libs/basics/#example-test-program_5","text":"N = 64; process = par(n, N, (par(i,N,i) : selectn(N,n)));","title":"Example test program"},{"location":"libs/basics/#baselectmulti","text":"Selects the ith circuit among N at run time (all should have the same number of inputs and outputs) with a crossfade.","title":"(ba.)selectmulti"},{"location":"libs/basics/#usage_46","text":"selectmulti(n,lgen,id) Where: n : crossfade in samples lgen : list of circuits id : circuit to select (int, numbered from 0)","title":"Usage"},{"location":"libs/basics/#example-test-program_6","text":"process = selectmulti(ma.SR/10, ((3,9),(2,8),(5,7)), nentry(\"choice\", 0, 0, 2, 1)); process = selectmulti(ma.SR/10, ((_*3,_*9),(_*2,_*8),(_*5,_*7)), nentry(\"choice\", 0, 0, 2, 1));","title":"Example test program"},{"location":"libs/basics/#baselectoutn","text":"Route input to the output among N at run time.","title":"(ba.)selectoutn"},{"location":"libs/basics/#usage_47","text":"_ : selectoutn(N, i) : si.bus(N) Where: N : number of outputs (int, known at compile time, N > 0) i : output number to route to (int, numbered from 0) (i.e. slider)","title":"Usage"},{"location":"libs/basics/#example-test-program_7","text":"process = 1 : selectoutn(3, sel) : par(i, 3, vbargraph(\"v.bargraph %i\", 0, 1)); sel = hslider(\"volume\", 0, 0, 2, 1) : int;","title":"Example test program"},{"location":"libs/basics/#other","text":"","title":"Other"},{"location":"libs/basics/#balatch","text":"Latch input on positive-going transition of trig:\"records\" the input when trig switches from 0 to 1, outputs a frozen values everytime else.","title":"(ba.)latch"},{"location":"libs/basics/#usage_48","text":"_ : latch(trig) : _ Where: trig : hold trigger (0 for hold, 1 for bypass)","title":"Usage"},{"location":"libs/basics/#basandh","text":"Sample And Hold: \"records\" the input when trig is 1, outputs a frozen value when trig is 0. sAndH is a standard Faust function.","title":"(ba.)sAndH"},{"location":"libs/basics/#usage_49","text":"_ : sAndH(trig) : _ Where: trig : hold trigger (0 for hold, 1 for bypass)","title":"Usage"},{"location":"libs/basics/#badownsample","text":"Down sample a signal. WARNING: this function doesn't change the rate of a signal, it just holds samples... downSample is a standard Faust function.","title":"(ba.)downSample"},{"location":"libs/basics/#usage_50","text":"_ : downSample(freq) : _ Where: freq : new rate in Hz","title":"Usage"},{"location":"libs/basics/#bapeakhold","text":"Outputs current max value above zero.","title":"(ba.)peakhold"},{"location":"libs/basics/#usage_51","text":"_ : peakhold(mode) : _ Where: mode means: 0 - Pass through. A single sample 0 trigger will work as a reset. 1 - Track and hold max value.","title":"Usage"},{"location":"libs/basics/#bapeakholder","text":"While peak-holder functions are scarcely discussed in the literature (please do send me an email if you know otherwise), common sense tells that the expected behaviour should be as follows: the absolute value of the input signal is compared with the output of the peak-holder; if the input is greater or equal to the output, a new peak is detected and sent to the output; otherwise, a timer starts and the current peak is held for N samples; once the timer is out and no new peaks have been detected, the absolute value of the current input becomes the new peak.","title":"(ba.)peakholder"},{"location":"libs/basics/#usage_52","text":"_ : peakholder(holdTime) : _ Where: holdTime : hold time in samples","title":"Usage"},{"location":"libs/basics/#baimpulsify","text":"Turns a signal into an impulse with the value of the current sample (0.3,0.2,0.1 becomes 0.3,0.0,0.0). This function is typically used with a button to turn its output into an impulse. impulsify is a standard Faust function.","title":"(ba.)impulsify"},{"location":"libs/basics/#usage_53","text":"button(\"gate\") : impulsify;","title":"Usage"},{"location":"libs/basics/#baautomat","text":"Record and replay in a loop the successives values of the input signal.","title":"(ba.)automat"},{"location":"libs/basics/#usage_54","text":"hslider(...) : automat(t, size, init) : _ Where: t : tempo in BPM size : number of items in the loop init : init value in the loop","title":"Usage"},{"location":"libs/basics/#babpf","text":"bpf is an environment (a group of related definitions) that can be used to create break-point functions. It contains three functions: start(x,y) to start a break-point function end(x,y) to end a break-point function point(x,y) to add intermediate points to a break-point function A minimal break-point function must contain at least a start and an end point: f = bpf.start(x0,y0) : bpf.end(x1,y1); A more involved break-point function can contains any number of intermediate points: f = bpf.start(x0,y0) : bpf.point(x1,y1) : bpf.point(x2,y2) : bpf.end(x3,y3); In any case the x_{i} must be in increasing order (for all i , x_{i} < x_{i+1} ). For example the following definition: f = bpf.start(x0,y0) : ... : bpf.point(xi,yi) : ... : bpf.end(xn,yn); implements a break-point function f such that: f(x) = y_{0} when x < x_{0} f(x) = y_{n} when x > x_{n} f(x) = y_{i} + (y_{i+1}-y_{i})*(x-x_{i})/(x_{i+1}-x_{i}) when x_{i} <= x and x < x_{i+1} bpf is a standard Faust function.","title":"(ba.)bpf"},{"location":"libs/basics/#balistinterp","text":"Linearly interpolates between the elements of a list.","title":"(ba.)listInterp"},{"location":"libs/basics/#usage_55","text":"index = 1.69; // range is 0-4 process = listInterp((800,400,350,450,325),index); Where: index : the index (float) to interpolate between the different values. The range of index depends on the size of the list.","title":"Usage"},{"location":"libs/basics/#babypass1","text":"Takes a mono input signal, route it to e and bypass it if bpc = 1 . When bypassed, e is feed with zeros so that its state is cleanup up. bypass1 is a standard Faust function.","title":"(ba.)bypass1"},{"location":"libs/basics/#usage_56","text":"_ : bypass1(bpc,e) : _ Where: bpc : bypass switch (0/1) e : a mono effect","title":"Usage"},{"location":"libs/basics/#babypass2","text":"Takes a stereo input signal, route it to e and bypass it if bpc = 1 . When bypassed, e is feed with zeros so that its state is cleanup up. bypass2 is a standard Faust function.","title":"(ba.)bypass2"},{"location":"libs/basics/#usage_57","text":"_,_ : bypass2(bpc,e) : _,_ Where: bpc : bypass switch (0/1) e : a stereo effect","title":"Usage"},{"location":"libs/basics/#babypass1to2","text":"Bypass switch for effect e having mono input signal and stereo output. Effect e is bypassed if bpc = 1 .When bypassed, e is feed with zeros so that its state is cleanup up. bypass1to2 is a standard Faust function.","title":"(ba.)bypass1to2"},{"location":"libs/basics/#usage_58","text":"_ : bypass1to2(bpc,e) : _,_ Where: bpc : bypass switch (0/1) e : a mono-to-stereo effect","title":"Usage"},{"location":"libs/basics/#babypass_fade","text":"Bypass an arbitrary (N x N) circuit with 'n' samples crossfade. Inputs and outputs signals are faded out when 'e' is bypassed, so that 'e' state is cleanup up. Once bypassed the effect is replaced by par(i,N,_) . Bypassed circuits can be chained.","title":"(ba.)bypass_fade"},{"location":"libs/basics/#usage_59","text":"_ : bypass_fade(n,b,e) : _ or _,_ : bypass_fade(n,b,e) : _,_ n : number of samples for the crossfade b : bypass switch (0/1) e : N x N circuit","title":"Usage"},{"location":"libs/basics/#example-test-program_8","text":"process = bypass_fade(ma.SR/10, checkbox(\"bypass echo\"), echo); process = bypass_fade(ma.SR/10, checkbox(\"bypass reverb\"), freeverb);","title":"Example test program"},{"location":"libs/basics/#batoggle","text":"Triggered by the change of 0 to 1, it toggles the output value between 0 and 1.","title":"(ba.)toggle"},{"location":"libs/basics/#usage_60","text":"_ : toggle : _","title":"Usage"},{"location":"libs/basics/#example-test-program_9","text":"button(\"toggle\") : toggle : vbargraph(\"output\", 0, 1) (an.amp_follower(0.1) > 0.01) : toggle : vbargraph(\"output\", 0, 1) // takes audio input","title":"Example test program"},{"location":"libs/basics/#baon_and_off","text":"The first channel set the output to 1, the second channel to 0.","title":"(ba.)on_and_off"},{"location":"libs/basics/#usage_61","text":"_,_ : on_and_off : _","title":"Usage"},{"location":"libs/basics/#example-test-program_10","text":"button(\"on\"), button(\"off\") : on_and_off : vbargraph(\"output\", 0, 1)","title":"Example test program"},{"location":"libs/basics/#babitcrusher","text":"Produce distortion by reduction of the signal resolution.","title":"(ba.)bitcrusher"},{"location":"libs/basics/#usage_62","text":"_ : bitcrusher(nbits) : _ Where: nbits : the number of bits of the wanted resolution","title":"Usage"},{"location":"libs/basics/#sliding-reduce","text":"Provides various operations on the last n samples using a high order slidingReduce(op,n,maxN,disabledVal,x) fold-like function: slidingSum(n) : the sliding sum of the last n input samples, CPU-light slidingSump(n,maxN) : the sliding sum of the last n input samples, numerically stable \"forever\" slidingMax(n,maxN) : the sliding max of the last n input samples slidingMin(n,maxN) : the sliding min of the last n input samples slidingMean(n) : the sliding mean of the last n input samples, CPU-light slidingMeanp(n,maxN) : the sliding mean of the last n input samples, numerically stable \"forever\" slidingRMS(n) : the sliding RMS of the last n input samples, CPU-light slidingRMSp(n,maxN) : the sliding RMS of the last n input samples, numerically stable \"forever\"","title":"Sliding Reduce"},{"location":"libs/basics/#working-principle_1","text":"If we want the maximum of the last 8 values, we can do that as: simpleMax(x) = ( ( max(x@0,x@1), max(x@2,x@3) ) :max ), ( ( max(x@4,x@5), max(x@6,x@7) ) :max ) :max; max(x@2,x@3) is the same as max(x@0,x@1)@2 but the latter re-uses a value we already computed,so is more efficient. Using the same trick for values 4 trough 7, we can write: efficientMax(x)= ( ( max(x@0,x@1), max(x@0,x@1)@2 ) :max ), ( ( max(x@0,x@1), max(x@0,x@1)@2 ) :max@4 ) :max; We can rewrite it recursively, so it becomes possible to get the maximum at have any number of values, as long as it's a power of 2. recursiveMax = case { (1,x) => x; (N,x) => max(recursiveMax(N/2,x), recursiveMax(N/2,x)@(N/2)); }; What if we want to look at a number of values that's not a power of 2? For each value, we will have to decide whether to use it or not. If n is bigger than the index of the value, we use it, otherwise we replace it with ( 0-(ma.MAX) ): variableMax(n,x) = max( max( ( (x@0 : useVal(0)), (x@1 : useVal(1)) ):max, ( (x@2 : useVal(2)), (x@3 : useVal(3)) ):max ), max( ( (x@4 : useVal(4)), (x@5 : useVal(5)) ):max, ( (x@6 : useVal(6)), (x@7 : useVal(7)) ):max ) ) with { useVal(i) = select2((n>=i) , (0-(ma.MAX)),_); }; Now it becomes impossible to re-use any values. To fix that let's first look at how we'd implement it using recursiveMax, but with a fixed n that is not a power of 2. For example, this is how you'd do it with n=3 : binaryMaxThree(x) = ( recursiveMax(1,x)@0, // the first x recursiveMax(2,x)@1 // the second and third x ):max; n=6 binaryMaxSix(x) = ( recursiveMax(2,x)@0, // first two recursiveMax(4,x)@2 // third trough sixth ):max; Note that recursiveMax(2,x) is used at a different delay then in binaryMaxThree , since it represents 1 and 2, not 2 and 3. Each block is delayed the combined size of the previous blocks. n=7 binaryMaxSeven(x) = ( ( recursiveMax(1,x)@0, // first x recursiveMax(2,x)@1 // second and third ):max, ( recursiveMax(4,x)@3 // fourth trough seventh ) ):max; To make a variable version, we need to know which powers of two are used, and at which delay time. Then it becomes a matter of: lining up all the different block sizes in parallel: sequentialOperatorParOut() delaying each the appropriate amount: sumOfPrevBlockSizes() turning it on or off: useVal() getting the maximum of all of them: parallelOp() In Faust, we can only do that for a fixed maximum number of values: maxN , known at compile time.","title":"Working Principle"},{"location":"libs/basics/#baslidingreduce","text":"Fold-like high order function. Apply a commutative binary operation op to the last n consecutive samples of a signal x . For example : slidingReduce(max,128,128,0-(ma.MAX)) will compute the maximum of the last 128 samples. The output is updated each sample, unlike reduce, where the output is constant for the duration of a block.","title":"(ba.)slidingReduce"},{"location":"libs/basics/#usage_63","text":"_ : slidingReduce(op,n,maxN,disabledVal) : _ Where: n : the number of values to process maxN : the maximum number of values to process (int, known at compile time, maxN > 0) op : the operator. Needs to be a commutative one. disabledVal : the value to use when we want to ignore a value. In other words, op(x,disabledVal) should equal to x . For example, +(x,0) equals x and min(x,ma.MAX) equals x . So if we want to calculate the sum, we need to give 0 as disabledVal , and if we want the minimum, we need to give ma.MAX as disabledVal .","title":"Usage"},{"location":"libs/basics/#baslidingsum","text":"The sliding sum of the last n input samples. It will eventually run into numerical trouble when there is a persistent dc component. If that matters in your application, use the more CPU-intensive ba.slidingSump .","title":"(ba.)slidingSum"},{"location":"libs/basics/#usage_64","text":"_ : slidingSum(n) : _ Where: n : the number of values to process","title":"Usage"},{"location":"libs/basics/#baslidingsump","text":"The sliding sum of the last n input samples. It uses a lot more CPU than ba.slidingSum , but is numerically stable \"forever\" in return.","title":"(ba.)slidingSump"},{"location":"libs/basics/#usage_65","text":"_ : slidingSump(n,maxN) : _ Where: n : the number of values to process maxN : the maximum number of values to process (int, known at compile time, maxN > 0)","title":"Usage"},{"location":"libs/basics/#baslidingmax","text":"The sliding maximum of the last n input samples.","title":"(ba.)slidingMax"},{"location":"libs/basics/#usage_66","text":"_ : slidingMax(n,maxN) : _ Where: n : the number of values to process maxN : the maximum number of values to process (int, known at compile time, maxN > 0)","title":"Usage"},{"location":"libs/basics/#baslidingmin","text":"The sliding minimum of the last n input samples.","title":"(ba.)slidingMin"},{"location":"libs/basics/#usage_67","text":"_ : slidingMin(n,maxN) : _ Where: n : the number of values to process maxN : the maximum number of values to process (int, known at compile time, maxN > 0)","title":"Usage"},{"location":"libs/basics/#baslidingmean","text":"The sliding mean of the last n input samples. It will eventually run into numerical trouble when there is a persistent dc component. If that matters in your application, use the more CPU-intensive ba.slidingMeanp .","title":"(ba.)slidingMean"},{"location":"libs/basics/#usage_68","text":"_ : slidingMean(n) : _ Where: n : the number of values to process","title":"Usage"},{"location":"libs/basics/#baslidingmeanp","text":"The sliding mean of the last n input samples. It uses a lot more CPU than ba.slidingMean , but is numerically stable \"forever\" in return.","title":"(ba.)slidingMeanp"},{"location":"libs/basics/#usage_69","text":"_ : slidingMeanp(n,maxN) : _ Where: n : the number of values to process maxN : the maximum number of values to process (int, known at compile time, maxN > 0)","title":"Usage"},{"location":"libs/basics/#baslidingrms","text":"The root mean square of the last n input samples. It will eventually run into numerical trouble when there is a persistent dc component. If that matters in your application, use the more CPU-intensive ba.slidingRMSp .","title":"(ba.)slidingRMS"},{"location":"libs/basics/#usage_70","text":"_ : slidingRMS(n) : _ Where: n : the number of values to process","title":"Usage"},{"location":"libs/basics/#baslidingrmsp","text":"The root mean square of the last n input samples. It uses a lot more CPU than ba.slidingRMS , but is numerically stable \"forever\" in return.","title":"(ba.)slidingRMSp"},{"location":"libs/basics/#usage_71","text":"_ : slidingRMSp(n,maxN) : _ Where: n : the number of values to process maxN : the maximum number of values to process (int, known at compile time, maxN > 0)","title":"Usage"},{"location":"libs/basics/#parallel-operators","text":"Provides various operations on N parallel inputs using a high order parallelOp(op,N,x) function: parallelMax(N) : the max of n parallel inputs parallelMin(N) : the min of n parallel inputs parallelMean(N) : the mean of n parallel inputs parallelRMS(N) : the RMS of n parallel inputs","title":"Parallel Operators"},{"location":"libs/basics/#baparallelop","text":"Apply a commutative binary operation op to N parallel inputs.","title":"(ba.)parallelOp"},{"location":"libs/basics/#usage_72","text":"si.bus(N) : parallelOp(op,N) : _ where: N : the number of parallel inputs known at compile time op : the operator which needs to be commutative","title":"usage"},{"location":"libs/basics/#baparallelmax","text":"The maximum of N parallel inputs.","title":"(ba.)parallelMax"},{"location":"libs/basics/#usage_73","text":"si.bus(N) : parallelMax(N) : _ Where: N : the number of parallel inputs known at compile time","title":"Usage"},{"location":"libs/basics/#baparallelmin","text":"The minimum of N parallel inputs.","title":"(ba.)parallelMin"},{"location":"libs/basics/#usage_74","text":"si.bus(N) : parallelMin(N) : _ Where: N : the number of parallel inputs known at compile time","title":"Usage"},{"location":"libs/basics/#baparallelmean","text":"The mean of N parallel inputs.","title":"(ba.)parallelMean"},{"location":"libs/basics/#usage_75","text":"si.bus(N) : parallelMean(N) : _ Where: N : the number of parallel inputs known at compile time","title":"Usage"},{"location":"libs/basics/#baparallelrms","text":"The RMS of N parallel inputs.","title":"(ba.)parallelRMS"},{"location":"libs/basics/#usage_76","text":"si.bus(N) : parallelRMS(N) : _ Where: N : the number of parallel inputs known at compile time","title":"Usage"},{"location":"libs/compressors/","text":"compressors.lib A library of compressor effects. Its official prefix is co . References https://github.com/grame-cncm/faustlibraries/blob/master/compressors.lib Functions Reference (co.)peak_compression_gain_mono_db Mono dynamic range compressor gain computer with dB output. peak_compression_gain_mono_db is a standard Faust function. Usage _ : peak_compression_gain_mono_db(strength,thresh,att,rel,knee,prePost) : _ Where: strength : strength of the compression (0 = no compression, 1 means hard limiting, >1 means over-compression) thresh : dB level threshold above which compression kicks in att : attack time = time constant (sec) when level & compression going up rel : release time = time constant (sec) coming out of compression knee : a gradual increase in gain reduction around the threshold: below thresh-(knee/2) there is no gain reduction, above thresh+(knee/2) there is the same gain reduction as without a knee, and in between there is a gradual increase in gain reduction prePost : places the level detector either at the input or after the gain computer; this turns it from a linear return-to-zero detector into a log domain return-to-threshold detector It uses a strength parameter instead of the traditional ratio, in order to be able to function as a hard limiter. For that you'd need a ratio of infinity:1, and you cannot express that in Faust. Sometimes even bigger ratios are useful: for example a group recording where one instrument is recorded with both a close microphone and a room microphone, and the instrument is loud enough in the room mic when playing loud, but you want to boost it when it is playing soft. References http://en.wikipedia.org/wiki/Dynamic_range_compression Digital Dynamic Range Compressor Design, A Tutorial and Analysis, Dimitrios GIANNOULIS ( Dimitrios.Giannoulis@eecs.qmul.ac.uk ), Michael MASSBERG ( michael@massberg.org ), and Josuah D.REISS ( josh.reiss@eecs.qmul.ac.uk ) (co.)peak_compression_gain_N_chan_db N channels dynamic range compressor gain computer with dB output. peak_compression_gain_N_chan_db is a standard Faust function. Usage si.bus(N) : peak_compression_gain_N_chan_db(strength,thresh,att,rel,knee,prePost,link,N) : si.bus(N) Where: strength : strength of the compression (0 = no compression, 1 means hard limiting, >1 means over-compression) thresh : dB level threshold above which compression kicks in att : attack time = time constant (sec) when level & compression going up rel : release time = time constant (sec) coming out of compression knee : a gradual increase in gain reduction around the threshold: below thresh-(knee/2) there is no gain reduction, above thresh+(knee/2) there is the same gain reduction as without a knee, and in between there is a gradual increase in gain reduction prePost : places the level detector either at the input or after the gain computer; this turns it from a linear return-to-zero detector into a log domain return-to-threshold detector link : the amount of linkage between the channels: 0 = each channel is independent, 1 = all channels have the same amount of gain reduction N : the number of channels of the compressor, known at compile time It uses a strength parameter instead of the traditional ratio, in order to be able to function as a hard limiter. For that you'd need a ratio of infinity:1, and you cannot express that in Faust. Sometimes even bigger ratios are useful: for example a group recording where one instrument is recorded with both a close microphone and a room microphone, and the instrument is loud enough in the room mic when playing loud, but you want to boost it when it is playing soft. References http://en.wikipedia.org/wiki/Dynamic_range_compression Digital Dynamic Range Compressor Design, A Tutorial and Analysis, Dimitrios GIANNOULIS ( Dimitrios.Giannoulis@eecs.qmul.ac.uk ), Michael MASSBERG ( michael@massberg.org ), and Josuah D.REISS ( josh.reiss@eecs.qmul.ac.uk ) (co.)FFcompressor_N_chan Feed forward N channels dynamic range compressor. FFcompressor_N_chan is a standard Faust function. Usage si.bus(N) : FFcompressor_N_chan(strength,thresh,att,rel,knee,prePost,link,meter,N) : si.bus(N) Where: strength : strength of the compression (0 = no compression, 1 means hard limiting, >1 means over-compression) thresh : dB level threshold above which compression kicks in att : attack time = time constant (sec) when level & compression going up rel : release time = time constant (sec) coming out of compression knee : a gradual increase in gain reduction around the threshold: below thresh-(knee/2) there is no gain reduction, above thresh+(knee/2) there is the same gain reduction as without a knee, and in between there is a gradual increase in gain reduction prePost : places the level detector either at the input or after the gain computer; this turns it from a linear return-to-zero detector into a log domain return-to-threshold detector link : the amount of linkage between the channels: 0 = each channel is independent, 1 = all channels have the same amount of gain reduction meter : a gain reduction meter. It can be implemented like so: meter = _<:(_, (ba.linear2db:max(maxGR):meter_group((hbargraph(\"[1][unit:dB][tooltip: gain reduction in dB]\", maxGR, 0))))):attach; N : the number of channels of the compressor, known at compile time It uses a strength parameter instead of the traditional ratio, in order to be able to function as a hard limiter. For that you'd need a ratio of infinity:1, and you cannot express that in Faust. Sometimes even bigger ratios are useful: for example a group recording where one instrument is recorded with both a close microphone and a room microphone, and the instrument is loud enough in the room mic when playing loud, but you want to boost it when it is playing soft. References http://en.wikipedia.org/wiki/Dynamic_range_compression Digital Dynamic Range Compressor Design, A Tutorial and Analysis, Dimitrios GIANNOULIS ( Dimitrios.Giannoulis@eecs.qmul.ac.uk ), Michael MASSBERG ( michael@massberg.org ), and Josuah D.REISS ( josh.reiss@eecs.qmul.ac.uk ) (co.)FBcompressor_N_chan Feed back N channels dynamic range compressor. FBcompressor_N_chan is a standard Faust function. Usage si.bus(N) : FBcompressor_N_chan(strength,thresh,att,rel,knee,prePost,link,meter,N) : si.bus(N) Where: strength : strength of the compression (0 = no compression, 1 means hard limiting, >1 means over-compression) thresh : dB level threshold above which compression kicks in att : attack time = time constant (sec) when level & compression going up rel : release time = time constant (sec) coming out of compression knee : a gradual increase in gain reduction around the threshold: below thresh-(knee/2) there is no gain reduction, above thresh+(knee/2) there is the same gain reduction as without a knee, and in between there is a gradual increase in gain reduction prePost : places the level detector either at the input or after the gain computer; this turns it from a linear return-to-zero detector into a log domain return-to-threshold detector link : the amount of linkage between the channels. 0 = each channel is independent, 1 = all channels have the same amount of gain reduction meter : a gain reduction meter. It can be implemented with: meter = _ <: (_,(ba.linear2db:max(maxGR):meter_group((hbargraph(\"[1][unit:dB][tooltip: gain reduction in dB]\", maxGR, 0))))):attach; or it can be omitted by defining meter = _; . N : the number of channels of the compressor, known at compile time It uses a strength parameter instead of the traditional ratio, in order to be able to function as a hard limiter. For that you'd need a ratio of infinity:1, and you cannot express that in Faust. Sometimes even bigger ratios are useful: for example a group recording where one instrument is recorded with both a close microphone and a room microphone, and the instrument is loud enough in the room mic when playing loud, but you want to boost it when it is playing soft. References http://en.wikipedia.org/wiki/Dynamic_range_compression Digital Dynamic Range Compressor Design, A Tutorial and Analysis, Dimitrios GIANNOULIS ( Dimitrios.Giannoulis@eecs.qmul.ac.uk ), Michael MASSBERG ( michael@massberg.org ), and Josuah D.REISS ( josh.reiss@eecs.qmul.ac.uk ) (co.)FBFFcompressor_N_chan Feed forward / feed back N channels dynamic range compressor. The feedback part has a much higher strength, so they end up sounding similar. FBFFcompressor_N_chan is a standard Faust function. Usage si.bus(N) : FBFFcompressor_N_chan(strength,thresh,att,rel,knee,prePost,link,FBFF,meter,N) : si.bus(N) Where: strength : strength of the compression (0 = no compression, 1 means hard limiting, >1 means over-compression) thresh : dB level threshold above which compression kicks in att : attack time = time constant (sec) when level & compression going up rel : release time = time constant (sec) coming out of compression knee : a gradual increase in gain reduction around the threshold: below thresh-(knee/2) there is no gain reduction, above thresh+(knee/2) there is the same gain reduction as without a knee, and in between there is a gradual increase in gain reduction prePost : places the level detector either at the input or after the gain computer; this turns it from a linear return-to-zero detector into a log domain return-to-threshold detector link : the amount of linkage between the channels: 0 = each channel is independent, 1 = all channels have the same amount of gain reduction FBFF : fade between feed forward (0) and feed back (1) compression meter : a gain reduction meter. It can be implemented like so: meter = _<:(_,(max(maxGR):meter_group((hbargraph(\"[1][unit:dB][tooltip: gain reduction in dB]\", maxGR, 0))))):attach; N : the number of channels of the compressor, known at compile time It uses a strength parameter instead of the traditional ratio, in order to be able to function as a hard limiter. For that you'd need a ratio of infinity:1, and you cannot express that in Faust. Sometimes even bigger ratios are useful: for example a group recording where one instrument is recorded with both a close microphone and a room microphone, and the instrument is loud enough in the room mic when playing loud, but you want to boost it when it is playing soft. References http://en.wikipedia.org/wiki/Dynamic_range_compression Digital Dynamic Range Compressor Design, A Tutorial and Analysis, Dimitrios GIANNOULIS ( Dimitrios.Giannoulis@eecs.qmul.ac.uk ), Michael MASSBERG ( michael@massberg.org ), and Josuah D.REISS ( josh.reiss@eecs.qmul.ac.uk ) (co.)RMS_compression_gain_mono_db Mono RMS dynamic range compressor gain computer with dB output. RMS_compression_gain_mono_db is a standard Faust function. Usage _ : RMS_compression_gain_mono_db(strength,thresh,att,rel,knee,prePost) : _ Where: strength : strength of the compression (0 = no compression, 1 means hard limiting, >1 means over-compression) thresh : dB level threshold above which compression kicks in att : attack time = time constant (sec) when level & compression going up rel : release time = time constant (sec) coming out of compression knee : a gradual increase in gain reduction around the threshold: below thresh-(knee/2) there is no gain reduction, above thresh+(knee/2) there is the same gain reduction as without a knee, and in between there is a gradual increase in gain reduction prePost : places the level detector either at the input or after the gain computer; this turns it from a linear return-to-zero detector into a log domain return-to-threshold detector It uses a strength parameter instead of the traditional ratio, in order to be able to function as a hard limiter. For that you'd need a ratio of infinity:1, and you cannot express that in Faust. Sometimes even bigger ratios are useful: for example a group recording where one instrument is recorded with both a close microphone and a room microphone, and the instrument is loud enough in the room mic when playing loud, but you want to boost it when it is playing soft. References http://en.wikipedia.org/wiki/Dynamic_range_compression Digital Dynamic Range Compressor Design, A Tutorial and Analysis, Dimitrios GIANNOULIS ( Dimitrios.Giannoulis@eecs.qmul.ac.uk ), Michael MASSBERG ( michael@massberg.org ), and Josuah D.REISS ( josh.reiss@eecs.qmul.ac.uk ) (co.)RMS_compression_gain_N_chan_db RMS N channels dynamic range compressor gain computer with dB output. RMS_compression_gain_N_chan_db is a standard Faust function. Usage si.bus(N) : RMS_compression_gain_N_chan_db(strength,thresh,att,rel,knee,prePost,link,N) : si.bus(N) Where: strength : strength of the compression (0 = no compression, 1 means hard limiting, >1 means over-compression) thresh : dB level threshold above which compression kicks in att : attack time = time constant (sec) when level & compression going up rel : release time = time constant (sec) coming out of compression knee : a gradual increase in gain reduction around the threshold: below thresh-(knee/2) there is no gain reduction, above thresh+(knee/2) there is the same gain reduction as without a knee, and in between there is a gradual increase in gain reduction prePost : places the level detector either at the input or after the gain computer; this turns it from a linear return-to-zero detector into a log domain return-to-threshold detector link : the amount of linkage between the channels: 0 = each channel is independent, 1 = all channels have the same amount of gain reduction N : the number of channels of the compressor It uses a strength parameter instead of the traditional ratio, in order to be able to function as a hard limiter. For that you'd need a ratio of infinity:1, and you cannot express that in Faust. Sometimes even bigger ratios are useful: for example a group recording where one instrument is recorded with both a close microphone and a room microphone, and the instrument is loud enough in the room mic when playing loud, but you want to boost it when it is playing soft. References http://en.wikipedia.org/wiki/Dynamic_range_compression Digital Dynamic Range Compressor Design, A Tutorial and Analysis, Dimitrios GIANNOULIS ( Dimitrios.Giannoulis@eecs.qmul.ac.uk ), Michael MASSBERG ( michael@massberg.org ), and Josuah D.REISS ( josh.reiss@eecs.qmul.ac.uk ) (co.)RMS_FBFFcompressor_N_chan RMS feed forward / feed back N channels dynamic range compressor. The feedback part has a much higher strength, so they end up sounding similar. RMS_FBFFcompressor_N_chan is a standard Faust function. Usage si.bus(N) : RMS_FBFFcompressor_N_chan(strength,thresh,att,rel,knee,prePost,link,FBFF,meter,N) : si.bus(N) Where: strength : strength of the compression (0 = no compression, 1 means hard limiting, >1 means over-compression) thresh : dB level threshold above which compression kicks in att : attack time = time constant (sec) when level & compression going up rel : release time = time constant (sec) coming out of compression knee : a gradual increase in gain reduction around the threshold: below thresh-(knee/2) there is no gain reduction, above thresh+(knee/2) there is the same gain reduction as without a knee, and in between there is a gradual increase in gain reduction prePost : places the level detector either at the input or after the gain computer; this turns it from a linear return-to-zero detector into a log domain return-to-threshold detector link : the amount of linkage between the channels: 0 = each channel is independent, 1 = all channels have the same amount of gain reduction FBFF : fade between feed forward (0) and feed back (1) compression. meter : a gain reduction meter. It can be implemented with: meter = _<:(_,(max(maxGR):meter_group((hbargraph(\"[1][unit:dB][tooltip: gain reduction in dB]\", maxGR, 0))))):attach; N : the number of channels of the compressor, known at compile time It uses a strength parameter instead of the traditional ratio, in order to be able to function as a hard limiter. For that you'd need a ratio of infinity:1, and you cannot express that in Faust. Sometimes even bigger ratios are useful: for example a group recording where one instrument is recorded with both a close microphone and a room microphone, and the instrument is loud enough in the room mic when playing loud, but you want to boost it when it is playing soft. To save CPU we cheat a bit, in a similar way as in the original libs: instead of crosfading between two sets of gain calculators as above, we take the abs of the audio from both the FF and FB, and crossfade between those, and feed that into one set of gain calculators again the strength is much higher when in FB mode, but implemented differently. References http://en.wikipedia.org/wiki/Dynamic_range_compression Digital Dynamic Range Compressor Design, A Tutorial and Analysis, Dimitrios GIANNOULIS ( Dimitrios.Giannoulis@eecs.qmul.ac.uk ), Michael MASSBERG ( michael@massberg.org ), and Josuah D.REISS ( josh.reiss@eecs.qmul.ac.uk ) (co.)RMS_FBcompressor_peak_limiter_N_chan N channel RMS feed back compressor into peak limiter feeding back into the FB compressor. By combining them this way, they complement each other optimally: the RMS compressor doesn't have to deal with the peaks, and the peak limiter get's spared from the steady state signal. The feedback part has a much higher strength, so they end up sounding similar. RMS_FBcompressor_peak_limiter_N_chan is a standard Faust function. Usage si.bus(N) : RMS_FBcompressor_peak_limiter_N_chan(strength,thresh,threshLim,att,rel,knee,link,meter,meterLim,N) : si.bus(N) Where: strength : strength of the compression (0 = no compression, 1 means hard limiting, >1 means over-compression) thresh : dB level threshold above which compression kicks in threshLim : dB level threshold above which the brickwall limiter kicks in att : attack time = time constant (sec) when level & compression going up this is also used as the release time of the limiter rel : release time = time constant (sec) coming out of compression knee : a gradual increase in gain reduction around the threshold: below thresh-(knee/2) there is no gain reduction, above thresh+(knee/2) there is the same gain reduction as without a knee, and in between there is a gradual increase in gain reduction the limiter uses a knee half this size link : the amount of linkage between the channels: 0 = each channel is independent, 1 = all channels have the same amount of gain reduction meter : compressor gain reduction meter. It can be implemented with: meter = _<:(_,(max(maxGR):meter_group((hbargraph(\"[1][unit:dB][tooltip: gain reduction in dB]\", maxGR, 0))))):attach; meterLim : brickwall limiter gain reduction meter. It can be implemented with: meterLim = _<:(_,(max(maxGR):meter_group((hbargraph(\"[1][unit:dB][tooltip: gain reduction in dB]\", maxGR, 0))))):attach; N : the number of channels of the compressor, known at compile time It uses a strength parameter instead of the traditional ratio, in order to be able to function as a hard limiter. For that you'd need a ratio of infinity:1, and you cannot express that in Faust. Sometimes even bigger ratios are useful: for example a group recording where one instrument is recorded with both a close microphone and a room microphone, and the instrument is loud enough in the room mic when playing loud, but you want to boost it when it is playing soft. References http://en.wikipedia.org/wiki/Dynamic_range_compression Digital Dynamic Range Compressor Design, A Tutorial and Analysis, Dimitrios GIANNOULIS ( Dimitrios.Giannoulis@eecs.qmul.ac.uk ), Michael MASSBERG ( michael@massberg.org ), and Josuah D.REISS ( josh.reiss@eecs.qmul.ac.uk ) Linear gain computer section The gain computer functions in this section have been replaced by a version that outputs dBs, but we retain the linear output version for backward compatibility. (co.)peak_compression_gain_mono Mono dynamic range compressor gain computer with linear output. peak_compression_gain_mono is a standard Faust function. Usage _ : peak_compression_gain_mono(strength,thresh,att,rel,knee,prePost) : _ Where: strength : strength of the compression (0 = no compression, 1 means hard limiting, >1 means over-compression) thresh : dB level threshold above which compression kicks in att : attack time = time constant (sec) when level & compression going up rel : release time = time constant (sec) coming out of compression knee : a gradual increase in gain reduction around the threshold: below thresh-(knee/2) there is no gain reduction, above thresh+(knee/2) there is the same gain reduction as without a knee, and in between there is a gradual increase in gain reduction prePost : places the level detector either at the input or after the gain computer; this turns it from a linear return-to-zero detector into a log domain return-to-threshold detector It uses a strength parameter instead of the traditional ratio, in order to be able to function as a hard limiter. For that you'd need a ratio of infinity:1, and you cannot express that in Faust. Sometimes even bigger ratios are useful: for example a group recording where one instrument is recorded with both a close microphone and a room microphone, and the instrument is loud enough in the room mic when playing loud, but you want to boost it when it is playing soft. References http://en.wikipedia.org/wiki/Dynamic_range_compression Digital Dynamic Range Compressor Design, A Tutorial and Analysis, Dimitrios GIANNOULIS ( Dimitrios.Giannoulis@eecs.qmul.ac.uk ), Michael MASSBERG ( michael@massberg.org ), and Josuah D.REISS ( josh.reiss@eecs.qmul.ac.uk ) (co.)peak_compression_gain_N_chan N channels dynamic range compressor gain computer with linear output. peak_compression_gain_N_chan is a standard Faust function. Usage si.bus(N) : peak_compression_gain_N_chan(strength,thresh,att,rel,knee,prePost,link,N) : si.bus(N) Where: strength : strength of the compression (0 = no compression, 1 means hard limiting, >1 means over-compression) thresh : dB level threshold above which compression kicks in att : attack time = time constant (sec) when level & compression going up rel : release time = time constant (sec) coming out of compression knee : a gradual increase in gain reduction around the threshold: below thresh-(knee/2) there is no gain reduction, above thresh+(knee/2) there is the same gain reduction as without a knee, and in between there is a gradual increase in gain reduction prePost : places the level detector either at the input or after the gain computer; this turns it from a linear return-to-zero detector into a log domain return-to-threshold detector link : the amount of linkage between the channels: 0 = each channel is independent, 1 = all channels have the same amount of gain reduction N : the number of channels of the compressor, known at compile time It uses a strength parameter instead of the traditional ratio, in order to be able to function as a hard limiter. For that you'd need a ratio of infinity:1, and you cannot express that in Faust. Sometimes even bigger ratios are useful: for example a group recording where one instrument is recorded with both a close microphone and a room microphone, and the instrument is loud enough in the room mic when playing loud, but you want to boost it when it is playing soft. References http://en.wikipedia.org/wiki/Dynamic_range_compression Digital Dynamic Range Compressor Design, A Tutorial and Analysis, Dimitrios GIANNOULIS ( Dimitrios.Giannoulis@eecs.qmul.ac.uk ), Michael MASSBERG ( michael@massberg.org ), and Josuah D.REISS ( josh.reiss@eecs.qmul.ac.uk ) (co.)RMS_compression_gain_mono Mono RMS dynamic range compressor gain computer with linear output. RMS_compression_gain_mono is a standard Faust function. Usage _ : RMS_compression_gain_mono(strength,thresh,att,rel,knee,prePost) : _ Where: strength : strength of the compression (0 = no compression, 1 means hard limiting, >1 means over-compression) thresh : dB level threshold above which compression kicks in att : attack time = time constant (sec) when level & compression going up rel : release time = time constant (sec) coming out of compression knee : a gradual increase in gain reduction around the threshold: below thresh-(knee/2) there is no gain reduction, above thresh+(knee/2) there is the same gain reduction as without a knee, and in between there is a gradual increase in gain reduction prePost : places the level detector either at the input or after the gain computer; this turns it from a linear return-to-zero detector into a log domain return-to-threshold detector It uses a strength parameter instead of the traditional ratio, in order to be able to function as a hard limiter. For that you'd need a ratio of infinity:1, and you cannot express that in Faust. Sometimes even bigger ratios are useful: for example a group recording where one instrument is recorded with both a close microphone and a room microphone, and the instrument is loud enough in the room mic when playing loud, but you want to boost it when it is playing soft. References http://en.wikipedia.org/wiki/Dynamic_range_compression Digital Dynamic Range Compressor Design, A Tutorial and Analysis, Dimitrios GIANNOULIS ( Dimitrios.Giannoulis@eecs.qmul.ac.uk ), Michael MASSBERG ( michael@massberg.org ), and Josuah D.REISS ( josh.reiss@eecs.qmul.ac.uk ) (co.)RMS_compression_gain_N_chan RMS N channels dynamic range compressor gain computer with linear output. RMS_compression_gain_N_chan is a standard Faust function. Usage si.bus(N) : RMS_compression_gain_N_chan(strength,thresh,att,rel,knee,prePost,link,N) : si.bus(N) Where: strength : strength of the compression (0 = no compression, 1 means hard limiting, >1 means over-compression) thresh : dB level threshold above which compression kicks in att : attack time = time constant (sec) when level & compression going up rel : release time = time constant (sec) coming out of compression knee : a gradual increase in gain reduction around the threshold: below thresh-(knee/2) there is no gain reduction, above thresh+(knee/2) there is the same gain reduction as without a knee, and in between there is a gradual increase in gain reduction prePost : places the level detector either at the input or after the gain computer; this turns it from a linear return-to-zero detector into a log domain return-to-threshold detector link : the amount of linkage between the channels: 0 = each channel is independent, 1 = all channels have the same amount of gain reduction N : the number of channels of the compressor, known at compile time It uses a strength parameter instead of the traditional ratio, in order to be able to function as a hard limiter. For that you'd need a ratio of infinity:1, and you cannot express that in Faust. Sometimes even bigger ratios are useful: for example a group recording where one instrument is recorded with both a close microphone and a room microphone, and the instrument is loud enough in the room mic when playing loud, but you want to boost it when it is playing soft. References http://en.wikipedia.org/wiki/Dynamic_range_compression Digital Dynamic Range Compressor Design, A Tutorial and Analysis, Dimitrios GIANNOULIS ( Dimitrios.Giannoulis@eecs.qmul.ac.uk ), Michael MASSBERG ( michael@massberg.org ), and Josuah D.REISS ( josh.reiss@eecs.qmul.ac.uk ) Original versions section The functions in this section are largely superseded by the limiters above, but we retain them for backward compatibility and for situations in which a more permissive, MIT-style license is required. (co.)compressor_lad_mono Mono dynamic range compressor with lookahead delay. compressor_lad_mono is a standard Faust function. Usage _ : compressor_lad_mono(lad,ratio,thresh,att,rel) : _ Where: lad : lookahead delay in seconds (nonnegative) - gets rounded to nearest sample. The effective attack time is a good setting ratio : compression ratio (1 = no compression, >1 means compression) Ratios: 4 is moderate compression, 8 is strong compression, 12 is mild limiting, and 20 is pretty hard limiting at the threshold thresh : dB level threshold above which compression kicks in (0 dB = max level) att : attack time = time constant (sec) when level & compression are going up rel : release time = time constant (sec) coming out of compression References http://en.wikipedia.org/wiki/Dynamic_range_compression https://ccrma.stanford.edu/~jos/filters/Nonlinear_Filter_Example_Dynamic.html Albert Graef's \"faust2pd\"/examples/synth/compressor_.dsp More features: https://github.com/magnetophon/faustCompressors (co.)compressor_mono Mono dynamic range compressors. compressor_mono is a standard Faust function. Usage _ : compressor_mono(ratio,thresh,att,rel) : _ Where: ratio : compression ratio (1 = no compression, >1 means compression) Ratios: 4 is moderate compression, 8 is strong compression, 12 is mild limiting, and 20 is pretty hard limiting at the threshold thresh : dB level threshold above which compression kicks in (0 dB = max level) att : attack time = time constant (sec) when level & compression are going up rel : release time = time constant (sec) coming out of compression References http://en.wikipedia.org/wiki/Dynamic_range_compression https://ccrma.stanford.edu/~jos/filters/Nonlinear_Filter_Example_Dynamic.html Albert Graef's \"faust2pd\"/examples/synth/compressor_.dsp More features: https://github.com/magnetophon/faustCompressors (co.)compressor_stereo Stereo dynamic range compressors. Usage _,_ : compressor_stereo(ratio,thresh,att,rel) : _,_ Where: ratio : compression ratio (1 = no compression, >1 means compression) thresh : dB level threshold above which compression kicks in (0 dB = max level) att : attack time = time constant (sec) when level & compression going up rel : release time = time constant (sec) coming out of compression References http://en.wikipedia.org/wiki/Dynamic_range_compression https://ccrma.stanford.edu/~jos/filters/Nonlinear_Filter_Example_Dynamic.html Albert Graef's \"faust2pd\"/examples/synth/compressor_.dsp More features: https://github.com/magnetophon/faustCompressors (co.)compression_gain_mono Compression-gain calculation for dynamic range compressors. Usage _ : compression_gain_mono(ratio,thresh,att,rel) : _ Where: ratio : compression ratio (1 = no compression, >1 means compression) thresh : dB level threshold above which compression kicks in (0 dB = max level) att : attack time = time constant (sec) when level & compression going up rel : release time = time constant (sec) coming out of compression References http://en.wikipedia.org/wiki/Dynamic_range_compression https://ccrma.stanford.edu/~jos/filters/Nonlinear_Filter_Example_Dynamic.html Albert Graef's \"faust2pd\"/examples/synth/compressor_.dsp More features: https://github.com/magnetophon/faustCompressors (co.)limiter_1176_R4_mono A limiter guards against hard-clipping. It can be implemented as a compressor having a high threshold (near the clipping level), fast attack, and high ratio. Since the compression ratio is so high, some knee smoothing is desirable (for softer limiting). This example is intended to get you started using compressors as limiters, so all parameters are hardwired here to nominal values. ratio : 4 (moderate compression). See compressor_mono comments for a guide to other choices. Mike Shipley likes this (lowest) setting on the 1176. (Grammy award-winning mixer for Queen, Tom Petty, etc.). thresh : -6 dB, meaning 4:1 compression begins at amplitude 1/2. att : 800 MICROseconds (Note: scaled by ratio in the 1176) The 1176 range is said to be 20-800 microseconds. Faster attack gives \"more bite\" (e.g. on vocals), and makes hard-clipping less likely on fast overloads. rel : 0.5 s (Note: scaled by ratio in the 1176) The 1176 range is said to be 50-1100 ms. The 1176 also has a \"bright, clear eq effect\" (use filters.lib if desired). limiter_1176_R4_mono is a standard Faust function. Usage _ : limiter_1176_R4_mono : _ Reference: http://en.wikipedia.org/wiki/1176_Peak_Limiter (co.)limiter_1176_R4_stereo A limiter guards against hard-clipping. It can be implemented as a compressor having a high threshold (near the clipping level), fast attack and release, and high ratio. Since the ratio is so high, some knee smoothing is desirable (\"soft limiting\"). This example is intended to get you started using compressor_* as a limiter, so all parameters are hardwired to nominal values here. ratio : 4 (moderate compression), 8 (severe compression), 12 (mild limiting), or 20 to 1 (hard limiting). att : 20-800 MICROseconds (Note: scaled by ratio in the 1176). rel : 50-1100 ms (Note: scaled by ratio in the 1176). Mike Shipley likes 4:1 (Grammy-winning mixer for Queen, Tom Petty, etc.) Faster attack gives \"more bite\" (e.g. on vocals). He hears a bright, clear eq effect as well (not implemented here). Usage _,_ : limiter_1176_R4_stereo : _,_ Reference: http://en.wikipedia.org/wiki/1176_Peak_Limiter Expanders (co.)peak_expansion_gain_N_chan_db N channels dynamic range expander gain computer. peak_expansion_gain_N_chan_db is a standard Faust function. Usage si.bus(N) : peak_expansion_gain_N_chan_db(strength,thresh,range,att,hold,rel,knee,prePost,link,maxHold,N) : si.bus(N) Where: strength : strength of the expansion (0 = no expansion, 100 means gating, <1 means upward compression) thresh : dB level threshold below which expansion kicks in range : maximum amount of expansion in dB att : attack time = time constant (sec) coming out of expansion hold : hold time (sec) rel : release time = time constant (sec) going into expansion knee : a gradual increase in gain reduction around the threshold: above thresh+(knee/2) there is no gain reduction, below thresh-(knee/2) there is the same gain reduction as without a knee, and in between there is a gradual increase in gain reduction prePost : places the level detector either at the input or after the gain computer; this turns it from a linear return-to-zero detector into a log domain return-to-range detector link : the amount of linkage between the channels: 0 = each channel is independent, 1 = all channels have the same amount of gain reduction maxHold : the maximum hold time in samples, known at compile time N : the number of channels of the gain computer, known at compile time (co.)expander_N_chan Feed forward N channels dynamic range expander. expander_N_chan is a standard Faust function. Usage si.bus(N) : expander_N_chan(strength,thresh,range,att,hold,rel,knee,prePost,link,meter,maxHold,N) : si.bus(N) Where: strength : strength of the expansion (0 = no expansion, 100 means gating, <1 means upward compression) thresh : dB level threshold below which expansion kicks in range : maximum amount of expansion in dB att : attack time = time constant (sec) coming out of expansion hold : hold time rel : release time = time constant (sec) going into expansion knee : a gradual increase in gain reduction around the threshold: above thresh+(knee/2) there is no gain reduction, below thresh-(knee/2) there is the same gain reduction as without a knee, and in between there is a gradual increase in gain reduction prePost : places the level detector either at the input or after the gain computer; this turns it from a linear return-to-zero detector into a log domain return-to-range detector link : the amount of linkage between the channels: 0 = each channel is independent, 1 = all channels have the same amount of gain reduction meter : a gain reduction meter. It can be implemented like so: meter = _<:(_, (ba.linear2db:max(maxGR):meter_group((hbargraph(\"[1][unit:dB][tooltip: gain reduction in dB]\", maxGR, 0))))):attach; maxHold : the maximum hold time in samples, known at compile time N : the number of channels of the expander, known at compile time (co.)expanderSC_N_chan Feed forward N channels dynamic range expander with sidechain. expanderSC_N_chan is a standard Faust function. Usage si.bus(N) : expanderSC_N_chan(strength,thresh,range,att,hold,rel,knee,prePost,link,meter,maxHold,N,SCfunction,SCswitch,SCsignal) : si.bus(N) Where: strength : strength of the expansion (0 = no expansion, 100 means gating, <1 means upward compression) thresh : dB level threshold below which expansion kicks in range : maximum amount of expansion in dB att : attack time = time constant (sec) coming out of expansion hold : hold time rel : release time = time constant (sec) going into expansion knee : a gradual increase in gain reduction around the threshold: above thresh+(knee/2) there is no gain reduction, below thresh-(knee/2) there is the same gain reduction as without a knee, and in between there is a gradual increase in gain reduction prePost : places the level detector either at the input or after the gain computer; this turns it from a linear return-to-zero detector into a log domain return-to-range detector link : the amount of linkage between the channels: 0 = each channel is independent, 1 = all channels have the same amount of gain reduction meter : a gain reduction meter. It can be implemented like so: meter = _<:(_, (ba.linear2db:max(maxGR):meter_group((hbargraph(\"[1][unit:dB][tooltip: gain reduction in dB]\", maxGR, 0))))):attach; maxHold : the maximum hold time in samples, known at compile time N : the number of channels of the expander, known at compile time SCfunction : a function that get's placed before the level-detector, needs to have a single input and output SCswitch : use either the regular audio input or the SCsignal as the input for the level detector SCsignal : an audio signal, to be used as the input for the level detector when SCswitch is 1 Lookahead Limiters (co.)limiter_lad_N N-channels lookahead limiter inspired by IOhannes Zm\u00f6lnig's post, which is in turn based on the thesis by Peter Falkner \"Entwicklung eines digitalen Stereo-Limiters mit Hilfe des Signalprozessors DSP56001\". This version of the limiter uses a peak-holder with smoothed attack and release based on tau time constant filters. It is also possible to use a time constant that is 2PI*tau by dividing the attack and release times by 2PI . This time constant allows for the amplitude profile to reach 1 - e^(-2PI) of the final peak after the attack time. The input path can be delayed by the same amount as the attack time to synchronise input and amplitude profile, realising a system that is particularly effective as a colourless (ideally) brickwall limiter. Note that the effectiveness of the ceiling settings are dependent on the other parameters, especially the time constant used for the smoothing filters and the lookahead delay. Similarly, the colourless characteristics are also dependent on attack, hold, and release times. Since fluctuations above ~15 Hz are perceived as timbral effects, [Vassilakis and Kendall 2010] it is reasonable to set the attack time to 1/15 seconds for a smooth amplitude modulation. On the other hand, the hold time can be set to the peak-to-peak period of the expected lowest frequency in the signal, which allows for minimal distortion of the low frequencies. The release time can then provide a perceptually linear and gradual gain increase determined by the user for any specific application. The scaling factor for all the channels is determined by the loudest peak between them all, so that amplitude ratios between the signals are kept. Usage si.bus(N) : limiter_lad_N(N, LD, ceiling, attack, hold, release) : si.bus(N) Where: N : is the number of channels, known at compile-time LD : is the lookahead delay in seconds, known at compile-time ceiling : is the linear amplitude output limit attack : is the attack time in seconds hold : is the hold time in seconds release : is the release time in seconds Example for a stereo limiter: limiter_lad_N(2, .01, 1, .01, .1, 1); Reference: http://iem.at/~zmoelnig/publications/limiter (co.)limiter_lad_mono Specialised case of limiter_lad_N mono limiter. Usage _ : limiter_lad_mono(LD, ceiling, attack, hold, release) : _ Where: LD : is the lookahead delay in seconds, known at compile-time ceiling : is the linear amplitude output limit attack : is the attack time in seconds hold : is the hold time in seconds release : is the release time in seconds Reference: http://iem.at/~zmoelnig/publications/limiter (co.)limiter_lad_stereo Specialised case of limiter_lad_N stereo limiter. Usage _,_ : limiter_lad_stereo(LD, ceiling, attack, hold, release) : _,_ Where: LD : is the lookahead delay in seconds, known at compile-time ceiling : is the linear amplitude output limit attack : is the attack time in seconds hold : is the hold time in seconds release : is the release time in seconds Reference: http://iem.at/~zmoelnig/publications/limiter (co.)limiter_lad_quad Specialised case of limiter_lad_N quadraphonic limiter. Usage si.bus(4) : limiter_lad_quad(LD, ceiling, attack, hold, release) : si.bus(4) Where: LD : is the lookahead delay in seconds, known at compile-time ceiling : is the linear amplitude output limit attack : is the attack time in seconds hold : is the hold time in seconds release : is the release time in seconds Reference: http://iem.at/~zmoelnig/publications/limiter (co.)limiter_lad_bw Specialised case of limiter_lad_N and ready-to-use unit-amplitude mono limiting function. This implementation, in particular, uses 2PI*tau time constant filters for attack and release smoothing with synchronised input and gain signals. This function's best application is to be used as a brickwall limiter with the least colouring artefacts while keeping a not-so-slow release curve. Tests have shown that, given a pop song with 60 dB of amplification and a 0-dB-ceiling, the loudest peak recorded was ~0.38 dB. Usage _ : limiter_lad_bw : _ Reference: http://iem.at/~zmoelnig/publications/limiter","title":" compressors "},{"location":"libs/compressors/#compressorslib","text":"A library of compressor effects. Its official prefix is co .","title":"compressors.lib"},{"location":"libs/compressors/#references","text":"https://github.com/grame-cncm/faustlibraries/blob/master/compressors.lib","title":"References"},{"location":"libs/compressors/#functions-reference","text":"","title":"Functions Reference"},{"location":"libs/compressors/#copeak_compression_gain_mono_db","text":"Mono dynamic range compressor gain computer with dB output. peak_compression_gain_mono_db is a standard Faust function.","title":"(co.)peak_compression_gain_mono_db"},{"location":"libs/compressors/#usage","text":"_ : peak_compression_gain_mono_db(strength,thresh,att,rel,knee,prePost) : _ Where: strength : strength of the compression (0 = no compression, 1 means hard limiting, >1 means over-compression) thresh : dB level threshold above which compression kicks in att : attack time = time constant (sec) when level & compression going up rel : release time = time constant (sec) coming out of compression knee : a gradual increase in gain reduction around the threshold: below thresh-(knee/2) there is no gain reduction, above thresh+(knee/2) there is the same gain reduction as without a knee, and in between there is a gradual increase in gain reduction prePost : places the level detector either at the input or after the gain computer; this turns it from a linear return-to-zero detector into a log domain return-to-threshold detector It uses a strength parameter instead of the traditional ratio, in order to be able to function as a hard limiter. For that you'd need a ratio of infinity:1, and you cannot express that in Faust. Sometimes even bigger ratios are useful: for example a group recording where one instrument is recorded with both a close microphone and a room microphone, and the instrument is loud enough in the room mic when playing loud, but you want to boost it when it is playing soft.","title":"Usage"},{"location":"libs/compressors/#references_1","text":"http://en.wikipedia.org/wiki/Dynamic_range_compression Digital Dynamic Range Compressor Design, A Tutorial and Analysis, Dimitrios GIANNOULIS ( Dimitrios.Giannoulis@eecs.qmul.ac.uk ), Michael MASSBERG ( michael@massberg.org ), and Josuah D.REISS ( josh.reiss@eecs.qmul.ac.uk )","title":"References"},{"location":"libs/compressors/#copeak_compression_gain_n_chan_db","text":"N channels dynamic range compressor gain computer with dB output. peak_compression_gain_N_chan_db is a standard Faust function.","title":"(co.)peak_compression_gain_N_chan_db"},{"location":"libs/compressors/#usage_1","text":"si.bus(N) : peak_compression_gain_N_chan_db(strength,thresh,att,rel,knee,prePost,link,N) : si.bus(N) Where: strength : strength of the compression (0 = no compression, 1 means hard limiting, >1 means over-compression) thresh : dB level threshold above which compression kicks in att : attack time = time constant (sec) when level & compression going up rel : release time = time constant (sec) coming out of compression knee : a gradual increase in gain reduction around the threshold: below thresh-(knee/2) there is no gain reduction, above thresh+(knee/2) there is the same gain reduction as without a knee, and in between there is a gradual increase in gain reduction prePost : places the level detector either at the input or after the gain computer; this turns it from a linear return-to-zero detector into a log domain return-to-threshold detector link : the amount of linkage between the channels: 0 = each channel is independent, 1 = all channels have the same amount of gain reduction N : the number of channels of the compressor, known at compile time It uses a strength parameter instead of the traditional ratio, in order to be able to function as a hard limiter. For that you'd need a ratio of infinity:1, and you cannot express that in Faust. Sometimes even bigger ratios are useful: for example a group recording where one instrument is recorded with both a close microphone and a room microphone, and the instrument is loud enough in the room mic when playing loud, but you want to boost it when it is playing soft.","title":"Usage"},{"location":"libs/compressors/#references_2","text":"http://en.wikipedia.org/wiki/Dynamic_range_compression Digital Dynamic Range Compressor Design, A Tutorial and Analysis, Dimitrios GIANNOULIS ( Dimitrios.Giannoulis@eecs.qmul.ac.uk ), Michael MASSBERG ( michael@massberg.org ), and Josuah D.REISS ( josh.reiss@eecs.qmul.ac.uk )","title":"References"},{"location":"libs/compressors/#coffcompressor_n_chan","text":"Feed forward N channels dynamic range compressor. FFcompressor_N_chan is a standard Faust function.","title":"(co.)FFcompressor_N_chan"},{"location":"libs/compressors/#usage_2","text":"si.bus(N) : FFcompressor_N_chan(strength,thresh,att,rel,knee,prePost,link,meter,N) : si.bus(N) Where: strength : strength of the compression (0 = no compression, 1 means hard limiting, >1 means over-compression) thresh : dB level threshold above which compression kicks in att : attack time = time constant (sec) when level & compression going up rel : release time = time constant (sec) coming out of compression knee : a gradual increase in gain reduction around the threshold: below thresh-(knee/2) there is no gain reduction, above thresh+(knee/2) there is the same gain reduction as without a knee, and in between there is a gradual increase in gain reduction prePost : places the level detector either at the input or after the gain computer; this turns it from a linear return-to-zero detector into a log domain return-to-threshold detector link : the amount of linkage between the channels: 0 = each channel is independent, 1 = all channels have the same amount of gain reduction meter : a gain reduction meter. It can be implemented like so: meter = _<:(_, (ba.linear2db:max(maxGR):meter_group((hbargraph(\"[1][unit:dB][tooltip: gain reduction in dB]\", maxGR, 0))))):attach; N : the number of channels of the compressor, known at compile time It uses a strength parameter instead of the traditional ratio, in order to be able to function as a hard limiter. For that you'd need a ratio of infinity:1, and you cannot express that in Faust. Sometimes even bigger ratios are useful: for example a group recording where one instrument is recorded with both a close microphone and a room microphone, and the instrument is loud enough in the room mic when playing loud, but you want to boost it when it is playing soft.","title":"Usage"},{"location":"libs/compressors/#references_3","text":"http://en.wikipedia.org/wiki/Dynamic_range_compression Digital Dynamic Range Compressor Design, A Tutorial and Analysis, Dimitrios GIANNOULIS ( Dimitrios.Giannoulis@eecs.qmul.ac.uk ), Michael MASSBERG ( michael@massberg.org ), and Josuah D.REISS ( josh.reiss@eecs.qmul.ac.uk )","title":"References"},{"location":"libs/compressors/#cofbcompressor_n_chan","text":"Feed back N channels dynamic range compressor. FBcompressor_N_chan is a standard Faust function.","title":"(co.)FBcompressor_N_chan"},{"location":"libs/compressors/#usage_3","text":"si.bus(N) : FBcompressor_N_chan(strength,thresh,att,rel,knee,prePost,link,meter,N) : si.bus(N) Where: strength : strength of the compression (0 = no compression, 1 means hard limiting, >1 means over-compression) thresh : dB level threshold above which compression kicks in att : attack time = time constant (sec) when level & compression going up rel : release time = time constant (sec) coming out of compression knee : a gradual increase in gain reduction around the threshold: below thresh-(knee/2) there is no gain reduction, above thresh+(knee/2) there is the same gain reduction as without a knee, and in between there is a gradual increase in gain reduction prePost : places the level detector either at the input or after the gain computer; this turns it from a linear return-to-zero detector into a log domain return-to-threshold detector link : the amount of linkage between the channels. 0 = each channel is independent, 1 = all channels have the same amount of gain reduction meter : a gain reduction meter. It can be implemented with: meter = _ <: (_,(ba.linear2db:max(maxGR):meter_group((hbargraph(\"[1][unit:dB][tooltip: gain reduction in dB]\", maxGR, 0))))):attach; or it can be omitted by defining meter = _; . N : the number of channels of the compressor, known at compile time It uses a strength parameter instead of the traditional ratio, in order to be able to function as a hard limiter. For that you'd need a ratio of infinity:1, and you cannot express that in Faust. Sometimes even bigger ratios are useful: for example a group recording where one instrument is recorded with both a close microphone and a room microphone, and the instrument is loud enough in the room mic when playing loud, but you want to boost it when it is playing soft.","title":"Usage"},{"location":"libs/compressors/#references_4","text":"http://en.wikipedia.org/wiki/Dynamic_range_compression Digital Dynamic Range Compressor Design, A Tutorial and Analysis, Dimitrios GIANNOULIS ( Dimitrios.Giannoulis@eecs.qmul.ac.uk ), Michael MASSBERG ( michael@massberg.org ), and Josuah D.REISS ( josh.reiss@eecs.qmul.ac.uk )","title":"References"},{"location":"libs/compressors/#cofbffcompressor_n_chan","text":"Feed forward / feed back N channels dynamic range compressor. The feedback part has a much higher strength, so they end up sounding similar. FBFFcompressor_N_chan is a standard Faust function.","title":"(co.)FBFFcompressor_N_chan"},{"location":"libs/compressors/#usage_4","text":"si.bus(N) : FBFFcompressor_N_chan(strength,thresh,att,rel,knee,prePost,link,FBFF,meter,N) : si.bus(N) Where: strength : strength of the compression (0 = no compression, 1 means hard limiting, >1 means over-compression) thresh : dB level threshold above which compression kicks in att : attack time = time constant (sec) when level & compression going up rel : release time = time constant (sec) coming out of compression knee : a gradual increase in gain reduction around the threshold: below thresh-(knee/2) there is no gain reduction, above thresh+(knee/2) there is the same gain reduction as without a knee, and in between there is a gradual increase in gain reduction prePost : places the level detector either at the input or after the gain computer; this turns it from a linear return-to-zero detector into a log domain return-to-threshold detector link : the amount of linkage between the channels: 0 = each channel is independent, 1 = all channels have the same amount of gain reduction FBFF : fade between feed forward (0) and feed back (1) compression meter : a gain reduction meter. It can be implemented like so: meter = _<:(_,(max(maxGR):meter_group((hbargraph(\"[1][unit:dB][tooltip: gain reduction in dB]\", maxGR, 0))))):attach; N : the number of channels of the compressor, known at compile time It uses a strength parameter instead of the traditional ratio, in order to be able to function as a hard limiter. For that you'd need a ratio of infinity:1, and you cannot express that in Faust. Sometimes even bigger ratios are useful: for example a group recording where one instrument is recorded with both a close microphone and a room microphone, and the instrument is loud enough in the room mic when playing loud, but you want to boost it when it is playing soft.","title":"Usage"},{"location":"libs/compressors/#references_5","text":"http://en.wikipedia.org/wiki/Dynamic_range_compression Digital Dynamic Range Compressor Design, A Tutorial and Analysis, Dimitrios GIANNOULIS ( Dimitrios.Giannoulis@eecs.qmul.ac.uk ), Michael MASSBERG ( michael@massberg.org ), and Josuah D.REISS ( josh.reiss@eecs.qmul.ac.uk )","title":"References"},{"location":"libs/compressors/#corms_compression_gain_mono_db","text":"Mono RMS dynamic range compressor gain computer with dB output. RMS_compression_gain_mono_db is a standard Faust function.","title":"(co.)RMS_compression_gain_mono_db"},{"location":"libs/compressors/#usage_5","text":"_ : RMS_compression_gain_mono_db(strength,thresh,att,rel,knee,prePost) : _ Where: strength : strength of the compression (0 = no compression, 1 means hard limiting, >1 means over-compression) thresh : dB level threshold above which compression kicks in att : attack time = time constant (sec) when level & compression going up rel : release time = time constant (sec) coming out of compression knee : a gradual increase in gain reduction around the threshold: below thresh-(knee/2) there is no gain reduction, above thresh+(knee/2) there is the same gain reduction as without a knee, and in between there is a gradual increase in gain reduction prePost : places the level detector either at the input or after the gain computer; this turns it from a linear return-to-zero detector into a log domain return-to-threshold detector It uses a strength parameter instead of the traditional ratio, in order to be able to function as a hard limiter. For that you'd need a ratio of infinity:1, and you cannot express that in Faust. Sometimes even bigger ratios are useful: for example a group recording where one instrument is recorded with both a close microphone and a room microphone, and the instrument is loud enough in the room mic when playing loud, but you want to boost it when it is playing soft.","title":"Usage"},{"location":"libs/compressors/#references_6","text":"http://en.wikipedia.org/wiki/Dynamic_range_compression Digital Dynamic Range Compressor Design, A Tutorial and Analysis, Dimitrios GIANNOULIS ( Dimitrios.Giannoulis@eecs.qmul.ac.uk ), Michael MASSBERG ( michael@massberg.org ), and Josuah D.REISS ( josh.reiss@eecs.qmul.ac.uk )","title":"References"},{"location":"libs/compressors/#corms_compression_gain_n_chan_db","text":"RMS N channels dynamic range compressor gain computer with dB output. RMS_compression_gain_N_chan_db is a standard Faust function.","title":"(co.)RMS_compression_gain_N_chan_db"},{"location":"libs/compressors/#usage_6","text":"si.bus(N) : RMS_compression_gain_N_chan_db(strength,thresh,att,rel,knee,prePost,link,N) : si.bus(N) Where: strength : strength of the compression (0 = no compression, 1 means hard limiting, >1 means over-compression) thresh : dB level threshold above which compression kicks in att : attack time = time constant (sec) when level & compression going up rel : release time = time constant (sec) coming out of compression knee : a gradual increase in gain reduction around the threshold: below thresh-(knee/2) there is no gain reduction, above thresh+(knee/2) there is the same gain reduction as without a knee, and in between there is a gradual increase in gain reduction prePost : places the level detector either at the input or after the gain computer; this turns it from a linear return-to-zero detector into a log domain return-to-threshold detector link : the amount of linkage between the channels: 0 = each channel is independent, 1 = all channels have the same amount of gain reduction N : the number of channels of the compressor It uses a strength parameter instead of the traditional ratio, in order to be able to function as a hard limiter. For that you'd need a ratio of infinity:1, and you cannot express that in Faust. Sometimes even bigger ratios are useful: for example a group recording where one instrument is recorded with both a close microphone and a room microphone, and the instrument is loud enough in the room mic when playing loud, but you want to boost it when it is playing soft.","title":"Usage"},{"location":"libs/compressors/#references_7","text":"http://en.wikipedia.org/wiki/Dynamic_range_compression Digital Dynamic Range Compressor Design, A Tutorial and Analysis, Dimitrios GIANNOULIS ( Dimitrios.Giannoulis@eecs.qmul.ac.uk ), Michael MASSBERG ( michael@massberg.org ), and Josuah D.REISS ( josh.reiss@eecs.qmul.ac.uk )","title":"References"},{"location":"libs/compressors/#corms_fbffcompressor_n_chan","text":"RMS feed forward / feed back N channels dynamic range compressor. The feedback part has a much higher strength, so they end up sounding similar. RMS_FBFFcompressor_N_chan is a standard Faust function.","title":"(co.)RMS_FBFFcompressor_N_chan"},{"location":"libs/compressors/#usage_7","text":"si.bus(N) : RMS_FBFFcompressor_N_chan(strength,thresh,att,rel,knee,prePost,link,FBFF,meter,N) : si.bus(N) Where: strength : strength of the compression (0 = no compression, 1 means hard limiting, >1 means over-compression) thresh : dB level threshold above which compression kicks in att : attack time = time constant (sec) when level & compression going up rel : release time = time constant (sec) coming out of compression knee : a gradual increase in gain reduction around the threshold: below thresh-(knee/2) there is no gain reduction, above thresh+(knee/2) there is the same gain reduction as without a knee, and in between there is a gradual increase in gain reduction prePost : places the level detector either at the input or after the gain computer; this turns it from a linear return-to-zero detector into a log domain return-to-threshold detector link : the amount of linkage between the channels: 0 = each channel is independent, 1 = all channels have the same amount of gain reduction FBFF : fade between feed forward (0) and feed back (1) compression. meter : a gain reduction meter. It can be implemented with: meter = _<:(_,(max(maxGR):meter_group((hbargraph(\"[1][unit:dB][tooltip: gain reduction in dB]\", maxGR, 0))))):attach; N : the number of channels of the compressor, known at compile time It uses a strength parameter instead of the traditional ratio, in order to be able to function as a hard limiter. For that you'd need a ratio of infinity:1, and you cannot express that in Faust. Sometimes even bigger ratios are useful: for example a group recording where one instrument is recorded with both a close microphone and a room microphone, and the instrument is loud enough in the room mic when playing loud, but you want to boost it when it is playing soft. To save CPU we cheat a bit, in a similar way as in the original libs: instead of crosfading between two sets of gain calculators as above, we take the abs of the audio from both the FF and FB, and crossfade between those, and feed that into one set of gain calculators again the strength is much higher when in FB mode, but implemented differently.","title":"Usage"},{"location":"libs/compressors/#references_8","text":"http://en.wikipedia.org/wiki/Dynamic_range_compression Digital Dynamic Range Compressor Design, A Tutorial and Analysis, Dimitrios GIANNOULIS ( Dimitrios.Giannoulis@eecs.qmul.ac.uk ), Michael MASSBERG ( michael@massberg.org ), and Josuah D.REISS ( josh.reiss@eecs.qmul.ac.uk )","title":"References"},{"location":"libs/compressors/#corms_fbcompressor_peak_limiter_n_chan","text":"N channel RMS feed back compressor into peak limiter feeding back into the FB compressor. By combining them this way, they complement each other optimally: the RMS compressor doesn't have to deal with the peaks, and the peak limiter get's spared from the steady state signal. The feedback part has a much higher strength, so they end up sounding similar. RMS_FBcompressor_peak_limiter_N_chan is a standard Faust function.","title":"(co.)RMS_FBcompressor_peak_limiter_N_chan"},{"location":"libs/compressors/#usage_8","text":"si.bus(N) : RMS_FBcompressor_peak_limiter_N_chan(strength,thresh,threshLim,att,rel,knee,link,meter,meterLim,N) : si.bus(N) Where: strength : strength of the compression (0 = no compression, 1 means hard limiting, >1 means over-compression) thresh : dB level threshold above which compression kicks in threshLim : dB level threshold above which the brickwall limiter kicks in att : attack time = time constant (sec) when level & compression going up this is also used as the release time of the limiter rel : release time = time constant (sec) coming out of compression knee : a gradual increase in gain reduction around the threshold: below thresh-(knee/2) there is no gain reduction, above thresh+(knee/2) there is the same gain reduction as without a knee, and in between there is a gradual increase in gain reduction the limiter uses a knee half this size link : the amount of linkage between the channels: 0 = each channel is independent, 1 = all channels have the same amount of gain reduction meter : compressor gain reduction meter. It can be implemented with: meter = _<:(_,(max(maxGR):meter_group((hbargraph(\"[1][unit:dB][tooltip: gain reduction in dB]\", maxGR, 0))))):attach; meterLim : brickwall limiter gain reduction meter. It can be implemented with: meterLim = _<:(_,(max(maxGR):meter_group((hbargraph(\"[1][unit:dB][tooltip: gain reduction in dB]\", maxGR, 0))))):attach; N : the number of channels of the compressor, known at compile time It uses a strength parameter instead of the traditional ratio, in order to be able to function as a hard limiter. For that you'd need a ratio of infinity:1, and you cannot express that in Faust. Sometimes even bigger ratios are useful: for example a group recording where one instrument is recorded with both a close microphone and a room microphone, and the instrument is loud enough in the room mic when playing loud, but you want to boost it when it is playing soft.","title":"Usage"},{"location":"libs/compressors/#references_9","text":"http://en.wikipedia.org/wiki/Dynamic_range_compression Digital Dynamic Range Compressor Design, A Tutorial and Analysis, Dimitrios GIANNOULIS ( Dimitrios.Giannoulis@eecs.qmul.ac.uk ), Michael MASSBERG ( michael@massberg.org ), and Josuah D.REISS ( josh.reiss@eecs.qmul.ac.uk )","title":"References"},{"location":"libs/compressors/#linear-gain-computer-section","text":"The gain computer functions in this section have been replaced by a version that outputs dBs, but we retain the linear output version for backward compatibility.","title":"Linear gain computer section"},{"location":"libs/compressors/#copeak_compression_gain_mono","text":"Mono dynamic range compressor gain computer with linear output. peak_compression_gain_mono is a standard Faust function.","title":"(co.)peak_compression_gain_mono"},{"location":"libs/compressors/#usage_9","text":"_ : peak_compression_gain_mono(strength,thresh,att,rel,knee,prePost) : _ Where: strength : strength of the compression (0 = no compression, 1 means hard limiting, >1 means over-compression) thresh : dB level threshold above which compression kicks in att : attack time = time constant (sec) when level & compression going up rel : release time = time constant (sec) coming out of compression knee : a gradual increase in gain reduction around the threshold: below thresh-(knee/2) there is no gain reduction, above thresh+(knee/2) there is the same gain reduction as without a knee, and in between there is a gradual increase in gain reduction prePost : places the level detector either at the input or after the gain computer; this turns it from a linear return-to-zero detector into a log domain return-to-threshold detector It uses a strength parameter instead of the traditional ratio, in order to be able to function as a hard limiter. For that you'd need a ratio of infinity:1, and you cannot express that in Faust. Sometimes even bigger ratios are useful: for example a group recording where one instrument is recorded with both a close microphone and a room microphone, and the instrument is loud enough in the room mic when playing loud, but you want to boost it when it is playing soft.","title":"Usage"},{"location":"libs/compressors/#references_10","text":"http://en.wikipedia.org/wiki/Dynamic_range_compression Digital Dynamic Range Compressor Design, A Tutorial and Analysis, Dimitrios GIANNOULIS ( Dimitrios.Giannoulis@eecs.qmul.ac.uk ), Michael MASSBERG ( michael@massberg.org ), and Josuah D.REISS ( josh.reiss@eecs.qmul.ac.uk )","title":"References"},{"location":"libs/compressors/#copeak_compression_gain_n_chan","text":"N channels dynamic range compressor gain computer with linear output. peak_compression_gain_N_chan is a standard Faust function.","title":"(co.)peak_compression_gain_N_chan"},{"location":"libs/compressors/#usage_10","text":"si.bus(N) : peak_compression_gain_N_chan(strength,thresh,att,rel,knee,prePost,link,N) : si.bus(N) Where: strength : strength of the compression (0 = no compression, 1 means hard limiting, >1 means over-compression) thresh : dB level threshold above which compression kicks in att : attack time = time constant (sec) when level & compression going up rel : release time = time constant (sec) coming out of compression knee : a gradual increase in gain reduction around the threshold: below thresh-(knee/2) there is no gain reduction, above thresh+(knee/2) there is the same gain reduction as without a knee, and in between there is a gradual increase in gain reduction prePost : places the level detector either at the input or after the gain computer; this turns it from a linear return-to-zero detector into a log domain return-to-threshold detector link : the amount of linkage between the channels: 0 = each channel is independent, 1 = all channels have the same amount of gain reduction N : the number of channels of the compressor, known at compile time It uses a strength parameter instead of the traditional ratio, in order to be able to function as a hard limiter. For that you'd need a ratio of infinity:1, and you cannot express that in Faust. Sometimes even bigger ratios are useful: for example a group recording where one instrument is recorded with both a close microphone and a room microphone, and the instrument is loud enough in the room mic when playing loud, but you want to boost it when it is playing soft.","title":"Usage"},{"location":"libs/compressors/#references_11","text":"http://en.wikipedia.org/wiki/Dynamic_range_compression Digital Dynamic Range Compressor Design, A Tutorial and Analysis, Dimitrios GIANNOULIS ( Dimitrios.Giannoulis@eecs.qmul.ac.uk ), Michael MASSBERG ( michael@massberg.org ), and Josuah D.REISS ( josh.reiss@eecs.qmul.ac.uk )","title":"References"},{"location":"libs/compressors/#corms_compression_gain_mono","text":"Mono RMS dynamic range compressor gain computer with linear output. RMS_compression_gain_mono is a standard Faust function.","title":"(co.)RMS_compression_gain_mono"},{"location":"libs/compressors/#usage_11","text":"_ : RMS_compression_gain_mono(strength,thresh,att,rel,knee,prePost) : _ Where: strength : strength of the compression (0 = no compression, 1 means hard limiting, >1 means over-compression) thresh : dB level threshold above which compression kicks in att : attack time = time constant (sec) when level & compression going up rel : release time = time constant (sec) coming out of compression knee : a gradual increase in gain reduction around the threshold: below thresh-(knee/2) there is no gain reduction, above thresh+(knee/2) there is the same gain reduction as without a knee, and in between there is a gradual increase in gain reduction prePost : places the level detector either at the input or after the gain computer; this turns it from a linear return-to-zero detector into a log domain return-to-threshold detector It uses a strength parameter instead of the traditional ratio, in order to be able to function as a hard limiter. For that you'd need a ratio of infinity:1, and you cannot express that in Faust. Sometimes even bigger ratios are useful: for example a group recording where one instrument is recorded with both a close microphone and a room microphone, and the instrument is loud enough in the room mic when playing loud, but you want to boost it when it is playing soft.","title":"Usage"},{"location":"libs/compressors/#references_12","text":"http://en.wikipedia.org/wiki/Dynamic_range_compression Digital Dynamic Range Compressor Design, A Tutorial and Analysis, Dimitrios GIANNOULIS ( Dimitrios.Giannoulis@eecs.qmul.ac.uk ), Michael MASSBERG ( michael@massberg.org ), and Josuah D.REISS ( josh.reiss@eecs.qmul.ac.uk )","title":"References"},{"location":"libs/compressors/#corms_compression_gain_n_chan","text":"RMS N channels dynamic range compressor gain computer with linear output. RMS_compression_gain_N_chan is a standard Faust function.","title":"(co.)RMS_compression_gain_N_chan"},{"location":"libs/compressors/#usage_12","text":"si.bus(N) : RMS_compression_gain_N_chan(strength,thresh,att,rel,knee,prePost,link,N) : si.bus(N) Where: strength : strength of the compression (0 = no compression, 1 means hard limiting, >1 means over-compression) thresh : dB level threshold above which compression kicks in att : attack time = time constant (sec) when level & compression going up rel : release time = time constant (sec) coming out of compression knee : a gradual increase in gain reduction around the threshold: below thresh-(knee/2) there is no gain reduction, above thresh+(knee/2) there is the same gain reduction as without a knee, and in between there is a gradual increase in gain reduction prePost : places the level detector either at the input or after the gain computer; this turns it from a linear return-to-zero detector into a log domain return-to-threshold detector link : the amount of linkage between the channels: 0 = each channel is independent, 1 = all channels have the same amount of gain reduction N : the number of channels of the compressor, known at compile time It uses a strength parameter instead of the traditional ratio, in order to be able to function as a hard limiter. For that you'd need a ratio of infinity:1, and you cannot express that in Faust. Sometimes even bigger ratios are useful: for example a group recording where one instrument is recorded with both a close microphone and a room microphone, and the instrument is loud enough in the room mic when playing loud, but you want to boost it when it is playing soft.","title":"Usage"},{"location":"libs/compressors/#references_13","text":"http://en.wikipedia.org/wiki/Dynamic_range_compression Digital Dynamic Range Compressor Design, A Tutorial and Analysis, Dimitrios GIANNOULIS ( Dimitrios.Giannoulis@eecs.qmul.ac.uk ), Michael MASSBERG ( michael@massberg.org ), and Josuah D.REISS ( josh.reiss@eecs.qmul.ac.uk )","title":"References"},{"location":"libs/compressors/#original-versions-section","text":"The functions in this section are largely superseded by the limiters above, but we retain them for backward compatibility and for situations in which a more permissive, MIT-style license is required.","title":"Original versions section"},{"location":"libs/compressors/#cocompressor_lad_mono","text":"Mono dynamic range compressor with lookahead delay. compressor_lad_mono is a standard Faust function.","title":"(co.)compressor_lad_mono"},{"location":"libs/compressors/#usage_13","text":"_ : compressor_lad_mono(lad,ratio,thresh,att,rel) : _ Where: lad : lookahead delay in seconds (nonnegative) - gets rounded to nearest sample. The effective attack time is a good setting ratio : compression ratio (1 = no compression, >1 means compression) Ratios: 4 is moderate compression, 8 is strong compression, 12 is mild limiting, and 20 is pretty hard limiting at the threshold thresh : dB level threshold above which compression kicks in (0 dB = max level) att : attack time = time constant (sec) when level & compression are going up rel : release time = time constant (sec) coming out of compression","title":"Usage"},{"location":"libs/compressors/#references_14","text":"http://en.wikipedia.org/wiki/Dynamic_range_compression https://ccrma.stanford.edu/~jos/filters/Nonlinear_Filter_Example_Dynamic.html Albert Graef's \"faust2pd\"/examples/synth/compressor_.dsp More features: https://github.com/magnetophon/faustCompressors","title":"References"},{"location":"libs/compressors/#cocompressor_mono","text":"Mono dynamic range compressors. compressor_mono is a standard Faust function.","title":"(co.)compressor_mono"},{"location":"libs/compressors/#usage_14","text":"_ : compressor_mono(ratio,thresh,att,rel) : _ Where: ratio : compression ratio (1 = no compression, >1 means compression) Ratios: 4 is moderate compression, 8 is strong compression, 12 is mild limiting, and 20 is pretty hard limiting at the threshold thresh : dB level threshold above which compression kicks in (0 dB = max level) att : attack time = time constant (sec) when level & compression are going up rel : release time = time constant (sec) coming out of compression","title":"Usage"},{"location":"libs/compressors/#references_15","text":"http://en.wikipedia.org/wiki/Dynamic_range_compression https://ccrma.stanford.edu/~jos/filters/Nonlinear_Filter_Example_Dynamic.html Albert Graef's \"faust2pd\"/examples/synth/compressor_.dsp More features: https://github.com/magnetophon/faustCompressors","title":"References"},{"location":"libs/compressors/#cocompressor_stereo","text":"Stereo dynamic range compressors.","title":"(co.)compressor_stereo"},{"location":"libs/compressors/#usage_15","text":"_,_ : compressor_stereo(ratio,thresh,att,rel) : _,_ Where: ratio : compression ratio (1 = no compression, >1 means compression) thresh : dB level threshold above which compression kicks in (0 dB = max level) att : attack time = time constant (sec) when level & compression going up rel : release time = time constant (sec) coming out of compression","title":"Usage"},{"location":"libs/compressors/#references_16","text":"http://en.wikipedia.org/wiki/Dynamic_range_compression https://ccrma.stanford.edu/~jos/filters/Nonlinear_Filter_Example_Dynamic.html Albert Graef's \"faust2pd\"/examples/synth/compressor_.dsp More features: https://github.com/magnetophon/faustCompressors","title":"References"},{"location":"libs/compressors/#cocompression_gain_mono","text":"Compression-gain calculation for dynamic range compressors.","title":"(co.)compression_gain_mono"},{"location":"libs/compressors/#usage_16","text":"_ : compression_gain_mono(ratio,thresh,att,rel) : _ Where: ratio : compression ratio (1 = no compression, >1 means compression) thresh : dB level threshold above which compression kicks in (0 dB = max level) att : attack time = time constant (sec) when level & compression going up rel : release time = time constant (sec) coming out of compression","title":"Usage"},{"location":"libs/compressors/#references_17","text":"http://en.wikipedia.org/wiki/Dynamic_range_compression https://ccrma.stanford.edu/~jos/filters/Nonlinear_Filter_Example_Dynamic.html Albert Graef's \"faust2pd\"/examples/synth/compressor_.dsp More features: https://github.com/magnetophon/faustCompressors","title":"References"},{"location":"libs/compressors/#colimiter_1176_r4_mono","text":"A limiter guards against hard-clipping. It can be implemented as a compressor having a high threshold (near the clipping level), fast attack, and high ratio. Since the compression ratio is so high, some knee smoothing is desirable (for softer limiting). This example is intended to get you started using compressors as limiters, so all parameters are hardwired here to nominal values. ratio : 4 (moderate compression). See compressor_mono comments for a guide to other choices. Mike Shipley likes this (lowest) setting on the 1176. (Grammy award-winning mixer for Queen, Tom Petty, etc.). thresh : -6 dB, meaning 4:1 compression begins at amplitude 1/2. att : 800 MICROseconds (Note: scaled by ratio in the 1176) The 1176 range is said to be 20-800 microseconds. Faster attack gives \"more bite\" (e.g. on vocals), and makes hard-clipping less likely on fast overloads. rel : 0.5 s (Note: scaled by ratio in the 1176) The 1176 range is said to be 50-1100 ms. The 1176 also has a \"bright, clear eq effect\" (use filters.lib if desired). limiter_1176_R4_mono is a standard Faust function.","title":"(co.)limiter_1176_R4_mono"},{"location":"libs/compressors/#usage_17","text":"_ : limiter_1176_R4_mono : _","title":"Usage"},{"location":"libs/compressors/#reference","text":"http://en.wikipedia.org/wiki/1176_Peak_Limiter","title":"Reference:"},{"location":"libs/compressors/#colimiter_1176_r4_stereo","text":"A limiter guards against hard-clipping. It can be implemented as a compressor having a high threshold (near the clipping level), fast attack and release, and high ratio. Since the ratio is so high, some knee smoothing is desirable (\"soft limiting\"). This example is intended to get you started using compressor_* as a limiter, so all parameters are hardwired to nominal values here. ratio : 4 (moderate compression), 8 (severe compression), 12 (mild limiting), or 20 to 1 (hard limiting). att : 20-800 MICROseconds (Note: scaled by ratio in the 1176). rel : 50-1100 ms (Note: scaled by ratio in the 1176). Mike Shipley likes 4:1 (Grammy-winning mixer for Queen, Tom Petty, etc.) Faster attack gives \"more bite\" (e.g. on vocals). He hears a bright, clear eq effect as well (not implemented here).","title":"(co.)limiter_1176_R4_stereo"},{"location":"libs/compressors/#usage_18","text":"_,_ : limiter_1176_R4_stereo : _,_","title":"Usage"},{"location":"libs/compressors/#reference_1","text":"http://en.wikipedia.org/wiki/1176_Peak_Limiter","title":"Reference:"},{"location":"libs/compressors/#expanders","text":"","title":"Expanders"},{"location":"libs/compressors/#copeak_expansion_gain_n_chan_db","text":"N channels dynamic range expander gain computer. peak_expansion_gain_N_chan_db is a standard Faust function.","title":"(co.)peak_expansion_gain_N_chan_db"},{"location":"libs/compressors/#usage_19","text":"si.bus(N) : peak_expansion_gain_N_chan_db(strength,thresh,range,att,hold,rel,knee,prePost,link,maxHold,N) : si.bus(N) Where: strength : strength of the expansion (0 = no expansion, 100 means gating, <1 means upward compression) thresh : dB level threshold below which expansion kicks in range : maximum amount of expansion in dB att : attack time = time constant (sec) coming out of expansion hold : hold time (sec) rel : release time = time constant (sec) going into expansion knee : a gradual increase in gain reduction around the threshold: above thresh+(knee/2) there is no gain reduction, below thresh-(knee/2) there is the same gain reduction as without a knee, and in between there is a gradual increase in gain reduction prePost : places the level detector either at the input or after the gain computer; this turns it from a linear return-to-zero detector into a log domain return-to-range detector link : the amount of linkage between the channels: 0 = each channel is independent, 1 = all channels have the same amount of gain reduction maxHold : the maximum hold time in samples, known at compile time N : the number of channels of the gain computer, known at compile time","title":"Usage"},{"location":"libs/compressors/#coexpander_n_chan","text":"Feed forward N channels dynamic range expander. expander_N_chan is a standard Faust function.","title":"(co.)expander_N_chan"},{"location":"libs/compressors/#usage_20","text":"si.bus(N) : expander_N_chan(strength,thresh,range,att,hold,rel,knee,prePost,link,meter,maxHold,N) : si.bus(N) Where: strength : strength of the expansion (0 = no expansion, 100 means gating, <1 means upward compression) thresh : dB level threshold below which expansion kicks in range : maximum amount of expansion in dB att : attack time = time constant (sec) coming out of expansion hold : hold time rel : release time = time constant (sec) going into expansion knee : a gradual increase in gain reduction around the threshold: above thresh+(knee/2) there is no gain reduction, below thresh-(knee/2) there is the same gain reduction as without a knee, and in between there is a gradual increase in gain reduction prePost : places the level detector either at the input or after the gain computer; this turns it from a linear return-to-zero detector into a log domain return-to-range detector link : the amount of linkage between the channels: 0 = each channel is independent, 1 = all channels have the same amount of gain reduction meter : a gain reduction meter. It can be implemented like so: meter = _<:(_, (ba.linear2db:max(maxGR):meter_group((hbargraph(\"[1][unit:dB][tooltip: gain reduction in dB]\", maxGR, 0))))):attach; maxHold : the maximum hold time in samples, known at compile time N : the number of channels of the expander, known at compile time","title":"Usage"},{"location":"libs/compressors/#coexpandersc_n_chan","text":"Feed forward N channels dynamic range expander with sidechain. expanderSC_N_chan is a standard Faust function.","title":"(co.)expanderSC_N_chan"},{"location":"libs/compressors/#usage_21","text":"si.bus(N) : expanderSC_N_chan(strength,thresh,range,att,hold,rel,knee,prePost,link,meter,maxHold,N,SCfunction,SCswitch,SCsignal) : si.bus(N) Where: strength : strength of the expansion (0 = no expansion, 100 means gating, <1 means upward compression) thresh : dB level threshold below which expansion kicks in range : maximum amount of expansion in dB att : attack time = time constant (sec) coming out of expansion hold : hold time rel : release time = time constant (sec) going into expansion knee : a gradual increase in gain reduction around the threshold: above thresh+(knee/2) there is no gain reduction, below thresh-(knee/2) there is the same gain reduction as without a knee, and in between there is a gradual increase in gain reduction prePost : places the level detector either at the input or after the gain computer; this turns it from a linear return-to-zero detector into a log domain return-to-range detector link : the amount of linkage between the channels: 0 = each channel is independent, 1 = all channels have the same amount of gain reduction meter : a gain reduction meter. It can be implemented like so: meter = _<:(_, (ba.linear2db:max(maxGR):meter_group((hbargraph(\"[1][unit:dB][tooltip: gain reduction in dB]\", maxGR, 0))))):attach; maxHold : the maximum hold time in samples, known at compile time N : the number of channels of the expander, known at compile time SCfunction : a function that get's placed before the level-detector, needs to have a single input and output SCswitch : use either the regular audio input or the SCsignal as the input for the level detector SCsignal : an audio signal, to be used as the input for the level detector when SCswitch is 1","title":"Usage"},{"location":"libs/compressors/#lookahead-limiters","text":"","title":"Lookahead Limiters"},{"location":"libs/compressors/#colimiter_lad_n","text":"N-channels lookahead limiter inspired by IOhannes Zm\u00f6lnig's post, which is in turn based on the thesis by Peter Falkner \"Entwicklung eines digitalen Stereo-Limiters mit Hilfe des Signalprozessors DSP56001\". This version of the limiter uses a peak-holder with smoothed attack and release based on tau time constant filters. It is also possible to use a time constant that is 2PI*tau by dividing the attack and release times by 2PI . This time constant allows for the amplitude profile to reach 1 - e^(-2PI) of the final peak after the attack time. The input path can be delayed by the same amount as the attack time to synchronise input and amplitude profile, realising a system that is particularly effective as a colourless (ideally) brickwall limiter. Note that the effectiveness of the ceiling settings are dependent on the other parameters, especially the time constant used for the smoothing filters and the lookahead delay. Similarly, the colourless characteristics are also dependent on attack, hold, and release times. Since fluctuations above ~15 Hz are perceived as timbral effects, [Vassilakis and Kendall 2010] it is reasonable to set the attack time to 1/15 seconds for a smooth amplitude modulation. On the other hand, the hold time can be set to the peak-to-peak period of the expected lowest frequency in the signal, which allows for minimal distortion of the low frequencies. The release time can then provide a perceptually linear and gradual gain increase determined by the user for any specific application. The scaling factor for all the channels is determined by the loudest peak between them all, so that amplitude ratios between the signals are kept.","title":"(co.)limiter_lad_N"},{"location":"libs/compressors/#usage_22","text":"si.bus(N) : limiter_lad_N(N, LD, ceiling, attack, hold, release) : si.bus(N) Where: N : is the number of channels, known at compile-time LD : is the lookahead delay in seconds, known at compile-time ceiling : is the linear amplitude output limit attack : is the attack time in seconds hold : is the hold time in seconds release : is the release time in seconds Example for a stereo limiter: limiter_lad_N(2, .01, 1, .01, .1, 1);","title":"Usage"},{"location":"libs/compressors/#reference_2","text":"http://iem.at/~zmoelnig/publications/limiter","title":"Reference:"},{"location":"libs/compressors/#colimiter_lad_mono","text":"Specialised case of limiter_lad_N mono limiter.","title":"(co.)limiter_lad_mono"},{"location":"libs/compressors/#usage_23","text":"_ : limiter_lad_mono(LD, ceiling, attack, hold, release) : _ Where: LD : is the lookahead delay in seconds, known at compile-time ceiling : is the linear amplitude output limit attack : is the attack time in seconds hold : is the hold time in seconds release : is the release time in seconds","title":"Usage"},{"location":"libs/compressors/#reference_3","text":"http://iem.at/~zmoelnig/publications/limiter","title":"Reference:"},{"location":"libs/compressors/#colimiter_lad_stereo","text":"Specialised case of limiter_lad_N stereo limiter.","title":"(co.)limiter_lad_stereo"},{"location":"libs/compressors/#usage_24","text":"_,_ : limiter_lad_stereo(LD, ceiling, attack, hold, release) : _,_ Where: LD : is the lookahead delay in seconds, known at compile-time ceiling : is the linear amplitude output limit attack : is the attack time in seconds hold : is the hold time in seconds release : is the release time in seconds","title":"Usage"},{"location":"libs/compressors/#reference_4","text":"http://iem.at/~zmoelnig/publications/limiter","title":"Reference:"},{"location":"libs/compressors/#colimiter_lad_quad","text":"Specialised case of limiter_lad_N quadraphonic limiter.","title":"(co.)limiter_lad_quad"},{"location":"libs/compressors/#usage_25","text":"si.bus(4) : limiter_lad_quad(LD, ceiling, attack, hold, release) : si.bus(4) Where: LD : is the lookahead delay in seconds, known at compile-time ceiling : is the linear amplitude output limit attack : is the attack time in seconds hold : is the hold time in seconds release : is the release time in seconds","title":"Usage"},{"location":"libs/compressors/#reference_5","text":"http://iem.at/~zmoelnig/publications/limiter","title":"Reference:"},{"location":"libs/compressors/#colimiter_lad_bw","text":"Specialised case of limiter_lad_N and ready-to-use unit-amplitude mono limiting function. This implementation, in particular, uses 2PI*tau time constant filters for attack and release smoothing with synchronised input and gain signals. This function's best application is to be used as a brickwall limiter with the least colouring artefacts while keeping a not-so-slow release curve. Tests have shown that, given a pop song with 60 dB of amplification and a 0-dB-ceiling, the loudest peak recorded was ~0.38 dB.","title":"(co.)limiter_lad_bw"},{"location":"libs/compressors/#usage_26","text":"_ : limiter_lad_bw : _","title":"Usage"},{"location":"libs/compressors/#reference_6","text":"http://iem.at/~zmoelnig/publications/limiter","title":"Reference:"},{"location":"libs/delays/","text":"delays.lib This library contains a collection of delay functions. Its official prefix is de . References https://github.com/grame-cncm/faustlibraries/blob/master/delays.lib Basic Delay Functions (de.)delay Simple d samples delay where n is the maximum delay length as a number of samples. Unlike the @ delay operator, here the delay signal d is explicitly bounded to the interval [0..n]. The consequence is that delay will compile even if the interval of d can't be computed by the compiler. delay is a standard Faust function. Usage _ : delay(n,d) : _ Where: n : the max delay length in samples d : the delay length in samples (integer) (de.)fdelay Simple d samples fractional delay based on 2 interpolated delay lines where n is the maximum delay length as a number of samples. fdelay is a standard Faust function. Usage _ : fdelay(n,d) : _ Where: n : the max delay length in samples d : the delay length in samples (float) (de.)sdelay s(mooth)delay: a mono delay that doesn't click and doesn't transpose when the delay time is changed. Usage _ : sdelay(n,it,d) : _ Where : n : the max delay length in samples it : interpolation time (in samples), for example 1024 d : the delay length in samples (float) Lagrange Interpolation (de.)fdelaylti and (de.)fdelayltv Fractional delay line using Lagrange interpolation. Usage _ : fdelaylt[i|v](N, n, d) : _ Where: N=1,2,3,... is the order of the Lagrange interpolation polynomial (constant numerical expression) n : the max delay length in samples d : the delay length in samples fdelaylti is most efficient, but designed for constant/slowly-varying delay. fdelayltv is more expensive and more robust when the delay varies rapidly. Note: the requested delay should not be less than (N-1)/2 . References https://ccrma.stanford.edu/~jos/pasp/Lagrange_Interpolation.html fixed-delay case variable-delay case Timo I. Laakso et al., \"Splitting the Unit Delay - Tools for Fractional Delay Filter Design\", IEEE Signal Processing Magazine, vol. 13, no. 1, pp. 30-60, Jan 1996. Philippe Depalle and Stephan Tassart, \"Fractional Delay Lines using Lagrange Interpolators\", ICMC Proceedings, pp. 341-343, 1996. (de.)fdelay[N] For convenience, fdelay1 , fdelay2 , fdelay3 , fdelay4 , fdelay5 are also available where N is the order of the interpolation, built using fdelayltv . Thiran Allpass Interpolation Thiran Allpass Interpolation. Reference https://ccrma.stanford.edu/~jos/pasp/Thiran_Allpass_Interpolators.html (de.)fdelay[N]a Delay lines interpolated using Thiran allpass interpolation. Usage _ : fdelay[N]a(n, d) : _ (exactly like fdelay ) Where: N=1,2,3, or 4 is the order of the Thiran interpolation filter (constant numerical expression), and the delay argument is at least N-1/2 . First-order: d at least 0.5, second-order: d at least 1.5, third-order: d at least 2.5, fourth-order: d at least 3.5. n : the max delay length in samples d : the delay length in samples Note The interpolated delay should not be less than N-1/2 . (The allpass delay ranges from N-1/2 to N+1/2 ). This constraint can be alleviated by altering the code, but be aware that allpass filters approach zero delay by means of pole-zero cancellations. Delay arguments too small will produce an UNSTABLE allpass! Because allpass interpolation is recursive, it is not as robust as Lagrange interpolation under time-varying conditions (you may hear clicks when changing the delay rapidly).","title":" delays "},{"location":"libs/delays/#delayslib","text":"This library contains a collection of delay functions. Its official prefix is de .","title":"delays.lib"},{"location":"libs/delays/#references","text":"https://github.com/grame-cncm/faustlibraries/blob/master/delays.lib","title":"References"},{"location":"libs/delays/#basic-delay-functions","text":"","title":"Basic Delay Functions"},{"location":"libs/delays/#dedelay","text":"Simple d samples delay where n is the maximum delay length as a number of samples. Unlike the @ delay operator, here the delay signal d is explicitly bounded to the interval [0..n]. The consequence is that delay will compile even if the interval of d can't be computed by the compiler. delay is a standard Faust function.","title":"(de.)delay"},{"location":"libs/delays/#usage","text":"_ : delay(n,d) : _ Where: n : the max delay length in samples d : the delay length in samples (integer)","title":"Usage"},{"location":"libs/delays/#defdelay","text":"Simple d samples fractional delay based on 2 interpolated delay lines where n is the maximum delay length as a number of samples. fdelay is a standard Faust function.","title":"(de.)fdelay"},{"location":"libs/delays/#usage_1","text":"_ : fdelay(n,d) : _ Where: n : the max delay length in samples d : the delay length in samples (float)","title":"Usage"},{"location":"libs/delays/#desdelay","text":"s(mooth)delay: a mono delay that doesn't click and doesn't transpose when the delay time is changed.","title":"(de.)sdelay"},{"location":"libs/delays/#usage_2","text":"_ : sdelay(n,it,d) : _ Where : n : the max delay length in samples it : interpolation time (in samples), for example 1024 d : the delay length in samples (float)","title":"Usage"},{"location":"libs/delays/#lagrange-interpolation","text":"","title":"Lagrange Interpolation"},{"location":"libs/delays/#defdelaylti-and-defdelayltv","text":"Fractional delay line using Lagrange interpolation.","title":"(de.)fdelaylti and (de.)fdelayltv"},{"location":"libs/delays/#usage_3","text":"_ : fdelaylt[i|v](N, n, d) : _ Where: N=1,2,3,... is the order of the Lagrange interpolation polynomial (constant numerical expression) n : the max delay length in samples d : the delay length in samples fdelaylti is most efficient, but designed for constant/slowly-varying delay. fdelayltv is more expensive and more robust when the delay varies rapidly. Note: the requested delay should not be less than (N-1)/2 .","title":"Usage"},{"location":"libs/delays/#references_1","text":"https://ccrma.stanford.edu/~jos/pasp/Lagrange_Interpolation.html fixed-delay case variable-delay case Timo I. Laakso et al., \"Splitting the Unit Delay - Tools for Fractional Delay Filter Design\", IEEE Signal Processing Magazine, vol. 13, no. 1, pp. 30-60, Jan 1996. Philippe Depalle and Stephan Tassart, \"Fractional Delay Lines using Lagrange Interpolators\", ICMC Proceedings, pp. 341-343, 1996.","title":"References"},{"location":"libs/delays/#defdelayn","text":"For convenience, fdelay1 , fdelay2 , fdelay3 , fdelay4 , fdelay5 are also available where N is the order of the interpolation, built using fdelayltv .","title":"(de.)fdelay[N]"},{"location":"libs/delays/#thiran-allpass-interpolation","text":"Thiran Allpass Interpolation.","title":"Thiran Allpass Interpolation"},{"location":"libs/delays/#reference","text":"https://ccrma.stanford.edu/~jos/pasp/Thiran_Allpass_Interpolators.html","title":"Reference"},{"location":"libs/delays/#defdelayna","text":"Delay lines interpolated using Thiran allpass interpolation.","title":"(de.)fdelay[N]a"},{"location":"libs/delays/#usage_4","text":"_ : fdelay[N]a(n, d) : _ (exactly like fdelay ) Where: N=1,2,3, or 4 is the order of the Thiran interpolation filter (constant numerical expression), and the delay argument is at least N-1/2 . First-order: d at least 0.5, second-order: d at least 1.5, third-order: d at least 2.5, fourth-order: d at least 3.5. n : the max delay length in samples d : the delay length in samples","title":"Usage"},{"location":"libs/delays/#note","text":"The interpolated delay should not be less than N-1/2 . (The allpass delay ranges from N-1/2 to N+1/2 ). This constraint can be alleviated by altering the code, but be aware that allpass filters approach zero delay by means of pole-zero cancellations. Delay arguments too small will produce an UNSTABLE allpass! Because allpass interpolation is recursive, it is not as robust as Lagrange interpolation under time-varying conditions (you may hear clicks when changing the delay rapidly).","title":"Note"},{"location":"libs/demos/","text":"demos.lib This library contains a set of demo functions based on examples located in the /examples folder. Its official prefix is dm . References https://github.com/grame-cncm/faustlibraries/blob/master/demos.lib Analyzers (dm.)mth_octave_spectral_level_demo Demonstrate mth_octave_spectral_level in a standalone GUI. Usage _ : mth_octave_spectral_level_demo(BandsPerOctave) : _ _ : spectral_level_demo : _ // 2/3 octave Filters (dm.)parametric_eq_demo A parametric equalizer application. Usage: _ : parametric_eq_demo : _ (dm.)spectral_tilt_demo A spectral tilt application. Usage _ : spectral_tilt_demo(N) : _ Where: N : filter order (integer) All other parameters interactive (dm.)mth_octave_filterbank_demo and (dm.)filterbank_demo Graphic Equalizer: each filter-bank output signal routes through a fader. Usage _ : mth_octave_filterbank_demo(M) : _ _ : filterbank_demo : _ Where: M : number of bands per octave Effects (dm.)cubicnl_demo Distortion demo application. Usage: _ : cubicnl_demo : _ (dm.)gate_demo Gate demo application. Usage _,_ : gate_demo : _,_ (dm.)compressor_demo Compressor demo application. Usage _,_ : compressor_demo : _,_ (dm.)moog_vcf_demo Illustrate and compare all three Moog VCF implementations above. Usage _ : moog_vcf_demo : _ (dm.)wah4_demo Wah pedal application. Usage _ : wah4_demo : _ (dm.)crybaby_demo Crybaby effect application. Usage _ : crybaby_demo : _ (dm.)flanger_demo Flanger effect application. Usage _,_ : flanger_demo : _,_ (dm.)phaser2_demo Phaser effect demo application. Usage _,_ : phaser2_demo : _,_ Reverbs (dm.)freeverb_demo Freeverb demo application. Usage _,_ : freeverb_demo : _,_ (dm.)stereo_reverb_tester Handy test inputs for reverberator demos below. Usage _ : stereo_reverb_tester : _ (dm.)fdnrev0_demo A reverb application using fdnrev0 . Usage _,_,_,_ : fdnrev0_demo(N,NB,BBSO) : _,_ Where: N : feedback Delay Network (FDN) order / number of delay lines used = order of feedback matrix / 2, 4, 8, or 16 [extend primes array below for 32, 64, ...] NB : number of frequency bands / Number of (nearly) independent T60 controls / Integer 3 or greater BBSO : butterworth band-split order / order of lowpass/highpass bandsplit used at each crossover freq / odd positive integer (dm.)zita_rev_fdn_demo Reverb demo application based on zita_rev_fdn . Usage si.bus(8) : zita_rev_fdn_demo : si.bus(8) (dm.)zita_light Light version of dm.zita_rev1 with only 2 UI elements. Usage _,_ : zita_light : _,_ (dm.)zita_rev1 Example GUI for zita_rev1_stereo (mostly following the Linux zita-rev1 GUI). Only the dry/wet and output level parameters are \"dezippered\" here. If parameters are to be varied in real time, use smooth(0.999) or the like in the same way. Usage _,_ : zita_rev1 : _,_ Reference http://www.kokkinizita.net/linuxaudio/zita-rev1-doc/quickguide.html (dm.)dattorro_rev_demo Example GUI for dattorro_rev with all parameters exposed. With additional dry/wet and output gain control. Usage _,_ : dattorro_rev_demo : _,_ (dm.)jprev_demo Example GUI for jprev with all parameters exposed. Usage _,_ : jprev_demo : _,_ (dm.)greyhole_demo Example GUI for greyhole with all parameters exposed. Usage _,_ : greyhole_demo : _,_ Generators (dm.)sawtooth_demo An application demonstrating the different sawtooth oscillators of Faust. Usage sawtooth_demo : _ (dm.)virtual_analog_oscillator_demo Virtual analog oscillator demo application. Usage virtual_analog_oscillator_demo : _ (dm.)oscrs_demo Simple application demoing filter based oscillators. Usage oscrs_demo : _ (dm.)velvet_noise_demo Listen to velvet_noise! Usage velvet_noise_demo : _ (dm.)latch_demo Illustrate latch operation. Usage echo 'import(\"stdfaust.lib\");' > latch_demo.dsp echo 'process = dm.latch_demo;' >> latch_demo.dsp faust2octave latch_demo.dsp Octave:1> plot(faustout); (dm.)envelopes_demo Illustrate various envelopes overlaid, including their gate * 1.1. Usage echo 'import(\"stdfaust.lib\");' > envelopes_demo.dsp echo 'process = dm.envelopes_demo;' >> envelopes_demo.dsp faust2octave envelopes_demo.dsp Octave:1> plot(faustout); (dm.)fft_spectral_level_demo Make a real-time spectrum analyzer using FFT from analyzers.lib. Usage echo 'import(\"stdfaust.lib\");' > fft_spectral_level_demo.dsp echo 'process = dm.fft_spectral_level_demo;' >> fft_spectral_level_demo.dsp Mac: faust2caqt fft_spectral_level_demo.dsp open fft_spectral_level_demo.app Linux GTK: faust2jack fft_spectral_level_demo.dsp ./fft_spectral_level_demo Linux QT: faust2jaqt fft_spectral_level_demo.dsp ./fft_spectral_level_demo (dm.)reverse_echo_demo(nChans) Multichannel echo effect with reverse delays. Usage echo 'import(\"stdfaust.lib\");' > reverse_echo_demo.dsp echo 'nChans = 3; // Any integer > 1 should work here' >> reverse_echo_demo.dsp echo 'process = dm.reverse_echo_demo(nChans);' >> reverse_echo_demo.dsp Mac: faust2caqt reverse_echo_demo.dsp open reverse_echo_demo.app Linux GTK: faust2jack reverse_echo_demo.dsp ./reverse_echo_demo Linux QT: faust2jaqt reverse_echo_demo.dsp ./reverse_echo_demo Etc. (dm.)pospass_demo Use Positive-Pass Filter pospass() to frequency-shift a sine tone. First, a real sinusoid is converted to its analytic-signal form using pospass() to filter out its negative frequency component. Next, it is multiplied by a modulating complex sinusoid at the shifting frequency to create the frequency-shifted result. The real and imaginary parts are output to channels 1 & 2. For a more interesting frequency-shifting example, check the \"Use Mic\" checkbox to replace the input sinusoid by mic input. Note that frequency shifting is not the same as frequency scaling. A frequency-shifted harmonic signal is usually not harmonic. Very small frequency shifts give interesting chirp effects when there is feedback around the frequency shifter. Usage echo 'import(\"stdfaust.lib\");' > pospass_demo.dsp echo 'process = dm.pospass_demo;' >> pospass_demo.dsp Mac: faust2caqt pospass_demo.dsp open pospass_demo.app Linux GTK: faust2jack pospass_demo.dsp ./pospass_demo Linux QT: faust2jaqt pospass_demo.dsp ./pospass_demo Etc. (dm.)exciter Psychoacoustic harmonic exciter, with GUI. Usage _ : exciter : _ References https://secure.aes.org/forum/pubs/ebriefs/?elib=16939 https://www.researchgate.net/publication/258333577_Modeling_the_Harmonic_Exciter (dm.)vocoder_demo Use example of the vocoder function where an impulse train is used as excitation. Usage _ : vocoder_demo : _ (dm.)colored_noise_demo A coloured noise signal generator. Usage colored_noise_demo : _","title":" demos "},{"location":"libs/demos/#demoslib","text":"This library contains a set of demo functions based on examples located in the /examples folder. Its official prefix is dm .","title":"demos.lib"},{"location":"libs/demos/#references","text":"https://github.com/grame-cncm/faustlibraries/blob/master/demos.lib","title":"References"},{"location":"libs/demos/#analyzers","text":"","title":"Analyzers"},{"location":"libs/demos/#dmmth_octave_spectral_level_demo","text":"Demonstrate mth_octave_spectral_level in a standalone GUI.","title":"(dm.)mth_octave_spectral_level_demo"},{"location":"libs/demos/#usage","text":"_ : mth_octave_spectral_level_demo(BandsPerOctave) : _ _ : spectral_level_demo : _ // 2/3 octave","title":"Usage"},{"location":"libs/demos/#filters","text":"","title":"Filters"},{"location":"libs/demos/#dmparametric_eq_demo","text":"A parametric equalizer application.","title":"(dm.)parametric_eq_demo"},{"location":"libs/demos/#usage_1","text":"_ : parametric_eq_demo : _","title":"Usage:"},{"location":"libs/demos/#dmspectral_tilt_demo","text":"A spectral tilt application.","title":"(dm.)spectral_tilt_demo"},{"location":"libs/demos/#usage_2","text":"_ : spectral_tilt_demo(N) : _ Where: N : filter order (integer) All other parameters interactive","title":"Usage"},{"location":"libs/demos/#dmmth_octave_filterbank_demo-and-dmfilterbank_demo","text":"Graphic Equalizer: each filter-bank output signal routes through a fader.","title":"(dm.)mth_octave_filterbank_demo and (dm.)filterbank_demo"},{"location":"libs/demos/#usage_3","text":"_ : mth_octave_filterbank_demo(M) : _ _ : filterbank_demo : _ Where: M : number of bands per octave","title":"Usage"},{"location":"libs/demos/#effects","text":"","title":"Effects"},{"location":"libs/demos/#dmcubicnl_demo","text":"Distortion demo application.","title":"(dm.)cubicnl_demo"},{"location":"libs/demos/#usage_4","text":"_ : cubicnl_demo : _","title":"Usage:"},{"location":"libs/demos/#dmgate_demo","text":"Gate demo application.","title":"(dm.)gate_demo"},{"location":"libs/demos/#usage_5","text":"_,_ : gate_demo : _,_","title":"Usage"},{"location":"libs/demos/#dmcompressor_demo","text":"Compressor demo application.","title":"(dm.)compressor_demo"},{"location":"libs/demos/#usage_6","text":"_,_ : compressor_demo : _,_","title":"Usage"},{"location":"libs/demos/#dmmoog_vcf_demo","text":"Illustrate and compare all three Moog VCF implementations above.","title":"(dm.)moog_vcf_demo"},{"location":"libs/demos/#usage_7","text":"_ : moog_vcf_demo : _","title":"Usage"},{"location":"libs/demos/#dmwah4_demo","text":"Wah pedal application.","title":"(dm.)wah4_demo"},{"location":"libs/demos/#usage_8","text":"_ : wah4_demo : _","title":"Usage"},{"location":"libs/demos/#dmcrybaby_demo","text":"Crybaby effect application.","title":"(dm.)crybaby_demo"},{"location":"libs/demos/#usage_9","text":"_ : crybaby_demo : _","title":"Usage"},{"location":"libs/demos/#dmflanger_demo","text":"Flanger effect application.","title":"(dm.)flanger_demo"},{"location":"libs/demos/#usage_10","text":"_,_ : flanger_demo : _,_","title":"Usage"},{"location":"libs/demos/#dmphaser2_demo","text":"Phaser effect demo application.","title":"(dm.)phaser2_demo"},{"location":"libs/demos/#usage_11","text":"_,_ : phaser2_demo : _,_","title":"Usage"},{"location":"libs/demos/#reverbs","text":"","title":"Reverbs"},{"location":"libs/demos/#dmfreeverb_demo","text":"Freeverb demo application.","title":"(dm.)freeverb_demo"},{"location":"libs/demos/#usage_12","text":"_,_ : freeverb_demo : _,_","title":"Usage"},{"location":"libs/demos/#dmstereo_reverb_tester","text":"Handy test inputs for reverberator demos below.","title":"(dm.)stereo_reverb_tester"},{"location":"libs/demos/#usage_13","text":"_ : stereo_reverb_tester : _","title":"Usage"},{"location":"libs/demos/#dmfdnrev0_demo","text":"A reverb application using fdnrev0 .","title":"(dm.)fdnrev0_demo"},{"location":"libs/demos/#usage_14","text":"_,_,_,_ : fdnrev0_demo(N,NB,BBSO) : _,_ Where: N : feedback Delay Network (FDN) order / number of delay lines used = order of feedback matrix / 2, 4, 8, or 16 [extend primes array below for 32, 64, ...] NB : number of frequency bands / Number of (nearly) independent T60 controls / Integer 3 or greater BBSO : butterworth band-split order / order of lowpass/highpass bandsplit used at each crossover freq / odd positive integer","title":"Usage"},{"location":"libs/demos/#dmzita_rev_fdn_demo","text":"Reverb demo application based on zita_rev_fdn .","title":"(dm.)zita_rev_fdn_demo"},{"location":"libs/demos/#usage_15","text":"si.bus(8) : zita_rev_fdn_demo : si.bus(8)","title":"Usage"},{"location":"libs/demos/#dmzita_light","text":"Light version of dm.zita_rev1 with only 2 UI elements.","title":"(dm.)zita_light"},{"location":"libs/demos/#usage_16","text":"_,_ : zita_light : _,_","title":"Usage"},{"location":"libs/demos/#dmzita_rev1","text":"Example GUI for zita_rev1_stereo (mostly following the Linux zita-rev1 GUI). Only the dry/wet and output level parameters are \"dezippered\" here. If parameters are to be varied in real time, use smooth(0.999) or the like in the same way.","title":"(dm.)zita_rev1"},{"location":"libs/demos/#usage_17","text":"_,_ : zita_rev1 : _,_","title":"Usage"},{"location":"libs/demos/#reference","text":"http://www.kokkinizita.net/linuxaudio/zita-rev1-doc/quickguide.html","title":"Reference"},{"location":"libs/demos/#dmdattorro_rev_demo","text":"Example GUI for dattorro_rev with all parameters exposed. With additional dry/wet and output gain control.","title":"(dm.)dattorro_rev_demo"},{"location":"libs/demos/#usage_18","text":"_,_ : dattorro_rev_demo : _,_","title":"Usage"},{"location":"libs/demos/#dmjprev_demo","text":"Example GUI for jprev with all parameters exposed.","title":"(dm.)jprev_demo"},{"location":"libs/demos/#usage_19","text":"_,_ : jprev_demo : _,_","title":"Usage"},{"location":"libs/demos/#dmgreyhole_demo","text":"Example GUI for greyhole with all parameters exposed.","title":"(dm.)greyhole_demo"},{"location":"libs/demos/#usage_20","text":"_,_ : greyhole_demo : _,_","title":"Usage"},{"location":"libs/demos/#generators","text":"","title":"Generators"},{"location":"libs/demos/#dmsawtooth_demo","text":"An application demonstrating the different sawtooth oscillators of Faust.","title":"(dm.)sawtooth_demo"},{"location":"libs/demos/#usage_21","text":"sawtooth_demo : _","title":"Usage"},{"location":"libs/demos/#dmvirtual_analog_oscillator_demo","text":"Virtual analog oscillator demo application.","title":"(dm.)virtual_analog_oscillator_demo"},{"location":"libs/demos/#usage_22","text":"virtual_analog_oscillator_demo : _","title":"Usage"},{"location":"libs/demos/#dmoscrs_demo","text":"Simple application demoing filter based oscillators.","title":"(dm.)oscrs_demo"},{"location":"libs/demos/#usage_23","text":"oscrs_demo : _","title":"Usage"},{"location":"libs/demos/#dmvelvet_noise_demo","text":"Listen to velvet_noise!","title":"(dm.)velvet_noise_demo"},{"location":"libs/demos/#usage_24","text":"velvet_noise_demo : _","title":"Usage"},{"location":"libs/demos/#dmlatch_demo","text":"Illustrate latch operation.","title":"(dm.)latch_demo"},{"location":"libs/demos/#usage_25","text":"echo 'import(\"stdfaust.lib\");' > latch_demo.dsp echo 'process = dm.latch_demo;' >> latch_demo.dsp faust2octave latch_demo.dsp Octave:1> plot(faustout);","title":"Usage"},{"location":"libs/demos/#dmenvelopes_demo","text":"Illustrate various envelopes overlaid, including their gate * 1.1.","title":"(dm.)envelopes_demo"},{"location":"libs/demos/#usage_26","text":"echo 'import(\"stdfaust.lib\");' > envelopes_demo.dsp echo 'process = dm.envelopes_demo;' >> envelopes_demo.dsp faust2octave envelopes_demo.dsp Octave:1> plot(faustout);","title":"Usage"},{"location":"libs/demos/#dmfft_spectral_level_demo","text":"Make a real-time spectrum analyzer using FFT from analyzers.lib.","title":"(dm.)fft_spectral_level_demo"},{"location":"libs/demos/#usage_27","text":"echo 'import(\"stdfaust.lib\");' > fft_spectral_level_demo.dsp echo 'process = dm.fft_spectral_level_demo;' >> fft_spectral_level_demo.dsp Mac: faust2caqt fft_spectral_level_demo.dsp open fft_spectral_level_demo.app Linux GTK: faust2jack fft_spectral_level_demo.dsp ./fft_spectral_level_demo Linux QT: faust2jaqt fft_spectral_level_demo.dsp ./fft_spectral_level_demo","title":"Usage"},{"location":"libs/demos/#dmreverse_echo_demonchans","text":"Multichannel echo effect with reverse delays.","title":"(dm.)reverse_echo_demo(nChans)"},{"location":"libs/demos/#usage_28","text":"echo 'import(\"stdfaust.lib\");' > reverse_echo_demo.dsp echo 'nChans = 3; // Any integer > 1 should work here' >> reverse_echo_demo.dsp echo 'process = dm.reverse_echo_demo(nChans);' >> reverse_echo_demo.dsp Mac: faust2caqt reverse_echo_demo.dsp open reverse_echo_demo.app Linux GTK: faust2jack reverse_echo_demo.dsp ./reverse_echo_demo Linux QT: faust2jaqt reverse_echo_demo.dsp ./reverse_echo_demo Etc.","title":"Usage"},{"location":"libs/demos/#dmpospass_demo","text":"Use Positive-Pass Filter pospass() to frequency-shift a sine tone. First, a real sinusoid is converted to its analytic-signal form using pospass() to filter out its negative frequency component. Next, it is multiplied by a modulating complex sinusoid at the shifting frequency to create the frequency-shifted result. The real and imaginary parts are output to channels 1 & 2. For a more interesting frequency-shifting example, check the \"Use Mic\" checkbox to replace the input sinusoid by mic input. Note that frequency shifting is not the same as frequency scaling. A frequency-shifted harmonic signal is usually not harmonic. Very small frequency shifts give interesting chirp effects when there is feedback around the frequency shifter.","title":"(dm.)pospass_demo"},{"location":"libs/demos/#usage_29","text":"echo 'import(\"stdfaust.lib\");' > pospass_demo.dsp echo 'process = dm.pospass_demo;' >> pospass_demo.dsp Mac: faust2caqt pospass_demo.dsp open pospass_demo.app Linux GTK: faust2jack pospass_demo.dsp ./pospass_demo Linux QT: faust2jaqt pospass_demo.dsp ./pospass_demo Etc.","title":"Usage"},{"location":"libs/demos/#dmexciter","text":"Psychoacoustic harmonic exciter, with GUI.","title":"(dm.)exciter"},{"location":"libs/demos/#usage_30","text":"_ : exciter : _","title":"Usage"},{"location":"libs/demos/#references_1","text":"https://secure.aes.org/forum/pubs/ebriefs/?elib=16939 https://www.researchgate.net/publication/258333577_Modeling_the_Harmonic_Exciter","title":"References"},{"location":"libs/demos/#dmvocoder_demo","text":"Use example of the vocoder function where an impulse train is used as excitation.","title":"(dm.)vocoder_demo"},{"location":"libs/demos/#usage_31","text":"_ : vocoder_demo : _","title":"Usage"},{"location":"libs/demos/#dmcolored_noise_demo","text":"A coloured noise signal generator.","title":"(dm.)colored_noise_demo"},{"location":"libs/demos/#usage_32","text":"colored_noise_demo : _","title":"Usage"},{"location":"libs/dx7/","text":"dx7.lib Yamaha DX7 emulation library. Its official prefix is dx . References https://github.com/grame-cncm/faustlibraries/blob/master/dx7.lib (dx.)dx7_ampf DX7 amplitude conversion function. 3 versions of this function are available: dx7_amp_bpf : BPF version (same as in the CSOUND toolkit) dx7_amp_func : estimated mathematical equivalent of dx7_amp_bpf dx7_ampf : default (sugar for dx7_amp_func ) Usage: dx7AmpPreset : dx7_ampf_bpf : _ Where: dx7AmpPreset : DX7 amplitude value (0-99) (dx.)dx7_egraterisef DX7 envelope generator rise conversion function. 3 versions of this function are available: dx7_egraterise_bpf : BPF version (same as in the CSOUND toolkit) dx7_egraterise_func : estimated mathematical equivalent of dx7_egraterise_bpf dx7_egraterisef : default (sugar for dx7_egraterise_func ) Usage: dx7envelopeRise : dx7_egraterisef : _ Where: dx7envelopeRise : DX7 envelope rise value (0-99) (dx.)dx7_egraterisepercf DX7 envelope generator percussive rise conversion function. 3 versions of this function are available: dx7_egrateriseperc_bpf : BPF version (same as in the CSOUND toolkit) dx7_egrateriseperc_func : estimated mathematical equivalent of dx7_egrateriseperc_bpf dx7_egraterisepercf : default (sugar for dx7_egrateriseperc_func ) Usage: dx7envelopePercRise : dx7_egraterisepercf : _ Where: dx7envelopePercRise : DX7 envelope percussive rise value (0-99) (dx.)dx7_egratedecayf DX7 envelope generator decay conversion function. 3 versions of this function are available: dx7_egratedecay_bpf : BPF version (same as in the CSOUND toolkit) dx7_egratedecay_func : estimated mathematical equivalent of dx7_egratedecay_bpf dx7_egratedecayf : default (sugar for dx7_egratedecay_func ) Usage: dx7envelopeDecay : dx7_egratedecayf : _ Where: dx7envelopeDecay : DX7 envelope decay value (0-99) (dx.)dx7_egratedecaypercf DX7 envelope generator percussive decay conversion function. 3 versions of this function are available: dx7_egratedecayperc_bpf : BPF version (same as in the CSOUND toolkit) dx7_egratedecayperc_func : estimated mathematical equivalent of dx7_egratedecayperc_bpf dx7_egratedecaypercf : default (sugar for dx7_egratedecayperc_func ) Usage: dx7envelopePercDecay : dx7_egratedecaypercf : _ Where: dx7envelopePercDecay : DX7 envelope decay value (0-99) (dx.)dx7_eglv2peakf DX7 envelope level to peak conversion function. 3 versions of this function are available: dx7_eglv2peak_bpf : BPF version (same as in the CSOUND toolkit) dx7_eglv2peak_func : estimated mathematical equivalent of dx7_eglv2peak_bpf dx7_eglv2peakf : default (sugar for dx7_eglv2peak_func ) Usage: dx7Level : dx7_eglv2peakf : _ Where: dx7Level : DX7 level value (0-99) (dx.)dx7_velsensf DX7 velocity sensitivity conversion function. Usage: dx7Velocity : dx7_velsensf : _ Where: dx7Velocity : DX7 level value (0-8) (dx.)dx7_fdbkscalef DX7 feedback scaling conversion function. Usage: dx7Feedback : dx7_fdbkscalef : _ Where: dx7Feedback : DX7 feedback value (dx.)dx7_op DX7 Operator. Implements a phase-modulable sine wave oscillator connected to a DX7 envelope generator. Usage: dx7_op(freq,phaseMod,outLev,R1,R2,R3,R4,L1,L2,L3,L4,keyVel,rateScale,type,gain,gate) : _ Where: freq : frequency of the oscillator phaseMod : phase deviation (-1 - 1) outLev : preset output level (0-99) R1 : preset envelope rate 1 (0-99) R2 : preset envelope rate 2 (0-99) R3 : preset envelope rate 3 (0-99) R4 : preset envelope rate 4 (0-99) L1 : preset envelope level 1 (0-99) L2 : preset envelope level 2 (0-99) L3 : preset envelope level 3 (0-99) L4 : preset envelope level 4 (0-99) keyVel : preset key velocity sensitivity (0-99) rateScale : preset envelope rate scale type : preset operator type gain : general gain gate : trigger signal (dx.)dx7_algo DX7 algorithms. Implements the 32 DX7 algorithms (a quick Google search should give your more details on this). Each algorithm uses 6 operators. Usage: dx7_algo(algN,egR1,egR2,egR3,egR4,egL1,egL2,egL3,egL4,outLevel,keyVelSens,ampModSens,opMode,opFreq,opDetune,opRateScale,feedback,lfoDelay,lfoDepth,lfoSpeed,freq,gain,gate) : _ Where: algN : algorithm number (0-31, should be an int...) egR1 : preset envelope rates 1 (a list of 6 values between 0-99) egR2 : preset envelope rates 2 (a list of 6 values between 0-99) egR3 : preset envelope rates 3 (a list of 6 values between 0-99) egR4 : preset envelope rates 4 (a list of 6 values between 0-99) egL1 : preset envelope levels 1 (a list of 6 values between 0-99) egL2 : preset envelope levels 2 (a list of 6 values between 0-99) egL3 : preset envelope levels 3 (a list of 6 values between 0-99) egL4 : preset envelope levels 4 (a list of 6 values between 0-99) outLev : preset output levels (a list of 6 values between 0-99) keyVel : preset key velocity sensitivities (a list of 6 values between 0-99) ampModSens : preset amplitude sensitivities (a list of 6 values between 0-99) opMode : preset operator mode (a list of 6 values between 0-1) opFreq : preset operator frequencies (a list of 6 values between 0-99) opDetune : preset operator detuning (a list of 6 values between 0-99) opRateScale : preset operator rate scale (a list of 6 values between 0-99) feedback : preset operator feedback (a list of 6 values between 0-99) lfoDelay : preset LFO delay (a list of 6 values between 0-99) lfoDepth : preset LFO depth (a list of 6 values between 0-99) lfoSpeed : preset LFO speed (a list of 6 values between 0-99) freq : fundamental frequency gain : general gain gate : trigger signal (dx.)dx7_ui Generic DX7 function where all parameters are controllable using UI elements. The master-with-mute branch must be used for this function to work... This function is MIDI-compatible. Usage dx7_ui : _","title":" dx7 "},{"location":"libs/dx7/#dx7lib","text":"Yamaha DX7 emulation library. Its official prefix is dx .","title":"dx7.lib"},{"location":"libs/dx7/#references","text":"https://github.com/grame-cncm/faustlibraries/blob/master/dx7.lib","title":"References"},{"location":"libs/dx7/#dxdx7_ampf","text":"DX7 amplitude conversion function. 3 versions of this function are available: dx7_amp_bpf : BPF version (same as in the CSOUND toolkit) dx7_amp_func : estimated mathematical equivalent of dx7_amp_bpf dx7_ampf : default (sugar for dx7_amp_func )","title":"(dx.)dx7_ampf"},{"location":"libs/dx7/#usage","text":"dx7AmpPreset : dx7_ampf_bpf : _ Where: dx7AmpPreset : DX7 amplitude value (0-99)","title":"Usage:"},{"location":"libs/dx7/#dxdx7_egraterisef","text":"DX7 envelope generator rise conversion function. 3 versions of this function are available: dx7_egraterise_bpf : BPF version (same as in the CSOUND toolkit) dx7_egraterise_func : estimated mathematical equivalent of dx7_egraterise_bpf dx7_egraterisef : default (sugar for dx7_egraterise_func )","title":"(dx.)dx7_egraterisef"},{"location":"libs/dx7/#usage_1","text":"dx7envelopeRise : dx7_egraterisef : _ Where: dx7envelopeRise : DX7 envelope rise value (0-99)","title":"Usage:"},{"location":"libs/dx7/#dxdx7_egraterisepercf","text":"DX7 envelope generator percussive rise conversion function. 3 versions of this function are available: dx7_egrateriseperc_bpf : BPF version (same as in the CSOUND toolkit) dx7_egrateriseperc_func : estimated mathematical equivalent of dx7_egrateriseperc_bpf dx7_egraterisepercf : default (sugar for dx7_egrateriseperc_func )","title":"(dx.)dx7_egraterisepercf"},{"location":"libs/dx7/#usage_2","text":"dx7envelopePercRise : dx7_egraterisepercf : _ Where: dx7envelopePercRise : DX7 envelope percussive rise value (0-99)","title":"Usage:"},{"location":"libs/dx7/#dxdx7_egratedecayf","text":"DX7 envelope generator decay conversion function. 3 versions of this function are available: dx7_egratedecay_bpf : BPF version (same as in the CSOUND toolkit) dx7_egratedecay_func : estimated mathematical equivalent of dx7_egratedecay_bpf dx7_egratedecayf : default (sugar for dx7_egratedecay_func )","title":"(dx.)dx7_egratedecayf"},{"location":"libs/dx7/#usage_3","text":"dx7envelopeDecay : dx7_egratedecayf : _ Where: dx7envelopeDecay : DX7 envelope decay value (0-99)","title":"Usage:"},{"location":"libs/dx7/#dxdx7_egratedecaypercf","text":"DX7 envelope generator percussive decay conversion function. 3 versions of this function are available: dx7_egratedecayperc_bpf : BPF version (same as in the CSOUND toolkit) dx7_egratedecayperc_func : estimated mathematical equivalent of dx7_egratedecayperc_bpf dx7_egratedecaypercf : default (sugar for dx7_egratedecayperc_func )","title":"(dx.)dx7_egratedecaypercf"},{"location":"libs/dx7/#usage_4","text":"dx7envelopePercDecay : dx7_egratedecaypercf : _ Where: dx7envelopePercDecay : DX7 envelope decay value (0-99)","title":"Usage:"},{"location":"libs/dx7/#dxdx7_eglv2peakf","text":"DX7 envelope level to peak conversion function. 3 versions of this function are available: dx7_eglv2peak_bpf : BPF version (same as in the CSOUND toolkit) dx7_eglv2peak_func : estimated mathematical equivalent of dx7_eglv2peak_bpf dx7_eglv2peakf : default (sugar for dx7_eglv2peak_func )","title":"(dx.)dx7_eglv2peakf"},{"location":"libs/dx7/#usage_5","text":"dx7Level : dx7_eglv2peakf : _ Where: dx7Level : DX7 level value (0-99)","title":"Usage:"},{"location":"libs/dx7/#dxdx7_velsensf","text":"DX7 velocity sensitivity conversion function.","title":"(dx.)dx7_velsensf"},{"location":"libs/dx7/#usage_6","text":"dx7Velocity : dx7_velsensf : _ Where: dx7Velocity : DX7 level value (0-8)","title":"Usage:"},{"location":"libs/dx7/#dxdx7_fdbkscalef","text":"DX7 feedback scaling conversion function.","title":"(dx.)dx7_fdbkscalef"},{"location":"libs/dx7/#usage_7","text":"dx7Feedback : dx7_fdbkscalef : _ Where: dx7Feedback : DX7 feedback value","title":"Usage:"},{"location":"libs/dx7/#dxdx7_op","text":"DX7 Operator. Implements a phase-modulable sine wave oscillator connected to a DX7 envelope generator.","title":"(dx.)dx7_op"},{"location":"libs/dx7/#usage_8","text":"dx7_op(freq,phaseMod,outLev,R1,R2,R3,R4,L1,L2,L3,L4,keyVel,rateScale,type,gain,gate) : _ Where: freq : frequency of the oscillator phaseMod : phase deviation (-1 - 1) outLev : preset output level (0-99) R1 : preset envelope rate 1 (0-99) R2 : preset envelope rate 2 (0-99) R3 : preset envelope rate 3 (0-99) R4 : preset envelope rate 4 (0-99) L1 : preset envelope level 1 (0-99) L2 : preset envelope level 2 (0-99) L3 : preset envelope level 3 (0-99) L4 : preset envelope level 4 (0-99) keyVel : preset key velocity sensitivity (0-99) rateScale : preset envelope rate scale type : preset operator type gain : general gain gate : trigger signal","title":"Usage:"},{"location":"libs/dx7/#dxdx7_algo","text":"DX7 algorithms. Implements the 32 DX7 algorithms (a quick Google search should give your more details on this). Each algorithm uses 6 operators.","title":"(dx.)dx7_algo"},{"location":"libs/dx7/#usage_9","text":"dx7_algo(algN,egR1,egR2,egR3,egR4,egL1,egL2,egL3,egL4,outLevel,keyVelSens,ampModSens,opMode,opFreq,opDetune,opRateScale,feedback,lfoDelay,lfoDepth,lfoSpeed,freq,gain,gate) : _ Where: algN : algorithm number (0-31, should be an int...) egR1 : preset envelope rates 1 (a list of 6 values between 0-99) egR2 : preset envelope rates 2 (a list of 6 values between 0-99) egR3 : preset envelope rates 3 (a list of 6 values between 0-99) egR4 : preset envelope rates 4 (a list of 6 values between 0-99) egL1 : preset envelope levels 1 (a list of 6 values between 0-99) egL2 : preset envelope levels 2 (a list of 6 values between 0-99) egL3 : preset envelope levels 3 (a list of 6 values between 0-99) egL4 : preset envelope levels 4 (a list of 6 values between 0-99) outLev : preset output levels (a list of 6 values between 0-99) keyVel : preset key velocity sensitivities (a list of 6 values between 0-99) ampModSens : preset amplitude sensitivities (a list of 6 values between 0-99) opMode : preset operator mode (a list of 6 values between 0-1) opFreq : preset operator frequencies (a list of 6 values between 0-99) opDetune : preset operator detuning (a list of 6 values between 0-99) opRateScale : preset operator rate scale (a list of 6 values between 0-99) feedback : preset operator feedback (a list of 6 values between 0-99) lfoDelay : preset LFO delay (a list of 6 values between 0-99) lfoDepth : preset LFO depth (a list of 6 values between 0-99) lfoSpeed : preset LFO speed (a list of 6 values between 0-99) freq : fundamental frequency gain : general gain gate : trigger signal","title":"Usage:"},{"location":"libs/dx7/#dxdx7_ui","text":"Generic DX7 function where all parameters are controllable using UI elements. The master-with-mute branch must be used for this function to work... This function is MIDI-compatible.","title":"(dx.)dx7_ui"},{"location":"libs/dx7/#usage_10","text":"dx7_ui : _","title":"Usage"},{"location":"libs/envelopes/","text":"envelopes.lib This library contains a collection of envelope generators. Its official prefix is en . References https://github.com/grame-cncm/faustlibraries/blob/master/envelopes.lib Functions Reference (en.)ar AR (Attack, Release) envelope generator (useful to create percussion envelopes). ar is a standard Faust function. Usage ar(at,rt,t) : _ Where: at : attack (sec) rt : release (sec) t : trigger signal (attack is triggered when t>0 , release is triggered when t=0 ) (en.)asr ASR (Attack, Sustain, Release) envelope generator. asr is a standard Faust function. Usage asr(at,sl,rt,t) : _ Where: at : attack (sec) sl : sustain level (between 0..1) rt : release (sec) t : trigger signal (attack is triggered when t>0 , release is triggered when t=0 ) (en.)adsr ADSR (Attack, Decay, Sustain, Release) envelope generator. adsr is a standard Faust function. Usage adsr(at,dt,sl,rt,t) : _ Where: at : attack time (sec) dt : decay time (sec) sl : sustain level (between 0..1) rt : release time (sec) t : trigger signal (attack is triggered when t>0 , release is triggered when t=0 ) (en.)smoothEnvelope An envelope with an exponential attack and release. smoothEnvelope is a standard Faust function. Usage smoothEnvelope(ar,t) : _ ar : attack and release duration (sec) t : trigger signal (attack is triggered when t>0 , release is triggered when t=0 ) (en.)arfe ARFE (Attack and Release-to-Final-value Exponentially) envelope generator. Approximately equal to smoothEnvelope(Attack/6.91) when Attack == Release. Usage arfe(at,rt,fl,t) : _ Where: at : attack (sec) rt : release (sec) fl : final level to approach upon release (such as 0) t : trigger signal (attack is triggered when t>0 , release is triggered when t=0 ) (en.)are ARE (Attack, Release) envelope generator with Exponential segments. Approximately equal to smoothEnvelope(Attack/6.91) when Attack == Release. Usage are(at,rt,t) : _ Where: at : attack (sec) rt : release (sec) t : trigger signal (attack is triggered when t>0 , release is triggered when t=0 ) (en.)asre ASRE (Attack, Sustain, Release) envelope generator with Exponential segments. Usage asre(at,sl,rt,t) : _ Where: at : attack (sec) sl : sustain level (between 0..1) rt : release (sec) t : trigger signal (attack is triggered when t>0 , release is triggered when t=0 ) (en.)adsre ADSRE (Attack, Decay, Sustain, Release) envelope generator with Exponential segments. Usage adsre(at,dt,sl,rt,t) : _ Where: at : attack (sec) dt : decay (sec) sl : sustain level (between 0..1) rt : release (sec) t : trigger signal (attack is triggered when t>0 , release is triggered when t=0 ) (en.)ahdsre AHDSRE (Attack, Hold, Decay, Sustain, Release) envelope generator with Exponential segments. Usage ahdsre(at,ht,dt,sl,rt,t) : _ Where: at : attack (sec) ht : hold (sec) dt : decay (sec) sl : sustain level (between 0..1) rt : release (sec) t : trigger signal (attack is triggered when t>0 , release is triggered when t=0 ) (en.)dx7envelope DX7 operator envelope generator with 4 independent rates and levels. It is essentially a 4 points BPF. Usage dx7_envelope(R1,R2,R3,R4,L1,L2,L3,L4,t) : _ Where: RN : rates in seconds LN : levels (0-1) t : trigger signal","title":" envelopes "},{"location":"libs/envelopes/#envelopeslib","text":"This library contains a collection of envelope generators. Its official prefix is en .","title":"envelopes.lib"},{"location":"libs/envelopes/#references","text":"https://github.com/grame-cncm/faustlibraries/blob/master/envelopes.lib","title":"References"},{"location":"libs/envelopes/#functions-reference","text":"","title":"Functions Reference"},{"location":"libs/envelopes/#enar","text":"AR (Attack, Release) envelope generator (useful to create percussion envelopes). ar is a standard Faust function.","title":"(en.)ar"},{"location":"libs/envelopes/#usage","text":"ar(at,rt,t) : _ Where: at : attack (sec) rt : release (sec) t : trigger signal (attack is triggered when t>0 , release is triggered when t=0 )","title":"Usage"},{"location":"libs/envelopes/#enasr","text":"ASR (Attack, Sustain, Release) envelope generator. asr is a standard Faust function.","title":"(en.)asr"},{"location":"libs/envelopes/#usage_1","text":"asr(at,sl,rt,t) : _ Where: at : attack (sec) sl : sustain level (between 0..1) rt : release (sec) t : trigger signal (attack is triggered when t>0 , release is triggered when t=0 )","title":"Usage"},{"location":"libs/envelopes/#enadsr","text":"ADSR (Attack, Decay, Sustain, Release) envelope generator. adsr is a standard Faust function.","title":"(en.)adsr"},{"location":"libs/envelopes/#usage_2","text":"adsr(at,dt,sl,rt,t) : _ Where: at : attack time (sec) dt : decay time (sec) sl : sustain level (between 0..1) rt : release time (sec) t : trigger signal (attack is triggered when t>0 , release is triggered when t=0 )","title":"Usage"},{"location":"libs/envelopes/#ensmoothenvelope","text":"An envelope with an exponential attack and release. smoothEnvelope is a standard Faust function.","title":"(en.)smoothEnvelope"},{"location":"libs/envelopes/#usage_3","text":"smoothEnvelope(ar,t) : _ ar : attack and release duration (sec) t : trigger signal (attack is triggered when t>0 , release is triggered when t=0 )","title":"Usage"},{"location":"libs/envelopes/#enarfe","text":"ARFE (Attack and Release-to-Final-value Exponentially) envelope generator. Approximately equal to smoothEnvelope(Attack/6.91) when Attack == Release.","title":"(en.)arfe"},{"location":"libs/envelopes/#usage_4","text":"arfe(at,rt,fl,t) : _ Where: at : attack (sec) rt : release (sec) fl : final level to approach upon release (such as 0) t : trigger signal (attack is triggered when t>0 , release is triggered when t=0 )","title":"Usage"},{"location":"libs/envelopes/#enare","text":"ARE (Attack, Release) envelope generator with Exponential segments. Approximately equal to smoothEnvelope(Attack/6.91) when Attack == Release.","title":"(en.)are"},{"location":"libs/envelopes/#usage_5","text":"are(at,rt,t) : _ Where: at : attack (sec) rt : release (sec) t : trigger signal (attack is triggered when t>0 , release is triggered when t=0 )","title":"Usage"},{"location":"libs/envelopes/#enasre","text":"ASRE (Attack, Sustain, Release) envelope generator with Exponential segments.","title":"(en.)asre"},{"location":"libs/envelopes/#usage_6","text":"asre(at,sl,rt,t) : _ Where: at : attack (sec) sl : sustain level (between 0..1) rt : release (sec) t : trigger signal (attack is triggered when t>0 , release is triggered when t=0 )","title":"Usage"},{"location":"libs/envelopes/#enadsre","text":"ADSRE (Attack, Decay, Sustain, Release) envelope generator with Exponential segments.","title":"(en.)adsre"},{"location":"libs/envelopes/#usage_7","text":"adsre(at,dt,sl,rt,t) : _ Where: at : attack (sec) dt : decay (sec) sl : sustain level (between 0..1) rt : release (sec) t : trigger signal (attack is triggered when t>0 , release is triggered when t=0 )","title":"Usage"},{"location":"libs/envelopes/#enahdsre","text":"AHDSRE (Attack, Hold, Decay, Sustain, Release) envelope generator with Exponential segments.","title":"(en.)ahdsre"},{"location":"libs/envelopes/#usage_8","text":"ahdsre(at,ht,dt,sl,rt,t) : _ Where: at : attack (sec) ht : hold (sec) dt : decay (sec) sl : sustain level (between 0..1) rt : release (sec) t : trigger signal (attack is triggered when t>0 , release is triggered when t=0 )","title":"Usage"},{"location":"libs/envelopes/#endx7envelope","text":"DX7 operator envelope generator with 4 independent rates and levels. It is essentially a 4 points BPF.","title":"(en.)dx7envelope"},{"location":"libs/envelopes/#usage_9","text":"dx7_envelope(R1,R2,R3,R4,L1,L2,L3,L4,t) : _ Where: RN : rates in seconds LN : levels (0-1) t : trigger signal","title":"Usage"},{"location":"libs/fds/","text":"fds.lib This library allows to build linear, explicit finite difference schemes physical models in 1 or 2 dimensions using an approach based on the cellular automata formalism. Its official prefix is fd . In order to use the library, one needs to discretize the linear partial differential equation of the desired system both at boundaries and in-between them, thus obtaining a set of explicit recursion relations. Each one of these will provide, for each spatial point the scalar coefficients to be multiplied by the states of the current and past neighbour points. Coefficients need to be stacked in parallel in order to form a coefficients matrix for each point in the mesh. It is necessary to provide one matrix for coefficients matrices are defined, they need to be placed in parallel and ordered following the desired mesh structure (i.e., coefficients for the top left boundaries will come first, while bottom right boundaries will come last), to form a coefficients scheme , which can be used with the library functions. Sources Here are listed some works on finite difference schemes and cellular automata thet were the basis for the implementation of this library S. Bilbao, Numerical Sound Synthesis.Chichester, UK: John Wiley Sons, Ltd, 2009 P. Narbel, \"Qualitative and quantitative cellular automata from differential equations,\" Lecture Notes in Computer Science, vol. 4173, pp. 112\u2013121, 10 2006 X.-S. Yang and Y. Young, Cellular Automata, PDEs, and Pattern Formation. Chapman & Hall/CRC, 092005, ch. 18, pp. 271\u2013282. References https://github.com/grame-cncm/faustlibraries/blob/master/fds.lib Model Construction Once the coefficients scheme is defined, the user can simply call one of these functions to obtain a fully working physical model. They expect to receive a force input signal for each mesh point and output the state of each point. Interpolation operators can be used to drive external forces to the desired points, and to get the signal only from a certain area of the mesh. (fd.)model1D This function can be used to obtain a physical model in 1 dimension. Takes a force input signal for each point and outputs the state of each point. Usage si.bus(points) : model1D(points,R,T,scheme) : si.bus(points) Where: points : size of the mesh in points R : neighbourhood radius, indicates how many side points are needed (i.e. if R=1 the mesh depends on one point on the left and one on the right) T : time coefficient, indicates how much steps back in time are needed (i. e. if T=1 the maximum delay needed for a neighbour state is 1 sample) scheme : coefficients scheme (fd.)model2D This function can be used to obtain a physical model in 2 dimension. Takes a force input signal for each point and outputs the state of each point. IMPORTANT: 2D models with more than 30x20 points might crash the c++ compiler. 2D models need to be compiled with the command line compiler, the online one presents some issues. Usage si.bus(pointsX*pointsY) : model2D(pointsX,pointsY,R,T,scheme) : si.bus(pointsX*pointsY) Where: pointsX : horizontal size of the mesh in points pointsY : vertical size of the mesh in points R : neighbourhood radius, indicates how many side points are needed (i.e. if R=1 the mesh depends on one point on the left and one on the right) T : time coefficient, indicates how much steps back in time are needed (i. e. if T=1 the maximum delay needed for a neighbour state is 1 sample) scheme : coefficients scheme Interpolation Interpolation functions can be used to drive the input signals to the correct mesh points, or to get the output signal from the desired points. All the interpolation functions allow to change the input/output points at run time. In general, all these functions get in input a number of connections, and output the same number of connections, where each signal is multiplied by zero except the ones specified by the arguments. (fd.)stairsInterp1D Stairs interpolator in 1 dimension. Takes a number of signals and outputs the same number of signals, where each one is multiplied by zero except the one specified by the argument. This can vary at run time (i.e. a slider), but must be an integer. Usage si.bus(points) : stairsInterp1D(points,point) : si.bus(points) Where: points : total number of points in the mesh point : number of the desired nonzero signal (fd.)stairsInterp2D Stairs interpolator in 2 dimensions. Similar to the 1-D version. Usage si.bus(pointsX*pointsY) : stairsInterp2D(pointsX,pointsY,pointX,pointY) : si.bus(pointsX*pointsY) Where: pointsX : total number of points in the X direction pointsY : total number of points in the Y direction pointX : horizontal index of the desired nonzero signal pointY : vertical index of the desired nonzero signal (fd.)linInterp1D Linear interpolator in 1 dimension. Takes a number of signals and outputs the same number of signals, where each one is multiplied by zero except two signals around a floating point index. This is essentially a Faust implementation of the $J(x_i)$ operator, not scaled by the spatial step. (see Stefan Bilbao's book, Numerical Sound Synthesis). The index can vary at run time. Usage si.bus(points) : linInterp1D(points,point) : si.bus(points) Where: points : total number of points in the mesh point : floating point index (fd.)linInterp2D Linear interpolator in 2 dimensions. Similar to the 1 D version. Usage si.bus(pointsX*pointsY) : linInterp2D(pointsX,pointsY,pointX,pointY) : si.bus(pointsX*pointsY) Where: pointsX : total number of points in the X direction pointsY : total number of points in the Y direction pointX : horizontal float index pointY : vertical float index (fd.)stairsInterp1DOut Stairs interpolator in 1 dimension. Similar to stairsInterp1D , except it outputs only the desired signal. Usage si.bus(points) : stairsInterp1DOut(points,point) : _ Where: points : total number of points in the mesh point : number of the desired nonzero signal (fd.)stairsInterp2DOut Stairs interpolator in 2 dimensions which outputs only one signal. Usage si.bus(pointsX*pointsY) : stairsInterp2DOut(pointsX,pointsY,pointX,pointY) : _ Where: pointsX : total number of points in the X direction pointsY : total number of points in the Y direction pointX : horizontal index of the desired nonzero signal pointY : vertical index of the desired nonzero signal (fd.)linInterp1DOut Linear interpolator in 1 dimension. Similar to stairsInterp1D , except it sums each output signal and provides only one output value. Usage si.bus(points) : linInterp1DOut(points,point) : _ Where: points : total number of points in the mesh point : floating point index (fd.)stairsInterp2DOut Linear interpolator in 2 dimensions which outputs only one signal. Usage si.bus(pointsX*pointsY) : linInterp2DOut(pointsX,pointsY,pointX,pointY) : _ Where: pointsX : total number of points in the X direction pointsY : total number of points in the Y direction pointX : horizontal float index pointY : vertical float index Routing The routing functions are used internally by the model building functions, but can also be taken separately. These functions route the forces, the coefficients scheme and the neighbours\u2019 signals into the correct scheme points and take as input, in this order: the coefficients block, the feedback signals and the forces. In output they provide, in order, for each scheme point: the force signal, the coefficient matrices and the neighbours\u2019 signals. These functions are based on the Faust route primitive. (fd.)route1D Routing function for 1 dimensional schemes. Usage si.bus((2*R+1)*(T+1)*points),si.bus(points*2) : route1D(points, R, T) : si.bus((1 + ((2*R+1)*(T+1)) + (2*R+1))*points) Where: points : total number of points in the mesh R : neighbourhood radius T : time coefficient (fd.)route2D Routing function for 2 dimensional schemes. Usage si.bus((2*R+1)^2*(T+1)*pointsX*pointsY),si.bus(pointsX*pointsY*2) : route2D(pointsX, pointsY, R, T) : si.bus((1 + ((2*R+1)^2*(T+1)) + (2*R+1)^2)*pointsX*pointsY) Where: pointsX : total number of points in the X direction pointsY : total number of points in the Y direction R : neighbourhood radius T : time coefficient Scheme Operations The scheme operation functions are used internally by the model building functions but can also be taken separately. The schemePoint function is where the update equation is actually calculated. The buildScheme functions are used to stack in parallel several schemePoint blocks, according to the choosed mesh size. (fd.)schemePoint This function calculates the next state for each mesh point, in order to form a scheme, several of these blocks need to be stacked in parallel. This function takes in input, in order, the force, the coefficient matrices and the neighbours\u2019 signals and outputs the next point state. Usage _,si.bus((2*R+1)^D*(T+1)),si.bus((2*R+1)^D) : schemePoint(R,T,D) : _ Where: R : neighbourhood radius T : time coefficient D : scheme spatial dimensions (i.e. 1 if 1-D, 2 if 2-D) (fd.)buildScheme1D This function is used to stack in parallel several schemePoint functions in 1 dimension, according to the number of points. Usage si.bus((1 + ((2*R+1)*(T+1)) + (2*R+1))*points) : buildScheme1D(points,R,T) : si.bus(points) Where: points : total number of points in the mesh R : neighbourhood radius T : time coefficient (fd.)buildScheme2D This function is used to stack in parallel several schemePoint functions in 2 dimensions, according to the number of points in the X and Y directions. Usage si.bus((1 + ((2*R+1)^2*(T+1)) + (2*R+1)^2)*pointsX*pointsY) : buildScheme2D(pointsX,pointsY,R,T) : si.bus(pointsX*pointsY) Where: pointsX : total number of points in the X direction pointsY : total number of points in the Y direction R : neighbourhood radius T : time coefficient Interaction Models Here are defined two physically based interaction algorithms: a hammer and a bow. These functions need to be coupled to the mesh pde, in the point where the interaction happens: to do so, the mesh output signals can be fed back and driven into the force block using the interpolation operators. The latters can be also used to drive the single force output signal to the correct scheme points. (fd.)hammer Implementation of a nonlinear collision model. The hammer is essentially a finite difference scheme of a linear damped oscillator, which is coupled with the mesh through the collision model (see Stefan Bilbao's book, Numerical Sound Synthesis). Usage _ :hammer(coeff,omega0Sqr,sigma0,kH,alpha,k,offset,fIn) : _ Where: coeff : output force scaling coefficient omega0Sqr : squared angular frequency of the hammer oscillator sigma0 : damping coefficient of the hammer oscillator kH : hammer stiffness coefficient alpha : nonlinearity parameter k : time sampling step (the same as for the mesh) offset : distance between the string and the hammer at rest in meters fIn : hammer excitation signal (i.e. a button) (fd.)bow Implementation of a nonlinear friction based interaction model that induces Helmholtz motion. (see Stefan Bilbao's book, Numerical Sound Synthesis). Usage _ :bow(coeff,alpha,k,vb) : _ Where: coeff : output force scaling coefficient alpha : nonlinearity parameter k : time sampling step (the same as for the mesh) vb : bow velocity [m/s]","title":" fds "},{"location":"libs/fds/#fdslib","text":"This library allows to build linear, explicit finite difference schemes physical models in 1 or 2 dimensions using an approach based on the cellular automata formalism. Its official prefix is fd . In order to use the library, one needs to discretize the linear partial differential equation of the desired system both at boundaries and in-between them, thus obtaining a set of explicit recursion relations. Each one of these will provide, for each spatial point the scalar coefficients to be multiplied by the states of the current and past neighbour points. Coefficients need to be stacked in parallel in order to form a coefficients matrix for each point in the mesh. It is necessary to provide one matrix for coefficients matrices are defined, they need to be placed in parallel and ordered following the desired mesh structure (i.e., coefficients for the top left boundaries will come first, while bottom right boundaries will come last), to form a coefficients scheme , which can be used with the library functions.","title":"fds.lib"},{"location":"libs/fds/#sources","text":"Here are listed some works on finite difference schemes and cellular automata thet were the basis for the implementation of this library S. Bilbao, Numerical Sound Synthesis.Chichester, UK: John Wiley Sons, Ltd, 2009 P. Narbel, \"Qualitative and quantitative cellular automata from differential equations,\" Lecture Notes in Computer Science, vol. 4173, pp. 112\u2013121, 10 2006 X.-S. Yang and Y. Young, Cellular Automata, PDEs, and Pattern Formation. Chapman & Hall/CRC, 092005, ch. 18, pp. 271\u2013282.","title":"Sources"},{"location":"libs/fds/#references","text":"https://github.com/grame-cncm/faustlibraries/blob/master/fds.lib","title":"References"},{"location":"libs/fds/#model-construction","text":"Once the coefficients scheme is defined, the user can simply call one of these functions to obtain a fully working physical model. They expect to receive a force input signal for each mesh point and output the state of each point. Interpolation operators can be used to drive external forces to the desired points, and to get the signal only from a certain area of the mesh.","title":"Model Construction"},{"location":"libs/fds/#fdmodel1d","text":"This function can be used to obtain a physical model in 1 dimension. Takes a force input signal for each point and outputs the state of each point.","title":"(fd.)model1D"},{"location":"libs/fds/#usage","text":"si.bus(points) : model1D(points,R,T,scheme) : si.bus(points) Where: points : size of the mesh in points R : neighbourhood radius, indicates how many side points are needed (i.e. if R=1 the mesh depends on one point on the left and one on the right) T : time coefficient, indicates how much steps back in time are needed (i. e. if T=1 the maximum delay needed for a neighbour state is 1 sample) scheme : coefficients scheme","title":"Usage"},{"location":"libs/fds/#fdmodel2d","text":"This function can be used to obtain a physical model in 2 dimension. Takes a force input signal for each point and outputs the state of each point. IMPORTANT: 2D models with more than 30x20 points might crash the c++ compiler. 2D models need to be compiled with the command line compiler, the online one presents some issues.","title":"(fd.)model2D"},{"location":"libs/fds/#usage_1","text":"si.bus(pointsX*pointsY) : model2D(pointsX,pointsY,R,T,scheme) : si.bus(pointsX*pointsY) Where: pointsX : horizontal size of the mesh in points pointsY : vertical size of the mesh in points R : neighbourhood radius, indicates how many side points are needed (i.e. if R=1 the mesh depends on one point on the left and one on the right) T : time coefficient, indicates how much steps back in time are needed (i. e. if T=1 the maximum delay needed for a neighbour state is 1 sample) scheme : coefficients scheme","title":"Usage"},{"location":"libs/fds/#interpolation","text":"Interpolation functions can be used to drive the input signals to the correct mesh points, or to get the output signal from the desired points. All the interpolation functions allow to change the input/output points at run time. In general, all these functions get in input a number of connections, and output the same number of connections, where each signal is multiplied by zero except the ones specified by the arguments.","title":"Interpolation"},{"location":"libs/fds/#fdstairsinterp1d","text":"Stairs interpolator in 1 dimension. Takes a number of signals and outputs the same number of signals, where each one is multiplied by zero except the one specified by the argument. This can vary at run time (i.e. a slider), but must be an integer.","title":"(fd.)stairsInterp1D"},{"location":"libs/fds/#usage_2","text":"si.bus(points) : stairsInterp1D(points,point) : si.bus(points) Where: points : total number of points in the mesh point : number of the desired nonzero signal","title":"Usage"},{"location":"libs/fds/#fdstairsinterp2d","text":"Stairs interpolator in 2 dimensions. Similar to the 1-D version.","title":"(fd.)stairsInterp2D"},{"location":"libs/fds/#usage_3","text":"si.bus(pointsX*pointsY) : stairsInterp2D(pointsX,pointsY,pointX,pointY) : si.bus(pointsX*pointsY) Where: pointsX : total number of points in the X direction pointsY : total number of points in the Y direction pointX : horizontal index of the desired nonzero signal pointY : vertical index of the desired nonzero signal","title":"Usage"},{"location":"libs/fds/#fdlininterp1d","text":"Linear interpolator in 1 dimension. Takes a number of signals and outputs the same number of signals, where each one is multiplied by zero except two signals around a floating point index. This is essentially a Faust implementation of the $J(x_i)$ operator, not scaled by the spatial step. (see Stefan Bilbao's book, Numerical Sound Synthesis). The index can vary at run time.","title":"(fd.)linInterp1D"},{"location":"libs/fds/#usage_4","text":"si.bus(points) : linInterp1D(points,point) : si.bus(points) Where: points : total number of points in the mesh point : floating point index","title":"Usage"},{"location":"libs/fds/#fdlininterp2d","text":"Linear interpolator in 2 dimensions. Similar to the 1 D version.","title":"(fd.)linInterp2D"},{"location":"libs/fds/#usage_5","text":"si.bus(pointsX*pointsY) : linInterp2D(pointsX,pointsY,pointX,pointY) : si.bus(pointsX*pointsY) Where: pointsX : total number of points in the X direction pointsY : total number of points in the Y direction pointX : horizontal float index pointY : vertical float index","title":"Usage"},{"location":"libs/fds/#fdstairsinterp1dout","text":"Stairs interpolator in 1 dimension. Similar to stairsInterp1D , except it outputs only the desired signal.","title":"(fd.)stairsInterp1DOut"},{"location":"libs/fds/#usage_6","text":"si.bus(points) : stairsInterp1DOut(points,point) : _ Where: points : total number of points in the mesh point : number of the desired nonzero signal","title":"Usage"},{"location":"libs/fds/#fdstairsinterp2dout","text":"Stairs interpolator in 2 dimensions which outputs only one signal.","title":"(fd.)stairsInterp2DOut"},{"location":"libs/fds/#usage_7","text":"si.bus(pointsX*pointsY) : stairsInterp2DOut(pointsX,pointsY,pointX,pointY) : _ Where: pointsX : total number of points in the X direction pointsY : total number of points in the Y direction pointX : horizontal index of the desired nonzero signal pointY : vertical index of the desired nonzero signal","title":"Usage"},{"location":"libs/fds/#fdlininterp1dout","text":"Linear interpolator in 1 dimension. Similar to stairsInterp1D , except it sums each output signal and provides only one output value.","title":"(fd.)linInterp1DOut"},{"location":"libs/fds/#usage_8","text":"si.bus(points) : linInterp1DOut(points,point) : _ Where: points : total number of points in the mesh point : floating point index","title":"Usage"},{"location":"libs/fds/#fdstairsinterp2dout_1","text":"Linear interpolator in 2 dimensions which outputs only one signal.","title":"(fd.)stairsInterp2DOut"},{"location":"libs/fds/#usage_9","text":"si.bus(pointsX*pointsY) : linInterp2DOut(pointsX,pointsY,pointX,pointY) : _ Where: pointsX : total number of points in the X direction pointsY : total number of points in the Y direction pointX : horizontal float index pointY : vertical float index","title":"Usage"},{"location":"libs/fds/#routing","text":"The routing functions are used internally by the model building functions, but can also be taken separately. These functions route the forces, the coefficients scheme and the neighbours\u2019 signals into the correct scheme points and take as input, in this order: the coefficients block, the feedback signals and the forces. In output they provide, in order, for each scheme point: the force signal, the coefficient matrices and the neighbours\u2019 signals. These functions are based on the Faust route primitive.","title":"Routing"},{"location":"libs/fds/#fdroute1d","text":"Routing function for 1 dimensional schemes.","title":"(fd.)route1D"},{"location":"libs/fds/#usage_10","text":"si.bus((2*R+1)*(T+1)*points),si.bus(points*2) : route1D(points, R, T) : si.bus((1 + ((2*R+1)*(T+1)) + (2*R+1))*points) Where: points : total number of points in the mesh R : neighbourhood radius T : time coefficient","title":"Usage"},{"location":"libs/fds/#fdroute2d","text":"Routing function for 2 dimensional schemes.","title":"(fd.)route2D"},{"location":"libs/fds/#usage_11","text":"si.bus((2*R+1)^2*(T+1)*pointsX*pointsY),si.bus(pointsX*pointsY*2) : route2D(pointsX, pointsY, R, T) : si.bus((1 + ((2*R+1)^2*(T+1)) + (2*R+1)^2)*pointsX*pointsY) Where: pointsX : total number of points in the X direction pointsY : total number of points in the Y direction R : neighbourhood radius T : time coefficient","title":"Usage"},{"location":"libs/fds/#scheme-operations","text":"The scheme operation functions are used internally by the model building functions but can also be taken separately. The schemePoint function is where the update equation is actually calculated. The buildScheme functions are used to stack in parallel several schemePoint blocks, according to the choosed mesh size.","title":"Scheme Operations"},{"location":"libs/fds/#fdschemepoint","text":"This function calculates the next state for each mesh point, in order to form a scheme, several of these blocks need to be stacked in parallel. This function takes in input, in order, the force, the coefficient matrices and the neighbours\u2019 signals and outputs the next point state.","title":"(fd.)schemePoint"},{"location":"libs/fds/#usage_12","text":"_,si.bus((2*R+1)^D*(T+1)),si.bus((2*R+1)^D) : schemePoint(R,T,D) : _ Where: R : neighbourhood radius T : time coefficient D : scheme spatial dimensions (i.e. 1 if 1-D, 2 if 2-D)","title":"Usage"},{"location":"libs/fds/#fdbuildscheme1d","text":"This function is used to stack in parallel several schemePoint functions in 1 dimension, according to the number of points.","title":"(fd.)buildScheme1D"},{"location":"libs/fds/#usage_13","text":"si.bus((1 + ((2*R+1)*(T+1)) + (2*R+1))*points) : buildScheme1D(points,R,T) : si.bus(points) Where: points : total number of points in the mesh R : neighbourhood radius T : time coefficient","title":"Usage"},{"location":"libs/fds/#fdbuildscheme2d","text":"This function is used to stack in parallel several schemePoint functions in 2 dimensions, according to the number of points in the X and Y directions.","title":"(fd.)buildScheme2D"},{"location":"libs/fds/#usage_14","text":"si.bus((1 + ((2*R+1)^2*(T+1)) + (2*R+1)^2)*pointsX*pointsY) : buildScheme2D(pointsX,pointsY,R,T) : si.bus(pointsX*pointsY) Where: pointsX : total number of points in the X direction pointsY : total number of points in the Y direction R : neighbourhood radius T : time coefficient","title":"Usage"},{"location":"libs/fds/#interaction-models","text":"Here are defined two physically based interaction algorithms: a hammer and a bow. These functions need to be coupled to the mesh pde, in the point where the interaction happens: to do so, the mesh output signals can be fed back and driven into the force block using the interpolation operators. The latters can be also used to drive the single force output signal to the correct scheme points.","title":"Interaction Models"},{"location":"libs/fds/#fdhammer","text":"Implementation of a nonlinear collision model. The hammer is essentially a finite difference scheme of a linear damped oscillator, which is coupled with the mesh through the collision model (see Stefan Bilbao's book, Numerical Sound Synthesis).","title":"(fd.)hammer"},{"location":"libs/fds/#usage_15","text":"_ :hammer(coeff,omega0Sqr,sigma0,kH,alpha,k,offset,fIn) : _ Where: coeff : output force scaling coefficient omega0Sqr : squared angular frequency of the hammer oscillator sigma0 : damping coefficient of the hammer oscillator kH : hammer stiffness coefficient alpha : nonlinearity parameter k : time sampling step (the same as for the mesh) offset : distance between the string and the hammer at rest in meters fIn : hammer excitation signal (i.e. a button)","title":"Usage"},{"location":"libs/fds/#fdbow","text":"Implementation of a nonlinear friction based interaction model that induces Helmholtz motion. (see Stefan Bilbao's book, Numerical Sound Synthesis).","title":"(fd.)bow"},{"location":"libs/fds/#usage_16","text":"_ :bow(coeff,alpha,k,vb) : _ Where: coeff : output force scaling coefficient alpha : nonlinearity parameter k : time sampling step (the same as for the mesh) vb : bow velocity [m/s]","title":"Usage"},{"location":"libs/filters/","text":"filters.lib Faust Filters library. Its official prefix is fi . The Filters library is organized into 22 sections: Basic Filters Comb Filters Direct-Form Digital Filter Sections Direct-Form Second-Order Biquad Sections Ladder/Lattice Digital Filters Useful Special Cases Ladder/Lattice Allpass Filters Digital Filter Sections Specified as Analog Filter Sections Simple Resonator Filters Butterworth Lowpass/Highpass Filters Special Filter-Bank Delay-Equalizing Allpass Filters Elliptic (Cauer) Lowpass Filters Elliptic Highpass Filters Butterworth Bandpass/Bandstop Filters Elliptic Bandpass Filters Parametric Equalizers (Shelf, Peaking) Mth-Octave Filter-Banks Arbitrary-Crossover Filter-Banks and Spectrum Analyzers State Variable Filters (SVF) Linkwitz-Riley 4th-order 2-way, 3-way, and 4-way crossovers Standardized Filters Averaging Functions References https://github.com/grame-cncm/faustlibraries/blob/master/filters.lib Basic Filters (fi.)zero One zero filter. Difference equation: y(n) = x(n) - zx(n-1) . Usage _ : zero(z) : _ Where: z : location of zero along real axis in z-plane Reference https://ccrma.stanford.edu/~jos/filters/One_Zero.html (fi.)pole One pole filter. Could also be called a \"leaky integrator\". Difference equation: y(n) = x(n) + py(n-1) . Usage _ : pole(p) : _ Where: p : pole location = feedback coefficient Reference https://ccrma.stanford.edu/~jos/filters/One_Pole.html (fi.)integrator Same as pole(1) [implemented separately for block-diagram clarity]. (fi.)dcblockerat DC blocker with configurable break frequency. The amplitude response is substantially flat above fb , and sloped at about +6 dB/octave below fb . Derived from the analog transfer function: H(s) = \\frac{s}{(s + 2 \\pi fb)} (which can be seen as a 1st-order Butterworth highpass filter) by the low-frequency-matching bilinear transform method (i.e., the standard frequency-scaling constant 2*SR). Usage _ : dcblockerat(fb) : _ Where: fb : \"break frequency\" in Hz, i.e., -3 dB gain frequency. Reference https://ccrma.stanford.edu/~jos/pasp/Bilinear_Transformation.html (fi.)dcblocker DC blocker. Default dc blocker has -3dB point near 35 Hz (at 44.1 kHz) and high-frequency gain near 1.0025 (due to no scaling). dcblocker is as standard Faust function. Usage _ : dcblocker : _ (fi.)lptN One-pole lowpass filter with arbitrary dis/charging factors set in dB and times set in seconds. Usage _ : lptN(N, tN) : _ Where: N : is the attenuation factor in dB tN : is the filter period in seconds, that is, the time for the impulse response to decay by N dB Reference https://ccrma.stanford.edu/~jos/mdft/Exponentials.html Comb Filters (fi.)ff_comb Feed-Forward Comb Filter. Note that ff_comb requires integer delays (uses delay internally). ff_comb is a standard Faust function. Usage _ : ff_comb(maxdel,intdel,b0,bM) : _ Where: maxdel : maximum delay (a power of 2) intdel : current (integer) comb-filter delay between 0 and maxdel del : current (float) comb-filter delay between 0 and maxdel b0 : gain applied to delay-line input bM : gain applied to delay-line output and then summed with input Reference https://ccrma.stanford.edu/~jos/pasp/Feedforward_Comb_Filters.html (fi.)ff_fcomb Feed-Forward Comb Filter. Note that ff_fcomb takes floating-point delays (uses fdelay internally). ff_fcomb is a standard Faust function. Usage _ : ff_fcomb(maxdel,del,b0,bM) : _ Where: maxdel : maximum delay (a power of 2) intdel : current (integer) comb-filter delay between 0 and maxdel del : current (float) comb-filter delay between 0 and maxdel b0 : gain applied to delay-line input bM : gain applied to delay-line output and then summed with input Reference https://ccrma.stanford.edu/~jos/pasp/Feedforward_Comb_Filters.html (fi.)ffcombfilter Typical special case of ff_comb() where: b0 = 1 . (fi.)fb_comb Feed-Back Comb Filter (integer delay). Usage _ : fb_comb(maxdel,intdel,b0,aN) : _ Where: maxdel : maximum delay (a power of 2) intdel : current (integer) comb-filter delay between 0 and maxdel del : current (float) comb-filter delay between 0 and maxdel b0 : gain applied to delay-line input and forwarded to output aN : minus the gain applied to delay-line output before summing with the input and feeding to the delay line Reference https://ccrma.stanford.edu/~jos/pasp/Feedback_Comb_Filters.html (fi.)fb_fcomb Feed-Back Comb Filter (floating point delay). Usage _ : fb_fcomb(maxdel,del,b0,aN) : _ Where: maxdel : maximum delay (a power of 2) intdel : current (integer) comb-filter delay between 0 and maxdel del : current (float) comb-filter delay between 0 and maxdel b0 : gain applied to delay-line input and forwarded to output aN : minus the gain applied to delay-line output before summing with the input and feeding to the delay line Reference https://ccrma.stanford.edu/~jos/pasp/Feedback_Comb_Filters.html (fi.)rev1 Special case of fb_comb ( rev1(maxdel,N,g) ). The \"rev1 section\" dates back to the 1960s in computer-music reverberation. See the jcrev and brassrev in reverbs.lib for usage examples. (fi.)fbcombfilter and (fi.)ffbcombfilter Other special cases of Feed-Back Comb Filter. Usage _ : fbcombfilter(maxdel,intdel,g) : _ _ : ffbcombfilter(maxdel,del,g) : _ Where: maxdel : maximum delay (a power of 2) intdel : current (integer) comb-filter delay between 0 and maxdel del : current (float) comb-filter delay between 0 and maxdel g : feedback gain Reference https://ccrma.stanford.edu/~jos/pasp/Feedback_Comb_Filters.html (fi.)allpass_comb Schroeder Allpass Comb Filter. Note that: allpass_comb(maxlen,len,aN) = ff_comb(maxlen,len,aN,1) : fb_comb(maxlen,len-1,1,aN); which is a direct-form-1 implementation, requiring two delay lines. The implementation here is direct-form-2 requiring only one delay line. Usage _ : allpass_comb(maxdel,intdel,aN) : _ Where: maxdel : maximum delay (a power of 2) intdel : current (integer) comb-filter delay between 0 and maxdel del : current (float) comb-filter delay between 0 and maxdel aN : minus the feedback gain References https://ccrma.stanford.edu/~jos/pasp/Allpass_Two_Combs.html https://ccrma.stanford.edu/~jos/pasp/Schroeder_Allpass_Sections.html https://ccrma.stanford.edu/~jos/filters/Four_Direct_Forms.html (fi.)allpass_fcomb Schroeder Allpass Comb Filter. Note that: allpass_comb(maxlen,len,aN) = ff_comb(maxlen,len,aN,1) : fb_comb(maxlen,len-1,1,aN); which is a direct-form-1 implementation, requiring two delay lines. The implementation here is direct-form-2 requiring only one delay line. allpass_fcomb is a standard Faust library. Usage _ : allpass_comb(maxdel,intdel,aN) : _ _ : allpass_fcomb(maxdel,del,aN) : _ Where: maxdel : maximum delay (a power of 2) intdel : current (float) comb-filter delay between 0 and maxdel del : current (float) comb-filter delay between 0 and maxdel aN : minus the feedback gain References https://ccrma.stanford.edu/~jos/pasp/Allpass_Two_Combs.html https://ccrma.stanford.edu/~jos/pasp/Schroeder_Allpass_Sections.html https://ccrma.stanford.edu/~jos/filters/Four_Direct_Forms.html (fi.)rev2 Special case of allpass_comb ( rev2(maxlen,len,g) ). The \"rev2 section\" dates back to the 1960s in computer-music reverberation. See the jcrev and brassrev in reverbs.lib for usage examples. (fi.)allpass_fcomb5 and (fi.)allpass_fcomb1a Same as allpass_fcomb but use fdelay5 and fdelay1a internally (Interpolation helps - look at an fft of faust2octave on `1-1' <: allpass_fcomb(1024,10.5,0.95), allpass_fcomb5(1024,10.5,0.95);`). Direct-Form Digital Filter Sections (fi.)iir Nth-order Infinite-Impulse-Response (IIR) digital filter, implemented in terms of the Transfer-Function (TF) coefficients. Such filter structures are termed \"direct form\". iir is a standard Faust function. Usage _ : iir(bcoeffs,acoeffs) : _ Where: bcoeffs : (b0,b1,...,b_order) = TF numerator coefficients acoeffs : (a1,...,a_order) = TF denominator coeffs (a0=1) Reference https://ccrma.stanford.edu/~jos/filters/Four_Direct_Forms.html (fi.)fir FIR filter (convolution of FIR filter coefficients with a signal). fir is standard Faust function. Usage _ : fir(bv) : _ Where: bv = b0,b1,...,bn is a parallel bank of coefficient signals. Note bv is processed using pattern-matching at compile time, so it must have this normal form (parallel signals). Example test program Smoothing white noise with a five-point moving average: bv = .2,.2,.2,.2,.2; process = noise : fir(bv); Equivalent (note double parens): process = noise : fir((.2,.2,.2,.2,.2)); (fi.)conv and (fi.)convN Convolution of input signal with given coefficients. Usage _ : conv((k1,k2,k3,...,kN)) : _ // Argument = one signal bank _ : convN(N,(k1,k2,k3,...)) : _ // Useful when N < count((k1,...)) (fi.)tf1 , (fi.)tf2 and (fi.)tf3 tfN = N'th-order direct-form digital filter. Usage _ : tf1(b0,b1,a1) : _ _ : tf2(b0,b1,b2,a1,a2) : _ _ : tf3(b0,b1,b2,b3,a1,a2,a3) : _ Where: a : the poles b : the zeros Reference https://ccrma.stanford.edu/~jos/fp/Direct_Form_I.html (fi.)notchw Simple notch filter based on a biquad ( tf2 ). notchw is a standard Faust function. Usage: _ : notchw(width,freq) : _ Where: width : \"notch width\" in Hz (approximate) freq : \"notch frequency\" in Hz Reference https://ccrma.stanford.edu/~jos/pasp/Phasing_2nd_Order_Allpass_Filters.html Direct-Form Second-Order Biquad Sections Direct-Form Second-Order Biquad Sections Reference https://ccrma.stanford.edu/~jos/filters/Four_Direct_Forms.html (fi.)tf21 , (fi.)tf22 , (fi.)tf22t and (fi.)tf21t tfN = N'th-order direct-form digital filter where: tf21 is tf2, direct-form 1 tf22 is tf2, direct-form 2 tf22t is tf2, direct-form 2 transposed tf21t is tf2, direct-form 1 transposed Usage _ : tf21(b0,b1,b2,a1,a2) : _ _ : tf22(b0,b1,b2,a1,a2) : _ _ : tf22t(b0,b1,b2,a1,a2) : _ _ : tf21t(b0,b1,b2,a1,a2) : _ Where: a : the poles b : the zeros Reference https://ccrma.stanford.edu/~jos/fp/Direct_Form_I.html Ladder/Lattice Digital Filters Ladder and lattice digital filters generally have superior numerical properties relative to direct-form digital filters. They can be derived from digital waveguide filters, which gives them a physical interpretation. Reference F. Itakura and S. Saito: \"Digital Filtering Techniques for Speech Analysis and Synthesis\", 7th Int. Cong. Acoustics, Budapest, 25 C 1, 1971. J. D. Markel and A. H. Gray: Linear Prediction of Speech, New York: Springer Verlag, 1976. https://ccrma.stanford.edu/~jos/pasp/Conventional_Ladder_Filters.html (fi.)av2sv Compute reflection coefficients sv from transfer-function denominator av. Usage sv = av2sv(av) Where: av : parallel signal bank a1,...,aN sv : parallel signal bank s1,...,sN where ro = ith reflection coefficient, and ai = coefficient of z^(-i) in the filter transfer-function denominator A(z) . Reference https://ccrma.stanford.edu/~jos/filters/Step_Down_Procedure.html (where reflection coefficients are denoted by k rather than s). (fi.)bvav2nuv Compute lattice tap coefficients from transfer-function coefficients. Usage nuv = bvav2nuv(bv,av) Where: av : parallel signal bank a1,...,aN bv : parallel signal bank b0,b1,...,aN nuv : parallel signal bank nu1,...,nuN where nui is the i'th tap coefficient, bi is the coefficient of z^(-i) in the filter numerator, ai is the coefficient of z^(-i) in the filter denominator (fi.)iir_lat2 Two-multiply latice IIR filter of arbitrary order. Usage _ : iir_lat2(bv,av) : _ Where: bv: zeros as a bank of parallel signals av: poles as a bank of parallel signals (fi.)allpassnt Two-multiply lattice allpass (nested order-1 direct-form-ii allpasses). Usage _ : allpassnt(n,sv) : _ Where: n : the order of the filter sv : the reflection coefficients (-1 1) (fi.)iir_kl Kelly-Lochbaum ladder IIR filter of arbitrary order. Usage _ : iir_kl(bv,av) : _ Where: bv: zeros as a bank of parallel signals av: poles as a bank of parallel signals (fi.)allpassnklt Kelly-Lochbaum ladder allpass. Usage: _ : allpassnklt(n,sv) : _ Where: n : the order of the filter sv : the reflection coefficients (-1 1) (fi.)iir_lat1 One-multiply latice IIR filter of arbitrary order. Usage _ : iir_lat1(bv,av) : _ Where: bv: zeros as a bank of parallel signals av: poles as a bank of parallel signals (fi.)allpassn1mt One-multiply lattice allpass with tap lines. Usage _ : allpassn1mt(N,sv) : _ Where: N : the order of the filter (fixed at compile time) sv : the reflection coefficients (-1 1) (fi.)iir_nl Normalized ladder filter of arbitrary order. Usage _ : iir_nl(bv,av) : _ Where: bv: zeros as a bank of parallel signals av: poles as a bank of parallel signals References J. D. Markel and A. H. Gray, Linear Prediction of Speech, New York: Springer Verlag, 1976. https://ccrma.stanford.edu/~jos/pasp/Normalized_Scattering_Junctions.html (fi.)allpassnnlt Normalized ladder allpass filter of arbitrary order. Usage: _ : allpassnnlt(N,sv) : _ Where: N : the order of the filter (fixed at compile time) sv : the reflection coefficients (-1,1) References J. D. Markel and A. H. Gray, Linear Prediction of Speech, New York: Springer Verlag, 1976. https://ccrma.stanford.edu/~jos/pasp/Normalized_Scattering_Junctions.html Useful Special Cases (fi.)tf2np Biquad based on a stable second-order Normalized Ladder Filter (more robust to modulation than tf2 and protected against instability). Usage _ : tf2np(b0,b1,b2,a1,a2) : _ Where: a : the poles b : the zeros (fi.)wgr Second-order transformer-normalized digital waveguide resonator. Usage _ : wgr(f,r) : _ Where: f : resonance frequency (Hz) r : loss factor for exponential decay (set to 1 to make a numerically stable oscillator) References https://ccrma.stanford.edu/~jos/pasp/Power_Normalized_Waveguide_Filters.html https://ccrma.stanford.edu/~jos/pasp/Digital_Waveguide_Oscillator.html (fi.)nlf2 Second order normalized digital waveguide resonator. Usage _ : nlf2(f,r) : _ Where: f : resonance frequency (Hz) r : loss factor for exponential decay (set to 1 to make a sinusoidal oscillator) Reference https://ccrma.stanford.edu/~jos/pasp/Power_Normalized_Waveguide_Filters.html (fi.)apnl Passive Nonlinear Allpass based on Pierce switching springs idea. Switch between allpass coefficient a1 and a2 at signal zero crossings. Usage _ : apnl(a1,a2) : _ Where: a1 and a2 : allpass coefficients Reference \"A Passive Nonlinear Digital Filter Design ...\" by John R. Pierce and Scott A. Van Duyne, JASA, vol. 101, no. 2, pp. 1120-1126, 1997 Ladder/Lattice Allpass Filters An allpass filter has gain 1 at every frequency, but variable phase. Ladder/lattice allpass filters are specified by reflection coefficients. They are defined here as nested allpass filters, hence the names allpassn*. References https://ccrma.stanford.edu/~jos/pasp/Conventional_Ladder_Filters.html https://ccrma.stanford.edu/~jos/pasp/Nested_Allpass_Filters.html Linear Prediction of Speech, Markel and Gray, Springer Verlag, 1976 (fi.)allpassn Two-multiply lattice - each section is two multiply-adds. Usage: _ : allpassn(n,sv) : _ Where: n : the order of the filter sv : the reflection coefficients (-1 1) References J. O. Smith and R. Michon, \"Nonlinear Allpass Ladder Filters in FAUST\", in Proceedings of the 14th International Conference on Digital Audio Effects (DAFx-11), Paris, France, September 19-23, 2011. (fi.)allpassnn Normalized form - four multiplies and two adds per section, but coefficients can be time varying and nonlinear without \"parametric amplification\" (modulation of signal energy). Usage: _ : allpassnn(n,tv) : _ Where: n : the order of the filter tv : the reflection coefficients (-PI PI) (fi.)allpassnkl Kelly-Lochbaum form - four multiplies and two adds per section, but all signals have an immediate physical interpretation as traveling pressure waves, etc. Usage: _ : allpassnkl(n,sv) : _ Where: n : the order of the filter sv : the reflection coefficients (-1 1) (fi.)allpass1m One-multiply form - one multiply and three adds per section. Normally the most efficient in special-purpose hardware. Usage: _ : allpassn1m(n,sv) : _ Where: n : the order of the filter sv : the reflection coefficients (-1 1) Digital Filter Sections Specified as Analog Filter Sections (fi.)tf2s and (fi.)tf2snp Second-order direct-form digital filter, specified by ANALOG transfer-function polynomials B(s)/A(s), and a frequency-scaling parameter. Digitization via the bilinear transform is built in. Usage _ : tf2s(b2,b1,b0,a1,a0,w1) : _ Where: b2 s^2 + b1 s + b0 H(s) = -------------------- s^2 + a1 s + a0 and w1 is the desired digital frequency (in radians/second) corresponding to analog frequency 1 rad/sec (i.e., s = j ). Example test program A second-order ANALOG Butterworth lowpass filter, normalized to have cutoff frequency at 1 rad/sec, has transfer function: 1 H(s) = ----------------- s^2 + a1 s + 1 where a1 = sqrt(2) . Therefore, a DIGITAL Butterworth lowpass cutting off at SR/4 is specified as tf2s(0,0,1,sqrt(2),1,PI*SR/2); Method Bilinear transform scaled for exact mapping of w1. Reference https://ccrma.stanford.edu/~jos/pasp/Bilinear_Transformation.html (fi.)tf1snp First-order special case of tf2snp above. Usage _ : tf1snp(b1,b0,a0) : _ (fi.)tf3slf Analogous to tf2s above, but third order, and using the typical low-frequency-matching bilinear-transform constant 2/T (\"lf\" series) instead of the specific-frequency-matching value used in tf2s and tf1s . Note the lack of a \"w1\" argument. Usage _ : tf3slf(b3,b2,b1,b0,a3,a2,a1,a0) : _ (fi.)tf1s First-order direct-form digital filter, specified by ANALOG transfer-function polynomials B(s)/A(s), and a frequency-scaling parameter. Usage _ : tf1s(b1,b0,a0,w1) : _ Where: b1 s + b0 H(s) = ---------- s + a0 and w1 is the desired digital frequency (in radians/second) corresponding to analog frequency 1 rad/sec (i.e., s = j ). Example test program A first-order ANALOG Butterworth lowpass filter, normalized to have cutoff frequency at 1 rad/sec, has transfer function: 1 H(s) = ------- s + 1 so b0 = a0 = 1 and b1 = 0 . Therefore, a DIGITAL first-order Butterworth lowpass with gain -3dB at SR/4 is specified as tf1s(0,1,1,PI*SR/2); // digital half-band order 1 Butterworth Method Bilinear transform scaled for exact mapping of w1. Reference https://ccrma.stanford.edu/~jos/pasp/Bilinear_Transformation.html (fi.)tf2sb Bandpass mapping of tf2s : In addition to a frequency-scaling parameter w1 (set to HALF the desired passband width in rad/sec), there is a desired center-frequency parameter wc (also in rad/s). Thus, tf2sb implements a fourth-order digital bandpass filter section specified by the coefficients of a second-order analog lowpass prototype section. Such sections can be combined in series for higher orders. The order of mappings is (1) frequency scaling (to set lowpass cutoff w1), (2) bandpass mapping to wc, then (3) the bilinear transform, with the usual scale parameter 2*SR . Algebra carried out in maxima and pasted here. Usage _ : tf2sb(b2,b1,b0,a1,a0,w1,wc) : _ (fi.)tf1sb First-to-second-order lowpass-to-bandpass section mapping, analogous to tf2sb above. Usage _ : tf1sb(b1,b0,a0,w1,wc) : _ Simple Resonator Filters (fi.)resonlp Simple resonant lowpass filter based on tf2s (virtual analog). resonlp is a standard Faust function. Usage _ : resonlp(fc,Q,gain) : _ _ : resonhp(fc,Q,gain) : _ _ : resonbp(fc,Q,gain) : _ Where: fc : center frequency (Hz) Q : q gain : gain (0-1) (fi.)resonhp Simple resonant highpass filters based on tf2s (virtual analog). resonhp is a standard Faust function. Usage _ : resonlp(fc,Q,gain) : _ _ : resonhp(fc,Q,gain) : _ _ : resonbp(fc,Q,gain) : _ Where: fc : center frequency (Hz) Q : q gain : gain (0-1) (fi.)resonbp Simple resonant bandpass filters based on tf2s (virtual analog). resonbp is a standard Faust function. Usage _ : resonlp(fc,Q,gain) : _ _ : resonhp(fc,Q,gain) : _ _ : resonbp(fc,Q,gain) : _ Where: fc : center frequency (Hz) Q : q gain : gain (0-1) Butterworth Lowpass/Highpass Filters (fi.)lowpass Nth-order Butterworth lowpass filter. lowpass is a standard Faust function. Usage _ : lowpass(N,fc) : _ Where: N : filter order (number of poles), nonnegative constant numerical expression fc : desired cut-off frequency (-3dB frequency) in Hz References https://ccrma.stanford.edu/~jos/filters/Butterworth_Lowpass_Design.html butter function in Octave (\"[z,p,g] = butter(N,1,'s');\") (fi.)highpass Nth-order Butterworth highpass filters. highpass is a standard Faust function. Usage _ : highpass(N,fc) : _ Where: N : filter order (number of poles), nonnegative constant numerical expression fc : desired cut-off frequency (-3dB frequency) in Hz References https://ccrma.stanford.edu/~jos/filters/Butterworth_Lowpass_Design.html butter function in Octave (\"[z,p,g] = butter(N,1,'s');\") (fi.)lowpass0_highpass1 Special Filter-Bank Delay-Equalizing Allpass Filters These special allpass filters are needed by filterbank et al. below. They are equivalent to ( lowpass(N,fc) +|- highpass(N,fc))/2 , but with canceling pole-zero pairs removed (which occurs for odd N). (fi.)lowpass_plus | minus_highpass Catch-all definitions for generality - even order is done: Catch-all definitions for generality - even order is done: FIXME: Rewrite the following, as for orders 3 and 5 above, to eliminate pole-zero cancellations: FIXME: Rewrite the following, as for orders 3 and 5 above, to eliminate pole-zero cancellations: Elliptic (Cauer) Lowpass Filters Elliptic (Cauer) Lowpass Filters References http://en.wikipedia.org/wiki/Elliptic_filter functions ncauer and ellip in Octave. (fi.)lowpass3e Third-order Elliptic (Cauer) lowpass filter. Usage _ : lowpass3e(fc) : _ Where: fc : -3dB frequency in Hz Design For spectral band-slice level display (see octave_analyzer3e ): [z,p,g] = ncauer(Rp,Rs,3); % analog zeros, poles, and gain, where Rp = 60 % dB ripple in stopband Rs = 0.2 % dB ripple in passband (fi.)lowpass6e Sixth-order Elliptic/Cauer lowpass filter. Usage _ : lowpass6e(fc) : _ Where: fc : -3dB frequency in Hz Design For spectral band-slice level display (see octave_analyzer6e): [z,p,g] = ncauer(Rp,Rs,6); % analog zeros, poles, and gain, where Rp = 80 % dB ripple in stopband Rs = 0.2 % dB ripple in passband Elliptic Highpass Filters (fi.)highpass3e Third-order Elliptic (Cauer) highpass filter. Inversion of lowpass3e wrt unit circle in s plane (s <- 1/s). Usage _ : highpass3e(fc) : _ Where: fc : -3dB frequency in Hz (fi.)highpass6e Sixth-order Elliptic/Cauer highpass filter. Inversion of lowpass3e wrt unit circle in s plane (s <- 1/s). Usage _ : highpass6e(fc) : _ Where: fc : -3dB frequency in Hz Butterworth Bandpass/Bandstop Filters (fi.)bandpass Order 2*Nh Butterworth bandpass filter made using the transformation s <- s + wc^2/s on lowpass(Nh) , where wc is the desired bandpass center frequency. The lowpass(Nh) cutoff w1 is half the desired bandpass width. bandpass is a standard Faust function. Usage _ : bandpass(Nh,fl,fu) : _ Where: Nh : HALF the desired bandpass order (which is therefore even) fl : lower -3dB frequency in Hz fu : upper -3dB frequency in Hz Thus, the passband width is fu-fl , and its center frequency is (fl+fu)/2 . Reference http://cnx.org/content/m16913/latest/ (fi.)bandstop Order 2*Nh Butterworth bandstop filter made using the transformation s <- s + wc^2/s on highpass(Nh) , where wc is the desired bandpass center frequency. The highpass(Nh) cutoff w1 is half the desired bandpass width. bandstop is a standard Faust function. Usage _ : bandstop(Nh,fl,fu) : _ Where: Nh : HALF the desired bandstop order (which is therefore even) fl : lower -3dB frequency in Hz fu : upper -3dB frequency in Hz Thus, the passband (stopband) width is fu-fl , and its center frequency is (fl+fu)/2 . Reference http://cnx.org/content/m16913/latest/ Elliptic Bandpass Filters (fi.)bandpass6e Order 12 elliptic bandpass filter analogous to bandpass(6) . (fi.)bandpass12e Order 24 elliptic bandpass filter analogous to bandpass(6) . (fi.)pospass Positive-Pass Filter (single-side-band filter). Usage _ : pospass(N,fc) : _,_ where N : filter order (Butterworth bandpass for positive frequencies). fc : lower bandpass cutoff frequency in Hz. Highpass cutoff frequency at ma.SR/2 - fc Hz. Example test program See dm.pospass_demo Look at frequency response Method A filter passing only positive frequencies can be made from a half-band lowpass by modulating it up to the positive-frequency range. Equivalently, down-modulate the input signal using a complex sinusoid at -SR/4 Hz, lowpass it with a half-band filter, and modulate back up by SR/4 Hz. In Faust/math notation: pospass(N) = \\ast(e^{-j\\frac{\\pi}{2}n}) : \\mbox{lowpass(N,SR/4)} : \\ast(e^{j\\frac{\\pi}{2}n}) An approximation to the Hilbert transform is given by the imaginary output signal: hilbert(N) = pospass(N) : !,*(2); References https://ccrma.stanford.edu/~jos/mdft/Analytic_Signals_Hilbert_Transform.html https://ccrma.stanford.edu/~jos/sasp/Comparison_Optimal_Chebyshev_FIR_I.html https://ccrma.stanford.edu/~jos/sasp/Hilbert_Transform.html Parametric Equalizers (Shelf, Peaking) Parametric Equalizers (Shelf, Peaking). References http://en.wikipedia.org/wiki/Equalization https://webaudio.github.io/Audio-EQ-Cookbook/Audio-EQ-Cookbook.txt Digital Audio Signal Processing, Udo Zolzer, Wiley, 1999, p. 124 https://ccrma.stanford.edu/~jos/filters/Low_High_Shelving_Filters.html https://ccrma.stanford.edu/~jos/filters/Peaking_Equalizers.html maxmsp.lib in the Faust distribution bandfilter.dsp in the faust2pd distribution (fi.)low_shelf First-order \"low shelf\" filter (gain boost|cut between dc and some frequency) low_shelf is a standard Faust function. Usage _ : lowshelf(N,L0,fx) : _ _ : low_shelf(L0,fx) : _ // default case (order 3) _ : lowshelf_other_freq(N,L0,fx) : _ Where: * N : filter order 1, 3, 5, ... (odd only, default should be 3, a constant numerical expression) * L0 : desired level (dB) between dc and fx (boost L0>0 or cut L0<0 ) * fx : -3dB frequency of lowpass band ( L0>0 ) or upper band ( L0<0 ) (see \"SHELF SHAPE\" below). The gain at SR/2 is constrained to be 1. The generalization to arbitrary odd orders is based on the well known fact that odd-order Butterworth band-splits are allpass-complementary (see filterbank documentation below for references). Shelf Shape The magnitude frequency response is approximately piecewise-linear on a log-log plot (\"BODE PLOT\"). The Bode \"stick diagram\" approximation L(lf) is easy to state in dB versus dB-frequency lf = dB(f): L0 > 0: L(lf) = L0, f between 0 and fx = 1st corner frequency; L(lf) = L0 - N * (lf - lfx), f between fx and f2 = 2nd corner frequency; L(lf) = 0, lf > lf2. lf2 = lfx + L0/N = dB-frequency at which level gets back to 0 dB. L0 < 0: L(lf) = L0, f between 0 and f1 = 1st corner frequency; L(lf) = - N * (lfx - lf), f between f1 and lfx = 2nd corner frequency; L(lf) = 0, lf > lfx. lf1 = lfx + L0/N = dB-frequency at which level goes up from L0. See lowshelf_other_freq . References See \"Parametric Equalizers\" above for references regarding low_shelf , high_shelf , and peak_eq . (fi.)high_shelf First-order \"high shelf\" filter (gain boost|cut above some frequency). high_shelf is a standard Faust function. Usage _ : highshelf(N,Lpi,fx) : _ _ : high_shelf(L0,fx) : _ // default case (order 3) _ : highshelf_other_freq(N,Lpi,fx) : _ Where: N : filter order 1, 3, 5, ... (odd only, a constant numerical expression). Lpi : desired level (dB) between fx and SR/2 (boost Lpi>0 or cut Lpi<0) fx : -3dB frequency of highpass band (L0>0) or lower band (L0<0) (Use highshelf_other_freq() below to find the other one.) The gain at dc is constrained to be 1. See lowshelf documentation above for more details on shelf shape. References See \"Parametric Equalizers\" above for references regarding low_shelf , high_shelf , and peak_eq . (fi.)peak_eq Second order \"peaking equalizer\" section (gain boost or cut near some frequency) Also called a \"parametric equalizer\" section. peak_eq is a standard Faust function. Usage _ : peak_eq(Lfx,fx,B) : _ Where: Lfx : level (dB) at fx (boost Lfx>0 or cut Lfx<0) fx : peak frequency (Hz) B : bandwidth (B) of peak in Hz References See \"Parametric Equalizers\" above for references regarding low_shelf , high_shelf , and peak_eq . (fi.)peak_eq_cq Constant-Q second order peaking equalizer section. Usage _ : peak_eq_cq(Lfx,fx,Q) : _ Where: Lfx : level (dB) at fx fx : boost or cut frequency (Hz) Q : \"Quality factor\" = fx/B where B = bandwidth of peak in Hz References See \"Parametric Equalizers\" above for references regarding low_shelf , high_shelf , and peak_eq . (fi.)peak_eq_rm Regalia-Mitra second order peaking equalizer section. Usage _ : peak_eq_rm(Lfx,fx,tanPiBT) : _ Where: Lfx : level (dB) at fx fx : boost or cut frequency (Hz) tanPiBT : tan(PI*B/SR) , where B = -3dB bandwidth (Hz) when 10^(Lfx/20) = 0 ~ PI*B/SR for narrow bandwidths B Reference P.A. Regalia, S.K. Mitra, and P.P. Vaidyanathan, \"The Digital All-Pass Filter: A Versatile Signal Processing Building Block\" Proceedings of the IEEE, 76(1):19-37, Jan. 1988. (See pp. 29-30.) See also \"Parametric Equalizers\" above for references on shelf and peaking equalizers in general. (fi.)spectral_tilt Spectral tilt filter, providing an arbitrary spectral rolloff factor alpha in (-1,1), where -1 corresponds to one pole (-6 dB per octave), and +1 corresponds to one zero (+6 dB per octave). In other words, alpha is the slope of the ln magnitude versus ln frequency. For a \"pinking filter\" (e.g., to generate 1/f noise from white noise), set alpha to -1/2. Usage _ : spectral_tilt(N,f0,bw,alpha) : _ Where: N : desired integer filter order (fixed at compile time) f0 : lower frequency limit for desired roll-off band > 0 bw : bandwidth of desired roll-off band alpha : slope of roll-off desired in nepers per neper, between -1 and 1 (ln mag / ln radian freq) Example test program See dm.spectral_tilt_demo and the documentation for no.pink_noise . Reference J.O. Smith and H.F. Smith, \"Closed Form Fractional Integration and Differentiation via Real Exponentially Spaced Pole-Zero Pairs\", arXiv.org publication arXiv:1606.06154 [cs.CE], June 7, 2016, * http://arxiv.org/abs/1606.06154 (fi.)levelfilter Dynamic level lowpass filter. levelfilter is a standard Faust function. Usage _ : levelfilter(L,freq) : _ Where: L : desired level (in dB) at Nyquist limit (SR/2), e.g., -60 freq : corner frequency (-3dB point) usually set to fundamental freq N : Number of filters in series where L = L/N Reference https://ccrma.stanford.edu/realsimple/faust_strings/Dynamic_Level_Lowpass_Filter.html (fi.)levelfilterN Dynamic level lowpass filter. Usage _ : levelfilterN(N,freq,L) : _ Where: N : Number of filters in series where L = L/N, a constant numerical expression freq : corner frequency (-3dB point) usually set to fundamental freq L : desired level (in dB) at Nyquist limit (SR/2), e.g., -60 Reference https://ccrma.stanford.edu/realsimple/faust_strings/Dynamic_Level_Lowpass_Filter.html Mth-Octave Filter-Banks Mth-octave filter-banks split the input signal into a bank of parallel signals, one for each spectral band. They are related to the Mth-Octave Spectrum-Analyzers in analysis.lib . The documentation of this library contains more details about the implementation. The parameters are: M : number of band-slices per octave (>1), a constant numerical expression N : total number of bands (>2), a constant numerical expression ftop : upper bandlimit of the Mth-octave bands (0 or cut L0<0 ) * fx : -3dB frequency of lowpass band ( L0>0 ) or upper band ( L0<0 ) (see \"SHELF SHAPE\" below). The gain at SR/2 is constrained to be 1. The generalization to arbitrary odd orders is based on the well known fact that odd-order Butterworth band-splits are allpass-complementary (see filterbank documentation below for references).","title":"Usage"},{"location":"libs/filters/#shelf-shape","text":"The magnitude frequency response is approximately piecewise-linear on a log-log plot (\"BODE PLOT\"). The Bode \"stick diagram\" approximation L(lf) is easy to state in dB versus dB-frequency lf = dB(f): L0 > 0: L(lf) = L0, f between 0 and fx = 1st corner frequency; L(lf) = L0 - N * (lf - lfx), f between fx and f2 = 2nd corner frequency; L(lf) = 0, lf > lf2. lf2 = lfx + L0/N = dB-frequency at which level gets back to 0 dB. L0 < 0: L(lf) = L0, f between 0 and f1 = 1st corner frequency; L(lf) = - N * (lfx - lf), f between f1 and lfx = 2nd corner frequency; L(lf) = 0, lf > lfx. lf1 = lfx + L0/N = dB-frequency at which level goes up from L0. See lowshelf_other_freq .","title":"Shelf Shape"},{"location":"libs/filters/#references_13","text":"See \"Parametric Equalizers\" above for references regarding low_shelf , high_shelf , and peak_eq .","title":"References"},{"location":"libs/filters/#fihigh_shelf","text":"First-order \"high shelf\" filter (gain boost|cut above some frequency). high_shelf is a standard Faust function.","title":"(fi.)high_shelf"},{"location":"libs/filters/#usage_55","text":"_ : highshelf(N,Lpi,fx) : _ _ : high_shelf(L0,fx) : _ // default case (order 3) _ : highshelf_other_freq(N,Lpi,fx) : _ Where: N : filter order 1, 3, 5, ... (odd only, a constant numerical expression). Lpi : desired level (dB) between fx and SR/2 (boost Lpi>0 or cut Lpi<0) fx : -3dB frequency of highpass band (L0>0) or lower band (L0<0) (Use highshelf_other_freq() below to find the other one.) The gain at dc is constrained to be 1. See lowshelf documentation above for more details on shelf shape.","title":"Usage"},{"location":"libs/filters/#references_14","text":"See \"Parametric Equalizers\" above for references regarding low_shelf , high_shelf , and peak_eq .","title":"References"},{"location":"libs/filters/#fipeak_eq","text":"Second order \"peaking equalizer\" section (gain boost or cut near some frequency) Also called a \"parametric equalizer\" section. peak_eq is a standard Faust function.","title":"(fi.)peak_eq"},{"location":"libs/filters/#usage_56","text":"_ : peak_eq(Lfx,fx,B) : _ Where: Lfx : level (dB) at fx (boost Lfx>0 or cut Lfx<0) fx : peak frequency (Hz) B : bandwidth (B) of peak in Hz","title":"Usage"},{"location":"libs/filters/#references_15","text":"See \"Parametric Equalizers\" above for references regarding low_shelf , high_shelf , and peak_eq .","title":"References"},{"location":"libs/filters/#fipeak_eq_cq","text":"Constant-Q second order peaking equalizer section.","title":"(fi.)peak_eq_cq"},{"location":"libs/filters/#usage_57","text":"_ : peak_eq_cq(Lfx,fx,Q) : _ Where: Lfx : level (dB) at fx fx : boost or cut frequency (Hz) Q : \"Quality factor\" = fx/B where B = bandwidth of peak in Hz","title":"Usage"},{"location":"libs/filters/#references_16","text":"See \"Parametric Equalizers\" above for references regarding low_shelf , high_shelf , and peak_eq .","title":"References"},{"location":"libs/filters/#fipeak_eq_rm","text":"Regalia-Mitra second order peaking equalizer section.","title":"(fi.)peak_eq_rm"},{"location":"libs/filters/#usage_58","text":"_ : peak_eq_rm(Lfx,fx,tanPiBT) : _ Where: Lfx : level (dB) at fx fx : boost or cut frequency (Hz) tanPiBT : tan(PI*B/SR) , where B = -3dB bandwidth (Hz) when 10^(Lfx/20) = 0 ~ PI*B/SR for narrow bandwidths B","title":"Usage"},{"location":"libs/filters/#reference_22","text":"P.A. Regalia, S.K. Mitra, and P.P. Vaidyanathan, \"The Digital All-Pass Filter: A Versatile Signal Processing Building Block\" Proceedings of the IEEE, 76(1):19-37, Jan. 1988. (See pp. 29-30.) See also \"Parametric Equalizers\" above for references on shelf and peaking equalizers in general.","title":"Reference"},{"location":"libs/filters/#fispectral_tilt","text":"Spectral tilt filter, providing an arbitrary spectral rolloff factor alpha in (-1,1), where -1 corresponds to one pole (-6 dB per octave), and +1 corresponds to one zero (+6 dB per octave). In other words, alpha is the slope of the ln magnitude versus ln frequency. For a \"pinking filter\" (e.g., to generate 1/f noise from white noise), set alpha to -1/2.","title":"(fi.)spectral_tilt"},{"location":"libs/filters/#usage_59","text":"_ : spectral_tilt(N,f0,bw,alpha) : _ Where: N : desired integer filter order (fixed at compile time) f0 : lower frequency limit for desired roll-off band > 0 bw : bandwidth of desired roll-off band alpha : slope of roll-off desired in nepers per neper, between -1 and 1 (ln mag / ln radian freq)","title":"Usage"},{"location":"libs/filters/#example-test-program_4","text":"See dm.spectral_tilt_demo and the documentation for no.pink_noise .","title":"Example test program"},{"location":"libs/filters/#reference_23","text":"J.O. Smith and H.F. Smith, \"Closed Form Fractional Integration and Differentiation via Real Exponentially Spaced Pole-Zero Pairs\", arXiv.org publication arXiv:1606.06154 [cs.CE], June 7, 2016, * http://arxiv.org/abs/1606.06154","title":"Reference"},{"location":"libs/filters/#filevelfilter","text":"Dynamic level lowpass filter. levelfilter is a standard Faust function.","title":"(fi.)levelfilter"},{"location":"libs/filters/#usage_60","text":"_ : levelfilter(L,freq) : _ Where: L : desired level (in dB) at Nyquist limit (SR/2), e.g., -60 freq : corner frequency (-3dB point) usually set to fundamental freq N : Number of filters in series where L = L/N","title":"Usage"},{"location":"libs/filters/#reference_24","text":"https://ccrma.stanford.edu/realsimple/faust_strings/Dynamic_Level_Lowpass_Filter.html","title":"Reference"},{"location":"libs/filters/#filevelfiltern","text":"Dynamic level lowpass filter.","title":"(fi.)levelfilterN"},{"location":"libs/filters/#usage_61","text":"_ : levelfilterN(N,freq,L) : _ Where: N : Number of filters in series where L = L/N, a constant numerical expression freq : corner frequency (-3dB point) usually set to fundamental freq L : desired level (in dB) at Nyquist limit (SR/2), e.g., -60","title":"Usage"},{"location":"libs/filters/#reference_25","text":"https://ccrma.stanford.edu/realsimple/faust_strings/Dynamic_Level_Lowpass_Filter.html","title":"Reference"},{"location":"libs/filters/#mth-octave-filter-banks","text":"Mth-octave filter-banks split the input signal into a bank of parallel signals, one for each spectral band. They are related to the Mth-Octave Spectrum-Analyzers in analysis.lib . The documentation of this library contains more details about the implementation. The parameters are: M : number of band-slices per octave (>1), a constant numerical expression N : total number of bands (>2), a constant numerical expression ftop : upper bandlimit of the Mth-octave bands (0. Usage _ : signum : _ (ma.)nextpow2 The nextpow2(x) returns the lowest integer m such that 2^m >= x. Usage 2^nextpow2(n) : _ Useful for allocating delay lines, e.g., delay(2^nextpow2(maxDelayNeeded), currentDelay); (ma.)zc Indicator function for zero-crossing: it returns 1 if a zero-crossing occurs, 0 otherwise. Usage _ : zc : _","title":" maths "},{"location":"libs/maths/#mathslib","text":"Mathematic library for Faust. Its official prefix is ma .","title":"maths.lib"},{"location":"libs/maths/#references","text":"https://github.com/grame-cncm/faustlibraries/blob/master/maths.lib","title":"References"},{"location":"libs/maths/#functions-reference","text":"","title":"Functions Reference"},{"location":"libs/maths/#masr","text":"Current sampling rate given at init time. Constant during program execution.","title":"(ma.)SR"},{"location":"libs/maths/#usage","text":"SR : _","title":"Usage"},{"location":"libs/maths/#mat","text":"Current sample duration in seconds computed from the sampling rate given at init time. Constant during program execution.","title":"(ma.)T"},{"location":"libs/maths/#usage_1","text":"T : _","title":"Usage"},{"location":"libs/maths/#mabs","text":"Current block-size. Can change during the execution at each block.","title":"(ma.)BS"},{"location":"libs/maths/#usage_2","text":"BS : _","title":"Usage"},{"location":"libs/maths/#mapi","text":"Constant PI in double precision.","title":"(ma.)PI"},{"location":"libs/maths/#usage_3","text":"PI : _","title":"Usage"},{"location":"libs/maths/#madeg2rad","text":"Convert degrees to radians.","title":"(ma.)deg2rad"},{"location":"libs/maths/#usage_4","text":"45. : deg2rad","title":"Usage"},{"location":"libs/maths/#marad2deg","text":"Convert radians to degrees.","title":"(ma.)rad2deg"},{"location":"libs/maths/#usage_5","text":"ma.PI : rad2deg","title":"Usage"},{"location":"libs/maths/#mae","text":"Constant e in double precision.","title":"(ma.)E"},{"location":"libs/maths/#usage_6","text":"E : _","title":"Usage"},{"location":"libs/maths/#maepsilon","text":"Constant EPSILON available in simple/double/quad precision.","title":"(ma.)EPSILON"},{"location":"libs/maths/#usage_7","text":"EPSILON : _","title":"Usage"},{"location":"libs/maths/#mamin","text":"Constant MIN available in simple/double/quad precision (minimal positive value).","title":"(ma.)MIN"},{"location":"libs/maths/#usage_8","text":"MIN : _","title":"Usage"},{"location":"libs/maths/#mamax","text":"Constant MAX available in simple/double/quad precision (maximal positive value).","title":"(ma.)MAX"},{"location":"libs/maths/#usage_9","text":"MAX : _","title":"Usage"},{"location":"libs/maths/#maftz","text":"Flush to zero: force samples under the \"maximum subnormal number\" to be zero. Usually not needed in C++ because the architecture file take care of this, but can be useful in JavaScript for instance.","title":"(ma.)FTZ"},{"location":"libs/maths/#usage_10","text":"_ : FTZ : _","title":"Usage"},{"location":"libs/maths/#reference","text":"http://docs.oracle.com/cd/E19957-01/806-3568/ncg_math.html","title":"Reference"},{"location":"libs/maths/#macopysign","text":"Changes the sign of x (first input) to that of y (second input).","title":"(ma.)copysign"},{"location":"libs/maths/#usage_11","text":"_,_ : copysign : _","title":"Usage"},{"location":"libs/maths/#maneg","text":"Invert the sign (-x) of a signal.","title":"(ma.)neg"},{"location":"libs/maths/#usage_12","text":"_ : neg : _","title":"Usage"},{"location":"libs/maths/#masubxy","text":"Subtract x and y .","title":"(ma.)sub(x,y)"},{"location":"libs/maths/#usage_13","text":"_,_ : sub : _","title":"Usage"},{"location":"libs/maths/#mainv","text":"Compute the inverse (1/x) of the input signal.","title":"(ma.)inv"},{"location":"libs/maths/#usage_14","text":"_ : inv : _","title":"Usage"},{"location":"libs/maths/#macbrt","text":"Computes the cube root of of the input signal.","title":"(ma.)cbrt"},{"location":"libs/maths/#usage_15","text":"_ : cbrt : _","title":"Usage"},{"location":"libs/maths/#mahypot","text":"Computes the euclidian distance of the two input signals sqrt(x x+y y) without undue overflow or underflow.","title":"(ma.)hypot"},{"location":"libs/maths/#usage_16","text":"_,_ : hypot : _","title":"Usage"},{"location":"libs/maths/#maldexp","text":"Takes two input signals: x and n, and multiplies x by 2 to the power n.","title":"(ma.)ldexp"},{"location":"libs/maths/#usage_17","text":"_,_ : ldexp : _","title":"Usage"},{"location":"libs/maths/#mascalb","text":"Takes two input signals: x and n, and multiplies x by 2 to the power n.","title":"(ma.)scalb"},{"location":"libs/maths/#usage_18","text":"_,_ : scalb : _","title":"Usage"},{"location":"libs/maths/#malog1p","text":"Computes log(1 + x) without undue loss of accuracy when x is nearly zero.","title":"(ma.)log1p"},{"location":"libs/maths/#usage_19","text":"_ : log1p : _","title":"Usage"},{"location":"libs/maths/#malogb","text":"Return exponent of the input signal as a floating-point number.","title":"(ma.)logb"},{"location":"libs/maths/#usage_20","text":"_ : logb : _","title":"Usage"},{"location":"libs/maths/#mailogb","text":"Return exponent of the input signal as an integer number.","title":"(ma.)ilogb"},{"location":"libs/maths/#usage_21","text":"_ : ilogb : _","title":"Usage"},{"location":"libs/maths/#malog2","text":"Returns the base 2 logarithm of x.","title":"(ma.)log2"},{"location":"libs/maths/#usage_22","text":"_ : log2 : _","title":"Usage"},{"location":"libs/maths/#maexpm1","text":"Return exponent of the input signal minus 1 with better precision.","title":"(ma.)expm1"},{"location":"libs/maths/#usage_23","text":"_ : expm1 : _","title":"Usage"},{"location":"libs/maths/#maacosh","text":"Computes the principle value of the inverse hyperbolic cosine of the input signal.","title":"(ma.)acosh"},{"location":"libs/maths/#usage_24","text":"_ : acosh : _","title":"Usage"},{"location":"libs/maths/#maasinh","text":"Computes the inverse hyperbolic sine of the input signal.","title":"(ma.)asinh"},{"location":"libs/maths/#usage_25","text":"_ : asinh : _","title":"Usage"},{"location":"libs/maths/#maatanh","text":"Computes the inverse hyperbolic tangent of the input signal.","title":"(ma.)atanh"},{"location":"libs/maths/#usage_26","text":"_ : atanh : _","title":"Usage"},{"location":"libs/maths/#masinh","text":"Computes the hyperbolic sine of the input signal.","title":"(ma.)sinh"},{"location":"libs/maths/#usage_27","text":"_ : sinh : _","title":"Usage"},{"location":"libs/maths/#macosh","text":"Computes the hyperbolic cosine of the input signal.","title":"(ma.)cosh"},{"location":"libs/maths/#usage_28","text":"_ : cosh : _","title":"Usage"},{"location":"libs/maths/#matanh","text":"Computes the hyperbolic tangent of the input signal.","title":"(ma.)tanh"},{"location":"libs/maths/#usage_29","text":"_ : tanh : _","title":"Usage"},{"location":"libs/maths/#maerf","text":"Computes the error function of the input signal.","title":"(ma.)erf"},{"location":"libs/maths/#usage_30","text":"_ : erf : _","title":"Usage"},{"location":"libs/maths/#maerfc","text":"Computes the complementary error function of the input signal.","title":"(ma.)erfc"},{"location":"libs/maths/#usage_31","text":"_ : erfc : _","title":"Usage"},{"location":"libs/maths/#magamma","text":"Computes the gamma function of the input signal.","title":"(ma.)gamma"},{"location":"libs/maths/#usage_32","text":"_ : gamma : _","title":"Usage"},{"location":"libs/maths/#malgamma","text":"Calculates the natural logorithm of the absolute value of the gamma function of the input signal.","title":"(ma.)lgamma"},{"location":"libs/maths/#usage_33","text":"_ : lgamma : _","title":"Usage"},{"location":"libs/maths/#maj0","text":"Computes the Bessel function of the first kind of order 0 of the input signal.","title":"(ma.)J0"},{"location":"libs/maths/#usage_34","text":"_ : J0 : _","title":"Usage"},{"location":"libs/maths/#maj1","text":"Computes the Bessel function of the first kind of order 1 of the input signal.","title":"(ma.)J1"},{"location":"libs/maths/#usage_35","text":"_ : J1 : _","title":"Usage"},{"location":"libs/maths/#majn","text":"Computes the Bessel function of the first kind of order n (first input signal) of the second input signal.","title":"(ma.)Jn"},{"location":"libs/maths/#usage_36","text":"_,_ : Jn : _","title":"Usage"},{"location":"libs/maths/#may0","text":"Computes the linearly independent Bessel function of the second kind of order 0 of the input signal.","title":"(ma.)Y0"},{"location":"libs/maths/#usage_37","text":"_ : Y0 : _","title":"Usage"},{"location":"libs/maths/#may1","text":"Computes the linearly independent Bessel function of the second kind of order 1 of the input signal.","title":"(ma.)Y1"},{"location":"libs/maths/#usage_38","text":"_ : Y0 : _","title":"Usage"},{"location":"libs/maths/#mayn","text":"Computes the linearly independent Bessel function of the second kind of order n (first input signal) of the second input signal.","title":"(ma.)Yn"},{"location":"libs/maths/#usage_39","text":"_,_ : Yn : _","title":"Usage"},{"location":"libs/maths/#mafabs-mafmax-mafmin","text":"Just for compatibility... fabs = abs fmax = max fmin = min","title":"(ma.)fabs, (ma.)fmax, (ma.)fmin"},{"location":"libs/maths/#manp2","text":"Gives the next power of 2 of x.","title":"(ma.)np2"},{"location":"libs/maths/#usage_40","text":"np2(n) : _ Where: n : an integer","title":"Usage"},{"location":"libs/maths/#mafrac","text":"Gives the fractional part of n.","title":"(ma.)frac"},{"location":"libs/maths/#usage_41","text":"frac(n) : _ Where: n : a decimal number","title":"Usage"},{"location":"libs/maths/#mamodulo","text":"Modulus operation.","title":"(ma.)modulo"},{"location":"libs/maths/#usage_42","text":"modulo(x,y) : _ Where: x : the numerator y : the denominator","title":"Usage"},{"location":"libs/maths/#maisnan","text":"Return non-zero if x is a NaN.","title":"(ma.)isnan"},{"location":"libs/maths/#usage_43","text":"isnan(x) _ : isnan : _ Where: x : signal to analyse","title":"Usage"},{"location":"libs/maths/#maisinf","text":"Return non-zero if x is a positive or negative infinity.","title":"(ma.)isinf"},{"location":"libs/maths/#usage_44","text":"isinf(x) _ : isinf : _ Where: x : signal to analyse","title":"Usage"},{"location":"libs/maths/#machebychev","text":"Chebychev transformation of order N.","title":"(ma.)chebychev"},{"location":"libs/maths/#usage_45","text":"_ : chebychev(N) : _ Where: N : the order of the polynomial, a constant numerical expression","title":"Usage"},{"location":"libs/maths/#semantics","text":"T[0](x) = 1, T[1](x) = x, T[n](x) = 2x*T[n-1](x) - T[n-2](x)","title":"Semantics"},{"location":"libs/maths/#reference_1","text":"http://en.wikipedia.org/wiki/Chebyshev_polynomial","title":"Reference"},{"location":"libs/maths/#machebychevpoly","text":"Linear combination of the first Chebyshev polynomials.","title":"(ma.)chebychevpoly"},{"location":"libs/maths/#usage_46","text":"_ : chebychevpoly((c0,c1,...,cn)) : _ Where: cn : the different Chebychevs polynomials such that: chebychevpoly((c0,c1,...,cn)) = Sum of chebychev(i)*ci","title":"Usage"},{"location":"libs/maths/#reference_2","text":"http://www.csounds.com/manual/html/chebyshevpoly.html","title":"Reference"},{"location":"libs/maths/#madiffn","text":"Negated first-order difference.","title":"(ma.)diffn"},{"location":"libs/maths/#usage_47","text":"_ : diffn : _","title":"Usage"},{"location":"libs/maths/#masignum","text":"The signum function signum(x) is defined as -1 for x<0, 0 for x==0, and 1 for x>0.","title":"(ma.)signum"},{"location":"libs/maths/#usage_48","text":"_ : signum : _","title":"Usage"},{"location":"libs/maths/#manextpow2","text":"The nextpow2(x) returns the lowest integer m such that 2^m >= x.","title":"(ma.)nextpow2"},{"location":"libs/maths/#usage_49","text":"2^nextpow2(n) : _ Useful for allocating delay lines, e.g., delay(2^nextpow2(maxDelayNeeded), currentDelay);","title":"Usage"},{"location":"libs/maths/#mazc","text":"Indicator function for zero-crossing: it returns 1 if a zero-crossing occurs, 0 otherwise.","title":"(ma.)zc"},{"location":"libs/maths/#usage_50","text":"_ : zc : _","title":"Usage"},{"location":"libs/mi/","text":"mi.lib This ongoing work is the fruit of a collaboration between GRAME-CNCM and the ANIS (Arts Num\u00e9riques et Immersions Sensorielles) research group from GIPSA-Lab (Universit\u00e9 Grenoble Alpes). This library implements basic 1-DoF mass-interaction physics algorithms, allowing to declare and connect physical elements (masses, springs, non linear interactions, etc.) together to form topological networks. Models can be assembled by hand, however in more complex scenarios it is recommended to use a scripting tool (such as MIMS) to generate the FAUST signal routing for a given physical network. Its official prefix is mi . https://github.com/rmichon/mi_faust http://mi-creative.eu/tool_miFaust.html http://mi-creative.eu/paper_lac19.html Sources The core mass-interaction algorithms implemented in this library are in the public domain and are disclosed in the following scientific publications: Claude Cadoz, Annie Luciani, Jean-Loup Florens, Curtis Roads and Fran\u00e7oise Chabade. Responsive Input Devices and Sound Synthesis by Stimulation of Instrumental Mechanisms: The Cordis System. Computer Music Journal, Vol 8. No. 3, 1984. Claude Cadoz, Annie Luciani and Jean Loup Florens. CORDIS-ANIMA: A Modeling and Simulation System for Sound and Image Synthesis: The General Formalism. Computer Music Journal. Vol. 17, No. 1, 1993. Alexandros Kontogeorgakopoulos and Claude Cadoz. Cordis Anima Physical Modeling and Simulation System Analysis. In Proceedings of the Sound and Music Computing Conference (SMC-07), Lefkada, Greece, 2007. Nicolas Castagne, Claude Cadoz, Ali Allaoui and Olivier Tache. G3: Genesis Software Environment Update. In Proceedings of the International Computer Music Conference (ICMC-09), Montreal, Canada, 2009. Nicolas Castagn\u00e9 and Claude Cadoz. Genesis 3: Plate-forme pour la cr\u00e9ation musicale \u00e0 l'aide des mod\u00e8les physiques Cordis-Anima. In Proceedings of the Journ\u00e9e de l'Informatique Musicale, Grenoble, France, 2009. Edgar Berdahl and Julius O. Smith. An Introduction to the Synth-A-Modeler Compiler: Modular and Open-Source Sound Synthesis using Physical Models. In Proceedings of the Linux Audio Conference (LAC-12), Stanford, USA, 2012. James Leonard and Claude Cadoz. Physical Modelling Concepts for a Collection of Multisensory Virtual Musical Instruments. In Proceedings of the New Interfaces for Musical Expression (NIME-15) Conference, Baton Rouge, USA, 2015. References https://github.com/grame-cncm/faustlibraries/blob/master/mi.lib Utility Functions These utility functions are used to help certain operations (e.g. define initial positions and velocities for physical elements). (mi.)initState Used to set initial delayed position values that must be initialised at step 0 of the physics simulation. If you develop any of your own modules, you will need to use this (see mass and springDamper algorithm codes for examples). Usage x : initState(x0) : _ Where: x : position value signal x0 : initial value for position Mass Algorithms All mass-type physical element functions are declared here. They all expect to receive a force input signal and produce a position signal. All physical parameters are expressed in sample-rate dependant values. (mi.)mass Implementation of a punctual mass element. Takes an input force and produces output position. Usage mass(m, grav, x0, xr0),_ : _ Where: m : mass value grav : gravity force value x0 : initial position xr0 : initial delayed position (inferred from initial velocity) (mi.)oscil Implementation of a simple linear harmonic oscillator. Takes an input force and produces output position. Usage oscil(m, k, z, grav, x0, xr0),_ : _ Where: m : mass value k : stiffness value z : damping value grav : gravity force value x0 : initial position xr0 : initial delayed position (inferred from initial velocity) (mi.)ground Implementation of a fixed point element. The position output produced by this module never changes, however it still expects a force input signal (for compliance with connection rules). Usage ground(x0),_ : _ Where: x0 : initial position (mi.)posInput Implementation of a position input module (driven by an outside signal). Takes two signal inputs: incoming force (which doesn't affect position) and the driving position signal. Usage posInput(x0),_,_ : _ Where: x0 : initial position Interaction Algorithms All interaction-type physical element functions are declared here. They each expect to receive two position signals (coming from the two mass-elements that they connect) and produce two equal and opposite force signals that must be routed back to the mass elements' inputs. All physical parameters are expressed in sample-rate dependant values. (mi.)spring Implementation of a linear elastic spring interaction. Usage spring(k, x1r, x2r),_,_ : _,_ Where: k : stiffness value x1r : initial delayed position of mass 1 (unused here) x2r : initial delayed position of mass 2 (unused here) (mi.)damper Implementation of a linear damper interaction. Beware: in 32bit precision mode, damping forces can become truncated if position values are not centered around zero! Usage damper(z, x1r, x2r),_,_ : _,_ Where: z : damping value x1r : initial delayed position of mass 1 x2r : initial delayed position of mass 2 (mi.)springDamper Implementation of a linear viscoelastic spring-damper interaction (a combination of the spring and damper modules). Usage springDamper(k, z, x1r, x2r),_,_ : _,_ Where: k : stiffness value z : damping value x1r : initial delayed position of mass 1 x2r : initial delayed position of mass 2 (mi.)nlSpringDamper2 Implementation of a non-linear viscoelastic spring-damper interaction containing a quadratic term (function of squared distance). Beware: at high displacements, this interaction will break numerical stability conditions ! The nlSpringDamperClipped is a safer option. Usage nlSpringDamper2(k, q, z, x1r, x2r),_,_ : _,_ Where: k : linear stiffness value q : quadratic stiffness value z : damping value x1r : initial delayed position of mass 1 x2r : initial delayed position of mass 2 (mi.)nlSpringDamper3 Implementation of a non-linear viscoelastic spring-damper interaction containing a cubic term (function of distance^3). Beware: at high displacements, this interaction will break numerical stability conditions ! The nlSpringDamperClipped is a safer option. Usage nlSpringDamper3(k, q, z, x1r, x2r),_,_ : _,_ Where: k : linear stiffness value q : cubic stiffness value z : damping value x1r : initial delayed position of mass 1 x2r : initial delayed position of mass 2 (mi.)nlSpringDamperClipped Implementation of a non-linear viscoelastic spring-damper interaction containing a cubic term (function of distance^3), bound by an upper linear stiffness (hard-clipping). This bounding means that when faced with strong displacements, the interaction profile will \"clip\" at a given point and never produce forces higher than the bounding equivalent linear spring, stopping models from becoming unstable. So far the interaction clips \"hard\" (with no soft-knee spline interpolation, etc.) Usage nlSpringDamperClipped(s, c, k, z, x1r, x2r),_,_ : _,_ Where: s : linear stiffness value c : cubic stiffness value k : upper-bound linear stiffness value z : (linear) damping value x1r : initial delayed position of mass 1 x2r : initial delayed position of mass 2 (mi.)nlPluck Implementation of a piecewise linear plucking interaction. The symmetric function provides a repulsive viscoelastic interaction upon contact, until a tipping point is reached (when the plucking occurs). The tipping point depends both on the stiffness and the distance scaling of the interaction. Usage nlPluck(knl, scale, z, x1r, x2r),_,_ : _,_ Where: knl : stiffness scaling parameter (vertical stretch of the NL function) scale : distance scaling parameter (horizontal stretch of the NL function) z : (linear) damping value x1r : initial delayed position of mass 1 x2r : initial delayed position of mass 2 (mi.)nlBow Implementation of a non-linear friction based interaction that allows for stick-slip bowing behaviour. Two versions are proposed : a piecewise linear function (very similar to the nlPluck ) or a mathematical approximation (see Stefan Bilbao's book, Numerical Sound Synthesis). Usage nlBow(znl, scale, type, x1r, x2r),_,_ : _,_ Where: znl : friction scaling parameter (vertical stretch of the NL function) scale : velocity scaling parameter (horizontal stretch of the NL function) type : interaction profile (0 = piecewise linear, 1 = smooth function) x1r : initial delayed position of mass 1 x2r : initial delayed position of mass 2 (mi.)collision Implementation of a collision interaction, producing linear visco-elastic repulsion forces when two mass elements are interpenetrating. Usage collision(k, z, thres, x1r, x2r),_,_ : _,_ Where: k : collision stiffness parameter z : collision damping parameter thres : threshold distance for the contact between elements x1r : initial delayed position of mass 1 x2r : initial delayed position of mass 2 (mi.)nlCollisionClipped Implementation of a collision interaction, producing non-linear visco-elastic repulsion forces when two mass elements are interpenetrating. Bound by an upper stiffness value to maintain stability. This interaction is particularly useful for more realistic contact dynamics (greater difference in velocity provides sharper contacts, and reciprocally). Usage nlCollisionClipped(s, c, k, z, thres, x1r, x2r),_,_ : _,_ Where: s : collision linear stiffness parameter c : collision cubic stiffness parameter k : collision upper-bounding stiffness parameter z : collision damping parameter thres : threshold distance for the contact between elements x1r : initial delayed position of mass 1 x2r : initial delayed position of mass 2","title":" mi "},{"location":"libs/mi/#milib","text":"This ongoing work is the fruit of a collaboration between GRAME-CNCM and the ANIS (Arts Num\u00e9riques et Immersions Sensorielles) research group from GIPSA-Lab (Universit\u00e9 Grenoble Alpes). This library implements basic 1-DoF mass-interaction physics algorithms, allowing to declare and connect physical elements (masses, springs, non linear interactions, etc.) together to form topological networks. Models can be assembled by hand, however in more complex scenarios it is recommended to use a scripting tool (such as MIMS) to generate the FAUST signal routing for a given physical network. Its official prefix is mi . https://github.com/rmichon/mi_faust http://mi-creative.eu/tool_miFaust.html http://mi-creative.eu/paper_lac19.html","title":"mi.lib"},{"location":"libs/mi/#sources","text":"The core mass-interaction algorithms implemented in this library are in the public domain and are disclosed in the following scientific publications: Claude Cadoz, Annie Luciani, Jean-Loup Florens, Curtis Roads and Fran\u00e7oise Chabade. Responsive Input Devices and Sound Synthesis by Stimulation of Instrumental Mechanisms: The Cordis System. Computer Music Journal, Vol 8. No. 3, 1984. Claude Cadoz, Annie Luciani and Jean Loup Florens. CORDIS-ANIMA: A Modeling and Simulation System for Sound and Image Synthesis: The General Formalism. Computer Music Journal. Vol. 17, No. 1, 1993. Alexandros Kontogeorgakopoulos and Claude Cadoz. Cordis Anima Physical Modeling and Simulation System Analysis. In Proceedings of the Sound and Music Computing Conference (SMC-07), Lefkada, Greece, 2007. Nicolas Castagne, Claude Cadoz, Ali Allaoui and Olivier Tache. G3: Genesis Software Environment Update. In Proceedings of the International Computer Music Conference (ICMC-09), Montreal, Canada, 2009. Nicolas Castagn\u00e9 and Claude Cadoz. Genesis 3: Plate-forme pour la cr\u00e9ation musicale \u00e0 l'aide des mod\u00e8les physiques Cordis-Anima. In Proceedings of the Journ\u00e9e de l'Informatique Musicale, Grenoble, France, 2009. Edgar Berdahl and Julius O. Smith. An Introduction to the Synth-A-Modeler Compiler: Modular and Open-Source Sound Synthesis using Physical Models. In Proceedings of the Linux Audio Conference (LAC-12), Stanford, USA, 2012. James Leonard and Claude Cadoz. Physical Modelling Concepts for a Collection of Multisensory Virtual Musical Instruments. In Proceedings of the New Interfaces for Musical Expression (NIME-15) Conference, Baton Rouge, USA, 2015.","title":"Sources"},{"location":"libs/mi/#references","text":"https://github.com/grame-cncm/faustlibraries/blob/master/mi.lib","title":"References"},{"location":"libs/mi/#utility-functions","text":"These utility functions are used to help certain operations (e.g. define initial positions and velocities for physical elements).","title":"Utility Functions"},{"location":"libs/mi/#miinitstate","text":"Used to set initial delayed position values that must be initialised at step 0 of the physics simulation. If you develop any of your own modules, you will need to use this (see mass and springDamper algorithm codes for examples).","title":"(mi.)initState"},{"location":"libs/mi/#usage","text":"x : initState(x0) : _ Where: x : position value signal x0 : initial value for position","title":"Usage"},{"location":"libs/mi/#mass-algorithms","text":"All mass-type physical element functions are declared here. They all expect to receive a force input signal and produce a position signal. All physical parameters are expressed in sample-rate dependant values.","title":"Mass Algorithms"},{"location":"libs/mi/#mimass","text":"Implementation of a punctual mass element. Takes an input force and produces output position.","title":"(mi.)mass"},{"location":"libs/mi/#usage_1","text":"mass(m, grav, x0, xr0),_ : _ Where: m : mass value grav : gravity force value x0 : initial position xr0 : initial delayed position (inferred from initial velocity)","title":"Usage"},{"location":"libs/mi/#mioscil","text":"Implementation of a simple linear harmonic oscillator. Takes an input force and produces output position.","title":"(mi.)oscil"},{"location":"libs/mi/#usage_2","text":"oscil(m, k, z, grav, x0, xr0),_ : _ Where: m : mass value k : stiffness value z : damping value grav : gravity force value x0 : initial position xr0 : initial delayed position (inferred from initial velocity)","title":"Usage"},{"location":"libs/mi/#miground","text":"Implementation of a fixed point element. The position output produced by this module never changes, however it still expects a force input signal (for compliance with connection rules).","title":"(mi.)ground"},{"location":"libs/mi/#usage_3","text":"ground(x0),_ : _ Where: x0 : initial position","title":"Usage"},{"location":"libs/mi/#miposinput","text":"Implementation of a position input module (driven by an outside signal). Takes two signal inputs: incoming force (which doesn't affect position) and the driving position signal.","title":"(mi.)posInput"},{"location":"libs/mi/#usage_4","text":"posInput(x0),_,_ : _ Where: x0 : initial position","title":"Usage"},{"location":"libs/mi/#interaction-algorithms","text":"All interaction-type physical element functions are declared here. They each expect to receive two position signals (coming from the two mass-elements that they connect) and produce two equal and opposite force signals that must be routed back to the mass elements' inputs. All physical parameters are expressed in sample-rate dependant values.","title":"Interaction Algorithms"},{"location":"libs/mi/#mispring","text":"Implementation of a linear elastic spring interaction.","title":"(mi.)spring"},{"location":"libs/mi/#usage_5","text":"spring(k, x1r, x2r),_,_ : _,_ Where: k : stiffness value x1r : initial delayed position of mass 1 (unused here) x2r : initial delayed position of mass 2 (unused here)","title":"Usage"},{"location":"libs/mi/#midamper","text":"Implementation of a linear damper interaction. Beware: in 32bit precision mode, damping forces can become truncated if position values are not centered around zero!","title":"(mi.)damper"},{"location":"libs/mi/#usage_6","text":"damper(z, x1r, x2r),_,_ : _,_ Where: z : damping value x1r : initial delayed position of mass 1 x2r : initial delayed position of mass 2","title":"Usage"},{"location":"libs/mi/#mispringdamper","text":"Implementation of a linear viscoelastic spring-damper interaction (a combination of the spring and damper modules).","title":"(mi.)springDamper"},{"location":"libs/mi/#usage_7","text":"springDamper(k, z, x1r, x2r),_,_ : _,_ Where: k : stiffness value z : damping value x1r : initial delayed position of mass 1 x2r : initial delayed position of mass 2","title":"Usage"},{"location":"libs/mi/#minlspringdamper2","text":"Implementation of a non-linear viscoelastic spring-damper interaction containing a quadratic term (function of squared distance). Beware: at high displacements, this interaction will break numerical stability conditions ! The nlSpringDamperClipped is a safer option.","title":"(mi.)nlSpringDamper2"},{"location":"libs/mi/#usage_8","text":"nlSpringDamper2(k, q, z, x1r, x2r),_,_ : _,_ Where: k : linear stiffness value q : quadratic stiffness value z : damping value x1r : initial delayed position of mass 1 x2r : initial delayed position of mass 2","title":"Usage"},{"location":"libs/mi/#minlspringdamper3","text":"Implementation of a non-linear viscoelastic spring-damper interaction containing a cubic term (function of distance^3). Beware: at high displacements, this interaction will break numerical stability conditions ! The nlSpringDamperClipped is a safer option.","title":"(mi.)nlSpringDamper3"},{"location":"libs/mi/#usage_9","text":"nlSpringDamper3(k, q, z, x1r, x2r),_,_ : _,_ Where: k : linear stiffness value q : cubic stiffness value z : damping value x1r : initial delayed position of mass 1 x2r : initial delayed position of mass 2","title":"Usage"},{"location":"libs/mi/#minlspringdamperclipped","text":"Implementation of a non-linear viscoelastic spring-damper interaction containing a cubic term (function of distance^3), bound by an upper linear stiffness (hard-clipping). This bounding means that when faced with strong displacements, the interaction profile will \"clip\" at a given point and never produce forces higher than the bounding equivalent linear spring, stopping models from becoming unstable. So far the interaction clips \"hard\" (with no soft-knee spline interpolation, etc.)","title":"(mi.)nlSpringDamperClipped"},{"location":"libs/mi/#usage_10","text":"nlSpringDamperClipped(s, c, k, z, x1r, x2r),_,_ : _,_ Where: s : linear stiffness value c : cubic stiffness value k : upper-bound linear stiffness value z : (linear) damping value x1r : initial delayed position of mass 1 x2r : initial delayed position of mass 2","title":"Usage"},{"location":"libs/mi/#minlpluck","text":"Implementation of a piecewise linear plucking interaction. The symmetric function provides a repulsive viscoelastic interaction upon contact, until a tipping point is reached (when the plucking occurs). The tipping point depends both on the stiffness and the distance scaling of the interaction.","title":"(mi.)nlPluck"},{"location":"libs/mi/#usage_11","text":"nlPluck(knl, scale, z, x1r, x2r),_,_ : _,_ Where: knl : stiffness scaling parameter (vertical stretch of the NL function) scale : distance scaling parameter (horizontal stretch of the NL function) z : (linear) damping value x1r : initial delayed position of mass 1 x2r : initial delayed position of mass 2","title":"Usage"},{"location":"libs/mi/#minlbow","text":"Implementation of a non-linear friction based interaction that allows for stick-slip bowing behaviour. Two versions are proposed : a piecewise linear function (very similar to the nlPluck ) or a mathematical approximation (see Stefan Bilbao's book, Numerical Sound Synthesis).","title":"(mi.)nlBow"},{"location":"libs/mi/#usage_12","text":"nlBow(znl, scale, type, x1r, x2r),_,_ : _,_ Where: znl : friction scaling parameter (vertical stretch of the NL function) scale : velocity scaling parameter (horizontal stretch of the NL function) type : interaction profile (0 = piecewise linear, 1 = smooth function) x1r : initial delayed position of mass 1 x2r : initial delayed position of mass 2","title":"Usage"},{"location":"libs/mi/#micollision","text":"Implementation of a collision interaction, producing linear visco-elastic repulsion forces when two mass elements are interpenetrating.","title":"(mi.)collision"},{"location":"libs/mi/#usage_13","text":"collision(k, z, thres, x1r, x2r),_,_ : _,_ Where: k : collision stiffness parameter z : collision damping parameter thres : threshold distance for the contact between elements x1r : initial delayed position of mass 1 x2r : initial delayed position of mass 2","title":"Usage"},{"location":"libs/mi/#minlcollisionclipped","text":"Implementation of a collision interaction, producing non-linear visco-elastic repulsion forces when two mass elements are interpenetrating. Bound by an upper stiffness value to maintain stability. This interaction is particularly useful for more realistic contact dynamics (greater difference in velocity provides sharper contacts, and reciprocally).","title":"(mi.)nlCollisionClipped"},{"location":"libs/mi/#usage_14","text":"nlCollisionClipped(s, c, k, z, thres, x1r, x2r),_,_ : _,_ Where: s : collision linear stiffness parameter c : collision cubic stiffness parameter k : collision upper-bounding stiffness parameter z : collision damping parameter thres : threshold distance for the contact between elements x1r : initial delayed position of mass 1 x2r : initial delayed position of mass 2","title":"Usage"},{"location":"libs/misceffects/","text":"misceffects.lib This library contains a collection of audio effects. Its official prefix is ef . References https://github.com/grame-cncm/faustlibraries/blob/master/misceffects.lib Dynamic (ef.)cubicnl Cubic nonlinearity distortion. cubicnl is a standard Faust function. Usage: _ : cubicnl(drive,offset) : _ _ : cubicnl_nodc(drive,offset) : _ Where: drive : distortion amount, between 0 and 1 offset : constant added before nonlinearity to give even harmonics. Note: offset can introduce a nonzero mean - feed cubicnl output to dcblocker to remove this. References: https://ccrma.stanford.edu/~jos/pasp/Cubic_Soft_Clipper.html https://ccrma.stanford.edu/~jos/pasp/Nonlinear_Distortion.html (ef.)gate_mono Mono signal gate. gate_mono is a standard Faust function. Usage _ : gate_mono(thresh,att,hold,rel) : _ Where: thresh : dB level threshold above which gate opens (e.g., -60 dB) att : attack time = time constant (sec) for gate to open (e.g., 0.0001 s = 0.1 ms) hold : hold time = time (sec) gate stays open after signal level < thresh (e.g., 0.1 s) rel : release time = time constant (sec) for gate to close (e.g., 0.020 s = 20 ms) References http://en.wikipedia.org/wiki/Noise_gate http://www.soundonsound.com/sos/apr01/articles/advanced.asp http://en.wikipedia.org/wiki/Gating_(sound_engineering) (ef.)gate_stereo Stereo signal gates. gate_stereo is a standard Faust function. Usage _,_ : gate_stereo(thresh,att,hold,rel) : _,_ Where: thresh : dB level threshold above which gate opens (e.g., -60 dB) att : attack time = time constant (sec) for gate to open (e.g., 0.0001 s = 0.1 ms) hold : hold time = time (sec) gate stays open after signal level < thresh (e.g., 0.1 s) rel : release time = time constant (sec) for gate to close (e.g., 0.020 s = 20 ms) References http://en.wikipedia.org/wiki/Noise_gate http://www.soundonsound.com/sos/apr01/articles/advanced.asp http://en.wikipedia.org/wiki/Gating_(sound_engineering) Filtering (ef.)speakerbp Dirt-simple speaker simulator (overall bandpass eq with observed roll-offs above and below the passband). Low-frequency speaker model = +12 dB/octave slope breaking to flat near f1. Implemented using two dc blockers in series. High-frequency model = -24 dB/octave slope implemented using a fourth-order Butterworth lowpass. Example based on measured Celestion G12 (12\" speaker): speakerbp is a standard Faust function. Usage speakerbp(f1,f2) _ : speakerbp(130,5000) : _ (ef.)piano_dispersion_filter Piano dispersion allpass filter in closed form. Usage piano_dispersion_filter(M,B,f0) _ : piano_dispersion_filter(1,B,f0) : +(totalDelay),_ : fdelay(maxDelay) : _ Where: M : number of first-order allpass sections (compile-time only) Keep below 20. 8 is typical for medium-sized piano strings. B : string inharmonicity coefficient (0.0001 is typical) f0 : fundamental frequency in Hz Outputs MINUS the estimated delay at f0 of allpass chain in samples, provided in negative form to facilitate subtraction from delay-line length. Output signal from allpass chain Reference \"Dispersion Modeling in Waveguide Piano Synthesis Using Tunable Allpass Filters\", by Jukka Rauhala and Vesa Valimaki, DAFX-2006, pp. 71-76 http://lib.tkk.fi/Diss/2007/isbn9789512290666/article2.pdf An erratum in Eq. (7) is corrected in Dr. Rauhala's encompassing dissertation (and below). http://www.acoustics.hut.fi/research/asp/piano/ (ef.)stereo_width Stereo Width effect using the Blumlein Shuffler technique. stereo_width is a standard Faust function. Usage _,_ : stereo_width(w) : _,_ Where: w : stereo width between 0 and 1 At w=0 , the output signal is mono ((left+right)/2 in both channels). At w=1 , there is no effect (original stereo image). Thus, w between 0 and 1 varies stereo width from 0 to \"original\". Reference \"Applications of Blumlein Shuffling to Stereo Microphone Techniques\" Michael A. Gerzon, JAES vol. 42, no. 6, June 1994 Meshes (ef.)mesh_square Square Rectangular Digital Waveguide Mesh. Usage bus(4*N) : mesh_square(N) : bus(4*N) Where: N : number of nodes along each edge - a power of two (1,2,4,8,...) Reference https://ccrma.stanford.edu/~jos/pasp/Digital_Waveguide_Mesh.html Signal Order In and Out The mesh is constructed recursively using 2x2 embeddings. Thus, the top level of mesh_square(M) is a block 2x2 mesh, where each block is a mesh(M/2) . Let these blocks be numbered 1,2,3,4 in the geometry NW,NE,SW,SE, i.e., as: 1 2 3 4 Each block has four vector inputs and four vector outputs, where the length of each vector is M/2 . Label the input vectors as Ni,Ei,Wi,Si, i.e., as the inputs from the North, East South, and West, and similarly for the outputs. Then, for example, the upper left input block of M/2 signals is labeled 1Ni. Most of the connections are internal, such as 1Eo -> 2Wi. The 8*(M/2) input signals are grouped in the order: 1Ni 2Ni 3Si 4Si 1Wi 3Wi 2Ei 4Ei and the output signals are: 1No 1Wo 2No 2Eo 3So 3Wo 4So 4Eo or: In: 1No 1Wo 2No 2Eo 3So 3Wo 4So 4Eo Out: 1Ni 2Ni 3Si 4Si 1Wi 3Wi 2Ei 4Ei Thus, the inputs are grouped by direction N,S,W,E, while the outputs are grouped by block number 1,2,3,4, which can also be interpreted as directions NW, NE, SW, SE. A simple program illustrating these orderings is process = mesh_square(2); . Example Reflectively terminated mesh impulsed at one corner: mesh_square_test(N,x) = mesh_square(N)~(busi(4*N,x)) // input to corner with { busi(N,x) = bus(N) : par(i,N,*(-1)) : par(i,N-1,_), +(x); }; process = 1-1' : mesh_square_test(4); // all modes excited forever In this simple example, the mesh edges are connected as follows: 1No -> 1Ni, 1Wo -> 2Ni, 2No -> 3Si, 2Eo -> 4Si, 3So -> 1Wi, 3Wo -> 3Wi, 4So -> 2Ei, 4Eo -> 4Ei A routing matrix can be used to obtain other connection geometries. (ef.)reverseEchoN(nChans,delay) Reverse echo effect. Usage _ : ef.reverseEchoN(N,delay) : si.bus(N) Where: N : Number of output channels desired (1 or more) delay : echo delay (integer power of 2) Demo _ : dm.reverseEchoN(N) : _,_ Description The effect uses N instances of reverseDelayRamped at different phases. (ef.)reverseDelayRamped(delay,phase) Reverse delay with amplitude ramp. Usage _ : ef.reverseDelayRamped(delay,phase) : _ Where: delay : echo delay (integer power of 2) phase : float between 0 and 1 giving ramp delay phase*delay Demo _ : ef.reverseDelayRamped(32,0.6) : _,_ (ef.)uniformPanToStereo(nChans) Pan nChans channels to the stereo field, spread uniformly left to right. Usage si.bus(N) : ef.uniformPanToStereo(N) : _,_ Where: N : Number of input channels to pan down to stereo Demo _,_,_ : ef.uniformPanToStereo(3) : _,_ Mixing (ef.)dryWetMixer Linear dry-wet mixer for a N inputs and N outputs effect. Usage si.bus(inputs(FX)) : dryWetMixer(wetAmount, FX) : si.bus(inputs(FX)) Where: wetAmount : the wet amount (0-1). 0 produces only the dry signal and 1 produces only the wet signal FX : an arbitrary effect (N inputs and N outputs) to apply to the input bus (ef.)dryWetMixerConstantPower Constant-power dry-wet mixer for a N inputs and N outputs effect. Usage si.bus(inputs(FX)) : dryWetMixerConstantPower(wetAmount, FX) :si.bus(inputs(FX)) Where: wetAmount : the wet amount (0-1). 0 produces only the dry signal and 1 produces only the wet signal FX : an arbitrary effect (N inputs and N outputs) to apply to the input bus Time Based (ef.)echo A simple echo effect. echo is a standard Faust function. Usage _ : echo(maxDuration,duration,feedback) : _ Where: maxDuration : the max echo duration in seconds duration : the echo duration in seconds feedback : the feedback coefficient Pitch Shifting (ef.)transpose A simple pitch shifter based on 2 delay lines. transpose is a standard Faust function. Usage _ : transpose(w, x, s) : _ Where: w : the window length (samples) x : crossfade duration duration (samples) s : shift (semitones) Saturators (ef.)softclipQuadratic Quadratic softclip nonlinearity. Usage _ : softclipQuadratic : _; (ef.)wavefold Wavefolding nonlinearity. Usage _ : wavefold(width) : _; Where: width : The width of the folded section [0..1] (float).","title":" misceffects "},{"location":"libs/misceffects/#misceffectslib","text":"This library contains a collection of audio effects. Its official prefix is ef .","title":"misceffects.lib"},{"location":"libs/misceffects/#references","text":"https://github.com/grame-cncm/faustlibraries/blob/master/misceffects.lib","title":"References"},{"location":"libs/misceffects/#dynamic","text":"","title":"Dynamic"},{"location":"libs/misceffects/#efcubicnl","text":"Cubic nonlinearity distortion. cubicnl is a standard Faust function.","title":"(ef.)cubicnl"},{"location":"libs/misceffects/#usage","text":"_ : cubicnl(drive,offset) : _ _ : cubicnl_nodc(drive,offset) : _ Where: drive : distortion amount, between 0 and 1 offset : constant added before nonlinearity to give even harmonics. Note: offset can introduce a nonzero mean - feed cubicnl output to dcblocker to remove this.","title":"Usage:"},{"location":"libs/misceffects/#references_1","text":"https://ccrma.stanford.edu/~jos/pasp/Cubic_Soft_Clipper.html https://ccrma.stanford.edu/~jos/pasp/Nonlinear_Distortion.html","title":"References:"},{"location":"libs/misceffects/#efgate_mono","text":"Mono signal gate. gate_mono is a standard Faust function.","title":"(ef.)gate_mono"},{"location":"libs/misceffects/#usage_1","text":"_ : gate_mono(thresh,att,hold,rel) : _ Where: thresh : dB level threshold above which gate opens (e.g., -60 dB) att : attack time = time constant (sec) for gate to open (e.g., 0.0001 s = 0.1 ms) hold : hold time = time (sec) gate stays open after signal level < thresh (e.g., 0.1 s) rel : release time = time constant (sec) for gate to close (e.g., 0.020 s = 20 ms)","title":"Usage"},{"location":"libs/misceffects/#references_2","text":"http://en.wikipedia.org/wiki/Noise_gate http://www.soundonsound.com/sos/apr01/articles/advanced.asp http://en.wikipedia.org/wiki/Gating_(sound_engineering)","title":"References"},{"location":"libs/misceffects/#efgate_stereo","text":"Stereo signal gates. gate_stereo is a standard Faust function.","title":"(ef.)gate_stereo"},{"location":"libs/misceffects/#usage_2","text":"_,_ : gate_stereo(thresh,att,hold,rel) : _,_ Where: thresh : dB level threshold above which gate opens (e.g., -60 dB) att : attack time = time constant (sec) for gate to open (e.g., 0.0001 s = 0.1 ms) hold : hold time = time (sec) gate stays open after signal level < thresh (e.g., 0.1 s) rel : release time = time constant (sec) for gate to close (e.g., 0.020 s = 20 ms)","title":"Usage"},{"location":"libs/misceffects/#references_3","text":"http://en.wikipedia.org/wiki/Noise_gate http://www.soundonsound.com/sos/apr01/articles/advanced.asp http://en.wikipedia.org/wiki/Gating_(sound_engineering)","title":"References"},{"location":"libs/misceffects/#filtering","text":"","title":"Filtering"},{"location":"libs/misceffects/#efspeakerbp","text":"Dirt-simple speaker simulator (overall bandpass eq with observed roll-offs above and below the passband). Low-frequency speaker model = +12 dB/octave slope breaking to flat near f1. Implemented using two dc blockers in series. High-frequency model = -24 dB/octave slope implemented using a fourth-order Butterworth lowpass. Example based on measured Celestion G12 (12\" speaker): speakerbp is a standard Faust function.","title":"(ef.)speakerbp"},{"location":"libs/misceffects/#usage_3","text":"speakerbp(f1,f2) _ : speakerbp(130,5000) : _","title":"Usage"},{"location":"libs/misceffects/#efpiano_dispersion_filter","text":"Piano dispersion allpass filter in closed form.","title":"(ef.)piano_dispersion_filter"},{"location":"libs/misceffects/#usage_4","text":"piano_dispersion_filter(M,B,f0) _ : piano_dispersion_filter(1,B,f0) : +(totalDelay),_ : fdelay(maxDelay) : _ Where: M : number of first-order allpass sections (compile-time only) Keep below 20. 8 is typical for medium-sized piano strings. B : string inharmonicity coefficient (0.0001 is typical) f0 : fundamental frequency in Hz","title":"Usage"},{"location":"libs/misceffects/#outputs","text":"MINUS the estimated delay at f0 of allpass chain in samples, provided in negative form to facilitate subtraction from delay-line length. Output signal from allpass chain","title":"Outputs"},{"location":"libs/misceffects/#reference","text":"\"Dispersion Modeling in Waveguide Piano Synthesis Using Tunable Allpass Filters\", by Jukka Rauhala and Vesa Valimaki, DAFX-2006, pp. 71-76 http://lib.tkk.fi/Diss/2007/isbn9789512290666/article2.pdf An erratum in Eq. (7) is corrected in Dr. Rauhala's encompassing dissertation (and below). http://www.acoustics.hut.fi/research/asp/piano/","title":"Reference"},{"location":"libs/misceffects/#efstereo_width","text":"Stereo Width effect using the Blumlein Shuffler technique. stereo_width is a standard Faust function.","title":"(ef.)stereo_width"},{"location":"libs/misceffects/#usage_5","text":"_,_ : stereo_width(w) : _,_ Where: w : stereo width between 0 and 1 At w=0 , the output signal is mono ((left+right)/2 in both channels). At w=1 , there is no effect (original stereo image). Thus, w between 0 and 1 varies stereo width from 0 to \"original\".","title":"Usage"},{"location":"libs/misceffects/#reference_1","text":"\"Applications of Blumlein Shuffling to Stereo Microphone Techniques\" Michael A. Gerzon, JAES vol. 42, no. 6, June 1994","title":"Reference"},{"location":"libs/misceffects/#meshes","text":"","title":"Meshes"},{"location":"libs/misceffects/#efmesh_square","text":"Square Rectangular Digital Waveguide Mesh.","title":"(ef.)mesh_square"},{"location":"libs/misceffects/#usage_6","text":"bus(4*N) : mesh_square(N) : bus(4*N) Where: N : number of nodes along each edge - a power of two (1,2,4,8,...)","title":"Usage"},{"location":"libs/misceffects/#reference_2","text":"https://ccrma.stanford.edu/~jos/pasp/Digital_Waveguide_Mesh.html","title":"Reference"},{"location":"libs/misceffects/#signal-order-in-and-out","text":"The mesh is constructed recursively using 2x2 embeddings. Thus, the top level of mesh_square(M) is a block 2x2 mesh, where each block is a mesh(M/2) . Let these blocks be numbered 1,2,3,4 in the geometry NW,NE,SW,SE, i.e., as: 1 2 3 4 Each block has four vector inputs and four vector outputs, where the length of each vector is M/2 . Label the input vectors as Ni,Ei,Wi,Si, i.e., as the inputs from the North, East South, and West, and similarly for the outputs. Then, for example, the upper left input block of M/2 signals is labeled 1Ni. Most of the connections are internal, such as 1Eo -> 2Wi. The 8*(M/2) input signals are grouped in the order: 1Ni 2Ni 3Si 4Si 1Wi 3Wi 2Ei 4Ei and the output signals are: 1No 1Wo 2No 2Eo 3So 3Wo 4So 4Eo or: In: 1No 1Wo 2No 2Eo 3So 3Wo 4So 4Eo Out: 1Ni 2Ni 3Si 4Si 1Wi 3Wi 2Ei 4Ei Thus, the inputs are grouped by direction N,S,W,E, while the outputs are grouped by block number 1,2,3,4, which can also be interpreted as directions NW, NE, SW, SE. A simple program illustrating these orderings is process = mesh_square(2); .","title":"Signal Order In and Out"},{"location":"libs/misceffects/#example","text":"Reflectively terminated mesh impulsed at one corner: mesh_square_test(N,x) = mesh_square(N)~(busi(4*N,x)) // input to corner with { busi(N,x) = bus(N) : par(i,N,*(-1)) : par(i,N-1,_), +(x); }; process = 1-1' : mesh_square_test(4); // all modes excited forever In this simple example, the mesh edges are connected as follows: 1No -> 1Ni, 1Wo -> 2Ni, 2No -> 3Si, 2Eo -> 4Si, 3So -> 1Wi, 3Wo -> 3Wi, 4So -> 2Ei, 4Eo -> 4Ei A routing matrix can be used to obtain other connection geometries.","title":"Example"},{"location":"libs/misceffects/#efreverseechonnchansdelay","text":"Reverse echo effect.","title":"(ef.)reverseEchoN(nChans,delay)"},{"location":"libs/misceffects/#usage_7","text":"_ : ef.reverseEchoN(N,delay) : si.bus(N) Where: N : Number of output channels desired (1 or more) delay : echo delay (integer power of 2)","title":"Usage"},{"location":"libs/misceffects/#demo","text":"_ : dm.reverseEchoN(N) : _,_","title":"Demo"},{"location":"libs/misceffects/#description","text":"The effect uses N instances of reverseDelayRamped at different phases.","title":"Description"},{"location":"libs/misceffects/#efreversedelayrampeddelayphase","text":"Reverse delay with amplitude ramp.","title":"(ef.)reverseDelayRamped(delay,phase)"},{"location":"libs/misceffects/#usage_8","text":"_ : ef.reverseDelayRamped(delay,phase) : _ Where: delay : echo delay (integer power of 2) phase : float between 0 and 1 giving ramp delay phase*delay","title":"Usage"},{"location":"libs/misceffects/#demo_1","text":"_ : ef.reverseDelayRamped(32,0.6) : _,_","title":"Demo"},{"location":"libs/misceffects/#efuniformpantostereonchans","text":"Pan nChans channels to the stereo field, spread uniformly left to right.","title":"(ef.)uniformPanToStereo(nChans)"},{"location":"libs/misceffects/#usage_9","text":"si.bus(N) : ef.uniformPanToStereo(N) : _,_ Where: N : Number of input channels to pan down to stereo","title":"Usage"},{"location":"libs/misceffects/#demo_2","text":"_,_,_ : ef.uniformPanToStereo(3) : _,_","title":"Demo"},{"location":"libs/misceffects/#mixing","text":"","title":"Mixing"},{"location":"libs/misceffects/#efdrywetmixer","text":"Linear dry-wet mixer for a N inputs and N outputs effect.","title":"(ef.)dryWetMixer"},{"location":"libs/misceffects/#usage_10","text":"si.bus(inputs(FX)) : dryWetMixer(wetAmount, FX) : si.bus(inputs(FX)) Where: wetAmount : the wet amount (0-1). 0 produces only the dry signal and 1 produces only the wet signal FX : an arbitrary effect (N inputs and N outputs) to apply to the input bus","title":"Usage"},{"location":"libs/misceffects/#efdrywetmixerconstantpower","text":"Constant-power dry-wet mixer for a N inputs and N outputs effect.","title":"(ef.)dryWetMixerConstantPower"},{"location":"libs/misceffects/#usage_11","text":"si.bus(inputs(FX)) : dryWetMixerConstantPower(wetAmount, FX) :si.bus(inputs(FX)) Where: wetAmount : the wet amount (0-1). 0 produces only the dry signal and 1 produces only the wet signal FX : an arbitrary effect (N inputs and N outputs) to apply to the input bus","title":"Usage"},{"location":"libs/misceffects/#time-based","text":"","title":"Time Based"},{"location":"libs/misceffects/#efecho","text":"A simple echo effect. echo is a standard Faust function.","title":"(ef.)echo"},{"location":"libs/misceffects/#usage_12","text":"_ : echo(maxDuration,duration,feedback) : _ Where: maxDuration : the max echo duration in seconds duration : the echo duration in seconds feedback : the feedback coefficient","title":"Usage"},{"location":"libs/misceffects/#pitch-shifting","text":"","title":"Pitch Shifting"},{"location":"libs/misceffects/#eftranspose","text":"A simple pitch shifter based on 2 delay lines. transpose is a standard Faust function.","title":"(ef.)transpose"},{"location":"libs/misceffects/#usage_13","text":"_ : transpose(w, x, s) : _ Where: w : the window length (samples) x : crossfade duration duration (samples) s : shift (semitones)","title":"Usage"},{"location":"libs/misceffects/#saturators","text":"","title":"Saturators"},{"location":"libs/misceffects/#efsoftclipquadratic","text":"Quadratic softclip nonlinearity.","title":"(ef.)softclipQuadratic"},{"location":"libs/misceffects/#usage_14","text":"_ : softclipQuadratic : _;","title":"Usage"},{"location":"libs/misceffects/#efwavefold","text":"Wavefolding nonlinearity.","title":"(ef.)wavefold"},{"location":"libs/misceffects/#usage_15","text":"_ : wavefold(width) : _; Where: width : The width of the folded section [0..1] (float).","title":"Usage"},{"location":"libs/noises/","text":"noises.lib Faust Noise Generator Library. Its official prefix is no . References https://github.com/grame-cncm/faustlibraries/blob/master/noises.lib Functions Reference (no.)noise White noise generator (outputs random number between -1 and 1). noise is a standard Faust function. Usage noise : _ (no.)multirandom Generates multiple decorrelated random numbers in parallel. Usage multirandom(N) : si.bus(N) Where: N : the number of decorrelated random numbers in parallel, a constant numerical expression (no.)multinoise Generates multiple decorrelated noises in parallel. Usage multinoise(N) : si.bus(N) Where: N : the number of decorrelated random numbers in parallel, a constant numerical expression (no.)noises A convenient wrapper around multinoise. Usage noises(N,i) : _ Where: N : the number of decorrelated random numbers in parallel, a constant numerical expression i : the selected random number (i in [0..N[) (no.)randomseed A random seed based on the foreign function arc4random (see man arc4random). Used in rnoise , rmultirandom , etc. to avoid having the same pseudo random sequence at each run. WARNING: using the foreign function arc4random , so only available in C/C++ and LLVM backends. Usage randomseed : _ (no.)rnoise A randomized white noise generator (outputs random number between -1 and 1). WARNING: using the foreign function arc4random , so only available in C/C++ and LLVM backends. Usage rnoise : _ (no.)rmultirandom Generates multiple decorrelated random numbers in parallel. WARNING: using the foreign function arc4random , so only available in C/C++ and LLVM backends. Usage rmultirandom(N) : _ Where: N : the number of decorrelated random numbers in parallel, a constant numerical expression (no.)rmultinoise Generates multiple decorrelated noises in parallel. WARNING: using the foreign function arc4random , so only available in C/C++ and LLVM backends. Usage rmultinoise(N) : _ Where: N : the number of decorrelated random numbers in parallel, a constant numerical expression (no.)rnoises A convenient wrapper around rmultinoise. WARNING: using the foreign function arc4random , so only available in C/C++ and LLVM backends. Usage rnoises(N,i) : _ Where: N : the number of decorrelated random numbers in parallel i : the selected random number (i in [0..N[) (no.)pink_noise Pink noise (1/f noise) generator (third-order approximation covering the audio band well). pink_noise is a standard Faust function. Usage pink_noise : _ Reference https://ccrma.stanford.edu/~jos/sasp/Example_Synthesis_1_F_Noise.html Alternatives Higher-order approximations covering any frequency band can be obtained using no.noise : fi.spectral_tilt(order,lowerBandLimit,Bandwidth,p) where p=-0.5 means filter rolloff f^(-1/2) which gives 1/f rolloff in the power spectral density, and can be changed to other real values. Example // pink_noise_compare.dsp - compare three pinking filters process = pink_noises with { f0 = 35; // Lower bandlimit in Hz bw3 = 0.7 * ma.SR/2.0 - f0; // Bandwidth in Hz, 3rd order case bw9 = 0.8 * ma.SR/2.0 - f0; // Bandwidth in Hz, 9th order case pink_tilt_3 = fi.spectral_tilt(3,f0,bw3,-0.5); pink_tilt_9 = fi.spectral_tilt(9,f0,bw9,-0.5); pink_noises = 1-1' <: no.pink_filter, // original designed by invfreqz in Octave pink_tilt_3, // newer method using the same filter order pink_tilt_9; // newer method using a higher filter order }; Output of Example faust2octave pink_noise_compare.dsp Octave:1> semilogx(20*log10(abs(fft(faustout,8192))(1:4096,:))); ... (no.)pink_noise_vm Multi pink noise generator. Usage pink_noise_vm(N) : _ Where: N : number of latched white-noise processes to sum, not to exceed sizeof(int) in C++ (typically 32). References http://www.dsprelated.com/showarticle/908.php http://www.firstpr.com.au/dsp/pink-noise/#Voss-McCartney (no.)lfnoise , (no.)lfnoise0 and (no.)lfnoiseN Low-frequency noise generators (Butterworth-filtered downsampled white noise). Usage lfnoise0(rate) : _ // new random number every int(SR/rate) samples or so lfnoiseN(N,rate) : _ // same as \"lfnoise0(rate) : lowpass(N,rate)\" [see filters.lib] lfnoise(rate) : _ // same as \"lfnoise0(rate) : seq(i,5,lowpass(N,rate))\" (no overshoot) Example (view waveforms in faust2octave): rate = SR/100.0; // new random value every 100 samples (SR from music.lib) process = lfnoise0(rate), // sampled/held noise (piecewise constant) lfnoiseN(3,rate), // lfnoise0 smoothed by 3rd order Butterworth LPF lfnoise(rate); // lfnoise0 smoothed with no overshoot (no.)sparse_noise Sparse noise generator. Usage sparse_noise(f0) : _ Where: f0 : average frequency of noise impulses per second Random impulses in the amplitude range -1 to 1 are generated at an average rate of f0 impulses per second. Reference See velvet_noise (no.)velvet_noise_vm Velvet noise generator. Usage velvet_noise(amp, f0) : _ Where: amp : amplitude of noise impulses (positive and negative) f0 : average frequency of noise impulses per second Reference Matti Karjalainen and Hanna Jarvelainen, \"Reverberation Modeling Using Velvet Noise\", in Proc. 30th Int. Conf. Intelligent Audio Environments (AES07), March 2007. (no.)gnoise Approximate zero-mean, unit-variance Gaussian white noise generator. Usage gnoise(N) : _ Where: N : number of uniform random numbers added to approximate Gaussian white noise Reference See Central Limit Theorem (no.)colored_noise Generates a colored noise signal with an arbitrary spectral roll-off factor (alpha) over the entire audible frequency range (20-20000 Hz). The output is normalized so that an equal RMS level is maintained for different values of alpha. Usage colored_noise(N,alpha) : _ Where: N : desired integer filter order (constant numerical expression) alpha : slope of roll-off, between -1 and 1. -1 corresponds to brown/red noise, -1/2 pink noise, 0 white noise, 1/2 blue noise, and 1 violet/azure noise. Examples See dm.colored_noise_demo .","title":" noises "},{"location":"libs/noises/#noiseslib","text":"Faust Noise Generator Library. Its official prefix is no .","title":"noises.lib"},{"location":"libs/noises/#references","text":"https://github.com/grame-cncm/faustlibraries/blob/master/noises.lib","title":"References"},{"location":"libs/noises/#functions-reference","text":"","title":"Functions Reference"},{"location":"libs/noises/#nonoise","text":"White noise generator (outputs random number between -1 and 1). noise is a standard Faust function.","title":"(no.)noise"},{"location":"libs/noises/#usage","text":"noise : _","title":"Usage"},{"location":"libs/noises/#nomultirandom","text":"Generates multiple decorrelated random numbers in parallel.","title":"(no.)multirandom"},{"location":"libs/noises/#usage_1","text":"multirandom(N) : si.bus(N) Where: N : the number of decorrelated random numbers in parallel, a constant numerical expression","title":"Usage"},{"location":"libs/noises/#nomultinoise","text":"Generates multiple decorrelated noises in parallel.","title":"(no.)multinoise"},{"location":"libs/noises/#usage_2","text":"multinoise(N) : si.bus(N) Where: N : the number of decorrelated random numbers in parallel, a constant numerical expression","title":"Usage"},{"location":"libs/noises/#nonoises","text":"A convenient wrapper around multinoise.","title":"(no.)noises"},{"location":"libs/noises/#usage_3","text":"noises(N,i) : _ Where: N : the number of decorrelated random numbers in parallel, a constant numerical expression i : the selected random number (i in [0..N[)","title":"Usage"},{"location":"libs/noises/#norandomseed","text":"A random seed based on the foreign function arc4random (see man arc4random). Used in rnoise , rmultirandom , etc. to avoid having the same pseudo random sequence at each run. WARNING: using the foreign function arc4random , so only available in C/C++ and LLVM backends.","title":"(no.)randomseed"},{"location":"libs/noises/#usage_4","text":"randomseed : _","title":"Usage"},{"location":"libs/noises/#nornoise","text":"A randomized white noise generator (outputs random number between -1 and 1). WARNING: using the foreign function arc4random , so only available in C/C++ and LLVM backends.","title":"(no.)rnoise"},{"location":"libs/noises/#usage_5","text":"rnoise : _","title":"Usage"},{"location":"libs/noises/#normultirandom","text":"Generates multiple decorrelated random numbers in parallel. WARNING: using the foreign function arc4random , so only available in C/C++ and LLVM backends.","title":"(no.)rmultirandom"},{"location":"libs/noises/#usage_6","text":"rmultirandom(N) : _ Where: N : the number of decorrelated random numbers in parallel, a constant numerical expression","title":"Usage"},{"location":"libs/noises/#normultinoise","text":"Generates multiple decorrelated noises in parallel. WARNING: using the foreign function arc4random , so only available in C/C++ and LLVM backends.","title":"(no.)rmultinoise"},{"location":"libs/noises/#usage_7","text":"rmultinoise(N) : _ Where: N : the number of decorrelated random numbers in parallel, a constant numerical expression","title":"Usage"},{"location":"libs/noises/#nornoises","text":"A convenient wrapper around rmultinoise. WARNING: using the foreign function arc4random , so only available in C/C++ and LLVM backends.","title":"(no.)rnoises"},{"location":"libs/noises/#usage_8","text":"rnoises(N,i) : _ Where: N : the number of decorrelated random numbers in parallel i : the selected random number (i in [0..N[)","title":"Usage"},{"location":"libs/noises/#nopink_noise","text":"Pink noise (1/f noise) generator (third-order approximation covering the audio band well). pink_noise is a standard Faust function.","title":"(no.)pink_noise"},{"location":"libs/noises/#usage_9","text":"pink_noise : _","title":"Usage"},{"location":"libs/noises/#reference","text":"https://ccrma.stanford.edu/~jos/sasp/Example_Synthesis_1_F_Noise.html","title":"Reference"},{"location":"libs/noises/#alternatives","text":"Higher-order approximations covering any frequency band can be obtained using no.noise : fi.spectral_tilt(order,lowerBandLimit,Bandwidth,p) where p=-0.5 means filter rolloff f^(-1/2) which gives 1/f rolloff in the power spectral density, and can be changed to other real values.","title":"Alternatives"},{"location":"libs/noises/#example","text":"// pink_noise_compare.dsp - compare three pinking filters process = pink_noises with { f0 = 35; // Lower bandlimit in Hz bw3 = 0.7 * ma.SR/2.0 - f0; // Bandwidth in Hz, 3rd order case bw9 = 0.8 * ma.SR/2.0 - f0; // Bandwidth in Hz, 9th order case pink_tilt_3 = fi.spectral_tilt(3,f0,bw3,-0.5); pink_tilt_9 = fi.spectral_tilt(9,f0,bw9,-0.5); pink_noises = 1-1' <: no.pink_filter, // original designed by invfreqz in Octave pink_tilt_3, // newer method using the same filter order pink_tilt_9; // newer method using a higher filter order };","title":"Example"},{"location":"libs/noises/#output-of-example","text":"faust2octave pink_noise_compare.dsp Octave:1> semilogx(20*log10(abs(fft(faustout,8192))(1:4096,:))); ...","title":"Output of Example"},{"location":"libs/noises/#nopink_noise_vm","text":"Multi pink noise generator.","title":"(no.)pink_noise_vm"},{"location":"libs/noises/#usage_10","text":"pink_noise_vm(N) : _ Where: N : number of latched white-noise processes to sum, not to exceed sizeof(int) in C++ (typically 32).","title":"Usage"},{"location":"libs/noises/#references_1","text":"http://www.dsprelated.com/showarticle/908.php http://www.firstpr.com.au/dsp/pink-noise/#Voss-McCartney","title":"References"},{"location":"libs/noises/#nolfnoise-nolfnoise0-and-nolfnoisen","text":"Low-frequency noise generators (Butterworth-filtered downsampled white noise).","title":"(no.)lfnoise, (no.)lfnoise0 and (no.)lfnoiseN"},{"location":"libs/noises/#usage_11","text":"lfnoise0(rate) : _ // new random number every int(SR/rate) samples or so lfnoiseN(N,rate) : _ // same as \"lfnoise0(rate) : lowpass(N,rate)\" [see filters.lib] lfnoise(rate) : _ // same as \"lfnoise0(rate) : seq(i,5,lowpass(N,rate))\" (no overshoot)","title":"Usage"},{"location":"libs/noises/#example_1","text":"(view waveforms in faust2octave): rate = SR/100.0; // new random value every 100 samples (SR from music.lib) process = lfnoise0(rate), // sampled/held noise (piecewise constant) lfnoiseN(3,rate), // lfnoise0 smoothed by 3rd order Butterworth LPF lfnoise(rate); // lfnoise0 smoothed with no overshoot","title":"Example"},{"location":"libs/noises/#nosparse_noise","text":"Sparse noise generator.","title":"(no.)sparse_noise"},{"location":"libs/noises/#usage_12","text":"sparse_noise(f0) : _ Where: f0 : average frequency of noise impulses per second Random impulses in the amplitude range -1 to 1 are generated at an average rate of f0 impulses per second.","title":"Usage"},{"location":"libs/noises/#reference_1","text":"See velvet_noise","title":"Reference"},{"location":"libs/noises/#novelvet_noise_vm","text":"Velvet noise generator.","title":"(no.)velvet_noise_vm"},{"location":"libs/noises/#usage_13","text":"velvet_noise(amp, f0) : _ Where: amp : amplitude of noise impulses (positive and negative) f0 : average frequency of noise impulses per second","title":"Usage"},{"location":"libs/noises/#reference_2","text":"Matti Karjalainen and Hanna Jarvelainen, \"Reverberation Modeling Using Velvet Noise\", in Proc. 30th Int. Conf. Intelligent Audio Environments (AES07), March 2007.","title":"Reference"},{"location":"libs/noises/#nognoise","text":"Approximate zero-mean, unit-variance Gaussian white noise generator.","title":"(no.)gnoise"},{"location":"libs/noises/#usage_14","text":"gnoise(N) : _ Where: N : number of uniform random numbers added to approximate Gaussian white noise","title":"Usage"},{"location":"libs/noises/#reference_3","text":"See Central Limit Theorem","title":"Reference"},{"location":"libs/noises/#nocolored_noise","text":"Generates a colored noise signal with an arbitrary spectral roll-off factor (alpha) over the entire audible frequency range (20-20000 Hz). The output is normalized so that an equal RMS level is maintained for different values of alpha.","title":"(no.)colored_noise"},{"location":"libs/noises/#usage_15","text":"colored_noise(N,alpha) : _ Where: N : desired integer filter order (constant numerical expression) alpha : slope of roll-off, between -1 and 1. -1 corresponds to brown/red noise, -1/2 pink noise, 0 white noise, 1/2 blue noise, and 1 violet/azure noise.","title":"Usage"},{"location":"libs/noises/#examples","text":"See dm.colored_noise_demo .","title":"Examples"},{"location":"libs/oscillators/","text":"oscillators.lib This library contains a collection of sound generators. Its official prefix is os . The oscillators library is organized into 9 sections: Wave-Table-Based Oscillators Low Frequency Oscillators Low Frequency Sawtooths Alias-Suppressed Sawtooth Alias-Suppressed Pulse, Square, and Impulse Trains Filter-Based Oscillators Waveguide-Resonator-Based Oscillators Casio CZ Oscillators PolyBLEP-Based Oscillators References https://github.com/grame-cncm/faustlibraries/blob/master/oscillators.lib Wave-Table-Based Oscillators (os.)sinwaveform Sine waveform ready to use with a rdtable . Usage sinwaveform(tablesize) : _ Where: tablesize : the table size (os.)coswaveform Cosine waveform ready to use with a rdtable . Usage coswaveform(tablesize) : _ Where: tablesize : the table size (os.)phasor A simple phasor to be used with a rdtable . phasor is a standard Faust function. Usage phasor(tablesize,freq) : _ Where: tablesize : the table size freq : the frequency in Hz (os.)hs_phasor Hardsyncing phasor to be used with a rdtable . Usage hs_phasor(tablesize,freq,reset) : _ Where: tablesize : the table size freq : the frequency in Hz reset : a reset signal, reset phase to 0 when equal to 1 (os.)hsp_phasor Hardsyncing phasor with selectable phase to be used with a rdtable . Usage hsp_phasor(tablesize,freq,reset,phase) Where: tablesize : the table size freq : the frequency in Hz reset : reset the oscillator to phase when equal to 1 phase : phase between 0 and 1 (os.)oscsin Sine wave oscillator. oscsin is a standard Faust function. Usage oscsin(freq) : _ Where: freq : the frequency in Hz (os.)hs_oscsin Sin lookup table with hardsyncing phase. Usage hs_oscsin(freq,reset) : _ Where: freq : the frequency in Hz reset : reset the oscillator to 0 when equal to 1 (os.)osccos Cosine wave oscillator. Usage osccos(freq) : _ Where: freq : the frequency in Hz (os.)hs_osccos Cos lookup table with hardsyncing phase. Usage hs_osccos(freq,reset) : _ Where: freq : the frequency in Hz reset : reset the oscillator to 0 when equal to 1 (os.)oscp A sine wave generator with controllable phase. Usage oscp(freq,phase) : _ Where: freq : the frequency in Hz phase : the phase in radian (os.)osci Interpolated phase sine wave oscillator. Usage osci(freq) : _ Where: freq : the frequency in Hz (os.)osc Default sine wave oscillator (same as oscsin ). osc is a standard Faust function. Usage osc(freq) : _ Where: freq : the frequency in Hz Wave-Table-Based Oscillators Oscillators based on mathematical functions. (os.)m_oscsin Sine wave oscillator based on the sin mathematical function. Usage m_oscsin(freq) : _ Where: freq : the frequency in Hz (os.)m_osccos Sine wave oscillator based on the sin mathematical function. Usage m_osccos(freq) : _ Where: freq : the frequency in Hz Low Frequency Oscillators Low Frequency Oscillators (LFOs) have prefix lf_ (no aliasing suppression, since it is inaudible at LF). Use sawN and its derivatives for audio oscillators with suppressed aliasing. (os.)lf_imptrain Unit-amplitude low-frequency impulse train. lf_imptrain is a standard Faust function. Usage lf_imptrain(freq) : _ Where: freq : frequency in Hz (os.)lf_pulsetrainpos Unit-amplitude nonnegative LF pulse train, duty cycle between 0 and 1. Usage lf_pulsetrainpos(freq, duty) : _ Where: freq : frequency in Hz duty : duty cycle between 0 and 1 (os.)lf_pulsetrain Unit-amplitude zero-mean LF pulse train, duty cycle between 0 and 1. Usage lf_pulsetrain(freq,duty) : _ Where: freq : frequency in Hz duty : duty cycle between 0 and 1 (os.)lf_squarewavepos Positive LF square wave in [0,1] Usage lf_squarewavepos(freq) : _ Where: freq : frequency in Hz (os.)lf_squarewave Zero-mean unit-amplitude LF square wave. lf_squarewave is a standard Faust function. Usage lf_squarewave(freq) : _ Where: freq : frequency in Hz (os.)lf_trianglepos Positive unit-amplitude LF positive triangle wave. Usage lf_trianglepos(freq) : _ Where: freq : frequency in Hz (os.)lf_triangle Positive unit-amplitude LF triangle wave. lf_triangle is a standard Faust function. Usage lf_triangle(freq) : _ Where: freq : frequency in Hz Low Frequency Sawtooths Sawtooth waveform oscillators for virtual analog synthesis et al. The 'simple' versions ( lf_rawsaw , lf_sawpos and saw1 ), are mere samplings of the ideal continuous-time (\"analog\") waveforms. While simple, the aliasing due to sampling is quite audible. The differentiated polynomial waveform family ( saw2 , sawN , and derived functions) do some extra processing to suppress aliasing (not audible for very low fundamental frequencies). According to Lehtonen et al. (JASA 2012), the aliasing of saw2 should be inaudible at fundamental frequencies below 2 kHz or so, for a 44.1 kHz sampling rate and 60 dB SPL presentation level; fundamentals 415 and below required no aliasing suppression (i.e., saw1 is ok). (os.)lf_rawsaw Simple sawtooth waveform oscillator between 0 and period in samples. Usage lf_rawsaw(periodsamps) : _ Where: periodsamps : number of periods per samples (os.)lf_sawpos Simple sawtooth waveform oscillator between 0 and 1. Usage lf_sawpos(freq) : _ Where: freq : frequency in Hz (os.)lf_sawpos_phase Simple sawtooth waveform oscillator between 0 and 1 with phase control. Usage lf_sawpos_phase(freq, phase) : _ Where: freq : frequency in Hz phase : phase between 0 and 1 (os.)lf_sawpos_reset Simple sawtooth waveform oscillator between 0 and 1 with reset. Usage lf_sawpos_reset(freq,reset) : _ Where: freq : frequency in Hz reset : reset the oscillator to 0 when equal to 1 (os.)lf_sawpos_phase_reset Simple sawtooth waveform oscillator between 0 and 1 with phase control and reset. Usage lf_sawpos_phase_reset(freq,phase,reset) : _ Where: freq : frequency in Hz phase : phase between 0 and 1 reset : reset the oscillator to phase when equal to 1 (os.)lf_saw Simple sawtooth waveform oscillator between -1 and 1. lf_saw is a standard Faust function. Usage lf_saw(freq) : _ Where: freq : frequency in Hz Alias-Suppressed Sawtooth (os.)sawN Alias-Suppressed Sawtooth Audio-Frequency Oscillator using Nth-order polynomial transitions to reduce aliasing. sawN(N,freq) , sawNp(N,freq,phase) , saw2dpw(freq) , saw2(freq) , saw3(freq) , saw4(freq) , sawtooth(freq) , saw2f2(freq) , saw2f4(freq) Usage sawN(N,freq) : _ // Nth-order aliasing-suppressed sawtooth using DPW method (see below) sawNp(N,freq,phase) : _ // sawN with phase offset feature saw2dpw(freq) : _ // saw2 using DPW saw2ptr(freq) : _ // saw2 using the faster, stateless PTR method saw2(freq) : _ // DPW method, but subject to change if a better method emerges saw3(freq) : _ // sawN(3) saw4(freq) : _ // sawN(4) sawtooth(freq) : _ // saw2 saw2f2(freq) : _ // saw2dpw with 2nd-order droop-correction filtering saw2f4(freq) : _ // saw2dpw with 4th-order droop-correction filtering Where: N : polynomial order, a constant numerical expression between 1 and 4 freq : frequency in Hz phase : phase between 0 and 1 Method Differentiated Polynomial Wave (DPW). Reference \"Alias-Suppressed Oscillators based on Differentiated Polynomial Waveforms\", Vesa Valimaki, Juhan Nam, Julius Smith, and Jonathan Abel, IEEE Tr. Audio, Speech, and Language Processing (IEEE-ASLP), Vol. 18, no. 5, pp 786-798, May 2010. 10.1109/TASL.2009.2026507. Notes The polynomial order N is limited to 4 because noise has been observed at very low freq values. (LFO sawtooths should of course be generated using lf_sawpos instead.) (os.)sawNp Same as (os.)sawN but with a controllable waveform phase. Usage sawNp(N,freq,phase) : _ where N : waveform interpolation polynomial order 1 to 4 (constant integer expression) freq : frequency in Hz phase : waveform phase as a fraction of one period (rounded to nearest sample) Implementation Notes The phase offset is implemented by delaying sawN(N,freq) by round(phase*ma.SR/freq) samples, for up to 8191 samples. The minimum sawtooth frequency that can be delayed a whole period is therefore ma.SR/8191 , which is well below audibility for normal audio sampling rates. (os.)saw2, (os.)saw3, (os.)saw4 Alias-Suppressed Sawtooth Audio-Frequency Oscillators of order 2, 3, 4. Usage saw2(freq) : _ saw3(freq) : _ saw4(freq) : _ where freq : frequency in Hz References See sawN above. Implementation Notes Presently, only saw2 uses the PTR method, while saw3 and saw4 use DPW. This is because PTR has been implemented and tested for the 2nd-order case only. (os.)saw2ptr Alias-Suppressed Sawtooth Audio-Frequency Oscillator using Polynomial Transition Regions (PTR) for order 2. Usage saw2ptr(freq) : _ where freq : frequency in Hz Implementation Polynomial Transition Regions (PTR) method for aliasing suppression. References Kleimola, J.; Valimaki, V., \"Reducing Aliasing from Synthetic Audio Signals Using Polynomial Transition Regions,\" in Signal Processing Letters, IEEE , vol.19, no.2, pp.67-70, Feb. 2012 https://aaltodoc.aalto.fi/bitstream/handle/123456789/7747/publication6.pdf?sequence=9 http://research.spa.aalto.fi/publications/papers/spl-ptr/ Notes Method PTR may be preferred because it requires less computation and is stateless which means that the frequency freq can be modulated arbitrarily fast over time without filtering artifacts. For this reason, saw2 is presently defined as saw2ptr . (os.)saw2dpw Alias-Suppressed Sawtooth Audio-Frequency Oscillator using the Differentiated Polynomial Waveform (DWP) method. Usage saw2dpw(freq) : _ where freq : frequency in Hz This is the original Faust saw2 function using the DPW method. Since saw2 is now defined as saw2ptr , the DPW version is now available as saw2dwp . (os.)sawtooth Alias-suppressed aliasing-suppressed sawtooth oscillator, presently defined as saw2 . sawtooth is a standard Faust function. Usage sawtooth(freq) : _ with freq : frequency in Hz (os.)saw2f2, (os.)saw2f4 Alias-Suppressed Sawtooth Audio-Frequency Oscillator with Order 2 or 4 Droop Correction Filtering. Usage saw2f2(freq) : _ saw2f4(freq) : _ with freq : frequency in Hz In return for aliasing suppression, there is some attenuation near half the sampling rate. This can be considered as beneficial, or it can be compensated with a high-frequency boost. The boost filter is second-order for saw2f2 and fourth-order for saw2f4 , and both are designed for the DWP case and therefore use saw2dpw . See Figure 4(b) in the DPW reference for a plot of the slight droop in the DPW case. Alias-Suppressed Pulse, Square, and Impulse Trains Alias-Suppressed Pulse, Square and Impulse Trains. pulsetrainN , pulsetrain , squareN , square , imptrainN , imptrain , triangleN , triangle All are zero-mean and meant to oscillate in the audio frequency range. Use simpler sample-rounded lf_* versions above for LFOs. Usage pulsetrainN(N,freq,duty) : _ pulsetrain(freq, duty) : _ // = pulsetrainN(2) squareN(N,freq) : _ square : _ // = squareN(2) imptrainN(N,freq) : _ imptrain : _ // = imptrainN(2) triangleN(N,freq) : _ triangle : _ // = triangleN(2) Where: N : polynomial order, a constant numerical expression freq : frequency in Hz (os.)impulse One-time impulse generated when the Faust process is started. impulse is a standard Faust function. Usage impulse : _ (os.)pulsetrainN Alias-suppressed pulse train oscillator. Usage pulsetrainN(N,freq,duty) : _ Where: N : order, as a constant numerical expression freq : frequency in Hz duty : duty cycle between 0 and 1 (os.)pulsetrain Alias-suppressed pulse train oscillator. Based on pulsetrainN(2) . pulsetrain is a standard Faust function. Usage pulsetrain(freq,duty) : _ Where: freq : frequency in Hz duty : duty cycle between 0 and 1 (os.)squareN Alias-suppressed square wave oscillator. Usage squareN(N,freq) : _ Where: N : order, as a constant numerical expression freq : frequency in Hz (os.)square Alias-suppressed square wave oscillator. Based on squareN(2) . square is a standard Faust function. Usage square(freq) : _ Where: freq : frequency in Hz (os.)imptrainN Alias-suppressed impulse train generator. Usage imptrainN(N,freq) : _ Where: N : order, as a constant numerical expression freq : frequency in Hz (os.)imptrain Alias-suppressed impulse train generator. Based on imptrainN(2) . imptrain is a standard Faust function. Usage imptrain(freq) : _ Where: freq : frequency in Hz (os.)triangleN Alias-suppressed triangle wave oscillator. Usage triangleN(N,freq) : _ Where: N : order, as a constant numerical expression freq : frequency in Hz (os.)triangle Alias-suppressed triangle wave oscillator. Based on triangleN(2) . triangle is a standard Faust function. Usage triangle(freq) : _ Where: freq : frequency in Hz Filter-Based Oscillators Filter-Based Oscillators. Usage osc[b|rq|rs|rc|s](freq), where freq = frequency in Hz. References http://lac.linuxaudio.org/2012/download/lac12-slides-jos.pdf https://ccrma.stanford.edu/~jos/pdf/lac12-paper-jos.pdf (os.)oscb Sinusoidal oscillator based on the biquad. Usage oscb(freq) : _ Where: freq : frequency in Hz (os.)oscrq Sinusoidal (sine and cosine) oscillator based on 2D vector rotation, = undamped \"coupled-form\" resonator = lossless 2nd-order normalized ladder filter. Usage oscrq(freq) : _,_ Where: freq : frequency in Hz Reference https://ccrma.stanford.edu/~jos/pasp/Normalized_Scattering_Junctions.html (os.)oscrs Sinusoidal (sine) oscillator based on 2D vector rotation, = undamped \"coupled-form\" resonator = lossless 2nd-order normalized ladder filter. Usage oscrs(freq) : _ Where: freq : frequency in Hz Reference https://ccrma.stanford.edu/~jos/pasp/Normalized_Scattering_Junctions.html (os.)oscrc Sinusoidal (cosine) oscillator based on 2D vector rotation, = undamped \"coupled-form\" resonator = lossless 2nd-order normalized ladder filter. Usage oscrc(freq) : _ Where: freq : frequency in Hz Reference https://ccrma.stanford.edu/~jos/pasp/Normalized_Scattering_Junctions.html (os.)oscs Sinusoidal oscillator based on the state variable filter = undamped \"modified-coupled-form\" resonator = \"magic circle\" algorithm used in graphics. Usage oscs(freq) : _ Where: freq : frequency in Hz (os.)quadosc Sinusoidal oscillator based on QuadOsc by Martin Vicanek. Usage quadosc(freq) : _ where freq : frequency in Hz Reference https://vicanek.de/articles/QuadOsc.pdf Waveguide-Resonator-Based Oscillators Sinusoidal oscillator based on the waveguide resonator wgr . (os.)oscwc Sinusoidal oscillator based on the waveguide resonator wgr . Unit-amplitude cosine oscillator. Usage oscwc(freq) : _ Where: freq : frequency in Hz Reference https://ccrma.stanford.edu/~jos/pasp/Digital_Waveguide_Oscillator.html (os.)oscws Sinusoidal oscillator based on the waveguide resonator wgr . Unit-amplitude sine oscillator. Usage oscws(freq) : _ Where: freq : frequency in Hz Reference https://ccrma.stanford.edu/~jos/pasp/Digital_Waveguide_Oscillator.html (os.)oscq Sinusoidal oscillator based on the waveguide resonator wgr . Unit-amplitude cosine and sine (quadrature) oscillator. Usage oscq(freq) : _,_ Where: freq : frequency in Hz Reference https://ccrma.stanford.edu/~jos/pasp/Digital_Waveguide_Oscillator.html (os.)oscw Sinusoidal oscillator based on the waveguide resonator wgr . Unit-amplitude cosine oscillator (default). Usage oscw(freq) : _ Where: freq : frequency in Hz Reference https://ccrma.stanford.edu/~jos/pasp/Digital_Waveguide_Oscillator.html Casio CZ Oscillators Oscillators that mimic some of the Casio CZ oscillators. There are two sets: a set with an index parameter a set with a res parameter The \"index oscillators\" outputs a sine wave at index=0 and gets brighter with a higher index. There are two versions of the \"index oscillators\": with P appended to the name: is phase aligned with fund:sin without P appended to the name: has the phase of the original CZ oscillators The \"res oscillators\" have a resonant frequency. \"res\" is the frequency of resonance as a factor of the fundamental pitch. (os.)CZsaw Oscillator that mimics the Casio CZ saw oscillator. CZsaw is a standard Faust function. Usage CZsaw(fund,index) : _ Where: fund : a saw-tooth waveform between 0 and 1 that the oscillator slaves to index : the brightness of the oscillator, 0 to 1. 0 = sine-wave, 1 = saw-wave (os.)CZsawP Oscillator that mimics the Casio CZ saw oscillator, with it's phase aligned to fund:sin . CZsawP is a standard Faust function. Usage CZsawP(fund,index) : _ Where: fund : a saw-tooth waveform between 0 and 1 that the oscillator slaves to index : the brightness of the oscillator, 0 to 1. 0 = sine-wave, 1 = saw-wave (os.)CZsquare Oscillator that mimics the Casio CZ square oscillator CZsquare is a standard Faust function. Usage CZsquare(fund,index) : _ Where: fund : a saw-tooth waveform between 0 and 1 that the oscillator slaves to index : the brightness of the oscillator, 0 to 1. 0 = sine-wave, 1 = square-wave (os.)CZsquareP Oscillator that mimics the Casio CZ square oscillator, with it's phase aligned to fund:sin . CZsquareP is a standard Faust function. Usage CZsquareP(fund,index) : _ Where: fund : a saw-tooth waveform between 0 and 1 that the oscillator slaves to index : the brightness of the oscillator, 0 to 1. 0 = sine-wave, 1 = square-wave (os.)CZpulse Oscillator that mimics the Casio CZ pulse oscillator. CZpulse is a standard Faust function. Usage CZpulse(fund,index) : _ Where: fund : a saw-tooth waveform between 0 and 1 that the oscillator slaves to index : the brightness of the oscillator, 0 gives a sine-wave, 1 is closer to a pulse (os.)CZpulseP Oscillator that mimics the Casio CZ pulse oscillator, with it's phase aligned to fund:sin . CZpulseP is a standard Faust function. Usage CZpulseP(fund,index) : _ Where: fund : a saw-tooth waveform between 0 and 1 that the oscillator slaves to index : the brightness of the oscillator, 0 gives a sine-wave, 1 is closer to a pulse (os.)CZsinePulse Oscillator that mimics the Casio CZ sine/pulse oscillator. CZsinePulse is a standard Faust function. Usage CZsinePulse(fund,index) : _ Where: fund : a saw-tooth waveform between 0 and 1 that the oscillator slaves to index : the brightness of the oscillator, 0 gives a sine-wave, 1 is a sine minus a pulse (os.)CZsinePulseP Oscillator that mimics the Casio CZ sine/pulse oscillator, with it's phase aligned to fund:sin . CZsinePulseP is a standard Faust function. Usage CZsinePulseP(fund,index) : _ Where: fund : a saw-tooth waveform between 0 and 1 that the oscillator slaves to index : the brightness of the oscillator, 0 gives a sine-wave, 1 is a sine minus a pulse (os.)CZhalfSine Oscillator that mimics the Casio CZ half sine oscillator. CZhalfSine is a standard Faust function. Usage CZhalfSine(fund,index) : _ Where: fund : a saw-tooth waveform between 0 and 1 that the oscillator slaves to index : the brightness of the oscillator, 0 gives a sine-wave, 1 is somewhere between a saw and a square (os.)CZhalfSineP Oscillator that mimics the Casio CZ half sine oscillator, with it's phase aligned to fund:sin . CZhalfSineP is a standard Faust function. Usage CZhalfSineP(fund,index) : _ Where: fund : a saw-tooth waveform between 0 and 1 that the oscillator slaves to index : the brightness of the oscillator, 0 gives a sine-wave, 1 is somewhere between a saw and a square (os.)CZresSaw Oscillator that mimics the Casio CZ resonant sawtooth oscillator. CZresSaw is a standard Faust function. Usage CZresSaw(fund,res) : _ Where: fund : a saw-tooth waveform between 0 and 1 that the oscillator slaves to res : the frequency of resonance as a factor of the fundamental pitch. (os.)CZresTriangle Oscillator that mimics the Casio CZ resonant triangle oscillator. CZresTriangle is a standard Faust function. Usage CZresTriangle(fund,res) : _ Where: fund : a saw-tooth waveform between 0 and 1 that the oscillator slaves to res : the frequency of resonance as a factor of the fundamental pitch. (os.)CZresTrap Oscillator that mimics the Casio CZ resonant trapeze oscillator CZresTrap is a standard Faust function. Usage CZresTrap(fund,res) : _ Where: fund : a saw-tooth waveform between 0 and 1 that the oscillator slaves to res : the frequency of resonance as a factor of the fundamental pitch. PolyBLEP-Based Oscillators (os.)polyblep PolyBLEP residual function, used for smoothing steps in the audio signal. Usage polyblep(Q,phase) : _ Where: Q : smoothing factor between 0 and 0.5. Determines how far from the ends of the phase interval the quadratic function is used. phase : normalised phase (between 0 and 1) (os.)polyblep_saw Sawtooth oscillator with suppressed aliasing (using polyblep ). Usage polyblep_saw(freq) : _ Where: freq : frequency in Hz (os.)polyblep_square Square wave oscillator with suppressed aliasing (using polyblep ). Usage polyblep_square(freq) : _ Where: freq : frequency in Hz (os.)polyblep_triangle Triangle wave oscillator with suppressed aliasing (using polyblep ). Usage polyblep_triangle(freq) : _ Where: freq : frequency in Hz","title":" oscillators "},{"location":"libs/oscillators/#oscillatorslib","text":"This library contains a collection of sound generators. Its official prefix is os . The oscillators library is organized into 9 sections: Wave-Table-Based Oscillators Low Frequency Oscillators Low Frequency Sawtooths Alias-Suppressed Sawtooth Alias-Suppressed Pulse, Square, and Impulse Trains Filter-Based Oscillators Waveguide-Resonator-Based Oscillators Casio CZ Oscillators PolyBLEP-Based Oscillators","title":"oscillators.lib"},{"location":"libs/oscillators/#references","text":"https://github.com/grame-cncm/faustlibraries/blob/master/oscillators.lib","title":"References"},{"location":"libs/oscillators/#wave-table-based-oscillators","text":"","title":"Wave-Table-Based Oscillators"},{"location":"libs/oscillators/#ossinwaveform","text":"Sine waveform ready to use with a rdtable .","title":"(os.)sinwaveform"},{"location":"libs/oscillators/#usage","text":"sinwaveform(tablesize) : _ Where: tablesize : the table size","title":"Usage"},{"location":"libs/oscillators/#oscoswaveform","text":"Cosine waveform ready to use with a rdtable .","title":"(os.)coswaveform"},{"location":"libs/oscillators/#usage_1","text":"coswaveform(tablesize) : _ Where: tablesize : the table size","title":"Usage"},{"location":"libs/oscillators/#osphasor","text":"A simple phasor to be used with a rdtable . phasor is a standard Faust function.","title":"(os.)phasor"},{"location":"libs/oscillators/#usage_2","text":"phasor(tablesize,freq) : _ Where: tablesize : the table size freq : the frequency in Hz","title":"Usage"},{"location":"libs/oscillators/#oshs_phasor","text":"Hardsyncing phasor to be used with a rdtable .","title":"(os.)hs_phasor"},{"location":"libs/oscillators/#usage_3","text":"hs_phasor(tablesize,freq,reset) : _ Where: tablesize : the table size freq : the frequency in Hz reset : a reset signal, reset phase to 0 when equal to 1","title":"Usage"},{"location":"libs/oscillators/#oshsp_phasor","text":"Hardsyncing phasor with selectable phase to be used with a rdtable .","title":"(os.)hsp_phasor"},{"location":"libs/oscillators/#usage_4","text":"hsp_phasor(tablesize,freq,reset,phase) Where: tablesize : the table size freq : the frequency in Hz reset : reset the oscillator to phase when equal to 1 phase : phase between 0 and 1","title":"Usage"},{"location":"libs/oscillators/#ososcsin","text":"Sine wave oscillator. oscsin is a standard Faust function.","title":"(os.)oscsin"},{"location":"libs/oscillators/#usage_5","text":"oscsin(freq) : _ Where: freq : the frequency in Hz","title":"Usage"},{"location":"libs/oscillators/#oshs_oscsin","text":"Sin lookup table with hardsyncing phase.","title":"(os.)hs_oscsin"},{"location":"libs/oscillators/#usage_6","text":"hs_oscsin(freq,reset) : _ Where: freq : the frequency in Hz reset : reset the oscillator to 0 when equal to 1","title":"Usage"},{"location":"libs/oscillators/#ososccos","text":"Cosine wave oscillator.","title":"(os.)osccos"},{"location":"libs/oscillators/#usage_7","text":"osccos(freq) : _ Where: freq : the frequency in Hz","title":"Usage"},{"location":"libs/oscillators/#oshs_osccos","text":"Cos lookup table with hardsyncing phase.","title":"(os.)hs_osccos"},{"location":"libs/oscillators/#usage_8","text":"hs_osccos(freq,reset) : _ Where: freq : the frequency in Hz reset : reset the oscillator to 0 when equal to 1","title":"Usage"},{"location":"libs/oscillators/#ososcp","text":"A sine wave generator with controllable phase.","title":"(os.)oscp"},{"location":"libs/oscillators/#usage_9","text":"oscp(freq,phase) : _ Where: freq : the frequency in Hz phase : the phase in radian","title":"Usage"},{"location":"libs/oscillators/#ososci","text":"Interpolated phase sine wave oscillator.","title":"(os.)osci"},{"location":"libs/oscillators/#usage_10","text":"osci(freq) : _ Where: freq : the frequency in Hz","title":"Usage"},{"location":"libs/oscillators/#ososc","text":"Default sine wave oscillator (same as oscsin ). osc is a standard Faust function.","title":"(os.)osc"},{"location":"libs/oscillators/#usage_11","text":"osc(freq) : _ Where: freq : the frequency in Hz","title":"Usage"},{"location":"libs/oscillators/#wave-table-based-oscillators_1","text":"Oscillators based on mathematical functions.","title":"Wave-Table-Based Oscillators"},{"location":"libs/oscillators/#osm_oscsin","text":"Sine wave oscillator based on the sin mathematical function.","title":"(os.)m_oscsin"},{"location":"libs/oscillators/#usage_12","text":"m_oscsin(freq) : _ Where: freq : the frequency in Hz","title":"Usage"},{"location":"libs/oscillators/#osm_osccos","text":"Sine wave oscillator based on the sin mathematical function.","title":"(os.)m_osccos"},{"location":"libs/oscillators/#usage_13","text":"m_osccos(freq) : _ Where: freq : the frequency in Hz","title":"Usage"},{"location":"libs/oscillators/#low-frequency-oscillators","text":"Low Frequency Oscillators (LFOs) have prefix lf_ (no aliasing suppression, since it is inaudible at LF). Use sawN and its derivatives for audio oscillators with suppressed aliasing.","title":"Low Frequency Oscillators"},{"location":"libs/oscillators/#oslf_imptrain","text":"Unit-amplitude low-frequency impulse train. lf_imptrain is a standard Faust function.","title":"(os.)lf_imptrain"},{"location":"libs/oscillators/#usage_14","text":"lf_imptrain(freq) : _ Where: freq : frequency in Hz","title":"Usage"},{"location":"libs/oscillators/#oslf_pulsetrainpos","text":"Unit-amplitude nonnegative LF pulse train, duty cycle between 0 and 1.","title":"(os.)lf_pulsetrainpos"},{"location":"libs/oscillators/#usage_15","text":"lf_pulsetrainpos(freq, duty) : _ Where: freq : frequency in Hz duty : duty cycle between 0 and 1","title":"Usage"},{"location":"libs/oscillators/#oslf_pulsetrain","text":"Unit-amplitude zero-mean LF pulse train, duty cycle between 0 and 1.","title":"(os.)lf_pulsetrain"},{"location":"libs/oscillators/#usage_16","text":"lf_pulsetrain(freq,duty) : _ Where: freq : frequency in Hz duty : duty cycle between 0 and 1","title":"Usage"},{"location":"libs/oscillators/#oslf_squarewavepos","text":"Positive LF square wave in [0,1]","title":"(os.)lf_squarewavepos"},{"location":"libs/oscillators/#usage_17","text":"lf_squarewavepos(freq) : _ Where: freq : frequency in Hz","title":"Usage"},{"location":"libs/oscillators/#oslf_squarewave","text":"Zero-mean unit-amplitude LF square wave. lf_squarewave is a standard Faust function.","title":"(os.)lf_squarewave"},{"location":"libs/oscillators/#usage_18","text":"lf_squarewave(freq) : _ Where: freq : frequency in Hz","title":"Usage"},{"location":"libs/oscillators/#oslf_trianglepos","text":"Positive unit-amplitude LF positive triangle wave.","title":"(os.)lf_trianglepos"},{"location":"libs/oscillators/#usage_19","text":"lf_trianglepos(freq) : _ Where: freq : frequency in Hz","title":"Usage"},{"location":"libs/oscillators/#oslf_triangle","text":"Positive unit-amplitude LF triangle wave. lf_triangle is a standard Faust function.","title":"(os.)lf_triangle"},{"location":"libs/oscillators/#usage_20","text":"lf_triangle(freq) : _ Where: freq : frequency in Hz","title":"Usage"},{"location":"libs/oscillators/#low-frequency-sawtooths","text":"Sawtooth waveform oscillators for virtual analog synthesis et al. The 'simple' versions ( lf_rawsaw , lf_sawpos and saw1 ), are mere samplings of the ideal continuous-time (\"analog\") waveforms. While simple, the aliasing due to sampling is quite audible. The differentiated polynomial waveform family ( saw2 , sawN , and derived functions) do some extra processing to suppress aliasing (not audible for very low fundamental frequencies). According to Lehtonen et al. (JASA 2012), the aliasing of saw2 should be inaudible at fundamental frequencies below 2 kHz or so, for a 44.1 kHz sampling rate and 60 dB SPL presentation level; fundamentals 415 and below required no aliasing suppression (i.e., saw1 is ok).","title":"Low Frequency Sawtooths"},{"location":"libs/oscillators/#oslf_rawsaw","text":"Simple sawtooth waveform oscillator between 0 and period in samples.","title":"(os.)lf_rawsaw"},{"location":"libs/oscillators/#usage_21","text":"lf_rawsaw(periodsamps) : _ Where: periodsamps : number of periods per samples","title":"Usage"},{"location":"libs/oscillators/#oslf_sawpos","text":"Simple sawtooth waveform oscillator between 0 and 1.","title":"(os.)lf_sawpos"},{"location":"libs/oscillators/#usage_22","text":"lf_sawpos(freq) : _ Where: freq : frequency in Hz","title":"Usage"},{"location":"libs/oscillators/#oslf_sawpos_phase","text":"Simple sawtooth waveform oscillator between 0 and 1 with phase control.","title":"(os.)lf_sawpos_phase"},{"location":"libs/oscillators/#usage_23","text":"lf_sawpos_phase(freq, phase) : _ Where: freq : frequency in Hz phase : phase between 0 and 1","title":"Usage"},{"location":"libs/oscillators/#oslf_sawpos_reset","text":"Simple sawtooth waveform oscillator between 0 and 1 with reset.","title":"(os.)lf_sawpos_reset"},{"location":"libs/oscillators/#usage_24","text":"lf_sawpos_reset(freq,reset) : _ Where: freq : frequency in Hz reset : reset the oscillator to 0 when equal to 1","title":"Usage"},{"location":"libs/oscillators/#oslf_sawpos_phase_reset","text":"Simple sawtooth waveform oscillator between 0 and 1 with phase control and reset.","title":"(os.)lf_sawpos_phase_reset"},{"location":"libs/oscillators/#usage_25","text":"lf_sawpos_phase_reset(freq,phase,reset) : _ Where: freq : frequency in Hz phase : phase between 0 and 1 reset : reset the oscillator to phase when equal to 1","title":"Usage"},{"location":"libs/oscillators/#oslf_saw","text":"Simple sawtooth waveform oscillator between -1 and 1. lf_saw is a standard Faust function.","title":"(os.)lf_saw"},{"location":"libs/oscillators/#usage_26","text":"lf_saw(freq) : _ Where: freq : frequency in Hz","title":"Usage"},{"location":"libs/oscillators/#alias-suppressed-sawtooth","text":"","title":"Alias-Suppressed Sawtooth"},{"location":"libs/oscillators/#ossawn","text":"Alias-Suppressed Sawtooth Audio-Frequency Oscillator using Nth-order polynomial transitions to reduce aliasing. sawN(N,freq) , sawNp(N,freq,phase) , saw2dpw(freq) , saw2(freq) , saw3(freq) , saw4(freq) , sawtooth(freq) , saw2f2(freq) , saw2f4(freq)","title":"(os.)sawN"},{"location":"libs/oscillators/#usage_27","text":"sawN(N,freq) : _ // Nth-order aliasing-suppressed sawtooth using DPW method (see below) sawNp(N,freq,phase) : _ // sawN with phase offset feature saw2dpw(freq) : _ // saw2 using DPW saw2ptr(freq) : _ // saw2 using the faster, stateless PTR method saw2(freq) : _ // DPW method, but subject to change if a better method emerges saw3(freq) : _ // sawN(3) saw4(freq) : _ // sawN(4) sawtooth(freq) : _ // saw2 saw2f2(freq) : _ // saw2dpw with 2nd-order droop-correction filtering saw2f4(freq) : _ // saw2dpw with 4th-order droop-correction filtering Where: N : polynomial order, a constant numerical expression between 1 and 4 freq : frequency in Hz phase : phase between 0 and 1","title":"Usage"},{"location":"libs/oscillators/#method","text":"Differentiated Polynomial Wave (DPW).","title":"Method"},{"location":"libs/oscillators/#reference","text":"\"Alias-Suppressed Oscillators based on Differentiated Polynomial Waveforms\", Vesa Valimaki, Juhan Nam, Julius Smith, and Jonathan Abel, IEEE Tr. Audio, Speech, and Language Processing (IEEE-ASLP), Vol. 18, no. 5, pp 786-798, May 2010. 10.1109/TASL.2009.2026507.","title":"Reference"},{"location":"libs/oscillators/#notes","text":"The polynomial order N is limited to 4 because noise has been observed at very low freq values. (LFO sawtooths should of course be generated using lf_sawpos instead.)","title":"Notes"},{"location":"libs/oscillators/#ossawnp","text":"Same as (os.)sawN but with a controllable waveform phase.","title":"(os.)sawNp"},{"location":"libs/oscillators/#usage_28","text":"sawNp(N,freq,phase) : _ where N : waveform interpolation polynomial order 1 to 4 (constant integer expression) freq : frequency in Hz phase : waveform phase as a fraction of one period (rounded to nearest sample)","title":"Usage"},{"location":"libs/oscillators/#implementation-notes","text":"The phase offset is implemented by delaying sawN(N,freq) by round(phase*ma.SR/freq) samples, for up to 8191 samples. The minimum sawtooth frequency that can be delayed a whole period is therefore ma.SR/8191 , which is well below audibility for normal audio sampling rates.","title":"Implementation Notes"},{"location":"libs/oscillators/#ossaw2-ossaw3-ossaw4","text":"Alias-Suppressed Sawtooth Audio-Frequency Oscillators of order 2, 3, 4.","title":"(os.)saw2, (os.)saw3, (os.)saw4"},{"location":"libs/oscillators/#usage_29","text":"saw2(freq) : _ saw3(freq) : _ saw4(freq) : _ where freq : frequency in Hz","title":"Usage"},{"location":"libs/oscillators/#references_1","text":"See sawN above.","title":"References"},{"location":"libs/oscillators/#implementation-notes_1","text":"Presently, only saw2 uses the PTR method, while saw3 and saw4 use DPW. This is because PTR has been implemented and tested for the 2nd-order case only.","title":"Implementation Notes"},{"location":"libs/oscillators/#ossaw2ptr","text":"Alias-Suppressed Sawtooth Audio-Frequency Oscillator using Polynomial Transition Regions (PTR) for order 2.","title":"(os.)saw2ptr"},{"location":"libs/oscillators/#usage_30","text":"saw2ptr(freq) : _ where freq : frequency in Hz","title":"Usage"},{"location":"libs/oscillators/#implementation","text":"Polynomial Transition Regions (PTR) method for aliasing suppression.","title":"Implementation"},{"location":"libs/oscillators/#references_2","text":"Kleimola, J.; Valimaki, V., \"Reducing Aliasing from Synthetic Audio Signals Using Polynomial Transition Regions,\" in Signal Processing Letters, IEEE , vol.19, no.2, pp.67-70, Feb. 2012 https://aaltodoc.aalto.fi/bitstream/handle/123456789/7747/publication6.pdf?sequence=9 http://research.spa.aalto.fi/publications/papers/spl-ptr/","title":"References"},{"location":"libs/oscillators/#notes_1","text":"Method PTR may be preferred because it requires less computation and is stateless which means that the frequency freq can be modulated arbitrarily fast over time without filtering artifacts. For this reason, saw2 is presently defined as saw2ptr .","title":"Notes"},{"location":"libs/oscillators/#ossaw2dpw","text":"Alias-Suppressed Sawtooth Audio-Frequency Oscillator using the Differentiated Polynomial Waveform (DWP) method.","title":"(os.)saw2dpw"},{"location":"libs/oscillators/#usage_31","text":"saw2dpw(freq) : _ where freq : frequency in Hz This is the original Faust saw2 function using the DPW method. Since saw2 is now defined as saw2ptr , the DPW version is now available as saw2dwp .","title":"Usage"},{"location":"libs/oscillators/#ossawtooth","text":"Alias-suppressed aliasing-suppressed sawtooth oscillator, presently defined as saw2 . sawtooth is a standard Faust function.","title":"(os.)sawtooth"},{"location":"libs/oscillators/#usage_32","text":"sawtooth(freq) : _ with freq : frequency in Hz","title":"Usage"},{"location":"libs/oscillators/#ossaw2f2-ossaw2f4","text":"Alias-Suppressed Sawtooth Audio-Frequency Oscillator with Order 2 or 4 Droop Correction Filtering.","title":"(os.)saw2f2, (os.)saw2f4"},{"location":"libs/oscillators/#usage_33","text":"saw2f2(freq) : _ saw2f4(freq) : _ with freq : frequency in Hz In return for aliasing suppression, there is some attenuation near half the sampling rate. This can be considered as beneficial, or it can be compensated with a high-frequency boost. The boost filter is second-order for saw2f2 and fourth-order for saw2f4 , and both are designed for the DWP case and therefore use saw2dpw . See Figure 4(b) in the DPW reference for a plot of the slight droop in the DPW case.","title":"Usage"},{"location":"libs/oscillators/#alias-suppressed-pulse-square-and-impulse-trains","text":"Alias-Suppressed Pulse, Square and Impulse Trains. pulsetrainN , pulsetrain , squareN , square , imptrainN , imptrain , triangleN , triangle All are zero-mean and meant to oscillate in the audio frequency range. Use simpler sample-rounded lf_* versions above for LFOs.","title":"Alias-Suppressed Pulse, Square, and Impulse Trains"},{"location":"libs/oscillators/#usage_34","text":"pulsetrainN(N,freq,duty) : _ pulsetrain(freq, duty) : _ // = pulsetrainN(2) squareN(N,freq) : _ square : _ // = squareN(2) imptrainN(N,freq) : _ imptrain : _ // = imptrainN(2) triangleN(N,freq) : _ triangle : _ // = triangleN(2) Where: N : polynomial order, a constant numerical expression freq : frequency in Hz","title":"Usage"},{"location":"libs/oscillators/#osimpulse","text":"One-time impulse generated when the Faust process is started. impulse is a standard Faust function.","title":"(os.)impulse"},{"location":"libs/oscillators/#usage_35","text":"impulse : _","title":"Usage"},{"location":"libs/oscillators/#ospulsetrainn","text":"Alias-suppressed pulse train oscillator.","title":"(os.)pulsetrainN"},{"location":"libs/oscillators/#usage_36","text":"pulsetrainN(N,freq,duty) : _ Where: N : order, as a constant numerical expression freq : frequency in Hz duty : duty cycle between 0 and 1","title":"Usage"},{"location":"libs/oscillators/#ospulsetrain","text":"Alias-suppressed pulse train oscillator. Based on pulsetrainN(2) . pulsetrain is a standard Faust function.","title":"(os.)pulsetrain"},{"location":"libs/oscillators/#usage_37","text":"pulsetrain(freq,duty) : _ Where: freq : frequency in Hz duty : duty cycle between 0 and 1","title":"Usage"},{"location":"libs/oscillators/#ossquaren","text":"Alias-suppressed square wave oscillator.","title":"(os.)squareN"},{"location":"libs/oscillators/#usage_38","text":"squareN(N,freq) : _ Where: N : order, as a constant numerical expression freq : frequency in Hz","title":"Usage"},{"location":"libs/oscillators/#ossquare","text":"Alias-suppressed square wave oscillator. Based on squareN(2) . square is a standard Faust function.","title":"(os.)square"},{"location":"libs/oscillators/#usage_39","text":"square(freq) : _ Where: freq : frequency in Hz","title":"Usage"},{"location":"libs/oscillators/#osimptrainn","text":"Alias-suppressed impulse train generator.","title":"(os.)imptrainN"},{"location":"libs/oscillators/#usage_40","text":"imptrainN(N,freq) : _ Where: N : order, as a constant numerical expression freq : frequency in Hz","title":"Usage"},{"location":"libs/oscillators/#osimptrain","text":"Alias-suppressed impulse train generator. Based on imptrainN(2) . imptrain is a standard Faust function.","title":"(os.)imptrain"},{"location":"libs/oscillators/#usage_41","text":"imptrain(freq) : _ Where: freq : frequency in Hz","title":"Usage"},{"location":"libs/oscillators/#ostrianglen","text":"Alias-suppressed triangle wave oscillator.","title":"(os.)triangleN"},{"location":"libs/oscillators/#usage_42","text":"triangleN(N,freq) : _ Where: N : order, as a constant numerical expression freq : frequency in Hz","title":"Usage"},{"location":"libs/oscillators/#ostriangle","text":"Alias-suppressed triangle wave oscillator. Based on triangleN(2) . triangle is a standard Faust function.","title":"(os.)triangle"},{"location":"libs/oscillators/#usage_43","text":"triangle(freq) : _ Where: freq : frequency in Hz","title":"Usage"},{"location":"libs/oscillators/#filter-based-oscillators","text":"Filter-Based Oscillators.","title":"Filter-Based Oscillators"},{"location":"libs/oscillators/#usage_44","text":"osc[b|rq|rs|rc|s](freq), where freq = frequency in Hz.","title":"Usage"},{"location":"libs/oscillators/#references_3","text":"http://lac.linuxaudio.org/2012/download/lac12-slides-jos.pdf https://ccrma.stanford.edu/~jos/pdf/lac12-paper-jos.pdf","title":"References"},{"location":"libs/oscillators/#ososcb","text":"Sinusoidal oscillator based on the biquad.","title":"(os.)oscb"},{"location":"libs/oscillators/#usage_45","text":"oscb(freq) : _ Where: freq : frequency in Hz","title":"Usage"},{"location":"libs/oscillators/#ososcrq","text":"Sinusoidal (sine and cosine) oscillator based on 2D vector rotation, = undamped \"coupled-form\" resonator = lossless 2nd-order normalized ladder filter.","title":"(os.)oscrq"},{"location":"libs/oscillators/#usage_46","text":"oscrq(freq) : _,_ Where: freq : frequency in Hz","title":"Usage"},{"location":"libs/oscillators/#reference_1","text":"https://ccrma.stanford.edu/~jos/pasp/Normalized_Scattering_Junctions.html","title":"Reference"},{"location":"libs/oscillators/#ososcrs","text":"Sinusoidal (sine) oscillator based on 2D vector rotation, = undamped \"coupled-form\" resonator = lossless 2nd-order normalized ladder filter.","title":"(os.)oscrs"},{"location":"libs/oscillators/#usage_47","text":"oscrs(freq) : _ Where: freq : frequency in Hz","title":"Usage"},{"location":"libs/oscillators/#reference_2","text":"https://ccrma.stanford.edu/~jos/pasp/Normalized_Scattering_Junctions.html","title":"Reference"},{"location":"libs/oscillators/#ososcrc","text":"Sinusoidal (cosine) oscillator based on 2D vector rotation, = undamped \"coupled-form\" resonator = lossless 2nd-order normalized ladder filter.","title":"(os.)oscrc"},{"location":"libs/oscillators/#usage_48","text":"oscrc(freq) : _ Where: freq : frequency in Hz","title":"Usage"},{"location":"libs/oscillators/#reference_3","text":"https://ccrma.stanford.edu/~jos/pasp/Normalized_Scattering_Junctions.html","title":"Reference"},{"location":"libs/oscillators/#ososcs","text":"Sinusoidal oscillator based on the state variable filter = undamped \"modified-coupled-form\" resonator = \"magic circle\" algorithm used in graphics.","title":"(os.)oscs"},{"location":"libs/oscillators/#usage_49","text":"oscs(freq) : _ Where: freq : frequency in Hz","title":"Usage"},{"location":"libs/oscillators/#osquadosc","text":"Sinusoidal oscillator based on QuadOsc by Martin Vicanek.","title":"(os.)quadosc"},{"location":"libs/oscillators/#usage_50","text":"quadosc(freq) : _ where freq : frequency in Hz","title":"Usage"},{"location":"libs/oscillators/#reference_4","text":"https://vicanek.de/articles/QuadOsc.pdf","title":"Reference"},{"location":"libs/oscillators/#waveguide-resonator-based-oscillators","text":"Sinusoidal oscillator based on the waveguide resonator wgr .","title":"Waveguide-Resonator-Based Oscillators"},{"location":"libs/oscillators/#ososcwc","text":"Sinusoidal oscillator based on the waveguide resonator wgr . Unit-amplitude cosine oscillator.","title":"(os.)oscwc"},{"location":"libs/oscillators/#usage_51","text":"oscwc(freq) : _ Where: freq : frequency in Hz","title":"Usage"},{"location":"libs/oscillators/#reference_5","text":"https://ccrma.stanford.edu/~jos/pasp/Digital_Waveguide_Oscillator.html","title":"Reference"},{"location":"libs/oscillators/#ososcws","text":"Sinusoidal oscillator based on the waveguide resonator wgr . Unit-amplitude sine oscillator.","title":"(os.)oscws"},{"location":"libs/oscillators/#usage_52","text":"oscws(freq) : _ Where: freq : frequency in Hz","title":"Usage"},{"location":"libs/oscillators/#reference_6","text":"https://ccrma.stanford.edu/~jos/pasp/Digital_Waveguide_Oscillator.html","title":"Reference"},{"location":"libs/oscillators/#ososcq","text":"Sinusoidal oscillator based on the waveguide resonator wgr . Unit-amplitude cosine and sine (quadrature) oscillator.","title":"(os.)oscq"},{"location":"libs/oscillators/#usage_53","text":"oscq(freq) : _,_ Where: freq : frequency in Hz","title":"Usage"},{"location":"libs/oscillators/#reference_7","text":"https://ccrma.stanford.edu/~jos/pasp/Digital_Waveguide_Oscillator.html","title":"Reference"},{"location":"libs/oscillators/#ososcw","text":"Sinusoidal oscillator based on the waveguide resonator wgr . Unit-amplitude cosine oscillator (default).","title":"(os.)oscw"},{"location":"libs/oscillators/#usage_54","text":"oscw(freq) : _ Where: freq : frequency in Hz","title":"Usage"},{"location":"libs/oscillators/#reference_8","text":"https://ccrma.stanford.edu/~jos/pasp/Digital_Waveguide_Oscillator.html","title":"Reference"},{"location":"libs/oscillators/#casio-cz-oscillators","text":"Oscillators that mimic some of the Casio CZ oscillators. There are two sets: a set with an index parameter a set with a res parameter The \"index oscillators\" outputs a sine wave at index=0 and gets brighter with a higher index. There are two versions of the \"index oscillators\": with P appended to the name: is phase aligned with fund:sin without P appended to the name: has the phase of the original CZ oscillators The \"res oscillators\" have a resonant frequency. \"res\" is the frequency of resonance as a factor of the fundamental pitch.","title":"Casio CZ Oscillators"},{"location":"libs/oscillators/#osczsaw","text":"Oscillator that mimics the Casio CZ saw oscillator. CZsaw is a standard Faust function.","title":"(os.)CZsaw"},{"location":"libs/oscillators/#usage_55","text":"CZsaw(fund,index) : _ Where: fund : a saw-tooth waveform between 0 and 1 that the oscillator slaves to index : the brightness of the oscillator, 0 to 1. 0 = sine-wave, 1 = saw-wave","title":"Usage"},{"location":"libs/oscillators/#osczsawp","text":"Oscillator that mimics the Casio CZ saw oscillator, with it's phase aligned to fund:sin . CZsawP is a standard Faust function.","title":"(os.)CZsawP"},{"location":"libs/oscillators/#usage_56","text":"CZsawP(fund,index) : _ Where: fund : a saw-tooth waveform between 0 and 1 that the oscillator slaves to index : the brightness of the oscillator, 0 to 1. 0 = sine-wave, 1 = saw-wave","title":"Usage"},{"location":"libs/oscillators/#osczsquare","text":"Oscillator that mimics the Casio CZ square oscillator CZsquare is a standard Faust function.","title":"(os.)CZsquare"},{"location":"libs/oscillators/#usage_57","text":"CZsquare(fund,index) : _ Where: fund : a saw-tooth waveform between 0 and 1 that the oscillator slaves to index : the brightness of the oscillator, 0 to 1. 0 = sine-wave, 1 = square-wave","title":"Usage"},{"location":"libs/oscillators/#osczsquarep","text":"Oscillator that mimics the Casio CZ square oscillator, with it's phase aligned to fund:sin . CZsquareP is a standard Faust function.","title":"(os.)CZsquareP"},{"location":"libs/oscillators/#usage_58","text":"CZsquareP(fund,index) : _ Where: fund : a saw-tooth waveform between 0 and 1 that the oscillator slaves to index : the brightness of the oscillator, 0 to 1. 0 = sine-wave, 1 = square-wave","title":"Usage"},{"location":"libs/oscillators/#osczpulse","text":"Oscillator that mimics the Casio CZ pulse oscillator. CZpulse is a standard Faust function.","title":"(os.)CZpulse"},{"location":"libs/oscillators/#usage_59","text":"CZpulse(fund,index) : _ Where: fund : a saw-tooth waveform between 0 and 1 that the oscillator slaves to index : the brightness of the oscillator, 0 gives a sine-wave, 1 is closer to a pulse","title":"Usage"},{"location":"libs/oscillators/#osczpulsep","text":"Oscillator that mimics the Casio CZ pulse oscillator, with it's phase aligned to fund:sin . CZpulseP is a standard Faust function.","title":"(os.)CZpulseP"},{"location":"libs/oscillators/#usage_60","text":"CZpulseP(fund,index) : _ Where: fund : a saw-tooth waveform between 0 and 1 that the oscillator slaves to index : the brightness of the oscillator, 0 gives a sine-wave, 1 is closer to a pulse","title":"Usage"},{"location":"libs/oscillators/#osczsinepulse","text":"Oscillator that mimics the Casio CZ sine/pulse oscillator. CZsinePulse is a standard Faust function.","title":"(os.)CZsinePulse"},{"location":"libs/oscillators/#usage_61","text":"CZsinePulse(fund,index) : _ Where: fund : a saw-tooth waveform between 0 and 1 that the oscillator slaves to index : the brightness of the oscillator, 0 gives a sine-wave, 1 is a sine minus a pulse","title":"Usage"},{"location":"libs/oscillators/#osczsinepulsep","text":"Oscillator that mimics the Casio CZ sine/pulse oscillator, with it's phase aligned to fund:sin . CZsinePulseP is a standard Faust function.","title":"(os.)CZsinePulseP"},{"location":"libs/oscillators/#usage_62","text":"CZsinePulseP(fund,index) : _ Where: fund : a saw-tooth waveform between 0 and 1 that the oscillator slaves to index : the brightness of the oscillator, 0 gives a sine-wave, 1 is a sine minus a pulse","title":"Usage"},{"location":"libs/oscillators/#osczhalfsine","text":"Oscillator that mimics the Casio CZ half sine oscillator. CZhalfSine is a standard Faust function.","title":"(os.)CZhalfSine"},{"location":"libs/oscillators/#usage_63","text":"CZhalfSine(fund,index) : _ Where: fund : a saw-tooth waveform between 0 and 1 that the oscillator slaves to index : the brightness of the oscillator, 0 gives a sine-wave, 1 is somewhere between a saw and a square","title":"Usage"},{"location":"libs/oscillators/#osczhalfsinep","text":"Oscillator that mimics the Casio CZ half sine oscillator, with it's phase aligned to fund:sin . CZhalfSineP is a standard Faust function.","title":"(os.)CZhalfSineP"},{"location":"libs/oscillators/#usage_64","text":"CZhalfSineP(fund,index) : _ Where: fund : a saw-tooth waveform between 0 and 1 that the oscillator slaves to index : the brightness of the oscillator, 0 gives a sine-wave, 1 is somewhere between a saw and a square","title":"Usage"},{"location":"libs/oscillators/#osczressaw","text":"Oscillator that mimics the Casio CZ resonant sawtooth oscillator. CZresSaw is a standard Faust function.","title":"(os.)CZresSaw"},{"location":"libs/oscillators/#usage_65","text":"CZresSaw(fund,res) : _ Where: fund : a saw-tooth waveform between 0 and 1 that the oscillator slaves to res : the frequency of resonance as a factor of the fundamental pitch.","title":"Usage"},{"location":"libs/oscillators/#osczrestriangle","text":"Oscillator that mimics the Casio CZ resonant triangle oscillator. CZresTriangle is a standard Faust function.","title":"(os.)CZresTriangle"},{"location":"libs/oscillators/#usage_66","text":"CZresTriangle(fund,res) : _ Where: fund : a saw-tooth waveform between 0 and 1 that the oscillator slaves to res : the frequency of resonance as a factor of the fundamental pitch.","title":"Usage"},{"location":"libs/oscillators/#osczrestrap","text":"Oscillator that mimics the Casio CZ resonant trapeze oscillator CZresTrap is a standard Faust function.","title":"(os.)CZresTrap"},{"location":"libs/oscillators/#usage_67","text":"CZresTrap(fund,res) : _ Where: fund : a saw-tooth waveform between 0 and 1 that the oscillator slaves to res : the frequency of resonance as a factor of the fundamental pitch.","title":"Usage"},{"location":"libs/oscillators/#polyblep-based-oscillators","text":"","title":"PolyBLEP-Based Oscillators"},{"location":"libs/oscillators/#ospolyblep","text":"PolyBLEP residual function, used for smoothing steps in the audio signal.","title":"(os.)polyblep"},{"location":"libs/oscillators/#usage_68","text":"polyblep(Q,phase) : _ Where: Q : smoothing factor between 0 and 0.5. Determines how far from the ends of the phase interval the quadratic function is used. phase : normalised phase (between 0 and 1)","title":"Usage"},{"location":"libs/oscillators/#ospolyblep_saw","text":"Sawtooth oscillator with suppressed aliasing (using polyblep ).","title":"(os.)polyblep_saw"},{"location":"libs/oscillators/#usage_69","text":"polyblep_saw(freq) : _ Where: freq : frequency in Hz","title":"Usage"},{"location":"libs/oscillators/#ospolyblep_square","text":"Square wave oscillator with suppressed aliasing (using polyblep ).","title":"(os.)polyblep_square"},{"location":"libs/oscillators/#usage_70","text":"polyblep_square(freq) : _ Where: freq : frequency in Hz","title":"Usage"},{"location":"libs/oscillators/#ospolyblep_triangle","text":"Triangle wave oscillator with suppressed aliasing (using polyblep ).","title":"(os.)polyblep_triangle"},{"location":"libs/oscillators/#usage_71","text":"polyblep_triangle(freq) : _ Where: freq : frequency in Hz","title":"Usage"},{"location":"libs/phaflangers/","text":"phaflangers.lib A library of phasor and flanger effects. Its official prefix is pf . References https://github.com/grame-cncm/faustlibraries/blob/master/phaflangers.lib Functions Reference (pf.)flanger_mono Mono flanging effect. Usage: _ : flanger_mono(dmax,curdel,depth,fb,invert) : _ Where: dmax : maximum delay-line length (power of 2) - 10 ms typical curdel : current dynamic delay (not to exceed dmax) depth : effect strength between 0 and 1 (1 typical) fb : feedback gain between 0 and 1 (0 typical) invert : 0 for normal, 1 to invert sign of flanging sum Reference https://ccrma.stanford.edu/~jos/pasp/Flanging.html (pf.)flanger_stereo Stereo flanging effect. flanger_stereo is a standard Faust function. Usage: _,_ : flanger_stereo(dmax,curdel1,curdel2,depth,fb,invert) : _,_ Where: dmax : maximum delay-line length (power of 2) - 10 ms typical curdel1 : current dynamic delay for the left channel (not to exceed dmax) curdel2 : current dynamic delay for the right channel (not to exceed dmax) depth : effect strength between 0 and 1 (1 typical) fb : feedback gain between 0 and 1 (0 typical) invert : 0 for normal, 1 to invert sign of flanging sum Reference https://ccrma.stanford.edu/~jos/pasp/Flanging.html (pf.)phaser2_mono Mono phasing effect. Phaser _ : phaser2_mono(Notches,phase,width,frqmin,fratio,frqmax,speed,depth,fb,invert) : _ Where: Notches : number of spectral notches (MACRO ARGUMENT - not a signal) phase : phase of the oscillator (0-1) width : approximate width of spectral notches in Hz frqmin : approximate minimum frequency of first spectral notch in Hz fratio : ratio of adjacent notch frequencies frqmax : approximate maximum frequency of first spectral notch in Hz speed : LFO frequency in Hz (rate of periodic notch sweep cycles) depth : effect strength between 0 and 1 (1 typical) (aka \"intensity\") when depth=2, \"vibrato mode\" is obtained (pure allpass chain) fb : feedback gain between -1 and 1 (0 typical) invert : 0 for normal, 1 to invert sign of flanging sum Reference: https://ccrma.stanford.edu/~jos/pasp/Phasing.html http://www.geofex.com/Article_Folders/phasers/phase.html 'An Allpass Approach to Digital Phasing and Flanging', Julius O. Smith III, CCRMA Tech. Report STAN-M-21: https://ccrma.stanford.edu/STANM/stanms/stanm21/ (pf.)phaser2_stereo Stereo phasing effect. phaser2_stereo is a standard Faust function. Phaser _,_ : phaser2_stereo(Notches,width,frqmin,fratio,frqmax,speed,depth,fb,invert) : _,_ Where: Notches : number of spectral notches (MACRO ARGUMENT - not a signal) width : approximate width of spectral notches in Hz frqmin : approximate minimum frequency of first spectral notch in Hz fratio : ratio of adjacent notch frequencies frqmax : approximate maximum frequency of first spectral notch in Hz speed : LFO frequency in Hz (rate of periodic notch sweep cycles) depth : effect strength between 0 and 1 (1 typical) (aka \"intensity\") when depth=2, \"vibrato mode\" is obtained (pure allpass chain) fb : feedback gain between -1 and 1 (0 typical) invert : 0 for normal, 1 to invert sign of flanging sum Reference: https://ccrma.stanford.edu/~jos/pasp/Phasing.html http://www.geofex.com/Article_Folders/phasers/phase.html 'An Allpass Approach to Digital Phasing and Flanging', Julius O. Smith III, CCRMA Tech. Report STAN-M-21: https://ccrma.stanford.edu/STANM/stanms/stanm21/","title":" phaflangers "},{"location":"libs/phaflangers/#phaflangerslib","text":"A library of phasor and flanger effects. Its official prefix is pf .","title":"phaflangers.lib"},{"location":"libs/phaflangers/#references","text":"https://github.com/grame-cncm/faustlibraries/blob/master/phaflangers.lib","title":"References"},{"location":"libs/phaflangers/#functions-reference","text":"","title":"Functions Reference"},{"location":"libs/phaflangers/#pfflanger_mono","text":"Mono flanging effect.","title":"(pf.)flanger_mono"},{"location":"libs/phaflangers/#usage","text":"_ : flanger_mono(dmax,curdel,depth,fb,invert) : _ Where: dmax : maximum delay-line length (power of 2) - 10 ms typical curdel : current dynamic delay (not to exceed dmax) depth : effect strength between 0 and 1 (1 typical) fb : feedback gain between 0 and 1 (0 typical) invert : 0 for normal, 1 to invert sign of flanging sum","title":"Usage:"},{"location":"libs/phaflangers/#reference","text":"https://ccrma.stanford.edu/~jos/pasp/Flanging.html","title":"Reference"},{"location":"libs/phaflangers/#pfflanger_stereo","text":"Stereo flanging effect. flanger_stereo is a standard Faust function.","title":"(pf.)flanger_stereo"},{"location":"libs/phaflangers/#usage_1","text":"_,_ : flanger_stereo(dmax,curdel1,curdel2,depth,fb,invert) : _,_ Where: dmax : maximum delay-line length (power of 2) - 10 ms typical curdel1 : current dynamic delay for the left channel (not to exceed dmax) curdel2 : current dynamic delay for the right channel (not to exceed dmax) depth : effect strength between 0 and 1 (1 typical) fb : feedback gain between 0 and 1 (0 typical) invert : 0 for normal, 1 to invert sign of flanging sum","title":"Usage:"},{"location":"libs/phaflangers/#reference_1","text":"https://ccrma.stanford.edu/~jos/pasp/Flanging.html","title":"Reference"},{"location":"libs/phaflangers/#pfphaser2_mono","text":"Mono phasing effect.","title":"(pf.)phaser2_mono"},{"location":"libs/phaflangers/#phaser","text":"_ : phaser2_mono(Notches,phase,width,frqmin,fratio,frqmax,speed,depth,fb,invert) : _ Where: Notches : number of spectral notches (MACRO ARGUMENT - not a signal) phase : phase of the oscillator (0-1) width : approximate width of spectral notches in Hz frqmin : approximate minimum frequency of first spectral notch in Hz fratio : ratio of adjacent notch frequencies frqmax : approximate maximum frequency of first spectral notch in Hz speed : LFO frequency in Hz (rate of periodic notch sweep cycles) depth : effect strength between 0 and 1 (1 typical) (aka \"intensity\") when depth=2, \"vibrato mode\" is obtained (pure allpass chain) fb : feedback gain between -1 and 1 (0 typical) invert : 0 for normal, 1 to invert sign of flanging sum Reference: https://ccrma.stanford.edu/~jos/pasp/Phasing.html http://www.geofex.com/Article_Folders/phasers/phase.html 'An Allpass Approach to Digital Phasing and Flanging', Julius O. Smith III, CCRMA Tech. Report STAN-M-21: https://ccrma.stanford.edu/STANM/stanms/stanm21/","title":"Phaser"},{"location":"libs/phaflangers/#pfphaser2_stereo","text":"Stereo phasing effect. phaser2_stereo is a standard Faust function.","title":"(pf.)phaser2_stereo"},{"location":"libs/phaflangers/#phaser_1","text":"_,_ : phaser2_stereo(Notches,width,frqmin,fratio,frqmax,speed,depth,fb,invert) : _,_ Where: Notches : number of spectral notches (MACRO ARGUMENT - not a signal) width : approximate width of spectral notches in Hz frqmin : approximate minimum frequency of first spectral notch in Hz fratio : ratio of adjacent notch frequencies frqmax : approximate maximum frequency of first spectral notch in Hz speed : LFO frequency in Hz (rate of periodic notch sweep cycles) depth : effect strength between 0 and 1 (1 typical) (aka \"intensity\") when depth=2, \"vibrato mode\" is obtained (pure allpass chain) fb : feedback gain between -1 and 1 (0 typical) invert : 0 for normal, 1 to invert sign of flanging sum Reference: https://ccrma.stanford.edu/~jos/pasp/Phasing.html http://www.geofex.com/Article_Folders/phasers/phase.html 'An Allpass Approach to Digital Phasing and Flanging', Julius O. Smith III, CCRMA Tech. Report STAN-M-21: https://ccrma.stanford.edu/STANM/stanms/stanm21/","title":"Phaser"},{"location":"libs/physmodels/","text":"physmodels.lib Faust physical modeling library. Its official prefix is pm . This library provides an environment to facilitate physical modeling of musical instruments. It contains dozens of functions implementing low and high level elements going from a simple waveguide to fully operational models with built-in UI, etc. It is organized as follows: Global Variables : useful pre-defined variables for physical modeling (e.g., speed of sound, etc.). Conversion Tools : conversion functions specific to physical modeling (e.g., length to frequency, etc.). Bidirectional Utilities : functions to create bidirectional block diagrams for physical modeling. Basic Elements : waveguides, specific types of filters, etc. String Instruments : various types of strings (e.g., steel, nylon, etc.), bridges, guitars, etc. Bowed String Instruments : parts and models specific to bowed string instruments (e.g., bows, bridges, violins, etc.). Wind Instrument : parts and models specific to wind instruments (e.g., reeds, mouthpieces, flutes, clarinets, etc.). Exciters : pluck generators, \"blowers\", etc. Modal Percussions : percussion instruments based on modal models. Vocal Synthesis : functions for various vocal synthesis techniques (e.g., fof, source/filter, etc.) and vocal synthesizers. Misc Functions : any other functions that don't fit in the previous category (e.g., nonlinear filters, etc.). This library is part of the Faust Physical Modeling ToolKit. More information on how to use this library can be found on this page . Tutorials on how to make physical models of musical instruments using Faust can be found here as well. References https://github.com/grame-cncm/faustlibraries/blob/master/physmodels.lib Global Variables Useful pre-defined variables for physical modeling. (pm.)speedOfSound Speed of sound in meters per second (340m/s). (pm.)maxLength The default maximum length (3) in meters of strings and tubes used in this library. This variable should be overriden to allow longer strings or tubes. Conversion Tools Useful conversion tools for physical modeling. (pm.)f2l Frequency to length in meters. Usage f2l(freq) : distanceInMeters Where: freq : the frequency (pm.)l2f Length in meters to frequency. Usage l2f(length) : freq Where: length : length/distance in meters (pm.)l2s Length in meters to number of samples. Usage l2s(l) : numberOfSamples Where: l : length in meters Bidirectional Utilities Set of fundamental functions to create bi-directional block diagrams in Faust. These elements are used as the basis of this library to connect high level elements (e.g., mouthpieces, strings, bridge, instrument body, etc.). Each block has 3 inputs and 3 outputs. The first input/output carry left going waves, the second input/output carry right going waves, and the third input/output is used to carry any potential output signal to the end of the algorithm. (pm.)basicBlock Empty bidirectional block to be used with chain : 3 signals ins and 3 signals out. Usage chain(basicBlock : basicBlock : etc.) (pm.)chain Creates a chain of bidirectional blocks. Blocks must have 3 inputs and outputs. The first input/output carry left going waves, the second input/output carry right going waves, and the third input/output is used to carry any potential output signal to the end of the algorithm. The implied one sample delay created by the ~ operator is generalized to the left and right going waves. Thus, n blocks in chain() will add an n samples delay to both left and right going waves. Usage leftGoingWaves,rightGoingWaves,mixedOutput : chain( A : B ) : leftGoingWaves,rightGoingWaves,mixedOutput with{ A = _,_,_; }; (pm.)inLeftWave Adds a signal to left going waves anywhere in a chain of blocks. Usage model(x) = chain(A : inLeftWave(x) : B) Where A and B are bidirectional blocks and x is the signal added to left going waves in that chain. (pm.)inRightWave Adds a signal to right going waves anywhere in a chain of blocks. Usage model(x) = chain(A : inRightWave(x) : B) Where A and B are bidirectional blocks and x is the signal added to right going waves in that chain. (pm.)in Adds a signal to left and right going waves anywhere in a chain of blocks. Usage model(x) = chain(A : in(x) : B) Where A and B are bidirectional blocks and x is the signal added to left and right going waves in that chain. (pm.)outLeftWave Sends the signal of left going waves to the output channel of the chain . Usage chain(A : outLeftWave : B) Where A and B are bidirectional blocks. (pm.)outRightWave Sends the signal of right going waves to the output channel of the chain . Usage chain(A : outRightWave : B) Where A and B are bidirectional blocks. (pm.)out Sends the signal of right and left going waves to the output channel of the chain . Usage chain(A : out : B) Where A and B are bidirectional blocks. (pm.)terminations Creates terminations on both sides of a chain without closing the inputs and outputs of the bidirectional signals chain. As for chain , this function adds a 1 sample delay to the bidirectional signal, both ways. Of course, this function can be nested within a chain . Usage terminations(a,b,c) with{ }; (pm.)lTermination Creates a termination on the left side of a chain without closing the inputs and outputs of the bidirectional signals chain. This function adds a 1 sample delay near the termination and can be nested within another chain . Usage lTerminations(a,b) with{ }; (pm.)rTermination Creates a termination on the right side of a chain without closing the inputs and outputs of the bidirectional signals chain. This function adds a 1 sample delay near the termination and can be nested within another chain . Usage rTerminations(b,c) with{ }; (pm.)closeIns Closes the inputs of a bidirectional chain in all directions. Usage closeIns : chain(...) : _,_,_ (pm.)closeOuts Closes the outputs of a bidirectional chain in all directions except for the main signal output (3d output). Usage _,_,_ : chain(...) : _ (pm.)endChain Closes the inputs and outputs of a bidirectional chain in all directions except for the main signal output (3d output). Usage endChain(chain(...)) : _ Basic Elements Basic elements for physical modeling (e.g., waveguides, specific filters, etc.). (pm.)waveguideN A series of waveguide functions based on various types of delays (see fdelay[n] ). List of functions waveguideUd : unit delay waveguide waveguideFd : fractional delay waveguide waveguideFd2 : second order fractional delay waveguide waveguideFd4 : fourth order fractional delay waveguide Usage chain(A : waveguideUd(nMax,n) : B) Where: nMax : the maximum length of the delays in the waveguide n : the length of the delay lines in samples. (pm.)waveguide Standard pm.lib waveguide (based on waveguideFd4 ). Usage chain(A : waveguide(nMax,n) : B) Where: nMax : the maximum length of the delays in the waveguide n : the length of the delay lines in samples. (pm.)bridgeFilter Generic two zeros bridge FIR filter (as implemented in the STK ) that can be used to implement the reflectance violin, guitar, etc. bridges. Usage _ : bridge(brightness,absorption) : _ Where: brightness : controls the damping of high frequencies (0-1) absorption : controls the absorption of the brige and thus the t60 of the string plugged to it (0-1) (1 = 20 seconds) (pm.)modeFilter Resonant bandpass filter that can be used to implement a single resonance (mode). Usage _ : modeFilter(freq,t60,gain) : _ Where: freq : mode frequency t60 : mode resonance duration (in seconds) gain : mode gain (0-1) String Instruments Low and high level string instruments parts. Most of the elements in this section can be used in a bidirectional chain. (pm.)stringSegment A string segment without terminations (just a simple waveguide). Usage chain(A : stringSegment(maxLength,length) : B) Where: maxLength : the maximum length of the string in meters (should be static) length : the length of the string in meters (pm.)openString A bidirectional block implementing a basic \"generic\" string with a selectable excitation position. Lowpass filters are built-in and allow to simulate the effect of dispersion on the sound and thus to change the \"stiffness\" of the string. Usage chain(... : openString(length,stiffness,pluckPosition,excitation) : ...) Where: length : the length of the string in meters stiffness : the stiffness of the string (0-1) (1 for max stiffness) pluckPosition : excitation position (0-1) (1 is bottom) excitation : the excitation signal (pm.)nylonString A bidirectional block implementing a basic nylon string with selectable excitation position. This element is based on openString and has a fix stiffness corresponding to that of a nylon string. Usage chain(... : nylonString(length,pluckPosition,excitation) : ...) Where: length : the length of the string in meters pluckPosition : excitation position (0-1) (1 is bottom) excitation : the excitation signal (pm.)steelString A bidirectional block implementing a basic steel string with selectable excitation position. This element is based on openString and has a fix stiffness corresponding to that of a steel string. Usage chain(... : steelString(length,pluckPosition,excitation) : ...) Where: length : the length of the string in meters pluckPosition : excitation position (0-1) (1 is bottom) excitation : the excitation signal (pm.)openStringPick A bidirectional block implementing a \"generic\" string with selectable excitation position. It also has a built-in pickup whose position is the same as the excitation position. Thus, moving the excitation position will also move the pickup. Usage chain(... : openStringPick(length,stiffness,pluckPosition,excitation) : ...) Where: length : the length of the string in meters stiffness : the stiffness of the string (0-1) (1 for max stiffness) pluckPosition : excitation position (0-1) (1 is bottom) excitation : the excitation signal (pm.)openStringPickUp A bidirectional block implementing a \"generic\" string with selectable excitation position and stiffness. It also has a built-in pickup whose position can be independenly selected. The only constraint is that the pickup has to be placed after the excitation position. Usage chain(... : openStringPickUp(length,stiffness,pluckPosition,excitation) : ...) Where: length : the length of the string in meters stiffness : the stiffness of the string (0-1) (1 for max stiffness) pluckPosition : pluck position between the top of the string and the pickup (0-1) (1 for same as pickup position) pickupPosition : position of the pickup on the string (0-1) (1 is bottom) excitation : the excitation signal (pm.)openStringPickDown A bidirectional block implementing a \"generic\" string with selectable excitation position and stiffness. It also has a built-in pickup whose position can be independenly selected. The only constraint is that the pickup has to be placed before the excitation position. Usage chain(... : openStringPickDown(length,stiffness,pluckPosition,excitation) : ...) Where: length : the length of the string in meters stiffness : the stiffness of the string (0-1) (1 for max stiffness) pluckPosition : pluck position on the string (0-1) (1 is bottom) pickupPosition : position of the pickup between the top of the string and the excitation position (0-1) (1 is excitation position) excitation : the excitation signal (pm.)ksReflexionFilter The \"typical\" one-zero Karplus-strong feedforward reflexion filter. This filter will be typically used in a termination (see below). Usage terminations(_,chain(...),ksReflexionFilter) (pm.)rStringRigidTermination Bidirectional block implementing a right rigid string termination (no damping, just phase inversion). Usage chain(rStringRigidTermination : stringSegment : ...) (pm.)lStringRigidTermination Bidirectional block implementing a left rigid string termination (no damping, just phase inversion). Usage chain(... : stringSegment : lStringRigidTermination) (pm.)elecGuitarBridge Bidirectional block implementing a simple electric guitar bridge. This block is based on bridgeFilter . The bridge doesn't implement transmittance since it is not meant to be connected to a body (unlike acoustic guitar). It also partially sets the resonance duration of the string with the nuts used on the other side. Usage chain(... : stringSegment : elecGuitarBridge) (pm.)elecGuitarNuts Bidirectional block implementing a simple electric guitar nuts. This block is based on bridgeFilter and does essentially the same thing as elecGuitarBridge , but on the other side of the chain. It also partially sets the resonance duration of the string with the bridge used on the other side. Usage chain(elecGuitarNuts : stringSegment : ...) (pm.)guitarBridge Bidirectional block implementing a simple acoustic guitar bridge. This bridge damps more hight frequencies than elecGuitarBridge and implements a transmittance filter. It also partially sets the resonance duration of the string with the nuts used on the other side. Usage chain(... : stringSegment : guitarBridge) (pm.)guitarNuts Bidirectional block implementing a simple acoustic guitar nuts. This nuts damps more hight frequencies than elecGuitarNuts and implements a transmittance filter. It also partially sets the resonance duration of the string with the bridge used on the other side. Usage chain(guitarNuts : stringSegment : ...) (pm.)idealString An \"ideal\" string with rigid terminations and where the plucking position and the pick-up position are the same. Since terminations are rigid, this string will ring forever. Usage 1-1' : idealString(length,reflexion,xPosition,excitation) With: * length : the length of the string in meters * pluckPosition : the plucking position (0.001-0.999) * excitation : the input signal for the excitation. (pm.)ks A Karplus-Strong string (in that case, the string is implemented as a one dimension waveguide). Usage ks(length,damping,excitation) : _ Where: length : the length of the string in meters damping : string damping (0-1) excitation : excitation signal (pm.)ks_ui_MIDI Ready-to-use, MIDI-enabled Karplus-Strong string with buil-in UI. Usage ks_ui_MIDI : _ (pm.)elecGuitarModel A simple electric guitar model (without audio effects, of course) with selectable pluck position. This model implements a single string. Additional strings should be created by making a polyphonic application out of this function. Pitch is changed by changing the length of the string and not through a finger model. Usage elecGuitarModel(length,pluckPosition,mute,excitation) : _ Where: length : the length of the string in meters pluckPosition : pluck position (0-1) (1 is on the bridge) mute : mute coefficient (1 for no mute and 0 for instant mute) excitation : excitation signal (pm.)elecGuitar A simple electric guitar model with steel strings (based on elecGuitarModel ) implementing an excitation model. This model implements a single string. Additional strings should be created by making a polyphonic application out of this function. Usage elecGuitar(length,pluckPosition,trigger) : _ Where: length : the length of the string in meters pluckPosition : pluck position (0-1) (1 is on the bridge) mute : mute coefficient (1 for no mute and 0 for instant mute) gain : gain of the pluck (0-1) trigger : trigger signal (1 for on, 0 for off) (pm.)elecGuitar_ui_MIDI Ready-to-use MIDI-enabled electric guitar physical model with built-in UI. Usage elecGuitar_ui_MIDI : _ (pm.)guitarBody WARNING: not implemented yet! Bidirectional block implementing a simple acoustic guitar body. Usage chain(... : guitarBody) (pm.)guitarModel A simple acoustic guitar model with steel strings and selectable excitation position. This model implements a single string. Additional strings should be created by making a polyphonic application out of this function. Pitch is changed by changing the length of the string and not through a finger model. WARNING: this function doesn't currently implement a body (just strings and bridge). Usage guitarModel(length,pluckPosition,excitation) : _ Where: length : the length of the string in meters pluckPosition : pluck position (0-1) (1 is on the bridge) excitation : excitation signal (pm.)guitar A simple acoustic guitar model with steel strings (based on guitarModel ) implementing an excitation model. This model implements a single string. Additional strings should be created by making a polyphonic application out of this function. Usage guitar(length,pluckPosition,trigger) : _ Where: length : the length of the string in meters pluckPosition : pluck position (0-1) (1 is on the bridge) gain : gain of the excitation trigger : trigger signal (1 for on, 0 for off) (pm.)guitar_ui_MIDI Ready-to-use MIDI-enabled steel strings acoustic guitar physical model with built-in UI. Usage guitar_ui_MIDI : _ (pm.)nylonGuitarModel A simple acoustic guitar model with nylon strings and selectable excitation position. This model implements a single string. Additional strings should be created by making a polyphonic application out of this function. Pitch is changed by changing the length of the string and not through a finger model. WARNING: this function doesn't currently implement a body (just strings and bridge). Usage nylonGuitarModel(length,pluckPosition,excitation) : _ Where: length : the length of the string in meters pluckPosition : pluck position (0-1) (1 is on the bridge) excitation : excitation signal (pm.)nylonGuitar A simple acoustic guitar model with nylon strings (based on nylonGuitarModel ) implementing an excitation model. This model implements a single string. Additional strings should be created by making a polyphonic application out of this function. Usage nylonGuitar(length,pluckPosition,trigger) : _ Where: length : the length of the string in meters pluckPosition : pluck position (0-1) (1 is on the bridge) gain : gain of the excitation (0-1) trigger : trigger signal (1 for on, 0 for off) (pm.)nylonGuitar_ui_MIDI Ready-to-use MIDI-enabled nylon strings acoustic guitar physical model with built-in UI. Usage nylonGuitar_ui_MIDI : _ (pm.)modeInterpRes Modular string instrument resonator based on IR measurements made on 3D printed models. The 2D space allowing for the control of the shape and the scale of the model is enabled by interpolating between modes parameters. More information about this technique/project can be found here: * https://ccrma.stanford.edu/~rmichon/3dPrintingModeling/ . Usage _ : modeInterpRes(nModes,x,y) : _ Where: nModes : number of modeled modes (40 max) x : shape of the resonator (0: square, 1: square with rounded corners, 2: round) y : scale of the resonator (0: small, 1: medium, 2: large) (pm.)modularInterpBody Bidirectional block implementing a modular string instrument resonator (see modeInterpRes ). Usage chain(... : modularInterpBody(nModes,shape,scale) : ...) Where: nModes : number of modeled modes (40 max) shape : shape of the resonator (0: square, 1: square with rounded corners, 2: round) scale : scale of the resonator (0: small, 1: medium, 2: large) (pm.)modularInterpStringModel String instrument model with a modular body (see modeInterpRes and * https://ccrma.stanford.edu/~rmichon/3dPrintingModeling/ ). Usage modularInterpStringModel(length,pluckPosition,shape,scale,bodyExcitation,stringExcitation) : _ Where: stringLength : the length of the string in meters pluckPosition : pluck position (0-1) (1 is on the bridge) shape : shape of the resonator (0: square, 1: square with rounded corners, 2: round) scale : scale of the resonator (0: small, 1: medium, 2: large) bodyExcitation : excitation signal for the body stringExcitation : excitation signal for the string (pm.)modularInterpInstr String instrument with a modular body (see modeInterpRes and * https://ccrma.stanford.edu/~rmichon/3dPrintingModeling/ ). Usage modularInterpInstr(stringLength,pluckPosition,shape,scale,gain,tapBody,triggerString) : _ Where: stringLength : the length of the string in meters pluckPosition : pluck position (0-1) (1 is on the bridge) shape : shape of the resonator (0: square, 1: square with rounded corners, 2: round) scale : scale of the resonator (0: small, 1: medium, 2: large) gain : of the string excitation tapBody : send an impulse in the body of the instrument where the string is connected (1 for on, 0 for off) triggerString : trigger signal for the string (1 for on, 0 for off) (pm.)modularInterpInstr_ui_MIDI Ready-to-use MIDI-enabled string instrument with a modular body (see modeInterpRes and * https://ccrma.stanford.edu/~rmichon/3dPrintingModeling/ ) with built-in UI. Usage modularInterpInstr_ui_MIDI : _ Bowed String Instruments Low and high level basic string instruments parts. Most of the elements in this section can be used in a bidirectional chain. (pm.)bowTable Extremely basic bow table that can be used to implement a wide range of bow types for many different bowed string instruments (violin, cello, etc.). Usage excitation : bowTable(offeset,slope) : _ Where: excitation : an excitation signal offset : table offset slope : table slope (pm.)violinBowTable Violin bow table based on bowTable . Usage bowVelocity : violinBowTable(bowPressure) : _ Where: bowVelocity : velocity of the bow/excitation signal (0-1) bowPressure : bow pressure on the string (0-1) (pm.)bowInteraction Bidirectional block implementing the interaction of a bow in a chain . Usage chain(... : stringSegment : bowInteraction(bowTable) : stringSegment : ...) Where: bowTable : the bow table (pm.)violinBow Bidirectional block implementing a violin bow and its interaction with a string. Usage chain(... : stringSegment : violinBow(bowPressure,bowVelocity) : stringSegment : ...) Where: bowVelocity : velocity of the bow / excitation signal (0-1) bowPressure : bow pressure on the string (0-1) (pm.)violinBowedString Violin bowed string bidirectional block with controllable bow position. Terminations are not implemented in this model. Usage chain(nuts : violinBowedString(stringLength,bowPressure,bowVelocity,bowPosition) : bridge) Where: stringLength : the length of the string in meters bowVelocity : velocity of the bow / excitation signal (0-1) bowPressure : bow pressure on the string (0-1) bowPosition : the position of the bow on the string (0-1) (pm.)violinNuts Bidirectional block implementing simple violin nuts. This function is based on bridgeFilter . Usage chain(violinNuts : stringSegment : ...) (pm.)violinBridge Bidirectional block implementing a simple violin bridge. This function is based on bridgeFilter . Usage chain(... : stringSegment : violinBridge (pm.)violinBody Bidirectional block implementing a simple violin body (just a simple resonant lowpass filter). Usage chain(... : stringSegment : violinBridge : violinBody) (pm.)violinModel Ready-to-use simple violin physical model. This model implements a single string. Additional strings should be created by making a polyphonic application out of this function. Pitch is changed by changing the length of the string (and not through a finger model). Usage violinModel(stringLength,bowPressure,bowVelocity,bridgeReflexion, bridgeAbsorption,bowPosition) : _ Where: stringLength : the length of the string in meters bowVelocity : velocity of the bow / excitation signal (0-1) bowPressure : bow pressure on the string (0-1)) bowPosition : the position of the bow on the string (0-1) (pm.)violin_ui Ready-to-use violin physical model with built-in UI. Usage violinModel_ui : _ (pm.)violin_ui_MIDI Ready-to-use MIDI-enabled violin physical model with built-in UI. Usage violin_ui_MIDI : _ Wind Instruments Low and high level basic wind instruments parts. Most of the elements in this section can be used in a bidirectional chain. (pm.)openTube A tube segment without terminations (same as stringSegment ). Usage chain(A : openTube(maxLength,length) : B) Where: maxLength : the maximum length of the tube in meters (should be static) length : the length of the tube in meters (pm.)reedTable Extremely basic reed table that can be used to implement a wide range of single reed types for many different instruments (saxophone, clarinet, etc.). Usage excitation : reedTable(offeset,slope) : _ Where: excitation : an excitation signal offset : table offset slope : table slope (pm.)fluteJetTable Extremely basic flute jet table. Usage excitation : fluteJetTable : _ Where: excitation : an excitation signal (pm.)brassLipsTable Simple brass lips/mouthpiece table. Since this implementation is very basic and that the lips and tube of the instrument are coupled to each other, the length of that tube must be provided here. Usage excitation : brassLipsTable(tubeLength,lipsTension) : _ Where: excitation : an excitation signal (can be DC) tubeLength : length in meters of the tube connected to the mouthpiece lipsTension : tension of the lips (0-1) (default: 0.5) (pm.)clarinetReed Clarinet reed based on reedTable with controllable stiffness. Usage excitation : clarinetReed(stiffness) : _ Where: excitation : an excitation signal stiffness : reed stiffness (0-1) (pm.)clarinetMouthPiece Bidirectional block implementing a clarinet mouthpiece as well as the various interactions happening with traveling waves. This element is ready to be plugged to a tube... Usage chain(clarinetMouthPiece(reedStiffness,pressure) : tube : etc.) Where: pressure : the pressure of the air flow (DC) created by the virtual performer (0-1). This can also be any kind of signal that will directly injected in the mouthpiece (e.g., breath noise, etc.). reedStiffness : reed stiffness (0-1) (pm.)brassLips Bidirectional block implementing a brass mouthpiece as well as the various interactions happening with traveling waves. This element is ready to be plugged to a tube... Usage chain(brassLips(tubeLength,lipsTension,pressure) : tube : etc.) Where: tubeLength : length in meters of the tube connected to the mouthpiece lipsTension : tension of the lips (0-1) (default: 0.5) pressure : the pressure of the air flow (DC) created by the virtual performer (0-1). This can also be any kind of signal that will directly injected in the mouthpiece (e.g., breath noise, etc.). (pm.)fluteEmbouchure Bidirectional block implementing a flute embouchure as well as the various interactions happening with traveling waves. This element is ready to be plugged between tubes segments... Usage chain(... : tube : fluteEmbouchure(pressure) : tube : etc.) Where: pressure : the pressure of the air flow (DC) created by the virtual performer (0-1). This can also be any kind of signal that will directly injected in the mouthpiece (e.g., breath noise, etc.). (pm.)wBell Generic wind instrument bell bidirectional block that should be placed at the end of a chain . Usage chain(... : wBell(opening)) Where: opening : the \"opening\" of bell (0-1) (pm.)fluteHead Simple flute head implementing waves reflexion. Usage chain(fluteHead : tube : ...) (pm.)fluteFoot Simple flute foot implementing waves reflexion and dispersion. Usage chain(... : tube : fluteFoot) (pm.)clarinetModel A simple clarinet physical model without tone holes (pitch is changed by changing the length of the tube of the instrument). Usage clarinetModel(length,pressure,reedStiffness,bellOpening) : _ Where: tubeLength : the length of the tube in meters pressure : the pressure of the air flow created by the virtual performer (0-1). This can also be any kind of signal that will directly injected in the mouthpiece (e.g., breath noise, etc.). reedStiffness : reed stiffness (0-1) bellOpening : the opening of bell (0-1) (pm.)clarinetModel_ui Same as clarinetModel but with a built-in UI. This function doesn't implement a virtual \"blower\", thus pressure remains an argument here. Usage clarinetModel_ui(pressure) : _ Where: pressure : the pressure of the air flow created by the virtual performer (0-1). This can also be any kind of signal that will be directly injected in the mouthpiece (e.g., breath noise, etc.). (pm.)clarinet_ui Ready-to-use clarinet physical model with built-in UI based on clarinetModel . Usage clarinet_ui : _ (pm.)clarinet_ui_MIDI Ready-to-use MIDI compliant clarinet physical model with built-in UI. Usage clarinet_ui_MIDI : _ (pm.)brassModel A simple generic brass instrument physical model without pistons (pitch is changed by changing the length of the tube of the instrument). This model is kind of hard to control and might not sound very good if bad parameters are given to it... Usage brassModel(tubeLength,lipsTension,mute,pressure) : _ Where: tubeLength : the length of the tube in meters lipsTension : tension of the lips (0-1) (default: 0.5) mute : mute opening at the end of the instrument (0-1) (default: 0.5) pressure : the pressure of the air flow created by the virtual performer (0-1). This can also be any kind of signal that will directly injected in the mouthpiece (e.g., breath noise, etc.). (pm.)brassModel_ui Same as brassModel but with a built-in UI. This function doesn't implement a virtual \"blower\", thus pressure remains an argument here. Usage brassModel_ui(pressure) : _ Where: pressure : the pressure of the air flow created by the virtual performer (0-1). This can also be any kind of signal that will be directly injected in the mouthpiece (e.g., breath noise, etc.). (pm.)brass_ui Ready-to-use brass instrument physical model with built-in UI based on brassModel . Usage brass_ui : _ (pm.)brass_ui_MIDI Ready-to-use MIDI-controllable brass instrument physical model with built-in UI. Usage brass_ui_MIDI : _ (pm.)fluteModel A simple generic flute instrument physical model without tone holes (pitch is changed by changing the length of the tube of the instrument). Usage fluteModel(tubeLength,mouthPosition,pressure) : _ Where: tubeLength : the length of the tube in meters mouthPosition : position of the mouth on the embouchure (0-1) (default: 0.5) pressure : the pressure of the air flow created by the virtual performer (0-1). This can also be any kind of signal that will directly injected in the mouthpiece (e.g., breath noise, etc.). (pm.)fluteModel_ui Same as fluteModel but with a built-in UI. This function doesn't implement a virtual \"blower\", thus pressure remains an argument here. Usage fluteModel_ui(pressure) : _ Where: pressure : the pressure of the air flow created by the virtual performer (0-1). This can also be any kind of signal that will be directly injected in the mouthpiece (e.g., breath noise, etc.). (pm.)flute_ui Ready-to-use flute physical model with built-in UI based on fluteModel . Usage flute_ui : _ (pm.)flute_ui_MIDI Ready-to-use MIDI-controllable flute physical model with built-in UI. Usage flute_ui_MIDI : _ Exciters Various kind of excitation signal generators. (pm.)impulseExcitation Creates an impulse excitation of one sample. Usage gate = button('gate'); impulseExcitation(gate) : chain; Where: gate : a gate button (pm.)strikeModel Creates a filtered noise excitation. Usage gate = button('gate'); strikeModel(LPcutoff,HPcutoff,sharpness,gain,gate) : chain; Where: HPcutoff : highpass cutoff frequency LPcutoff : lowpass cutoff frequency sharpness : sharpness of the attack and release (0-1) gain : gain of the excitation gate : a gate button/trigger signal (0/1) (pm.)strike Strikes generator with controllable excitation position. Usage gate = button('gate'); strike(exPos,sharpness,gain,gate) : chain; Where: exPos : excitation position wiht 0: for max low freqs and 1: for max high freqs. So, on membrane for example, 0 would be the middle and 1 the edge sharpness : sharpness of the attack and release (0-1) gain : gain of the excitation gate : a gate button/trigger signal (0/1) (pm.)pluckString Creates a plucking excitation signal. Usage trigger = button('gate'); pluckString(stringLength,cutoff,maxFreq,sharpness,trigger) Where: stringLength : length of the string to pluck cutoff : cutoff ratio (1 for default) maxFreq : max frequency ratio (1 for default) sharpness : sharpness of the attack and release (1 for default) gain : gain of the excitation (0-1) trigger : trigger signal (1 for on, 0 for off) (pm.)blower A virtual blower creating a DC signal with some breath noise in it. Usage blower(pressure,breathGain,breathCutoff) : _ Where: pressure : pressure (0-1) breathGain : breath noise gain (0-1) (recommended: 0.005) breathCutoff : breath cuttoff frequency (Hz) (recommended: 2000) (pm.)blower_ui Same as blower but with a built-in UI. Usage blower : somethingToBeBlown Modal Percussions High and low level functions for modal synthesis of percussion instruments. (pm.)djembeModel Dirt-simple djembe modal physical model. Mode parameters are empirically calculated and don't correspond to any measurements or 3D model. They kind of sound good though :). Usage excitation : djembeModel(freq) Where: excitation : excitation signal freq : fundamental frequency of the bar (pm.)djembe Dirt-simple djembe modal physical model. Mode parameters are empirically calculated and don't correspond to any measurements or 3D model. They kind of sound good though :). This model also implements a virtual \"exciter\". Usage djembe(freq,strikePosition,strikeSharpness,gain,trigger) Where: freq : fundamental frequency of the model strikePosition : strike position (0 for the middle of the membrane and 1 for the edge) strikeSharpness : sharpness of the strike (0-1, default: 0.5) gain : gain of the strike trigger : trigger signal (0: off, 1: on) (pm.)djembe_ui_MIDI Simple MIDI controllable djembe physical model with built-in UI. Usage djembe_ui_MIDI : _ (pm.)marimbaBarModel Generic marimba tone bar modal model. This model was generated using mesh2faust from a 3D CAD model of a marimba tone bar ( libraries/modalmodels/marimbaBar ). The corresponding CAD model is that of a C2 tone bar (original fundamental frequency: ~65Hz). While marimbaBarModel allows to translate the harmonic content of the generated sound by providing a frequency ( freq ), mode transposition has limits and the model will sound less and less like a marimba tone bar as it diverges from C2. To make an accurate model of a marimba, we'd want to have an independent model for each bar... This model contains 5 excitation positions going linearly from the center bottom to the center top of the bar. Obviously, a model with more excitation position could be regenerated using mesh2faust . Usage excitation : marimbaBarModel(freq,exPos,t60,t60DecayRatio,t60DecaySlope) Where: excitation : excitation signal freq : fundamental frequency of the bar exPos : excitation position (0-4) t60 : T60 in seconds (recommended value: 0.1) t60DecayRatio : T60 decay ratio (recommended value: 1) t60DecaySlope : T60 decay slope (recommended value: 5) (pm.)marimbaResTube Simple marimba resonance tube. Usage marimbaResTube(tubeLength,excitation) Where: tubeLength : the length of the tube in meters excitation : the excitation signal (audio in) (pm.)marimbaModel Simple marimba physical model implementing a single tone bar connected to tube. This model is scalable and can be adapted to any size of bar/tube (see marimbaBarModel to know more about the limitations of this type of system). Usage excitation : marimbaModel(freq,exPos) : _ Where: freq : the frequency of the bar/tube couple exPos : excitation position (0-4) (pm.)marimba Simple marimba physical model implementing a single tone bar connected to tube. This model is scalable and can be adapted to any size of bar/tube (see marimbaBarModel to know more about the limitations of this type of system). This function also implement a virtual exciter to drive the model. Usage excitation : marimba(freq,strikePosition,strikeCutoff,strikeSharpness,gain,trigger) : _ Where: excitation : the excitation signal freq : the frequency of the bar/tube couple strikePosition : strike position (0-4) strikeCutoff : cuttoff frequency of the strike genarator (recommended: ~7000Hz) strikeSharpness : sharpness of the strike (recommended: ~0.25) gain : gain of the strike (0-1) trigger signal (0: off, 1: on) (pm.)marimba_ui_MIDI Simple MIDI controllable marimba physical model with built-in UI implementing a single tone bar connected to tube. This model is scalable and can be adapted to any size of bar/tube (see marimbaBarModel to know more about the limitations of this type of system). Usage marimba_ui_MIDI : _ (pm.)churchBellModel Generic church bell modal model generated by mesh2faust from libraries/modalmodels/churchBell . Modeled after T. Rossing and R. Perrin, Vibrations of Bells, Applied Acoustics 2, 1987. Model height is 301 mm. This model contains 7 excitation positions going linearly from the bottom to the top of the bell. Obviously, a model with more excitation position could be regenerated using mesh2faust . Usage excitation : churchBellModel(nModes,exPos,t60,t60DecayRatio,t60DecaySlope) Where: excitation : the excitation signal nModes : number of synthesized modes (max: 50) exPos : excitation position (0-6) t60 : T60 in seconds (recommended value: 0.1) t60DecayRatio : T60 decay ratio (recommended value: 1) t60DecaySlope : T60 decay slope (recommended value: 5) (pm.)churchBell Generic church bell modal model. Modeled after T. Rossing and R. Perrin, Vibrations of Bells, Applied Acoustics 2, 1987. Model height is 301 mm. This model contains 7 excitation positions going linearly from the bottom to the top of the bell. Obviously, a model with more excitation position could be regenerated using mesh2faust . This function also implement a virtual exciter to drive the model. Usage excitation : churchBell(strikePosition,strikeCutoff,strikeSharpness,gain,trigger) : _ Where: excitation : the excitation signal strikePosition : strike position (0-6) strikeCutoff : cuttoff frequency of the strike genarator (recommended: ~7000Hz) strikeSharpness : sharpness of the strike (recommended: ~0.25) gain : gain of the strike (0-1) trigger signal (0: off, 1: on) (pm.)churchBell_ui Church bell physical model based on churchBell with built-in UI. Usage churchBell_ui : _ (pm.)englishBellModel English church bell modal model generated by mesh2faust from libraries/modalmodels/englishBell . Modeled after D.Bartocha and Baron, Influence of Tin Bronze Melting and Pouring Parameters on Its Properties and Bell' Tone, Archives of Foundry Engineering, 2016. Model height is 1 m. This model contains 7 excitation positions going linearly from the bottom to the top of the bell. Obviously, a model with more excitation position could be regenerated using mesh2faust . Usage excitation : englishBellModel(nModes,exPos,t60,t60DecayRatio,t60DecaySlope) Where: excitation : the excitation signal nModes : number of synthesized modes (max: 50) exPos : excitation position (0-6) t60 : T60 in seconds (recommended value: 0.1) t60DecayRatio : T60 decay ratio (recommended value: 1) t60DecaySlope : T60 decay slope (recommended value: 5) (pm.)englishBell English church bell modal model. Modeled after D.Bartocha and Baron, Influence of Tin Bronze Melting and Pouring Parameters on Its Properties and Bell' Tone, Archives of Foundry Engineering, 2016. Model height is 1 m. This model contains 7 excitation positions going linearly from the bottom to the top of the bell. Obviously, a model with more excitation position could be regenerated using mesh2faust . This function also implement a virtual exciter to drive the model. Usage excitation : englishBell(strikePosition,strikeCutoff,strikeSharpness,gain,trigger) : _ Where: excitation : the excitation signal strikePosition : strike position (0-6) strikeCutoff : cuttoff frequency of the strike genarator (recommended: ~7000Hz) strikeSharpness : sharpness of the strike (recommended: ~0.25) gain : gain of the strike (0-1) trigger signal (0: off, 1: on) (pm.)englishBell_ui English church bell physical model based on englishBell with built-in UI. Usage englishBell_ui : _ (pm.)frenchBellModel French church bell modal model generated by mesh2faust from libraries/modalmodels/frenchBell . Modeled after D.Bartocha and Baron, Influence of Tin Bronze Melting and Pouring Parameters on Its Properties and Bell' Tone, Archives of Foundry Engineering, 2016. Model height is 1 m. This model contains 7 excitation positions going linearly from the bottom to the top of the bell. Obviously, a model with more excitation position could be regenerated using mesh2faust . Usage excitation : frenchBellModel(nModes,exPos,t60,t60DecayRatio,t60DecaySlope) Where: excitation : the excitation signal nModes : number of synthesized modes (max: 50) exPos : excitation position (0-6) t60 : T60 in seconds (recommended value: 0.1) t60DecayRatio : T60 decay ratio (recommended value: 1) t60DecaySlope : T60 decay slope (recommended value: 5) (pm.)frenchBell French church bell modal model. Modeled after D.Bartocha and Baron, Influence of Tin Bronze Melting and Pouring Parameters on Its Properties and Bell' Tone, Archives of Foundry Engineering, 2016. Model height is 1 m. This model contains 7 excitation positions going linearly from the bottom to the top of the bell. Obviously, a model with more excitation position could be regenerated using mesh2faust . This function also implement a virtual exciter to drive the model. Usage excitation : frenchBell(strikePosition,strikeCutoff,strikeSharpness,gain,trigger) : _ Where: excitation : the excitation signal strikePosition : strike position (0-6) strikeCutoff : cuttoff frequency of the strike genarator (recommended: ~7000Hz) strikeSharpness : sharpness of the strike (recommended: ~0.25) gain : gain of the strike (0-1) trigger signal (0: off, 1: on) (pm.)frenchBell_ui French church bell physical model based on frenchBell with built-in UI. Usage frenchBell_ui : _ (pm.)germanBellModel German church bell modal model generated by mesh2faust from libraries/modalmodels/germanBell . Modeled after D.Bartocha and Baron, Influence of Tin Bronze Melting and Pouring Parameters on Its Properties and Bell' Tone, Archives of Foundry Engineering, 2016. Model height is 1 m. This model contains 7 excitation positions going linearly from the bottom to the top of the bell. Obviously, a model with more excitation position could be regenerated using mesh2faust . Usage excitation : germanBellModel(nModes,exPos,t60,t60DecayRatio,t60DecaySlope) Where: excitation : the excitation signal nModes : number of synthesized modes (max: 50) exPos : excitation position (0-6) t60 : T60 in seconds (recommended value: 0.1) t60DecayRatio : T60 decay ratio (recommended value: 1) t60DecaySlope : T60 decay slope (recommended value: 5) (pm.)germanBell German church bell modal model. Modeled after D.Bartocha and Baron, Influence of Tin Bronze Melting and Pouring Parameters on Its Properties and Bell' Tone, Archives of Foundry Engineering, 2016. Model height is 1 m. This model contains 7 excitation positions going linearly from the bottom to the top of the bell. Obviously, a model with more excitation position could be regenerated using mesh2faust . This function also implement a virtual exciter to drive the model. Usage excitation : germanBell(strikePosition,strikeCutoff,strikeSharpness,gain,trigger) : _ Where: excitation : the excitation signal strikePosition : strike position (0-6) strikeCutoff : cuttoff frequency of the strike genarator (recommended: ~7000Hz) strikeSharpness : sharpness of the strike (recommended: ~0.25) gain : gain of the strike (0-1) trigger signal (0: off, 1: on) (pm.)germanBell_ui German church bell physical model based on germanBell with built-in UI. Usage germanBell_ui : _ (pm.)russianBellModel Russian church bell modal model generated by mesh2faust from libraries/modalmodels/russianBell . Modeled after D.Bartocha and Baron, Influence of Tin Bronze Melting and Pouring Parameters on Its Properties and Bell' Tone, Archives of Foundry Engineering, 2016. Model height is 2 m. This model contains 7 excitation positions going linearly from the bottom to the top of the bell. Obviously, a model with more excitation position could be regenerated using mesh2faust . Usage excitation : russianBellModel(nModes,exPos,t60,t60DecayRatio,t60DecaySlope) Where: excitation : the excitation signal nModes : number of synthesized modes (max: 50) exPos : excitation position (0-6) t60 : T60 in seconds (recommended value: 0.1) t60DecayRatio : T60 decay ratio (recommended value: 1) t60DecaySlope : T60 decay slope (recommended value: 5) (pm.)russianBell Russian church bell modal model. Modeled after D.Bartocha and Baron, Influence of Tin Bronze Melting and Pouring Parameters on Its Properties and Bell' Tone, Archives of Foundry Engineering, 2016. Model height is 2 m. This model contains 7 excitation positions going linearly from the bottom to the top of the bell. Obviously, a model with more excitation position could be regenerated using mesh2faust . This function also implement a virtual exciter to drive the model. Usage excitation : russianBell(strikePosition,strikeCutoff,strikeSharpness,gain,trigger) : _ Where: excitation : the excitation signal strikePosition : strike position (0-6) strikeCutoff : cuttoff frequency of the strike genarator (recommended: ~7000Hz) strikeSharpness : sharpness of the strike (recommended: ~0.25) gain : gain of the strike (0-1) trigger signal (0: off, 1: on) (pm.)russianBell_ui Russian church bell physical model based on russianBell with built-in UI. Usage russianBell_ui : _ (pm.)standardBellModel Standard church bell modal model generated by mesh2faust from libraries/modalmodels/standardBell . Modeled after T. Rossing and R. Perrin, Vibrations of Bells, Applied Acoustics 2, 1987. Model height is 1.8 m. This model contains 7 excitation positions going linearly from the bottom to the top of the bell. Obviously, a model with more excitation position could be regenerated using mesh2faust . Usage excitation : standardBellModel(nModes,exPos,t60,t60DecayRatio,t60DecaySlope) Where: excitation : the excitation signal nModes : number of synthesized modes (max: 50) exPos : excitation position (0-6) t60 : T60 in seconds (recommended value: 0.1) t60DecayRatio : T60 decay ratio (recommended value: 1) t60DecaySlope : T60 decay slope (recommended value: 5) (pm.)standardBell Standard church bell modal model. Modeled after T. Rossing and R. Perrin, Vibrations of Bells, Applied Acoustics 2, 1987. Model height is 1.8 m. This model contains 7 excitation positions going linearly from the bottom to the top of the bell. Obviously, a model with more excitation position could be regenerated using mesh2faust . This function also implement a virtual exciter to drive the model. Usage excitation : standardBell(strikePosition,strikeCutoff,strikeSharpness,gain,trigger) : _ Where: excitation : the excitation signal strikePosition : strike position (0-6) strikeCutoff : cuttoff frequency of the strike genarator (recommended: ~7000Hz) strikeSharpness : sharpness of the strike (recommended: ~0.25) gain : gain of the strike (0-1) trigger signal (0: off, 1: on) (pm.)standardBell_ui Standard church bell physical model based on standardBell with built-in UI. Usage standardBell_ui : _ Vocal Synthesis Vocal synthesizer functions (source/filter, fof, etc.). (pm.)formantValues Formant data values. The formant data used here come from the CSOUND manual * http://www.csounds.com/manual/html/ . Usage ba.take(j+1,formantValues.f(i)) : _ ba.take(j+1,formantValues.g(i)) : _ ba.take(j+1,formantValues.bw(i)) : _ Where: i : formant number j : (voiceType*nFormants)+vowel voiceType : the voice type (0: alto, 1: bass, 2: countertenor, 3: soprano, 4: tenor) vowel : the vowel (0: a, 1: e, 2: i, 3: o, 4: u) (pm.)voiceGender Calculate the gender for the provided voiceType value. (0: male, 1: female) Usage voiceGender(voiceType) : _ Where: voiceType : the voice type (0: alto, 1: bass, 2: countertenor, 3: soprano, 4: tenor) (pm.)skirtWidthMultiplier Calculates value to multiply bandwidth to obtain skirtwidth for a Fof filter. Usage skirtWidthMultiplier(vowel,freq,gender) : _ Where: vowel : the vowel (0: a, 1: e, 2: i, 3: o, 4: u) freq : the fundamental frequency of the excitation signal gender : gender of the voice used in the fof filter (0: male, 1: female) (pm.)autobendFreq Autobends the center frequencies of formants 1 and 2 based on the fundamental frequency of the excitation signal and leaves all other formant frequencies unchanged. Ported from chant-lib . Reference https://ccrma.stanford.edu/~rmichon/chantLib/ . Usage _ : autobendFreq(n,freq,voiceType) : _ Where: n : formant index freq : the fundamental frequency of the excitation signal voiceType : the voice type (0: alto, 1: bass, 2: countertenor, 3: soprano, 4: tenor) input is the center frequency of the corresponding formant (pm.)vocalEffort Changes the gains of the formants based on the fundamental frequency of the excitation signal. Higher formants are reinforced for higher fundamental frequencies. Ported from chant-lib . Reference https://ccrma.stanford.edu/~rmichon/chantLib/ . Usage _ : vocalEffort(freq,gender) : _ Where: freq : the fundamental frequency of the excitation signal gender : the gender of the voice type (0: male, 1: female) input is the linear amplitude of the formant (pm.)fof Function to generate a single Formant-Wave-Function. Reference https://ccrma.stanford.edu/~mjolsen/pdfs/smc2016_MOlsenFOF.pdf . Usage _ : fof(fc,bw,a,g) : _ Where: fc : formant center frequency, bw : formant bandwidth (Hz), sw : formant skirtwidth (Hz) g : linear scale factor (g=1 gives 0dB amplitude response at fc) input is an impulse signal to excite filter (pm.)fofSH FOF with sample and hold used on bw and a parameter used in the filter-cycling FOF function fofCycle . Reference https://ccrma.stanford.edu/~mjolsen/pdfs/smc2016_MOlsenFOF.pdf . Usage _ : fofSH(fc,bw,a,g) : _ Where: all parameters same as for fof (pm.)fofCycle FOF implementation where time-varying filter parameter noise is mitigated by using a cycle of n sample and hold FOF filters. Reference https://ccrma.stanford.edu/~mjolsen/pdfs/smc2016_MOlsenFOF.pdf . Usage _ : fofCycle(fc,bw,a,g,n) : _ Where: n : the number of FOF filters to cycle through all other parameters are same as for fof (pm.)fofSmooth FOF implementation where time-varying filter parameter noise is mitigated by lowpass filtering the filter parameters bw and a with smooth . Usage _ : fofSmooth(fc,bw,sw,g,tau) : _ Where: tau : the desired smoothing time constant in seconds all other parameters are same as for fof (pm.)formantFilterFofCycle Formant filter based on a single FOF filter. Formant parameters are linearly interpolated allowing to go smoothly from one vowel to another. A cycle of n fof filters with sample-and-hold is used so that the fof filter parameters can be varied in realtime. This technique is more robust but more computationally expensive than formantFilterFofSmooth .Voice type can be selected but must correspond to the frequency range of the provided source to be realistic. Usage _ : formantFilterFofCycle(voiceType,vowel,nFormants,i,freq) : _ Where: voiceType : the voice type (0: alto, 1: bass, 2: countertenor, 3: soprano, 4: tenor) vowel : the vowel (0: a, 1: e, 2: i, 3: o, 4: u) nFormants : number of formant regions in frequency domain, typically 5 i : formant number (i.e. 0 - 4) used to index formant data value arrays freq : fundamental frequency of excitation signal. Used to calculate rise time of envelope (pm.)formantFilterFofSmooth Formant filter based on a single FOF filter. Formant parameters are linearly interpolated allowing to go smoothly from one vowel to another. Fof filter parameters are lowpass filtered to mitigate possible noise from varying them in realtime. Voice type can be selected but must correspond to the frequency range of the provided source to be realistic. Usage _ : formantFilterFofSmooth(voiceType,vowel,nFormants,i,freq) : _ Where: voiceType : the voice type (0: alto, 1: bass, 2: countertenor, 3: soprano, 4: tenor) vowel : the vowel (0: a, 1: e, 2: i, 3: o, 4: u) nFormants : number of formant regions in frequency domain, typically 5 i : formant number (i.e. 1 - 5) used to index formant data value arrays freq : fundamental frequency of excitation signal. Used to calculate rise time of envelope (pm.)formantFilterBP Formant filter based on a single resonant bandpass filter. Formant parameters are linearly interpolated allowing to go smoothly from one vowel to another. Voice type can be selected but must correspond to the frequency range of the provided source to be realistic. Usage _ : formantFilterBP(voiceType,vowel,nFormants,i,freq) : _ Where: voiceType : the voice type (0: alto, 1: bass, 2: countertenor, 3: soprano, 4: tenor) vowel : the vowel (0: a, 1: e, 2: i, 3: o, 4: u) nFormants : number of formant regions in frequency domain, typically 5 i : formant index used to index formant data value arrays freq : fundamental frequency of excitation signal. (pm.)formantFilterbank Formant filterbank which can use different types of filterbank functions and different excitation signals. Formant parameters are linearly interpolated allowing to go smoothly from one vowel to another. Voice type can be selected but must correspond to the frequency range of the provided source to be realistic. Usage _ : formantFilterbank(voiceType,vowel,formantGen,freq) : _ Where: voiceType : the voice type (0: alto, 1: bass, 2: countertenor, 3: soprano, 4: tenor) vowel : the vowel (0: a, 1: e, 2: i, 3: o, 4: u) formantGen : the specific formant filterbank function (i.e. FormantFilterbankBP, FormantFilterbankFof,...) freq : fundamental frequency of excitation signal. Needed for FOF version to calculate rise time of envelope (pm.)formantFilterbankFofCycle Formant filterbank based on a bank of fof filters. Formant parameters are linearly interpolated allowing to go smoothly from one vowel to another. Voice type can be selected but must correspond to the frequency range of the provided source to be realistic. Usage _ : formantFilterbankFofCycle(voiceType,vowel,freq) : _ Where: voiceType : the voice type (0: alto, 1: bass, 2: countertenor, 3: soprano, 4: tenor) vowel : the vowel (0: a, 1: e, 2: i, 3: o, 4: u) freq : the fundamental frequency of the excitation signal. Needed to calculate the skirtwidth of the FOF envelopes and for the autobendFreq and vocalEffort functions (pm.)formantFilterbankFofSmooth Formant filterbank based on a bank of fof filters. Formant parameters are linearly interpolated allowing to go smoothly from one vowel to another. Voice type can be selected but must correspond to the frequency range of the provided source to be realistic. Usage _ : formantFilterbankFofSmooth(voiceType,vowel,freq) : _ Where: voiceType : the voice type (0: alto, 1: bass, 2: countertenor, 3: soprano, 4: tenor) vowel : the vowel (0: a, 1: e, 2: i, 3: o, 4: u) freq : the fundamental frequency of the excitation signal. Needed to calculate the skirtwidth of the FOF envelopes and for the autobendFreq and vocalEffort functions (pm.)formantFilterbankBP Formant filterbank based on a bank of resonant bandpass filters. Formant parameters are linearly interpolated allowing to go smoothly from one vowel to another. Voice type can be selected but must correspond to the frequency range of the provided source to be realistic. Usage _ : formantFilterbankBP(voiceType,vowel,freq) : _ Where: voiceType : the voice type (0: alto, 1: bass, 2: countertenor, 3: soprano, 4: tenor) vowel : the vowel (0: a, 1: e, 2: i, 3: o, 4: u) freq : the fundamental frequency of the excitation signal. Needed for the autobendFreq and vocalEffort functions (pm.)SFFormantModel Simple formant/vocal synthesizer based on a source/filter model. The source and filterbank must be specified by the user. filterbank must take the same input parameters as formantFilterbank ( BP / FofCycle / FofSmooth ). Formant parameters are linearly interpolated allowing to go smoothly from one vowel to another. Voice type can be selected but must correspond to the frequency range of the synthesized voice to be realistic. Usage SFFormantModel(voiceType,vowel,exType,freq,gain,source,filterbank,isFof) : _ Where: voiceType : the voice type (0: alto, 1: bass, 2: countertenor, 3: soprano, 4: tenor) vowel : the vowel (0: a, 1: e, 2: i, 3: o, 4: u exType : voice vs. fricative sound ratio (0-1 where 1 is 100% fricative) freq : the fundamental frequency of the source signal gain : linear gain multiplier to multiply the source by isFof : whether model is FOF based (0: no, 1: yes) (pm.)SFFormantModelFofCycle Simple formant/vocal synthesizer based on a source/filter model. The source is just a periodic impulse and the \"filter\" is a bank of FOF filters. Formant parameters are linearly interpolated allowing to go smoothly from one vowel to another. Voice type can be selected but must correspond to the frequency range of the synthesized voice to be realistic. This model does not work with noise in the source signal so exType has been removed and model does not depend on SFFormantModel function. Usage SFFormantModelFofCycle(voiceType,vowel,freq,gain) : _ Where: voiceType : the voice type (0: alto, 1: bass, 2: countertenor, 3: soprano, 4: tenor) vowel : the vowel (0: a, 1: e, 2: i, 3: o, 4: u freq : the fundamental frequency of the source signal gain : linear gain multiplier to multiply the source by (pm.)SFFormantModelFofSmooth Simple formant/vocal synthesizer based on a source/filter model. The source is just a periodic impulse and the \"filter\" is a bank of FOF filters. Formant parameters are linearly interpolated allowing to go smoothly from one vowel to another. Voice type can be selected but must correspond to the frequency range of the synthesized voice to be realistic. Usage SFFormantModelFofSmooth(voiceType,vowel,freq,gain) : _ Where: voiceType : the voice type (0: alto, 1: bass, 2: countertenor, 3: soprano, 4: tenor) vowel : the vowel (0: a, 1: e, 2: i, 3: o, 4: u freq : the fundamental frequency of the source signal gain : linear gain multiplier to multiply the source by (pm.)SFFormantModelBP Simple formant/vocal synthesizer based on a source/filter model. The source is just a sawtooth wave and the \"filter\" is a bank of resonant bandpass filters. Formant parameters are linearly interpolated allowing to go smoothly from one vowel to another. Voice type can be selected but must correspond to the frequency range of the synthesized voice to be realistic. The formant data used here come from the CSOUND manual * http://www.csounds.com/manual/html/ . Usage SFFormantModelBP(voiceType,vowel,exType,freq,gain) : _ Where: voiceType : the voice type (0: alto, 1: bass, 2: countertenor, 3: soprano, 4: tenor) vowel : the vowel (0: a, 1: e, 2: i, 3: o, 4: u exType : voice vs. fricative sound ratio (0-1 where 1 is 100% fricative) freq : the fundamental frequency of the source signal gain : linear gain multiplier to multiply the source by (pm.)SFFormantModelFofCycle_ui Ready-to-use source-filter vocal synthesizer with built-in user interface. Usage SFFormantModelFofCycle_ui : _ (pm.)SFFormantModelFofSmooth_ui Ready-to-use source-filter vocal synthesizer with built-in user interface. Usage SFFormantModelFofSmooth_ui : _ (pm.)SFFormantModelBP_ui Ready-to-use source-filter vocal synthesizer with built-in user interface. Usage SFFormantModelBP_ui : _ (pm.)SFFormantModelFofCycle_ui_MIDI Ready-to-use MIDI-controllable source-filter vocal synthesizer. Usage SFFormantModelFofCycle_ui_MIDI : _ (pm.)SFFormantModelFofSmooth_ui_MIDI Ready-to-use MIDI-controllable source-filter vocal synthesizer. Usage SFFormantModelFofSmooth_ui_MIDI : _ (pm.)SFFormantModelBP_ui_MIDI Ready-to-use MIDI-controllable source-filter vocal synthesizer. Usage SFFormantModelBP_ui_MIDI : _ Misc Functions Various miscellaneous functions. (pm.)allpassNL Bidirectional block adding nonlinearities in both directions in a chain. Nonlinearities are created by modulating the coefficients of a passive allpass filter by the signal it is processing. Usage chain(... : allpassNL(nonlinearity) : ...) Where: nonlinearity : amount of nonlinearity to be added (0-1) (pm).modalModel Implement multiple resonance modes using resonant bandpass filters. Usage _ : modalModel(n, freqs, t60s, gains) : _ Where: n : number of given modes freqs : list of filter center freqencies t60s : list of mode resonance durations (in seconds) gains : list of mode gains (0-1) For example, to generate a model with 2 modes (440 Hz and 660 Hz, a fifth) where the higher one decays faster and is attenuated: os.impulse : modalModel(2, (440, 660), (0.5, 0.25), (ba.db2linear(-1), ba.db2linear(-6)) : _ Further reading: Grumiaux et. al., 2017: Impulse-Response and CAD-Model-Based Physical Modeling in Faust","title":" physmodels "},{"location":"libs/physmodels/#physmodelslib","text":"Faust physical modeling library. Its official prefix is pm . This library provides an environment to facilitate physical modeling of musical instruments. It contains dozens of functions implementing low and high level elements going from a simple waveguide to fully operational models with built-in UI, etc. It is organized as follows: Global Variables : useful pre-defined variables for physical modeling (e.g., speed of sound, etc.). Conversion Tools : conversion functions specific to physical modeling (e.g., length to frequency, etc.). Bidirectional Utilities : functions to create bidirectional block diagrams for physical modeling. Basic Elements : waveguides, specific types of filters, etc. String Instruments : various types of strings (e.g., steel, nylon, etc.), bridges, guitars, etc. Bowed String Instruments : parts and models specific to bowed string instruments (e.g., bows, bridges, violins, etc.). Wind Instrument : parts and models specific to wind instruments (e.g., reeds, mouthpieces, flutes, clarinets, etc.). Exciters : pluck generators, \"blowers\", etc. Modal Percussions : percussion instruments based on modal models. Vocal Synthesis : functions for various vocal synthesis techniques (e.g., fof, source/filter, etc.) and vocal synthesizers. Misc Functions : any other functions that don't fit in the previous category (e.g., nonlinear filters, etc.). This library is part of the Faust Physical Modeling ToolKit. More information on how to use this library can be found on this page . Tutorials on how to make physical models of musical instruments using Faust can be found here as well.","title":"physmodels.lib"},{"location":"libs/physmodels/#references","text":"https://github.com/grame-cncm/faustlibraries/blob/master/physmodels.lib","title":"References"},{"location":"libs/physmodels/#global-variables","text":"Useful pre-defined variables for physical modeling.","title":"Global Variables"},{"location":"libs/physmodels/#pmspeedofsound","text":"Speed of sound in meters per second (340m/s).","title":"(pm.)speedOfSound"},{"location":"libs/physmodels/#pmmaxlength","text":"The default maximum length (3) in meters of strings and tubes used in this library. This variable should be overriden to allow longer strings or tubes.","title":"(pm.)maxLength"},{"location":"libs/physmodels/#conversion-tools","text":"Useful conversion tools for physical modeling.","title":"Conversion Tools"},{"location":"libs/physmodels/#pmf2l","text":"Frequency to length in meters.","title":"(pm.)f2l"},{"location":"libs/physmodels/#usage","text":"f2l(freq) : distanceInMeters Where: freq : the frequency","title":"Usage"},{"location":"libs/physmodels/#pml2f","text":"Length in meters to frequency.","title":"(pm.)l2f"},{"location":"libs/physmodels/#usage_1","text":"l2f(length) : freq Where: length : length/distance in meters","title":"Usage"},{"location":"libs/physmodels/#pml2s","text":"Length in meters to number of samples.","title":"(pm.)l2s"},{"location":"libs/physmodels/#usage_2","text":"l2s(l) : numberOfSamples Where: l : length in meters","title":"Usage"},{"location":"libs/physmodels/#bidirectional-utilities","text":"Set of fundamental functions to create bi-directional block diagrams in Faust. These elements are used as the basis of this library to connect high level elements (e.g., mouthpieces, strings, bridge, instrument body, etc.). Each block has 3 inputs and 3 outputs. The first input/output carry left going waves, the second input/output carry right going waves, and the third input/output is used to carry any potential output signal to the end of the algorithm.","title":"Bidirectional Utilities"},{"location":"libs/physmodels/#pmbasicblock","text":"Empty bidirectional block to be used with chain : 3 signals ins and 3 signals out.","title":"(pm.)basicBlock"},{"location":"libs/physmodels/#usage_3","text":"chain(basicBlock : basicBlock : etc.)","title":"Usage"},{"location":"libs/physmodels/#pmchain","text":"Creates a chain of bidirectional blocks. Blocks must have 3 inputs and outputs. The first input/output carry left going waves, the second input/output carry right going waves, and the third input/output is used to carry any potential output signal to the end of the algorithm. The implied one sample delay created by the ~ operator is generalized to the left and right going waves. Thus, n blocks in chain() will add an n samples delay to both left and right going waves.","title":"(pm.)chain"},{"location":"libs/physmodels/#usage_4","text":"leftGoingWaves,rightGoingWaves,mixedOutput : chain( A : B ) : leftGoingWaves,rightGoingWaves,mixedOutput with{ A = _,_,_; };","title":"Usage"},{"location":"libs/physmodels/#pminleftwave","text":"Adds a signal to left going waves anywhere in a chain of blocks.","title":"(pm.)inLeftWave"},{"location":"libs/physmodels/#usage_5","text":"model(x) = chain(A : inLeftWave(x) : B) Where A and B are bidirectional blocks and x is the signal added to left going waves in that chain.","title":"Usage"},{"location":"libs/physmodels/#pminrightwave","text":"Adds a signal to right going waves anywhere in a chain of blocks.","title":"(pm.)inRightWave"},{"location":"libs/physmodels/#usage_6","text":"model(x) = chain(A : inRightWave(x) : B) Where A and B are bidirectional blocks and x is the signal added to right going waves in that chain.","title":"Usage"},{"location":"libs/physmodels/#pmin","text":"Adds a signal to left and right going waves anywhere in a chain of blocks.","title":"(pm.)in"},{"location":"libs/physmodels/#usage_7","text":"model(x) = chain(A : in(x) : B) Where A and B are bidirectional blocks and x is the signal added to left and right going waves in that chain.","title":"Usage"},{"location":"libs/physmodels/#pmoutleftwave","text":"Sends the signal of left going waves to the output channel of the chain .","title":"(pm.)outLeftWave"},{"location":"libs/physmodels/#usage_8","text":"chain(A : outLeftWave : B) Where A and B are bidirectional blocks.","title":"Usage"},{"location":"libs/physmodels/#pmoutrightwave","text":"Sends the signal of right going waves to the output channel of the chain .","title":"(pm.)outRightWave"},{"location":"libs/physmodels/#usage_9","text":"chain(A : outRightWave : B) Where A and B are bidirectional blocks.","title":"Usage"},{"location":"libs/physmodels/#pmout","text":"Sends the signal of right and left going waves to the output channel of the chain .","title":"(pm.)out"},{"location":"libs/physmodels/#usage_10","text":"chain(A : out : B) Where A and B are bidirectional blocks.","title":"Usage"},{"location":"libs/physmodels/#pmterminations","text":"Creates terminations on both sides of a chain without closing the inputs and outputs of the bidirectional signals chain. As for chain , this function adds a 1 sample delay to the bidirectional signal, both ways. Of course, this function can be nested within a chain .","title":"(pm.)terminations"},{"location":"libs/physmodels/#usage_11","text":"terminations(a,b,c) with{ };","title":"Usage"},{"location":"libs/physmodels/#pmltermination","text":"Creates a termination on the left side of a chain without closing the inputs and outputs of the bidirectional signals chain. This function adds a 1 sample delay near the termination and can be nested within another chain .","title":"(pm.)lTermination"},{"location":"libs/physmodels/#usage_12","text":"lTerminations(a,b) with{ };","title":"Usage"},{"location":"libs/physmodels/#pmrtermination","text":"Creates a termination on the right side of a chain without closing the inputs and outputs of the bidirectional signals chain. This function adds a 1 sample delay near the termination and can be nested within another chain .","title":"(pm.)rTermination"},{"location":"libs/physmodels/#usage_13","text":"rTerminations(b,c) with{ };","title":"Usage"},{"location":"libs/physmodels/#pmcloseins","text":"Closes the inputs of a bidirectional chain in all directions.","title":"(pm.)closeIns"},{"location":"libs/physmodels/#usage_14","text":"closeIns : chain(...) : _,_,_","title":"Usage"},{"location":"libs/physmodels/#pmcloseouts","text":"Closes the outputs of a bidirectional chain in all directions except for the main signal output (3d output).","title":"(pm.)closeOuts"},{"location":"libs/physmodels/#usage_15","text":"_,_,_ : chain(...) : _","title":"Usage"},{"location":"libs/physmodels/#pmendchain","text":"Closes the inputs and outputs of a bidirectional chain in all directions except for the main signal output (3d output).","title":"(pm.)endChain"},{"location":"libs/physmodels/#usage_16","text":"endChain(chain(...)) : _","title":"Usage"},{"location":"libs/physmodels/#basic-elements","text":"Basic elements for physical modeling (e.g., waveguides, specific filters, etc.).","title":"Basic Elements"},{"location":"libs/physmodels/#pmwaveguiden","text":"A series of waveguide functions based on various types of delays (see fdelay[n] ).","title":"(pm.)waveguideN"},{"location":"libs/physmodels/#list-of-functions","text":"waveguideUd : unit delay waveguide waveguideFd : fractional delay waveguide waveguideFd2 : second order fractional delay waveguide waveguideFd4 : fourth order fractional delay waveguide","title":"List of functions"},{"location":"libs/physmodels/#usage_17","text":"chain(A : waveguideUd(nMax,n) : B) Where: nMax : the maximum length of the delays in the waveguide n : the length of the delay lines in samples.","title":"Usage"},{"location":"libs/physmodels/#pmwaveguide","text":"Standard pm.lib waveguide (based on waveguideFd4 ).","title":"(pm.)waveguide"},{"location":"libs/physmodels/#usage_18","text":"chain(A : waveguide(nMax,n) : B) Where: nMax : the maximum length of the delays in the waveguide n : the length of the delay lines in samples.","title":"Usage"},{"location":"libs/physmodels/#pmbridgefilter","text":"Generic two zeros bridge FIR filter (as implemented in the STK ) that can be used to implement the reflectance violin, guitar, etc. bridges.","title":"(pm.)bridgeFilter"},{"location":"libs/physmodels/#usage_19","text":"_ : bridge(brightness,absorption) : _ Where: brightness : controls the damping of high frequencies (0-1) absorption : controls the absorption of the brige and thus the t60 of the string plugged to it (0-1) (1 = 20 seconds)","title":"Usage"},{"location":"libs/physmodels/#pmmodefilter","text":"Resonant bandpass filter that can be used to implement a single resonance (mode).","title":"(pm.)modeFilter"},{"location":"libs/physmodels/#usage_20","text":"_ : modeFilter(freq,t60,gain) : _ Where: freq : mode frequency t60 : mode resonance duration (in seconds) gain : mode gain (0-1)","title":"Usage"},{"location":"libs/physmodels/#string-instruments","text":"Low and high level string instruments parts. Most of the elements in this section can be used in a bidirectional chain.","title":"String Instruments"},{"location":"libs/physmodels/#pmstringsegment","text":"A string segment without terminations (just a simple waveguide).","title":"(pm.)stringSegment"},{"location":"libs/physmodels/#usage_21","text":"chain(A : stringSegment(maxLength,length) : B) Where: maxLength : the maximum length of the string in meters (should be static) length : the length of the string in meters","title":"Usage"},{"location":"libs/physmodels/#pmopenstring","text":"A bidirectional block implementing a basic \"generic\" string with a selectable excitation position. Lowpass filters are built-in and allow to simulate the effect of dispersion on the sound and thus to change the \"stiffness\" of the string.","title":"(pm.)openString"},{"location":"libs/physmodels/#usage_22","text":"chain(... : openString(length,stiffness,pluckPosition,excitation) : ...) Where: length : the length of the string in meters stiffness : the stiffness of the string (0-1) (1 for max stiffness) pluckPosition : excitation position (0-1) (1 is bottom) excitation : the excitation signal","title":"Usage"},{"location":"libs/physmodels/#pmnylonstring","text":"A bidirectional block implementing a basic nylon string with selectable excitation position. This element is based on openString and has a fix stiffness corresponding to that of a nylon string.","title":"(pm.)nylonString"},{"location":"libs/physmodels/#usage_23","text":"chain(... : nylonString(length,pluckPosition,excitation) : ...) Where: length : the length of the string in meters pluckPosition : excitation position (0-1) (1 is bottom) excitation : the excitation signal","title":"Usage"},{"location":"libs/physmodels/#pmsteelstring","text":"A bidirectional block implementing a basic steel string with selectable excitation position. This element is based on openString and has a fix stiffness corresponding to that of a steel string.","title":"(pm.)steelString"},{"location":"libs/physmodels/#usage_24","text":"chain(... : steelString(length,pluckPosition,excitation) : ...) Where: length : the length of the string in meters pluckPosition : excitation position (0-1) (1 is bottom) excitation : the excitation signal","title":"Usage"},{"location":"libs/physmodels/#pmopenstringpick","text":"A bidirectional block implementing a \"generic\" string with selectable excitation position. It also has a built-in pickup whose position is the same as the excitation position. Thus, moving the excitation position will also move the pickup.","title":"(pm.)openStringPick"},{"location":"libs/physmodels/#usage_25","text":"chain(... : openStringPick(length,stiffness,pluckPosition,excitation) : ...) Where: length : the length of the string in meters stiffness : the stiffness of the string (0-1) (1 for max stiffness) pluckPosition : excitation position (0-1) (1 is bottom) excitation : the excitation signal","title":"Usage"},{"location":"libs/physmodels/#pmopenstringpickup","text":"A bidirectional block implementing a \"generic\" string with selectable excitation position and stiffness. It also has a built-in pickup whose position can be independenly selected. The only constraint is that the pickup has to be placed after the excitation position.","title":"(pm.)openStringPickUp"},{"location":"libs/physmodels/#usage_26","text":"chain(... : openStringPickUp(length,stiffness,pluckPosition,excitation) : ...) Where: length : the length of the string in meters stiffness : the stiffness of the string (0-1) (1 for max stiffness) pluckPosition : pluck position between the top of the string and the pickup (0-1) (1 for same as pickup position) pickupPosition : position of the pickup on the string (0-1) (1 is bottom) excitation : the excitation signal","title":"Usage"},{"location":"libs/physmodels/#pmopenstringpickdown","text":"A bidirectional block implementing a \"generic\" string with selectable excitation position and stiffness. It also has a built-in pickup whose position can be independenly selected. The only constraint is that the pickup has to be placed before the excitation position.","title":"(pm.)openStringPickDown"},{"location":"libs/physmodels/#usage_27","text":"chain(... : openStringPickDown(length,stiffness,pluckPosition,excitation) : ...) Where: length : the length of the string in meters stiffness : the stiffness of the string (0-1) (1 for max stiffness) pluckPosition : pluck position on the string (0-1) (1 is bottom) pickupPosition : position of the pickup between the top of the string and the excitation position (0-1) (1 is excitation position) excitation : the excitation signal","title":"Usage"},{"location":"libs/physmodels/#pmksreflexionfilter","text":"The \"typical\" one-zero Karplus-strong feedforward reflexion filter. This filter will be typically used in a termination (see below).","title":"(pm.)ksReflexionFilter"},{"location":"libs/physmodels/#usage_28","text":"terminations(_,chain(...),ksReflexionFilter)","title":"Usage"},{"location":"libs/physmodels/#pmrstringrigidtermination","text":"Bidirectional block implementing a right rigid string termination (no damping, just phase inversion).","title":"(pm.)rStringRigidTermination"},{"location":"libs/physmodels/#usage_29","text":"chain(rStringRigidTermination : stringSegment : ...)","title":"Usage"},{"location":"libs/physmodels/#pmlstringrigidtermination","text":"Bidirectional block implementing a left rigid string termination (no damping, just phase inversion).","title":"(pm.)lStringRigidTermination"},{"location":"libs/physmodels/#usage_30","text":"chain(... : stringSegment : lStringRigidTermination)","title":"Usage"},{"location":"libs/physmodels/#pmelecguitarbridge","text":"Bidirectional block implementing a simple electric guitar bridge. This block is based on bridgeFilter . The bridge doesn't implement transmittance since it is not meant to be connected to a body (unlike acoustic guitar). It also partially sets the resonance duration of the string with the nuts used on the other side.","title":"(pm.)elecGuitarBridge"},{"location":"libs/physmodels/#usage_31","text":"chain(... : stringSegment : elecGuitarBridge)","title":"Usage"},{"location":"libs/physmodels/#pmelecguitarnuts","text":"Bidirectional block implementing a simple electric guitar nuts. This block is based on bridgeFilter and does essentially the same thing as elecGuitarBridge , but on the other side of the chain. It also partially sets the resonance duration of the string with the bridge used on the other side.","title":"(pm.)elecGuitarNuts"},{"location":"libs/physmodels/#usage_32","text":"chain(elecGuitarNuts : stringSegment : ...)","title":"Usage"},{"location":"libs/physmodels/#pmguitarbridge","text":"Bidirectional block implementing a simple acoustic guitar bridge. This bridge damps more hight frequencies than elecGuitarBridge and implements a transmittance filter. It also partially sets the resonance duration of the string with the nuts used on the other side.","title":"(pm.)guitarBridge"},{"location":"libs/physmodels/#usage_33","text":"chain(... : stringSegment : guitarBridge)","title":"Usage"},{"location":"libs/physmodels/#pmguitarnuts","text":"Bidirectional block implementing a simple acoustic guitar nuts. This nuts damps more hight frequencies than elecGuitarNuts and implements a transmittance filter. It also partially sets the resonance duration of the string with the bridge used on the other side.","title":"(pm.)guitarNuts"},{"location":"libs/physmodels/#usage_34","text":"chain(guitarNuts : stringSegment : ...)","title":"Usage"},{"location":"libs/physmodels/#pmidealstring","text":"An \"ideal\" string with rigid terminations and where the plucking position and the pick-up position are the same. Since terminations are rigid, this string will ring forever.","title":"(pm.)idealString"},{"location":"libs/physmodels/#usage_35","text":"1-1' : idealString(length,reflexion,xPosition,excitation) With: * length : the length of the string in meters * pluckPosition : the plucking position (0.001-0.999) * excitation : the input signal for the excitation.","title":"Usage"},{"location":"libs/physmodels/#pmks","text":"A Karplus-Strong string (in that case, the string is implemented as a one dimension waveguide).","title":"(pm.)ks"},{"location":"libs/physmodels/#usage_36","text":"ks(length,damping,excitation) : _ Where: length : the length of the string in meters damping : string damping (0-1) excitation : excitation signal","title":"Usage"},{"location":"libs/physmodels/#pmks_ui_midi","text":"Ready-to-use, MIDI-enabled Karplus-Strong string with buil-in UI.","title":"(pm.)ks_ui_MIDI"},{"location":"libs/physmodels/#usage_37","text":"ks_ui_MIDI : _","title":"Usage"},{"location":"libs/physmodels/#pmelecguitarmodel","text":"A simple electric guitar model (without audio effects, of course) with selectable pluck position. This model implements a single string. Additional strings should be created by making a polyphonic application out of this function. Pitch is changed by changing the length of the string and not through a finger model.","title":"(pm.)elecGuitarModel"},{"location":"libs/physmodels/#usage_38","text":"elecGuitarModel(length,pluckPosition,mute,excitation) : _ Where: length : the length of the string in meters pluckPosition : pluck position (0-1) (1 is on the bridge) mute : mute coefficient (1 for no mute and 0 for instant mute) excitation : excitation signal","title":"Usage"},{"location":"libs/physmodels/#pmelecguitar","text":"A simple electric guitar model with steel strings (based on elecGuitarModel ) implementing an excitation model. This model implements a single string. Additional strings should be created by making a polyphonic application out of this function.","title":"(pm.)elecGuitar"},{"location":"libs/physmodels/#usage_39","text":"elecGuitar(length,pluckPosition,trigger) : _ Where: length : the length of the string in meters pluckPosition : pluck position (0-1) (1 is on the bridge) mute : mute coefficient (1 for no mute and 0 for instant mute) gain : gain of the pluck (0-1) trigger : trigger signal (1 for on, 0 for off)","title":"Usage"},{"location":"libs/physmodels/#pmelecguitar_ui_midi","text":"Ready-to-use MIDI-enabled electric guitar physical model with built-in UI.","title":"(pm.)elecGuitar_ui_MIDI"},{"location":"libs/physmodels/#usage_40","text":"elecGuitar_ui_MIDI : _","title":"Usage"},{"location":"libs/physmodels/#pmguitarbody","text":"WARNING: not implemented yet! Bidirectional block implementing a simple acoustic guitar body.","title":"(pm.)guitarBody"},{"location":"libs/physmodels/#usage_41","text":"chain(... : guitarBody)","title":"Usage"},{"location":"libs/physmodels/#pmguitarmodel","text":"A simple acoustic guitar model with steel strings and selectable excitation position. This model implements a single string. Additional strings should be created by making a polyphonic application out of this function. Pitch is changed by changing the length of the string and not through a finger model. WARNING: this function doesn't currently implement a body (just strings and bridge).","title":"(pm.)guitarModel"},{"location":"libs/physmodels/#usage_42","text":"guitarModel(length,pluckPosition,excitation) : _ Where: length : the length of the string in meters pluckPosition : pluck position (0-1) (1 is on the bridge) excitation : excitation signal","title":"Usage"},{"location":"libs/physmodels/#pmguitar","text":"A simple acoustic guitar model with steel strings (based on guitarModel ) implementing an excitation model. This model implements a single string. Additional strings should be created by making a polyphonic application out of this function.","title":"(pm.)guitar"},{"location":"libs/physmodels/#usage_43","text":"guitar(length,pluckPosition,trigger) : _ Where: length : the length of the string in meters pluckPosition : pluck position (0-1) (1 is on the bridge) gain : gain of the excitation trigger : trigger signal (1 for on, 0 for off)","title":"Usage"},{"location":"libs/physmodels/#pmguitar_ui_midi","text":"Ready-to-use MIDI-enabled steel strings acoustic guitar physical model with built-in UI.","title":"(pm.)guitar_ui_MIDI"},{"location":"libs/physmodels/#usage_44","text":"guitar_ui_MIDI : _","title":"Usage"},{"location":"libs/physmodels/#pmnylonguitarmodel","text":"A simple acoustic guitar model with nylon strings and selectable excitation position. This model implements a single string. Additional strings should be created by making a polyphonic application out of this function. Pitch is changed by changing the length of the string and not through a finger model. WARNING: this function doesn't currently implement a body (just strings and bridge).","title":"(pm.)nylonGuitarModel"},{"location":"libs/physmodels/#usage_45","text":"nylonGuitarModel(length,pluckPosition,excitation) : _ Where: length : the length of the string in meters pluckPosition : pluck position (0-1) (1 is on the bridge) excitation : excitation signal","title":"Usage"},{"location":"libs/physmodels/#pmnylonguitar","text":"A simple acoustic guitar model with nylon strings (based on nylonGuitarModel ) implementing an excitation model. This model implements a single string. Additional strings should be created by making a polyphonic application out of this function.","title":"(pm.)nylonGuitar"},{"location":"libs/physmodels/#usage_46","text":"nylonGuitar(length,pluckPosition,trigger) : _ Where: length : the length of the string in meters pluckPosition : pluck position (0-1) (1 is on the bridge) gain : gain of the excitation (0-1) trigger : trigger signal (1 for on, 0 for off)","title":"Usage"},{"location":"libs/physmodels/#pmnylonguitar_ui_midi","text":"Ready-to-use MIDI-enabled nylon strings acoustic guitar physical model with built-in UI.","title":"(pm.)nylonGuitar_ui_MIDI"},{"location":"libs/physmodels/#usage_47","text":"nylonGuitar_ui_MIDI : _","title":"Usage"},{"location":"libs/physmodels/#pmmodeinterpres","text":"Modular string instrument resonator based on IR measurements made on 3D printed models. The 2D space allowing for the control of the shape and the scale of the model is enabled by interpolating between modes parameters. More information about this technique/project can be found here: * https://ccrma.stanford.edu/~rmichon/3dPrintingModeling/ .","title":"(pm.)modeInterpRes"},{"location":"libs/physmodels/#usage_48","text":"_ : modeInterpRes(nModes,x,y) : _ Where: nModes : number of modeled modes (40 max) x : shape of the resonator (0: square, 1: square with rounded corners, 2: round) y : scale of the resonator (0: small, 1: medium, 2: large)","title":"Usage"},{"location":"libs/physmodels/#pmmodularinterpbody","text":"Bidirectional block implementing a modular string instrument resonator (see modeInterpRes ).","title":"(pm.)modularInterpBody"},{"location":"libs/physmodels/#usage_49","text":"chain(... : modularInterpBody(nModes,shape,scale) : ...) Where: nModes : number of modeled modes (40 max) shape : shape of the resonator (0: square, 1: square with rounded corners, 2: round) scale : scale of the resonator (0: small, 1: medium, 2: large)","title":"Usage"},{"location":"libs/physmodels/#pmmodularinterpstringmodel","text":"String instrument model with a modular body (see modeInterpRes and * https://ccrma.stanford.edu/~rmichon/3dPrintingModeling/ ).","title":"(pm.)modularInterpStringModel"},{"location":"libs/physmodels/#usage_50","text":"modularInterpStringModel(length,pluckPosition,shape,scale,bodyExcitation,stringExcitation) : _ Where: stringLength : the length of the string in meters pluckPosition : pluck position (0-1) (1 is on the bridge) shape : shape of the resonator (0: square, 1: square with rounded corners, 2: round) scale : scale of the resonator (0: small, 1: medium, 2: large) bodyExcitation : excitation signal for the body stringExcitation : excitation signal for the string","title":"Usage"},{"location":"libs/physmodels/#pmmodularinterpinstr","text":"String instrument with a modular body (see modeInterpRes and * https://ccrma.stanford.edu/~rmichon/3dPrintingModeling/ ).","title":"(pm.)modularInterpInstr"},{"location":"libs/physmodels/#usage_51","text":"modularInterpInstr(stringLength,pluckPosition,shape,scale,gain,tapBody,triggerString) : _ Where: stringLength : the length of the string in meters pluckPosition : pluck position (0-1) (1 is on the bridge) shape : shape of the resonator (0: square, 1: square with rounded corners, 2: round) scale : scale of the resonator (0: small, 1: medium, 2: large) gain : of the string excitation tapBody : send an impulse in the body of the instrument where the string is connected (1 for on, 0 for off) triggerString : trigger signal for the string (1 for on, 0 for off)","title":"Usage"},{"location":"libs/physmodels/#pmmodularinterpinstr_ui_midi","text":"Ready-to-use MIDI-enabled string instrument with a modular body (see modeInterpRes and * https://ccrma.stanford.edu/~rmichon/3dPrintingModeling/ ) with built-in UI.","title":"(pm.)modularInterpInstr_ui_MIDI"},{"location":"libs/physmodels/#usage_52","text":"modularInterpInstr_ui_MIDI : _","title":"Usage"},{"location":"libs/physmodels/#bowed-string-instruments","text":"Low and high level basic string instruments parts. Most of the elements in this section can be used in a bidirectional chain.","title":"Bowed String Instruments"},{"location":"libs/physmodels/#pmbowtable","text":"Extremely basic bow table that can be used to implement a wide range of bow types for many different bowed string instruments (violin, cello, etc.).","title":"(pm.)bowTable"},{"location":"libs/physmodels/#usage_53","text":"excitation : bowTable(offeset,slope) : _ Where: excitation : an excitation signal offset : table offset slope : table slope","title":"Usage"},{"location":"libs/physmodels/#pmviolinbowtable","text":"Violin bow table based on bowTable .","title":"(pm.)violinBowTable"},{"location":"libs/physmodels/#usage_54","text":"bowVelocity : violinBowTable(bowPressure) : _ Where: bowVelocity : velocity of the bow/excitation signal (0-1) bowPressure : bow pressure on the string (0-1)","title":"Usage"},{"location":"libs/physmodels/#pmbowinteraction","text":"Bidirectional block implementing the interaction of a bow in a chain .","title":"(pm.)bowInteraction"},{"location":"libs/physmodels/#usage_55","text":"chain(... : stringSegment : bowInteraction(bowTable) : stringSegment : ...) Where: bowTable : the bow table","title":"Usage"},{"location":"libs/physmodels/#pmviolinbow","text":"Bidirectional block implementing a violin bow and its interaction with a string.","title":"(pm.)violinBow"},{"location":"libs/physmodels/#usage_56","text":"chain(... : stringSegment : violinBow(bowPressure,bowVelocity) : stringSegment : ...) Where: bowVelocity : velocity of the bow / excitation signal (0-1) bowPressure : bow pressure on the string (0-1)","title":"Usage"},{"location":"libs/physmodels/#pmviolinbowedstring","text":"Violin bowed string bidirectional block with controllable bow position. Terminations are not implemented in this model.","title":"(pm.)violinBowedString"},{"location":"libs/physmodels/#usage_57","text":"chain(nuts : violinBowedString(stringLength,bowPressure,bowVelocity,bowPosition) : bridge) Where: stringLength : the length of the string in meters bowVelocity : velocity of the bow / excitation signal (0-1) bowPressure : bow pressure on the string (0-1) bowPosition : the position of the bow on the string (0-1)","title":"Usage"},{"location":"libs/physmodels/#pmviolinnuts","text":"Bidirectional block implementing simple violin nuts. This function is based on bridgeFilter .","title":"(pm.)violinNuts"},{"location":"libs/physmodels/#usage_58","text":"chain(violinNuts : stringSegment : ...)","title":"Usage"},{"location":"libs/physmodels/#pmviolinbridge","text":"Bidirectional block implementing a simple violin bridge. This function is based on bridgeFilter .","title":"(pm.)violinBridge"},{"location":"libs/physmodels/#usage_59","text":"chain(... : stringSegment : violinBridge","title":"Usage"},{"location":"libs/physmodels/#pmviolinbody","text":"Bidirectional block implementing a simple violin body (just a simple resonant lowpass filter).","title":"(pm.)violinBody"},{"location":"libs/physmodels/#usage_60","text":"chain(... : stringSegment : violinBridge : violinBody)","title":"Usage"},{"location":"libs/physmodels/#pmviolinmodel","text":"Ready-to-use simple violin physical model. This model implements a single string. Additional strings should be created by making a polyphonic application out of this function. Pitch is changed by changing the length of the string (and not through a finger model).","title":"(pm.)violinModel"},{"location":"libs/physmodels/#usage_61","text":"violinModel(stringLength,bowPressure,bowVelocity,bridgeReflexion, bridgeAbsorption,bowPosition) : _ Where: stringLength : the length of the string in meters bowVelocity : velocity of the bow / excitation signal (0-1) bowPressure : bow pressure on the string (0-1)) bowPosition : the position of the bow on the string (0-1)","title":"Usage"},{"location":"libs/physmodels/#pmviolin_ui","text":"Ready-to-use violin physical model with built-in UI.","title":"(pm.)violin_ui"},{"location":"libs/physmodels/#usage_62","text":"violinModel_ui : _","title":"Usage"},{"location":"libs/physmodels/#pmviolin_ui_midi","text":"Ready-to-use MIDI-enabled violin physical model with built-in UI.","title":"(pm.)violin_ui_MIDI"},{"location":"libs/physmodels/#usage_63","text":"violin_ui_MIDI : _","title":"Usage"},{"location":"libs/physmodels/#wind-instruments","text":"Low and high level basic wind instruments parts. Most of the elements in this section can be used in a bidirectional chain.","title":"Wind Instruments"},{"location":"libs/physmodels/#pmopentube","text":"A tube segment without terminations (same as stringSegment ).","title":"(pm.)openTube"},{"location":"libs/physmodels/#usage_64","text":"chain(A : openTube(maxLength,length) : B) Where: maxLength : the maximum length of the tube in meters (should be static) length : the length of the tube in meters","title":"Usage"},{"location":"libs/physmodels/#pmreedtable","text":"Extremely basic reed table that can be used to implement a wide range of single reed types for many different instruments (saxophone, clarinet, etc.).","title":"(pm.)reedTable"},{"location":"libs/physmodels/#usage_65","text":"excitation : reedTable(offeset,slope) : _ Where: excitation : an excitation signal offset : table offset slope : table slope","title":"Usage"},{"location":"libs/physmodels/#pmflutejettable","text":"Extremely basic flute jet table.","title":"(pm.)fluteJetTable"},{"location":"libs/physmodels/#usage_66","text":"excitation : fluteJetTable : _ Where: excitation : an excitation signal","title":"Usage"},{"location":"libs/physmodels/#pmbrasslipstable","text":"Simple brass lips/mouthpiece table. Since this implementation is very basic and that the lips and tube of the instrument are coupled to each other, the length of that tube must be provided here.","title":"(pm.)brassLipsTable"},{"location":"libs/physmodels/#usage_67","text":"excitation : brassLipsTable(tubeLength,lipsTension) : _ Where: excitation : an excitation signal (can be DC) tubeLength : length in meters of the tube connected to the mouthpiece lipsTension : tension of the lips (0-1) (default: 0.5)","title":"Usage"},{"location":"libs/physmodels/#pmclarinetreed","text":"Clarinet reed based on reedTable with controllable stiffness.","title":"(pm.)clarinetReed"},{"location":"libs/physmodels/#usage_68","text":"excitation : clarinetReed(stiffness) : _ Where: excitation : an excitation signal stiffness : reed stiffness (0-1)","title":"Usage"},{"location":"libs/physmodels/#pmclarinetmouthpiece","text":"Bidirectional block implementing a clarinet mouthpiece as well as the various interactions happening with traveling waves. This element is ready to be plugged to a tube...","title":"(pm.)clarinetMouthPiece"},{"location":"libs/physmodels/#usage_69","text":"chain(clarinetMouthPiece(reedStiffness,pressure) : tube : etc.) Where: pressure : the pressure of the air flow (DC) created by the virtual performer (0-1). This can also be any kind of signal that will directly injected in the mouthpiece (e.g., breath noise, etc.). reedStiffness : reed stiffness (0-1)","title":"Usage"},{"location":"libs/physmodels/#pmbrasslips","text":"Bidirectional block implementing a brass mouthpiece as well as the various interactions happening with traveling waves. This element is ready to be plugged to a tube...","title":"(pm.)brassLips"},{"location":"libs/physmodels/#usage_70","text":"chain(brassLips(tubeLength,lipsTension,pressure) : tube : etc.) Where: tubeLength : length in meters of the tube connected to the mouthpiece lipsTension : tension of the lips (0-1) (default: 0.5) pressure : the pressure of the air flow (DC) created by the virtual performer (0-1). This can also be any kind of signal that will directly injected in the mouthpiece (e.g., breath noise, etc.).","title":"Usage"},{"location":"libs/physmodels/#pmfluteembouchure","text":"Bidirectional block implementing a flute embouchure as well as the various interactions happening with traveling waves. This element is ready to be plugged between tubes segments...","title":"(pm.)fluteEmbouchure"},{"location":"libs/physmodels/#usage_71","text":"chain(... : tube : fluteEmbouchure(pressure) : tube : etc.) Where: pressure : the pressure of the air flow (DC) created by the virtual performer (0-1). This can also be any kind of signal that will directly injected in the mouthpiece (e.g., breath noise, etc.).","title":"Usage"},{"location":"libs/physmodels/#pmwbell","text":"Generic wind instrument bell bidirectional block that should be placed at the end of a chain .","title":"(pm.)wBell"},{"location":"libs/physmodels/#usage_72","text":"chain(... : wBell(opening)) Where: opening : the \"opening\" of bell (0-1)","title":"Usage"},{"location":"libs/physmodels/#pmflutehead","text":"Simple flute head implementing waves reflexion.","title":"(pm.)fluteHead"},{"location":"libs/physmodels/#usage_73","text":"chain(fluteHead : tube : ...)","title":"Usage"},{"location":"libs/physmodels/#pmflutefoot","text":"Simple flute foot implementing waves reflexion and dispersion.","title":"(pm.)fluteFoot"},{"location":"libs/physmodels/#usage_74","text":"chain(... : tube : fluteFoot)","title":"Usage"},{"location":"libs/physmodels/#pmclarinetmodel","text":"A simple clarinet physical model without tone holes (pitch is changed by changing the length of the tube of the instrument).","title":"(pm.)clarinetModel"},{"location":"libs/physmodels/#usage_75","text":"clarinetModel(length,pressure,reedStiffness,bellOpening) : _ Where: tubeLength : the length of the tube in meters pressure : the pressure of the air flow created by the virtual performer (0-1). This can also be any kind of signal that will directly injected in the mouthpiece (e.g., breath noise, etc.). reedStiffness : reed stiffness (0-1) bellOpening : the opening of bell (0-1)","title":"Usage"},{"location":"libs/physmodels/#pmclarinetmodel_ui","text":"Same as clarinetModel but with a built-in UI. This function doesn't implement a virtual \"blower\", thus pressure remains an argument here.","title":"(pm.)clarinetModel_ui"},{"location":"libs/physmodels/#usage_76","text":"clarinetModel_ui(pressure) : _ Where: pressure : the pressure of the air flow created by the virtual performer (0-1). This can also be any kind of signal that will be directly injected in the mouthpiece (e.g., breath noise, etc.).","title":"Usage"},{"location":"libs/physmodels/#pmclarinet_ui","text":"Ready-to-use clarinet physical model with built-in UI based on clarinetModel .","title":"(pm.)clarinet_ui"},{"location":"libs/physmodels/#usage_77","text":"clarinet_ui : _","title":"Usage"},{"location":"libs/physmodels/#pmclarinet_ui_midi","text":"Ready-to-use MIDI compliant clarinet physical model with built-in UI.","title":"(pm.)clarinet_ui_MIDI"},{"location":"libs/physmodels/#usage_78","text":"clarinet_ui_MIDI : _","title":"Usage"},{"location":"libs/physmodels/#pmbrassmodel","text":"A simple generic brass instrument physical model without pistons (pitch is changed by changing the length of the tube of the instrument). This model is kind of hard to control and might not sound very good if bad parameters are given to it...","title":"(pm.)brassModel"},{"location":"libs/physmodels/#usage_79","text":"brassModel(tubeLength,lipsTension,mute,pressure) : _ Where: tubeLength : the length of the tube in meters lipsTension : tension of the lips (0-1) (default: 0.5) mute : mute opening at the end of the instrument (0-1) (default: 0.5) pressure : the pressure of the air flow created by the virtual performer (0-1). This can also be any kind of signal that will directly injected in the mouthpiece (e.g., breath noise, etc.).","title":"Usage"},{"location":"libs/physmodels/#pmbrassmodel_ui","text":"Same as brassModel but with a built-in UI. This function doesn't implement a virtual \"blower\", thus pressure remains an argument here.","title":"(pm.)brassModel_ui"},{"location":"libs/physmodels/#usage_80","text":"brassModel_ui(pressure) : _ Where: pressure : the pressure of the air flow created by the virtual performer (0-1). This can also be any kind of signal that will be directly injected in the mouthpiece (e.g., breath noise, etc.).","title":"Usage"},{"location":"libs/physmodels/#pmbrass_ui","text":"Ready-to-use brass instrument physical model with built-in UI based on brassModel .","title":"(pm.)brass_ui"},{"location":"libs/physmodels/#usage_81","text":"brass_ui : _","title":"Usage"},{"location":"libs/physmodels/#pmbrass_ui_midi","text":"Ready-to-use MIDI-controllable brass instrument physical model with built-in UI.","title":"(pm.)brass_ui_MIDI"},{"location":"libs/physmodels/#usage_82","text":"brass_ui_MIDI : _","title":"Usage"},{"location":"libs/physmodels/#pmflutemodel","text":"A simple generic flute instrument physical model without tone holes (pitch is changed by changing the length of the tube of the instrument).","title":"(pm.)fluteModel"},{"location":"libs/physmodels/#usage_83","text":"fluteModel(tubeLength,mouthPosition,pressure) : _ Where: tubeLength : the length of the tube in meters mouthPosition : position of the mouth on the embouchure (0-1) (default: 0.5) pressure : the pressure of the air flow created by the virtual performer (0-1). This can also be any kind of signal that will directly injected in the mouthpiece (e.g., breath noise, etc.).","title":"Usage"},{"location":"libs/physmodels/#pmflutemodel_ui","text":"Same as fluteModel but with a built-in UI. This function doesn't implement a virtual \"blower\", thus pressure remains an argument here.","title":"(pm.)fluteModel_ui"},{"location":"libs/physmodels/#usage_84","text":"fluteModel_ui(pressure) : _ Where: pressure : the pressure of the air flow created by the virtual performer (0-1). This can also be any kind of signal that will be directly injected in the mouthpiece (e.g., breath noise, etc.).","title":"Usage"},{"location":"libs/physmodels/#pmflute_ui","text":"Ready-to-use flute physical model with built-in UI based on fluteModel .","title":"(pm.)flute_ui"},{"location":"libs/physmodels/#usage_85","text":"flute_ui : _","title":"Usage"},{"location":"libs/physmodels/#pmflute_ui_midi","text":"Ready-to-use MIDI-controllable flute physical model with built-in UI.","title":"(pm.)flute_ui_MIDI"},{"location":"libs/physmodels/#usage_86","text":"flute_ui_MIDI : _","title":"Usage"},{"location":"libs/physmodels/#exciters","text":"Various kind of excitation signal generators.","title":"Exciters"},{"location":"libs/physmodels/#pmimpulseexcitation","text":"Creates an impulse excitation of one sample.","title":"(pm.)impulseExcitation"},{"location":"libs/physmodels/#usage_87","text":"gate = button('gate'); impulseExcitation(gate) : chain; Where: gate : a gate button","title":"Usage"},{"location":"libs/physmodels/#pmstrikemodel","text":"Creates a filtered noise excitation.","title":"(pm.)strikeModel"},{"location":"libs/physmodels/#usage_88","text":"gate = button('gate'); strikeModel(LPcutoff,HPcutoff,sharpness,gain,gate) : chain; Where: HPcutoff : highpass cutoff frequency LPcutoff : lowpass cutoff frequency sharpness : sharpness of the attack and release (0-1) gain : gain of the excitation gate : a gate button/trigger signal (0/1)","title":"Usage"},{"location":"libs/physmodels/#pmstrike","text":"Strikes generator with controllable excitation position.","title":"(pm.)strike"},{"location":"libs/physmodels/#usage_89","text":"gate = button('gate'); strike(exPos,sharpness,gain,gate) : chain; Where: exPos : excitation position wiht 0: for max low freqs and 1: for max high freqs. So, on membrane for example, 0 would be the middle and 1 the edge sharpness : sharpness of the attack and release (0-1) gain : gain of the excitation gate : a gate button/trigger signal (0/1)","title":"Usage"},{"location":"libs/physmodels/#pmpluckstring","text":"Creates a plucking excitation signal.","title":"(pm.)pluckString"},{"location":"libs/physmodels/#usage_90","text":"trigger = button('gate'); pluckString(stringLength,cutoff,maxFreq,sharpness,trigger) Where: stringLength : length of the string to pluck cutoff : cutoff ratio (1 for default) maxFreq : max frequency ratio (1 for default) sharpness : sharpness of the attack and release (1 for default) gain : gain of the excitation (0-1) trigger : trigger signal (1 for on, 0 for off)","title":"Usage"},{"location":"libs/physmodels/#pmblower","text":"A virtual blower creating a DC signal with some breath noise in it.","title":"(pm.)blower"},{"location":"libs/physmodels/#usage_91","text":"blower(pressure,breathGain,breathCutoff) : _ Where: pressure : pressure (0-1) breathGain : breath noise gain (0-1) (recommended: 0.005) breathCutoff : breath cuttoff frequency (Hz) (recommended: 2000)","title":"Usage"},{"location":"libs/physmodels/#pmblower_ui","text":"Same as blower but with a built-in UI.","title":"(pm.)blower_ui"},{"location":"libs/physmodels/#usage_92","text":"blower : somethingToBeBlown","title":"Usage"},{"location":"libs/physmodels/#modal-percussions","text":"High and low level functions for modal synthesis of percussion instruments.","title":"Modal Percussions"},{"location":"libs/physmodels/#pmdjembemodel","text":"Dirt-simple djembe modal physical model. Mode parameters are empirically calculated and don't correspond to any measurements or 3D model. They kind of sound good though :).","title":"(pm.)djembeModel"},{"location":"libs/physmodels/#usage_93","text":"excitation : djembeModel(freq) Where: excitation : excitation signal freq : fundamental frequency of the bar","title":"Usage"},{"location":"libs/physmodels/#pmdjembe","text":"Dirt-simple djembe modal physical model. Mode parameters are empirically calculated and don't correspond to any measurements or 3D model. They kind of sound good though :). This model also implements a virtual \"exciter\".","title":"(pm.)djembe"},{"location":"libs/physmodels/#usage_94","text":"djembe(freq,strikePosition,strikeSharpness,gain,trigger) Where: freq : fundamental frequency of the model strikePosition : strike position (0 for the middle of the membrane and 1 for the edge) strikeSharpness : sharpness of the strike (0-1, default: 0.5) gain : gain of the strike trigger : trigger signal (0: off, 1: on)","title":"Usage"},{"location":"libs/physmodels/#pmdjembe_ui_midi","text":"Simple MIDI controllable djembe physical model with built-in UI.","title":"(pm.)djembe_ui_MIDI"},{"location":"libs/physmodels/#usage_95","text":"djembe_ui_MIDI : _","title":"Usage"},{"location":"libs/physmodels/#pmmarimbabarmodel","text":"Generic marimba tone bar modal model. This model was generated using mesh2faust from a 3D CAD model of a marimba tone bar ( libraries/modalmodels/marimbaBar ). The corresponding CAD model is that of a C2 tone bar (original fundamental frequency: ~65Hz). While marimbaBarModel allows to translate the harmonic content of the generated sound by providing a frequency ( freq ), mode transposition has limits and the model will sound less and less like a marimba tone bar as it diverges from C2. To make an accurate model of a marimba, we'd want to have an independent model for each bar... This model contains 5 excitation positions going linearly from the center bottom to the center top of the bar. Obviously, a model with more excitation position could be regenerated using mesh2faust .","title":"(pm.)marimbaBarModel"},{"location":"libs/physmodels/#usage_96","text":"excitation : marimbaBarModel(freq,exPos,t60,t60DecayRatio,t60DecaySlope) Where: excitation : excitation signal freq : fundamental frequency of the bar exPos : excitation position (0-4) t60 : T60 in seconds (recommended value: 0.1) t60DecayRatio : T60 decay ratio (recommended value: 1) t60DecaySlope : T60 decay slope (recommended value: 5)","title":"Usage"},{"location":"libs/physmodels/#pmmarimbarestube","text":"Simple marimba resonance tube.","title":"(pm.)marimbaResTube"},{"location":"libs/physmodels/#usage_97","text":"marimbaResTube(tubeLength,excitation) Where: tubeLength : the length of the tube in meters excitation : the excitation signal (audio in)","title":"Usage"},{"location":"libs/physmodels/#pmmarimbamodel","text":"Simple marimba physical model implementing a single tone bar connected to tube. This model is scalable and can be adapted to any size of bar/tube (see marimbaBarModel to know more about the limitations of this type of system).","title":"(pm.)marimbaModel"},{"location":"libs/physmodels/#usage_98","text":"excitation : marimbaModel(freq,exPos) : _ Where: freq : the frequency of the bar/tube couple exPos : excitation position (0-4)","title":"Usage"},{"location":"libs/physmodels/#pmmarimba","text":"Simple marimba physical model implementing a single tone bar connected to tube. This model is scalable and can be adapted to any size of bar/tube (see marimbaBarModel to know more about the limitations of this type of system). This function also implement a virtual exciter to drive the model.","title":"(pm.)marimba"},{"location":"libs/physmodels/#usage_99","text":"excitation : marimba(freq,strikePosition,strikeCutoff,strikeSharpness,gain,trigger) : _ Where: excitation : the excitation signal freq : the frequency of the bar/tube couple strikePosition : strike position (0-4) strikeCutoff : cuttoff frequency of the strike genarator (recommended: ~7000Hz) strikeSharpness : sharpness of the strike (recommended: ~0.25) gain : gain of the strike (0-1) trigger signal (0: off, 1: on)","title":"Usage"},{"location":"libs/physmodels/#pmmarimba_ui_midi","text":"Simple MIDI controllable marimba physical model with built-in UI implementing a single tone bar connected to tube. This model is scalable and can be adapted to any size of bar/tube (see marimbaBarModel to know more about the limitations of this type of system).","title":"(pm.)marimba_ui_MIDI"},{"location":"libs/physmodels/#usage_100","text":"marimba_ui_MIDI : _","title":"Usage"},{"location":"libs/physmodels/#pmchurchbellmodel","text":"Generic church bell modal model generated by mesh2faust from libraries/modalmodels/churchBell . Modeled after T. Rossing and R. Perrin, Vibrations of Bells, Applied Acoustics 2, 1987. Model height is 301 mm. This model contains 7 excitation positions going linearly from the bottom to the top of the bell. Obviously, a model with more excitation position could be regenerated using mesh2faust .","title":"(pm.)churchBellModel"},{"location":"libs/physmodels/#usage_101","text":"excitation : churchBellModel(nModes,exPos,t60,t60DecayRatio,t60DecaySlope) Where: excitation : the excitation signal nModes : number of synthesized modes (max: 50) exPos : excitation position (0-6) t60 : T60 in seconds (recommended value: 0.1) t60DecayRatio : T60 decay ratio (recommended value: 1) t60DecaySlope : T60 decay slope (recommended value: 5)","title":"Usage"},{"location":"libs/physmodels/#pmchurchbell","text":"Generic church bell modal model. Modeled after T. Rossing and R. Perrin, Vibrations of Bells, Applied Acoustics 2, 1987. Model height is 301 mm. This model contains 7 excitation positions going linearly from the bottom to the top of the bell. Obviously, a model with more excitation position could be regenerated using mesh2faust . This function also implement a virtual exciter to drive the model.","title":"(pm.)churchBell"},{"location":"libs/physmodels/#usage_102","text":"excitation : churchBell(strikePosition,strikeCutoff,strikeSharpness,gain,trigger) : _ Where: excitation : the excitation signal strikePosition : strike position (0-6) strikeCutoff : cuttoff frequency of the strike genarator (recommended: ~7000Hz) strikeSharpness : sharpness of the strike (recommended: ~0.25) gain : gain of the strike (0-1) trigger signal (0: off, 1: on)","title":"Usage"},{"location":"libs/physmodels/#pmchurchbell_ui","text":"Church bell physical model based on churchBell with built-in UI.","title":"(pm.)churchBell_ui"},{"location":"libs/physmodels/#usage_103","text":"churchBell_ui : _","title":"Usage"},{"location":"libs/physmodels/#pmenglishbellmodel","text":"English church bell modal model generated by mesh2faust from libraries/modalmodels/englishBell . Modeled after D.Bartocha and Baron, Influence of Tin Bronze Melting and Pouring Parameters on Its Properties and Bell' Tone, Archives of Foundry Engineering, 2016. Model height is 1 m. This model contains 7 excitation positions going linearly from the bottom to the top of the bell. Obviously, a model with more excitation position could be regenerated using mesh2faust .","title":"(pm.)englishBellModel"},{"location":"libs/physmodels/#usage_104","text":"excitation : englishBellModel(nModes,exPos,t60,t60DecayRatio,t60DecaySlope) Where: excitation : the excitation signal nModes : number of synthesized modes (max: 50) exPos : excitation position (0-6) t60 : T60 in seconds (recommended value: 0.1) t60DecayRatio : T60 decay ratio (recommended value: 1) t60DecaySlope : T60 decay slope (recommended value: 5)","title":"Usage"},{"location":"libs/physmodels/#pmenglishbell","text":"English church bell modal model. Modeled after D.Bartocha and Baron, Influence of Tin Bronze Melting and Pouring Parameters on Its Properties and Bell' Tone, Archives of Foundry Engineering, 2016. Model height is 1 m. This model contains 7 excitation positions going linearly from the bottom to the top of the bell. Obviously, a model with more excitation position could be regenerated using mesh2faust . This function also implement a virtual exciter to drive the model.","title":"(pm.)englishBell"},{"location":"libs/physmodels/#usage_105","text":"excitation : englishBell(strikePosition,strikeCutoff,strikeSharpness,gain,trigger) : _ Where: excitation : the excitation signal strikePosition : strike position (0-6) strikeCutoff : cuttoff frequency of the strike genarator (recommended: ~7000Hz) strikeSharpness : sharpness of the strike (recommended: ~0.25) gain : gain of the strike (0-1) trigger signal (0: off, 1: on)","title":"Usage"},{"location":"libs/physmodels/#pmenglishbell_ui","text":"English church bell physical model based on englishBell with built-in UI.","title":"(pm.)englishBell_ui"},{"location":"libs/physmodels/#usage_106","text":"englishBell_ui : _","title":"Usage"},{"location":"libs/physmodels/#pmfrenchbellmodel","text":"French church bell modal model generated by mesh2faust from libraries/modalmodels/frenchBell . Modeled after D.Bartocha and Baron, Influence of Tin Bronze Melting and Pouring Parameters on Its Properties and Bell' Tone, Archives of Foundry Engineering, 2016. Model height is 1 m. This model contains 7 excitation positions going linearly from the bottom to the top of the bell. Obviously, a model with more excitation position could be regenerated using mesh2faust .","title":"(pm.)frenchBellModel"},{"location":"libs/physmodels/#usage_107","text":"excitation : frenchBellModel(nModes,exPos,t60,t60DecayRatio,t60DecaySlope) Where: excitation : the excitation signal nModes : number of synthesized modes (max: 50) exPos : excitation position (0-6) t60 : T60 in seconds (recommended value: 0.1) t60DecayRatio : T60 decay ratio (recommended value: 1) t60DecaySlope : T60 decay slope (recommended value: 5)","title":"Usage"},{"location":"libs/physmodels/#pmfrenchbell","text":"French church bell modal model. Modeled after D.Bartocha and Baron, Influence of Tin Bronze Melting and Pouring Parameters on Its Properties and Bell' Tone, Archives of Foundry Engineering, 2016. Model height is 1 m. This model contains 7 excitation positions going linearly from the bottom to the top of the bell. Obviously, a model with more excitation position could be regenerated using mesh2faust . This function also implement a virtual exciter to drive the model.","title":"(pm.)frenchBell"},{"location":"libs/physmodels/#usage_108","text":"excitation : frenchBell(strikePosition,strikeCutoff,strikeSharpness,gain,trigger) : _ Where: excitation : the excitation signal strikePosition : strike position (0-6) strikeCutoff : cuttoff frequency of the strike genarator (recommended: ~7000Hz) strikeSharpness : sharpness of the strike (recommended: ~0.25) gain : gain of the strike (0-1) trigger signal (0: off, 1: on)","title":"Usage"},{"location":"libs/physmodels/#pmfrenchbell_ui","text":"French church bell physical model based on frenchBell with built-in UI.","title":"(pm.)frenchBell_ui"},{"location":"libs/physmodels/#usage_109","text":"frenchBell_ui : _","title":"Usage"},{"location":"libs/physmodels/#pmgermanbellmodel","text":"German church bell modal model generated by mesh2faust from libraries/modalmodels/germanBell . Modeled after D.Bartocha and Baron, Influence of Tin Bronze Melting and Pouring Parameters on Its Properties and Bell' Tone, Archives of Foundry Engineering, 2016. Model height is 1 m. This model contains 7 excitation positions going linearly from the bottom to the top of the bell. Obviously, a model with more excitation position could be regenerated using mesh2faust .","title":"(pm.)germanBellModel"},{"location":"libs/physmodels/#usage_110","text":"excitation : germanBellModel(nModes,exPos,t60,t60DecayRatio,t60DecaySlope) Where: excitation : the excitation signal nModes : number of synthesized modes (max: 50) exPos : excitation position (0-6) t60 : T60 in seconds (recommended value: 0.1) t60DecayRatio : T60 decay ratio (recommended value: 1) t60DecaySlope : T60 decay slope (recommended value: 5)","title":"Usage"},{"location":"libs/physmodels/#pmgermanbell","text":"German church bell modal model. Modeled after D.Bartocha and Baron, Influence of Tin Bronze Melting and Pouring Parameters on Its Properties and Bell' Tone, Archives of Foundry Engineering, 2016. Model height is 1 m. This model contains 7 excitation positions going linearly from the bottom to the top of the bell. Obviously, a model with more excitation position could be regenerated using mesh2faust . This function also implement a virtual exciter to drive the model.","title":"(pm.)germanBell"},{"location":"libs/physmodels/#usage_111","text":"excitation : germanBell(strikePosition,strikeCutoff,strikeSharpness,gain,trigger) : _ Where: excitation : the excitation signal strikePosition : strike position (0-6) strikeCutoff : cuttoff frequency of the strike genarator (recommended: ~7000Hz) strikeSharpness : sharpness of the strike (recommended: ~0.25) gain : gain of the strike (0-1) trigger signal (0: off, 1: on)","title":"Usage"},{"location":"libs/physmodels/#pmgermanbell_ui","text":"German church bell physical model based on germanBell with built-in UI.","title":"(pm.)germanBell_ui"},{"location":"libs/physmodels/#usage_112","text":"germanBell_ui : _","title":"Usage"},{"location":"libs/physmodels/#pmrussianbellmodel","text":"Russian church bell modal model generated by mesh2faust from libraries/modalmodels/russianBell . Modeled after D.Bartocha and Baron, Influence of Tin Bronze Melting and Pouring Parameters on Its Properties and Bell' Tone, Archives of Foundry Engineering, 2016. Model height is 2 m. This model contains 7 excitation positions going linearly from the bottom to the top of the bell. Obviously, a model with more excitation position could be regenerated using mesh2faust .","title":"(pm.)russianBellModel"},{"location":"libs/physmodels/#usage_113","text":"excitation : russianBellModel(nModes,exPos,t60,t60DecayRatio,t60DecaySlope) Where: excitation : the excitation signal nModes : number of synthesized modes (max: 50) exPos : excitation position (0-6) t60 : T60 in seconds (recommended value: 0.1) t60DecayRatio : T60 decay ratio (recommended value: 1) t60DecaySlope : T60 decay slope (recommended value: 5)","title":"Usage"},{"location":"libs/physmodels/#pmrussianbell","text":"Russian church bell modal model. Modeled after D.Bartocha and Baron, Influence of Tin Bronze Melting and Pouring Parameters on Its Properties and Bell' Tone, Archives of Foundry Engineering, 2016. Model height is 2 m. This model contains 7 excitation positions going linearly from the bottom to the top of the bell. Obviously, a model with more excitation position could be regenerated using mesh2faust . This function also implement a virtual exciter to drive the model.","title":"(pm.)russianBell"},{"location":"libs/physmodels/#usage_114","text":"excitation : russianBell(strikePosition,strikeCutoff,strikeSharpness,gain,trigger) : _ Where: excitation : the excitation signal strikePosition : strike position (0-6) strikeCutoff : cuttoff frequency of the strike genarator (recommended: ~7000Hz) strikeSharpness : sharpness of the strike (recommended: ~0.25) gain : gain of the strike (0-1) trigger signal (0: off, 1: on)","title":"Usage"},{"location":"libs/physmodels/#pmrussianbell_ui","text":"Russian church bell physical model based on russianBell with built-in UI.","title":"(pm.)russianBell_ui"},{"location":"libs/physmodels/#usage_115","text":"russianBell_ui : _","title":"Usage"},{"location":"libs/physmodels/#pmstandardbellmodel","text":"Standard church bell modal model generated by mesh2faust from libraries/modalmodels/standardBell . Modeled after T. Rossing and R. Perrin, Vibrations of Bells, Applied Acoustics 2, 1987. Model height is 1.8 m. This model contains 7 excitation positions going linearly from the bottom to the top of the bell. Obviously, a model with more excitation position could be regenerated using mesh2faust .","title":"(pm.)standardBellModel"},{"location":"libs/physmodels/#usage_116","text":"excitation : standardBellModel(nModes,exPos,t60,t60DecayRatio,t60DecaySlope) Where: excitation : the excitation signal nModes : number of synthesized modes (max: 50) exPos : excitation position (0-6) t60 : T60 in seconds (recommended value: 0.1) t60DecayRatio : T60 decay ratio (recommended value: 1) t60DecaySlope : T60 decay slope (recommended value: 5)","title":"Usage"},{"location":"libs/physmodels/#pmstandardbell","text":"Standard church bell modal model. Modeled after T. Rossing and R. Perrin, Vibrations of Bells, Applied Acoustics 2, 1987. Model height is 1.8 m. This model contains 7 excitation positions going linearly from the bottom to the top of the bell. Obviously, a model with more excitation position could be regenerated using mesh2faust . This function also implement a virtual exciter to drive the model.","title":"(pm.)standardBell"},{"location":"libs/physmodels/#usage_117","text":"excitation : standardBell(strikePosition,strikeCutoff,strikeSharpness,gain,trigger) : _ Where: excitation : the excitation signal strikePosition : strike position (0-6) strikeCutoff : cuttoff frequency of the strike genarator (recommended: ~7000Hz) strikeSharpness : sharpness of the strike (recommended: ~0.25) gain : gain of the strike (0-1) trigger signal (0: off, 1: on)","title":"Usage"},{"location":"libs/physmodels/#pmstandardbell_ui","text":"Standard church bell physical model based on standardBell with built-in UI.","title":"(pm.)standardBell_ui"},{"location":"libs/physmodels/#usage_118","text":"standardBell_ui : _","title":"Usage"},{"location":"libs/physmodels/#vocal-synthesis","text":"Vocal synthesizer functions (source/filter, fof, etc.).","title":"Vocal Synthesis"},{"location":"libs/physmodels/#pmformantvalues","text":"Formant data values. The formant data used here come from the CSOUND manual * http://www.csounds.com/manual/html/ .","title":"(pm.)formantValues"},{"location":"libs/physmodels/#usage_119","text":"ba.take(j+1,formantValues.f(i)) : _ ba.take(j+1,formantValues.g(i)) : _ ba.take(j+1,formantValues.bw(i)) : _ Where: i : formant number j : (voiceType*nFormants)+vowel voiceType : the voice type (0: alto, 1: bass, 2: countertenor, 3: soprano, 4: tenor) vowel : the vowel (0: a, 1: e, 2: i, 3: o, 4: u)","title":"Usage"},{"location":"libs/physmodels/#pmvoicegender","text":"Calculate the gender for the provided voiceType value. (0: male, 1: female)","title":"(pm.)voiceGender"},{"location":"libs/physmodels/#usage_120","text":"voiceGender(voiceType) : _ Where: voiceType : the voice type (0: alto, 1: bass, 2: countertenor, 3: soprano, 4: tenor)","title":"Usage"},{"location":"libs/physmodels/#pmskirtwidthmultiplier","text":"Calculates value to multiply bandwidth to obtain skirtwidth for a Fof filter.","title":"(pm.)skirtWidthMultiplier"},{"location":"libs/physmodels/#usage_121","text":"skirtWidthMultiplier(vowel,freq,gender) : _ Where: vowel : the vowel (0: a, 1: e, 2: i, 3: o, 4: u) freq : the fundamental frequency of the excitation signal gender : gender of the voice used in the fof filter (0: male, 1: female)","title":"Usage"},{"location":"libs/physmodels/#pmautobendfreq","text":"Autobends the center frequencies of formants 1 and 2 based on the fundamental frequency of the excitation signal and leaves all other formant frequencies unchanged. Ported from chant-lib .","title":"(pm.)autobendFreq"},{"location":"libs/physmodels/#reference","text":"https://ccrma.stanford.edu/~rmichon/chantLib/ .","title":"Reference"},{"location":"libs/physmodels/#usage_122","text":"_ : autobendFreq(n,freq,voiceType) : _ Where: n : formant index freq : the fundamental frequency of the excitation signal voiceType : the voice type (0: alto, 1: bass, 2: countertenor, 3: soprano, 4: tenor) input is the center frequency of the corresponding formant","title":"Usage"},{"location":"libs/physmodels/#pmvocaleffort","text":"Changes the gains of the formants based on the fundamental frequency of the excitation signal. Higher formants are reinforced for higher fundamental frequencies. Ported from chant-lib .","title":"(pm.)vocalEffort"},{"location":"libs/physmodels/#reference_1","text":"https://ccrma.stanford.edu/~rmichon/chantLib/ .","title":"Reference"},{"location":"libs/physmodels/#usage_123","text":"_ : vocalEffort(freq,gender) : _ Where: freq : the fundamental frequency of the excitation signal gender : the gender of the voice type (0: male, 1: female) input is the linear amplitude of the formant","title":"Usage"},{"location":"libs/physmodels/#pmfof","text":"Function to generate a single Formant-Wave-Function.","title":"(pm.)fof"},{"location":"libs/physmodels/#reference_2","text":"https://ccrma.stanford.edu/~mjolsen/pdfs/smc2016_MOlsenFOF.pdf .","title":"Reference"},{"location":"libs/physmodels/#usage_124","text":"_ : fof(fc,bw,a,g) : _ Where: fc : formant center frequency, bw : formant bandwidth (Hz), sw : formant skirtwidth (Hz) g : linear scale factor (g=1 gives 0dB amplitude response at fc) input is an impulse signal to excite filter","title":"Usage"},{"location":"libs/physmodels/#pmfofsh","text":"FOF with sample and hold used on bw and a parameter used in the filter-cycling FOF function fofCycle .","title":"(pm.)fofSH"},{"location":"libs/physmodels/#reference_3","text":"https://ccrma.stanford.edu/~mjolsen/pdfs/smc2016_MOlsenFOF.pdf .","title":"Reference"},{"location":"libs/physmodels/#usage_125","text":"_ : fofSH(fc,bw,a,g) : _ Where: all parameters same as for fof","title":"Usage"},{"location":"libs/physmodels/#pmfofcycle","text":"FOF implementation where time-varying filter parameter noise is mitigated by using a cycle of n sample and hold FOF filters.","title":"(pm.)fofCycle"},{"location":"libs/physmodels/#reference_4","text":"https://ccrma.stanford.edu/~mjolsen/pdfs/smc2016_MOlsenFOF.pdf .","title":"Reference"},{"location":"libs/physmodels/#usage_126","text":"_ : fofCycle(fc,bw,a,g,n) : _ Where: n : the number of FOF filters to cycle through all other parameters are same as for fof","title":"Usage"},{"location":"libs/physmodels/#pmfofsmooth","text":"FOF implementation where time-varying filter parameter noise is mitigated by lowpass filtering the filter parameters bw and a with smooth .","title":"(pm.)fofSmooth"},{"location":"libs/physmodels/#usage_127","text":"_ : fofSmooth(fc,bw,sw,g,tau) : _ Where: tau : the desired smoothing time constant in seconds all other parameters are same as for fof","title":"Usage"},{"location":"libs/physmodels/#pmformantfilterfofcycle","text":"Formant filter based on a single FOF filter. Formant parameters are linearly interpolated allowing to go smoothly from one vowel to another. A cycle of n fof filters with sample-and-hold is used so that the fof filter parameters can be varied in realtime. This technique is more robust but more computationally expensive than formantFilterFofSmooth .Voice type can be selected but must correspond to the frequency range of the provided source to be realistic.","title":"(pm.)formantFilterFofCycle"},{"location":"libs/physmodels/#usage_128","text":"_ : formantFilterFofCycle(voiceType,vowel,nFormants,i,freq) : _ Where: voiceType : the voice type (0: alto, 1: bass, 2: countertenor, 3: soprano, 4: tenor) vowel : the vowel (0: a, 1: e, 2: i, 3: o, 4: u) nFormants : number of formant regions in frequency domain, typically 5 i : formant number (i.e. 0 - 4) used to index formant data value arrays freq : fundamental frequency of excitation signal. Used to calculate rise time of envelope","title":"Usage"},{"location":"libs/physmodels/#pmformantfilterfofsmooth","text":"Formant filter based on a single FOF filter. Formant parameters are linearly interpolated allowing to go smoothly from one vowel to another. Fof filter parameters are lowpass filtered to mitigate possible noise from varying them in realtime. Voice type can be selected but must correspond to the frequency range of the provided source to be realistic.","title":"(pm.)formantFilterFofSmooth"},{"location":"libs/physmodels/#usage_129","text":"_ : formantFilterFofSmooth(voiceType,vowel,nFormants,i,freq) : _ Where: voiceType : the voice type (0: alto, 1: bass, 2: countertenor, 3: soprano, 4: tenor) vowel : the vowel (0: a, 1: e, 2: i, 3: o, 4: u) nFormants : number of formant regions in frequency domain, typically 5 i : formant number (i.e. 1 - 5) used to index formant data value arrays freq : fundamental frequency of excitation signal. Used to calculate rise time of envelope","title":"Usage"},{"location":"libs/physmodels/#pmformantfilterbp","text":"Formant filter based on a single resonant bandpass filter. Formant parameters are linearly interpolated allowing to go smoothly from one vowel to another. Voice type can be selected but must correspond to the frequency range of the provided source to be realistic.","title":"(pm.)formantFilterBP"},{"location":"libs/physmodels/#usage_130","text":"_ : formantFilterBP(voiceType,vowel,nFormants,i,freq) : _ Where: voiceType : the voice type (0: alto, 1: bass, 2: countertenor, 3: soprano, 4: tenor) vowel : the vowel (0: a, 1: e, 2: i, 3: o, 4: u) nFormants : number of formant regions in frequency domain, typically 5 i : formant index used to index formant data value arrays freq : fundamental frequency of excitation signal.","title":"Usage"},{"location":"libs/physmodels/#pmformantfilterbank","text":"Formant filterbank which can use different types of filterbank functions and different excitation signals. Formant parameters are linearly interpolated allowing to go smoothly from one vowel to another. Voice type can be selected but must correspond to the frequency range of the provided source to be realistic.","title":"(pm.)formantFilterbank"},{"location":"libs/physmodels/#usage_131","text":"_ : formantFilterbank(voiceType,vowel,formantGen,freq) : _ Where: voiceType : the voice type (0: alto, 1: bass, 2: countertenor, 3: soprano, 4: tenor) vowel : the vowel (0: a, 1: e, 2: i, 3: o, 4: u) formantGen : the specific formant filterbank function (i.e. FormantFilterbankBP, FormantFilterbankFof,...) freq : fundamental frequency of excitation signal. Needed for FOF version to calculate rise time of envelope","title":"Usage"},{"location":"libs/physmodels/#pmformantfilterbankfofcycle","text":"Formant filterbank based on a bank of fof filters. Formant parameters are linearly interpolated allowing to go smoothly from one vowel to another. Voice type can be selected but must correspond to the frequency range of the provided source to be realistic.","title":"(pm.)formantFilterbankFofCycle"},{"location":"libs/physmodels/#usage_132","text":"_ : formantFilterbankFofCycle(voiceType,vowel,freq) : _ Where: voiceType : the voice type (0: alto, 1: bass, 2: countertenor, 3: soprano, 4: tenor) vowel : the vowel (0: a, 1: e, 2: i, 3: o, 4: u) freq : the fundamental frequency of the excitation signal. Needed to calculate the skirtwidth of the FOF envelopes and for the autobendFreq and vocalEffort functions","title":"Usage"},{"location":"libs/physmodels/#pmformantfilterbankfofsmooth","text":"Formant filterbank based on a bank of fof filters. Formant parameters are linearly interpolated allowing to go smoothly from one vowel to another. Voice type can be selected but must correspond to the frequency range of the provided source to be realistic.","title":"(pm.)formantFilterbankFofSmooth"},{"location":"libs/physmodels/#usage_133","text":"_ : formantFilterbankFofSmooth(voiceType,vowel,freq) : _ Where: voiceType : the voice type (0: alto, 1: bass, 2: countertenor, 3: soprano, 4: tenor) vowel : the vowel (0: a, 1: e, 2: i, 3: o, 4: u) freq : the fundamental frequency of the excitation signal. Needed to calculate the skirtwidth of the FOF envelopes and for the autobendFreq and vocalEffort functions","title":"Usage"},{"location":"libs/physmodels/#pmformantfilterbankbp","text":"Formant filterbank based on a bank of resonant bandpass filters. Formant parameters are linearly interpolated allowing to go smoothly from one vowel to another. Voice type can be selected but must correspond to the frequency range of the provided source to be realistic.","title":"(pm.)formantFilterbankBP"},{"location":"libs/physmodels/#usage_134","text":"_ : formantFilterbankBP(voiceType,vowel,freq) : _ Where: voiceType : the voice type (0: alto, 1: bass, 2: countertenor, 3: soprano, 4: tenor) vowel : the vowel (0: a, 1: e, 2: i, 3: o, 4: u) freq : the fundamental frequency of the excitation signal. Needed for the autobendFreq and vocalEffort functions","title":"Usage"},{"location":"libs/physmodels/#pmsfformantmodel","text":"Simple formant/vocal synthesizer based on a source/filter model. The source and filterbank must be specified by the user. filterbank must take the same input parameters as formantFilterbank ( BP / FofCycle / FofSmooth ). Formant parameters are linearly interpolated allowing to go smoothly from one vowel to another. Voice type can be selected but must correspond to the frequency range of the synthesized voice to be realistic.","title":"(pm.)SFFormantModel"},{"location":"libs/physmodels/#usage_135","text":"SFFormantModel(voiceType,vowel,exType,freq,gain,source,filterbank,isFof) : _ Where: voiceType : the voice type (0: alto, 1: bass, 2: countertenor, 3: soprano, 4: tenor) vowel : the vowel (0: a, 1: e, 2: i, 3: o, 4: u exType : voice vs. fricative sound ratio (0-1 where 1 is 100% fricative) freq : the fundamental frequency of the source signal gain : linear gain multiplier to multiply the source by isFof : whether model is FOF based (0: no, 1: yes)","title":"Usage"},{"location":"libs/physmodels/#pmsfformantmodelfofcycle","text":"Simple formant/vocal synthesizer based on a source/filter model. The source is just a periodic impulse and the \"filter\" is a bank of FOF filters. Formant parameters are linearly interpolated allowing to go smoothly from one vowel to another. Voice type can be selected but must correspond to the frequency range of the synthesized voice to be realistic. This model does not work with noise in the source signal so exType has been removed and model does not depend on SFFormantModel function.","title":"(pm.)SFFormantModelFofCycle"},{"location":"libs/physmodels/#usage_136","text":"SFFormantModelFofCycle(voiceType,vowel,freq,gain) : _ Where: voiceType : the voice type (0: alto, 1: bass, 2: countertenor, 3: soprano, 4: tenor) vowel : the vowel (0: a, 1: e, 2: i, 3: o, 4: u freq : the fundamental frequency of the source signal gain : linear gain multiplier to multiply the source by","title":"Usage"},{"location":"libs/physmodels/#pmsfformantmodelfofsmooth","text":"Simple formant/vocal synthesizer based on a source/filter model. The source is just a periodic impulse and the \"filter\" is a bank of FOF filters. Formant parameters are linearly interpolated allowing to go smoothly from one vowel to another. Voice type can be selected but must correspond to the frequency range of the synthesized voice to be realistic.","title":"(pm.)SFFormantModelFofSmooth"},{"location":"libs/physmodels/#usage_137","text":"SFFormantModelFofSmooth(voiceType,vowel,freq,gain) : _ Where: voiceType : the voice type (0: alto, 1: bass, 2: countertenor, 3: soprano, 4: tenor) vowel : the vowel (0: a, 1: e, 2: i, 3: o, 4: u freq : the fundamental frequency of the source signal gain : linear gain multiplier to multiply the source by","title":"Usage"},{"location":"libs/physmodels/#pmsfformantmodelbp","text":"Simple formant/vocal synthesizer based on a source/filter model. The source is just a sawtooth wave and the \"filter\" is a bank of resonant bandpass filters. Formant parameters are linearly interpolated allowing to go smoothly from one vowel to another. Voice type can be selected but must correspond to the frequency range of the synthesized voice to be realistic. The formant data used here come from the CSOUND manual * http://www.csounds.com/manual/html/ .","title":"(pm.)SFFormantModelBP"},{"location":"libs/physmodels/#usage_138","text":"SFFormantModelBP(voiceType,vowel,exType,freq,gain) : _ Where: voiceType : the voice type (0: alto, 1: bass, 2: countertenor, 3: soprano, 4: tenor) vowel : the vowel (0: a, 1: e, 2: i, 3: o, 4: u exType : voice vs. fricative sound ratio (0-1 where 1 is 100% fricative) freq : the fundamental frequency of the source signal gain : linear gain multiplier to multiply the source by","title":"Usage"},{"location":"libs/physmodels/#pmsfformantmodelfofcycle_ui","text":"Ready-to-use source-filter vocal synthesizer with built-in user interface.","title":"(pm.)SFFormantModelFofCycle_ui"},{"location":"libs/physmodels/#usage_139","text":"SFFormantModelFofCycle_ui : _","title":"Usage"},{"location":"libs/physmodels/#pmsfformantmodelfofsmooth_ui","text":"Ready-to-use source-filter vocal synthesizer with built-in user interface.","title":"(pm.)SFFormantModelFofSmooth_ui"},{"location":"libs/physmodels/#usage_140","text":"SFFormantModelFofSmooth_ui : _","title":"Usage"},{"location":"libs/physmodels/#pmsfformantmodelbp_ui","text":"Ready-to-use source-filter vocal synthesizer with built-in user interface.","title":"(pm.)SFFormantModelBP_ui"},{"location":"libs/physmodels/#usage_141","text":"SFFormantModelBP_ui : _","title":"Usage"},{"location":"libs/physmodels/#pmsfformantmodelfofcycle_ui_midi","text":"Ready-to-use MIDI-controllable source-filter vocal synthesizer.","title":"(pm.)SFFormantModelFofCycle_ui_MIDI"},{"location":"libs/physmodels/#usage_142","text":"SFFormantModelFofCycle_ui_MIDI : _","title":"Usage"},{"location":"libs/physmodels/#pmsfformantmodelfofsmooth_ui_midi","text":"Ready-to-use MIDI-controllable source-filter vocal synthesizer.","title":"(pm.)SFFormantModelFofSmooth_ui_MIDI"},{"location":"libs/physmodels/#usage_143","text":"SFFormantModelFofSmooth_ui_MIDI : _","title":"Usage"},{"location":"libs/physmodels/#pmsfformantmodelbp_ui_midi","text":"Ready-to-use MIDI-controllable source-filter vocal synthesizer.","title":"(pm.)SFFormantModelBP_ui_MIDI"},{"location":"libs/physmodels/#usage_144","text":"SFFormantModelBP_ui_MIDI : _","title":"Usage"},{"location":"libs/physmodels/#misc-functions","text":"Various miscellaneous functions.","title":"Misc Functions"},{"location":"libs/physmodels/#pmallpassnl","text":"Bidirectional block adding nonlinearities in both directions in a chain. Nonlinearities are created by modulating the coefficients of a passive allpass filter by the signal it is processing.","title":"(pm.)allpassNL"},{"location":"libs/physmodels/#usage_145","text":"chain(... : allpassNL(nonlinearity) : ...) Where: nonlinearity : amount of nonlinearity to be added (0-1)","title":"Usage"},{"location":"libs/physmodels/#pmmodalmodel","text":"Implement multiple resonance modes using resonant bandpass filters.","title":"(pm).modalModel"},{"location":"libs/physmodels/#usage_146","text":"_ : modalModel(n, freqs, t60s, gains) : _ Where: n : number of given modes freqs : list of filter center freqencies t60s : list of mode resonance durations (in seconds) gains : list of mode gains (0-1) For example, to generate a model with 2 modes (440 Hz and 660 Hz, a fifth) where the higher one decays faster and is attenuated: os.impulse : modalModel(2, (440, 660), (0.5, 0.25), (ba.db2linear(-1), ba.db2linear(-6)) : _ Further reading: Grumiaux et. al., 2017: Impulse-Response and CAD-Model-Based Physical Modeling in Faust","title":"Usage"},{"location":"libs/quantizers/","text":"quantizers.lib Faust Frequency Quantization Library. Its official prefix is qu . References https://github.com/grame-cncm/faustlibraries/blob/master/quantizers.lib Functions Reference (qu.)quantize Configurable frequency quantization tool. Output only the frequencies that are part of the specified scale. Works for positive audio frequencies. Usage _ : quantize(rf,nl) : _ Where : rf : frequency of the root note of the scale nl : list of the ratio of the frequencies of each note in relation to the root frequency (qu.)quantizeSmoothed Configurable frequency quantization tool. Output frequencies that are closer to the frequencies of the specified scale notes. Works for positive audio frequencies. Usage _ : quantizeSmoothed(rf,nl) : _ nl = (1,1.2,1.4,1.7); Where : rf : frequency of the root note of the scale nl : list of the ratio of the frequencies of each note in relation to the root frequency (qu.)ionian List of the frequency ratios of the notes of the ionian mode. Usage _ : quantize(rf,ionian) : _ Where: rf : frequency of the root note of the scale (qu.)dorian List of the frequency ratios of the notes of the dorian mode. Usage _ : quantize(rf,dorian) : _ Where: rf : frequency of the root note of the scale (qu.)phrygian List of the frequency ratios of the notes of the phrygian mode. Usage _ : quantize(rf,phrygian) : _ Where: rf : frequency of the root note of the scale (qu.)lydian List of the frequency ratios of the notes of the lydian mode. Usage _ : quantize(rf,lydian) : _ Where: rf : frequency of the root note of the scale (qu.)mixo List of the frequency ratios of the notes of the mixolydian mode. Usage _ : quantize(rf,mixo) : _ Where: rf : frequency of the root note of the scale (qu.)eolian List of the frequency ratios of the notes of the eolian mode. Usage _ : quantize(rf,eolian) : _ Where: rf : frequency of the root note of the scale (qu.)locrian List of the frequency ratios of the notes of the locrian mode. Usage _ : quantize(rf,locrian) : _ Where: rf : frequency of the root note of the scale (qu.)pentanat List of the frequency ratios of the notes of the pythagorean tuning for the minor pentatonic scale. Usage _ : quantize(rf,pentanat) : _ Where: rf : frequency of the root note of the scale (qu.)kumoi List of the frequency ratios of the notes of the kumoijoshi, the japanese pentatonic scale. Usage _ : quantize(rf,kumoi) : _ Where: rf : frequency of the root note of the scale (qu.)natural List of the frequency ratios of the notes of the natural major scale. Usage _ : quantize(rf,natural) : _ Where: rf : frequency of the root note of the scale (qu.)dodeca List of the frequency ratios of the notes of the dodecaphonic scale. Usage _ : quantize(rf,dodeca) : _ Where: rf : frequency of the root note of the scale (qu.)dimin List of the frequency ratios of the notes of the diminished scale. Usage _ : quantize(rf,dimin) : _ Where: rf : frequency of the root note of the scale (qu.)penta List of the frequency ratios of the notes of the minor pentatonic scale. Usage _ : quantize(rf,penta) : _ Where: rf : frequency of the root note of the scale","title":" quantizers "},{"location":"libs/quantizers/#quantizerslib","text":"Faust Frequency Quantization Library. Its official prefix is qu .","title":"quantizers.lib"},{"location":"libs/quantizers/#references","text":"https://github.com/grame-cncm/faustlibraries/blob/master/quantizers.lib","title":"References"},{"location":"libs/quantizers/#functions-reference","text":"","title":"Functions Reference"},{"location":"libs/quantizers/#ququantize","text":"Configurable frequency quantization tool. Output only the frequencies that are part of the specified scale. Works for positive audio frequencies.","title":"(qu.)quantize"},{"location":"libs/quantizers/#usage","text":"_ : quantize(rf,nl) : _ Where : rf : frequency of the root note of the scale nl : list of the ratio of the frequencies of each note in relation to the root frequency","title":"Usage"},{"location":"libs/quantizers/#ququantizesmoothed","text":"Configurable frequency quantization tool. Output frequencies that are closer to the frequencies of the specified scale notes. Works for positive audio frequencies.","title":"(qu.)quantizeSmoothed"},{"location":"libs/quantizers/#usage_1","text":"_ : quantizeSmoothed(rf,nl) : _ nl = (1,1.2,1.4,1.7); Where : rf : frequency of the root note of the scale nl : list of the ratio of the frequencies of each note in relation to the root frequency","title":"Usage"},{"location":"libs/quantizers/#quionian","text":"List of the frequency ratios of the notes of the ionian mode.","title":"(qu.)ionian"},{"location":"libs/quantizers/#usage_2","text":"_ : quantize(rf,ionian) : _ Where: rf : frequency of the root note of the scale","title":"Usage"},{"location":"libs/quantizers/#qudorian","text":"List of the frequency ratios of the notes of the dorian mode.","title":"(qu.)dorian"},{"location":"libs/quantizers/#usage_3","text":"_ : quantize(rf,dorian) : _ Where: rf : frequency of the root note of the scale","title":"Usage"},{"location":"libs/quantizers/#quphrygian","text":"List of the frequency ratios of the notes of the phrygian mode.","title":"(qu.)phrygian"},{"location":"libs/quantizers/#usage_4","text":"_ : quantize(rf,phrygian) : _ Where: rf : frequency of the root note of the scale","title":"Usage"},{"location":"libs/quantizers/#qulydian","text":"List of the frequency ratios of the notes of the lydian mode.","title":"(qu.)lydian"},{"location":"libs/quantizers/#usage_5","text":"_ : quantize(rf,lydian) : _ Where: rf : frequency of the root note of the scale","title":"Usage"},{"location":"libs/quantizers/#qumixo","text":"List of the frequency ratios of the notes of the mixolydian mode.","title":"(qu.)mixo"},{"location":"libs/quantizers/#usage_6","text":"_ : quantize(rf,mixo) : _ Where: rf : frequency of the root note of the scale","title":"Usage"},{"location":"libs/quantizers/#queolian","text":"List of the frequency ratios of the notes of the eolian mode.","title":"(qu.)eolian"},{"location":"libs/quantizers/#usage_7","text":"_ : quantize(rf,eolian) : _ Where: rf : frequency of the root note of the scale","title":"Usage"},{"location":"libs/quantizers/#qulocrian","text":"List of the frequency ratios of the notes of the locrian mode.","title":"(qu.)locrian"},{"location":"libs/quantizers/#usage_8","text":"_ : quantize(rf,locrian) : _ Where: rf : frequency of the root note of the scale","title":"Usage"},{"location":"libs/quantizers/#qupentanat","text":"List of the frequency ratios of the notes of the pythagorean tuning for the minor pentatonic scale.","title":"(qu.)pentanat"},{"location":"libs/quantizers/#usage_9","text":"_ : quantize(rf,pentanat) : _ Where: rf : frequency of the root note of the scale","title":"Usage"},{"location":"libs/quantizers/#qukumoi","text":"List of the frequency ratios of the notes of the kumoijoshi, the japanese pentatonic scale.","title":"(qu.)kumoi"},{"location":"libs/quantizers/#usage_10","text":"_ : quantize(rf,kumoi) : _ Where: rf : frequency of the root note of the scale","title":"Usage"},{"location":"libs/quantizers/#qunatural","text":"List of the frequency ratios of the notes of the natural major scale.","title":"(qu.)natural"},{"location":"libs/quantizers/#usage_11","text":"_ : quantize(rf,natural) : _ Where: rf : frequency of the root note of the scale","title":"Usage"},{"location":"libs/quantizers/#qudodeca","text":"List of the frequency ratios of the notes of the dodecaphonic scale.","title":"(qu.)dodeca"},{"location":"libs/quantizers/#usage_12","text":"_ : quantize(rf,dodeca) : _ Where: rf : frequency of the root note of the scale","title":"Usage"},{"location":"libs/quantizers/#qudimin","text":"List of the frequency ratios of the notes of the diminished scale.","title":"(qu.)dimin"},{"location":"libs/quantizers/#usage_13","text":"_ : quantize(rf,dimin) : _ Where: rf : frequency of the root note of the scale","title":"Usage"},{"location":"libs/quantizers/#qupenta","text":"List of the frequency ratios of the notes of the minor pentatonic scale.","title":"(qu.)penta"},{"location":"libs/quantizers/#usage_14","text":"_ : quantize(rf,penta) : _ Where: rf : frequency of the root note of the scale","title":"Usage"},{"location":"libs/reducemaps/","text":"reducemaps.lib A library providing reduce/map operations in Faust. Its official prefix is rm . The basic idea behind reduce operations is to combine several values into a single one by repeatedly applying a binary operation. A typical example is finding the maximum of a set of values by repeatedly applying the binary operation max . In this reducemaps library, you'll find two types of reduce , depending on whether you want to reduce n consecutive samples of the same signal or a set of n parallel signals. References https://github.com/grame-cncm/faustlibraries/blob/master/reducemaps.lib (rm.)parReduce parReduce(op,N) combines a set of N parallel signals into a single one using a binary operation op . With parReduce , this reduction process simultaneously occurs on each half of the incoming signals. In other words, parReduce(max,256) is equivalent to parReduce(max,128),parReduce(max,128) : max . To be used with parReduce , binary operation op must be associative. Additionally, the concept of a binary operation extends to operations that have 2*n inputs and n outputs. For example, complex signals can be simulated using two signals for the real and imaginary parts. In such case, a binary operation would have 4 inputs and 2 outputs. Please note also that parReduce is faster than topReduce or botReduce for large number of signals. It is therefore the recommended operation whenever op is associative. Usage _,...,_ : parReduce(op, N) : _ Where: op : is a binary operation N : is the number of incomming signals ( N>0 ). We use a capital letter here to indicate that the number of incomming signals must be constant and known at compile time. (rm.)topReduce topReduce(op,N) involves combining a set of N parallel signals into a single one using a binary operation op . With topReduce , the reduction process starts from the top two incoming signals, down to the bottom. In other words, topReduce(max,256) is equivalent to topReduce(max,255),_ : max . Contrary to parReduce , the binary operation op doesn't have to be associative here. Like with parReduce the concept of a binary operation can be extended to operations that have 2*n inputs and n outputs. For example, complex signals can be simulated using two signals representing the real and imaginary parts. In such cases, a binary operation would have 4 inputs and 2 outputs. Usage _,...,_ : topReduce(op, N) : _ Where: op : is a binary operation N : is the number of incomming signals ( N>0 ). We use a capital letter here to indicate that the number of incomming signals must be constant and known at compile time. (rm.)botReduce botReduce(op,N) combines a set of N parallel signals into a single one using a binary operation op . With botReduce , the reduction process starts from the bottom two incoming signals, up to the top. In other words, botReduce(max,256) is equivalent to _,botReduce(max,255): max . Contrary to parReduce , the binary operation op doesn't have to be associative here. Like with parReduce the concept of a binary operation can be extended to operations that have 2*n inputs and n outputs. For example, complex signals can be simulated using two signals representing the real and imaginary parts. In such cases, a binary operation would have 4 inputs and 2 outputs. Usage _,...,_ : botReduce(op, N) : _ Where: op: is a binary operation N: is the number of incomming signals ( N>0 ). We use a capital letter here to indicate that the number of incomming signals must be constant and known at compile time. (rm.)reduce Reduce a block of n consecutive samples of the incomming signal using a binary operation op . For example: reduce(max,128) will compute the maximun value of each block of 128 samples. Please note that the resulting value, while computed continuously, will be constant for the duration of a block. A new value is only produced at the end of a block. Note also that blocks should be of at least one sample (n>0). Usage _ : reduce(op, n) : _ Where: op : is a binary operation n : is the number of consecutive samples in a block. (rm.)reducemap Like reduce but a foo function is applied to the result. From a mathematical point of view: reducemap(op,foo,n) is equivalent to reduce(op,n):foo but more efficient. Usage _ : reducemap(op, foo, n) : _ Where: op : is a binary operation foo : is a function applied to the result of the reduction n : is the number of consecutive samples in a block.","title":" reducemaps "},{"location":"libs/reducemaps/#reducemapslib","text":"A library providing reduce/map operations in Faust. Its official prefix is rm . The basic idea behind reduce operations is to combine several values into a single one by repeatedly applying a binary operation. A typical example is finding the maximum of a set of values by repeatedly applying the binary operation max . In this reducemaps library, you'll find two types of reduce , depending on whether you want to reduce n consecutive samples of the same signal or a set of n parallel signals.","title":"reducemaps.lib"},{"location":"libs/reducemaps/#references","text":"https://github.com/grame-cncm/faustlibraries/blob/master/reducemaps.lib","title":"References"},{"location":"libs/reducemaps/#rmparreduce","text":"parReduce(op,N) combines a set of N parallel signals into a single one using a binary operation op . With parReduce , this reduction process simultaneously occurs on each half of the incoming signals. In other words, parReduce(max,256) is equivalent to parReduce(max,128),parReduce(max,128) : max . To be used with parReduce , binary operation op must be associative. Additionally, the concept of a binary operation extends to operations that have 2*n inputs and n outputs. For example, complex signals can be simulated using two signals for the real and imaginary parts. In such case, a binary operation would have 4 inputs and 2 outputs. Please note also that parReduce is faster than topReduce or botReduce for large number of signals. It is therefore the recommended operation whenever op is associative.","title":"(rm.)parReduce"},{"location":"libs/reducemaps/#usage","text":"_,...,_ : parReduce(op, N) : _ Where: op : is a binary operation N : is the number of incomming signals ( N>0 ). We use a capital letter here to indicate that the number of incomming signals must be constant and known at compile time.","title":"Usage"},{"location":"libs/reducemaps/#rmtopreduce","text":"topReduce(op,N) involves combining a set of N parallel signals into a single one using a binary operation op . With topReduce , the reduction process starts from the top two incoming signals, down to the bottom. In other words, topReduce(max,256) is equivalent to topReduce(max,255),_ : max . Contrary to parReduce , the binary operation op doesn't have to be associative here. Like with parReduce the concept of a binary operation can be extended to operations that have 2*n inputs and n outputs. For example, complex signals can be simulated using two signals representing the real and imaginary parts. In such cases, a binary operation would have 4 inputs and 2 outputs.","title":"(rm.)topReduce"},{"location":"libs/reducemaps/#usage_1","text":"_,...,_ : topReduce(op, N) : _ Where: op : is a binary operation N : is the number of incomming signals ( N>0 ). We use a capital letter here to indicate that the number of incomming signals must be constant and known at compile time.","title":"Usage"},{"location":"libs/reducemaps/#rmbotreduce","text":"botReduce(op,N) combines a set of N parallel signals into a single one using a binary operation op . With botReduce , the reduction process starts from the bottom two incoming signals, up to the top. In other words, botReduce(max,256) is equivalent to _,botReduce(max,255): max . Contrary to parReduce , the binary operation op doesn't have to be associative here. Like with parReduce the concept of a binary operation can be extended to operations that have 2*n inputs and n outputs. For example, complex signals can be simulated using two signals representing the real and imaginary parts. In such cases, a binary operation would have 4 inputs and 2 outputs.","title":"(rm.)botReduce"},{"location":"libs/reducemaps/#usage_2","text":"_,...,_ : botReduce(op, N) : _ Where: op: is a binary operation N: is the number of incomming signals ( N>0 ). We use a capital letter here to indicate that the number of incomming signals must be constant and known at compile time.","title":"Usage"},{"location":"libs/reducemaps/#rmreduce","text":"Reduce a block of n consecutive samples of the incomming signal using a binary operation op . For example: reduce(max,128) will compute the maximun value of each block of 128 samples. Please note that the resulting value, while computed continuously, will be constant for the duration of a block. A new value is only produced at the end of a block. Note also that blocks should be of at least one sample (n>0).","title":"(rm.)reduce"},{"location":"libs/reducemaps/#usage_3","text":"_ : reduce(op, n) : _ Where: op : is a binary operation n : is the number of consecutive samples in a block.","title":"Usage"},{"location":"libs/reducemaps/#rmreducemap","text":"Like reduce but a foo function is applied to the result. From a mathematical point of view: reducemap(op,foo,n) is equivalent to reduce(op,n):foo but more efficient.","title":"(rm.)reducemap"},{"location":"libs/reducemaps/#usage_4","text":"_ : reducemap(op, foo, n) : _ Where: op : is a binary operation foo : is a function applied to the result of the reduction n : is the number of consecutive samples in a block.","title":"Usage"},{"location":"libs/reverbs/","text":"reverbs.lib A library of reverb effects. Its official prefix is re . References https://github.com/grame-cncm/faustlibraries/blob/master/reverbs.lib Schroeder Reverberators (re.)jcrev This artificial reverberator take a mono signal and output stereo ( satrev ) and quad ( jcrev ). They were implemented by John Chowning in the MUS10 computer-music language (descended from Music V by Max Mathews). They are Schroeder Reverberators, well tuned for their size. Nowadays, the more expensive freeverb is more commonly used (see the Faust examples directory). jcrev reverb below was made from a listing of \"RV\", dated April 14, 1972, which was recovered from an old SAIL DART backup tape. John Chowning thinks this might be the one that became the well known and often copied JCREV. jcrev is a standard Faust function. Usage _ : jcrev : _,_,_,_ (re.)satrev This artificial reverberator take a mono signal and output stereo ( satrev ) and quad ( jcrev ). They were implemented by John Chowning in the MUS10 computer-music language (descended from Music V by Max Mathews). They are Schroeder Reverberators, well tuned for their size. Nowadays, the more expensive freeverb is more commonly used (see the Faust examples directory). satrev was made from a listing of \"SATREV\", dated May 15, 1971, which was recovered from an old SAIL DART backup tape. John Chowning thinks this might be the one used on his often-heard brass canon sound examples, one of which can be found at * https://ccrma.stanford.edu/~jos/wav/FM-BrassCanon2.wav . Usage _ : satrev : _,_ Feedback Delay Network (FDN) Reverberators (re.)fdnrev0 Pure Feedback Delay Network Reverberator (generalized for easy scaling). fdnrev0 is a standard Faust function. Usage <1,2,4,...,N signals> <: fdnrev0(MAXDELAY,delays,BBSO,freqs,durs,loopgainmax,nonl) :> <1,2,4,...,N signals> Where: N : 2, 4, 8, ... (power of 2) MAXDELAY : power of 2 at least as large as longest delay-line length delays : N delay lines, N a power of 2, lengths perferably coprime BBSO : odd positive integer = order of bandsplit desired at freqs freqs : NB-1 crossover frequencies separating desired frequency bands durs : NB decay times (t60) desired for the various bands loopgainmax : scalar gain between 0 and 1 used to \"squelch\" the reverb nonl : nonlinearity (0 to 0.999..., 0 being linear) Reference https://ccrma.stanford.edu/~jos/pasp/FDN_Reverberation.html (re.)zita_rev_fdn Internal 8x8 late-reverberation FDN used in the FOSS Linux reverb zita-rev1 by Fons Adriaensen fons@linuxaudio.org . This is an FDN reverb with allpass comb filters in each feedback delay in addition to the damping filters. Usage si.bus(8) : zita_rev_fdn(f1,f2,t60dc,t60m,fsmax) : si.bus(8) Where: f1 : crossover frequency (Hz) separating dc and midrange frequencies f2 : frequency (Hz) above f1 where T60 = t60m/2 (see below) t60dc : desired decay time (t60) at frequency 0 (sec) t60m : desired decay time (t60) at midrange frequencies (sec) fsmax : maximum sampling rate to be used (Hz) Reference http://www.kokkinizita.net/linuxaudio/zita-rev1-doc/quickguide.html https://ccrma.stanford.edu/~jos/pasp/Zita_Rev1.html (re.)zita_rev1_stereo Extend zita_rev_fdn to include zita_rev1 input/output mapping in stereo mode. zita_rev1_stereo is a standard Faust function. Usage _,_ : zita_rev1_stereo(rdel,f1,f2,t60dc,t60m,fsmax) : _,_ Where: rdel = delay (in ms) before reverberation begins (e.g., 0 to ~100 ms) (remaining args and refs as for zita_rev_fdn above) (re.)zita_rev1_ambi Extend zita_rev_fdn to include zita_rev1 input/output mapping in \"ambisonics mode\", as provided in the Linux C++ version. Usage _,_ : zita_rev1_ambi(rgxyz,rdel,f1,f2,t60dc,t60m,fsmax) : _,_,_,_ Where: rgxyz = relative gain of lanes 1,4,2 to lane 0 in output (e.g., -9 to 9) (remaining args and references as for zita_rev1_stereo above) Freeverb (re.)mono_freeverb A simple Schroeder reverberator primarily developed by \"Jezar at Dreampoint\" that is extensively used in the free-software world. It uses four Schroeder allpasses in series and eight parallel Schroeder-Moorer filtered-feedback comb-filters for each audio channel, and is said to be especially well tuned. mono_freeverb is a standard Faust function. Usage _ : mono_freeverb(fb1, fb2, damp, spread) : _ Where: fb1 : coefficient of the lowpass comb filters (0-1) fb2 : coefficient of the allpass comb filters (0-1) damp : damping of the lowpass comb filter (0-1) spread : spatial spread in number of samples (for stereo) License While this version is licensed LGPL (with exception) along with other GRAME library functions, the file freeverb.dsp in the examples directory of older Faust distributions, such as faust-0.9.85, was released under the BSD license, which is less restrictive. (re.)stereo_freeverb A simple Schroeder reverberator primarily developed by \"Jezar at Dreampoint\" that is extensively used in the free-software world. It uses four Schroeder allpasses in series and eight parallel Schroeder-Moorer filtered-feedback comb-filters for each audio channel, and is said to be especially well tuned. Usage _,_ : stereo_freeverb(fb1, fb2, damp, spread) : _,_ Where: fb1 : coefficient of the lowpass comb filters (0-1) fb2 : coefficient of the allpass comb filters (0-1) damp : damping of the lowpass comb filter (0-1) spread : spatial spread in number of samples (for stereo) Dattorro Reverb (re.)dattorro_rev Reverberator based on the Dattorro reverb topology. This implementation does not use modulated delay lengths (excursion). Usage _,_ : dattorro_rev(pre_delay, bw, i_diff1, i_diff2, decay, d_diff1, d_diff2, damping) : _,_ Where: pre_delay : pre-delay in samples (fixed at compile time) bw : band-width filter (pre filtering); (0 - 1) i_diff1 : input diffusion factor 1; (0 - 1) i_diff2 : input diffusion factor 2; decay : decay rate; (0 - 1); infinite decay = 1.0 d_diff1 : decay diffusion factor 1; (0 - 1) d_diff2 : decay diffusion factor 2; damping : high-frequency damping; no damping = 0.0 Reference https://ccrma.stanford.edu/~dattorro/EffectDesignPart1.pdf (re.)dattorro_rev_default Reverberator based on the Dattorro reverb topology with reverb parameters from the original paper. This implementation does not use modulated delay lengths (excursion) and uses zero length pre-delay. Usage _,_ : dattorro_rev_default : _,_ Reference https://ccrma.stanford.edu/~dattorro/EffectDesignPart1.pdf JPverb and Greyhole Reverbs (re.)jpverb An algorithmic reverb (stereo in/out), inspired by the lush chorused sound of certain vintage Lexicon and Alesis reverberation units. Designed to sound great with synthetic sound sources, rather than sound like a realistic space. Usage _,_ : jpverb(t60, damp, size, early_diff, mod_depth, mod_freq, low, mid, high, low_cutoff, high_cutoff) : _,_ Where: t60 : approximate reverberation time in seconds ([0.1..60] sec) (T60 - the time for the reverb to decay by 60db when damp == 0 ). Does not effect early reflections damp : controls damping of high-frequencies as the reverb decays. 0 is no damping, 1 is very strong damping. Values should be between ([0..1]) size : scales size of delay-lines within the reverberator, producing the impression of a larger or smaller space. Values below 1 can sound metallic. Values should be between [0.5..5] early_diff : controls shape of early reflections. Values of 0.707 or more produce smooth exponential decay. Lower values produce a slower build-up of echoes. Values should be between ([0..1]) mod_depth : depth ([0..1]) of delay-line modulation. Use in combination with mod_freq to set amount of chorusing within the structure modFreq : frequency ([0..10] Hz) of delay-line modulation. Use in combination with modDepth to set amount of chorusing within the structure low : multiplier ([0..1]) for the reverberation time within the low band mid : multiplier ([0..1]) for the reverberation time within the mid band high : multiplier ([0..1]) for the reverberation time within the high band lowcut : frequency (100..6000 Hz) at which the crossover between the low and mid bands of the reverb occurs highcut : frequency (1000..10000 Hz) at which the crossover between the mid and high bands of the reverb occurs Reference https://doc.sccode.org/Overviews/DEIND.html (re.)greyhole A complex echo-like effect (stereo in/out), inspired by the classic Eventide effect of a similar name. The effect consists of a diffuser (like a mini-reverb, structurally similar to the one used in jpverb ) connected in a feedback system with a long, modulated delay-line. Excels at producing spacey washes of sound. Usage _,_ : greyhole(dt, damp, size, early_diff, feedback, mod_depth, mod_freq) : _,_ Where: dt : approximate reverberation time in seconds ([0.1..60 sec]) damp : controls damping of high-frequencies as the reverb decays. 0 is no damping, 1 is very strong damping. Values should be between ([0..1]) size : scales size of delay-lines within the diffusion unit, producing the impression of a larger or smaller space. Values below 1 can sound metallic. Values should be between ([0.5..5]) size : control of relative \"room size\" roughly between ([0.5..3]) early_diff : controls pattern of echoes produced by the diffuser. At very low values, the diffuser acts like a delay-line whose length is controlled by the 'size' parameter. Medium values produce a slow build-up of echoes, giving the sound a reversed-like quality. Values of 0.707 or greater than produce smooth exponentially decaying echoes. Values should be in the range ([0..1]) feedback : amount of feedback through the system. Sets the number of repeating echoes. A setting of 1.0 produces infinite sustain. Values should be in the range ([0..1]) mod_depth : depth ([0..1]) of delay-line modulation. Use in combination with mod_freq to produce chorus and pitch-variations in the echoes mod_freq : frequency ([0..10] Hz) of delay-line modulation. Use in combination with mod_depth to produce chorus and pitch-variations in the echoes Reference https://doc.sccode.org/Overviews/DEIND.html","title":" reverbs "},{"location":"libs/reverbs/#reverbslib","text":"A library of reverb effects. Its official prefix is re .","title":"reverbs.lib"},{"location":"libs/reverbs/#references","text":"https://github.com/grame-cncm/faustlibraries/blob/master/reverbs.lib","title":"References"},{"location":"libs/reverbs/#schroeder-reverberators","text":"","title":"Schroeder Reverberators"},{"location":"libs/reverbs/#rejcrev","text":"This artificial reverberator take a mono signal and output stereo ( satrev ) and quad ( jcrev ). They were implemented by John Chowning in the MUS10 computer-music language (descended from Music V by Max Mathews). They are Schroeder Reverberators, well tuned for their size. Nowadays, the more expensive freeverb is more commonly used (see the Faust examples directory). jcrev reverb below was made from a listing of \"RV\", dated April 14, 1972, which was recovered from an old SAIL DART backup tape. John Chowning thinks this might be the one that became the well known and often copied JCREV. jcrev is a standard Faust function.","title":"(re.)jcrev"},{"location":"libs/reverbs/#usage","text":"_ : jcrev : _,_,_,_","title":"Usage"},{"location":"libs/reverbs/#resatrev","text":"This artificial reverberator take a mono signal and output stereo ( satrev ) and quad ( jcrev ). They were implemented by John Chowning in the MUS10 computer-music language (descended from Music V by Max Mathews). They are Schroeder Reverberators, well tuned for their size. Nowadays, the more expensive freeverb is more commonly used (see the Faust examples directory). satrev was made from a listing of \"SATREV\", dated May 15, 1971, which was recovered from an old SAIL DART backup tape. John Chowning thinks this might be the one used on his often-heard brass canon sound examples, one of which can be found at * https://ccrma.stanford.edu/~jos/wav/FM-BrassCanon2.wav .","title":"(re.)satrev"},{"location":"libs/reverbs/#usage_1","text":"_ : satrev : _,_","title":"Usage"},{"location":"libs/reverbs/#feedback-delay-network-fdn-reverberators","text":"","title":"Feedback Delay Network (FDN) Reverberators"},{"location":"libs/reverbs/#refdnrev0","text":"Pure Feedback Delay Network Reverberator (generalized for easy scaling). fdnrev0 is a standard Faust function.","title":"(re.)fdnrev0"},{"location":"libs/reverbs/#usage_2","text":"<1,2,4,...,N signals> <: fdnrev0(MAXDELAY,delays,BBSO,freqs,durs,loopgainmax,nonl) :> <1,2,4,...,N signals> Where: N : 2, 4, 8, ... (power of 2) MAXDELAY : power of 2 at least as large as longest delay-line length delays : N delay lines, N a power of 2, lengths perferably coprime BBSO : odd positive integer = order of bandsplit desired at freqs freqs : NB-1 crossover frequencies separating desired frequency bands durs : NB decay times (t60) desired for the various bands loopgainmax : scalar gain between 0 and 1 used to \"squelch\" the reverb nonl : nonlinearity (0 to 0.999..., 0 being linear)","title":"Usage"},{"location":"libs/reverbs/#reference","text":"https://ccrma.stanford.edu/~jos/pasp/FDN_Reverberation.html","title":"Reference"},{"location":"libs/reverbs/#rezita_rev_fdn","text":"Internal 8x8 late-reverberation FDN used in the FOSS Linux reverb zita-rev1 by Fons Adriaensen fons@linuxaudio.org . This is an FDN reverb with allpass comb filters in each feedback delay in addition to the damping filters.","title":"(re.)zita_rev_fdn"},{"location":"libs/reverbs/#usage_3","text":"si.bus(8) : zita_rev_fdn(f1,f2,t60dc,t60m,fsmax) : si.bus(8) Where: f1 : crossover frequency (Hz) separating dc and midrange frequencies f2 : frequency (Hz) above f1 where T60 = t60m/2 (see below) t60dc : desired decay time (t60) at frequency 0 (sec) t60m : desired decay time (t60) at midrange frequencies (sec) fsmax : maximum sampling rate to be used (Hz)","title":"Usage"},{"location":"libs/reverbs/#reference_1","text":"http://www.kokkinizita.net/linuxaudio/zita-rev1-doc/quickguide.html https://ccrma.stanford.edu/~jos/pasp/Zita_Rev1.html","title":"Reference"},{"location":"libs/reverbs/#rezita_rev1_stereo","text":"Extend zita_rev_fdn to include zita_rev1 input/output mapping in stereo mode. zita_rev1_stereo is a standard Faust function.","title":"(re.)zita_rev1_stereo"},{"location":"libs/reverbs/#usage_4","text":"_,_ : zita_rev1_stereo(rdel,f1,f2,t60dc,t60m,fsmax) : _,_ Where: rdel = delay (in ms) before reverberation begins (e.g., 0 to ~100 ms) (remaining args and refs as for zita_rev_fdn above)","title":"Usage"},{"location":"libs/reverbs/#rezita_rev1_ambi","text":"Extend zita_rev_fdn to include zita_rev1 input/output mapping in \"ambisonics mode\", as provided in the Linux C++ version.","title":"(re.)zita_rev1_ambi"},{"location":"libs/reverbs/#usage_5","text":"_,_ : zita_rev1_ambi(rgxyz,rdel,f1,f2,t60dc,t60m,fsmax) : _,_,_,_ Where: rgxyz = relative gain of lanes 1,4,2 to lane 0 in output (e.g., -9 to 9) (remaining args and references as for zita_rev1_stereo above)","title":"Usage"},{"location":"libs/reverbs/#freeverb","text":"","title":"Freeverb"},{"location":"libs/reverbs/#remono_freeverb","text":"A simple Schroeder reverberator primarily developed by \"Jezar at Dreampoint\" that is extensively used in the free-software world. It uses four Schroeder allpasses in series and eight parallel Schroeder-Moorer filtered-feedback comb-filters for each audio channel, and is said to be especially well tuned. mono_freeverb is a standard Faust function.","title":"(re.)mono_freeverb"},{"location":"libs/reverbs/#usage_6","text":"_ : mono_freeverb(fb1, fb2, damp, spread) : _ Where: fb1 : coefficient of the lowpass comb filters (0-1) fb2 : coefficient of the allpass comb filters (0-1) damp : damping of the lowpass comb filter (0-1) spread : spatial spread in number of samples (for stereo)","title":"Usage"},{"location":"libs/reverbs/#license","text":"While this version is licensed LGPL (with exception) along with other GRAME library functions, the file freeverb.dsp in the examples directory of older Faust distributions, such as faust-0.9.85, was released under the BSD license, which is less restrictive.","title":"License"},{"location":"libs/reverbs/#restereo_freeverb","text":"A simple Schroeder reverberator primarily developed by \"Jezar at Dreampoint\" that is extensively used in the free-software world. It uses four Schroeder allpasses in series and eight parallel Schroeder-Moorer filtered-feedback comb-filters for each audio channel, and is said to be especially well tuned.","title":"(re.)stereo_freeverb"},{"location":"libs/reverbs/#usage_7","text":"_,_ : stereo_freeverb(fb1, fb2, damp, spread) : _,_ Where: fb1 : coefficient of the lowpass comb filters (0-1) fb2 : coefficient of the allpass comb filters (0-1) damp : damping of the lowpass comb filter (0-1) spread : spatial spread in number of samples (for stereo)","title":"Usage"},{"location":"libs/reverbs/#dattorro-reverb","text":"","title":"Dattorro Reverb"},{"location":"libs/reverbs/#redattorro_rev","text":"Reverberator based on the Dattorro reverb topology. This implementation does not use modulated delay lengths (excursion).","title":"(re.)dattorro_rev"},{"location":"libs/reverbs/#usage_8","text":"_,_ : dattorro_rev(pre_delay, bw, i_diff1, i_diff2, decay, d_diff1, d_diff2, damping) : _,_ Where: pre_delay : pre-delay in samples (fixed at compile time) bw : band-width filter (pre filtering); (0 - 1) i_diff1 : input diffusion factor 1; (0 - 1) i_diff2 : input diffusion factor 2; decay : decay rate; (0 - 1); infinite decay = 1.0 d_diff1 : decay diffusion factor 1; (0 - 1) d_diff2 : decay diffusion factor 2; damping : high-frequency damping; no damping = 0.0","title":"Usage"},{"location":"libs/reverbs/#reference_2","text":"https://ccrma.stanford.edu/~dattorro/EffectDesignPart1.pdf","title":"Reference"},{"location":"libs/reverbs/#redattorro_rev_default","text":"Reverberator based on the Dattorro reverb topology with reverb parameters from the original paper. This implementation does not use modulated delay lengths (excursion) and uses zero length pre-delay.","title":"(re.)dattorro_rev_default"},{"location":"libs/reverbs/#usage_9","text":"_,_ : dattorro_rev_default : _,_","title":"Usage"},{"location":"libs/reverbs/#reference_3","text":"https://ccrma.stanford.edu/~dattorro/EffectDesignPart1.pdf","title":"Reference"},{"location":"libs/reverbs/#jpverb-and-greyhole-reverbs","text":"","title":"JPverb and Greyhole Reverbs"},{"location":"libs/reverbs/#rejpverb","text":"An algorithmic reverb (stereo in/out), inspired by the lush chorused sound of certain vintage Lexicon and Alesis reverberation units. Designed to sound great with synthetic sound sources, rather than sound like a realistic space.","title":"(re.)jpverb"},{"location":"libs/reverbs/#usage_10","text":"_,_ : jpverb(t60, damp, size, early_diff, mod_depth, mod_freq, low, mid, high, low_cutoff, high_cutoff) : _,_ Where: t60 : approximate reverberation time in seconds ([0.1..60] sec) (T60 - the time for the reverb to decay by 60db when damp == 0 ). Does not effect early reflections damp : controls damping of high-frequencies as the reverb decays. 0 is no damping, 1 is very strong damping. Values should be between ([0..1]) size : scales size of delay-lines within the reverberator, producing the impression of a larger or smaller space. Values below 1 can sound metallic. Values should be between [0.5..5] early_diff : controls shape of early reflections. Values of 0.707 or more produce smooth exponential decay. Lower values produce a slower build-up of echoes. Values should be between ([0..1]) mod_depth : depth ([0..1]) of delay-line modulation. Use in combination with mod_freq to set amount of chorusing within the structure modFreq : frequency ([0..10] Hz) of delay-line modulation. Use in combination with modDepth to set amount of chorusing within the structure low : multiplier ([0..1]) for the reverberation time within the low band mid : multiplier ([0..1]) for the reverberation time within the mid band high : multiplier ([0..1]) for the reverberation time within the high band lowcut : frequency (100..6000 Hz) at which the crossover between the low and mid bands of the reverb occurs highcut : frequency (1000..10000 Hz) at which the crossover between the mid and high bands of the reverb occurs","title":"Usage"},{"location":"libs/reverbs/#reference_4","text":"https://doc.sccode.org/Overviews/DEIND.html","title":"Reference"},{"location":"libs/reverbs/#regreyhole","text":"A complex echo-like effect (stereo in/out), inspired by the classic Eventide effect of a similar name. The effect consists of a diffuser (like a mini-reverb, structurally similar to the one used in jpverb ) connected in a feedback system with a long, modulated delay-line. Excels at producing spacey washes of sound.","title":"(re.)greyhole"},{"location":"libs/reverbs/#usage_11","text":"_,_ : greyhole(dt, damp, size, early_diff, feedback, mod_depth, mod_freq) : _,_ Where: dt : approximate reverberation time in seconds ([0.1..60 sec]) damp : controls damping of high-frequencies as the reverb decays. 0 is no damping, 1 is very strong damping. Values should be between ([0..1]) size : scales size of delay-lines within the diffusion unit, producing the impression of a larger or smaller space. Values below 1 can sound metallic. Values should be between ([0.5..5]) size : control of relative \"room size\" roughly between ([0.5..3]) early_diff : controls pattern of echoes produced by the diffuser. At very low values, the diffuser acts like a delay-line whose length is controlled by the 'size' parameter. Medium values produce a slow build-up of echoes, giving the sound a reversed-like quality. Values of 0.707 or greater than produce smooth exponentially decaying echoes. Values should be in the range ([0..1]) feedback : amount of feedback through the system. Sets the number of repeating echoes. A setting of 1.0 produces infinite sustain. Values should be in the range ([0..1]) mod_depth : depth ([0..1]) of delay-line modulation. Use in combination with mod_freq to produce chorus and pitch-variations in the echoes mod_freq : frequency ([0..10] Hz) of delay-line modulation. Use in combination with mod_depth to produce chorus and pitch-variations in the echoes","title":"Usage"},{"location":"libs/reverbs/#reference_5","text":"https://doc.sccode.org/Overviews/DEIND.html","title":"Reference"},{"location":"libs/routes/","text":"routes.lib A library to handle signal routing in Faust. Its official prefix is ro . References https://github.com/grame-cncm/faustlibraries/blob/master/routes.lib Functions Reference (ro.)cross Cross N signals: (x1,x2,..,xn) -> (xn,..,x2,x1) . cross is a standard Faust function. Usage cross(N) _,_,_ : cross(3) : _,_,_ Where: N : number of signals (int, as a constant numerical expression) Note Special case: cross2 : cross2 = _,cross(2),_; (ro.)crossnn Cross two bus(N) s. Usage (si.bus(2*N)) : crossnn(N) : (si.bus(2*N)) Where: N : the number of signals in the bus (int, as a constant numerical expression) (ro.)crossn1 Cross bus(N) and bus(1) . Usage (si.bus(N),_) : crossn1(N) : (_,si.bus(N)) Where: N : the number of signals in the first bus (int, as a constant numerical expression) (ro.)cross1n Cross bus(1) and bus(N) . Usage (_,si.bus(N)) : crossn1(N) : (si.bus(N),_) Where: N : the number of signals in the second bus (int, as a constant numerical expression) (ro.)crossNM Cross bus(N) and bus(M) . Usage (si.bus(N),si.bus(M)) : crossNM(N,M) : (si.bus(M),si.bus(N)) Where: N : the number of signals in the first bus (int, as a constant numerical expression) M : the number of signals in the second bus (int, as a constant numerical expression) (ro.)interleave Interleave R x C cables from column order to row order. input : x(0), x(1), x(2) ..., x(row col-1) output: x(0+0 row), x(0+1 row), x(0+2 row), ..., x(1+0 row), x(1+1 row), x(1+2*row), ... Usage si.bus(R*C) : interleave(R,C) : si.bus(R*C) Where: R : the number of row (int, as a constant numerical expression) C : the number of column (int, as a constant numerical expression) (ro.)butterfly Addition (first half) then substraction (second half) of interleaved signals. Usage si.bus(N) : butterfly(N) : si.bus(N) Where: N : size of the butterfly (N is int, even and as a constant numerical expression) (ro.)hadamard Hadamard matrix function of size N = 2^k . Usage si.bus(N) : hadamard(N) : si.bus(N) Where: N : 2^k , size of the matrix (int, as a constant numerical expression) (ro.)recursivize Create a recursion from two arbitrary processors p and q . Usage _,_ : recursivize(p,q) : _,_ Where: p : the forward arbitrary processor q : the feedback arbitrary processor (ro.)bubbleSort Sort a set of N parallel signals in ascending order on-the-fly through the Bubble Sort algorithm. Mechanism: having a set of N parallel signals indexed from 0 to N - 1, compare the first pair of signals and swap them if sig[0] > sig[1]; repeat the pair comparison for the signals sig[1] and sig[2], then again recursively until reaching the signals sig[N - 2] and sig[N - 1]; by the end, the largest element in the set will be placed last; repeat the process for the remaining N - 1 signals until there is a single pair left. Note that this implementation will always perform the worst-case computation, O(n^2). Even though the Bubble Sort algorithm is one of the least efficient ones, it is a useful example of how automatic sorting can be implemented at the signal level. Usage si.bus(N) : bubbleSort(N) : si.bus(N) Where: N : the number of signals to be sorted (must be an int >= 0, as a constant numerical expression) Reference https://en.wikipedia.org/wiki/Bubble_sort","title":" routes "},{"location":"libs/routes/#routeslib","text":"A library to handle signal routing in Faust. Its official prefix is ro .","title":"routes.lib"},{"location":"libs/routes/#references","text":"https://github.com/grame-cncm/faustlibraries/blob/master/routes.lib","title":"References"},{"location":"libs/routes/#functions-reference","text":"","title":"Functions Reference"},{"location":"libs/routes/#rocross","text":"Cross N signals: (x1,x2,..,xn) -> (xn,..,x2,x1) . cross is a standard Faust function.","title":"(ro.)cross"},{"location":"libs/routes/#usage","text":"cross(N) _,_,_ : cross(3) : _,_,_ Where: N : number of signals (int, as a constant numerical expression)","title":"Usage"},{"location":"libs/routes/#note","text":"Special case: cross2 : cross2 = _,cross(2),_;","title":"Note"},{"location":"libs/routes/#rocrossnn","text":"Cross two bus(N) s.","title":"(ro.)crossnn"},{"location":"libs/routes/#usage_1","text":"(si.bus(2*N)) : crossnn(N) : (si.bus(2*N)) Where: N : the number of signals in the bus (int, as a constant numerical expression)","title":"Usage"},{"location":"libs/routes/#rocrossn1","text":"Cross bus(N) and bus(1) .","title":"(ro.)crossn1"},{"location":"libs/routes/#usage_2","text":"(si.bus(N),_) : crossn1(N) : (_,si.bus(N)) Where: N : the number of signals in the first bus (int, as a constant numerical expression)","title":"Usage"},{"location":"libs/routes/#rocross1n","text":"Cross bus(1) and bus(N) .","title":"(ro.)cross1n"},{"location":"libs/routes/#usage_3","text":"(_,si.bus(N)) : crossn1(N) : (si.bus(N),_) Where: N : the number of signals in the second bus (int, as a constant numerical expression)","title":"Usage"},{"location":"libs/routes/#rocrossnm","text":"Cross bus(N) and bus(M) .","title":"(ro.)crossNM"},{"location":"libs/routes/#usage_4","text":"(si.bus(N),si.bus(M)) : crossNM(N,M) : (si.bus(M),si.bus(N)) Where: N : the number of signals in the first bus (int, as a constant numerical expression) M : the number of signals in the second bus (int, as a constant numerical expression)","title":"Usage"},{"location":"libs/routes/#rointerleave","text":"Interleave R x C cables from column order to row order. input : x(0), x(1), x(2) ..., x(row col-1) output: x(0+0 row), x(0+1 row), x(0+2 row), ..., x(1+0 row), x(1+1 row), x(1+2*row), ...","title":"(ro.)interleave"},{"location":"libs/routes/#usage_5","text":"si.bus(R*C) : interleave(R,C) : si.bus(R*C) Where: R : the number of row (int, as a constant numerical expression) C : the number of column (int, as a constant numerical expression)","title":"Usage"},{"location":"libs/routes/#robutterfly","text":"Addition (first half) then substraction (second half) of interleaved signals.","title":"(ro.)butterfly"},{"location":"libs/routes/#usage_6","text":"si.bus(N) : butterfly(N) : si.bus(N) Where: N : size of the butterfly (N is int, even and as a constant numerical expression)","title":"Usage"},{"location":"libs/routes/#rohadamard","text":"Hadamard matrix function of size N = 2^k .","title":"(ro.)hadamard"},{"location":"libs/routes/#usage_7","text":"si.bus(N) : hadamard(N) : si.bus(N) Where: N : 2^k , size of the matrix (int, as a constant numerical expression)","title":"Usage"},{"location":"libs/routes/#rorecursivize","text":"Create a recursion from two arbitrary processors p and q .","title":"(ro.)recursivize"},{"location":"libs/routes/#usage_8","text":"_,_ : recursivize(p,q) : _,_ Where: p : the forward arbitrary processor q : the feedback arbitrary processor","title":"Usage"},{"location":"libs/routes/#robubblesort","text":"Sort a set of N parallel signals in ascending order on-the-fly through the Bubble Sort algorithm. Mechanism: having a set of N parallel signals indexed from 0 to N - 1, compare the first pair of signals and swap them if sig[0] > sig[1]; repeat the pair comparison for the signals sig[1] and sig[2], then again recursively until reaching the signals sig[N - 2] and sig[N - 1]; by the end, the largest element in the set will be placed last; repeat the process for the remaining N - 1 signals until there is a single pair left. Note that this implementation will always perform the worst-case computation, O(n^2). Even though the Bubble Sort algorithm is one of the least efficient ones, it is a useful example of how automatic sorting can be implemented at the signal level.","title":"(ro.)bubbleSort"},{"location":"libs/routes/#usage_9","text":"si.bus(N) : bubbleSort(N) : si.bus(N) Where: N : the number of signals to be sorted (must be an int >= 0, as a constant numerical expression)","title":"Usage"},{"location":"libs/routes/#reference","text":"https://en.wikipedia.org/wiki/Bubble_sort","title":"Reference"},{"location":"libs/signals/","text":"signals.lib A library of basic elements to handle signals in Faust. Its official prefix is si . References https://github.com/grame-cncm/faustlibraries/blob/master/signals.lib Functions Reference (si.)bus Put N cables in parallel. bus is a standard Faust function. Usage bus(N) bus(4) : _,_,_,_ Where: N : is an integer known at compile time that indicates the number of parallel cables (si.)block Block - terminate N signals. block is a standard Faust function. Usage si.bus(N) : block(N) Where: N : the number of signals to be blocked known at compile time (si.)interpolate Linear interpolation between two signals. Usage _,_ : interpolate(i) : _ Where: i : interpolation control between 0 and 1 (0: first input; 1: second input) (si.)smoo Smoothing function based on smooth ideal to smooth UI signals (sliders, etc.) down. Approximately, this is a 7 Hz one-pole low-pass considering the coefficient calculation: exp(-2pi*CF/SR). smoo is a standard Faust function. Usage hslider(...) : smoo; (si.)polySmooth A smoothing function based on smooth that doesn't smooth when a trigger signal is given. This is very useful when making polyphonic synthesizer to make sure that the value of the parameter is the right one when the note is started. Usage hslider(...) : polySmooth(g,s,d) : _ Where: g : the gate/trigger signal used when making polyphonic synths s : the smoothness (see smooth ) d : the number of samples to wait before the signal start being smoothed after g switched to 1 (si.)smoothAndH A smoothing function based on smooth that holds its output signal when a trigger is sent to it. This feature is convenient when implementing polyphonic instruments to prevent some smoothed parameter to change when a note-off event is sent. Usage hslider(...) : smoothAndH(g,s) : _ Where: g : the hold signal (0 for hold, 1 for bypass) s : the smoothness (see smooth ) (si.)bsmooth Block smooth linear interpolation during a block of samples (given by the ma.BS value). Usage hslider(...) : bsmooth : _ (si.)dot Dot product for two vectors of size N. Usage si.bus(N), si.bus(N) : dot(N) : _ Where: N : size of the vectors (int, must be known at compile time) (si.)smooth Exponential smoothing by a unity-dc-gain one-pole lowpass. smooth is a standard Faust function. Usage: _ : si.smooth(ba.tau2pole(tau)) : _ Where: tau : desired smoothing time constant in seconds, or hslider(...) : smooth(s) : _ Where: s : smoothness between 0 and 1. s=0 for no smoothing, s=0.999 is \"very smooth\", s>1 is unstable, and s=1 yields the zero signal for all inputs. The exponential time-constant is approximately 1/(1-s) samples, when s is close to (but less than) 1. References: https://ccrma.stanford.edu/~jos/mdft/Convolution_Example_2_ADSR.html https://ccrma.stanford.edu/~jos/aspf/Appendix_B_Inspecting_Assembly.html (si.)cbus N parallel cables for complex signals. cbus is a standard Faust function. Usage cbus(N) cbus(4) : (r0,i0), (r1,i1), (r2,i2), (r3,i3) Where: N : is an integer known at compile time that indicates the number of parallel cables. each complex number is represented by two real signals as (real,imag) (si.)cmul Multiply two complex signals pointwise. cmul is a standard Faust function. Usage (r1,i1) : cmul(r2,i2) : (_,_) Where: Each complex number is represented by two real signals as (real,imag), so (r1,i1) = real and imaginary parts of signal 1 (r2,i2) = real and imaginary parts of signal 2 (si.)cconj Complex conjugation of a (complex) signal. cconj is a standard Faust function. Usage (r1,i1) : cconj : (_,_) Where: Each complex number is represented by two real signals as (real,imag), so (r1,i1) = real and imaginary parts of the input signal (r1,-i1) = real and imaginary parts of the output signal (si.)onePoleSwitching One pole filter with independent attack and release times. Usage _ : onePoleSwitching(att,rel) : _ Where: att : the attack tau time constant in second rel : the release tau time constant in second (si.)rev Reverse the input signal by blocks of n>0 samples. rev(1) is the indentity function. rev(n) has a latency of n-1 samples. Usage _ : rev(n) : _ Where: n : the block size in samples (si.)vecOp This function is a generalisation of Faust's iterators such as prod and sum , and it allows to perform operations on an arbitrary number of vectors, provided that they all have the same length. Unlike Faust's iterators prod and sum where the vector size is equal to one and the vector space dimension must be specified by the user, this function will infer the vector space dimension and vector size based on the vectors list that we provide. The outputs of the function are equal to the vector size, whereas the number of inputs is dependent on whether the elements of the vectors provided expect an incoming signal themselves or not. We will see a clarifying example later; in general, the number of total inputs will be the sum of the inputs in each input vector. Note that we must provide a list of at least two vectors, each with a size that is greater or equal to one. Usage si.bus(inputs(vectorsList)) : vecOp((vectorsList), op) : si.bus(outputs(ba.take(1, vectorsList))); Where vectorsList : is a list of vectors op : is a two-input, one-output operator For example, consider the following vectors lists: v0 = (0 , 1 , 2 , 3); v1 = (4 , 5 , 6 , 7); v2 = (8 , 9 , 10 , 11); v3 = (12 , 13 , 14 , 15); v4 = (+(16) , _ , 18 , *(19)); vv = (v0 , v1 , v2 , v3); Although Faust has limitations for list processing, these vectors can be combined or processed individually. If we do: process = vecOp(v0, +); the function will deduce a vector space of dimension equal to four and a vector length equal to one. Note that this is equivalent to writing: process = v0 : sum(i, 4, _); Similarly, we can write: process = vecOp((v0 , v1), *) :> _; and we have a dimension-two space and length-four vectors. This is the dot product between vectors v0 and v1, which is equivalent to writing: process = v0 , v1 : dot(4); The examples above have no inputs, as none of the elements of the vectors expect inputs. On the other hand, we can write: process = vecOp((v4 , v4), +); and the function will have six inputs and four outputs, as each vector has three of the four elements expecting an input, times two, as the two input vectors are identical. Finally, we can write: process = vecOp(vv, &); to perform the bitwise AND on all the elements at the same position in each vector, having dimension equal to the vector length equal to four. Or even: process = vecOp((vv , vv), &); which gives us a dimension equal to two, and a vector size equal to sixteen. For a more practical use-case, this is how we can implement a time-invariant feedback delay network with Hadamard matrix: N = 4; normalisation = 1.0 / sqrt(N); coeffVec = par(i, N, .99 * normalisation); delVec = par(i, N, (i + 1) * 3); process = vecOp((si.bus(N) , si.bus(N)), +) ~ vecOp((vecOp((ro.hadamard(N) , coeffVec), *) , delVec), @);","title":" signals "},{"location":"libs/signals/#signalslib","text":"A library of basic elements to handle signals in Faust. Its official prefix is si .","title":"signals.lib"},{"location":"libs/signals/#references","text":"https://github.com/grame-cncm/faustlibraries/blob/master/signals.lib","title":"References"},{"location":"libs/signals/#functions-reference","text":"","title":"Functions Reference"},{"location":"libs/signals/#sibus","text":"Put N cables in parallel. bus is a standard Faust function.","title":"(si.)bus"},{"location":"libs/signals/#usage","text":"bus(N) bus(4) : _,_,_,_ Where: N : is an integer known at compile time that indicates the number of parallel cables","title":"Usage"},{"location":"libs/signals/#siblock","text":"Block - terminate N signals. block is a standard Faust function.","title":"(si.)block"},{"location":"libs/signals/#usage_1","text":"si.bus(N) : block(N) Where: N : the number of signals to be blocked known at compile time","title":"Usage"},{"location":"libs/signals/#siinterpolate","text":"Linear interpolation between two signals.","title":"(si.)interpolate"},{"location":"libs/signals/#usage_2","text":"_,_ : interpolate(i) : _ Where: i : interpolation control between 0 and 1 (0: first input; 1: second input)","title":"Usage"},{"location":"libs/signals/#sismoo","text":"Smoothing function based on smooth ideal to smooth UI signals (sliders, etc.) down. Approximately, this is a 7 Hz one-pole low-pass considering the coefficient calculation: exp(-2pi*CF/SR). smoo is a standard Faust function.","title":"(si.)smoo"},{"location":"libs/signals/#usage_3","text":"hslider(...) : smoo;","title":"Usage"},{"location":"libs/signals/#sipolysmooth","text":"A smoothing function based on smooth that doesn't smooth when a trigger signal is given. This is very useful when making polyphonic synthesizer to make sure that the value of the parameter is the right one when the note is started.","title":"(si.)polySmooth"},{"location":"libs/signals/#usage_4","text":"hslider(...) : polySmooth(g,s,d) : _ Where: g : the gate/trigger signal used when making polyphonic synths s : the smoothness (see smooth ) d : the number of samples to wait before the signal start being smoothed after g switched to 1","title":"Usage"},{"location":"libs/signals/#sismoothandh","text":"A smoothing function based on smooth that holds its output signal when a trigger is sent to it. This feature is convenient when implementing polyphonic instruments to prevent some smoothed parameter to change when a note-off event is sent.","title":"(si.)smoothAndH"},{"location":"libs/signals/#usage_5","text":"hslider(...) : smoothAndH(g,s) : _ Where: g : the hold signal (0 for hold, 1 for bypass) s : the smoothness (see smooth )","title":"Usage"},{"location":"libs/signals/#sibsmooth","text":"Block smooth linear interpolation during a block of samples (given by the ma.BS value).","title":"(si.)bsmooth"},{"location":"libs/signals/#usage_6","text":"hslider(...) : bsmooth : _","title":"Usage"},{"location":"libs/signals/#sidot","text":"Dot product for two vectors of size N.","title":"(si.)dot"},{"location":"libs/signals/#usage_7","text":"si.bus(N), si.bus(N) : dot(N) : _ Where: N : size of the vectors (int, must be known at compile time)","title":"Usage"},{"location":"libs/signals/#sismooth","text":"Exponential smoothing by a unity-dc-gain one-pole lowpass. smooth is a standard Faust function.","title":"(si.)smooth"},{"location":"libs/signals/#usage_8","text":"_ : si.smooth(ba.tau2pole(tau)) : _ Where: tau : desired smoothing time constant in seconds, or hslider(...) : smooth(s) : _ Where: s : smoothness between 0 and 1. s=0 for no smoothing, s=0.999 is \"very smooth\", s>1 is unstable, and s=1 yields the zero signal for all inputs. The exponential time-constant is approximately 1/(1-s) samples, when s is close to (but less than) 1.","title":"Usage:"},{"location":"libs/signals/#references_1","text":"https://ccrma.stanford.edu/~jos/mdft/Convolution_Example_2_ADSR.html https://ccrma.stanford.edu/~jos/aspf/Appendix_B_Inspecting_Assembly.html","title":"References:"},{"location":"libs/signals/#sicbus","text":"N parallel cables for complex signals. cbus is a standard Faust function.","title":"(si.)cbus"},{"location":"libs/signals/#usage_9","text":"cbus(N) cbus(4) : (r0,i0), (r1,i1), (r2,i2), (r3,i3) Where: N : is an integer known at compile time that indicates the number of parallel cables. each complex number is represented by two real signals as (real,imag)","title":"Usage"},{"location":"libs/signals/#sicmul","text":"Multiply two complex signals pointwise. cmul is a standard Faust function.","title":"(si.)cmul"},{"location":"libs/signals/#usage_10","text":"(r1,i1) : cmul(r2,i2) : (_,_) Where: Each complex number is represented by two real signals as (real,imag), so (r1,i1) = real and imaginary parts of signal 1 (r2,i2) = real and imaginary parts of signal 2","title":"Usage"},{"location":"libs/signals/#sicconj","text":"Complex conjugation of a (complex) signal. cconj is a standard Faust function.","title":"(si.)cconj"},{"location":"libs/signals/#usage_11","text":"(r1,i1) : cconj : (_,_) Where: Each complex number is represented by two real signals as (real,imag), so (r1,i1) = real and imaginary parts of the input signal (r1,-i1) = real and imaginary parts of the output signal","title":"Usage"},{"location":"libs/signals/#sionepoleswitching","text":"One pole filter with independent attack and release times.","title":"(si.)onePoleSwitching"},{"location":"libs/signals/#usage_12","text":"_ : onePoleSwitching(att,rel) : _ Where: att : the attack tau time constant in second rel : the release tau time constant in second","title":"Usage"},{"location":"libs/signals/#sirev","text":"Reverse the input signal by blocks of n>0 samples. rev(1) is the indentity function. rev(n) has a latency of n-1 samples.","title":"(si.)rev"},{"location":"libs/signals/#usage_13","text":"_ : rev(n) : _ Where: n : the block size in samples","title":"Usage"},{"location":"libs/signals/#sivecop","text":"This function is a generalisation of Faust's iterators such as prod and sum , and it allows to perform operations on an arbitrary number of vectors, provided that they all have the same length. Unlike Faust's iterators prod and sum where the vector size is equal to one and the vector space dimension must be specified by the user, this function will infer the vector space dimension and vector size based on the vectors list that we provide. The outputs of the function are equal to the vector size, whereas the number of inputs is dependent on whether the elements of the vectors provided expect an incoming signal themselves or not. We will see a clarifying example later; in general, the number of total inputs will be the sum of the inputs in each input vector. Note that we must provide a list of at least two vectors, each with a size that is greater or equal to one.","title":"(si.)vecOp"},{"location":"libs/signals/#usage_14","text":"si.bus(inputs(vectorsList)) : vecOp((vectorsList), op) : si.bus(outputs(ba.take(1, vectorsList)));","title":"Usage"},{"location":"libs/signals/#where","text":"vectorsList : is a list of vectors op : is a two-input, one-output operator For example, consider the following vectors lists: v0 = (0 , 1 , 2 , 3); v1 = (4 , 5 , 6 , 7); v2 = (8 , 9 , 10 , 11); v3 = (12 , 13 , 14 , 15); v4 = (+(16) , _ , 18 , *(19)); vv = (v0 , v1 , v2 , v3); Although Faust has limitations for list processing, these vectors can be combined or processed individually. If we do: process = vecOp(v0, +); the function will deduce a vector space of dimension equal to four and a vector length equal to one. Note that this is equivalent to writing: process = v0 : sum(i, 4, _); Similarly, we can write: process = vecOp((v0 , v1), *) :> _; and we have a dimension-two space and length-four vectors. This is the dot product between vectors v0 and v1, which is equivalent to writing: process = v0 , v1 : dot(4); The examples above have no inputs, as none of the elements of the vectors expect inputs. On the other hand, we can write: process = vecOp((v4 , v4), +); and the function will have six inputs and four outputs, as each vector has three of the four elements expecting an input, times two, as the two input vectors are identical. Finally, we can write: process = vecOp(vv, &); to perform the bitwise AND on all the elements at the same position in each vector, having dimension equal to the vector length equal to four. Or even: process = vecOp((vv , vv), &); which gives us a dimension equal to two, and a vector size equal to sixteen. For a more practical use-case, this is how we can implement a time-invariant feedback delay network with Hadamard matrix: N = 4; normalisation = 1.0 / sqrt(N); coeffVec = par(i, N, .99 * normalisation); delVec = par(i, N, (i + 1) * 3); process = vecOp((si.bus(N) , si.bus(N)), +) ~ vecOp((vecOp((ro.hadamard(N) , coeffVec), *) , delVec), @);","title":"Where"},{"location":"libs/soundfiles/","text":"soundfiles.lib A library to handle soundfiles in Faust. Its official prefix is so . References https://github.com/grame-cncm/faustlibraries/blob/master/soundfiles.lib Functions Reference (so.)loop Play a soundfile in a loop taking into account its sampling rate. loop is a standard Faust function. Usage loop(sf, part) : si.bus(outputs(sf)) Where: sf : the soundfile part : the part in the soundfile list of sounds (so.)loop_speed Play a soundfile in a loop taking into account its sampling rate, with speed control. loop_speed is a standard Faust function. Usage loop_speed(sf, part, speed) : si.bus(outputs(sf)) Where: sf : the soundfile part : the part in the soundfile list of sounds speed : the speed between 0 and n (so.)loop_speed_level Play a soundfile in a loop taking into account its sampling rate, with speed and level controls. loop_speed_level is a standard Faust function. Usage loop_speed_level(sf, part, speed, level) : si.bus(outputs(sf)) Where: sf : the soundfile part : the part in the soundfile list of sounds speed : the speed between 0 and n level : the volume between 0 and n","title":" soundfiles "},{"location":"libs/soundfiles/#soundfileslib","text":"A library to handle soundfiles in Faust. Its official prefix is so .","title":"soundfiles.lib"},{"location":"libs/soundfiles/#references","text":"https://github.com/grame-cncm/faustlibraries/blob/master/soundfiles.lib","title":"References"},{"location":"libs/soundfiles/#functions-reference","text":"","title":"Functions Reference"},{"location":"libs/soundfiles/#soloop","text":"Play a soundfile in a loop taking into account its sampling rate. loop is a standard Faust function.","title":"(so.)loop"},{"location":"libs/soundfiles/#usage","text":"loop(sf, part) : si.bus(outputs(sf)) Where: sf : the soundfile part : the part in the soundfile list of sounds","title":"Usage"},{"location":"libs/soundfiles/#soloop_speed","text":"Play a soundfile in a loop taking into account its sampling rate, with speed control. loop_speed is a standard Faust function.","title":"(so.)loop_speed"},{"location":"libs/soundfiles/#usage_1","text":"loop_speed(sf, part, speed) : si.bus(outputs(sf)) Where: sf : the soundfile part : the part in the soundfile list of sounds speed : the speed between 0 and n","title":"Usage"},{"location":"libs/soundfiles/#soloop_speed_level","text":"Play a soundfile in a loop taking into account its sampling rate, with speed and level controls. loop_speed_level is a standard Faust function.","title":"(so.)loop_speed_level"},{"location":"libs/soundfiles/#usage_2","text":"loop_speed_level(sf, part, speed, level) : si.bus(outputs(sf)) Where: sf : the soundfile part : the part in the soundfile list of sounds speed : the speed between 0 and n level : the volume between 0 and n","title":"Usage"},{"location":"libs/spats/","text":"spats.lib This library contains a collection of tools for sound spatialization. Its official prefix is sp . References https://github.com/grame-cncm/faustlibraries/blob/master/spats.lib (sp.)panner A simple linear stereo panner. panner is a standard Faust function. Usage _ : panner(g) : _,_ Where: g : the panning (0-1) (sp.)constantPowerPan Apply the constant power pan rule to a stereo signal. The channels are not respatialized. Their gains are simply adjusted. A pan of 0 preserves the left channel and silences the right channel. A pan of 1 has the opposite effect. A pan value of 0.5 applies a gain of 0.5 to both channels. Usage _,_ : constantPowerPan(p) : _,_ Where: p : the panning (0-1) (sp.)spat GMEM SPAT: n-outputs spatializer. spat is a standard Faust function. Usage _ : spat(N,r,d) : si.bus(N) Where: N : number of outputs (a constant numerical expression) r : rotation (between 0 et 1) d : distance of the source (between 0 et 1) (sp.)stereoize Transform an arbitrary processor p into a stereo processor with 2 inputs and 2 outputs. Usage _,_ : stereoize(p) : _,_ Where: p : the arbitrary processor","title":" spats "},{"location":"libs/spats/#spatslib","text":"This library contains a collection of tools for sound spatialization. Its official prefix is sp .","title":"spats.lib"},{"location":"libs/spats/#references","text":"https://github.com/grame-cncm/faustlibraries/blob/master/spats.lib","title":"References"},{"location":"libs/spats/#sppanner","text":"A simple linear stereo panner. panner is a standard Faust function.","title":"(sp.)panner"},{"location":"libs/spats/#usage","text":"_ : panner(g) : _,_ Where: g : the panning (0-1)","title":"Usage"},{"location":"libs/spats/#spconstantpowerpan","text":"Apply the constant power pan rule to a stereo signal. The channels are not respatialized. Their gains are simply adjusted. A pan of 0 preserves the left channel and silences the right channel. A pan of 1 has the opposite effect. A pan value of 0.5 applies a gain of 0.5 to both channels.","title":"(sp.)constantPowerPan"},{"location":"libs/spats/#usage_1","text":"_,_ : constantPowerPan(p) : _,_ Where: p : the panning (0-1)","title":"Usage"},{"location":"libs/spats/#spspat","text":"GMEM SPAT: n-outputs spatializer. spat is a standard Faust function.","title":"(sp.)spat"},{"location":"libs/spats/#usage_2","text":"_ : spat(N,r,d) : si.bus(N) Where: N : number of outputs (a constant numerical expression) r : rotation (between 0 et 1) d : distance of the source (between 0 et 1)","title":"Usage"},{"location":"libs/spats/#spstereoize","text":"Transform an arbitrary processor p into a stereo processor with 2 inputs and 2 outputs.","title":"(sp.)stereoize"},{"location":"libs/spats/#usage_3","text":"_,_ : stereoize(p) : _,_ Where: p : the arbitrary processor","title":"Usage"},{"location":"libs/synths/","text":"synths.lib This library contains a collection of synthesizers. Its official prefix is sy . References https://github.com/grame-cncm/faustlibraries/blob/master/synths.lib (sy.)popFilterDrum A simple percussion instrument based on a \"popped\" resonant bandpass filter. popFilterDrum is a standard Faust function. Usage popFilterDrum(freq,q,gate) : _ Where: freq : the resonance frequency of the instrument q : the q of the res filter (typically, 5 is a good value) gate : the trigger signal (0 or 1) (sy.)dubDub A simple synth based on a sawtooth wave filtered by a resonant lowpass. dubDub is a standard Faust function. Usage dubDub(freq,ctFreq,q,gate) : _ Where: freq : frequency of the sawtooth ctFreq : cutoff frequency of the filter q : Q of the filter gate : the trigger signal (0 or 1) (sy.)sawTrombone A simple trombone based on a lowpassed sawtooth wave. sawTrombone is a standard Faust function. Usage sawTrombone(att,freq,gain,gate) : _ Where: att : exponential attack duration in s (typically 0.01) freq : the frequency gain : the gain (0-1) gate : the gate (0 or 1) (sy.)combString Simplest string physical model ever based on a comb filter. combString is a standard Faust function. Usage combString(freq,res,gate) : _ Where: freq : the frequency of the string res : string T60 (resonance time) in second gate : trigger signal (0 or 1) (sy.)additiveDrum A simple drum using additive synthesis. additiveDrum is a standard Faust function. Usage additiveDrum(freq,freqRatio,gain,harmDec,att,rel,gate) : _ Where: freq : the resonance frequency of the drum freqRatio : a list of ratio to choose the frequency of the mode in function of freq e.g.(1 1.2 1.5 ...). The first element should always be one (fundamental). gain : the gain of each mode as a list (1 0.9 0.8 ...). The first element is the gain of the fundamental. harmDec : harmonic decay ratio (0-1): configure the speed at which higher modes decay compare to lower modes. att : attack duration in second rel : release duration in second gate : trigger signal (0 or 1) (sy.)fm An FM synthesizer with an arbitrary number of modulators connected as a sequence. fm is a standard Faust function. Usage freqs = (300,400,...); indices = (20,...); fm(freqs,indices) : _ Where: freqs : a list of frequencies where the first one is the frequency of the carrier and the others, the frequency of the modulator(s) indices : the indices of modulation (Nfreqs-1) Drum Synthesis Drum Synthesis ported in Faust from a version written in Elementary and JavaScript by Nick Thompson. Reference https://www.nickwritesablog.com/drum-synthesis-in-javascript/ (sy.)kick Kick drum synthesis via a pitched sine sweep. Usage kick(pitch, click, attack, decay, drive, gate) : _ Where: pitch : the base frequency of the kick drum in Hz click : the speed of the pitch envelope, tuned for [0.005s, 1s] attack : attack time in seconds, tuned for [0.005s, 0.4s] decay : decay time in seconds, tuned for [0.005s, 4.0s] drive : a gain multiplier going into the saturator. Tuned for [1, 10] gate : the gate which triggers the amp envelope Reference https://github.com/nick-thompson/drumsynth/blob/master/kick.js (sy.)clap Clap synthesis via filtered white noise. Usage clap(tone, attack, decay, gate) : _ Where: tone : bandpass filter cutoff frequency, tuned for [400Hz, 3500Hz] attack : attack time in seconds, tuned for [0s, 0.2s] decay : decay time in seconds, tuned for [0s, 4.0s] gate : the gate which triggers the amp envelope Reference https://github.com/nick-thompson/drumsynth/blob/master/clap.js (sy.)hat Hi hat drum synthesis via phase modulation. Usage hat(pitch, tone, attack, decay, gate): _ Where: pitch : base frequency in the range [317Hz, 3170Hz] tone : bandpass filter cutoff frequency, tuned for [800Hz, 18kHz] attack : attack time in seconds, tuned for [0.005s, 0.2s] decay : decay time in seconds, tuned for [0.005s, 4.0s] gate : the gate which triggers the amp envelope Reference https://github.com/nick-thompson/drumsynth/blob/master/hat.js","title":" synths "},{"location":"libs/synths/#synthslib","text":"This library contains a collection of synthesizers. Its official prefix is sy .","title":"synths.lib"},{"location":"libs/synths/#references","text":"https://github.com/grame-cncm/faustlibraries/blob/master/synths.lib","title":"References"},{"location":"libs/synths/#sypopfilterdrum","text":"A simple percussion instrument based on a \"popped\" resonant bandpass filter. popFilterDrum is a standard Faust function.","title":"(sy.)popFilterDrum"},{"location":"libs/synths/#usage","text":"popFilterDrum(freq,q,gate) : _ Where: freq : the resonance frequency of the instrument q : the q of the res filter (typically, 5 is a good value) gate : the trigger signal (0 or 1)","title":"Usage"},{"location":"libs/synths/#sydubdub","text":"A simple synth based on a sawtooth wave filtered by a resonant lowpass. dubDub is a standard Faust function.","title":"(sy.)dubDub"},{"location":"libs/synths/#usage_1","text":"dubDub(freq,ctFreq,q,gate) : _ Where: freq : frequency of the sawtooth ctFreq : cutoff frequency of the filter q : Q of the filter gate : the trigger signal (0 or 1)","title":"Usage"},{"location":"libs/synths/#sysawtrombone","text":"A simple trombone based on a lowpassed sawtooth wave. sawTrombone is a standard Faust function.","title":"(sy.)sawTrombone"},{"location":"libs/synths/#usage_2","text":"sawTrombone(att,freq,gain,gate) : _ Where: att : exponential attack duration in s (typically 0.01) freq : the frequency gain : the gain (0-1) gate : the gate (0 or 1)","title":"Usage"},{"location":"libs/synths/#sycombstring","text":"Simplest string physical model ever based on a comb filter. combString is a standard Faust function.","title":"(sy.)combString"},{"location":"libs/synths/#usage_3","text":"combString(freq,res,gate) : _ Where: freq : the frequency of the string res : string T60 (resonance time) in second gate : trigger signal (0 or 1)","title":"Usage"},{"location":"libs/synths/#syadditivedrum","text":"A simple drum using additive synthesis. additiveDrum is a standard Faust function.","title":"(sy.)additiveDrum"},{"location":"libs/synths/#usage_4","text":"additiveDrum(freq,freqRatio,gain,harmDec,att,rel,gate) : _ Where: freq : the resonance frequency of the drum freqRatio : a list of ratio to choose the frequency of the mode in function of freq e.g.(1 1.2 1.5 ...). The first element should always be one (fundamental). gain : the gain of each mode as a list (1 0.9 0.8 ...). The first element is the gain of the fundamental. harmDec : harmonic decay ratio (0-1): configure the speed at which higher modes decay compare to lower modes. att : attack duration in second rel : release duration in second gate : trigger signal (0 or 1)","title":"Usage"},{"location":"libs/synths/#syfm","text":"An FM synthesizer with an arbitrary number of modulators connected as a sequence. fm is a standard Faust function.","title":"(sy.)fm"},{"location":"libs/synths/#usage_5","text":"freqs = (300,400,...); indices = (20,...); fm(freqs,indices) : _ Where: freqs : a list of frequencies where the first one is the frequency of the carrier and the others, the frequency of the modulator(s) indices : the indices of modulation (Nfreqs-1)","title":"Usage"},{"location":"libs/synths/#drum-synthesis","text":"Drum Synthesis ported in Faust from a version written in Elementary and JavaScript by Nick Thompson.","title":"Drum Synthesis"},{"location":"libs/synths/#reference","text":"https://www.nickwritesablog.com/drum-synthesis-in-javascript/","title":"Reference"},{"location":"libs/synths/#sykick","text":"Kick drum synthesis via a pitched sine sweep.","title":"(sy.)kick"},{"location":"libs/synths/#usage_6","text":"kick(pitch, click, attack, decay, drive, gate) : _ Where: pitch : the base frequency of the kick drum in Hz click : the speed of the pitch envelope, tuned for [0.005s, 1s] attack : attack time in seconds, tuned for [0.005s, 0.4s] decay : decay time in seconds, tuned for [0.005s, 4.0s] drive : a gain multiplier going into the saturator. Tuned for [1, 10] gate : the gate which triggers the amp envelope","title":"Usage"},{"location":"libs/synths/#reference_1","text":"https://github.com/nick-thompson/drumsynth/blob/master/kick.js","title":"Reference"},{"location":"libs/synths/#syclap","text":"Clap synthesis via filtered white noise.","title":"(sy.)clap"},{"location":"libs/synths/#usage_7","text":"clap(tone, attack, decay, gate) : _ Where: tone : bandpass filter cutoff frequency, tuned for [400Hz, 3500Hz] attack : attack time in seconds, tuned for [0s, 0.2s] decay : decay time in seconds, tuned for [0s, 4.0s] gate : the gate which triggers the amp envelope","title":"Usage"},{"location":"libs/synths/#reference_2","text":"https://github.com/nick-thompson/drumsynth/blob/master/clap.js","title":"Reference"},{"location":"libs/synths/#syhat","text":"Hi hat drum synthesis via phase modulation.","title":"(sy.)hat"},{"location":"libs/synths/#usage_8","text":"hat(pitch, tone, attack, decay, gate): _ Where: pitch : base frequency in the range [317Hz, 3170Hz] tone : bandpass filter cutoff frequency, tuned for [800Hz, 18kHz] attack : attack time in seconds, tuned for [0.005s, 0.2s] decay : decay time in seconds, tuned for [0.005s, 4.0s] gate : the gate which triggers the amp envelope","title":"Usage"},{"location":"libs/synths/#reference_3","text":"https://github.com/nick-thompson/drumsynth/blob/master/hat.js","title":"Reference"},{"location":"libs/vaeffects/","text":"vaeffects.lib A library of virtual analog filter effects. Its official prefix is ve . References https://github.com/grame-cncm/faustlibraries/blob/master/vaeffects.lib Moog Filters (ve.)moog_vcf Moog \"Voltage Controlled Filter\" (VCF) in \"analog\" form. Moog VCF implemented using the same logical block diagram as the classic analog circuit. As such, it neglects the one-sample delay associated with the feedback path around the four one-poles. This extra delay alters the response, especially at high frequencies (see reference [1] for details). See moog_vcf_2b below for a more accurate implementation. Usage _ : moog_vcf(res,fr) : _ Where: res : normalized amount of corner-resonance between 0 and 1 (0 is no resonance, 1 is maximum) fr : corner-resonance frequency in Hz (less than SR/6.3 or so) References https://ccrma.stanford.edu/~stilti/papers/moogvcf.pdf https://ccrma.stanford.edu/~jos/pasp/vegf.html (ve.)moog_vcf_2b[n] Moog \"Voltage Controlled Filter\" (VCF) as two biquads. Implementation of the ideal Moog VCF transfer function factored into second-order sections. As a result, it is more accurate than moog_vcf above, but its coefficient formulas are more complex when one or both parameters are varied. Here, res is the fourth root of that in moog_vcf , so, as the sampling rate approaches infinity, moog_vcf(res,fr) becomes equivalent to moog_vcf_2b[n](res^4,fr) (when res and fr are constant). moog_vcf_2b uses two direct-form biquads ( tf2 ). moog_vcf_2bn uses two protected normalized-ladder biquads ( tf2np ). Usage _ : moog_vcf_2b(res,fr) : _ _ : moog_vcf_2bn(res,fr) : _ Where: res : normalized amount of corner-resonance between 0 and 1 (0 is min resonance, 1 is maximum) fr : corner-resonance frequency in Hz (ve.)moogLadder Virtual analog model of the 4th-order Moog Ladder, which is arguably the most well-known ladder filter in analog synthesizers. Several 1st-order filters are cascaded in series. Feedback is then used, in part, to control the cut-off frequency and the resonance. References [Zavalishin 2012] (revision 2.1.2, February 2020): https://www.native-instruments.com/fileadmin/ni_media/downloads/pdf/VAFilterDesign_2.1.2.pdf This fix is based on Lorenzo Della Cioppa's correction to Pirkle's implementation; see this post: https://www.kvraudio.com/forum/viewtopic.php?f=33&t=571909 Usage _ : moogLadder(normFreq,Q) : _ Where: normFreq : normalized frequency (0-1) Q : quality factor between .707 (0 feedback coefficient) to 25 (feedback = 4, which is the self-oscillating threshold). (ve.)moogHalfLadder Virtual analog model of the 2nd-order Moog Half Ladder (simplified version of (ve.)moogLadder ). Several 1st-order filters are cascaded in series. Feedback is then used, in part, to control the cut-off frequency and the resonance. This filter was implemented in Faust by Eric Tarr during the 2019 Embedded DSP With Faust Workshop . References https://www.willpirkle.com/app-notes/virtual-analog-moog-half-ladder-filter http://www.willpirkle.com/Downloads/AN-8MoogHalfLadderFilter.pdf Usage _ : moogHalfLadder(normFreq,Q) : _ Where: normFreq : normalized frequency (0-1) Q : q (ve.)diodeLadder 4th order virtual analog diode ladder filter. In addition to the individual states used within each independent 1st-order filter, there are also additional feedback paths found in the block diagram. These feedback paths are labeled as connecting states. Rather than separately storing these connecting states in the Faust implementation, they are simply implicitly calculated by tracing back to the other states ( s1 , s2 , s3 , s4 ) each recursive step. This filter was implemented in Faust by Eric Tarr during the 2019 Embedded DSP With Faust Workshop . References https://www.willpirkle.com/virtual-analog-diode-ladder-filter/ http://www.willpirkle.com/Downloads/AN-6DiodeLadderFilter.pdf Usage _ : diodeLadder(normFreq,Q) : _ Where: normFreq : normalized frequency (0-1) Q : q Korg 35 Filters The following filters are virtual analog models of the Korg 35 low-pass filter and high-pass filter found in the MS-10 and MS-20 synthesizers. The virtual analog models for the LPF and HPF are different, making these filters more interesting than simply tapping different states of the same circuit. These filters were implemented in Faust by Eric Tarr during the 2019 Embedded DSP With Faust Workshop . Filter history: https://secretlifeofsynthesizers.com/the-korg-35-filter/ (ve.)korg35LPF Virtual analog models of the Korg 35 low-pass filter found in the MS-10 and MS-20 synthesizers. Usage _ : korg35LPF(normFreq,Q) : _ Where: normFreq : normalized frequency (0-1) Q : q (ve.)korg35HPF Virtual analog models of the Korg 35 high-pass filter found in the MS-10 and MS-20 synthesizers. Usage _ : korg35HPF(normFreq,Q) : _ Where: normFreq : normalized frequency (0-1) Q : q Oberheim Filters The following filter (4 types) is an implementation of the virtual analog model described in Section 7.2 of the Will Pirkle book, \"Designing Software Synthesizer Plug-ins in C++\". It is based on the block diagram in Figure 7.5. The Oberheim filter is a state-variable filter with soft-clipping distortion within the circuit. In many VA filters, distortion is accomplished using the \"tanh\" function. For this Faust implementation, that distortion function was replaced with the (ef.)cubicnl function. (ve.)oberheim Generic multi-outputs Oberheim filter that produces the BSF, BPF, HPF and LPF outputs (see description above). Usage _ : oberheim(normFreq,Q) : _,_,_,_ Where: normFreq : normalized frequency (0-1) Q : q (ve.)oberheimBSF Band-Stop Oberheim filter (see description above). Specialize the generic implementation: keep the first BSF output, the compiler will only generate the needed code. Usage _ : oberheimBSF(normFreq,Q) : _ Where: normFreq : normalized frequency (0-1) Q : q (ve.)oberheimBPF Band-Pass Oberheim filter (see description above). Specialize the generic implementation: keep the second BPF output, the compiler will only generate the needed code. Usage _ : oberheimBPF(normFreq,Q) : _ Where: normFreq : normalized frequency (0-1) Q : q (ve.)oberheimHPF High-Pass Oberheim filter (see description above). Specialize the generic implementation: keep the third HPF output, the compiler will only generate the needed code. Usage _ : oberheimHPF(normFreq,Q) : _ Where: normFreq : normalized frequency (0-1) Q : q (ve.)oberheimLPF Low-Pass Oberheim filter (see description above). Specialize the generic implementation: keep the fourth LPF output, the compiler will only generate the needed code. Usage _ : oberheimLPF(normFreq,Q) : _ Where: normFreq : normalized frequency (0-1) Q : q Sallen Key Filters The following filters were implemented based on VA models of synthesizer filters. The modeling approach is based on a Topology Preserving Transform (TPT) to resolve the delay-free feedback loop in the corresponding analog filters. The primary processing block used to build other filters (Moog, Korg, etc.) is based on a 1st-order Sallen-Key filter. The filters included in this script are 1st-order LPF/HPF and 2nd-order state-variable filters capable of LPF, HPF, and BPF. Resources: Vadim Zavalishin (2018) \"The Art of VA Filter Design\", v2.1.0 https://www.native-instruments.com/fileadmin/ni_media/downloads/pdf/VAFilterDesign_2.1.0.pdf Will Pirkle (2014) \"Resolving Delay-Free Loops in Recursive Filters Using the Modified H\u00e4rm\u00e4 Method\", AES 137 http://www.aes.org/e-lib/browse.cfm?elib=17517 Description and diagrams of 1st- and 2nd-order TPT filters: https://www.willpirkle.com/706-2/ (ve.)sallenKeyOnePole Sallen-Key generic One Pole filter that produces the LPF and HPF outputs (see description above). For the Faust implementation of this filter, recursion ( letrec ) is used for storing filter \"states\". The output (e.g. y ) is calculated by using the input signal and the previous states of the filter. During the current recursive step, the states of the filter (e.g. s ) for the next step are also calculated. Admittedly, this is not an efficient way to implement a filter because it requires independently calculating the output and each state during each recursive step. However, it works as a way to store and use \"states\" within the constraints of Faust. The simplest example is the 1st-order LPF (shown on the cover of Zavalishin * 2018 and Fig 4.3 of https://www.willpirkle.com/706-2/ ). Here, the input signal is split in parallel for the calculation of the output signal, y , and the state s . The value of the state is only used for feedback to the next step of recursion. It is blocked (!) from also being routed to the output. A trick used for calculating the state s is to observe that the input to the delay block is the sum of two signal: what appears to be a feedforward path and a feedback path. In reality, the signals being summed are identical (signal*2) plus the value of the current state. Usage _ : sallenKeyOnePole(normFreq) : _,_ Where: normFreq : normalized frequency (0-1) (ve.)sallenKeyOnePoleLPF Sallen-Key One Pole lowpass filter (see description above). Specialize the generic implementation: keep the first LPF output, the compiler will only generate the needed code. Usage _ : sallenKeyOnePoleLPF(normFreq) : _ Where: normFreq : normalized frequency (0-1) (ve.)sallenKeyOnePoleHPF Sallen-Key One Pole Highpass filter (see description above). The dry input signal is routed in parallel to the output. The LPF'd signal is subtracted from the input so that the HPF remains. Specialize the generic implementation: keep the second HPF output, the compiler will only generate the needed code. Usage _ : sallenKeyOnePoleHPF(normFreq) : _ Where: normFreq : normalized frequency (0-1) (ve.)sallenKey2ndOrder Sallen-Key generic 2nd order filter that produces the LPF, BPF and HPF outputs. This is a 2nd-order Sallen-Key state-variable filter. The idea is that by \"tapping\" into different points in the circuit, different filters (LPF,BPF,HPF) can be achieved. See Figure 4.6 of * https://www.willpirkle.com/706-2/ This is also a good example of the next step for generalizing the Faust programming approach used for all these VA filters. In this case, there are three things to calculate each recursive step ( y , s1 , s2 ). For each thing, the circuit is only calculated up to that point. Comparing the LPF to BPF, the output signal ( y ) is calculated similarly. Except, the output of the BPF stops earlier in the circuit. Similarly, the states ( s1 and s2 ) only differ in that s2 includes a couple more terms beyond what is used for s1 . Usage _ : sallenKey2ndOrder(normFreq,Q) : _,_,_ Where: normFreq : normalized frequency (0-1) Q : q (ve.)sallenKey2ndOrderLPF Sallen-Key 2nd order lowpass filter (see description above). Specialize the generic implementation: keep the first LPF output, the compiler will only generate the needed code. Usage _ : sallenKey2ndOrderLPF(normFreq,Q) : _ Where: normFreq : normalized frequency (0-1) Q : q (ve.)sallenKey2ndOrderBPF Sallen-Key 2nd order bandpass filter (see description above). Specialize the generic implementation: keep the second BPF output, the compiler will only generate the needed code. Usage _ : sallenKey2ndOrderBPF(normFreq,Q) : _ Where: normFreq : normalized frequency (0-1) Q : q (ve.)sallenKey2ndOrderHPF Sallen-Key 2nd order highpass filter (see description above). Specialize the generic implementation: keep the third HPF output, the compiler will only generate the needed code. Usage _ : sallenKey2ndOrderHPF(normFreq,Q) : _ Where: normFreq : normalized frequency (0-1) Q : q Effects (ve.)wah4 Wah effect, 4th order. wah4 is a standard Faust function. Usage _ : wah4(fr) : _ Where: fr : resonance frequency in Hz Reference https://ccrma.stanford.edu/~jos/pasp/vegf.html (ve.)autowah Auto-wah effect. autowah is a standard Faust function. Usage _ : autowah(level) : _ Where: level : amount of effect desired (0 to 1). (ve.)crybaby Digitized CryBaby wah pedal. crybaby is a standard Faust function. Usage _ : crybaby(wah) : _ Where: wah : \"pedal angle\" from 0 to 1 Reference https://ccrma.stanford.edu/~jos/pasp/vegf.html (ve.)vocoder A very simple vocoder where the spectrum of the modulation signal is analyzed using a filter bank. vocoder is a standard Faust function. Usage _ : vocoder(nBands,att,rel,BWRatio,source,excitation) : _ Where: nBands : Number of vocoder bands att : Attack time in seconds rel : Release time in seconds BWRatio : Coefficient to adjust the bandwidth of each band (0.1 - 2) source : Modulation signal excitation : Excitation/Carrier signal","title":" vaeffects "},{"location":"libs/vaeffects/#vaeffectslib","text":"A library of virtual analog filter effects. Its official prefix is ve .","title":"vaeffects.lib"},{"location":"libs/vaeffects/#references","text":"https://github.com/grame-cncm/faustlibraries/blob/master/vaeffects.lib","title":"References"},{"location":"libs/vaeffects/#moog-filters","text":"","title":"Moog Filters"},{"location":"libs/vaeffects/#vemoog_vcf","text":"Moog \"Voltage Controlled Filter\" (VCF) in \"analog\" form. Moog VCF implemented using the same logical block diagram as the classic analog circuit. As such, it neglects the one-sample delay associated with the feedback path around the four one-poles. This extra delay alters the response, especially at high frequencies (see reference [1] for details). See moog_vcf_2b below for a more accurate implementation.","title":"(ve.)moog_vcf"},{"location":"libs/vaeffects/#usage","text":"_ : moog_vcf(res,fr) : _ Where: res : normalized amount of corner-resonance between 0 and 1 (0 is no resonance, 1 is maximum) fr : corner-resonance frequency in Hz (less than SR/6.3 or so)","title":"Usage"},{"location":"libs/vaeffects/#references_1","text":"https://ccrma.stanford.edu/~stilti/papers/moogvcf.pdf https://ccrma.stanford.edu/~jos/pasp/vegf.html","title":"References"},{"location":"libs/vaeffects/#vemoog_vcf_2bn","text":"Moog \"Voltage Controlled Filter\" (VCF) as two biquads. Implementation of the ideal Moog VCF transfer function factored into second-order sections. As a result, it is more accurate than moog_vcf above, but its coefficient formulas are more complex when one or both parameters are varied. Here, res is the fourth root of that in moog_vcf , so, as the sampling rate approaches infinity, moog_vcf(res,fr) becomes equivalent to moog_vcf_2b[n](res^4,fr) (when res and fr are constant). moog_vcf_2b uses two direct-form biquads ( tf2 ). moog_vcf_2bn uses two protected normalized-ladder biquads ( tf2np ).","title":"(ve.)moog_vcf_2b[n]"},{"location":"libs/vaeffects/#usage_1","text":"_ : moog_vcf_2b(res,fr) : _ _ : moog_vcf_2bn(res,fr) : _ Where: res : normalized amount of corner-resonance between 0 and 1 (0 is min resonance, 1 is maximum) fr : corner-resonance frequency in Hz","title":"Usage"},{"location":"libs/vaeffects/#vemoogladder","text":"Virtual analog model of the 4th-order Moog Ladder, which is arguably the most well-known ladder filter in analog synthesizers. Several 1st-order filters are cascaded in series. Feedback is then used, in part, to control the cut-off frequency and the resonance.","title":"(ve.)moogLadder"},{"location":"libs/vaeffects/#references_2","text":"[Zavalishin 2012] (revision 2.1.2, February 2020): https://www.native-instruments.com/fileadmin/ni_media/downloads/pdf/VAFilterDesign_2.1.2.pdf This fix is based on Lorenzo Della Cioppa's correction to Pirkle's implementation; see this post: https://www.kvraudio.com/forum/viewtopic.php?f=33&t=571909","title":"References"},{"location":"libs/vaeffects/#usage_2","text":"_ : moogLadder(normFreq,Q) : _ Where: normFreq : normalized frequency (0-1) Q : quality factor between .707 (0 feedback coefficient) to 25 (feedback = 4, which is the self-oscillating threshold).","title":"Usage"},{"location":"libs/vaeffects/#vemooghalfladder","text":"Virtual analog model of the 2nd-order Moog Half Ladder (simplified version of (ve.)moogLadder ). Several 1st-order filters are cascaded in series. Feedback is then used, in part, to control the cut-off frequency and the resonance. This filter was implemented in Faust by Eric Tarr during the 2019 Embedded DSP With Faust Workshop .","title":"(ve.)moogHalfLadder"},{"location":"libs/vaeffects/#references_3","text":"https://www.willpirkle.com/app-notes/virtual-analog-moog-half-ladder-filter http://www.willpirkle.com/Downloads/AN-8MoogHalfLadderFilter.pdf","title":"References"},{"location":"libs/vaeffects/#usage_3","text":"_ : moogHalfLadder(normFreq,Q) : _ Where: normFreq : normalized frequency (0-1) Q : q","title":"Usage"},{"location":"libs/vaeffects/#vediodeladder","text":"4th order virtual analog diode ladder filter. In addition to the individual states used within each independent 1st-order filter, there are also additional feedback paths found in the block diagram. These feedback paths are labeled as connecting states. Rather than separately storing these connecting states in the Faust implementation, they are simply implicitly calculated by tracing back to the other states ( s1 , s2 , s3 , s4 ) each recursive step. This filter was implemented in Faust by Eric Tarr during the 2019 Embedded DSP With Faust Workshop .","title":"(ve.)diodeLadder"},{"location":"libs/vaeffects/#references_4","text":"https://www.willpirkle.com/virtual-analog-diode-ladder-filter/ http://www.willpirkle.com/Downloads/AN-6DiodeLadderFilter.pdf","title":"References"},{"location":"libs/vaeffects/#usage_4","text":"_ : diodeLadder(normFreq,Q) : _ Where: normFreq : normalized frequency (0-1) Q : q","title":"Usage"},{"location":"libs/vaeffects/#korg-35-filters","text":"The following filters are virtual analog models of the Korg 35 low-pass filter and high-pass filter found in the MS-10 and MS-20 synthesizers. The virtual analog models for the LPF and HPF are different, making these filters more interesting than simply tapping different states of the same circuit. These filters were implemented in Faust by Eric Tarr during the 2019 Embedded DSP With Faust Workshop .","title":"Korg 35 Filters"},{"location":"libs/vaeffects/#filter-history","text":"https://secretlifeofsynthesizers.com/the-korg-35-filter/","title":"Filter history:"},{"location":"libs/vaeffects/#vekorg35lpf","text":"Virtual analog models of the Korg 35 low-pass filter found in the MS-10 and MS-20 synthesizers.","title":"(ve.)korg35LPF"},{"location":"libs/vaeffects/#usage_5","text":"_ : korg35LPF(normFreq,Q) : _ Where: normFreq : normalized frequency (0-1) Q : q","title":"Usage"},{"location":"libs/vaeffects/#vekorg35hpf","text":"Virtual analog models of the Korg 35 high-pass filter found in the MS-10 and MS-20 synthesizers.","title":"(ve.)korg35HPF"},{"location":"libs/vaeffects/#usage_6","text":"_ : korg35HPF(normFreq,Q) : _ Where: normFreq : normalized frequency (0-1) Q : q","title":"Usage"},{"location":"libs/vaeffects/#oberheim-filters","text":"The following filter (4 types) is an implementation of the virtual analog model described in Section 7.2 of the Will Pirkle book, \"Designing Software Synthesizer Plug-ins in C++\". It is based on the block diagram in Figure 7.5. The Oberheim filter is a state-variable filter with soft-clipping distortion within the circuit. In many VA filters, distortion is accomplished using the \"tanh\" function. For this Faust implementation, that distortion function was replaced with the (ef.)cubicnl function.","title":"Oberheim Filters"},{"location":"libs/vaeffects/#veoberheim","text":"Generic multi-outputs Oberheim filter that produces the BSF, BPF, HPF and LPF outputs (see description above).","title":"(ve.)oberheim"},{"location":"libs/vaeffects/#usage_7","text":"_ : oberheim(normFreq,Q) : _,_,_,_ Where: normFreq : normalized frequency (0-1) Q : q","title":"Usage"},{"location":"libs/vaeffects/#veoberheimbsf","text":"Band-Stop Oberheim filter (see description above). Specialize the generic implementation: keep the first BSF output, the compiler will only generate the needed code.","title":"(ve.)oberheimBSF"},{"location":"libs/vaeffects/#usage_8","text":"_ : oberheimBSF(normFreq,Q) : _ Where: normFreq : normalized frequency (0-1) Q : q","title":"Usage"},{"location":"libs/vaeffects/#veoberheimbpf","text":"Band-Pass Oberheim filter (see description above). Specialize the generic implementation: keep the second BPF output, the compiler will only generate the needed code.","title":"(ve.)oberheimBPF"},{"location":"libs/vaeffects/#usage_9","text":"_ : oberheimBPF(normFreq,Q) : _ Where: normFreq : normalized frequency (0-1) Q : q","title":"Usage"},{"location":"libs/vaeffects/#veoberheimhpf","text":"High-Pass Oberheim filter (see description above). Specialize the generic implementation: keep the third HPF output, the compiler will only generate the needed code.","title":"(ve.)oberheimHPF"},{"location":"libs/vaeffects/#usage_10","text":"_ : oberheimHPF(normFreq,Q) : _ Where: normFreq : normalized frequency (0-1) Q : q","title":"Usage"},{"location":"libs/vaeffects/#veoberheimlpf","text":"Low-Pass Oberheim filter (see description above). Specialize the generic implementation: keep the fourth LPF output, the compiler will only generate the needed code.","title":"(ve.)oberheimLPF"},{"location":"libs/vaeffects/#usage_11","text":"_ : oberheimLPF(normFreq,Q) : _ Where: normFreq : normalized frequency (0-1) Q : q","title":"Usage"},{"location":"libs/vaeffects/#sallen-key-filters","text":"The following filters were implemented based on VA models of synthesizer filters. The modeling approach is based on a Topology Preserving Transform (TPT) to resolve the delay-free feedback loop in the corresponding analog filters. The primary processing block used to build other filters (Moog, Korg, etc.) is based on a 1st-order Sallen-Key filter. The filters included in this script are 1st-order LPF/HPF and 2nd-order state-variable filters capable of LPF, HPF, and BPF.","title":"Sallen Key Filters"},{"location":"libs/vaeffects/#resources","text":"Vadim Zavalishin (2018) \"The Art of VA Filter Design\", v2.1.0 https://www.native-instruments.com/fileadmin/ni_media/downloads/pdf/VAFilterDesign_2.1.0.pdf Will Pirkle (2014) \"Resolving Delay-Free Loops in Recursive Filters Using the Modified H\u00e4rm\u00e4 Method\", AES 137 http://www.aes.org/e-lib/browse.cfm?elib=17517 Description and diagrams of 1st- and 2nd-order TPT filters: https://www.willpirkle.com/706-2/","title":"Resources:"},{"location":"libs/vaeffects/#vesallenkeyonepole","text":"Sallen-Key generic One Pole filter that produces the LPF and HPF outputs (see description above). For the Faust implementation of this filter, recursion ( letrec ) is used for storing filter \"states\". The output (e.g. y ) is calculated by using the input signal and the previous states of the filter. During the current recursive step, the states of the filter (e.g. s ) for the next step are also calculated. Admittedly, this is not an efficient way to implement a filter because it requires independently calculating the output and each state during each recursive step. However, it works as a way to store and use \"states\" within the constraints of Faust. The simplest example is the 1st-order LPF (shown on the cover of Zavalishin * 2018 and Fig 4.3 of https://www.willpirkle.com/706-2/ ). Here, the input signal is split in parallel for the calculation of the output signal, y , and the state s . The value of the state is only used for feedback to the next step of recursion. It is blocked (!) from also being routed to the output. A trick used for calculating the state s is to observe that the input to the delay block is the sum of two signal: what appears to be a feedforward path and a feedback path. In reality, the signals being summed are identical (signal*2) plus the value of the current state.","title":"(ve.)sallenKeyOnePole"},{"location":"libs/vaeffects/#usage_12","text":"_ : sallenKeyOnePole(normFreq) : _,_ Where: normFreq : normalized frequency (0-1)","title":"Usage"},{"location":"libs/vaeffects/#vesallenkeyonepolelpf","text":"Sallen-Key One Pole lowpass filter (see description above). Specialize the generic implementation: keep the first LPF output, the compiler will only generate the needed code.","title":"(ve.)sallenKeyOnePoleLPF"},{"location":"libs/vaeffects/#usage_13","text":"_ : sallenKeyOnePoleLPF(normFreq) : _ Where: normFreq : normalized frequency (0-1)","title":"Usage"},{"location":"libs/vaeffects/#vesallenkeyonepolehpf","text":"Sallen-Key One Pole Highpass filter (see description above). The dry input signal is routed in parallel to the output. The LPF'd signal is subtracted from the input so that the HPF remains. Specialize the generic implementation: keep the second HPF output, the compiler will only generate the needed code.","title":"(ve.)sallenKeyOnePoleHPF"},{"location":"libs/vaeffects/#usage_14","text":"_ : sallenKeyOnePoleHPF(normFreq) : _ Where: normFreq : normalized frequency (0-1)","title":"Usage"},{"location":"libs/vaeffects/#vesallenkey2ndorder","text":"Sallen-Key generic 2nd order filter that produces the LPF, BPF and HPF outputs. This is a 2nd-order Sallen-Key state-variable filter. The idea is that by \"tapping\" into different points in the circuit, different filters (LPF,BPF,HPF) can be achieved. See Figure 4.6 of * https://www.willpirkle.com/706-2/ This is also a good example of the next step for generalizing the Faust programming approach used for all these VA filters. In this case, there are three things to calculate each recursive step ( y , s1 , s2 ). For each thing, the circuit is only calculated up to that point. Comparing the LPF to BPF, the output signal ( y ) is calculated similarly. Except, the output of the BPF stops earlier in the circuit. Similarly, the states ( s1 and s2 ) only differ in that s2 includes a couple more terms beyond what is used for s1 .","title":"(ve.)sallenKey2ndOrder"},{"location":"libs/vaeffects/#usage_15","text":"_ : sallenKey2ndOrder(normFreq,Q) : _,_,_ Where: normFreq : normalized frequency (0-1) Q : q","title":"Usage"},{"location":"libs/vaeffects/#vesallenkey2ndorderlpf","text":"Sallen-Key 2nd order lowpass filter (see description above). Specialize the generic implementation: keep the first LPF output, the compiler will only generate the needed code.","title":"(ve.)sallenKey2ndOrderLPF"},{"location":"libs/vaeffects/#usage_16","text":"_ : sallenKey2ndOrderLPF(normFreq,Q) : _ Where: normFreq : normalized frequency (0-1) Q : q","title":"Usage"},{"location":"libs/vaeffects/#vesallenkey2ndorderbpf","text":"Sallen-Key 2nd order bandpass filter (see description above). Specialize the generic implementation: keep the second BPF output, the compiler will only generate the needed code.","title":"(ve.)sallenKey2ndOrderBPF"},{"location":"libs/vaeffects/#usage_17","text":"_ : sallenKey2ndOrderBPF(normFreq,Q) : _ Where: normFreq : normalized frequency (0-1) Q : q","title":"Usage"},{"location":"libs/vaeffects/#vesallenkey2ndorderhpf","text":"Sallen-Key 2nd order highpass filter (see description above). Specialize the generic implementation: keep the third HPF output, the compiler will only generate the needed code.","title":"(ve.)sallenKey2ndOrderHPF"},{"location":"libs/vaeffects/#usage_18","text":"_ : sallenKey2ndOrderHPF(normFreq,Q) : _ Where: normFreq : normalized frequency (0-1) Q : q","title":"Usage"},{"location":"libs/vaeffects/#effects","text":"","title":"Effects"},{"location":"libs/vaeffects/#vewah4","text":"Wah effect, 4th order. wah4 is a standard Faust function.","title":"(ve.)wah4"},{"location":"libs/vaeffects/#usage_19","text":"_ : wah4(fr) : _ Where: fr : resonance frequency in Hz","title":"Usage"},{"location":"libs/vaeffects/#reference","text":"https://ccrma.stanford.edu/~jos/pasp/vegf.html","title":"Reference"},{"location":"libs/vaeffects/#veautowah","text":"Auto-wah effect. autowah is a standard Faust function.","title":"(ve.)autowah"},{"location":"libs/vaeffects/#usage_20","text":"_ : autowah(level) : _ Where: level : amount of effect desired (0 to 1).","title":"Usage"},{"location":"libs/vaeffects/#vecrybaby","text":"Digitized CryBaby wah pedal. crybaby is a standard Faust function.","title":"(ve.)crybaby"},{"location":"libs/vaeffects/#usage_21","text":"_ : crybaby(wah) : _ Where: wah : \"pedal angle\" from 0 to 1","title":"Usage"},{"location":"libs/vaeffects/#reference_1","text":"https://ccrma.stanford.edu/~jos/pasp/vegf.html","title":"Reference"},{"location":"libs/vaeffects/#vevocoder","text":"A very simple vocoder where the spectrum of the modulation signal is analyzed using a filter bank. vocoder is a standard Faust function.","title":"(ve.)vocoder"},{"location":"libs/vaeffects/#usage_22","text":"_ : vocoder(nBands,att,rel,BWRatio,source,excitation) : _ Where: nBands : Number of vocoder bands att : Attack time in seconds rel : Release time in seconds BWRatio : Coefficient to adjust the bandwidth of each band (0.1 - 2) source : Modulation signal excitation : Excitation/Carrier signal","title":"Usage"},{"location":"libs/version/","text":"version.lib Semantic versioning for the Faust libraries. Its official prefix is vl . References https://github.com/grame-cncm/faustlibraries/blob/master/version.lib (vl.)version Return the version number of the Faust standard libraries as a MAJOR, MINOR, PATCH versioning triplet. Usage version : _,_,_","title":" version "},{"location":"libs/version/#versionlib","text":"Semantic versioning for the Faust libraries. Its official prefix is vl .","title":"version.lib"},{"location":"libs/version/#references","text":"https://github.com/grame-cncm/faustlibraries/blob/master/version.lib","title":"References"},{"location":"libs/version/#vlversion","text":"Return the version number of the Faust standard libraries as a MAJOR, MINOR, PATCH versioning triplet.","title":"(vl.)version"},{"location":"libs/version/#usage","text":"version : _,_,_","title":"Usage"},{"location":"libs/wdmodels/","text":"wdmodels.lib A library of basic adaptors and methods to help construct Wave Digital Filter models in Faust. Its official prefix is wd . Library Readme This library is intended for use for creating Wave Digital (WD) based models of audio circuitry for real-time audio processing within the Faust programming language. The goal is to provide a framework to create real-time virtual-analog audio effects and synthesizers using WD models without the use of C++. Furthermore, we seek to provide access to the technique of WD modeling to those without extensive knowledge of advanced digital signal processing techniques. Finally, we hope to provide a library which can integrate with all aspects of Faust, thus creating a platform for virtual circuit bending. The library itself is written in Faust to maintain portability. This library is heavily based on Kurt Werner's Dissertation, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters.\" I have tried to maintain consistent notation between the adaptors appearing within thesis and my adaptor code. The majority of the adaptors found in chapter 1 and chapter 3 are currently supported. For inquires about use of this library in a commercial product, please contact dirk [dot] roosenburg [dot] 30 [at] gmail [dot] com. This documentation is taken directly from the readme . Please refer to it for a more updated version. Many of the more in depth comments within the library include jargon. I plan to create videos detailing the theory of WD models. For now I recommend Kurt Werner's PhD, Virtual analog modeling of Audio circuitry using Wave Digital Filters . I have tried to maintain consistent syntax and notation to the thesis. This library currently includes the majority of the adaptors covered in chapter 1 and some from chapter 3. Using this Library Use of this library expects some level of familiarity with WDF techniques, especially simplification and decomposition of electronic circuits into WDF connection trees. I plan to create video to cover both these techniques and use of the library. Quick Start To get a quick overview of the library, start with the secondOrderFilters.dsp code found in examples . Note that the wdmodels.lib library is now embedded in the online Faust IDE . A Simple RC Filter Model Creating a model using this library consists fo three steps. First, declare a set of components. Second, model the relationship between them using a tree. Finally, build the tree using the libraries build functions. First, a set of components is declared using adaptors from the library. This list of components is created based on analysis of the circuit using WDF techniques, though generally each circuit element (resistor, capacitor, diode, etc.) can be expected to appear within the component set. For example, first order RC lowpass filter would require an unadapted voltage source, a 47k resistor, and a 10nF capacitor which outputs the voltage across itself. These can be declared with: vs1(i) = wd.u_voltage(i, no.noise); r1(i) = wd.resistor(i, 47*10^3); c1(i) = wd.capacitor_Vout(i, 10*10^-9); Note that the first argument, i, is left un-parametrized. Components must be declared in this form, as the build algorithm expects to receive adaptors which have exactly one parameter. Also note that we have chosen to declare a white noise function as the input to our voltage source. We could potentially declare this as a direct input to our model, but to do so is more complicated process which cannot be covered within this tutorial. For information on how to do this see Declaring Model Parameters as Inputs or see various implementations in examples . Second, the declared components and interconnection/structural adaptors (i.e. series, parallel, etc) are arranged into the connection tree which is produced from performing WD analysis on the modeled circuit. For example, to produce our first order RC lowpass circuit model, the following tree is declared: tree_lowpass = vs1 : wd.series : (r1, c1); For more information on how to represent trees in Faust, see Trees in Faust . Finally, the tree is built using the the buildtree function. To build and compute our first order RC lowpass circuit model, we use: process = wd.buildtree(tree_lowpass); More information about build functions, see Model Building Functions . Building a Model After creating a connection tree which consists of WD adaptors, the connection tree must be passed to a build function in order to build the model. Automatic model building buildtree(connection_tree) The simplest build function for use with basic models. This automatically implements buildup , builddown , and buildout to create a working model. However, it gives minimum control to the user and cannot currently be used on trees which have parameters declared as inputs. Manual model building Wave Digital Filters are an explicit state-space model, meaning they use a previous system state in order to calculate the current output. This is achieved in Faust by using a single global feedback operator. The models feed-forward terms are generated using builddown and the models feedback terms are generated using buildup . Thus, the most common model implementation (the method used by buildtree ) is: builddown(connection_tree)~buildup(connection_tree) : buildout(connection_tree) Since the ~ operator in Faust will leave feedback terms hanging as outputs, buildout is a function provided for convenience. It automatically truncates the hanging outputs by identifying leaf components which have an intended output and generating an output matrix. Building the model manually allows for greater user control and is often very helpful in testing. Also provided for testing are the getres and parres functions, which can be used to determine the upward-facing port resistance of an element. Declaring Model Parameters as Inputs When possible, parameters of components should be declared explicitly, meaning they are dependent on a function with no inputs. This might be something as simple as integer(declaring a static component), a function dependent on a UI input (declaring a component with variable value), or even a time-dependent function like an oscillator (declaring an audio input or circuit bending). However, it is often necessary to declare parameters as input. To achieve this there are two possible methods. The first and recommended option is to create a separate model function and declare parameters which will later be implemented as inputs. This allows inputs to be explicitly declared as component parameters. For example, one might use: model(in1) = buildtree(tree) with { ... vin(i) = wd.u_voltage(i, in1); ... tree = vin : ...; }; In order to simulate an audio input to the circuit. Note that the tree and components must be declared inside a with {...} statement, or the model's parameters will not be accessible. The Empty Signal Operator The Empty signal operator, _ should NEVER be used to declare a parameter as in input in a wave-digital model. Using it will result on breaking the internal routing of the model and thus breaks the model. Instead, use explicit declaration as shown directly above. Trees in Faust Since WD models use connection trees to represent relationships of elements, a comprehensive way to represent trees is critical. As there is no current convention for creating trees in Faust, I've developed a method using the existing series and parallel/list methods in Faust. The series operator : is used to separate parent and child elements. For example the tree: A | B is represented by A : B in Faust. To denote a parent element with multiple child elements, simply use a list (a1, a2, ... an) of children connected to a single parent. ` For example the tree: A / \\ B C is represented by: A : (B, C) Finally, for a tree with many levels, simply break the tree into subtrees following the above rules and connect the subtree as if it was an individual node. For example the tree: A / \\ B C / / \\ X Y Z can be represented by: B_sub = B : X; //B subtree C_sub = C : (Y, Z); //C subtree tree = A : (B_sub, C_sub); //full tree or more simply, using parentheses: A : ((B : X), (C : (Y, Z))) How Adaptors are Structured In wave digital filters, adaptors can be described by the form b = Sa where b is a vector of output waves b = (b0, b1, b2, ... bn) , a is a vector of input waves a = (a0, a1, a2, ... an) , and S is an n x n scattering matrix. S is dependent on R , a list of port resistances (R0, R1, R2, ... Rn) . The output wave vector b can be divided into downward-going and upward-going waves (downward-going waves travel down the connection tree, upward-going waves travel up). For adapted adaptors, with the zeroth port being the upward-facing port, the downward-going wave vector is (b1, b2, ... bn) and the upward-going wave vector is (b0) . For unadapted adaptors, there are no upward-going waves, so the downward-going wave vector is simply b = (b0, b1, b2, ... bn) . In order for adaptors to be interpretable by the compiler, they must be structured in a specific way. Each adaptor is divided into three cases by their first parameter. This parameter, while accessible by the user, should only be set by the compiler/builder. All other parameters are value declarations (for components), inputs (for voltage or current ins), or parameter controls (for potentiometers/variable capacitors/variable inductors). First case - downward going waves (0, params) => downward-going(R1, ... Rn, a0, a1, ... an) outputs: (b1, b2, ... bn) this function takes any number of port resistances, the downward going wave, and any number of upward going waves as inputs. These values/waves are used to calculate the downward going waves coming from this adaptor. Second case (1, params) => upward-going(R1, ... Rn, a1, ... an) outputs : (b0) this function takes any number of port resistances and any number of upward going waves as inputs. These values/waves are used to calculate the upward going wave coming from this adaptor. Third case (2, params) => port-resistance(R1, ... Rn) outputs: (R0) this function takes any number of port resistances as inputs. These values are used to calculate the upward going port resistance of the element. Unadapted Adaptors Unadapted adaptor's names will always begin u_ An unadapted adaptor MUST be used as the root of the WD connection tree. Unadapted adaptors can ONLY be used as a root of the WD connection tree. While unadapted adaptors contain all three cases, the second and third are purely structural. Only the first case should contain computational information. How the Build Functions Work Expect this section to be added soon! It's currently in progress. Acknowledgements Many thanks to Kurt Werner for helping me to understand wave digital filter models. Without his publications and consultations, the library would not exist. Thanks also to my advisors, Rob Owen and Eli Stine whose input was critical to the development of the library. Finally, thanks to Romain Michon, Stephane Letz, and the Faust Slack for contributing to testing, development, and inspiration when creating the library. References https://github.com/grame-cncm/faustlibraries/blob/master/wdmodels.lib Algebraic One Port Adaptors (wd.)resistor Adapted Resistor. A basic node implementing a resistor for use within Wave Digital Filter connection trees. It should be used as a leaf/terminating element of the connection tree. Usage r1(i) = resistor(i, R); buildtree( A : r1 ); Where: i : index used by model-building functions. Should never be user declared. R : Resistance/Impedance of the resistor being modeled in Ohms. Note: the adaptor must be declared as a separate function before integration into the connection tree. Correct implementation is shown above. Reference K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.2.1 (wd.)resistor_Vout Adapted Resistor + voltage Out. A basic adaptor implementing a resistor for use within Wave Digital Filter connection trees. It should be used as a leaf/terminating element of the connection tree. The resistor will also pass the voltage across itself as an output of the model. Usage rout(i) = resistor_Vout(i, R); buildtree( A : rout ) : _ Where: i : index used by model-building functions. Should never be user declared. R : Resistance/Impedance of the resistor being modeled in Ohms. Note: the adaptor must be declared as a separate function before integration into the connection tree. Correct implementation is shown above. Reference K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.2.1 (wd.)resistor_Iout Resistor + current Out. A basic adaptor implementing a resistor for use within Wave Digital Filter connection trees. It should be used as a leaf/terminating element of the connection tree. The resistor will also pass the current through itself as an output of the model. Usage rout(i) = resistor_Iout(i, R); buildtree( A : rout ) : _ Where: i : index used by model-building functions. Should never be user declared. R : Resistance/Impedance of the resistor being modeled in Ohms. Note: the adaptor must be declared as a separate function before integration into the connection tree. Correct implementation is shown above. Reference K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.2.1 (wd.)u_voltage Unadapted Ideal Voltage Source. An adaptor implementing an ideal voltage source within Wave Digital Filter connection trees. It should be used as the root/top element of the connection tree. Can be used for either DC (constant) or AC (signal) voltage sources. Usage v1(i) = u_Voltage(i, ein); buildtree( v1 : B ); Where: i : index used by model-building functions. Should never be user declared. ein : Voltage/Potential across ideal voltage source in Volts Note: only usable as the root of a tree. The adaptor must be declared as a separate function before integration into the connection tree. Correct implementation is shown above. Reference K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.2.2 (wd.)u_current Unadapted Ideal Current Source. An unadapted adaptor implementing an ideal current source within Wave Digital Filter connection trees. It should be used as the root/top element of the connection tree. Can be used for either DC (constant) or AC (signal) current sources. Usage i1(i) = u_current(i, jin); buildtree( i1 : B ); Where: i : index used by model-building functions. Should never be user declared. jin : Current through the ideal current source in Amps Note: only usable as the root of a tree. The adaptor must be declared as a separate function before integration into the connection tree. Correct implementation is shown above. Reference K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.2.3 (wd.)resVoltage Adapted Resistive Voltage Source. An adaptor implementing a resistive voltage source within Wave Digital Filter connection trees. It should be used as a leaf/terminating element of the connection tree. It is comprised of an ideal voltage source in series with a resistor. Can be used for either DC (constant) or AC (signal) voltage sources. Usage v1(i) = resVoltage(i, R, ein); buildtree( A : v1 ); Where: i : index used by model-building functions. Should never be user declared R : Resistance/Impedance of the series resistor in Ohms ein : Voltage/Potential of the ideal voltage source in Volts Note: the adaptor must be declared as a separate function before integration into the connection tree. Correct implementation is shown above. Reference K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.2.4 (wd.)resVoltage_Vout Adapted Resistive Voltage Source + voltage output. An adaptor implementing an adapted resistive voltage source within Wave Digital Filter connection trees. It should be used as a leaf/terminating element of the connection tree. It is comprised of an ideal voltage source in series with a resistor. Can be used for either DC (constant) or AC (signal) voltage sources. The resistive voltage source will also pass the voltage across it as an output of the model. Usage vout(i) = resVoltage_Vout(i, R, ein); buildtree( A : vout ) : _ Where: i : index used by model-building functions. Should never be user declared R : Resistance/Impedance of the series resistor in Ohms ein : Voltage/Potential across ideal voltage source in Volts Note: the adaptor must be declared as a separate function before integration into the connection tree. Correct implementation is shown above. Reference K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.2.4 (wd.)u_resVoltage Unadapted Resistive Voltage Source. An unadapted adaptor implementing a resistive voltage source within Wave Digital Filter connection trees. It should be used as the root/top element of the connection tree. It is comprised of an ideal voltage source in series with a resistor. Can be used for either DC (constant) or AC (signal) voltage sources. Usage v1(i) = u_resVoltage(i, R, ein); buildtree( v1 : B ); Where: i : index used by model-building functions. Should never be user declared R : Resistance/Impedance of the series resistor in Ohms ein : Voltage/Potential across ideal voltage source in Volts Note: only usable as the root of a tree. The adaptor must be declared as a separate function before integration into the connection tree. Correct implementation is shown above. Reference K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.2.4 (wd.)resCurrent Adapted Resistive Current Source. An adaptor implementing a resistive current source within Wave Digital Filter connection trees. It should be used as a leaf/terminating element of the connection tree. It is comprised of an ideal current source in parallel with a resistor. Can be used for either DC (constant) or AC (signal) current sources. Usage i1(i) = resCurrent(i, R, jin); buildtree( A : i1 ); Where: i : index used by model-building functions. Should never be user declared. R : Resistance/Impedance of the parallel resistor in Ohms jin : Current through the ideal current source in Amps Note: the adaptor must be declared as a separate function before integration into the connection tree. Correct implementation is shown above. Reference K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.2.5 (wd.)u_resCurrent Unadapted Resistive Current Source. An unadapted adaptor implementing a resistive current source within Wave Digital Filter connection trees. It should be used as the root/top element of the connection tree. It is comprised of an ideal current source in parallel with a resistor. Can be used for either DC (constant) or AC (signal) current sources. Usage i1(i) = u_resCurrent(i, R, jin); buildtree( i1 : B ); Where: i : index used by model-building functions. Should never be user declared. R : Resistance/Impedance of the series resistor in Ohms jin : Current through the ideal current source in Amps Note: only usable as the root of a tree. The adaptor must be declared as a separate function before integration into the connection tree. Correct implementation is shown above. Reference K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.2.5 (wd.)u_switch Unadapted Ideal Switch. An unadapted adaptor implementing an ideal switch for Wave Digital Filter connection trees. It should be used as the root/top element of the connection tree Usage s1(i) = u_resCurrent(i, lambda); buildtree( s1 : B ); Where: i : index used by model-building functions. Should never be user declared. lambda : switch state control. -1 for closed switch, 1 for open switch. Note: only usable as the root of a tree. The adaptor must be declared as a separate function before integration into the connection tree. Correct implementation is shown above. Reference K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.2.8 Reactive One Port Adaptors (wd.)capacitor Adapted Capacitor. A basic adaptor implementing a capacitor for use within Wave Digital Filter connection trees. It should be used as a leaf/terminating element of the connection tree. This capacitor model was digitized using the bi-linear transform. Usage c1(i) = capacitor(i, R); buildtree( A : c1 ) : _ Where: i : index used by model-building functions. Should never be user declared. R : Capacitance/Impedance of the capacitor being modeled in Farads. Note: the adaptor must be declared as a separate function before integration into the connection tree. Correct implementation is shown above. Reference K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.3.1 (wd.)capacitor_Vout Adapted Capacitor + voltage out. A basic adaptor implementing a capacitor for use within Wave Digital Filter connection trees. It should be used as a leaf/terminating element of the connection tree. The capacitor will also pass the voltage across itself as an output of the model. This capacitor model was digitized using the bi-linear transform. Usage cout(i) = capacitor_Vout(i, R); buildtree( A : cout ) : _ Where: i : index used by model-building functions. Should never be user declared R : Capacitance/Impedence of the capacitor being modeled in Farads Note: the adaptor must be declared as a seperate function before integration into the connection tree. Correct implementation is shown above. Reference K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.3.1 (wd.)inductor Unadapted Inductor. A basic adaptor implementing an inductor for use within Wave Digital Filter connection trees. It should be used as a leaf/terminating element of the connection tree. This inductor model was digitized using the bi-linear transform. Usage l1(i) = inductor(i, R); buildtree( A : l1 ); Where: i : index used by model-building functions. Should never be user declared R : Inductance/Impedance of the inductor being modeled in Henries Note: the adaptor must be declared as a separate function before integration into the connection tree. Correct implementation is shown above. Reference K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.3.2 (wd.)inductor_Vout Unadapted Inductor + Voltage out. A basic adaptor implementing an inductor for use within Wave Digital Filter connection trees. It should be used as a leaf/terminating element of the connection tree. The inductor will also pass the voltage across itself as an output of the model. This inductor model was digitized using the bi-linear transform. Usage lout(i) = inductor_Vout(i, R); buildtree( A : lout ) : _ Where: i : index used by model-building functions. Should never be user declared R : Inductance/Impedance of the inductor being modeled in Henries Note: the adaptor must be declared as a separate function before integration into the connection tree. Correct implementation is shown above. Reference K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.3.2 Nonlinear One Port Adaptors (wd.)u_idealDiode Unadapted Ideal Diode. An unadapted adaptor implementing an ideal diode for Wave Digital Filter connection trees. It should be used as the root/top element of the connection tree. Usage buildtree( u_idealDiode : B ); Note: only usable as the root of a tree. Correct implementation is shown above. Reference K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 3.2.3 (wd.)u_chua Unadapted Chua Diode. An adaptor implementing the chua diode / non-linear resistor within Wave Digital Filter connection trees. It should be used as the root/top element of the connection tree. Usage chua1(i) = u_chua(i, G1, G2, V0); buildtree( chua1 : B ); Where: i : index used by model-building functions. Should never be user declared G1 : resistance parameter 1 of the chua diode G2 : resistance parameter 2 of the chua diode V0 : voltage parameter of the chua diode Note: only usable as the root of a tree. The adaptor must be declared as a separate function before integration into the connection tree. Correct implementation is shown above. Reference Meerkotter and Scholz, \"Digital Simulation of Nonlinear Circuits by Wave Digital Filter Principles\" (wd.)lambert An implementation of the lambert function. It uses Halley's method of iteration to approximate the output. Included in the WD library for use in non-linear diode models. Adapted from K M Brigg's c++ lambert function approximation. Usage lambert(n, itr) : _ Where: * n : value at which the lambert function will be evaluated * itr : number of iterations before output (wd.)u_diodePair Unadapted pair of diodes facing in opposite directions. An unadapted adaptor implementing two antiparallel diodes for Wave Digital Filter connection trees. The behavior is approximated using Schottkey's ideal diode law. Usage d1(i) = u_diodePair(i, Is, Vt); buildtree( d1 : B ); Where: i : index used by model-building functions. Should never be user declared Is : saturation current of the diodes Vt : thermal resistances of the diodes Note: only usable as the root of a tree. Correct implementation is shown above. Reference K. Werner et al. \"An Improved and Generalized Diode Clipper Model for Wave Digital Filters\" (wd.)u_diodeSingle Unadapted single diode. An unadapted adaptor implementing a single diode for Wave Digital Filter connection trees. The behavior is approximated using Schottkey's ideal diode law. Usage d1(i) = u_diodeSingle(i, Is, Vt); buildtree( d1 : B ); Where: i : index used by model-building functions. Should never be user declared Is : saturation current of the diodes Vt : thermal resistances of the diodes Note: only usable as the root of a tree. Correct implementation is shown above. Reference K. Werner et al. \"An Improved and Generalized Diode Clipper Model for Wave Digital Filters\" (wd.)u_diodeAntiparallel Unadapted set of antiparallel diodes with M diodes facing forwards and N diodes facing backwards. An unadapted adaptor implementing antiparallel diodes for Wave Digital Filter connection trees. The behavior is approximated using Schottkey's ideal diode law. Usage d1(i) = u_diodeAntiparallel(i, Is, Vt); buildtree( d1 : B ); Where: i : index used by model-building functions. Should never be user declared Is : saturation current of the diodes Vt : thermal resistances of the diodes Note: only usable as the root of a tree. Correct implementation is shown above. Reference K. Werner et al. \"An Improved and Generalized Diode Clipper Model for Wave Digital Filters\" Two Port Adaptors (wd.)u_parallel2Port Unadapted 2-port parallel connection. An unadapted adaptor implementing a 2-port parallel connection between adaptors for Wave Digital Filter connection trees. Elements connected to this adaptor will behave as if connected in parallel in circuit. Usage buildtree( u_parallel2Port : (A, B) ); Note: only usable as the root of a tree. This adaptor has no user-accessible parameters. Correct implementation is shown above. Reference K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.4.1 (wd.)parallel2Port Adapted 2-port parallel connection. An adaptor implementing a 2-port parallel connection between adaptors for Wave Digital Filter connection trees. Elements connected to this adaptor will behave as if connected in parallel in circuit. Usage buildtree( A : parallel2Port : B ); Note: this adaptor has no user-accessible parameters. It should be used within the connection tree with one previous and one forward adaptor. Correct implementation is shown above. Reference K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.4.1 (wd.)u_series2Port Unadapted 2-port series connection. An unadapted adaptor implementing a 2-port series connection between adaptors for Wave Digital Filter connection trees. Elements connected to this adaptor will behave as if connected in series in circuit. Usage buildtree( u_series2Port : (A, B) ); Note: only usable as the root of a tree. This adaptor has no user-accessible parameters. Correct implementation is shown above. Reference K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.4.1 (wd.)series2Port Adapted 2-port series connection. An adaptor implementing a 2-port series connection between adaptors for Wave Digital Filter connection trees. Elements connected to this adaptor will behave as if connected in series in circuit. Usage buildtree( A : series2Port : B ); Note: this adaptor has no user-accessible parameters. It should be used within the connection tree with one previous and one forward adaptor. Correct implementation is shown above. Reference K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.4.1 (wd.)parallelCurrent Adapted 2-port parallel connection + ideal current source. An adaptor implementing a 2-port series connection and internal idealized current source between adaptors for Wave Digital Filter connection trees. This adaptor connects the two connected elements and an additional ideal current source in parallel. Usage i1(i) = parallelCurrent(i, jin); buildtree(A : i1 : B); Where: i : index used by model-building functions. Should never be user declared jin : Current through the ideal current source in Amps Note: the adaptor must be declared as a separate function before integration into the connection tree. It should be used within a connection tree with one previous and one forward adaptor. Correct implementation is shown above. Reference K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.4.2 (wd.)seriesVoltage Adapted 2-port series connection + ideal voltage source. An adaptor implementing a 2-port series connection and internal ideal voltage source between adaptors for Wave Digital Filter connection trees. This adaptor connects the two connected adaptors and an additional ideal voltage source in series. Usage v1(i) = seriesVoltage(i, vin) buildtree( A : v1 : B ); Where: i : index used by model-building functions. Should never be user declared vin : voltage across the ideal current source in Volts Note: the adaptor must be declared as a separate function before integration into the connection tree. It should be used within the connection tree with one previous and one forward adaptor. Reference K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.4.2 (wd.)u_transformer Unadapted ideal transformer. An adaptor implementing an ideal transformer for Wave Digital Filter connection trees. The first downward-facing port corresponds to the primary winding connections, and the second downward-facing port to the secondary winding connections. Usage t1(i) = u_transformer(i, tr); buildtree(t1 : (A , B)); Where: i : index used by model-building functions. Should never be user declared tr : the turn ratio between the windings on the primary and secondary coils Note: the adaptor must be declared as a separate function before integration into the connection tree. It may only be used as the root of the connection tree with two forward nodes. Reference K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.4.3 (wd.)transformer Adapted ideal transformer. An adaptor implementing an ideal transformer for Wave Digital Filter connection trees. The upward-facing port corresponds to the primary winding connections, and the downward-facing port to the secondary winding connections Usage t1(i) = transformer(i, tr); buildtree(A : t1 : B); Where: i : index used by model-building functions. Should never be user declared tr : the turn ratio between the windings on the primary and secondary coils Note: the adaptor must be declared as a separate function before integration into the connection tree. It should be used within the connection tree with one backward and one forward nodes. Reference K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.4.3 (wd.)u_transformerActive Unadapted ideal active transformer. An adaptor implementing an ideal transformer for Wave Digital Filter connection trees. The first downward-facing port corresponds to the primary winding connections, and the second downward-facing port to the secondary winding connections. Usage t1(i) = u_transformerActive(i, gamma1, gamma2); buildtree(t1 : (A , B)); Where: i : index used by model-building functions. Should never be user declared gamma1 : the turn ratio describing the voltage relationship between the primary and secondary coils gamma2 : the turn ratio describing the current relationship between the primary and secondary coils Note: the adaptor must be declared as a separate function before integration into the connection tree. It may only be used as the root of the connection tree with two forward nodes. Reference K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.4.3 (wd.)transformerActive Adapted ideal active transformer. An adaptor implementing an ideal active transformer for Wave Digital Filter connection trees. The upward-facing port corresponds to the primary winding connections, and the downward-facing port to the secondary winding connections Usage t1(i) = transformerActive(i, gamma1, gamma2); buildtree(A : t1 : B); Where: i : index used by model-building functions. Should never be user declared gamma1 : the turn ratio describing the voltage relationship between the primary and secondary coils gamma2 : the turn ratio describing the current relationship between the primary and secondary coils Note: the adaptor must be declared as a separate function before integration into the connection tree. It should be used within the connection tree with two forward nodes. Reference K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.4.3 Three Port Adaptors (wd.)parallel Adapted 3-port parallel connection. An adaptor implementing a 3-port parallel connection between adaptors for Wave Digital Filter connection trees. This adaptor is used to connect adaptors simulating components connected in parallel in the circuit. Usage buildtree( A : parallel : (B, C) ); Note: this adaptor has no user-accessible parameters. It should be used within the connection tree with one previous and two forward adaptors. Reference K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.5.1 (wd.)series Adapted 3-port series connection. An adaptor implementing a 3-port series connection between adaptors for Wave Digital Filter connection trees. This adaptor is used to connect adaptors simulating components connected in series in the circuit. Usage tree = A : (series : (B, C)); Note: this adaptor has no user-accessible parameters. It should be used within the connection tree with one previous and two forward adaptors. Reference K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.5.2 R-Type Adaptors (wd.)u_sixportPassive Unadapted six-port rigid connection. An adaptor implementing a six-port passive rigid connection between elements. It implements the simplest possible rigid connection found in the Fender Bassman Tonestack circuit. Usage tree = u_sixportPassive : (A, B, C, D, E, F)); Note: this adaptor has no user-accessible parameters. It should be used within the connection tree with six forward adaptors. Reference K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 2.1.5 Node Creating Functions (wd.)genericNode Function for generating an adapted node from another faust function or scattering matrix. This function generates a node which is suitable for use in the connection tree structure. genericNode separates the function that it is passed into upward-going and downward-going waves. Usage n1(i) = genericNode(i, scatter, upRes); Where: i : index used by model-building functions. Should never be user declared scatter : the function which describes the the node's scattering behavior upRes : the function which describes the node's upward-facing port-resistance Note: scatter must be a function with n inputs, n outputs, and n-1 parameter inputs. input/output 1 will be used as the adapted upward-facing port of the node, ports 2 to n will all be downward-facing. The first input/output pair is assumed to already be adapted - i.e. the output 1 is not dependent on input 1. The parameter inputs will receive the port resistances of the downward-facing ports. upRes must be a function with n-1 parameter inputs and 1 output. The parameter inputs will receive the port resistances of the downward-facing ports. The output should give the upward-facing port resistance of the node based on the upward-facing port resistances of the input. If used on a leaf element (n=1), the model will automatically introduce a one-sample delay. Thus, the output of the node at sample t based on the input, a[t], should be the output one sample ahead, b[t+1]. This may require transformation of the output signal. (wd.)genericNode_Vout Function for generating a terminating/leaf node which gives the voltage across itself as a model output. This function generates a node which is suitable for use in the connection tree structure. It also calculates the voltage across the element and gives it as a model output. Usage n1(i) = genericNode_Vout(i, scatter, upRes); Where: i : index used by model-building functions. Should never be user declared scatter : the function which describes the the node's scattering behavior upRes : the function which describes the node's upward-facing port-resistance Note: scatter must be a function with 1 input and 1 output. It should give the output from the node based on the incident wave. The model will automatically introduce a one-sample delay to the output of the function Thus, the output of the node at sample t based on the input, a[t], should be the output one sample ahead, b[t+1]. This may require transformation of the output signal. upRes must be a function with no inputs and 1 output. The output should give the upward-facing port resistance of the node. (wd.)genericNode_Iout Function for generating a terminating/leaf node which gives the current through itself as a model output. This function generates a node which is suitable for use in the connection tree structure. It also calculates the current through the element and gives it as a model output. Usage n1(i) = genericNode_Iout(i, scatter, upRes); Where: i : index used by model-building functions. Should never be user declared scatter : the function which describes the the node's scattering behavior upRes : the function which describes the node's upward-facing port-resistance Note: scatter must be a function with 1 input and 1 output. It should give the output from the node based on the incident wave. The model will automatically introduce a one-sample delay to the output of the function. Thus, the output of the node at sample t based on the input, a[t], should be the output one sample ahead, b[t+1]. This may require transformation of the output signal. upRes must be a function with no inputs and 1 output. The output should give the upward-facing port resistance of the node. (wd.)u_genericNode Function for generating an unadapted node from another Faust function or scattering matrix. This function generates a node which is suitable for use as the root of the connection tree structure. Usage n1(i) = u_genericNode(i, scatter); Where: i : index used by model-building functions. Should never be user declared scatter : the function which describes the the node's scattering behavior Note: scatter must be a function with n inputs, n outputs, and n parameter inputs. each input/output pair will be used as a downward-facing port of the node the parameter inputs will receive the port resistances of the downward-facing ports. Model Building Functions (wd.)builddown Function for building the structure for calculating waves traveling down the WD connection tree. It recursively steps through the given tree, parametrizes the adaptors, and builds an algorithm. It is used in conjunction with the buildup() function to create a model. Usage builddown(A : B)~buildup(A : B); Where: (A : B) : is a connection tree composed of WD adaptors (wd.)buildup Function for building the structure for calculating waves traveling up the WD connection tree. It recursively steps through the given tree, parametrizes the adaptors, and builds an algorithm. It is used in conjunction with the builddown() function to create a full structure. Usage builddown(A : B)~buildup(A : B); Where: (A : B) : is a connection tree composed of WD adaptors (wd.)getres Function for determining the upward-facing port resistance of a partial WD connection tree. It recursively steps through the given tree, parametrizes the adaptors, and builds an algorithm. It is used by the buildup and builddown functions but is also helpful in testing. Usage getres(A : B)~getres(A : B); Where: (A : B) : is a partial connection tree composed of WD adaptors Note: This function cannot be used on a complete WD tree. When called on an unadapted adaptor (u_ prefix), it will create errors. (wd.)parres Function for determining the upward-facing port resistance of a partial WD connection tree. It recursively steps through the given tree, parametrizes the adaptors, and builds an algorithm. It is used by the buildup and builddown functions but is also helpful in testing. This function is a parallelized version of getres . Usage parres((A , B))~parres((A , B)); Where: (A , B) : is a partial connection tree composed of WD adaptors Note: this function cannot be used on a complete WD tree. When called on an unadapted adaptor (u_ prefix), it will create errors. (wd.)buildout Function for creating the output matrix for a WD model from a WD connection tree. It recursively steps through the given tree and creates an output matrix passing only outputs. Usage buildout( A : B ); Where: (A : B) : is a connection tree composed of WD adaptors (wd.)buildtree Function for building the DSP model from a WD connection tree structure. It recursively steps through the given tree, parametrizes the adaptors, and builds the algorithm. Usage buildtree(A : B); Where: (A : B) : a connection tree composed of WD adaptors","title":" wdmodels "},{"location":"libs/wdmodels/#wdmodelslib","text":"A library of basic adaptors and methods to help construct Wave Digital Filter models in Faust. Its official prefix is wd .","title":"wdmodels.lib"},{"location":"libs/wdmodels/#library-readme","text":"This library is intended for use for creating Wave Digital (WD) based models of audio circuitry for real-time audio processing within the Faust programming language. The goal is to provide a framework to create real-time virtual-analog audio effects and synthesizers using WD models without the use of C++. Furthermore, we seek to provide access to the technique of WD modeling to those without extensive knowledge of advanced digital signal processing techniques. Finally, we hope to provide a library which can integrate with all aspects of Faust, thus creating a platform for virtual circuit bending. The library itself is written in Faust to maintain portability. This library is heavily based on Kurt Werner's Dissertation, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters.\" I have tried to maintain consistent notation between the adaptors appearing within thesis and my adaptor code. The majority of the adaptors found in chapter 1 and chapter 3 are currently supported. For inquires about use of this library in a commercial product, please contact dirk [dot] roosenburg [dot] 30 [at] gmail [dot] com. This documentation is taken directly from the readme . Please refer to it for a more updated version. Many of the more in depth comments within the library include jargon. I plan to create videos detailing the theory of WD models. For now I recommend Kurt Werner's PhD, Virtual analog modeling of Audio circuitry using Wave Digital Filters . I have tried to maintain consistent syntax and notation to the thesis. This library currently includes the majority of the adaptors covered in chapter 1 and some from chapter 3.","title":"Library Readme"},{"location":"libs/wdmodels/#using-this-library","text":"Use of this library expects some level of familiarity with WDF techniques, especially simplification and decomposition of electronic circuits into WDF connection trees. I plan to create video to cover both these techniques and use of the library.","title":"Using this Library"},{"location":"libs/wdmodels/#quick-start","text":"To get a quick overview of the library, start with the secondOrderFilters.dsp code found in examples . Note that the wdmodels.lib library is now embedded in the online Faust IDE .","title":"Quick Start"},{"location":"libs/wdmodels/#a-simple-rc-filter-model","text":"Creating a model using this library consists fo three steps. First, declare a set of components. Second, model the relationship between them using a tree. Finally, build the tree using the libraries build functions. First, a set of components is declared using adaptors from the library. This list of components is created based on analysis of the circuit using WDF techniques, though generally each circuit element (resistor, capacitor, diode, etc.) can be expected to appear within the component set. For example, first order RC lowpass filter would require an unadapted voltage source, a 47k resistor, and a 10nF capacitor which outputs the voltage across itself. These can be declared with: vs1(i) = wd.u_voltage(i, no.noise); r1(i) = wd.resistor(i, 47*10^3); c1(i) = wd.capacitor_Vout(i, 10*10^-9); Note that the first argument, i, is left un-parametrized. Components must be declared in this form, as the build algorithm expects to receive adaptors which have exactly one parameter. Also note that we have chosen to declare a white noise function as the input to our voltage source. We could potentially declare this as a direct input to our model, but to do so is more complicated process which cannot be covered within this tutorial. For information on how to do this see Declaring Model Parameters as Inputs or see various implementations in examples . Second, the declared components and interconnection/structural adaptors (i.e. series, parallel, etc) are arranged into the connection tree which is produced from performing WD analysis on the modeled circuit. For example, to produce our first order RC lowpass circuit model, the following tree is declared: tree_lowpass = vs1 : wd.series : (r1, c1); For more information on how to represent trees in Faust, see Trees in Faust . Finally, the tree is built using the the buildtree function. To build and compute our first order RC lowpass circuit model, we use: process = wd.buildtree(tree_lowpass); More information about build functions, see Model Building Functions .","title":"A Simple RC Filter Model"},{"location":"libs/wdmodels/#building-a-model","text":"After creating a connection tree which consists of WD adaptors, the connection tree must be passed to a build function in order to build the model.","title":"Building a Model"},{"location":"libs/wdmodels/#automatic-model-building","text":"buildtree(connection_tree) The simplest build function for use with basic models. This automatically implements buildup , builddown , and buildout to create a working model. However, it gives minimum control to the user and cannot currently be used on trees which have parameters declared as inputs.","title":"Automatic model building"},{"location":"libs/wdmodels/#manual-model-building","text":"Wave Digital Filters are an explicit state-space model, meaning they use a previous system state in order to calculate the current output. This is achieved in Faust by using a single global feedback operator. The models feed-forward terms are generated using builddown and the models feedback terms are generated using buildup . Thus, the most common model implementation (the method used by buildtree ) is: builddown(connection_tree)~buildup(connection_tree) : buildout(connection_tree) Since the ~ operator in Faust will leave feedback terms hanging as outputs, buildout is a function provided for convenience. It automatically truncates the hanging outputs by identifying leaf components which have an intended output and generating an output matrix. Building the model manually allows for greater user control and is often very helpful in testing. Also provided for testing are the getres and parres functions, which can be used to determine the upward-facing port resistance of an element.","title":"Manual model building"},{"location":"libs/wdmodels/#declaring-model-parameters-as-inputs","text":"When possible, parameters of components should be declared explicitly, meaning they are dependent on a function with no inputs. This might be something as simple as integer(declaring a static component), a function dependent on a UI input (declaring a component with variable value), or even a time-dependent function like an oscillator (declaring an audio input or circuit bending). However, it is often necessary to declare parameters as input. To achieve this there are two possible methods. The first and recommended option is to create a separate model function and declare parameters which will later be implemented as inputs. This allows inputs to be explicitly declared as component parameters. For example, one might use: model(in1) = buildtree(tree) with { ... vin(i) = wd.u_voltage(i, in1); ... tree = vin : ...; }; In order to simulate an audio input to the circuit. Note that the tree and components must be declared inside a with {...} statement, or the model's parameters will not be accessible.","title":"Declaring Model Parameters as Inputs"},{"location":"libs/wdmodels/#the-empty-signal-operator","text":"The Empty signal operator, _ should NEVER be used to declare a parameter as in input in a wave-digital model. Using it will result on breaking the internal routing of the model and thus breaks the model. Instead, use explicit declaration as shown directly above.","title":"The Empty Signal Operator"},{"location":"libs/wdmodels/#trees-in-faust","text":"Since WD models use connection trees to represent relationships of elements, a comprehensive way to represent trees is critical. As there is no current convention for creating trees in Faust, I've developed a method using the existing series and parallel/list methods in Faust. The series operator : is used to separate parent and child elements. For example the tree: A | B is represented by A : B in Faust. To denote a parent element with multiple child elements, simply use a list (a1, a2, ... an) of children connected to a single parent. ` For example the tree: A / \\ B C is represented by: A : (B, C) Finally, for a tree with many levels, simply break the tree into subtrees following the above rules and connect the subtree as if it was an individual node. For example the tree: A / \\ B C / / \\ X Y Z can be represented by: B_sub = B : X; //B subtree C_sub = C : (Y, Z); //C subtree tree = A : (B_sub, C_sub); //full tree or more simply, using parentheses: A : ((B : X), (C : (Y, Z)))","title":"Trees in Faust"},{"location":"libs/wdmodels/#how-adaptors-are-structured","text":"In wave digital filters, adaptors can be described by the form b = Sa where b is a vector of output waves b = (b0, b1, b2, ... bn) , a is a vector of input waves a = (a0, a1, a2, ... an) , and S is an n x n scattering matrix. S is dependent on R , a list of port resistances (R0, R1, R2, ... Rn) . The output wave vector b can be divided into downward-going and upward-going waves (downward-going waves travel down the connection tree, upward-going waves travel up). For adapted adaptors, with the zeroth port being the upward-facing port, the downward-going wave vector is (b1, b2, ... bn) and the upward-going wave vector is (b0) . For unadapted adaptors, there are no upward-going waves, so the downward-going wave vector is simply b = (b0, b1, b2, ... bn) . In order for adaptors to be interpretable by the compiler, they must be structured in a specific way. Each adaptor is divided into three cases by their first parameter. This parameter, while accessible by the user, should only be set by the compiler/builder. All other parameters are value declarations (for components), inputs (for voltage or current ins), or parameter controls (for potentiometers/variable capacitors/variable inductors).","title":"How Adaptors are Structured"},{"location":"libs/wdmodels/#first-case-downward-going-waves","text":"(0, params) => downward-going(R1, ... Rn, a0, a1, ... an) outputs: (b1, b2, ... bn) this function takes any number of port resistances, the downward going wave, and any number of upward going waves as inputs. These values/waves are used to calculate the downward going waves coming from this adaptor.","title":"First case - downward going waves"},{"location":"libs/wdmodels/#second-case","text":"(1, params) => upward-going(R1, ... Rn, a1, ... an) outputs : (b0) this function takes any number of port resistances and any number of upward going waves as inputs. These values/waves are used to calculate the upward going wave coming from this adaptor.","title":"Second case"},{"location":"libs/wdmodels/#third-case","text":"(2, params) => port-resistance(R1, ... Rn) outputs: (R0) this function takes any number of port resistances as inputs. These values are used to calculate the upward going port resistance of the element.","title":"Third case"},{"location":"libs/wdmodels/#unadapted-adaptors","text":"Unadapted adaptor's names will always begin u_ An unadapted adaptor MUST be used as the root of the WD connection tree. Unadapted adaptors can ONLY be used as a root of the WD connection tree. While unadapted adaptors contain all three cases, the second and third are purely structural. Only the first case should contain computational information.","title":"Unadapted Adaptors"},{"location":"libs/wdmodels/#how-the-build-functions-work","text":"Expect this section to be added soon! It's currently in progress.","title":"How the Build Functions Work"},{"location":"libs/wdmodels/#acknowledgements","text":"Many thanks to Kurt Werner for helping me to understand wave digital filter models. Without his publications and consultations, the library would not exist. Thanks also to my advisors, Rob Owen and Eli Stine whose input was critical to the development of the library. Finally, thanks to Romain Michon, Stephane Letz, and the Faust Slack for contributing to testing, development, and inspiration when creating the library.","title":"Acknowledgements"},{"location":"libs/wdmodels/#references","text":"https://github.com/grame-cncm/faustlibraries/blob/master/wdmodels.lib","title":"References"},{"location":"libs/wdmodels/#algebraic-one-port-adaptors","text":"","title":"Algebraic One Port Adaptors"},{"location":"libs/wdmodels/#wdresistor","text":"Adapted Resistor. A basic node implementing a resistor for use within Wave Digital Filter connection trees. It should be used as a leaf/terminating element of the connection tree.","title":"(wd.)resistor"},{"location":"libs/wdmodels/#usage","text":"r1(i) = resistor(i, R); buildtree( A : r1 ); Where: i : index used by model-building functions. Should never be user declared. R : Resistance/Impedance of the resistor being modeled in Ohms. Note: the adaptor must be declared as a separate function before integration into the connection tree. Correct implementation is shown above.","title":"Usage"},{"location":"libs/wdmodels/#reference","text":"K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.2.1","title":"Reference"},{"location":"libs/wdmodels/#wdresistor_vout","text":"Adapted Resistor + voltage Out. A basic adaptor implementing a resistor for use within Wave Digital Filter connection trees. It should be used as a leaf/terminating element of the connection tree. The resistor will also pass the voltage across itself as an output of the model.","title":"(wd.)resistor_Vout"},{"location":"libs/wdmodels/#usage_1","text":"rout(i) = resistor_Vout(i, R); buildtree( A : rout ) : _ Where: i : index used by model-building functions. Should never be user declared. R : Resistance/Impedance of the resistor being modeled in Ohms. Note: the adaptor must be declared as a separate function before integration into the connection tree. Correct implementation is shown above.","title":"Usage"},{"location":"libs/wdmodels/#reference_1","text":"K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.2.1","title":"Reference"},{"location":"libs/wdmodels/#wdresistor_iout","text":"Resistor + current Out. A basic adaptor implementing a resistor for use within Wave Digital Filter connection trees. It should be used as a leaf/terminating element of the connection tree. The resistor will also pass the current through itself as an output of the model.","title":"(wd.)resistor_Iout"},{"location":"libs/wdmodels/#usage_2","text":"rout(i) = resistor_Iout(i, R); buildtree( A : rout ) : _ Where: i : index used by model-building functions. Should never be user declared. R : Resistance/Impedance of the resistor being modeled in Ohms. Note: the adaptor must be declared as a separate function before integration into the connection tree. Correct implementation is shown above.","title":"Usage"},{"location":"libs/wdmodels/#reference_2","text":"K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.2.1","title":"Reference"},{"location":"libs/wdmodels/#wdu_voltage","text":"Unadapted Ideal Voltage Source. An adaptor implementing an ideal voltage source within Wave Digital Filter connection trees. It should be used as the root/top element of the connection tree. Can be used for either DC (constant) or AC (signal) voltage sources.","title":"(wd.)u_voltage"},{"location":"libs/wdmodels/#usage_3","text":"v1(i) = u_Voltage(i, ein); buildtree( v1 : B ); Where: i : index used by model-building functions. Should never be user declared. ein : Voltage/Potential across ideal voltage source in Volts Note: only usable as the root of a tree. The adaptor must be declared as a separate function before integration into the connection tree. Correct implementation is shown above.","title":"Usage"},{"location":"libs/wdmodels/#reference_3","text":"K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.2.2","title":"Reference"},{"location":"libs/wdmodels/#wdu_current","text":"Unadapted Ideal Current Source. An unadapted adaptor implementing an ideal current source within Wave Digital Filter connection trees. It should be used as the root/top element of the connection tree. Can be used for either DC (constant) or AC (signal) current sources.","title":"(wd.)u_current"},{"location":"libs/wdmodels/#usage_4","text":"i1(i) = u_current(i, jin); buildtree( i1 : B ); Where: i : index used by model-building functions. Should never be user declared. jin : Current through the ideal current source in Amps Note: only usable as the root of a tree. The adaptor must be declared as a separate function before integration into the connection tree. Correct implementation is shown above.","title":"Usage"},{"location":"libs/wdmodels/#reference_4","text":"K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.2.3","title":"Reference"},{"location":"libs/wdmodels/#wdresvoltage","text":"Adapted Resistive Voltage Source. An adaptor implementing a resistive voltage source within Wave Digital Filter connection trees. It should be used as a leaf/terminating element of the connection tree. It is comprised of an ideal voltage source in series with a resistor. Can be used for either DC (constant) or AC (signal) voltage sources.","title":"(wd.)resVoltage"},{"location":"libs/wdmodels/#usage_5","text":"v1(i) = resVoltage(i, R, ein); buildtree( A : v1 ); Where: i : index used by model-building functions. Should never be user declared R : Resistance/Impedance of the series resistor in Ohms ein : Voltage/Potential of the ideal voltage source in Volts Note: the adaptor must be declared as a separate function before integration into the connection tree. Correct implementation is shown above.","title":"Usage"},{"location":"libs/wdmodels/#reference_5","text":"K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.2.4","title":"Reference"},{"location":"libs/wdmodels/#wdresvoltage_vout","text":"Adapted Resistive Voltage Source + voltage output. An adaptor implementing an adapted resistive voltage source within Wave Digital Filter connection trees. It should be used as a leaf/terminating element of the connection tree. It is comprised of an ideal voltage source in series with a resistor. Can be used for either DC (constant) or AC (signal) voltage sources. The resistive voltage source will also pass the voltage across it as an output of the model.","title":"(wd.)resVoltage_Vout"},{"location":"libs/wdmodels/#usage_6","text":"vout(i) = resVoltage_Vout(i, R, ein); buildtree( A : vout ) : _ Where: i : index used by model-building functions. Should never be user declared R : Resistance/Impedance of the series resistor in Ohms ein : Voltage/Potential across ideal voltage source in Volts Note: the adaptor must be declared as a separate function before integration into the connection tree. Correct implementation is shown above.","title":"Usage"},{"location":"libs/wdmodels/#reference_6","text":"K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.2.4","title":"Reference"},{"location":"libs/wdmodels/#wdu_resvoltage","text":"Unadapted Resistive Voltage Source. An unadapted adaptor implementing a resistive voltage source within Wave Digital Filter connection trees. It should be used as the root/top element of the connection tree. It is comprised of an ideal voltage source in series with a resistor. Can be used for either DC (constant) or AC (signal) voltage sources.","title":"(wd.)u_resVoltage"},{"location":"libs/wdmodels/#usage_7","text":"v1(i) = u_resVoltage(i, R, ein); buildtree( v1 : B ); Where: i : index used by model-building functions. Should never be user declared R : Resistance/Impedance of the series resistor in Ohms ein : Voltage/Potential across ideal voltage source in Volts Note: only usable as the root of a tree. The adaptor must be declared as a separate function before integration into the connection tree. Correct implementation is shown above.","title":"Usage"},{"location":"libs/wdmodels/#reference_7","text":"K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.2.4","title":"Reference"},{"location":"libs/wdmodels/#wdrescurrent","text":"Adapted Resistive Current Source. An adaptor implementing a resistive current source within Wave Digital Filter connection trees. It should be used as a leaf/terminating element of the connection tree. It is comprised of an ideal current source in parallel with a resistor. Can be used for either DC (constant) or AC (signal) current sources.","title":"(wd.)resCurrent"},{"location":"libs/wdmodels/#usage_8","text":"i1(i) = resCurrent(i, R, jin); buildtree( A : i1 ); Where: i : index used by model-building functions. Should never be user declared. R : Resistance/Impedance of the parallel resistor in Ohms jin : Current through the ideal current source in Amps Note: the adaptor must be declared as a separate function before integration into the connection tree. Correct implementation is shown above.","title":"Usage"},{"location":"libs/wdmodels/#reference_8","text":"K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.2.5","title":"Reference"},{"location":"libs/wdmodels/#wdu_rescurrent","text":"Unadapted Resistive Current Source. An unadapted adaptor implementing a resistive current source within Wave Digital Filter connection trees. It should be used as the root/top element of the connection tree. It is comprised of an ideal current source in parallel with a resistor. Can be used for either DC (constant) or AC (signal) current sources.","title":"(wd.)u_resCurrent"},{"location":"libs/wdmodels/#usage_9","text":"i1(i) = u_resCurrent(i, R, jin); buildtree( i1 : B ); Where: i : index used by model-building functions. Should never be user declared. R : Resistance/Impedance of the series resistor in Ohms jin : Current through the ideal current source in Amps Note: only usable as the root of a tree. The adaptor must be declared as a separate function before integration into the connection tree. Correct implementation is shown above.","title":"Usage"},{"location":"libs/wdmodels/#reference_9","text":"K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.2.5","title":"Reference"},{"location":"libs/wdmodels/#wdu_switch","text":"Unadapted Ideal Switch. An unadapted adaptor implementing an ideal switch for Wave Digital Filter connection trees. It should be used as the root/top element of the connection tree","title":"(wd.)u_switch"},{"location":"libs/wdmodels/#usage_10","text":"s1(i) = u_resCurrent(i, lambda); buildtree( s1 : B ); Where: i : index used by model-building functions. Should never be user declared. lambda : switch state control. -1 for closed switch, 1 for open switch. Note: only usable as the root of a tree. The adaptor must be declared as a separate function before integration into the connection tree. Correct implementation is shown above.","title":"Usage"},{"location":"libs/wdmodels/#reference_10","text":"K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.2.8","title":"Reference"},{"location":"libs/wdmodels/#reactive-one-port-adaptors","text":"","title":"Reactive One Port Adaptors"},{"location":"libs/wdmodels/#wdcapacitor","text":"Adapted Capacitor. A basic adaptor implementing a capacitor for use within Wave Digital Filter connection trees. It should be used as a leaf/terminating element of the connection tree. This capacitor model was digitized using the bi-linear transform.","title":"(wd.)capacitor"},{"location":"libs/wdmodels/#usage_11","text":"c1(i) = capacitor(i, R); buildtree( A : c1 ) : _ Where: i : index used by model-building functions. Should never be user declared. R : Capacitance/Impedance of the capacitor being modeled in Farads. Note: the adaptor must be declared as a separate function before integration into the connection tree. Correct implementation is shown above.","title":"Usage"},{"location":"libs/wdmodels/#reference_11","text":"K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.3.1","title":"Reference"},{"location":"libs/wdmodels/#wdcapacitor_vout","text":"Adapted Capacitor + voltage out. A basic adaptor implementing a capacitor for use within Wave Digital Filter connection trees. It should be used as a leaf/terminating element of the connection tree. The capacitor will also pass the voltage across itself as an output of the model. This capacitor model was digitized using the bi-linear transform.","title":"(wd.)capacitor_Vout"},{"location":"libs/wdmodels/#usage_12","text":"cout(i) = capacitor_Vout(i, R); buildtree( A : cout ) : _ Where: i : index used by model-building functions. Should never be user declared R : Capacitance/Impedence of the capacitor being modeled in Farads Note: the adaptor must be declared as a seperate function before integration into the connection tree. Correct implementation is shown above.","title":"Usage"},{"location":"libs/wdmodels/#reference_12","text":"K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.3.1","title":"Reference"},{"location":"libs/wdmodels/#wdinductor","text":"Unadapted Inductor. A basic adaptor implementing an inductor for use within Wave Digital Filter connection trees. It should be used as a leaf/terminating element of the connection tree. This inductor model was digitized using the bi-linear transform.","title":"(wd.)inductor"},{"location":"libs/wdmodels/#usage_13","text":"l1(i) = inductor(i, R); buildtree( A : l1 ); Where: i : index used by model-building functions. Should never be user declared R : Inductance/Impedance of the inductor being modeled in Henries Note: the adaptor must be declared as a separate function before integration into the connection tree. Correct implementation is shown above.","title":"Usage"},{"location":"libs/wdmodels/#reference_13","text":"K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.3.2","title":"Reference"},{"location":"libs/wdmodels/#wdinductor_vout","text":"Unadapted Inductor + Voltage out. A basic adaptor implementing an inductor for use within Wave Digital Filter connection trees. It should be used as a leaf/terminating element of the connection tree. The inductor will also pass the voltage across itself as an output of the model. This inductor model was digitized using the bi-linear transform.","title":"(wd.)inductor_Vout"},{"location":"libs/wdmodels/#usage_14","text":"lout(i) = inductor_Vout(i, R); buildtree( A : lout ) : _ Where: i : index used by model-building functions. Should never be user declared R : Inductance/Impedance of the inductor being modeled in Henries Note: the adaptor must be declared as a separate function before integration into the connection tree. Correct implementation is shown above.","title":"Usage"},{"location":"libs/wdmodels/#reference_14","text":"K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.3.2","title":"Reference"},{"location":"libs/wdmodels/#nonlinear-one-port-adaptors","text":"","title":"Nonlinear One Port Adaptors"},{"location":"libs/wdmodels/#wdu_idealdiode","text":"Unadapted Ideal Diode. An unadapted adaptor implementing an ideal diode for Wave Digital Filter connection trees. It should be used as the root/top element of the connection tree.","title":"(wd.)u_idealDiode"},{"location":"libs/wdmodels/#usage_15","text":"buildtree( u_idealDiode : B ); Note: only usable as the root of a tree. Correct implementation is shown above.","title":"Usage"},{"location":"libs/wdmodels/#reference_15","text":"K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 3.2.3","title":"Reference"},{"location":"libs/wdmodels/#wdu_chua","text":"Unadapted Chua Diode. An adaptor implementing the chua diode / non-linear resistor within Wave Digital Filter connection trees. It should be used as the root/top element of the connection tree.","title":"(wd.)u_chua"},{"location":"libs/wdmodels/#usage_16","text":"chua1(i) = u_chua(i, G1, G2, V0); buildtree( chua1 : B ); Where: i : index used by model-building functions. Should never be user declared G1 : resistance parameter 1 of the chua diode G2 : resistance parameter 2 of the chua diode V0 : voltage parameter of the chua diode Note: only usable as the root of a tree. The adaptor must be declared as a separate function before integration into the connection tree. Correct implementation is shown above.","title":"Usage"},{"location":"libs/wdmodels/#reference_16","text":"Meerkotter and Scholz, \"Digital Simulation of Nonlinear Circuits by Wave Digital Filter Principles\"","title":"Reference"},{"location":"libs/wdmodels/#wdlambert","text":"An implementation of the lambert function. It uses Halley's method of iteration to approximate the output. Included in the WD library for use in non-linear diode models. Adapted from K M Brigg's c++ lambert function approximation.","title":"(wd.)lambert"},{"location":"libs/wdmodels/#usage_17","text":"lambert(n, itr) : _ Where: * n : value at which the lambert function will be evaluated * itr : number of iterations before output","title":"Usage"},{"location":"libs/wdmodels/#wdu_diodepair","text":"Unadapted pair of diodes facing in opposite directions. An unadapted adaptor implementing two antiparallel diodes for Wave Digital Filter connection trees. The behavior is approximated using Schottkey's ideal diode law.","title":"(wd.)u_diodePair"},{"location":"libs/wdmodels/#usage_18","text":"d1(i) = u_diodePair(i, Is, Vt); buildtree( d1 : B ); Where: i : index used by model-building functions. Should never be user declared Is : saturation current of the diodes Vt : thermal resistances of the diodes Note: only usable as the root of a tree. Correct implementation is shown above.","title":"Usage"},{"location":"libs/wdmodels/#reference_17","text":"K. Werner et al. \"An Improved and Generalized Diode Clipper Model for Wave Digital Filters\"","title":"Reference"},{"location":"libs/wdmodels/#wdu_diodesingle","text":"Unadapted single diode. An unadapted adaptor implementing a single diode for Wave Digital Filter connection trees. The behavior is approximated using Schottkey's ideal diode law.","title":"(wd.)u_diodeSingle"},{"location":"libs/wdmodels/#usage_19","text":"d1(i) = u_diodeSingle(i, Is, Vt); buildtree( d1 : B ); Where: i : index used by model-building functions. Should never be user declared Is : saturation current of the diodes Vt : thermal resistances of the diodes Note: only usable as the root of a tree. Correct implementation is shown above.","title":"Usage"},{"location":"libs/wdmodels/#reference_18","text":"K. Werner et al. \"An Improved and Generalized Diode Clipper Model for Wave Digital Filters\"","title":"Reference"},{"location":"libs/wdmodels/#wdu_diodeantiparallel","text":"Unadapted set of antiparallel diodes with M diodes facing forwards and N diodes facing backwards. An unadapted adaptor implementing antiparallel diodes for Wave Digital Filter connection trees. The behavior is approximated using Schottkey's ideal diode law.","title":"(wd.)u_diodeAntiparallel"},{"location":"libs/wdmodels/#usage_20","text":"d1(i) = u_diodeAntiparallel(i, Is, Vt); buildtree( d1 : B ); Where: i : index used by model-building functions. Should never be user declared Is : saturation current of the diodes Vt : thermal resistances of the diodes Note: only usable as the root of a tree. Correct implementation is shown above.","title":"Usage"},{"location":"libs/wdmodels/#reference_19","text":"K. Werner et al. \"An Improved and Generalized Diode Clipper Model for Wave Digital Filters\"","title":"Reference"},{"location":"libs/wdmodels/#two-port-adaptors","text":"","title":"Two Port Adaptors"},{"location":"libs/wdmodels/#wdu_parallel2port","text":"Unadapted 2-port parallel connection. An unadapted adaptor implementing a 2-port parallel connection between adaptors for Wave Digital Filter connection trees. Elements connected to this adaptor will behave as if connected in parallel in circuit.","title":"(wd.)u_parallel2Port"},{"location":"libs/wdmodels/#usage_21","text":"buildtree( u_parallel2Port : (A, B) ); Note: only usable as the root of a tree. This adaptor has no user-accessible parameters. Correct implementation is shown above.","title":"Usage"},{"location":"libs/wdmodels/#reference_20","text":"K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.4.1","title":"Reference"},{"location":"libs/wdmodels/#wdparallel2port","text":"Adapted 2-port parallel connection. An adaptor implementing a 2-port parallel connection between adaptors for Wave Digital Filter connection trees. Elements connected to this adaptor will behave as if connected in parallel in circuit.","title":"(wd.)parallel2Port"},{"location":"libs/wdmodels/#usage_22","text":"buildtree( A : parallel2Port : B ); Note: this adaptor has no user-accessible parameters. It should be used within the connection tree with one previous and one forward adaptor. Correct implementation is shown above.","title":"Usage"},{"location":"libs/wdmodels/#reference_21","text":"K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.4.1","title":"Reference"},{"location":"libs/wdmodels/#wdu_series2port","text":"Unadapted 2-port series connection. An unadapted adaptor implementing a 2-port series connection between adaptors for Wave Digital Filter connection trees. Elements connected to this adaptor will behave as if connected in series in circuit.","title":"(wd.)u_series2Port"},{"location":"libs/wdmodels/#usage_23","text":"buildtree( u_series2Port : (A, B) ); Note: only usable as the root of a tree. This adaptor has no user-accessible parameters. Correct implementation is shown above.","title":"Usage"},{"location":"libs/wdmodels/#reference_22","text":"K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.4.1","title":"Reference"},{"location":"libs/wdmodels/#wdseries2port","text":"Adapted 2-port series connection. An adaptor implementing a 2-port series connection between adaptors for Wave Digital Filter connection trees. Elements connected to this adaptor will behave as if connected in series in circuit.","title":"(wd.)series2Port"},{"location":"libs/wdmodels/#usage_24","text":"buildtree( A : series2Port : B ); Note: this adaptor has no user-accessible parameters. It should be used within the connection tree with one previous and one forward adaptor. Correct implementation is shown above.","title":"Usage"},{"location":"libs/wdmodels/#reference_23","text":"K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.4.1","title":"Reference"},{"location":"libs/wdmodels/#wdparallelcurrent","text":"Adapted 2-port parallel connection + ideal current source. An adaptor implementing a 2-port series connection and internal idealized current source between adaptors for Wave Digital Filter connection trees. This adaptor connects the two connected elements and an additional ideal current source in parallel.","title":"(wd.)parallelCurrent"},{"location":"libs/wdmodels/#usage_25","text":"i1(i) = parallelCurrent(i, jin); buildtree(A : i1 : B); Where: i : index used by model-building functions. Should never be user declared jin : Current through the ideal current source in Amps Note: the adaptor must be declared as a separate function before integration into the connection tree. It should be used within a connection tree with one previous and one forward adaptor. Correct implementation is shown above.","title":"Usage"},{"location":"libs/wdmodels/#reference_24","text":"K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.4.2","title":"Reference"},{"location":"libs/wdmodels/#wdseriesvoltage","text":"Adapted 2-port series connection + ideal voltage source. An adaptor implementing a 2-port series connection and internal ideal voltage source between adaptors for Wave Digital Filter connection trees. This adaptor connects the two connected adaptors and an additional ideal voltage source in series.","title":"(wd.)seriesVoltage"},{"location":"libs/wdmodels/#usage_26","text":"v1(i) = seriesVoltage(i, vin) buildtree( A : v1 : B ); Where: i : index used by model-building functions. Should never be user declared vin : voltage across the ideal current source in Volts Note: the adaptor must be declared as a separate function before integration into the connection tree. It should be used within the connection tree with one previous and one forward adaptor.","title":"Usage"},{"location":"libs/wdmodels/#reference_25","text":"K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.4.2","title":"Reference"},{"location":"libs/wdmodels/#wdu_transformer","text":"Unadapted ideal transformer. An adaptor implementing an ideal transformer for Wave Digital Filter connection trees. The first downward-facing port corresponds to the primary winding connections, and the second downward-facing port to the secondary winding connections.","title":"(wd.)u_transformer"},{"location":"libs/wdmodels/#usage_27","text":"t1(i) = u_transformer(i, tr); buildtree(t1 : (A , B)); Where: i : index used by model-building functions. Should never be user declared tr : the turn ratio between the windings on the primary and secondary coils Note: the adaptor must be declared as a separate function before integration into the connection tree. It may only be used as the root of the connection tree with two forward nodes.","title":"Usage"},{"location":"libs/wdmodels/#reference_26","text":"K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.4.3","title":"Reference"},{"location":"libs/wdmodels/#wdtransformer","text":"Adapted ideal transformer. An adaptor implementing an ideal transformer for Wave Digital Filter connection trees. The upward-facing port corresponds to the primary winding connections, and the downward-facing port to the secondary winding connections","title":"(wd.)transformer"},{"location":"libs/wdmodels/#usage_28","text":"t1(i) = transformer(i, tr); buildtree(A : t1 : B); Where: i : index used by model-building functions. Should never be user declared tr : the turn ratio between the windings on the primary and secondary coils Note: the adaptor must be declared as a separate function before integration into the connection tree. It should be used within the connection tree with one backward and one forward nodes.","title":"Usage"},{"location":"libs/wdmodels/#reference_27","text":"K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.4.3","title":"Reference"},{"location":"libs/wdmodels/#wdu_transformeractive","text":"Unadapted ideal active transformer. An adaptor implementing an ideal transformer for Wave Digital Filter connection trees. The first downward-facing port corresponds to the primary winding connections, and the second downward-facing port to the secondary winding connections.","title":"(wd.)u_transformerActive"},{"location":"libs/wdmodels/#usage_29","text":"t1(i) = u_transformerActive(i, gamma1, gamma2); buildtree(t1 : (A , B)); Where: i : index used by model-building functions. Should never be user declared gamma1 : the turn ratio describing the voltage relationship between the primary and secondary coils gamma2 : the turn ratio describing the current relationship between the primary and secondary coils Note: the adaptor must be declared as a separate function before integration into the connection tree. It may only be used as the root of the connection tree with two forward nodes.","title":"Usage"},{"location":"libs/wdmodels/#reference_28","text":"K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.4.3","title":"Reference"},{"location":"libs/wdmodels/#wdtransformeractive","text":"Adapted ideal active transformer. An adaptor implementing an ideal active transformer for Wave Digital Filter connection trees. The upward-facing port corresponds to the primary winding connections, and the downward-facing port to the secondary winding connections","title":"(wd.)transformerActive"},{"location":"libs/wdmodels/#usage_30","text":"t1(i) = transformerActive(i, gamma1, gamma2); buildtree(A : t1 : B); Where: i : index used by model-building functions. Should never be user declared gamma1 : the turn ratio describing the voltage relationship between the primary and secondary coils gamma2 : the turn ratio describing the current relationship between the primary and secondary coils Note: the adaptor must be declared as a separate function before integration into the connection tree. It should be used within the connection tree with two forward nodes.","title":"Usage"},{"location":"libs/wdmodels/#reference_29","text":"K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.4.3","title":"Reference"},{"location":"libs/wdmodels/#three-port-adaptors","text":"","title":"Three Port Adaptors"},{"location":"libs/wdmodels/#wdparallel","text":"Adapted 3-port parallel connection. An adaptor implementing a 3-port parallel connection between adaptors for Wave Digital Filter connection trees. This adaptor is used to connect adaptors simulating components connected in parallel in the circuit.","title":"(wd.)parallel"},{"location":"libs/wdmodels/#usage_31","text":"buildtree( A : parallel : (B, C) ); Note: this adaptor has no user-accessible parameters. It should be used within the connection tree with one previous and two forward adaptors.","title":"Usage"},{"location":"libs/wdmodels/#reference_30","text":"K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.5.1","title":"Reference"},{"location":"libs/wdmodels/#wdseries","text":"Adapted 3-port series connection. An adaptor implementing a 3-port series connection between adaptors for Wave Digital Filter connection trees. This adaptor is used to connect adaptors simulating components connected in series in the circuit.","title":"(wd.)series"},{"location":"libs/wdmodels/#usage_32","text":"tree = A : (series : (B, C)); Note: this adaptor has no user-accessible parameters. It should be used within the connection tree with one previous and two forward adaptors.","title":"Usage"},{"location":"libs/wdmodels/#reference_31","text":"K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.5.2","title":"Reference"},{"location":"libs/wdmodels/#r-type-adaptors","text":"","title":"R-Type Adaptors"},{"location":"libs/wdmodels/#wdu_sixportpassive","text":"Unadapted six-port rigid connection. An adaptor implementing a six-port passive rigid connection between elements. It implements the simplest possible rigid connection found in the Fender Bassman Tonestack circuit.","title":"(wd.)u_sixportPassive"},{"location":"libs/wdmodels/#usage_33","text":"tree = u_sixportPassive : (A, B, C, D, E, F)); Note: this adaptor has no user-accessible parameters. It should be used within the connection tree with six forward adaptors.","title":"Usage"},{"location":"libs/wdmodels/#reference_32","text":"K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 2.1.5","title":"Reference"},{"location":"libs/wdmodels/#node-creating-functions","text":"","title":"Node Creating Functions"},{"location":"libs/wdmodels/#wdgenericnode","text":"Function for generating an adapted node from another faust function or scattering matrix. This function generates a node which is suitable for use in the connection tree structure. genericNode separates the function that it is passed into upward-going and downward-going waves.","title":"(wd.)genericNode"},{"location":"libs/wdmodels/#usage_34","text":"n1(i) = genericNode(i, scatter, upRes); Where: i : index used by model-building functions. Should never be user declared scatter : the function which describes the the node's scattering behavior upRes : the function which describes the node's upward-facing port-resistance Note: scatter must be a function with n inputs, n outputs, and n-1 parameter inputs. input/output 1 will be used as the adapted upward-facing port of the node, ports 2 to n will all be downward-facing. The first input/output pair is assumed to already be adapted - i.e. the output 1 is not dependent on input 1. The parameter inputs will receive the port resistances of the downward-facing ports. upRes must be a function with n-1 parameter inputs and 1 output. The parameter inputs will receive the port resistances of the downward-facing ports. The output should give the upward-facing port resistance of the node based on the upward-facing port resistances of the input. If used on a leaf element (n=1), the model will automatically introduce a one-sample delay. Thus, the output of the node at sample t based on the input, a[t], should be the output one sample ahead, b[t+1]. This may require transformation of the output signal.","title":"Usage"},{"location":"libs/wdmodels/#wdgenericnode_vout","text":"Function for generating a terminating/leaf node which gives the voltage across itself as a model output. This function generates a node which is suitable for use in the connection tree structure. It also calculates the voltage across the element and gives it as a model output.","title":"(wd.)genericNode_Vout"},{"location":"libs/wdmodels/#usage_35","text":"n1(i) = genericNode_Vout(i, scatter, upRes); Where: i : index used by model-building functions. Should never be user declared scatter : the function which describes the the node's scattering behavior upRes : the function which describes the node's upward-facing port-resistance Note: scatter must be a function with 1 input and 1 output. It should give the output from the node based on the incident wave. The model will automatically introduce a one-sample delay to the output of the function Thus, the output of the node at sample t based on the input, a[t], should be the output one sample ahead, b[t+1]. This may require transformation of the output signal. upRes must be a function with no inputs and 1 output. The output should give the upward-facing port resistance of the node.","title":"Usage"},{"location":"libs/wdmodels/#wdgenericnode_iout","text":"Function for generating a terminating/leaf node which gives the current through itself as a model output. This function generates a node which is suitable for use in the connection tree structure. It also calculates the current through the element and gives it as a model output.","title":"(wd.)genericNode_Iout"},{"location":"libs/wdmodels/#usage_36","text":"n1(i) = genericNode_Iout(i, scatter, upRes); Where: i : index used by model-building functions. Should never be user declared scatter : the function which describes the the node's scattering behavior upRes : the function which describes the node's upward-facing port-resistance Note: scatter must be a function with 1 input and 1 output. It should give the output from the node based on the incident wave. The model will automatically introduce a one-sample delay to the output of the function. Thus, the output of the node at sample t based on the input, a[t], should be the output one sample ahead, b[t+1]. This may require transformation of the output signal. upRes must be a function with no inputs and 1 output. The output should give the upward-facing port resistance of the node.","title":"Usage"},{"location":"libs/wdmodels/#wdu_genericnode","text":"Function for generating an unadapted node from another Faust function or scattering matrix. This function generates a node which is suitable for use as the root of the connection tree structure.","title":"(wd.)u_genericNode"},{"location":"libs/wdmodels/#usage_37","text":"n1(i) = u_genericNode(i, scatter); Where: i : index used by model-building functions. Should never be user declared scatter : the function which describes the the node's scattering behavior Note: scatter must be a function with n inputs, n outputs, and n parameter inputs. each input/output pair will be used as a downward-facing port of the node the parameter inputs will receive the port resistances of the downward-facing ports.","title":"Usage"},{"location":"libs/wdmodels/#model-building-functions","text":"","title":"Model Building Functions"},{"location":"libs/wdmodels/#wdbuilddown","text":"Function for building the structure for calculating waves traveling down the WD connection tree. It recursively steps through the given tree, parametrizes the adaptors, and builds an algorithm. It is used in conjunction with the buildup() function to create a model.","title":"(wd.)builddown"},{"location":"libs/wdmodels/#usage_38","text":"builddown(A : B)~buildup(A : B); Where: (A : B) : is a connection tree composed of WD adaptors","title":"Usage"},{"location":"libs/wdmodels/#wdbuildup","text":"Function for building the structure for calculating waves traveling up the WD connection tree. It recursively steps through the given tree, parametrizes the adaptors, and builds an algorithm. It is used in conjunction with the builddown() function to create a full structure.","title":"(wd.)buildup"},{"location":"libs/wdmodels/#usage_39","text":"builddown(A : B)~buildup(A : B); Where: (A : B) : is a connection tree composed of WD adaptors","title":"Usage"},{"location":"libs/wdmodels/#wdgetres","text":"Function for determining the upward-facing port resistance of a partial WD connection tree. It recursively steps through the given tree, parametrizes the adaptors, and builds an algorithm. It is used by the buildup and builddown functions but is also helpful in testing.","title":"(wd.)getres"},{"location":"libs/wdmodels/#usage_40","text":"getres(A : B)~getres(A : B); Where: (A : B) : is a partial connection tree composed of WD adaptors Note: This function cannot be used on a complete WD tree. When called on an unadapted adaptor (u_ prefix), it will create errors.","title":"Usage"},{"location":"libs/wdmodels/#wdparres","text":"Function for determining the upward-facing port resistance of a partial WD connection tree. It recursively steps through the given tree, parametrizes the adaptors, and builds an algorithm. It is used by the buildup and builddown functions but is also helpful in testing. This function is a parallelized version of getres .","title":"(wd.)parres"},{"location":"libs/wdmodels/#usage_41","text":"parres((A , B))~parres((A , B)); Where: (A , B) : is a partial connection tree composed of WD adaptors Note: this function cannot be used on a complete WD tree. When called on an unadapted adaptor (u_ prefix), it will create errors.","title":"Usage"},{"location":"libs/wdmodels/#wdbuildout","text":"Function for creating the output matrix for a WD model from a WD connection tree. It recursively steps through the given tree and creates an output matrix passing only outputs.","title":"(wd.)buildout"},{"location":"libs/wdmodels/#usage_42","text":"buildout( A : B ); Where: (A : B) : is a connection tree composed of WD adaptors","title":"Usage"},{"location":"libs/wdmodels/#wdbuildtree","text":"Function for building the DSP model from a WD connection tree structure. It recursively steps through the given tree, parametrizes the adaptors, and builds the algorithm.","title":"(wd.)buildtree"},{"location":"libs/wdmodels/#usage_43","text":"buildtree(A : B); Where: (A : B) : a connection tree composed of WD adaptors","title":"Usage"},{"location":"libs/webaudio/","text":"webaudio.lib This library implement WebAudio filters, using their C++ version as a starting point, taken from Mozilla Firefox implementation. References https://github.com/grame-cncm/faustlibraries/blob/master/webaudio.lib (wa.)lowpass2 Standard second-order resonant lowpass filter with 12dB/octave rolloff. Frequencies below the cutoff pass through, frequencies above it are attenuated. Usage _ : lowpass2(f0, Q, dtune) : _ Where: f0 : cutoff frequency in Hz Q : the quality factor dtune : detuning of the frequency in cents Reference https://searchfox.org/mozilla-central/source/dom/media/webaudio/blink/Biquad.cpp#98 (wa.)highpass2 Standard second-order resonant highpass filter with 12dB/octave rolloff. Frequencies below the cutoff are attenuated, frequencies above it pass through. Usage _ : highpass2(f0, Q, dtune) : _ Where: f0 : cutoff frequency in Hz Q : the quality factor dtune : detuning of the frequency in cents Reference https://searchfox.org/mozilla-central/source/dom/media/webaudio/blink/Biquad.cpp#127 (wa.)bandpass2 Standard second-order bandpass filter. Frequencies outside the given range of frequencies are attenuated, the frequencies inside it pass through. Usage _ : bandpass2(f0, Q, dtune) : _ Where: f0 : cutoff frequency in Hz Q : the quality factor dtune : detuning of the frequency in cents Reference https://searchfox.org/mozilla-central/source/dom/media/webaudio/blink/Biquad.cpp#334 (wa.)notch2 Standard notch filter, also called a band-stop or band-rejection filter. It is the opposite of a bandpass filter: frequencies outside the give range of frequencies pass through, frequencies inside it are attenuated. Usage _ : notch2(f0, Q, dtune) : _ Where: f0 : cutoff frequency in Hz Q : the quality factor dtune : detuning of the frequency in cents Reference https://searchfox.org/mozilla-central/source/dom/media/webaudio/blink/Biquad.cpp#301 (wa.)allpass2 Standard second-order allpass filter. It lets all frequencies through, but changes the phase-relationship between the various frequencies. Usage _ : allpass2(f0, Q, dtune) : _ Where: f0 : cutoff frequency in Hz Q : the quality factor dtune : detuning of the frequency in cents Reference https://searchfox.org/mozilla-central/source/dom/media/webaudio/blink/Biquad.cpp#268 (wa.)peaking2 Frequencies inside the range get a boost or an attenuation, frequencies outside it are unchanged. Usage _ : peaking2(f0, gain, Q, dtune) : _ Where: f0 : cutoff frequency in Hz gain : the gain in dB Q : the quality factor dtune : detuning of the frequency in cents Reference https://searchfox.org/mozilla-central/source/dom/media/webaudio/blink/Biquad.cpp#233 (wa.)lowshelf2 Standard second-order lowshelf filter. Frequencies lower than the frequency get a boost, or an attenuation, frequencies over it are unchanged. _ : lowshelf2(f0, gain, dtune) : _ Where: f0 : cutoff frequency in Hz gain : the gain in dB dtune : detuning of the frequency in cents Reference https://searchfox.org/mozilla-central/source/dom/media/webaudio/blink/Biquad.cpp#169 (wa.)highshelf2 Standard second-order highshelf filter. Frequencies higher than the frequency get a boost or an attenuation, frequencies lower than it are unchanged. _ : highshelf2(f0, gain, dtune) : _ Where: f0 : cutoff frequency in Hz gain : the gain in dB dtune : detuning of the frequency in cents Reference https://searchfox.org/mozilla-central/source/dom/media/webaudio/blink/Biquad.cpp#201","title":" webaudio "},{"location":"libs/webaudio/#webaudiolib","text":"This library implement WebAudio filters, using their C++ version as a starting point, taken from Mozilla Firefox implementation.","title":"webaudio.lib"},{"location":"libs/webaudio/#references","text":"https://github.com/grame-cncm/faustlibraries/blob/master/webaudio.lib","title":"References"},{"location":"libs/webaudio/#walowpass2","text":"Standard second-order resonant lowpass filter with 12dB/octave rolloff. Frequencies below the cutoff pass through, frequencies above it are attenuated.","title":"(wa.)lowpass2"},{"location":"libs/webaudio/#usage","text":"_ : lowpass2(f0, Q, dtune) : _ Where: f0 : cutoff frequency in Hz Q : the quality factor dtune : detuning of the frequency in cents","title":"Usage"},{"location":"libs/webaudio/#reference","text":"https://searchfox.org/mozilla-central/source/dom/media/webaudio/blink/Biquad.cpp#98","title":"Reference"},{"location":"libs/webaudio/#wahighpass2","text":"Standard second-order resonant highpass filter with 12dB/octave rolloff. Frequencies below the cutoff are attenuated, frequencies above it pass through.","title":"(wa.)highpass2"},{"location":"libs/webaudio/#usage_1","text":"_ : highpass2(f0, Q, dtune) : _ Where: f0 : cutoff frequency in Hz Q : the quality factor dtune : detuning of the frequency in cents","title":"Usage"},{"location":"libs/webaudio/#reference_1","text":"https://searchfox.org/mozilla-central/source/dom/media/webaudio/blink/Biquad.cpp#127","title":"Reference"},{"location":"libs/webaudio/#wabandpass2","text":"Standard second-order bandpass filter. Frequencies outside the given range of frequencies are attenuated, the frequencies inside it pass through.","title":"(wa.)bandpass2"},{"location":"libs/webaudio/#usage_2","text":"_ : bandpass2(f0, Q, dtune) : _ Where: f0 : cutoff frequency in Hz Q : the quality factor dtune : detuning of the frequency in cents","title":"Usage"},{"location":"libs/webaudio/#reference_2","text":"https://searchfox.org/mozilla-central/source/dom/media/webaudio/blink/Biquad.cpp#334","title":"Reference"},{"location":"libs/webaudio/#wanotch2","text":"Standard notch filter, also called a band-stop or band-rejection filter. It is the opposite of a bandpass filter: frequencies outside the give range of frequencies pass through, frequencies inside it are attenuated.","title":"(wa.)notch2"},{"location":"libs/webaudio/#usage_3","text":"_ : notch2(f0, Q, dtune) : _ Where: f0 : cutoff frequency in Hz Q : the quality factor dtune : detuning of the frequency in cents","title":"Usage"},{"location":"libs/webaudio/#reference_3","text":"https://searchfox.org/mozilla-central/source/dom/media/webaudio/blink/Biquad.cpp#301","title":"Reference"},{"location":"libs/webaudio/#waallpass2","text":"Standard second-order allpass filter. It lets all frequencies through, but changes the phase-relationship between the various frequencies.","title":"(wa.)allpass2"},{"location":"libs/webaudio/#usage_4","text":"_ : allpass2(f0, Q, dtune) : _ Where: f0 : cutoff frequency in Hz Q : the quality factor dtune : detuning of the frequency in cents","title":"Usage"},{"location":"libs/webaudio/#reference_4","text":"https://searchfox.org/mozilla-central/source/dom/media/webaudio/blink/Biquad.cpp#268","title":"Reference"},{"location":"libs/webaudio/#wapeaking2","text":"Frequencies inside the range get a boost or an attenuation, frequencies outside it are unchanged.","title":"(wa.)peaking2"},{"location":"libs/webaudio/#usage_5","text":"_ : peaking2(f0, gain, Q, dtune) : _ Where: f0 : cutoff frequency in Hz gain : the gain in dB Q : the quality factor dtune : detuning of the frequency in cents","title":"Usage"},{"location":"libs/webaudio/#reference_5","text":"https://searchfox.org/mozilla-central/source/dom/media/webaudio/blink/Biquad.cpp#233","title":"Reference"},{"location":"libs/webaudio/#walowshelf2","text":"Standard second-order lowshelf filter. Frequencies lower than the frequency get a boost, or an attenuation, frequencies over it are unchanged. _ : lowshelf2(f0, gain, dtune) : _ Where: f0 : cutoff frequency in Hz gain : the gain in dB dtune : detuning of the frequency in cents","title":"(wa.)lowshelf2"},{"location":"libs/webaudio/#reference_6","text":"https://searchfox.org/mozilla-central/source/dom/media/webaudio/blink/Biquad.cpp#169","title":"Reference"},{"location":"libs/webaudio/#wahighshelf2","text":"Standard second-order highshelf filter. Frequencies higher than the frequency get a boost or an attenuation, frequencies lower than it are unchanged. _ : highshelf2(f0, gain, dtune) : _ Where: f0 : cutoff frequency in Hz gain : the gain in dB dtune : detuning of the frequency in cents","title":"(wa.)highshelf2"},{"location":"libs/webaudio/#reference_7","text":"https://searchfox.org/mozilla-central/source/dom/media/webaudio/blink/Biquad.cpp#201","title":"Reference"}]}
\ No newline at end of file
+{"config":{"indexing":"full","lang":["en"],"min_search_length":3,"prebuild_index":false,"separator":"[\\s\\-]+"},"docs":[{"location":"","text":"Faust Libraries The Faust libraries implement hundreds of DSP functions for audio processing and synthesis. They are organized by types in a set of .lib files (e.g., envelopes.lib , filters.lib , etc.). This website serves as the main documentation of the Faust libraries . The main Faust website can be found at the following URL: https://faust.grame.fr Using the Faust Libraries The easiest and most standard way to use the Faust libraries is to import stdfaust.lib in your Faust code: import(\"stdfaust.lib\"); This will give you access to all the Faust libraries through a series of environments: sf : all.lib aa : aanl.lib an : analyzers.lib ba : basics.lib co : compressors.lib de : delays.lib dm : demos.lib dx : dx7.lib en : envelopes.lib fd : fds.lib fi : filters.lib ho : hoa.lib it : interpolators.lib ma : maths.lib mi : mi.lib ef : misceffects.lib os : oscillators.lib no : noises.lib pf : phaflangers.lib pm : physmodels.lib qu : quantizers.lib rm : reducemaps.lib re : reverbs.lib ro : routes.lib si : signals.lib so : soundfiles.lib sp : spats.lib sy : synths.lib ve : vaeffects.lib vl : version.lib wa : webaudio.lib wd : wdmodels.lib Environments can then be used as follows in your Faust code: import(\"stdfaust.lib\"); process = os.osc(440); In this case, we're calling the osc function from oscillators.lib . You can also access all the functions of all the libraries directly using the sf environment: import(\"stdfaust.lib\"); process = sf.osc(440); Alternatively, environments can be created by hand: os = library(\"oscillators.lib\"); process = os.osc(440); Finally, libraries can be simply imported in the Faust code (not recommended): import(\"oscillators.lib\"); process = osc(440); Organization of This Documentation The Overview tab in the upper menu provides additional information about the general organization of the libraries, licensing/copyright, and guidelines on how to contribute to the Faust libraries. The Libraries tab contain the actual documentation of the Faust libraries.","title":"Faust Libraries"},{"location":"#faust-libraries","text":"The Faust libraries implement hundreds of DSP functions for audio processing and synthesis. They are organized by types in a set of .lib files (e.g., envelopes.lib , filters.lib , etc.). This website serves as the main documentation of the Faust libraries . The main Faust website can be found at the following URL: https://faust.grame.fr","title":"Faust Libraries"},{"location":"#using-the-faust-libraries","text":"The easiest and most standard way to use the Faust libraries is to import stdfaust.lib in your Faust code: import(\"stdfaust.lib\"); This will give you access to all the Faust libraries through a series of environments: sf : all.lib aa : aanl.lib an : analyzers.lib ba : basics.lib co : compressors.lib de : delays.lib dm : demos.lib dx : dx7.lib en : envelopes.lib fd : fds.lib fi : filters.lib ho : hoa.lib it : interpolators.lib ma : maths.lib mi : mi.lib ef : misceffects.lib os : oscillators.lib no : noises.lib pf : phaflangers.lib pm : physmodels.lib qu : quantizers.lib rm : reducemaps.lib re : reverbs.lib ro : routes.lib si : signals.lib so : soundfiles.lib sp : spats.lib sy : synths.lib ve : vaeffects.lib vl : version.lib wa : webaudio.lib wd : wdmodels.lib Environments can then be used as follows in your Faust code: import(\"stdfaust.lib\"); process = os.osc(440); In this case, we're calling the osc function from oscillators.lib . You can also access all the functions of all the libraries directly using the sf environment: import(\"stdfaust.lib\"); process = sf.osc(440); Alternatively, environments can be created by hand: os = library(\"oscillators.lib\"); process = os.osc(440); Finally, libraries can be simply imported in the Faust code (not recommended): import(\"oscillators.lib\"); process = osc(440);","title":"Using the Faust Libraries"},{"location":"#organization-of-this-documentation","text":"The Overview tab in the upper menu provides additional information about the general organization of the libraries, licensing/copyright, and guidelines on how to contribute to the Faust libraries. The Libraries tab contain the actual documentation of the Faust libraries.","title":"Organization of This Documentation"},{"location":"about/","text":"The Faust Project The Faust Project has started in 2002. It is actively developed by the GRAME-CNCM Research Department . Many persons are contributing to the Faust project, by providing code for the compiler, architecture files, libraries, examples, documentation, scripts, bug reports, ideas, etc. We would like in particular to thank: Fons Adriaensen, Karim Barkati, J\u00e9r\u00f4me Barth\u00e9lemy, Tim Blechmann, Tiziano Bole, Alain Bonardi, Thomas Charbonnel, Raffaele Ciavarella, Julien Colafrancesco, Damien Cramet, Sarah Denoux, \u00c9tienne Gaudrin, Olivier Guillerminet, Pierre Guillot, Albert Gr\u00e4f, Pierre Jouvelot, Stefan Kersten, Victor Lazzarini, Matthieu Leberre, Mathieu Leroi, Fernando Lopez-Lezcano, Kjetil Matheussen, Hermann Meyer, R\u00e9my Muller, Raphael Panis, Eliott Paris, Reza Payami, Laurent Pottier, Sampo Savolainen, Nicolas Scaringella, Anne Sedes, Priyanka Shekar, Stephen Sinclair, Travis Skare, Julius Smith, Mike Solomon, Michael Wilson, Bart Brouns, Dirk Roosenburg, Riccardo Russo. as well as our colleagues at GRAME : Dominique Fober Christophe Lebreton St\u00e9phane Letz Romain Michon Yann Orlarey We would like also to thank for their financial support: the French Ministry of Culture , the Auvergne-Rh\u00f4ne-Alpes Region , the City of Lyon , the French National Research Agency (ANR) .","title":"About"},{"location":"about/#the-faust-project","text":"The Faust Project has started in 2002. It is actively developed by the GRAME-CNCM Research Department . Many persons are contributing to the Faust project, by providing code for the compiler, architecture files, libraries, examples, documentation, scripts, bug reports, ideas, etc. We would like in particular to thank: Fons Adriaensen, Karim Barkati, J\u00e9r\u00f4me Barth\u00e9lemy, Tim Blechmann, Tiziano Bole, Alain Bonardi, Thomas Charbonnel, Raffaele Ciavarella, Julien Colafrancesco, Damien Cramet, Sarah Denoux, \u00c9tienne Gaudrin, Olivier Guillerminet, Pierre Guillot, Albert Gr\u00e4f, Pierre Jouvelot, Stefan Kersten, Victor Lazzarini, Matthieu Leberre, Mathieu Leroi, Fernando Lopez-Lezcano, Kjetil Matheussen, Hermann Meyer, R\u00e9my Muller, Raphael Panis, Eliott Paris, Reza Payami, Laurent Pottier, Sampo Savolainen, Nicolas Scaringella, Anne Sedes, Priyanka Shekar, Stephen Sinclair, Travis Skare, Julius Smith, Mike Solomon, Michael Wilson, Bart Brouns, Dirk Roosenburg, Riccardo Russo. as well as our colleagues at GRAME : Dominique Fober Christophe Lebreton St\u00e9phane Letz Romain Michon Yann Orlarey We would like also to thank for their financial support: the French Ministry of Culture , the Auvergne-Rh\u00f4ne-Alpes Region , the City of Lyon , the French National Research Agency (ANR) .","title":"The Faust Project"},{"location":"community/","text":"Libraries from the community A lot of libraries have been developed by the community. They are presented in the following sections. abclib library 20 years of research, teaching and creation in mixed music using Faust language. abclib library is released by the CICM / MUSIDANSE (Centre de Recherches Informatique et Cr\u00e9ation Musicale, Paris 8 University) and is the result of 20 years of research, teaching and creation in mixed music, expressed as a set of codes in Faust language. The main topics addressed are: spatial sound processing and synthesis using ambisonics, multi-channel sound processing, utility objects for mixed music. Edge of Chaos This repository contains libraries including some essential building blocks for the implementation of musical complex adaptive systems in Faust programming. It includes a set of time-domain algorithms, some of which are original, for the processing of low-level and high-level information as well as the processing of sound using standard and non-conventional techniques. It also includes functions for the realisation of networks with different topologies, linear and nonlinear mapping strategies to render positive and negative feedback relationships, and different kinds of energy-preserving techniques for the stability of self-oscillating systems. realfaust This library contains a set of functions representing domain-limited versions of all Faust primitives and math functions that can potentially generate INF or NaN values. The goal of the library is to be able to implement DSP networks that, structurally, are free from INF and NaN values. Hence, the resulting programs should be rock-solid during real-time performance and virtually immune to crashes regardless of how mercilessly a network is modulated or how unstable a recursive system is made. bitDSP-faust BitDSP is a set of Faust library functions aimed to help explore and research artistic possibilities of bit-based algorithms. BitDSP currently includes implementations of bit-based functions ranging from simple bit operations over classic delta-sigma modulations to more experimental approaches like cellular automata, recursive Boolean networks, and linear feedback shift registers. A detailed overview of the functionality is in the paper \"Creative use of bit-stream DSP in Faust\" presented at IFC 2020 . SEAM library Sustained Electro-Acoustic Music is a project inspired by Alvise Vidolin and Nicola Bernardini . The SEAM libraries have been developed for this project. Ambitools library Ambitools is an implementation of several Ambisonic tools with the FAUST language. The code is designed to be scalable and flexible, offering tools working at various Ambisonic order and compiled for various architectures. The implementation of the spherical harmonics for an efficient computation is detailed. See the Ambitools : Tools For Sound Field Synthesis With Higher Order Ambisonic - V1.0 paper. Faust Tap Library Tap a complicated expression to pull out specific outputs, without having to manually route those outputs, just like how named function parameters remove the need to manually route inputs. MoreFilters library A Faust library implementing following highpass/lowpass filters using fi.svf : Biquad Butterworth (2nd, 4th, 6th, 8th order) Bessel (2nd, 4th, 6th, 8th order) Linkwitz Riley (4th, 8th, 12th and 16th order) Awesome library Feel free to contribute by forking this project and creating a pull request , or by mailing the library description here . Additional DSP resources Heres is a list of additional DSP resources. Granulation A list of projects related to granulation: Dario Sanfilippo Live concatenative granular processing project Mykle Hansen Weather Organ project Jean-Louis Paquelin Granola monophonic granular live feed processor Mayank Sanganeria granulator.dsp project Henrik von Coler material on granulation with Faust code Material in the abclib library basic granulator in Faust based on a delay line , with the granulator function spatial granulation in ambisonics in abc_2d_fx_grain_ui and abc_2d_syn_grain_ui functions multichannel granulation in abc_multigrain_ui function","title":" Community "},{"location":"community/#libraries-from-the-community","text":"A lot of libraries have been developed by the community. They are presented in the following sections.","title":"Libraries from the community"},{"location":"community/#abclib-library","text":"20 years of research, teaching and creation in mixed music using Faust language. abclib library is released by the CICM / MUSIDANSE (Centre de Recherches Informatique et Cr\u00e9ation Musicale, Paris 8 University) and is the result of 20 years of research, teaching and creation in mixed music, expressed as a set of codes in Faust language. The main topics addressed are: spatial sound processing and synthesis using ambisonics, multi-channel sound processing, utility objects for mixed music.","title":"abclib library"},{"location":"community/#edge-of-chaos","text":"This repository contains libraries including some essential building blocks for the implementation of musical complex adaptive systems in Faust programming. It includes a set of time-domain algorithms, some of which are original, for the processing of low-level and high-level information as well as the processing of sound using standard and non-conventional techniques. It also includes functions for the realisation of networks with different topologies, linear and nonlinear mapping strategies to render positive and negative feedback relationships, and different kinds of energy-preserving techniques for the stability of self-oscillating systems.","title":"Edge of Chaos"},{"location":"community/#realfaust","text":"This library contains a set of functions representing domain-limited versions of all Faust primitives and math functions that can potentially generate INF or NaN values. The goal of the library is to be able to implement DSP networks that, structurally, are free from INF and NaN values. Hence, the resulting programs should be rock-solid during real-time performance and virtually immune to crashes regardless of how mercilessly a network is modulated or how unstable a recursive system is made.","title":"realfaust"},{"location":"community/#bitdsp-faust","text":"BitDSP is a set of Faust library functions aimed to help explore and research artistic possibilities of bit-based algorithms. BitDSP currently includes implementations of bit-based functions ranging from simple bit operations over classic delta-sigma modulations to more experimental approaches like cellular automata, recursive Boolean networks, and linear feedback shift registers. A detailed overview of the functionality is in the paper \"Creative use of bit-stream DSP in Faust\" presented at IFC 2020 .","title":"bitDSP-faust"},{"location":"community/#seam-library","text":"Sustained Electro-Acoustic Music is a project inspired by Alvise Vidolin and Nicola Bernardini . The SEAM libraries have been developed for this project.","title":"SEAM library"},{"location":"community/#ambitools-library","text":"Ambitools is an implementation of several Ambisonic tools with the FAUST language. The code is designed to be scalable and flexible, offering tools working at various Ambisonic order and compiled for various architectures. The implementation of the spherical harmonics for an efficient computation is detailed. See the Ambitools : Tools For Sound Field Synthesis With Higher Order Ambisonic - V1.0 paper.","title":"Ambitools library"},{"location":"community/#faust-tap-library","text":"Tap a complicated expression to pull out specific outputs, without having to manually route those outputs, just like how named function parameters remove the need to manually route inputs.","title":"Faust Tap Library"},{"location":"community/#morefilters-library","text":"A Faust library implementing following highpass/lowpass filters using fi.svf : Biquad Butterworth (2nd, 4th, 6th, 8th order) Bessel (2nd, 4th, 6th, 8th order) Linkwitz Riley (4th, 8th, 12th and 16th order)","title":"MoreFilters library"},{"location":"community/#awesome-library","text":"Feel free to contribute by forking this project and creating a pull request , or by mailing the library description here .","title":"Awesome library"},{"location":"community/#additional-dsp-resources","text":"Heres is a list of additional DSP resources.","title":"Additional DSP resources"},{"location":"community/#granulation","text":"","title":"Granulation"},{"location":"community/#a-list-of-projects-related-to-granulation","text":"Dario Sanfilippo Live concatenative granular processing project Mykle Hansen Weather Organ project Jean-Louis Paquelin Granola monophonic granular live feed processor Mayank Sanganeria granulator.dsp project Henrik von Coler material on granulation with Faust code","title":"A list of projects related to granulation:"},{"location":"community/#material-in-the-abclib-library","text":"basic granulator in Faust based on a delay line , with the granulator function spatial granulation in ambisonics in abc_2d_fx_grain_ui and abc_2d_syn_grain_ui functions multichannel granulation in abc_multigrain_ui function","title":"Material in the abclib library"},{"location":"contributing/","text":"Contributing In general, libraries are organised in a stacked manner : the base ones define functions or constants without any dependancies, and additional ones are gradually built on top of simpler ones, layer by layer. Dependency loops must be avoided as much as possible . The resources folder contains tools to build and visualise the libraries dependencies graphs. If you wish to add a function to any of these libraries or if you plan to add a new library, make sure that you observe the following conventions: New Functions All functions must be preceded by a markdown documentation header respecting the following format (open the source code of any of the libraries for an example): //-----------------functionName-------------------- // Description // // #### Usage // // ``` // Usage Example // ``` // // Where: // // * argument1: argument 1 description //------------------------------------------------- Every time a new function is added, the documentation should be updated simply by running make doclib . The environment system (e.g. os.osc ) should be used when calling a function declared in another library (see the section on Library Import ). Try to reuse existing functions as much as possible. The Usage line must show the input/output shape (the number of inputs and outputs) of the function, like gen: _ for a mono generator, _ : filter : _ for a mono effect, etc. Some functions use parameters that are constant numerical expressions . The convention is to label them in capital letters and document them preferably to be constant numerical expressions (or known at compile time in existing libraries). Functions with several parameters should better be written by putting the more constant parameters (like control, setup...) at the beginning of the parameter list, and audio signals to be processed at the end. This allows to do partial-application. So prefer the following clip(low, high, x) = min(max(x, low), high); form where clip(-1, 1) partially applied version can be used later on in different contexts, better than clip(x, low, high) = min(max(x, low), high); version. New Libraries Any new \"standard\" library should be declared in stdfaust.lib with its own environment (2 letters - see stdfaust.lib ). Any new \"standard\" library must be added to generateDoc . Functions must be organized by sections. Any new library should at least declare a name and a version . Any new library has to use a prefix declared in the header section with the following kind of syntax: Its official prefix is 'qu' (look at an existing library to follow the exact syntax). Be sure to add the appropriate kind of ma = library(\"maths.lib\"); import library line, for each external library function used in the new library (for instance ma.foo that would be used somewhre in the code). The comment based markdown documentation of each library must respect the following format (open the source code of any of the libraries for an example): //############### libraryName ################## // Description // // * Section Name 1 // * Section Name 2 // * ... // // It should be used using the `[...]` environment: // // ``` // [...] = library(\"libraryName\"); // process = [...].functionCall; // ``` // // Another option is to import `stdfaust.lib` which already contains the `[...]` // environment: // // ``` // import(\"stdfaust.lib\"); // process = [...].functionCall; // ``` //############################################## //================= Section Name =============== // Description //============================================== Coding Conventions In order to have a uniformized library system, we established the following conventions (that hopefully will be followed by others when making modifications to them). Function Naming [WIP] JOS proposal: using terms used in the field of digital signal processing, as follows: impulse : ...,0,1,0,... pulse : ...,0,1,1,0,... or longer impulse_train pulse_train gate = pulse controlled externally (e.g., by NoteOn,NoteOff) trigger = impulse controlled externally (gate - gate' > 0) == gate rising edge [/WIP] Variable Argument List Strictly speaking, there are no lists in Faust. But list operations can be simulated (in part) using the parallel binary composition operation , and pattern matching. Thus functions expecting a variable number of arguments can use this mechanism, like a foo function that would be used this way: foo((a,b,c,d)) . See fi.iir and fi.fir examples. Documentation All the functions that we want to be \"public\" are documented. We used the faust2md \"standards\" for each library: //### for main title (library name - equivalent to # in markdown), //=== for section declarations (equivalent to ## in markdown) and //--- for function declarations (equivalent to #### in markdown - see basics.lib for an example). Sections in function documentation should be declared as #### markdown title. Each function documentation provides a \"Usage\" section (see basics.lib ). The full documentation can be generated using the doc/Makefile script. Use make help to see all possible commands. If you plan to create a pull-request, do not commit the full generated code but only the modified .lib files. Each function can have declare author \"name\"; , declare copyright \"XXX\"; and declare licence \"YYY\"; declarations. Each library has a declare version \"xx.yy.zz\"; semantic version number to be raised each time a modification is done. The global version number in version.lib also has to be adapted according to the change. Library Import To prevent cross-references between libraries, we generalized the use of the library(\"\") system for function calls in all the libraries. This means that everytime a function declared in another library is called, the environment corresponding to this library needs to be called too. To make things easier, a stdfaust.lib library was created and is imported by all the libraries: aa = library(\"aanl.lib\"); sf = library(\"all.lib\"); an = library(\"analyzers.lib\"); ba = library(\"basics.lib\"); co = library(\"compressors.lib\"); de = library(\"delays.lib\"); dm = library(\"demos.lib\"); dx = library(\"dx7.lib\"); en = library(\"envelopes.lib\"); fd = library(\"fds.lib\"); fi = library(\"filters.lib\"); ho = library(\"hoa.lib\"); it = library(\"interpolators.lib\"); ma = library(\"maths.lib\"); mi = library(\"mi.lib\"); ef = library(\"misceffects.lib\"); os = library(\"oscillators.lib\"); no = library(\"noises.lib\"); pf = library(\"phaflangers.lib\"); pm = library(\"physmodels.lib\"); qu = library(\"quantizers.lib\"); rm = library(\"reducemaps.lib\"); re = library(\"reverbs.lib\"); ro = library(\"routes.lib\"); si = library(\"signals.lib\"); so = library(\"soundfiles.lib\"); sp = library(\"spats.lib\"); sy = library(\"synths.lib\"); ve = library(\"vaeffects.lib\"); vl = library(\"version.lib\"); wa = library(\"webaudio.lib\"); wd = library(\"wdmodels.lib\"); For example, if we wanted to use the smooth function which is now declared in signals.lib , we would do the following: import(\"stdfaust.lib\"); process = si.smooth(0.999); This standard is only used within the libraries: nothing prevents coders to still import signals.lib directly and call smooth without ro. , etc. It means symbols and function names defined within a library have to be unique to not collide with symbols of any other libraries . \"Demo\" Functions \"Demo\" functions are placed in demos.lib and have a built-in user interface (UI). Their name ends with the _demo suffix. Each of these function have a .dsp file associated to them in the /examples folder. Any function containing UI elements should be placed in this library and respect these standards. \"Standard\" Functions \"Standard\" functions are here to simplify the life of new (or not so new) Faust coders. They are declared in /libraries/doc/standardFunctions.md and allow to point programmers to preferred functions to carry out a specific task. For example, there are many different types of lowpass filters declared in filters.lib and only one of them is considered to be standard, etc. Testing the library Before preparing a pull-request, the new library must be carefully tested: all functions defined in the library must be tested by preparing a DSP test program the compatibilty library all.lib imports all libraries in a same namespace, so check functions names collisions using the following test program: import(\"all.lib\"); process = _; Library deployment For GRAME maintainers: regenerate the PDF documentation using make pdf target in the doc folder update the library submodule in faust , recompile and deploy WebAssembly libfaust in fausteditor , faustplayground and faustide update the library submodule in faustlive update the library list in this fausteditor page as well as the snippets (using the faust2atomsnippets tool). update the library list in this faustide page and those files update the library list in the faustgen~ code update the Faust Syntax Highlighting Files make an update PR for vscode-faust project","title":" Contributing "},{"location":"contributing/#contributing","text":"In general, libraries are organised in a stacked manner : the base ones define functions or constants without any dependancies, and additional ones are gradually built on top of simpler ones, layer by layer. Dependency loops must be avoided as much as possible . The resources folder contains tools to build and visualise the libraries dependencies graphs. If you wish to add a function to any of these libraries or if you plan to add a new library, make sure that you observe the following conventions:","title":"Contributing"},{"location":"contributing/#new-functions","text":"All functions must be preceded by a markdown documentation header respecting the following format (open the source code of any of the libraries for an example): //-----------------functionName-------------------- // Description // // #### Usage // // ``` // Usage Example // ``` // // Where: // // * argument1: argument 1 description //------------------------------------------------- Every time a new function is added, the documentation should be updated simply by running make doclib . The environment system (e.g. os.osc ) should be used when calling a function declared in another library (see the section on Library Import ). Try to reuse existing functions as much as possible. The Usage line must show the input/output shape (the number of inputs and outputs) of the function, like gen: _ for a mono generator, _ : filter : _ for a mono effect, etc. Some functions use parameters that are constant numerical expressions . The convention is to label them in capital letters and document them preferably to be constant numerical expressions (or known at compile time in existing libraries). Functions with several parameters should better be written by putting the more constant parameters (like control, setup...) at the beginning of the parameter list, and audio signals to be processed at the end. This allows to do partial-application. So prefer the following clip(low, high, x) = min(max(x, low), high); form where clip(-1, 1) partially applied version can be used later on in different contexts, better than clip(x, low, high) = min(max(x, low), high); version.","title":"New Functions"},{"location":"contributing/#new-libraries","text":"Any new \"standard\" library should be declared in stdfaust.lib with its own environment (2 letters - see stdfaust.lib ). Any new \"standard\" library must be added to generateDoc . Functions must be organized by sections. Any new library should at least declare a name and a version . Any new library has to use a prefix declared in the header section with the following kind of syntax: Its official prefix is 'qu' (look at an existing library to follow the exact syntax). Be sure to add the appropriate kind of ma = library(\"maths.lib\"); import library line, for each external library function used in the new library (for instance ma.foo that would be used somewhre in the code). The comment based markdown documentation of each library must respect the following format (open the source code of any of the libraries for an example): //############### libraryName ################## // Description // // * Section Name 1 // * Section Name 2 // * ... // // It should be used using the `[...]` environment: // // ``` // [...] = library(\"libraryName\"); // process = [...].functionCall; // ``` // // Another option is to import `stdfaust.lib` which already contains the `[...]` // environment: // // ``` // import(\"stdfaust.lib\"); // process = [...].functionCall; // ``` //############################################## //================= Section Name =============== // Description //==============================================","title":"New Libraries"},{"location":"contributing/#coding-conventions","text":"In order to have a uniformized library system, we established the following conventions (that hopefully will be followed by others when making modifications to them).","title":"Coding Conventions"},{"location":"contributing/#function-naming","text":"[WIP] JOS proposal: using terms used in the field of digital signal processing, as follows: impulse : ...,0,1,0,... pulse : ...,0,1,1,0,... or longer impulse_train pulse_train gate = pulse controlled externally (e.g., by NoteOn,NoteOff) trigger = impulse controlled externally (gate - gate' > 0) == gate rising edge [/WIP]","title":"Function Naming"},{"location":"contributing/#variable-argument-list","text":"Strictly speaking, there are no lists in Faust. But list operations can be simulated (in part) using the parallel binary composition operation , and pattern matching. Thus functions expecting a variable number of arguments can use this mechanism, like a foo function that would be used this way: foo((a,b,c,d)) . See fi.iir and fi.fir examples.","title":"Variable Argument List"},{"location":"contributing/#documentation","text":"All the functions that we want to be \"public\" are documented. We used the faust2md \"standards\" for each library: //### for main title (library name - equivalent to # in markdown), //=== for section declarations (equivalent to ## in markdown) and //--- for function declarations (equivalent to #### in markdown - see basics.lib for an example). Sections in function documentation should be declared as #### markdown title. Each function documentation provides a \"Usage\" section (see basics.lib ). The full documentation can be generated using the doc/Makefile script. Use make help to see all possible commands. If you plan to create a pull-request, do not commit the full generated code but only the modified .lib files. Each function can have declare author \"name\"; , declare copyright \"XXX\"; and declare licence \"YYY\"; declarations. Each library has a declare version \"xx.yy.zz\"; semantic version number to be raised each time a modification is done. The global version number in version.lib also has to be adapted according to the change.","title":"Documentation"},{"location":"contributing/#library-import","text":"To prevent cross-references between libraries, we generalized the use of the library(\"\") system for function calls in all the libraries. This means that everytime a function declared in another library is called, the environment corresponding to this library needs to be called too. To make things easier, a stdfaust.lib library was created and is imported by all the libraries: aa = library(\"aanl.lib\"); sf = library(\"all.lib\"); an = library(\"analyzers.lib\"); ba = library(\"basics.lib\"); co = library(\"compressors.lib\"); de = library(\"delays.lib\"); dm = library(\"demos.lib\"); dx = library(\"dx7.lib\"); en = library(\"envelopes.lib\"); fd = library(\"fds.lib\"); fi = library(\"filters.lib\"); ho = library(\"hoa.lib\"); it = library(\"interpolators.lib\"); ma = library(\"maths.lib\"); mi = library(\"mi.lib\"); ef = library(\"misceffects.lib\"); os = library(\"oscillators.lib\"); no = library(\"noises.lib\"); pf = library(\"phaflangers.lib\"); pm = library(\"physmodels.lib\"); qu = library(\"quantizers.lib\"); rm = library(\"reducemaps.lib\"); re = library(\"reverbs.lib\"); ro = library(\"routes.lib\"); si = library(\"signals.lib\"); so = library(\"soundfiles.lib\"); sp = library(\"spats.lib\"); sy = library(\"synths.lib\"); ve = library(\"vaeffects.lib\"); vl = library(\"version.lib\"); wa = library(\"webaudio.lib\"); wd = library(\"wdmodels.lib\"); For example, if we wanted to use the smooth function which is now declared in signals.lib , we would do the following: import(\"stdfaust.lib\"); process = si.smooth(0.999); This standard is only used within the libraries: nothing prevents coders to still import signals.lib directly and call smooth without ro. , etc. It means symbols and function names defined within a library have to be unique to not collide with symbols of any other libraries .","title":"Library Import"},{"location":"contributing/#demo-functions","text":"\"Demo\" functions are placed in demos.lib and have a built-in user interface (UI). Their name ends with the _demo suffix. Each of these function have a .dsp file associated to them in the /examples folder. Any function containing UI elements should be placed in this library and respect these standards.","title":"\"Demo\" Functions"},{"location":"contributing/#standard-functions","text":"\"Standard\" functions are here to simplify the life of new (or not so new) Faust coders. They are declared in /libraries/doc/standardFunctions.md and allow to point programmers to preferred functions to carry out a specific task. For example, there are many different types of lowpass filters declared in filters.lib and only one of them is considered to be standard, etc.","title":"\"Standard\" Functions"},{"location":"contributing/#testing-the-library","text":"Before preparing a pull-request, the new library must be carefully tested: all functions defined in the library must be tested by preparing a DSP test program the compatibilty library all.lib imports all libraries in a same namespace, so check functions names collisions using the following test program: import(\"all.lib\"); process = _;","title":"Testing the library"},{"location":"contributing/#library-deployment","text":"For GRAME maintainers: regenerate the PDF documentation using make pdf target in the doc folder update the library submodule in faust , recompile and deploy WebAssembly libfaust in fausteditor , faustplayground and faustide update the library submodule in faustlive update the library list in this fausteditor page as well as the snippets (using the faust2atomsnippets tool). update the library list in this faustide page and those files update the library list in the faustgen~ code update the Faust Syntax Highlighting Files make an update PR for vscode-faust project","title":"Library deployment"},{"location":"organization/","text":"General Organization Only the libraries that are considered to be \"standard\" are documented: aanl.lib analyzers.lib basics.lib compressors.lib delays.lib demos.lib dx7.lib envelopes.lib fds.lib filters.lib hoa.lib interpolators.lib maths.lib mi.lib misceffects.lib oscillators.lib noises.lib phaflangers.lib physmodels.lib reducemaps.lib reverbs.lib routes.lib signals.lib soundfiles.lib spats.lib synths.lib tonestacks.lib (not documented but example in /examples/misc ) tubes.lib (not documented but example in /examples/misc ) vaeffects.lib version.lib wdmodels.lib webaudio.lib Other deprecated libraries such as music.lib , etc. are present but are not documented to not confuse new users. The documentation of each library can be found in /documentation/library.html or in /documentation/library.pdf . Versioning A global version number for the standard libraries is defined in version.lib . It follows the semantic versioning structure: MAJOR, MINOR, PATCH. The MAJOR number is increased when we make incompatible changes. The MINOR number is increased when we add functionality in a backwards compatible manner, and the PATCH number when we make backwards compatible bug fixes. By looking at the generated code or the diagram of process = vl.version; one can see the current version of the libraries. Examples The Faust distribution /examples directory contains a lot of DSP examples. They are organized by types in different folders. The /examples/old folder contains examples that are fully deprecated, probably because they were integrated to the libraries and fully rewritten (see freeverb.dsp for example). Examples using deprecated libraries were integrated to the general tree, but a warning comment was added at their beginning to point readers to the right library and function.","title":" Organization "},{"location":"organization/#general-organization","text":"Only the libraries that are considered to be \"standard\" are documented: aanl.lib analyzers.lib basics.lib compressors.lib delays.lib demos.lib dx7.lib envelopes.lib fds.lib filters.lib hoa.lib interpolators.lib maths.lib mi.lib misceffects.lib oscillators.lib noises.lib phaflangers.lib physmodels.lib reducemaps.lib reverbs.lib routes.lib signals.lib soundfiles.lib spats.lib synths.lib tonestacks.lib (not documented but example in /examples/misc ) tubes.lib (not documented but example in /examples/misc ) vaeffects.lib version.lib wdmodels.lib webaudio.lib Other deprecated libraries such as music.lib , etc. are present but are not documented to not confuse new users. The documentation of each library can be found in /documentation/library.html or in /documentation/library.pdf .","title":"General Organization"},{"location":"organization/#versioning","text":"A global version number for the standard libraries is defined in version.lib . It follows the semantic versioning structure: MAJOR, MINOR, PATCH. The MAJOR number is increased when we make incompatible changes. The MINOR number is increased when we add functionality in a backwards compatible manner, and the PATCH number when we make backwards compatible bug fixes. By looking at the generated code or the diagram of process = vl.version; one can see the current version of the libraries.","title":"Versioning"},{"location":"organization/#examples","text":"The Faust distribution /examples directory contains a lot of DSP examples. They are organized by types in different folders. The /examples/old folder contains examples that are fully deprecated, probably because they were integrated to the libraries and fully rewritten (see freeverb.dsp for example). Examples using deprecated libraries were integrated to the general tree, but a warning comment was added at their beginning to point readers to the right library and function.","title":"Examples"},{"location":"standardFunctions/","text":"Standard Functions Dozens of functions are implemented in the Faust libraries and many of them are very specialized and not useful to beginners or to people who only need to use Faust for basic applications. This section offers an index organized by categories of the \"standard Faust functions\" (basic filters, effects, synthesizers, etc.). This index only contains functions without a user interface (UI). Faust functions with a built-in UI can be found in demos.lib . Analysis Tools Function Type Function Name Description Amplitude Follower an. amp_follower Classic analog audio envelope follower Octave Analyzers an. mth_octave_analyzer[N] Octave analyzers Basic Elements Function Type Function Name Description Beats ba. beat Pulses at a specific tempo Block si. block Terminate n signals Break Point Function ba. bpf Beak Point Function (BPF) Bus si. bus Bus of n signals Bypass (Mono) ba. bypass1 Mono bypass Bypass (Stereo) ba. bypass2 Stereo bypass Count Elements ba. count Count elements in a list Count Down ba. countdown Samples count down Count Up ba. countup Samples count up Delay (Integer) de. delay Integer delay Delay (Float) de. fdelay Fractional delay Down Sample ba. downSample Down sample a signal Impulsify ba. impulsify Turns a signal into an impulse Sample and Hold ba. sAndH Sample and hold Signal Crossing ro. cross Cross n signals Smoother (Default) si. smoo Exponential smoothing Smoother si. smooth Exponential smoothing with controllable pole Take Element ba. take Take en element from a list Time ba. time A simple timer Conversion Function Type Function Name Description dB to Linear ba. db2linear Converts dB to linear values Linear to dB ba. linear2db Converts linear values to dB MIDI Key to Hz ba. midikey2hz Converts a MIDI key number into a frequency Hz to MIDI Key ba. hz2midikey Converts a frequency into MIDI key number Pole to T60 ba. pole2tau Converts a pole into a time constant (t60) T60 to Pole ba. tau2pole Converts a time constant (t60) into a pole Samples to Seconds ba. samp2sec Converts samples to seconds Seconds to Samples ba. sec2samp Converts seconds to samples Semitones to Frequency ratio ba. semi2ratio Converts semitones in a frequency multiplicative ratio Frequency ratio to semintones ba. ratio2semi Converts a frequency multiplicative ratio in semitones Effects Function Type Function Name Description Auto Wah ve. autowah Auto-Wah effect Compressor co. compressor_mono Dynamic range compressor Distortion ef. cubicnl Cubic nonlinearity distortion Crybaby ve. crybaby Crybaby wah pedal Echo ef. echo Simple echo Flanger pf. flanger_stereo Flanging effect Gate ef. gate_mono Mono signal gate Limiter co. limiter_1176_R4_mono Limiter Phaser pf. phaser2_stereo Phaser effect Reverb (FDN) re. fdnrev0 Feedback delay network reverberator Reverb (Freeverb) re. mono_freeverb Most \"famous\" Schroeder reverberator Reverb (Simple) re. jcrev Simple Schroeder reverberator Reverb (Zita) re. zita_rev1_stereo High quality FDN reverberator Panner sp. panner Linear stereo panner Pitch Shift ef. transpose Simple pitch shifter Panner sp. spat N outputs spatializer Speaker Simulator ef. speakerbp Simple speaker simulator Stereo Width ef. stereo_width Stereo width effect Vocoder ve. vocoder Simple vocoder Wah ve. wah4 Wah effect Envelope Generators Function Type Function Name Description ADSR en. adsr Attack/Decay/Sustain/Release envelope generator AR en. ar Attack/Release envelope generator ASR en. asr Attack/Sustain/Release envelope generator Exponential en. smoothEnvelope Exponential envelope generator Filters Function Type Function Name Description Bandpass (Butterworth) fi. bandpass Generic butterworth bandpass Bandpass (Resonant) fi. resonbp Virtual analog resonant bandpass Bandstop (Butterworth) fi. bandstop Generic butterworth bandstop Biquad fi. tf2 \"Standard\" biquad filter Comb (Allpass) fi. allpass_fcomb Schroeder allpass comb filter Comb (Feedback) fi. fb_fcomb Feedback comb filter Comb (Feedforward) fi. ff_fcomb Feed-forward comb filter. DC Blocker fi. dcblocker Default dc blocker Filterbank fi. filterbank Generic filter bank FIR (Arbitrary Order) fi. fir Nth-order FIR filter High Shelf fi. high_shelf High shelf Highpass (Butterworth) fi. highpass Nth-order Butterworth highpass Highpass (Resonant) fi. resonhp Virtual analog resonant highpass IIR (Arbitrary Order) fi. iir Nth-order IIR filter Level Filter fi. levelfilter Dynamic level lowpass Low Shelf fi. low_shelf Low shelf Lowpass (Butterworth) fi. lowpass Nth-order Butterworth lowpass Lowpass (Resonant) fi. resonlp Virtual analog resonant lowpass Notch Filter fi. notchw Simple notch filter Peak Equalizer fi. peak_eq Peaking equalizer section Oscillators/Sound Generators Function Type Function Name Description Impulse os. impulse Generate an impulse on start-up Impulse Train os. imptrain Band-limited impulse train Phasor os. phasor Simple phasor Pink Noise no. pink_noise Pink noise generator Pulse Train os. pulsetrain Band-limited pulse train Pulse Train (Low Frequency) os. lf_imptrain Low-frequency pulse train Sawtooth os. sawtooth Band-limited sawtooth wave Sawtooth (Low Frequency) os. lf_saw Low-frequency sawtooth wave Sine (Filter-Based) os. oscs Sine oscillator (filter-based) Sine (Table-Based) os. osc Sine oscillator (table-based) Square os. square Band-limited square wave Square (Low Frequency) os. lf_squarewave Low-frequency square wave Triangle os. triangle Band-limited triangle wave Triangle (Low Frequency) os. lf_triangle Low-frequency triangle wave White Noise no. noise White noise generator Synths Function Type Function Name Description Additive Drum sy. additiveDrum Additive synthesis drum Bandpassed Sawtooth sy. dubDub Sawtooth through resonant bandpass Comb String sy. combString String model based on a comb filter FM sy. fm Frequency modulation synthesizer Lowpassed Sawtooth sy. sawTrombone \"Trombone\" based on a filtered sawtooth Popping Filter sy. popFilterPerc Popping filter percussion instrument (function() { $('div.table-begin').nextUntil('div.table-end', 'table').addClass('table table-bordered'); })();","title":" Standard Functions "},{"location":"standardFunctions/#standard-functions","text":"Dozens of functions are implemented in the Faust libraries and many of them are very specialized and not useful to beginners or to people who only need to use Faust for basic applications. This section offers an index organized by categories of the \"standard Faust functions\" (basic filters, effects, synthesizers, etc.). This index only contains functions without a user interface (UI). Faust functions with a built-in UI can be found in demos.lib .","title":"Standard Functions"},{"location":"standardFunctions/#analysis-tools","text":"Function Type Function Name Description Amplitude Follower an. amp_follower Classic analog audio envelope follower Octave Analyzers an. mth_octave_analyzer[N] Octave analyzers","title":"Analysis Tools"},{"location":"standardFunctions/#basic-elements","text":"Function Type Function Name Description Beats ba. beat Pulses at a specific tempo Block si. block Terminate n signals Break Point Function ba. bpf Beak Point Function (BPF) Bus si. bus Bus of n signals Bypass (Mono) ba. bypass1 Mono bypass Bypass (Stereo) ba. bypass2 Stereo bypass Count Elements ba. count Count elements in a list Count Down ba. countdown Samples count down Count Up ba. countup Samples count up Delay (Integer) de. delay Integer delay Delay (Float) de. fdelay Fractional delay Down Sample ba. downSample Down sample a signal Impulsify ba. impulsify Turns a signal into an impulse Sample and Hold ba. sAndH Sample and hold Signal Crossing ro. cross Cross n signals Smoother (Default) si. smoo Exponential smoothing Smoother si. smooth Exponential smoothing with controllable pole Take Element ba. take Take en element from a list Time ba. time A simple timer","title":"Basic Elements"},{"location":"standardFunctions/#conversion","text":"Function Type Function Name Description dB to Linear ba. db2linear Converts dB to linear values Linear to dB ba. linear2db Converts linear values to dB MIDI Key to Hz ba. midikey2hz Converts a MIDI key number into a frequency Hz to MIDI Key ba. hz2midikey Converts a frequency into MIDI key number Pole to T60 ba. pole2tau Converts a pole into a time constant (t60) T60 to Pole ba. tau2pole Converts a time constant (t60) into a pole Samples to Seconds ba. samp2sec Converts samples to seconds Seconds to Samples ba. sec2samp Converts seconds to samples Semitones to Frequency ratio ba. semi2ratio Converts semitones in a frequency multiplicative ratio Frequency ratio to semintones ba. ratio2semi Converts a frequency multiplicative ratio in semitones","title":"Conversion"},{"location":"standardFunctions/#effects","text":"Function Type Function Name Description Auto Wah ve. autowah Auto-Wah effect Compressor co. compressor_mono Dynamic range compressor Distortion ef. cubicnl Cubic nonlinearity distortion Crybaby ve. crybaby Crybaby wah pedal Echo ef. echo Simple echo Flanger pf. flanger_stereo Flanging effect Gate ef. gate_mono Mono signal gate Limiter co. limiter_1176_R4_mono Limiter Phaser pf. phaser2_stereo Phaser effect Reverb (FDN) re. fdnrev0 Feedback delay network reverberator Reverb (Freeverb) re. mono_freeverb Most \"famous\" Schroeder reverberator Reverb (Simple) re. jcrev Simple Schroeder reverberator Reverb (Zita) re. zita_rev1_stereo High quality FDN reverberator Panner sp. panner Linear stereo panner Pitch Shift ef. transpose Simple pitch shifter Panner sp. spat N outputs spatializer Speaker Simulator ef. speakerbp Simple speaker simulator Stereo Width ef. stereo_width Stereo width effect Vocoder ve. vocoder Simple vocoder Wah ve. wah4 Wah effect","title":"Effects"},{"location":"standardFunctions/#envelope-generators","text":"Function Type Function Name Description ADSR en. adsr Attack/Decay/Sustain/Release envelope generator AR en. ar Attack/Release envelope generator ASR en. asr Attack/Sustain/Release envelope generator Exponential en. smoothEnvelope Exponential envelope generator","title":"Envelope Generators"},{"location":"standardFunctions/#filters","text":"Function Type Function Name Description Bandpass (Butterworth) fi. bandpass Generic butterworth bandpass Bandpass (Resonant) fi. resonbp Virtual analog resonant bandpass Bandstop (Butterworth) fi. bandstop Generic butterworth bandstop Biquad fi. tf2 \"Standard\" biquad filter Comb (Allpass) fi. allpass_fcomb Schroeder allpass comb filter Comb (Feedback) fi. fb_fcomb Feedback comb filter Comb (Feedforward) fi. ff_fcomb Feed-forward comb filter. DC Blocker fi. dcblocker Default dc blocker Filterbank fi. filterbank Generic filter bank FIR (Arbitrary Order) fi. fir Nth-order FIR filter High Shelf fi. high_shelf High shelf Highpass (Butterworth) fi. highpass Nth-order Butterworth highpass Highpass (Resonant) fi. resonhp Virtual analog resonant highpass IIR (Arbitrary Order) fi. iir Nth-order IIR filter Level Filter fi. levelfilter Dynamic level lowpass Low Shelf fi. low_shelf Low shelf Lowpass (Butterworth) fi. lowpass Nth-order Butterworth lowpass Lowpass (Resonant) fi. resonlp Virtual analog resonant lowpass Notch Filter fi. notchw Simple notch filter Peak Equalizer fi. peak_eq Peaking equalizer section","title":"Filters"},{"location":"standardFunctions/#oscillatorssound-generators","text":"Function Type Function Name Description Impulse os. impulse Generate an impulse on start-up Impulse Train os. imptrain Band-limited impulse train Phasor os. phasor Simple phasor Pink Noise no. pink_noise Pink noise generator Pulse Train os. pulsetrain Band-limited pulse train Pulse Train (Low Frequency) os. lf_imptrain Low-frequency pulse train Sawtooth os. sawtooth Band-limited sawtooth wave Sawtooth (Low Frequency) os. lf_saw Low-frequency sawtooth wave Sine (Filter-Based) os. oscs Sine oscillator (filter-based) Sine (Table-Based) os. osc Sine oscillator (table-based) Square os. square Band-limited square wave Square (Low Frequency) os. lf_squarewave Low-frequency square wave Triangle os. triangle Band-limited triangle wave Triangle (Low Frequency) os. lf_triangle Low-frequency triangle wave White Noise no. noise White noise generator","title":"Oscillators/Sound Generators"},{"location":"standardFunctions/#synths","text":"Function Type Function Name Description Additive Drum sy. additiveDrum Additive synthesis drum Bandpassed Sawtooth sy. dubDub Sawtooth through resonant bandpass Comb String sy. combString String model based on a comb filter FM sy. fm Frequency modulation synthesizer Lowpassed Sawtooth sy. sawTrombone \"Trombone\" based on a filtered sawtooth Popping Filter sy. popFilterPerc Popping filter percussion instrument (function() { $('div.table-begin').nextUntil('div.table-end', 'table').addClass('table table-bordered'); })();","title":"Synths"},{"location":"libs/","text":"Faust Libraries Index aanl (aa.)clip (aa.)Rsqrt (aa.)Rlog (aa.)Rtan (aa.)Racos (aa.)Rasin (aa.)Racosh (aa.)Rcosh (aa.)Rsinh (aa.)Ratanh (aa.)ADAA1 (aa.)ADAA2 (aa.)hardclip (aa.)hardclip2 (aa.)cubic1 (aa.)parabolic (aa.)parabolic2 (aa.)hyperbolic (aa.)hyperbolic2 (aa.)sinarctan (aa.)sinarctan2 (aa.)tanh1 (aa.)arctan (aa.)arctan2 (aa.)asinh1 (aa.)asinh2 (aa.)cosine1 (aa.)cosine2 (aa.)arccos (aa.)arccos2 (aa.)acosh1 (aa.)acosh2 (aa.)sine (aa.)sine2 (aa.)arcsin (aa.)arcsin2 (aa.)tangent (aa.)atanh1 (aa.)atanh2 analyzers (an.)abs_envelope_rect (an.)abs_envelope_tau (an.)abs_envelope_t60 (an.)abs_envelope_t19 (an.)amp_follower (an.)amp_follower_ud (an.)amp_follower_ar (an.)ms_envelope_rect (an.)ms_envelope_tau (an.)ms_envelope_t60 (an.)ms_envelope_t19 (an.)rms_envelope_rect (an.)rms_envelope_tau (an.)rms_envelope_t60 (an.)rms_envelope_t19 (an.)zcr (an.)pitchTracker (an.)spectralCentroid (an.)mth_octave_analyzer (an.)mth_octave_spectral_level6e (an.)[third|half] octave [analyzer|filterbank] (an.)analyzer (an.)goertzelOpt (an.)goertzelComp (an.)goertzel (an.)fft (an.)ifft basics (ba.)samp2sec (ba.)sec2samp (ba.)db2linear (ba.)linear2db (ba.)lin2LogGain (ba.)log2LinGain (ba.)tau2pole (ba.)pole2tau (ba.)midikey2hz (ba.)hz2midikey (ba.)semi2ratio (ba.)ratio2semi (ba.)cent2ratio (ba.)ratio2cent (ba.)pianokey2hz (ba.)hz2pianokey (ba.)counter (ba.)countdown (ba.)countup (ba.)sweep (ba.)time (ba.)ramp (ba.)line (ba.)tempo (ba.)period (ba.)pulse (ba.)pulsen (ba.)cycle (ba.)beat (ba.)pulse_countup (ba.)pulse_countdown (ba.)pulse_countup_loop (ba.)pulse_countdown_loop (ba.)resetCtr (ba.)count (ba.)take (ba.)subseq (ba.)tabulate (ba.)tabulate_chebychev (ba.)tabulateNd (ba.)if (ba.)ifNc (ba.)ifNcNo (ba.)selector (ba.)select2stereo (ba.)selectn (ba.)selectmulti (ba.)selectoutn (ba.)latch (ba.)sAndH (ba.)downSample (ba.)peakhold (ba.)peakholder (ba.)impulsify (ba.)automat (ba.)bpf (ba.)listInterp (ba.)bypass1 (ba.)bypass2 (ba.)bypass1to2 (ba.)bypass_fade (ba.)toggle (ba.)on_and_off (ba.)bitcrusher (ba.)slidingReduce (ba.)slidingSum (ba.)slidingSump (ba.)slidingMax (ba.)slidingMin (ba.)slidingMean (ba.)slidingMeanp (ba.)slidingRMS (ba.)slidingRMSp (ba.)parallelOp (ba.)parallelMax (ba.)parallelMin (ba.)parallelMean (ba.)parallelRMS compressors (co.)peak_compression_gain_mono_db (co.)peak_compression_gain_N_chan_db (co.)FFcompressor_N_chan (co.)FBcompressor_N_chan (co.)FBFFcompressor_N_chan (co.)RMS_compression_gain_mono_db (co.)RMS_compression_gain_N_chan_db (co.)RMS_FBFFcompressor_N_chan (co.)RMS_FBcompressor_peak_limiter_N_chan (co.)peak_compression_gain_mono (co.)peak_compression_gain_N_chan (co.)RMS_compression_gain_mono (co.)RMS_compression_gain_N_chan (co.)compressor_lad_mono (co.)compressor_mono (co.)compressor_stereo (co.)compression_gain_mono (co.)limiter_1176_R4_mono (co.)limiter_1176_R4_stereo (co.)peak_expansion_gain_N_chan_db (co.)expander_N_chan (co.)expanderSC_N_chan (co.)limiter_lad_N (co.)limiter_lad_mono (co.)limiter_lad_stereo (co.)limiter_lad_quad (co.)limiter_lad_bw delays (de.)delay (de.)fdelay (de.)sdelay (de.)fdelaylti and (de.)fdelayltv (de.)fdelay[N] (de.)fdelay[N]a demos (dm.)mth_octave_spectral_level_demo (dm.)parametric_eq_demo (dm.)spectral_tilt_demo (dm.)mth_octave_filterbank_demo and (dm.)filterbank_demo (dm.)cubicnl_demo (dm.)gate_demo (dm.)compressor_demo (dm.)moog_vcf_demo (dm.)wah4_demo (dm.)crybaby_demo (dm.)flanger_demo (dm.)phaser2_demo (dm.)freeverb_demo (dm.)stereo_reverb_tester (dm.)fdnrev0_demo (dm.)zita_rev_fdn_demo (dm.)zita_light (dm.)zita_rev1 (dm.)dattorro_rev_demo (dm.)jprev_demo (dm.)greyhole_demo (dm.)sawtooth_demo (dm.)virtual_analog_oscillator_demo (dm.)oscrs_demo (dm.)velvet_noise_demo (dm.)latch_demo (dm.)envelopes_demo (dm.)fft_spectral_level_demo (dm.)reverse_echo_demo(nChans) (dm.)pospass_demo (dm.)exciter (dm.)vocoder_demo (dm.)colored_noise_demo dx7 (dx.)dx7_ampf (dx.)dx7_egraterisef (dx.)dx7_egraterisepercf (dx.)dx7_egratedecayf (dx.)dx7_egratedecaypercf (dx.)dx7_eglv2peakf (dx.)dx7_velsensf (dx.)dx7_fdbkscalef (dx.)dx7_op (dx.)dx7_algo (dx.)dx7_ui envelopes (en.)ar (en.)asr (en.)adsr (en.)smoothEnvelope (en.)arfe (en.)are (en.)asre (en.)adsre (en.)ahdsre (en.)dx7envelope fds (fd.)model1D (fd.)model2D (fd.)stairsInterp1D (fd.)stairsInterp2D (fd.)linInterp1D (fd.)linInterp2D (fd.)stairsInterp1DOut (fd.)stairsInterp2DOut (fd.)linInterp1DOut (fd.)stairsInterp2DOut (fd.)route1D (fd.)route2D (fd.)schemePoint (fd.)buildScheme1D (fd.)buildScheme2D (fd.)hammer (fd.)bow filters (fi.)zero (fi.)pole (fi.)integrator (fi.)dcblockerat (fi.)dcblocker (fi.)lptN (fi.)ff_comb (fi.)ff_fcomb (fi.)ffcombfilter (fi.)fb_comb (fi.)fb_fcomb (fi.)rev1 (fi.)fbcombfilter and (fi.)ffbcombfilter (fi.)allpass_comb (fi.)allpass_fcomb (fi.)rev2 (fi.)allpass_fcomb5 and (fi.)allpass_fcomb1a (fi.)iir (fi.)fir (fi.)conv and (fi.)convN (fi.)tf1, (fi.)tf2 and (fi.)tf3 (fi.)notchw (fi.)tf21, (fi.)tf22, (fi.)tf22t and (fi.)tf21t (fi.)av2sv (fi.)bvav2nuv (fi.)iir_lat2 (fi.)allpassnt (fi.)iir_kl (fi.)allpassnklt (fi.)iir_lat1 (fi.)allpassn1mt (fi.)iir_nl (fi.)allpassnnlt (fi.)tf2np (fi.)wgr (fi.)nlf2 (fi.)apnl (fi.)allpassn (fi.)allpassnn (fi.)allpassnkl (fi.)allpass1m (fi.)tf2s and (fi.)tf2snp (fi.)tf1snp (fi.)tf3slf (fi.)tf1s (fi.)tf2sb (fi.)tf1sb (fi.)resonlp (fi.)resonhp (fi.)resonbp (fi.)lowpass (fi.)highpass (fi.)lowpass0_highpass1 (fi.)lowpass_plus|minus_highpass (fi.)lowpass3e (fi.)lowpass6e (fi.)highpass3e (fi.)highpass6e (fi.)bandpass (fi.)bandstop (fi.)bandpass6e (fi.)bandpass12e (fi.)pospass (fi.)low_shelf (fi.)high_shelf (fi.)peak_eq (fi.)peak_eq_cq (fi.)peak_eq_rm (fi.)spectral_tilt (fi.)levelfilter (fi.)levelfilterN (fi.)mth_octave_filterbank[n] (fi.)filterbank (fi.)filterbanki (fi.)svf (fi.)lowpassLR4 (fi.)highpassLR4 (fi.)crossover2LR4 (fi.)crossover3LR4 (fi.)crossover4LR4 (fi.)crossover8LR4 (fi.)itu_r_bs_1770_4_kfilter (fi.)avg_rect (fi.)avg_tau (fi.)avg_t60 (fi.)avg_t19 hoa (ho.)encoder (ho.)rEncoder (ho.)stereoEncoder (ho.)multiEncoder (ho.)decoder (ho.)decoderStereo (ho.)iBasicDecoder (ho.)circularScaledVBAP (ho.)imlsDecoder (ho.)iDecoder (ho.)optimBasic (ho.)optimMaxRe (ho.)optimInPhase (ho.)optim (ho.)wider (ho.)mirror (ho.)map (ho.)rotate (ho.)scope (ho.).fxDecorrelation (ho.).synDecorrelation (ho.).fxRingMod (ho.).synRingMod (ho.)encoder3D (ho.)rEncoder3D (ho.)optimBasic3D (ho.)optimMaxRe3D (ho.)optimInPhase3D (ho.)optim3D interpolators (it.)interpolate_linear (it.)interpolate_cosine (it.)interpolate_cubic (it.)interpolator_two_points (it.)interpolator_linear (it.)interpolator_cosine (it.)interpolator_four_points (it.)interpolator_cubic (it.)interpolator_select (it.)lagrangeCoeffs(N, xCoordsList) (it.)lagrangeInterpolation(N, xCoordsList) (it.)frdtable(N, S) (it.)frwtable(N, S) (it.)remap maths (ma.)SR (ma.)T (ma.)BS (ma.)PI (ma.)deg2rad (ma.)rad2deg (ma.)E (ma.)EPSILON (ma.)MIN (ma.)MAX (ma.)FTZ (ma.)copysign (ma.)neg (ma.)sub(x,y) (ma.)inv (ma.)cbrt (ma.)hypot (ma.)ldexp (ma.)scalb (ma.)log1p (ma.)logb (ma.)ilogb (ma.)log2 (ma.)expm1 (ma.)acosh (ma.)asinh (ma.)atanh (ma.)sinh (ma.)cosh (ma.)tanh (ma.)erf (ma.)erfc (ma.)gamma (ma.)lgamma (ma.)J0 (ma.)J1 (ma.)Jn (ma.)Y0 (ma.)Y1 (ma.)Yn (ma.)fabs, (ma.)fmax, (ma.)fmin (ma.)np2 (ma.)frac (ma.)modulo (ma.)isnan (ma.)isinf (ma.)chebychev (ma.)chebychevpoly (ma.)diffn (ma.)signum (ma.)nextpow2 (ma.)zc mi (mi.)initState (mi.)mass (mi.)oscil (mi.)ground (mi.)posInput (mi.)spring (mi.)damper (mi.)springDamper (mi.)nlSpringDamper2 (mi.)nlSpringDamper3 (mi.)nlSpringDamperClipped (mi.)nlPluck (mi.)nlBow (mi.)collision (mi.)nlCollisionClipped misceffects (ef.)cubicnl (ef.)gate_mono (ef.)gate_stereo (ef.)speakerbp (ef.)piano_dispersion_filter (ef.)stereo_width (ef.)mesh_square (ef.)reverseEchoN(nChans,delay) (ef.)reverseDelayRamped(delay,phase) (ef.)uniformPanToStereo(nChans) (ef.)dryWetMixer (ef.)dryWetMixerConstantPower (ef.)echo (ef.)transpose (ef.)softclipQuadratic (ef.)wavefold oscillators (os.)sinwaveform (os.)coswaveform (os.)phasor (os.)hs_phasor (os.)hsp_phasor (os.)oscsin (os.)hs_oscsin (os.)osccos (os.)hs_osccos (os.)oscp (os.)osci (os.)osc (os.)m_oscsin (os.)m_osccos (os.)lf_imptrain (os.)lf_pulsetrainpos (os.)lf_pulsetrain (os.)lf_squarewavepos (os.)lf_squarewave (os.)lf_trianglepos (os.)lf_triangle (os.)lf_rawsaw (os.)lf_sawpos (os.)lf_sawpos_phase (os.)lf_sawpos_reset (os.)lf_sawpos_phase_reset (os.)lf_saw (os.)sawN (os.)sawNp (os.)saw2, (os.)saw3, (os.)saw4 (os.)saw2ptr (os.)saw2dpw (os.)sawtooth (os.)saw2f2, (os.)saw2f4 (os.)impulse (os.)pulsetrainN (os.)pulsetrain (os.)squareN (os.)square (os.)imptrainN (os.)imptrain (os.)triangleN (os.)triangle (os.)oscb (os.)oscrq (os.)oscrs (os.)oscrc (os.)oscs (os.)quadosc (os.)oscwc (os.)oscws (os.)oscq (os.)oscw (os.)CZsaw (os.)CZsawP (os.)CZsquare (os.)CZsquareP (os.)CZpulse (os.)CZpulseP (os.)CZsinePulse (os.)CZsinePulseP (os.)CZhalfSine (os.)CZhalfSineP (os.)CZresSaw (os.)CZresTriangle (os.)CZresTrap (os.)polyblep (os.)polyblep_saw (os.)polyblep_square (os.)polyblep_triangle noises (no.)noise (no.)multirandom (no.)multinoise (no.)noises (no.)randomseed (no.)rnoise (no.)rmultirandom (no.)rmultinoise (no.)rnoises (no.)pink_noise (no.)pink_noise_vm (no.)lfnoise, (no.)lfnoise0 and (no.)lfnoiseN (no.)sparse_noise (no.)velvet_noise_vm (no.)gnoise (no.)colored_noise phaflangers (pf.)flanger_mono (pf.)flanger_stereo (pf.)phaser2_mono (pf.)phaser2_stereo physmodels (pm.)speedOfSound (pm.)maxLength (pm.)f2l (pm.)l2f (pm.)l2s (pm.)basicBlock (pm.)chain (pm.)inLeftWave (pm.)inRightWave (pm.)in (pm.)outLeftWave (pm.)outRightWave (pm.)out (pm.)terminations (pm.)lTermination (pm.)rTermination (pm.)closeIns (pm.)closeOuts (pm.)endChain (pm.)waveguideN (pm.)waveguide (pm.)bridgeFilter (pm.)modeFilter (pm.)stringSegment (pm.)openString (pm.)nylonString (pm.)steelString (pm.)openStringPick (pm.)openStringPickUp (pm.)openStringPickDown (pm.)ksReflexionFilter (pm.)rStringRigidTermination (pm.)lStringRigidTermination (pm.)elecGuitarBridge (pm.)elecGuitarNuts (pm.)guitarBridge (pm.)guitarNuts (pm.)idealString (pm.)ks (pm.)ks_ui_MIDI (pm.)elecGuitarModel (pm.)elecGuitar (pm.)elecGuitar_ui_MIDI (pm.)guitarBody (pm.)guitarModel (pm.)guitar (pm.)guitar_ui_MIDI (pm.)nylonGuitarModel (pm.)nylonGuitar (pm.)nylonGuitar_ui_MIDI (pm.)modeInterpRes (pm.)modularInterpBody (pm.)modularInterpStringModel (pm.)modularInterpInstr (pm.)modularInterpInstr_ui_MIDI (pm.)bowTable (pm.)violinBowTable (pm.)bowInteraction (pm.)violinBow (pm.)violinBowedString (pm.)violinNuts (pm.)violinBridge (pm.)violinBody (pm.)violinModel (pm.)violin_ui (pm.)violin_ui_MIDI (pm.)openTube (pm.)reedTable (pm.)fluteJetTable (pm.)brassLipsTable (pm.)clarinetReed (pm.)clarinetMouthPiece (pm.)brassLips (pm.)fluteEmbouchure (pm.)wBell (pm.)fluteHead (pm.)fluteFoot (pm.)clarinetModel (pm.)clarinetModel_ui (pm.)clarinet_ui (pm.)clarinet_ui_MIDI (pm.)brassModel (pm.)brassModel_ui (pm.)brass_ui (pm.)brass_ui_MIDI (pm.)fluteModel (pm.)fluteModel_ui (pm.)flute_ui (pm.)flute_ui_MIDI (pm.)impulseExcitation (pm.)strikeModel (pm.)strike (pm.)pluckString (pm.)blower (pm.)blower_ui (pm.)djembeModel (pm.)djembe (pm.)djembe_ui_MIDI (pm.)marimbaBarModel (pm.)marimbaResTube (pm.)marimbaModel (pm.)marimba (pm.)marimba_ui_MIDI (pm.)churchBellModel (pm.)churchBell (pm.)churchBell_ui (pm.)englishBellModel (pm.)englishBell (pm.)englishBell_ui (pm.)frenchBellModel (pm.)frenchBell (pm.)frenchBell_ui (pm.)germanBellModel (pm.)germanBell (pm.)germanBell_ui (pm.)russianBellModel (pm.)russianBell (pm.)russianBell_ui (pm.)standardBellModel (pm.)standardBell (pm.)standardBell_ui (pm.)formantValues (pm.)voiceGender (pm.)skirtWidthMultiplier (pm.)autobendFreq (pm.)vocalEffort (pm.)fof (pm.)fofSH (pm.)fofCycle (pm.)fofSmooth (pm.)formantFilterFofCycle (pm.)formantFilterFofSmooth (pm.)formantFilterBP (pm.)formantFilterbank (pm.)formantFilterbankFofCycle (pm.)formantFilterbankFofSmooth (pm.)formantFilterbankBP (pm.)SFFormantModel (pm.)SFFormantModelFofCycle (pm.)SFFormantModelFofSmooth (pm.)SFFormantModelBP (pm.)SFFormantModelFofCycle_ui (pm.)SFFormantModelFofSmooth_ui (pm.)SFFormantModelBP_ui (pm.)SFFormantModelFofCycle_ui_MIDI (pm.)SFFormantModelFofSmooth_ui_MIDI (pm.)SFFormantModelBP_ui_MIDI (pm.)allpassNL (pm).modalModel quantizers (qu.)quantize (qu.)quantizeSmoothed (qu.)ionian (qu.)dorian (qu.)phrygian (qu.)lydian (qu.)mixo (qu.)eolian (qu.)locrian (qu.)pentanat (qu.)kumoi (qu.)natural (qu.)dodeca (qu.)dimin (qu.)penta reducemaps (rm.)parReduce (rm.)topReduce (rm.)botReduce (rm.)reduce (rm.)reducemap reverbs (re.)jcrev (re.)satrev (re.)fdnrev0 (re.)zita_rev_fdn (re.)zita_rev1_stereo (re.)zita_rev1_ambi (re.)mono_freeverb (re.)stereo_freeverb (re.)dattorro_rev (re.)dattorro_rev_default (re.)jpverb (re.)greyhole routes (ro.)cross (ro.)crossnn (ro.)crossn1 (ro.)cross1n (ro.)crossNM (ro.)interleave (ro.)butterfly (ro.)hadamard (ro.)recursivize (ro.)bubbleSort signals (si.)bus (si.)block (si.)interpolate (si.)smoo (si.)polySmooth (si.)smoothAndH (si.)bsmooth (si.)dot (si.)smooth (si.)cbus (si.)cmul (si.)cconj (si.)onePoleSwitching (si.)rev (si.)vecOp soundfiles (so.)loop (so.)loop_speed (so.)loop_speed_level spats (sp.)panner (sp.)constantPowerPan (sp.)spat (sp.)stereoize synths (sy.)popFilterDrum (sy.)dubDub (sy.)sawTrombone (sy.)combString (sy.)additiveDrum (sy.)fm (sy.)kick (sy.)clap (sy.)hat vaeffects (ve.)moog_vcf (ve.)moog_vcf_2b[n] (ve.)moogLadder (ve.)moogHalfLadder (ve.)diodeLadder (ve.)korg35LPF (ve.)korg35HPF (ve.)oberheim (ve.)oberheimBSF (ve.)oberheimBPF (ve.)oberheimHPF (ve.)oberheimLPF (ve.)sallenKeyOnePole (ve.)sallenKeyOnePoleLPF (ve.)sallenKeyOnePoleHPF (ve.)sallenKey2ndOrder (ve.)sallenKey2ndOrderLPF (ve.)sallenKey2ndOrderBPF (ve.)sallenKey2ndOrderHPF (ve.)wah4 (ve.)autowah (ve.)crybaby (ve.)vocoder version (vl.)version wdmodels (wd.)resistor (wd.)resistor_Vout (wd.)resistor_Iout (wd.)u_voltage (wd.)u_current (wd.)resVoltage (wd.)resVoltage_Vout (wd.)u_resVoltage (wd.)resCurrent (wd.)u_resCurrent (wd.)u_switch (wd.)capacitor (wd.)capacitor_Vout (wd.)inductor (wd.)inductor_Vout (wd.)u_idealDiode (wd.)u_chua (wd.)lambert (wd.)u_diodePair (wd.)u_diodeSingle (wd.)u_diodeAntiparallel (wd.)u_parallel2Port (wd.)parallel2Port (wd.)u_series2Port (wd.)series2Port (wd.)parallelCurrent (wd.)seriesVoltage (wd.)u_transformer (wd.)transformer (wd.)u_transformerActive (wd.)transformerActive (wd.)parallel (wd.)series (wd.)u_sixportPassive (wd.)genericNode (wd.)genericNode_Vout (wd.)genericNode_Iout (wd.)u_genericNode (wd.)builddown (wd.)buildup (wd.)getres (wd.)parres (wd.)buildout (wd.)buildtree webaudio (wa.)lowpass2 (wa.)highpass2 (wa.)bandpass2 (wa.)notch2 (wa.)allpass2 (wa.)peaking2 (wa.)lowshelf2 (wa.)highshelf2","title":"Index"},{"location":"libs/#faust-libraries-index","text":"","title":"Faust Libraries Index"},{"location":"libs/#aanl","text":"(aa.)clip (aa.)Rsqrt (aa.)Rlog (aa.)Rtan (aa.)Racos (aa.)Rasin (aa.)Racosh (aa.)Rcosh (aa.)Rsinh (aa.)Ratanh (aa.)ADAA1 (aa.)ADAA2 (aa.)hardclip (aa.)hardclip2 (aa.)cubic1 (aa.)parabolic (aa.)parabolic2 (aa.)hyperbolic (aa.)hyperbolic2 (aa.)sinarctan (aa.)sinarctan2 (aa.)tanh1 (aa.)arctan (aa.)arctan2 (aa.)asinh1 (aa.)asinh2 (aa.)cosine1 (aa.)cosine2 (aa.)arccos (aa.)arccos2 (aa.)acosh1 (aa.)acosh2 (aa.)sine (aa.)sine2 (aa.)arcsin (aa.)arcsin2 (aa.)tangent (aa.)atanh1 (aa.)atanh2","title":"aanl"},{"location":"libs/#analyzers","text":"(an.)abs_envelope_rect (an.)abs_envelope_tau (an.)abs_envelope_t60 (an.)abs_envelope_t19 (an.)amp_follower (an.)amp_follower_ud (an.)amp_follower_ar (an.)ms_envelope_rect (an.)ms_envelope_tau (an.)ms_envelope_t60 (an.)ms_envelope_t19 (an.)rms_envelope_rect (an.)rms_envelope_tau (an.)rms_envelope_t60 (an.)rms_envelope_t19 (an.)zcr (an.)pitchTracker (an.)spectralCentroid (an.)mth_octave_analyzer (an.)mth_octave_spectral_level6e (an.)[third|half] octave [analyzer|filterbank] (an.)analyzer (an.)goertzelOpt (an.)goertzelComp (an.)goertzel (an.)fft (an.)ifft","title":"analyzers"},{"location":"libs/#basics","text":"(ba.)samp2sec (ba.)sec2samp (ba.)db2linear (ba.)linear2db (ba.)lin2LogGain (ba.)log2LinGain (ba.)tau2pole (ba.)pole2tau (ba.)midikey2hz (ba.)hz2midikey (ba.)semi2ratio (ba.)ratio2semi (ba.)cent2ratio (ba.)ratio2cent (ba.)pianokey2hz (ba.)hz2pianokey (ba.)counter (ba.)countdown (ba.)countup (ba.)sweep (ba.)time (ba.)ramp (ba.)line (ba.)tempo (ba.)period (ba.)pulse (ba.)pulsen (ba.)cycle (ba.)beat (ba.)pulse_countup (ba.)pulse_countdown (ba.)pulse_countup_loop (ba.)pulse_countdown_loop (ba.)resetCtr (ba.)count (ba.)take (ba.)subseq (ba.)tabulate (ba.)tabulate_chebychev (ba.)tabulateNd (ba.)if (ba.)ifNc (ba.)ifNcNo (ba.)selector (ba.)select2stereo (ba.)selectn (ba.)selectmulti (ba.)selectoutn (ba.)latch (ba.)sAndH (ba.)downSample (ba.)peakhold (ba.)peakholder (ba.)impulsify (ba.)automat (ba.)bpf (ba.)listInterp (ba.)bypass1 (ba.)bypass2 (ba.)bypass1to2 (ba.)bypass_fade (ba.)toggle (ba.)on_and_off (ba.)bitcrusher (ba.)slidingReduce (ba.)slidingSum (ba.)slidingSump (ba.)slidingMax (ba.)slidingMin (ba.)slidingMean (ba.)slidingMeanp (ba.)slidingRMS (ba.)slidingRMSp (ba.)parallelOp (ba.)parallelMax (ba.)parallelMin (ba.)parallelMean (ba.)parallelRMS","title":"basics"},{"location":"libs/#compressors","text":"(co.)peak_compression_gain_mono_db (co.)peak_compression_gain_N_chan_db (co.)FFcompressor_N_chan (co.)FBcompressor_N_chan (co.)FBFFcompressor_N_chan (co.)RMS_compression_gain_mono_db (co.)RMS_compression_gain_N_chan_db (co.)RMS_FBFFcompressor_N_chan (co.)RMS_FBcompressor_peak_limiter_N_chan (co.)peak_compression_gain_mono (co.)peak_compression_gain_N_chan (co.)RMS_compression_gain_mono (co.)RMS_compression_gain_N_chan (co.)compressor_lad_mono (co.)compressor_mono (co.)compressor_stereo (co.)compression_gain_mono (co.)limiter_1176_R4_mono (co.)limiter_1176_R4_stereo (co.)peak_expansion_gain_N_chan_db (co.)expander_N_chan (co.)expanderSC_N_chan (co.)limiter_lad_N (co.)limiter_lad_mono (co.)limiter_lad_stereo (co.)limiter_lad_quad (co.)limiter_lad_bw","title":"compressors"},{"location":"libs/#delays","text":"(de.)delay (de.)fdelay (de.)sdelay (de.)fdelaylti and (de.)fdelayltv (de.)fdelay[N] (de.)fdelay[N]a","title":"delays"},{"location":"libs/#demos","text":"(dm.)mth_octave_spectral_level_demo (dm.)parametric_eq_demo (dm.)spectral_tilt_demo (dm.)mth_octave_filterbank_demo and (dm.)filterbank_demo (dm.)cubicnl_demo (dm.)gate_demo (dm.)compressor_demo (dm.)moog_vcf_demo (dm.)wah4_demo (dm.)crybaby_demo (dm.)flanger_demo (dm.)phaser2_demo (dm.)freeverb_demo (dm.)stereo_reverb_tester (dm.)fdnrev0_demo (dm.)zita_rev_fdn_demo (dm.)zita_light (dm.)zita_rev1 (dm.)dattorro_rev_demo (dm.)jprev_demo (dm.)greyhole_demo (dm.)sawtooth_demo (dm.)virtual_analog_oscillator_demo (dm.)oscrs_demo (dm.)velvet_noise_demo (dm.)latch_demo (dm.)envelopes_demo (dm.)fft_spectral_level_demo (dm.)reverse_echo_demo(nChans) (dm.)pospass_demo (dm.)exciter (dm.)vocoder_demo (dm.)colored_noise_demo","title":"demos"},{"location":"libs/#dx7","text":"(dx.)dx7_ampf (dx.)dx7_egraterisef (dx.)dx7_egraterisepercf (dx.)dx7_egratedecayf (dx.)dx7_egratedecaypercf (dx.)dx7_eglv2peakf (dx.)dx7_velsensf (dx.)dx7_fdbkscalef (dx.)dx7_op (dx.)dx7_algo (dx.)dx7_ui","title":"dx7"},{"location":"libs/#envelopes","text":"(en.)ar (en.)asr (en.)adsr (en.)smoothEnvelope (en.)arfe (en.)are (en.)asre (en.)adsre (en.)ahdsre (en.)dx7envelope","title":"envelopes"},{"location":"libs/#fds","text":"(fd.)model1D (fd.)model2D (fd.)stairsInterp1D (fd.)stairsInterp2D (fd.)linInterp1D (fd.)linInterp2D (fd.)stairsInterp1DOut (fd.)stairsInterp2DOut (fd.)linInterp1DOut (fd.)stairsInterp2DOut (fd.)route1D (fd.)route2D (fd.)schemePoint (fd.)buildScheme1D (fd.)buildScheme2D (fd.)hammer (fd.)bow","title":"fds"},{"location":"libs/#filters","text":"(fi.)zero (fi.)pole (fi.)integrator (fi.)dcblockerat (fi.)dcblocker (fi.)lptN (fi.)ff_comb (fi.)ff_fcomb (fi.)ffcombfilter (fi.)fb_comb (fi.)fb_fcomb (fi.)rev1 (fi.)fbcombfilter and (fi.)ffbcombfilter (fi.)allpass_comb (fi.)allpass_fcomb (fi.)rev2 (fi.)allpass_fcomb5 and (fi.)allpass_fcomb1a (fi.)iir (fi.)fir (fi.)conv and (fi.)convN (fi.)tf1, (fi.)tf2 and (fi.)tf3 (fi.)notchw (fi.)tf21, (fi.)tf22, (fi.)tf22t and (fi.)tf21t (fi.)av2sv (fi.)bvav2nuv (fi.)iir_lat2 (fi.)allpassnt (fi.)iir_kl (fi.)allpassnklt (fi.)iir_lat1 (fi.)allpassn1mt (fi.)iir_nl (fi.)allpassnnlt (fi.)tf2np (fi.)wgr (fi.)nlf2 (fi.)apnl (fi.)allpassn (fi.)allpassnn (fi.)allpassnkl (fi.)allpass1m (fi.)tf2s and (fi.)tf2snp (fi.)tf1snp (fi.)tf3slf (fi.)tf1s (fi.)tf2sb (fi.)tf1sb (fi.)resonlp (fi.)resonhp (fi.)resonbp (fi.)lowpass (fi.)highpass (fi.)lowpass0_highpass1 (fi.)lowpass_plus|minus_highpass (fi.)lowpass3e (fi.)lowpass6e (fi.)highpass3e (fi.)highpass6e (fi.)bandpass (fi.)bandstop (fi.)bandpass6e (fi.)bandpass12e (fi.)pospass (fi.)low_shelf (fi.)high_shelf (fi.)peak_eq (fi.)peak_eq_cq (fi.)peak_eq_rm (fi.)spectral_tilt (fi.)levelfilter (fi.)levelfilterN (fi.)mth_octave_filterbank[n] (fi.)filterbank (fi.)filterbanki (fi.)svf (fi.)lowpassLR4 (fi.)highpassLR4 (fi.)crossover2LR4 (fi.)crossover3LR4 (fi.)crossover4LR4 (fi.)crossover8LR4 (fi.)itu_r_bs_1770_4_kfilter (fi.)avg_rect (fi.)avg_tau (fi.)avg_t60 (fi.)avg_t19","title":"filters"},{"location":"libs/#hoa","text":"(ho.)encoder (ho.)rEncoder (ho.)stereoEncoder (ho.)multiEncoder (ho.)decoder (ho.)decoderStereo (ho.)iBasicDecoder (ho.)circularScaledVBAP (ho.)imlsDecoder (ho.)iDecoder (ho.)optimBasic (ho.)optimMaxRe (ho.)optimInPhase (ho.)optim (ho.)wider (ho.)mirror (ho.)map (ho.)rotate (ho.)scope (ho.).fxDecorrelation (ho.).synDecorrelation (ho.).fxRingMod (ho.).synRingMod (ho.)encoder3D (ho.)rEncoder3D (ho.)optimBasic3D (ho.)optimMaxRe3D (ho.)optimInPhase3D (ho.)optim3D","title":"hoa"},{"location":"libs/#interpolators","text":"(it.)interpolate_linear (it.)interpolate_cosine (it.)interpolate_cubic (it.)interpolator_two_points (it.)interpolator_linear (it.)interpolator_cosine (it.)interpolator_four_points (it.)interpolator_cubic (it.)interpolator_select (it.)lagrangeCoeffs(N, xCoordsList) (it.)lagrangeInterpolation(N, xCoordsList) (it.)frdtable(N, S) (it.)frwtable(N, S) (it.)remap","title":"interpolators"},{"location":"libs/#maths","text":"(ma.)SR (ma.)T (ma.)BS (ma.)PI (ma.)deg2rad (ma.)rad2deg (ma.)E (ma.)EPSILON (ma.)MIN (ma.)MAX (ma.)FTZ (ma.)copysign (ma.)neg (ma.)sub(x,y) (ma.)inv (ma.)cbrt (ma.)hypot (ma.)ldexp (ma.)scalb (ma.)log1p (ma.)logb (ma.)ilogb (ma.)log2 (ma.)expm1 (ma.)acosh (ma.)asinh (ma.)atanh (ma.)sinh (ma.)cosh (ma.)tanh (ma.)erf (ma.)erfc (ma.)gamma (ma.)lgamma (ma.)J0 (ma.)J1 (ma.)Jn (ma.)Y0 (ma.)Y1 (ma.)Yn (ma.)fabs, (ma.)fmax, (ma.)fmin (ma.)np2 (ma.)frac (ma.)modulo (ma.)isnan (ma.)isinf (ma.)chebychev (ma.)chebychevpoly (ma.)diffn (ma.)signum (ma.)nextpow2 (ma.)zc","title":"maths"},{"location":"libs/#mi","text":"(mi.)initState (mi.)mass (mi.)oscil (mi.)ground (mi.)posInput (mi.)spring (mi.)damper (mi.)springDamper (mi.)nlSpringDamper2 (mi.)nlSpringDamper3 (mi.)nlSpringDamperClipped (mi.)nlPluck (mi.)nlBow (mi.)collision (mi.)nlCollisionClipped","title":"mi"},{"location":"libs/#misceffects","text":"(ef.)cubicnl (ef.)gate_mono (ef.)gate_stereo (ef.)speakerbp (ef.)piano_dispersion_filter (ef.)stereo_width (ef.)mesh_square (ef.)reverseEchoN(nChans,delay) (ef.)reverseDelayRamped(delay,phase) (ef.)uniformPanToStereo(nChans) (ef.)dryWetMixer (ef.)dryWetMixerConstantPower (ef.)echo (ef.)transpose (ef.)softclipQuadratic (ef.)wavefold","title":"misceffects"},{"location":"libs/#oscillators","text":"(os.)sinwaveform (os.)coswaveform (os.)phasor (os.)hs_phasor (os.)hsp_phasor (os.)oscsin (os.)hs_oscsin (os.)osccos (os.)hs_osccos (os.)oscp (os.)osci (os.)osc (os.)m_oscsin (os.)m_osccos (os.)lf_imptrain (os.)lf_pulsetrainpos (os.)lf_pulsetrain (os.)lf_squarewavepos (os.)lf_squarewave (os.)lf_trianglepos (os.)lf_triangle (os.)lf_rawsaw (os.)lf_sawpos (os.)lf_sawpos_phase (os.)lf_sawpos_reset (os.)lf_sawpos_phase_reset (os.)lf_saw (os.)sawN (os.)sawNp (os.)saw2, (os.)saw3, (os.)saw4 (os.)saw2ptr (os.)saw2dpw (os.)sawtooth (os.)saw2f2, (os.)saw2f4 (os.)impulse (os.)pulsetrainN (os.)pulsetrain (os.)squareN (os.)square (os.)imptrainN (os.)imptrain (os.)triangleN (os.)triangle (os.)oscb (os.)oscrq (os.)oscrs (os.)oscrc (os.)oscs (os.)quadosc (os.)oscwc (os.)oscws (os.)oscq (os.)oscw (os.)CZsaw (os.)CZsawP (os.)CZsquare (os.)CZsquareP (os.)CZpulse (os.)CZpulseP (os.)CZsinePulse (os.)CZsinePulseP (os.)CZhalfSine (os.)CZhalfSineP (os.)CZresSaw (os.)CZresTriangle (os.)CZresTrap (os.)polyblep (os.)polyblep_saw (os.)polyblep_square (os.)polyblep_triangle","title":"oscillators"},{"location":"libs/#noises","text":"(no.)noise (no.)multirandom (no.)multinoise (no.)noises (no.)randomseed (no.)rnoise (no.)rmultirandom (no.)rmultinoise (no.)rnoises (no.)pink_noise (no.)pink_noise_vm (no.)lfnoise, (no.)lfnoise0 and (no.)lfnoiseN (no.)sparse_noise (no.)velvet_noise_vm (no.)gnoise (no.)colored_noise","title":"noises"},{"location":"libs/#phaflangers","text":"(pf.)flanger_mono (pf.)flanger_stereo (pf.)phaser2_mono (pf.)phaser2_stereo","title":"phaflangers"},{"location":"libs/#physmodels","text":"(pm.)speedOfSound (pm.)maxLength (pm.)f2l (pm.)l2f (pm.)l2s (pm.)basicBlock (pm.)chain (pm.)inLeftWave (pm.)inRightWave (pm.)in (pm.)outLeftWave (pm.)outRightWave (pm.)out (pm.)terminations (pm.)lTermination (pm.)rTermination (pm.)closeIns (pm.)closeOuts (pm.)endChain (pm.)waveguideN (pm.)waveguide (pm.)bridgeFilter (pm.)modeFilter (pm.)stringSegment (pm.)openString (pm.)nylonString (pm.)steelString (pm.)openStringPick (pm.)openStringPickUp (pm.)openStringPickDown (pm.)ksReflexionFilter (pm.)rStringRigidTermination (pm.)lStringRigidTermination (pm.)elecGuitarBridge (pm.)elecGuitarNuts (pm.)guitarBridge (pm.)guitarNuts (pm.)idealString (pm.)ks (pm.)ks_ui_MIDI (pm.)elecGuitarModel (pm.)elecGuitar (pm.)elecGuitar_ui_MIDI (pm.)guitarBody (pm.)guitarModel (pm.)guitar (pm.)guitar_ui_MIDI (pm.)nylonGuitarModel (pm.)nylonGuitar (pm.)nylonGuitar_ui_MIDI (pm.)modeInterpRes (pm.)modularInterpBody (pm.)modularInterpStringModel (pm.)modularInterpInstr (pm.)modularInterpInstr_ui_MIDI (pm.)bowTable (pm.)violinBowTable (pm.)bowInteraction (pm.)violinBow (pm.)violinBowedString (pm.)violinNuts (pm.)violinBridge (pm.)violinBody (pm.)violinModel (pm.)violin_ui (pm.)violin_ui_MIDI (pm.)openTube (pm.)reedTable (pm.)fluteJetTable (pm.)brassLipsTable (pm.)clarinetReed (pm.)clarinetMouthPiece (pm.)brassLips (pm.)fluteEmbouchure (pm.)wBell (pm.)fluteHead (pm.)fluteFoot (pm.)clarinetModel (pm.)clarinetModel_ui (pm.)clarinet_ui (pm.)clarinet_ui_MIDI (pm.)brassModel (pm.)brassModel_ui (pm.)brass_ui (pm.)brass_ui_MIDI (pm.)fluteModel (pm.)fluteModel_ui (pm.)flute_ui (pm.)flute_ui_MIDI (pm.)impulseExcitation (pm.)strikeModel (pm.)strike (pm.)pluckString (pm.)blower (pm.)blower_ui (pm.)djembeModel (pm.)djembe (pm.)djembe_ui_MIDI (pm.)marimbaBarModel (pm.)marimbaResTube (pm.)marimbaModel (pm.)marimba (pm.)marimba_ui_MIDI (pm.)churchBellModel (pm.)churchBell (pm.)churchBell_ui (pm.)englishBellModel (pm.)englishBell (pm.)englishBell_ui (pm.)frenchBellModel (pm.)frenchBell (pm.)frenchBell_ui (pm.)germanBellModel (pm.)germanBell (pm.)germanBell_ui (pm.)russianBellModel (pm.)russianBell (pm.)russianBell_ui (pm.)standardBellModel (pm.)standardBell (pm.)standardBell_ui (pm.)formantValues (pm.)voiceGender (pm.)skirtWidthMultiplier (pm.)autobendFreq (pm.)vocalEffort (pm.)fof (pm.)fofSH (pm.)fofCycle (pm.)fofSmooth (pm.)formantFilterFofCycle (pm.)formantFilterFofSmooth (pm.)formantFilterBP (pm.)formantFilterbank (pm.)formantFilterbankFofCycle (pm.)formantFilterbankFofSmooth (pm.)formantFilterbankBP (pm.)SFFormantModel (pm.)SFFormantModelFofCycle (pm.)SFFormantModelFofSmooth (pm.)SFFormantModelBP (pm.)SFFormantModelFofCycle_ui (pm.)SFFormantModelFofSmooth_ui (pm.)SFFormantModelBP_ui (pm.)SFFormantModelFofCycle_ui_MIDI (pm.)SFFormantModelFofSmooth_ui_MIDI (pm.)SFFormantModelBP_ui_MIDI (pm.)allpassNL (pm).modalModel","title":"physmodels"},{"location":"libs/#quantizers","text":"(qu.)quantize (qu.)quantizeSmoothed (qu.)ionian (qu.)dorian (qu.)phrygian (qu.)lydian (qu.)mixo (qu.)eolian (qu.)locrian (qu.)pentanat (qu.)kumoi (qu.)natural (qu.)dodeca (qu.)dimin (qu.)penta","title":"quantizers"},{"location":"libs/#reducemaps","text":"(rm.)parReduce (rm.)topReduce (rm.)botReduce (rm.)reduce (rm.)reducemap","title":"reducemaps"},{"location":"libs/#reverbs","text":"(re.)jcrev (re.)satrev (re.)fdnrev0 (re.)zita_rev_fdn (re.)zita_rev1_stereo (re.)zita_rev1_ambi (re.)mono_freeverb (re.)stereo_freeverb (re.)dattorro_rev (re.)dattorro_rev_default (re.)jpverb (re.)greyhole","title":"reverbs"},{"location":"libs/#routes","text":"(ro.)cross (ro.)crossnn (ro.)crossn1 (ro.)cross1n (ro.)crossNM (ro.)interleave (ro.)butterfly (ro.)hadamard (ro.)recursivize (ro.)bubbleSort","title":"routes"},{"location":"libs/#signals","text":"(si.)bus (si.)block (si.)interpolate (si.)smoo (si.)polySmooth (si.)smoothAndH (si.)bsmooth (si.)dot (si.)smooth (si.)cbus (si.)cmul (si.)cconj (si.)onePoleSwitching (si.)rev (si.)vecOp","title":"signals"},{"location":"libs/#soundfiles","text":"(so.)loop (so.)loop_speed (so.)loop_speed_level","title":"soundfiles"},{"location":"libs/#spats","text":"(sp.)panner (sp.)constantPowerPan (sp.)spat (sp.)stereoize","title":"spats"},{"location":"libs/#synths","text":"(sy.)popFilterDrum (sy.)dubDub (sy.)sawTrombone (sy.)combString (sy.)additiveDrum (sy.)fm (sy.)kick (sy.)clap (sy.)hat","title":"synths"},{"location":"libs/#vaeffects","text":"(ve.)moog_vcf (ve.)moog_vcf_2b[n] (ve.)moogLadder (ve.)moogHalfLadder (ve.)diodeLadder (ve.)korg35LPF (ve.)korg35HPF (ve.)oberheim (ve.)oberheimBSF (ve.)oberheimBPF (ve.)oberheimHPF (ve.)oberheimLPF (ve.)sallenKeyOnePole (ve.)sallenKeyOnePoleLPF (ve.)sallenKeyOnePoleHPF (ve.)sallenKey2ndOrder (ve.)sallenKey2ndOrderLPF (ve.)sallenKey2ndOrderBPF (ve.)sallenKey2ndOrderHPF (ve.)wah4 (ve.)autowah (ve.)crybaby (ve.)vocoder","title":"vaeffects"},{"location":"libs/#version","text":"(vl.)version","title":"version"},{"location":"libs/#wdmodels","text":"(wd.)resistor (wd.)resistor_Vout (wd.)resistor_Iout (wd.)u_voltage (wd.)u_current (wd.)resVoltage (wd.)resVoltage_Vout (wd.)u_resVoltage (wd.)resCurrent (wd.)u_resCurrent (wd.)u_switch (wd.)capacitor (wd.)capacitor_Vout (wd.)inductor (wd.)inductor_Vout (wd.)u_idealDiode (wd.)u_chua (wd.)lambert (wd.)u_diodePair (wd.)u_diodeSingle (wd.)u_diodeAntiparallel (wd.)u_parallel2Port (wd.)parallel2Port (wd.)u_series2Port (wd.)series2Port (wd.)parallelCurrent (wd.)seriesVoltage (wd.)u_transformer (wd.)transformer (wd.)u_transformerActive (wd.)transformerActive (wd.)parallel (wd.)series (wd.)u_sixportPassive (wd.)genericNode (wd.)genericNode_Vout (wd.)genericNode_Iout (wd.)u_genericNode (wd.)builddown (wd.)buildup (wd.)getres (wd.)parres (wd.)buildout (wd.)buildtree","title":"wdmodels"},{"location":"libs/#webaudio","text":"(wa.)lowpass2 (wa.)highpass2 (wa.)bandpass2 (wa.)notch2 (wa.)allpass2 (wa.)peaking2 (wa.)lowshelf2 (wa.)highshelf2","title":"webaudio"},{"location":"libs/aanl/","text":"aanl.lib A library for antialiased nonlinearities. Its official prefix is aa . This library provides aliasing-suppressed nonlinearities through first-order and second-order approximations of continuous-time signals, functions, and convolution based on antiderivatives. This technique is particularly effective if combined with low-factor oversampling, for example, operating at 96 kHz or 192 kHz sample-rate. The library contains trigonometric functions as well as other nonlinear functions such as bounded and unbounded saturators. Due to their limited domains or ranges, some of these functions may not suitable for audio nonlinear processing or waveshaping, although they have been included for completeness. Some other functions, for example, tan() and tanh(), are only available with first-order antialiasing due to the complexity of the antiderivative of the x * f(x) term, particularly because of the necessity of the dilogarithm function, which requires special implementation. Future improvements to this library may include an adaptive mechanism to set the ill-conditioned cases threshold to improve performance in varying cases. Note that the antialiasing functions introduce a delay in the path, respectively half and one-sample delay for first and second-order functions. Also note that due to division by differences, it is vital to use double-precision or more to reduce errors. The environment identifier for this library is aa . After importing the standard libraries in Faust, the functions below can be called as aa.function_name . References https://github.com/grame-cncm/faustlibraries/blob/master/aanl.lib Reducing the Aliasing in Nonlinear Waveshaping Using Continuous-time Convolution, Julian Parker, Vadim Zavalishin, Efflam Le Bivic, DAFX, 2016 http://dafx16.vutbr.cz/dafxpapers/20-DAFx-16_paper_41-PN.pdf Auxiliary Functions (aa.)clip Clipping function. (aa.)Rsqrt Real-valued sqrt(). (aa.)Rlog Real-valued log(). (aa.)Rtan Real-valued tan(). (aa.)Racos Real-valued acos(). (aa.)Rasin Real-valued asin(). (aa.)Racosh Real-valued acosh() (aa.)Rcosh Real-valued cosh(). (aa.)Rsinh Real-valued sinh(). (aa.)Ratanh Real-valued atanh(). (aa.)ADAA1 Generalised first-order ADAA function. Usage _ : ADAA1(EPS, f, F1) : _ Where: EPS : a threshold to handle ill-conditioned cases f : a function that we want to process with ADAA F1 : f's first antiderivative (aa.)ADAA2 Generalised second-order ADAA function. Usage _ : ADAA2(EPS, f, F1, F2) : _ Where: EPS : a threshold to handle ill-conditioned cases f : a function that we want to process with ADAA F1 : f's first antiderivative F2 : f's second antiderivative Main functions Saturators These antialiased saturators perform best with high-amplitude input signals. If the input is only slightly saturated, hence producing negligible aliasing, the trivial saturator may result in a better overall output, as noise can be introduced by first and second ADAA at low amplitudes. Once determining the lowest saturation level for which the antialiased functions perform adequately, it might be sensible to cross-fade between the trivial and the antialiased saturators according to the amplitude profile of the input signal. (aa.)hardclip First-order ADAA hard-clip. The domain of this function is \u211d; its theoretical range is [-1.0; 1.0]. Usage _ : aa.hardclip : _ (aa.)hardclip2 Second-order ADAA hard-clip. The domain of this function is \u211d; its theoretical range is [-1.0; 1.0]. Usage _ : aa.hardclip2 : _ (aa.)cubic1 First-order ADAA cubic saturator. The domain of this function is \u211d; its theoretical range is [-2.0/3.0; 2.0/3.0]. Usage _ : aa.cubic1 : _ (aa.)parabolic First-order ADAA parabolic saturator. The domain of this function is \u211d; its theoretical range is [-1.0; 1.0]. Usage _ : aa.parabolic : _ (aa.)parabolic2 Second-order ADAA parabolic saturator. The domain of this function is \u211d; its theoretical range is [-1.0; 1.0]. Usage _ : aa.parabolic : _ (aa.)hyperbolic First-order ADAA hyperbolic saturator. The domain of this function is \u211d; its theoretical range is ]-1.0; 1.0[. Usage _ : aa.hyperbolic : _ (aa.)hyperbolic2 Second-order ADAA hyperbolic saturator. The domain of this function is \u211d; its theoretical range is ]-1.0; 1.0[. Usage _ : aa.hyperbolic2 : _ (aa.)sinarctan First-order ADAA sin(atan()) saturator. The domain of this function is \u211d; its theoretical range is ]-1.0; 1.0[. Usage _ : aa.sinatan : _ (aa.)sinarctan2 Second-order ADAA sin(atan()) saturator. The domain of this function is \u211d; its theoretical range is ]-1.0; 1.0[. Usage _ : aa.sinarctan2 : _ (aa.)tanh1 First-order ADAA tanh() saturator. The domain of this function is \u211d; its theoretical range is ]-1.0; 1.0[. Usage _ : aa.tanh1 : _ (aa.)arctan First-order ADAA atan(). The domain of this function is \u211d; its theoretical range is ]-\u03c0/2.0; \u03c0/2.0[. Usage _ : aa.arctan : _ (aa.)arctan2 Second-order ADAA atan(). The domain of this function is \u211d; its theoretical range is ]-\u03c0/2.0; \u03c0/2.0[. Usage _ : aa.arctan2 : _ (aa.)asinh1 First-order ADAA asinh() saturator (unbounded). The domain of this function is \u211d; its theoretical range is \u211d. Usage _ : aa.asinh1 : _ (aa.)asinh2 Second-order ADAA asinh() saturator (unbounded). The domain of this function is \u211d; its theoretical range is \u211d. Usage _ : aa.asinh2 : _ Trigonometry These functions are reliable if input signals are within their domains. (aa.)cosine1 First-order ADAA cos(). The domain of this function is \u211d; its theoretical range is [-1.0; 1.0]. Usage _ : aa.cosine1 : _ (aa.)cosine2 Second-order ADAA cos(). The domain of this function is \u211d; its theoretical range is [-1.0; 1.0]. Usage _ : aa.cosine2 : _ (aa.)arccos First-order ADAA acos(). The domain of this function is [-1.0; 1.0]; its theoretical range is [\u03c0; 0.0]. Usage _ : aa.arccos : _ (aa.)arccos2 Second-order ADAA acos(). The domain of this function is [-1.0; 1.0]; its theoretical range is [\u03c0; 0.0]. Note that this function is not accurate for low-amplitude or low-frequency input signals. In that case, the first-order ADAA arccos() can be used. Usage _ : aa.arccos2 : _ (aa.)acosh1 First-order ADAA acosh(). The domain of this function is \u211d >= 1.0; its theoretical range is \u211d >= 0.0. Usage _ : aa.acosh1 : _ (aa.)acosh2 Second-order ADAA acosh(). The domain of this function is \u211d >= 1.0; its theoretical range is \u211d >= 0.0. Note that this function is not accurate for low-frequency input signals. In that case, the first-order ADAA acosh() can be used. Usage _ : aa.acosh2 : _ (aa.)sine First-order ADAA sin(). The domain of this function is \u211d; its theoretical range is \u211d. Usage _ : aa.sine : _ (aa.)sine2 Second-order ADAA sin(). The domain of this function is \u211d; its theoretical range is \u211d. Usage _ : aa.sine2 : _ (aa.)arcsin First-order ADAA asin(). The domain of this function is [-1.0, 1.0]; its theoretical range is [-\u03c0/2.0; \u03c0/2.0]. Usage _ : aa.arcsin : _ (aa.)arcsin2 Second-order ADAA asin(). The domain of this function is [-1.0, 1.0]; its theoretical range is [-\u03c0/2.0; \u03c0/2.0]. Note that this function is not accurate for low-frequency input signals. In that case, the first-order ADAA asin() can be used. Usage _ : aa.arcsin2 : _ (aa.)tangent First-order ADAA tan(). The domain of this function is [-\u03c0/2.0; \u03c0/2.0]; its theoretical range is \u211d. Usage _ : aa.tangent : _ (aa.)atanh1 First-order ADAA atanh(). The domain of this function is ]-1.0; 1.0[; its theoretical range is \u211d. Usage _ : aa.atanh1 : _ (aa.)atanh2 Second-order ADAA atanh(). The domain of this function is ]-1.0; 1.0[; its theoretical range is \u211d. Usage _ : aa.atanh2 : _","title":" antialiased "},{"location":"libs/aanl/#aanllib","text":"A library for antialiased nonlinearities. Its official prefix is aa . This library provides aliasing-suppressed nonlinearities through first-order and second-order approximations of continuous-time signals, functions, and convolution based on antiderivatives. This technique is particularly effective if combined with low-factor oversampling, for example, operating at 96 kHz or 192 kHz sample-rate. The library contains trigonometric functions as well as other nonlinear functions such as bounded and unbounded saturators. Due to their limited domains or ranges, some of these functions may not suitable for audio nonlinear processing or waveshaping, although they have been included for completeness. Some other functions, for example, tan() and tanh(), are only available with first-order antialiasing due to the complexity of the antiderivative of the x * f(x) term, particularly because of the necessity of the dilogarithm function, which requires special implementation. Future improvements to this library may include an adaptive mechanism to set the ill-conditioned cases threshold to improve performance in varying cases. Note that the antialiasing functions introduce a delay in the path, respectively half and one-sample delay for first and second-order functions. Also note that due to division by differences, it is vital to use double-precision or more to reduce errors. The environment identifier for this library is aa . After importing the standard libraries in Faust, the functions below can be called as aa.function_name .","title":"aanl.lib"},{"location":"libs/aanl/#references","text":"https://github.com/grame-cncm/faustlibraries/blob/master/aanl.lib Reducing the Aliasing in Nonlinear Waveshaping Using Continuous-time Convolution, Julian Parker, Vadim Zavalishin, Efflam Le Bivic, DAFX, 2016 http://dafx16.vutbr.cz/dafxpapers/20-DAFx-16_paper_41-PN.pdf","title":"References"},{"location":"libs/aanl/#auxiliary-functions","text":"","title":"Auxiliary Functions"},{"location":"libs/aanl/#aaclip","text":"Clipping function.","title":"(aa.)clip"},{"location":"libs/aanl/#aarsqrt","text":"Real-valued sqrt().","title":"(aa.)Rsqrt"},{"location":"libs/aanl/#aarlog","text":"Real-valued log().","title":"(aa.)Rlog"},{"location":"libs/aanl/#aartan","text":"Real-valued tan().","title":"(aa.)Rtan"},{"location":"libs/aanl/#aaracos","text":"Real-valued acos().","title":"(aa.)Racos"},{"location":"libs/aanl/#aarasin","text":"Real-valued asin().","title":"(aa.)Rasin"},{"location":"libs/aanl/#aaracosh","text":"Real-valued acosh()","title":"(aa.)Racosh"},{"location":"libs/aanl/#aarcosh","text":"Real-valued cosh().","title":"(aa.)Rcosh"},{"location":"libs/aanl/#aarsinh","text":"Real-valued sinh().","title":"(aa.)Rsinh"},{"location":"libs/aanl/#aaratanh","text":"Real-valued atanh().","title":"(aa.)Ratanh"},{"location":"libs/aanl/#aaadaa1","text":"Generalised first-order ADAA function.","title":"(aa.)ADAA1"},{"location":"libs/aanl/#usage","text":"_ : ADAA1(EPS, f, F1) : _ Where: EPS : a threshold to handle ill-conditioned cases f : a function that we want to process with ADAA F1 : f's first antiderivative","title":"Usage"},{"location":"libs/aanl/#aaadaa2","text":"Generalised second-order ADAA function.","title":"(aa.)ADAA2"},{"location":"libs/aanl/#usage_1","text":"_ : ADAA2(EPS, f, F1, F2) : _ Where: EPS : a threshold to handle ill-conditioned cases f : a function that we want to process with ADAA F1 : f's first antiderivative F2 : f's second antiderivative","title":"Usage"},{"location":"libs/aanl/#main-functions","text":"","title":"Main functions"},{"location":"libs/aanl/#saturators","text":"These antialiased saturators perform best with high-amplitude input signals. If the input is only slightly saturated, hence producing negligible aliasing, the trivial saturator may result in a better overall output, as noise can be introduced by first and second ADAA at low amplitudes. Once determining the lowest saturation level for which the antialiased functions perform adequately, it might be sensible to cross-fade between the trivial and the antialiased saturators according to the amplitude profile of the input signal.","title":"Saturators"},{"location":"libs/aanl/#aahardclip","text":"First-order ADAA hard-clip. The domain of this function is \u211d; its theoretical range is [-1.0; 1.0].","title":"(aa.)hardclip"},{"location":"libs/aanl/#usage_2","text":"_ : aa.hardclip : _","title":"Usage"},{"location":"libs/aanl/#aahardclip2","text":"Second-order ADAA hard-clip. The domain of this function is \u211d; its theoretical range is [-1.0; 1.0].","title":"(aa.)hardclip2"},{"location":"libs/aanl/#usage_3","text":"_ : aa.hardclip2 : _","title":"Usage"},{"location":"libs/aanl/#aacubic1","text":"First-order ADAA cubic saturator. The domain of this function is \u211d; its theoretical range is [-2.0/3.0; 2.0/3.0].","title":"(aa.)cubic1"},{"location":"libs/aanl/#usage_4","text":"_ : aa.cubic1 : _","title":"Usage"},{"location":"libs/aanl/#aaparabolic","text":"First-order ADAA parabolic saturator. The domain of this function is \u211d; its theoretical range is [-1.0; 1.0].","title":"(aa.)parabolic"},{"location":"libs/aanl/#usage_5","text":"_ : aa.parabolic : _","title":"Usage"},{"location":"libs/aanl/#aaparabolic2","text":"Second-order ADAA parabolic saturator. The domain of this function is \u211d; its theoretical range is [-1.0; 1.0].","title":"(aa.)parabolic2"},{"location":"libs/aanl/#usage_6","text":"_ : aa.parabolic : _","title":"Usage"},{"location":"libs/aanl/#aahyperbolic","text":"First-order ADAA hyperbolic saturator. The domain of this function is \u211d; its theoretical range is ]-1.0; 1.0[.","title":"(aa.)hyperbolic"},{"location":"libs/aanl/#usage_7","text":"_ : aa.hyperbolic : _","title":"Usage"},{"location":"libs/aanl/#aahyperbolic2","text":"Second-order ADAA hyperbolic saturator. The domain of this function is \u211d; its theoretical range is ]-1.0; 1.0[.","title":"(aa.)hyperbolic2"},{"location":"libs/aanl/#usage_8","text":"_ : aa.hyperbolic2 : _","title":"Usage"},{"location":"libs/aanl/#aasinarctan","text":"First-order ADAA sin(atan()) saturator. The domain of this function is \u211d; its theoretical range is ]-1.0; 1.0[.","title":"(aa.)sinarctan"},{"location":"libs/aanl/#usage_9","text":"_ : aa.sinatan : _","title":"Usage"},{"location":"libs/aanl/#aasinarctan2","text":"Second-order ADAA sin(atan()) saturator. The domain of this function is \u211d; its theoretical range is ]-1.0; 1.0[.","title":"(aa.)sinarctan2"},{"location":"libs/aanl/#usage_10","text":"_ : aa.sinarctan2 : _","title":"Usage"},{"location":"libs/aanl/#aatanh1","text":"First-order ADAA tanh() saturator. The domain of this function is \u211d; its theoretical range is ]-1.0; 1.0[.","title":"(aa.)tanh1"},{"location":"libs/aanl/#usage_11","text":"_ : aa.tanh1 : _","title":"Usage"},{"location":"libs/aanl/#aaarctan","text":"First-order ADAA atan(). The domain of this function is \u211d; its theoretical range is ]-\u03c0/2.0; \u03c0/2.0[.","title":"(aa.)arctan"},{"location":"libs/aanl/#usage_12","text":"_ : aa.arctan : _","title":"Usage"},{"location":"libs/aanl/#aaarctan2","text":"Second-order ADAA atan(). The domain of this function is \u211d; its theoretical range is ]-\u03c0/2.0; \u03c0/2.0[.","title":"(aa.)arctan2"},{"location":"libs/aanl/#usage_13","text":"_ : aa.arctan2 : _","title":"Usage"},{"location":"libs/aanl/#aaasinh1","text":"First-order ADAA asinh() saturator (unbounded). The domain of this function is \u211d; its theoretical range is \u211d.","title":"(aa.)asinh1"},{"location":"libs/aanl/#usage_14","text":"_ : aa.asinh1 : _","title":"Usage"},{"location":"libs/aanl/#aaasinh2","text":"Second-order ADAA asinh() saturator (unbounded). The domain of this function is \u211d; its theoretical range is \u211d.","title":"(aa.)asinh2"},{"location":"libs/aanl/#usage_15","text":"_ : aa.asinh2 : _","title":"Usage"},{"location":"libs/aanl/#trigonometry","text":"These functions are reliable if input signals are within their domains.","title":"Trigonometry"},{"location":"libs/aanl/#aacosine1","text":"First-order ADAA cos(). The domain of this function is \u211d; its theoretical range is [-1.0; 1.0].","title":"(aa.)cosine1"},{"location":"libs/aanl/#usage_16","text":"_ : aa.cosine1 : _","title":"Usage"},{"location":"libs/aanl/#aacosine2","text":"Second-order ADAA cos(). The domain of this function is \u211d; its theoretical range is [-1.0; 1.0].","title":"(aa.)cosine2"},{"location":"libs/aanl/#usage_17","text":"_ : aa.cosine2 : _","title":"Usage"},{"location":"libs/aanl/#aaarccos","text":"First-order ADAA acos(). The domain of this function is [-1.0; 1.0]; its theoretical range is [\u03c0; 0.0].","title":"(aa.)arccos"},{"location":"libs/aanl/#usage_18","text":"_ : aa.arccos : _","title":"Usage"},{"location":"libs/aanl/#aaarccos2","text":"Second-order ADAA acos(). The domain of this function is [-1.0; 1.0]; its theoretical range is [\u03c0; 0.0]. Note that this function is not accurate for low-amplitude or low-frequency input signals. In that case, the first-order ADAA arccos() can be used.","title":"(aa.)arccos2"},{"location":"libs/aanl/#usage_19","text":"_ : aa.arccos2 : _","title":"Usage"},{"location":"libs/aanl/#aaacosh1","text":"First-order ADAA acosh(). The domain of this function is \u211d >= 1.0; its theoretical range is \u211d >= 0.0.","title":"(aa.)acosh1"},{"location":"libs/aanl/#usage_20","text":"_ : aa.acosh1 : _","title":"Usage"},{"location":"libs/aanl/#aaacosh2","text":"Second-order ADAA acosh(). The domain of this function is \u211d >= 1.0; its theoretical range is \u211d >= 0.0. Note that this function is not accurate for low-frequency input signals. In that case, the first-order ADAA acosh() can be used.","title":"(aa.)acosh2"},{"location":"libs/aanl/#usage_21","text":"_ : aa.acosh2 : _","title":"Usage"},{"location":"libs/aanl/#aasine","text":"First-order ADAA sin(). The domain of this function is \u211d; its theoretical range is \u211d.","title":"(aa.)sine"},{"location":"libs/aanl/#usage_22","text":"_ : aa.sine : _","title":"Usage"},{"location":"libs/aanl/#aasine2","text":"Second-order ADAA sin(). The domain of this function is \u211d; its theoretical range is \u211d.","title":"(aa.)sine2"},{"location":"libs/aanl/#usage_23","text":"_ : aa.sine2 : _","title":"Usage"},{"location":"libs/aanl/#aaarcsin","text":"First-order ADAA asin(). The domain of this function is [-1.0, 1.0]; its theoretical range is [-\u03c0/2.0; \u03c0/2.0].","title":"(aa.)arcsin"},{"location":"libs/aanl/#usage_24","text":"_ : aa.arcsin : _","title":"Usage"},{"location":"libs/aanl/#aaarcsin2","text":"Second-order ADAA asin(). The domain of this function is [-1.0, 1.0]; its theoretical range is [-\u03c0/2.0; \u03c0/2.0]. Note that this function is not accurate for low-frequency input signals. In that case, the first-order ADAA asin() can be used.","title":"(aa.)arcsin2"},{"location":"libs/aanl/#usage_25","text":"_ : aa.arcsin2 : _","title":"Usage"},{"location":"libs/aanl/#aatangent","text":"First-order ADAA tan(). The domain of this function is [-\u03c0/2.0; \u03c0/2.0]; its theoretical range is \u211d.","title":"(aa.)tangent"},{"location":"libs/aanl/#usage_26","text":"_ : aa.tangent : _","title":"Usage"},{"location":"libs/aanl/#aaatanh1","text":"First-order ADAA atanh(). The domain of this function is ]-1.0; 1.0[; its theoretical range is \u211d.","title":"(aa.)atanh1"},{"location":"libs/aanl/#usage_27","text":"_ : aa.atanh1 : _","title":"Usage"},{"location":"libs/aanl/#aaatanh2","text":"Second-order ADAA atanh(). The domain of this function is ]-1.0; 1.0[; its theoretical range is \u211d.","title":"(aa.)atanh2"},{"location":"libs/aanl/#usage_28","text":"_ : aa.atanh2 : _","title":"Usage"},{"location":"libs/analyzers/","text":"analyzers.lib Analyzers library. Its official prefix is an . References https://github.com/grame-cncm/faustlibraries/blob/master/analyzers.lib Amplitude Tracking (an.)abs_envelope_rect Absolute value average with moving-average algorithm. Usage _ : abs_envelope_rect(period) : _ Where: period : sets the averaging frame in seconds (an.)abs_envelope_tau Absolute value average with one-pole lowpass and tau response. (See filters.lib.) Usage _ : abs_envelope_tau(period) : _ Where: period : (time to decay by 1/e) sets the averaging frame in secs (an.)abs_envelope_t60 Absolute value average with one-pole lowpass and t60 response. (See filters.lib.) Usage _ : abs_envelope_t60(period) : _ Where: period : (time to decay by 60 dB) sets the averaging frame in secs (an.)abs_envelope_t19 Absolute value average with one-pole lowpass and t19 response. (See filters.lib.) Usage _ : abs_envelope_t19(period) : _ Where: period : (time to decay by 1/e^2.2) sets the averaging frame in secs (an.)amp_follower Classic analog audio envelope follower with infinitely fast rise and exponential decay. The amplitude envelope instantaneously follows the absolute value going up, but then floats down exponentially. amp_follower is a standard Faust function. Usage _ : amp_follower(rel) : _ Where: rel : release time = amplitude-envelope time-constant (sec) going down References Musical Engineer's Handbook, Bernie Hutchins, Ithaca NY 1975 Electronotes Newsletter, Bernie Hutchins (an.)amp_follower_ud Envelope follower with different up and down time-constants (also called a \"peak detector\"). Usage _ : amp_follower_ud(att,rel) : _ Where: att : attack time = amplitude-envelope time constant (sec) going up rel : release time = amplitude-envelope time constant (sec) going down Note We assume rel >> att. Otherwise, consider rel ~ max(rel,att). For audio, att is normally faster (smaller) than rel (e.g., 0.001 and 0.01). Use amp_follower_ar below to remove this restriction. Reference \"Digital Dynamic Range Compressor Design --- A Tutorial and Analysis\", by Dimitrios Giannoulis, Michael Massberg, and Joshua D. Reiss https://www.eecs.qmul.ac.uk/~josh/documents/2012/GiannoulisMassbergReiss-dynamicrangecompression-JAES2012.pdf (an.)amp_follower_ar Envelope follower with independent attack and release times. The release can be shorter than the attack (unlike in amp_follower_ud above). Usage _ : amp_follower_ar(att,rel) : _ Where: att : attack time = amplitude-envelope time constant (sec) going up rel : release time = amplitude-envelope time constant (sec) going down (an.)ms_envelope_rect Mean square with moving-average algorithm. Usage _ : ms_envelope_rect(period) : _ Where: period : sets the averaging frame in secs (an.)ms_envelope_tau Mean square average with one-pole lowpass and tau response. (see filters.lib ) Usage _ : ms_envelope_tau(period) : _ Where: period : (time to decay by 1/e) sets the averaging frame in secs (an.)ms_envelope_t60 Mean square with one-pole lowpass and t60 response. (see filters.lib ) Usage _ : ms_envelope_t60(period) : _ Where: period : (time to decay by 60 dB) sets the averaging frame in secs (an.)ms_envelope_t19 Mean square with one-pole lowpass and t19 response. (see filters.lib ) Usage _ : ms_envelope_t19(period) : _ Where: period : (time to decay by 1/e^2.2) sets the averaging frame in secs (an.)rms_envelope_rect Root mean square with moving-average algorithm. Usage _ : rms_envelope_rect(period) : _ Where: period : sets the averaging frame in secs (an.)rms_envelope_tau Root mean square with one-pole lowpass and tau response. (see filters.lib ) Usage _ : rms_envelope_tau(period) : _ Where: period : (time to decay by 1/e) sets the averaging frame in secs (an.)rms_envelope_t60 Root mean square with one-pole lowpass and t60 response. (see filters.lib ) Usage _ : rms_envelope_t60(period) : _ Where: period : (time to decay by 60 dB) sets the averaging frame in secs (an.)rms_envelope_t19 Root mean square with one-pole lowpass and t19 response. (see filters.lib ) Usage _ : rms_envelope_t19(period) : _ Where: period : (time to decay by 1/e^2.2) sets the averaging frame in secs (an.)zcr Zero-crossing rate (ZCR) with one-pole lowpass averaging based on the tau constant. It outputs an index between 0 and 1 at a desired analysis frame. The ZCR of a signal correlates with the noisiness [Gouyon et al. 2000] and the spectral centroid [Herrera-Boyer et al. 2006] of a signal. For sinusoidal signals, the ZCR can be multiplied by ma.SR/2 and used as a frequency detector. For example, it can be deployed as a computationally efficient adaptive mechanism for automatic Larsen suppression. Usage _ : zcr(tau) : _ Where: tau : (time to decay by e^-1) sets the averaging frame in seconds. Adaptive Frequency Analysis (an.)pitchTracker This function implements a pitch-tracking algorithm by means of zero-crossing rate analysis and adaptive low-pass filtering. The design is based on the algorithm described in this tutorial (section 2.2) . Usage _ : pitchTracker(N, tau) : _ Where: N : a constant numerical expression, sets the order of the low-pass filter, which determines the sensitivity of the algorithm for signals where partials are stronger than the fundamental frequency. tau : response time in seconds based on exponentially-weighted averaging with tau time-constant. See https://ccrma.stanford.edu/~jos/st/Exponentials.html . (an.)spectralCentroid This function implements a time-domain spectral centroid by means of RMS measurements and adaptive crossover filtering. The weight difference of the upper and lower spectral powers are used to recursively adjust the crossover cutoff so that the system (minimally) oscillates around a balancing point. Unlike block processing techniques such as FFT, this algorithm provides continuous measurements and fast response times. Furthermore, when providing input signals that are spectrally sparse, the algorithm will output a logarithmic measure of the centroid, which is perceptually desirable for musical applications. For example, if the input signal is the combination of three tones at 1000, 2000, and 4000 Hz, the centroid will be the middle octave. Usage _ : spectralCentroid(nonlinearity, tau) : _ Where: nonlinearity : a boolean to activate or deactivate nonlinear integration. The nonlinear function is useful to improve stability with very short response times such as .001 <= tau <= .005 , otherwise, the nonlinearity may reduce precision. tau : response time in seconds based on exponentially-weighted averaging with tau time-constant. See https://ccrma.stanford.edu/~jos/st/Exponentials.html . Reference: Sanfilippo, D. (2021). Time-Domain Adaptive Algorithms for Low- and High-Level Audio Information Processing. Computer Music Journal, 45(1), 24-38. Example: process = os.osc(500) + os.osc(1000) + os.osc(2000) + os.osc(4000) + os.osc(8000) : an.spectralCentroid(1, .001); Spectrum-Analyzers Spectrum-analyzers split the input signal into a bank of parallel signals, one for each spectral band. They are related to the Mth-Octave Filter-Banks in filters.lib . The documentation of this library contains more details about the implementation. The parameters are: M : number of band-slices per octave (>1) N : total number of bands (>2) ftop = upper bandlimit of the Mth-octave bands (> att. Otherwise, consider rel ~ max(rel,att). For audio, att is normally faster (smaller) than rel (e.g., 0.001 and 0.01). Use amp_follower_ar below to remove this restriction.","title":"Note"},{"location":"libs/analyzers/#reference","text":"\"Digital Dynamic Range Compressor Design --- A Tutorial and Analysis\", by Dimitrios Giannoulis, Michael Massberg, and Joshua D. Reiss https://www.eecs.qmul.ac.uk/~josh/documents/2012/GiannoulisMassbergReiss-dynamicrangecompression-JAES2012.pdf","title":"Reference"},{"location":"libs/analyzers/#anamp_follower_ar","text":"Envelope follower with independent attack and release times. The release can be shorter than the attack (unlike in amp_follower_ud above).","title":"(an.)amp_follower_ar"},{"location":"libs/analyzers/#usage_6","text":"_ : amp_follower_ar(att,rel) : _ Where: att : attack time = amplitude-envelope time constant (sec) going up rel : release time = amplitude-envelope time constant (sec) going down","title":"Usage"},{"location":"libs/analyzers/#anms_envelope_rect","text":"Mean square with moving-average algorithm.","title":"(an.)ms_envelope_rect"},{"location":"libs/analyzers/#usage_7","text":"_ : ms_envelope_rect(period) : _ Where: period : sets the averaging frame in secs","title":"Usage"},{"location":"libs/analyzers/#anms_envelope_tau","text":"Mean square average with one-pole lowpass and tau response. (see filters.lib )","title":"(an.)ms_envelope_tau"},{"location":"libs/analyzers/#usage_8","text":"_ : ms_envelope_tau(period) : _ Where: period : (time to decay by 1/e) sets the averaging frame in secs","title":"Usage"},{"location":"libs/analyzers/#anms_envelope_t60","text":"Mean square with one-pole lowpass and t60 response. (see filters.lib )","title":"(an.)ms_envelope_t60"},{"location":"libs/analyzers/#usage_9","text":"_ : ms_envelope_t60(period) : _ Where: period : (time to decay by 60 dB) sets the averaging frame in secs","title":"Usage"},{"location":"libs/analyzers/#anms_envelope_t19","text":"Mean square with one-pole lowpass and t19 response. (see filters.lib )","title":"(an.)ms_envelope_t19"},{"location":"libs/analyzers/#usage_10","text":"_ : ms_envelope_t19(period) : _ Where: period : (time to decay by 1/e^2.2) sets the averaging frame in secs","title":"Usage"},{"location":"libs/analyzers/#anrms_envelope_rect","text":"Root mean square with moving-average algorithm.","title":"(an.)rms_envelope_rect"},{"location":"libs/analyzers/#usage_11","text":"_ : rms_envelope_rect(period) : _ Where: period : sets the averaging frame in secs","title":"Usage"},{"location":"libs/analyzers/#anrms_envelope_tau","text":"Root mean square with one-pole lowpass and tau response. (see filters.lib )","title":"(an.)rms_envelope_tau"},{"location":"libs/analyzers/#usage_12","text":"_ : rms_envelope_tau(period) : _ Where: period : (time to decay by 1/e) sets the averaging frame in secs","title":"Usage"},{"location":"libs/analyzers/#anrms_envelope_t60","text":"Root mean square with one-pole lowpass and t60 response. (see filters.lib )","title":"(an.)rms_envelope_t60"},{"location":"libs/analyzers/#usage_13","text":"_ : rms_envelope_t60(period) : _ Where: period : (time to decay by 60 dB) sets the averaging frame in secs","title":"Usage"},{"location":"libs/analyzers/#anrms_envelope_t19","text":"Root mean square with one-pole lowpass and t19 response. (see filters.lib )","title":"(an.)rms_envelope_t19"},{"location":"libs/analyzers/#usage_14","text":"_ : rms_envelope_t19(period) : _ Where: period : (time to decay by 1/e^2.2) sets the averaging frame in secs","title":"Usage"},{"location":"libs/analyzers/#anzcr","text":"Zero-crossing rate (ZCR) with one-pole lowpass averaging based on the tau constant. It outputs an index between 0 and 1 at a desired analysis frame. The ZCR of a signal correlates with the noisiness [Gouyon et al. 2000] and the spectral centroid [Herrera-Boyer et al. 2006] of a signal. For sinusoidal signals, the ZCR can be multiplied by ma.SR/2 and used as a frequency detector. For example, it can be deployed as a computationally efficient adaptive mechanism for automatic Larsen suppression.","title":"(an.)zcr"},{"location":"libs/analyzers/#usage_15","text":"_ : zcr(tau) : _ Where: tau : (time to decay by e^-1) sets the averaging frame in seconds.","title":"Usage"},{"location":"libs/analyzers/#adaptive-frequency-analysis","text":"","title":"Adaptive Frequency Analysis"},{"location":"libs/analyzers/#anpitchtracker","text":"This function implements a pitch-tracking algorithm by means of zero-crossing rate analysis and adaptive low-pass filtering. The design is based on the algorithm described in this tutorial (section 2.2) .","title":"(an.)pitchTracker"},{"location":"libs/analyzers/#usage_16","text":"_ : pitchTracker(N, tau) : _ Where: N : a constant numerical expression, sets the order of the low-pass filter, which determines the sensitivity of the algorithm for signals where partials are stronger than the fundamental frequency. tau : response time in seconds based on exponentially-weighted averaging with tau time-constant. See https://ccrma.stanford.edu/~jos/st/Exponentials.html .","title":"Usage"},{"location":"libs/analyzers/#anspectralcentroid","text":"This function implements a time-domain spectral centroid by means of RMS measurements and adaptive crossover filtering. The weight difference of the upper and lower spectral powers are used to recursively adjust the crossover cutoff so that the system (minimally) oscillates around a balancing point. Unlike block processing techniques such as FFT, this algorithm provides continuous measurements and fast response times. Furthermore, when providing input signals that are spectrally sparse, the algorithm will output a logarithmic measure of the centroid, which is perceptually desirable for musical applications. For example, if the input signal is the combination of three tones at 1000, 2000, and 4000 Hz, the centroid will be the middle octave.","title":"(an.)spectralCentroid"},{"location":"libs/analyzers/#usage_17","text":"_ : spectralCentroid(nonlinearity, tau) : _ Where: nonlinearity : a boolean to activate or deactivate nonlinear integration. The nonlinear function is useful to improve stability with very short response times such as .001 <= tau <= .005 , otherwise, the nonlinearity may reduce precision. tau : response time in seconds based on exponentially-weighted averaging with tau time-constant. See https://ccrma.stanford.edu/~jos/st/Exponentials.html .","title":"Usage"},{"location":"libs/analyzers/#reference_1","text":"Sanfilippo, D. (2021). Time-Domain Adaptive Algorithms for Low- and High-Level Audio Information Processing. Computer Music Journal, 45(1), 24-38.","title":"Reference:"},{"location":"libs/analyzers/#example","text":"process = os.osc(500) + os.osc(1000) + os.osc(2000) + os.osc(4000) + os.osc(8000) : an.spectralCentroid(1, .001);","title":"Example:"},{"location":"libs/analyzers/#spectrum-analyzers","text":"Spectrum-analyzers split the input signal into a bank of parallel signals, one for each spectral band. They are related to the Mth-Octave Filter-Banks in filters.lib . The documentation of this library contains more details about the implementation. The parameters are: M : number of band-slices per octave (>1) N : total number of bands (>2) ftop = upper bandlimit of the Mth-octave bands ( 4 Where: l : list of elements (ba.)take Take an element from a list. take is a standard Faust function. Usage take(P,l) take(3,(10,20,30,40)) -> 30 Where: P : position (int, known at compile time, P > 0) l : list of elements (ba.)subseq Extract a part of a list. Usage subseq(l, P, N) subseq((10,20,30,40,50,60), 1, 3) -> (20,30,40) subseq((10,20,30,40,50,60), 4, 1) -> 50 Where: l : list P : start point (int, known at compile time, 0: begin of list) N : number of elements (int, known at compile time) Note: Faust doesn't have proper lists. Lists are simulated with parallel compositions and there is no empty list. Function tabulation The purpose of function tabulation is to speed up the computation of heavy functions over an interval, so that the computation at runtime can be faster than directly using the function. Two techniques are implemented: tabulate computes the function in a table and read the points using interpolation. tabulateNd is the N dimensions version of tabulate tabulate_chebychev uses Chebyshev polynomial approximation Comparison program example process = line(50000, r0, r1) <: FX-tb,FX-ch : par(i, 2, maxerr) with { C = 0; FX = sin; NX = 50; CD = 3; r0 = 0; r1 = ma.PI; tb(x) = ba.tabulate(C, FX, NX*(CD+1), r0, r1, x).cub; ch(x) = ba.tabulate_chebychev(C, FX, NX, CD, r0, r1, x); maxerr = abs : max ~ _; line(n, x0, x1) = x0 + (ba.time%n)/n * (x1-x0); }; (ba.)tabulate Tabulate a 1D function over the range [r0, r1] for access via nearest-value, linear, cubic interpolation. In other words, the uniformly tabulated function can be evaluated using interpolation of order 0 (none), 1 (linear), or 3 (cubic). Usage tabulate(C, FX, S, r0, r1, x).(val|lin|cub) : _ C : whether to dynamically force the x value to the range [r0, r1]: 1 forces the check, 0 deactivates it (constant numerical expression) FX : unary function Y=F(X) with one output (scalar function of one variable) S : size of the table in samples (constant numerical expression) r0 : minimum value of argument x r1 : maximum value of argument x tabulate(C, FX, S, r0, r1, x).val uses the value in the table closest to x tabulate(C, FX, S, r0, r1, x).lin evaluates at x using linear interpolation between the closest stored values tabulate(C, FX, S, r0, r1, x).cub evaluates at x using cubic interpolation between the closest stored values Example test program midikey2hz(mk) = ba.tabulate(1, ba.midikey2hz, 512, 0, 127, mk).lin; process = midikey2hz(ba.time), ba.midikey2hz(ba.time); (ba.)tabulate_chebychev Tabulate a 1D function over the range [r0, r1] for access via Chebyshev polynomial approximation. In contrast to (ba.)tabulate , which interpolates only between tabulated samples, (ba.)tabulate_chebychev stores coefficients of Chebyshev polynomials that are evaluated to provide better approximations in many cases. Two new arguments controlling this are NX, the number of segments into which [r0, r1] is divided, and CD, the maximum Chebyshev polynomial degree to use for each segment. A rdtable of size NX*(CD+1) is internally used. Note that processing r1 the last point in the interval is not safe. So either be sure the input stays in [r0, r1[ or use C = 1 . Usage _ : tabulate_chebychev(C, FX, NX, CD, r0, r1) : _ C : whether to dynamically force the value to the range [r0, r1]: 1 forces the check, 0 deactivates it (constant numerical expression) FX : unary function Y=F(X) with one output (scalar function of one variable) NX : number of segments for uniformly partitioning [r0, r1] (constant numerical expression) CD : maximum polynomial degree for each Chebyshev polynomial (constant numerical expression) r0 : minimum value of argument x r1 : maximum value of argument x Example test program midikey2hz_chebychev(mk) = ba.tabulate_chebychev(1, ba.midikey2hz, 100, 4, 0, 127, mk); process = midikey2hz_chebychev(ba.time), ba.midikey2hz(ba.time); (ba.)tabulateNd Tabulate an nD function for access via nearest-value or linear or cubic interpolation. In other words, the tabulated function can be evaluated using interpolation of order 0 (none), 1 (linear), or 3 (cubic). The table size and parameter range of each dimension can and must be separately specified. You can use it anywhere you have an expensive function with multiple parameters with known ranges. You could use it to build a wavetable synth, for example. The number of dimensions is deduced from the number of parameters you give, see below. Note that processing the last point in each interval is not safe. So either be sure the inputs stay in their respective ranges, or use C = 1 . Similarly for the first point when doing cubic interpolation. Usage tabulateNd(C, function, (parameters) ).(val|lin|cub) : _ C : whether to dynamically force the parameter values for each dimension to the ranges specified in parameters: 1 forces the check, 0 deactivates it (constant numerical expression) function : the function we want to tabulate. Can have any number of inputs, but needs to have just one output. (parameters) : sizes, ranges and read values. Note: these need to be in brackets, to make them one entity. If N is the number of dimensions, we need: N times S : number of values to store for this dimension (constant numerical expression) N times r0 : minimum value of this dimension N times r1 : maximum value of this dimension N times x : read value of this dimension By providing these parameters, you indirectly specify the number of dimensions; it's the number of parameters divided by 4. The user facing functions are: tabulateNd(C, function, S, parameters).val Uses the value in the table closest to x. tabulateNd(C, function, S, parameters).lin Evaluates at x using linear interpolation between the closest stored values. tabulateNd(C, function, S, parameters).cub Evaluates at x using cubic interpolation between the closest stored values. Example test program powSin(x,y) = sin(pow(x,y)); // The function we want to tabulate powSinTable(x,y) = ba.tabulateNd(1, powSin, (sizeX,sizeY, rx0,ry0, rx1,ry1, x,y) ).lin; sizeX = 512; // table size of the first parameter sizeY = 512; // table size of the second parameter rx0 = 2; // start of the range of the first parameter ry0 = 2; // start of the range of the second parameter rx1 = 10; // end of the range of the first parameter ry1 = 10; // end of the range of the second parameter x = hslider(\"x\", rx0, rx0, rx1, 0.001):si.smoo; y = hslider(\"y\", ry0, ry0, ry1, 0.001):si.smoo; process = powSinTable(x,y), powSin(x,y); Working principle The .val function just outputs the closest stored value. The .lin and .cub functions interpolate in N dimensions. Multi dimensional interpolation To understand what it means to interpolate in N dimensions, here's a quick reminder on the general principle of 2D linear interpolation: We have a grid of values, and we want to find the value at a point (x, y) within this grid. We first find the four closest points (A, B, C, D) in the grid surrounding the point (x, y). Then, we perform linear interpolation in the x-direction between points A and B, and between points C and D. This gives us two new points E and F. Finally, we perform linear interpolation in the y-direction between points E and F to get our value. To implement this in Faust, we need N sequential groups of interpolators, where N is the number of dimensions. Each group feeds into the next, with the last \"group\" being a single interpolator, and the group before it containing one interpolator for each input of the group it's feeding. Some examples: Our 2D linear example has two interpolators feeding into one. A 3D linear interpolator has four interpolators feeding into two, feeding into one. A 2D cubic interpolater has four interpolators feeding into one. A 3D cubic interpolator has sixteen interpolators feeding into four, feeding into one. To understand which values we need to look up, let's consider the 2D linear example again. The four values going into the first group represent the four closest points (A, B, C, D) mentioned above. 1) The first interpolator gets: The closest value that is stored (A) The next value in the x dimension, keeping y fixed (B) 2) The second interpolator gets: One step over in the y dimension, keeping x fixed (C) One step over in both the x dimension and the y dimension (D) The outputs of these two interpolators are points E and F. In other words: the interpolated x values and, respectively, the following y values: The closest stored value of the y dimension One step forward in the y dimension The last interpolator takes these two values and interpolates them in the y dimension. To generalize for N dimensions and linear interpolation: The first group has 2^(n-1) parallel interpolators interpolating in the first dimension. The second group has 2^(n-2) parallel interpolators interpolating in the second dimension. The process continues until the n-th group, which has a single interpolator interpolating in the n-th dimension. The same principle applies to the cubic interpolation in nD. The only difference is that there would be 4^(n-1) parallel interpolators in the first group, compared to 2^(n-1) for linear interpolation. This is what the mixers function does. Besides the values, each interpolator also needs to know the weight of each value in it's output. Let's call this d , like in ba.interpolate . It is the same for each group of interpolators, since it correlates to a dimension. It's value is calculated the similarly to ba.interpolate : First we prepare a \"float table read-index\" for that dimension ( id in ba.tabulate ) If the table only had that dimension and it could read a float index, what would it be. Then we int the float index to get the value we have stored that is closest to, but lower than the input value; the actual index for that dimension. Our d is the difference between the float index and the actual index. The ids function calculates the id for each dimension and inside the mixer function they get turned into d s. Storage method The elephant in the room is: how do we get these indexes? For that we need to know how the values are stored. We use one big table to store everything. To understand the concept, let's look at the 2D example again, and then we'll extend it to 3d and the general nD case. Let's say we have a 2D table with dimensions A and B where: A has 3 values between 0 and 5 and B has 4 values between 0 and 1. The 1D array representation of this 2D table will have a size of 3 * 4 = 12. The values are stored in the following way: First 3 values: A is 0, then 3, then 5 while B is at 0. Next 3 values: A changes from 0 to 5 while B is at 1/3. Next 3 values: A changes from 0 to 5 while B is at 2/3. Last 3 values: A changes from 0 to 5 while B is at 1. For the 3D example, let's extend the 2D example with an additional dimension C having 2 values between 0 and 2. The total size will be 3 * 4 * 2 = 24. The values are stored like so: First 3 values: A changes from 0 to 5, B is at 0, and C is at 0. Next 3 values: A changes from 0 to 5, B is at 1/3, and C is at 0. Next 3 values: A changes from 0 to 5, B is at 2/3, and C is at 0. Next 3 values: A changes from 0 to 5, B is at 1, and C is at 0. The last 12 values are the same as the first 12, but with C at 2. For the general n-dimensional case, we iterate through all dimensions, changing the values of the innermost dimension first, then moving towards the outer dimensions. Read indexes To get the float read index ( id ) corresponding to a particular dimension, we scale the function input value to be between 0 and 1, and multiply it by the size of that dimension minus one. To understand how we get the readIndex for .val , let's work trough how we'd do it in our 2D linear example. For simplicity's sake, the ranges of the inputs to our function are both 0 to 1. Say we wanted to read the value closest to x=0.5 and y=0 , so the id of x is 1 (the second value) and the id of y is 0 (first value). In this case, the read index is just the id of x , rounded to the nearest integer, just like in ba.tabulate . If we want to read the value belonging to x=0.5 and y=2/3 , things get more complicated. The id for y is now 2 , the third value. For each step in the y direction, we need to increase the index by 3 , the number of values that are stored for x . So the influence of the y is: the size of x times the rounded id of y . The final read index is the rounded id of x plus the influence of y . For the general nD case, we need to do the same operation N times, each feeding into the next. This operation is the riN function. We take four parameters: the size of the dimension before it prevSize , the index of the previous dimension prevIX , the current size sizeX and the current id idX . riN has 2 outputs, the size, for feeding into the next dimension's prevSize , and the read index feeding into the next dimension's prevIX . The size is the sizeX times prevSize . The read index is the rounded idX times prevSize added to the prevIX . Our final readIndex is the read index output of the last dimension. To get the read values for the interpolators need a pattern of offsets in each dimension, since we are looking for the read indexes surrounding the point of interest. These offsets are best explained by looking at the code of tabulate2d , the hardcoded 2D version: tabulate2d(C,function, sizeX,sizeY, rx0,ry0, rx1,ry1, x,y) = environment { size = sizeX*sizeY; // Maximum X index to access midX = sizeX-1; // Maximum Y index to access midY = sizeY-1; // Maximum total index to access mid = size-1; // Create the table wf = function(wfX,wfY); // Prepare the 'float' table read index for X idX = (x-rx0)/(rx1-rx0)*midX; // Prepare the 'float' table read index for Y idY = ((y-ry0)/(ry1-ry0))*midY; // table creation X: wfX = rx0+float(ba.time%sizeX)*(rx1-rx0) /float(midX); // table creation Y: wfY = ry0+ ((float(ba.time-(ba.time%sizeX)) /float(sizeX)) *(ry1-ry0)) /float(midY); // Limit the table read index in [0, mid] if C = 1 rid(x,mid, 0) = x; rid(x,mid, 1) = max(0, min(x, mid)); // Tabulate a binary 'FX' function on a range [rx0, rx1] [ry0, ry1] val(x,y) = rdtable(size, wf, readIndex); readIndex = rid( rid(int(idX+0.5),midX, C) +yOffset , mid, C); yOffset = sizeX*rid(int(idY),midY,C); // Tabulate a binary 'FX' function over the range [rx0, rx1] [ry0, ry1] with linear interpolation lin = it.interpolate_linear( dy , it.interpolate_linear(dx,v0,v1) , it.interpolate_linear(dx,v2,v3)) with { i0 = rid(int(idX), midX, C)+yOffset; i1 = i0+1; i2 = i0+sizeX; i3 = i1+sizeX; dx = idX-int(idX); dy = idY-int(idY); v0 = rdtable(size, wf, rid(i0, mid, C)); v1 = rdtable(size, wf, rid(i1, mid, C)); v2 = rdtable(size, wf, rid(i2, mid, C)); v3 = rdtable(size, wf, rid(i3, mid, C)); }; // Tabulate a binary 'FX' function over the range [rx0, rx1] [ry0, ry1] with cubic interpolation cub = it.interpolate_cubic( dy , it.interpolate_cubic(dx,v0,v1,v2,v3) , it.interpolate_cubic(dx,v4,v5,v6,v7) , it.interpolate_cubic(dx,v8,v9,v10,v11) , it.interpolate_cubic(dx,v12,v13,v14,v15) ) with { i0 = i4-sizeX; i1 = i5-sizeX; i2 = i6-sizeX; i3 = i7-sizeX; i4 = i5-1; i5 = rid(int(idX), midX, C)+yOffset; i6 = i5+1; i7 = i6+1; i8 = i4+sizeX; i9 = i5+sizeX; i10 = i6+sizeX; i11 = i7+sizeX; i12 = i4+(2*sizeX); i13 = i5+(2*sizeX); i14 = i6+(2*sizeX); i15 = i7+(2*sizeX); dx = idX-int(idX); dy = idY-int(idY); v0 = rdtable(size, wf, rid(i0 , mid, C)); v1 = rdtable(size, wf, rid(i1 , mid, C)); v2 = rdtable(size, wf, rid(i2 , mid, C)); v3 = rdtable(size, wf, rid(i3 , mid, C)); v4 = rdtable(size, wf, rid(i4 , mid, C)); v5 = rdtable(size, wf, rid(i5 , mid, C)); v6 = rdtable(size, wf, rid(i6 , mid, C)); v7 = rdtable(size, wf, rid(i7 , mid, C)); v8 = rdtable(size, wf, rid(i8 , mid, C)); v9 = rdtable(size, wf, rid(i9 , mid, C)); v10 = rdtable(size, wf, rid(i10, mid, C)); v11 = rdtable(size, wf, rid(i11, mid, C)); v12 = rdtable(size, wf, rid(i12, mid, C)); v13 = rdtable(size, wf, rid(i13, mid, C)); v14 = rdtable(size, wf, rid(i14, mid, C)); v15 = rdtable(size, wf, rid(i15, mid, C)); }; }; In the interest of brevity, we'll stop explaining here. If you have any more questions, feel free to open an issue on faustlibraries and tag @magnetophon. Selectors (Conditions) (ba.)if if-then-else implemented with a select2. WARNING: since select2 is strict (always evaluating both branches), the resulting if does not have the usual \"lazy\" semantic of the C if form, and thus cannot be used to protect against forbidden computations like division-by-zero for instance. Usage if(cond, then, else) : _ Where: cond : condition then : signal selected while cond is true else : signal selected while cond is false (ba.)ifNc if-then-elseif-then-...elsif-then-else implemented on top of ba.if . Usage ifNc((cond1,then1, cond2,then2, ... condN,thenN, else)) : _ or ifNc(Nc, cond1,then1, cond2,then2, ... condN,thenN, else) : _ or cond1,then1, cond2,then2, ... condN,thenN, else : ifNc(Nc) : _ Where: Nc : number of branches/conditions (constant numerical expression) condX : condition thenX : signal selected if condX is the 1st true condition else : signal selected if all the cond1-condN conditions are false Example test program process(x,y) = ifNc((xy,+1, 0)); or process(x,y) = ifNc(2, xy,+1, 0); or process(x,y) = xy,+1, 0 : ifNc(2); outputs -1 if xy , 0 otherwise. (ba.)ifNcNo ifNcNo(Nc,No) is similar to ifNc(Nc) above but then/else branches have No outputs. Usage ifNcNo(Nc,No, cond1,then1, cond2,then2, ... condN,thenN, else) : sig.bus(No) Where: Nc : number of branches/conditions (constant numerical expression) No : number of outputs (constant numerical expression) condX : condition thenX : list of No signals selected if condX is the 1st true condition else : list of No signals selected if all the cond1-condN conditions are false Example test program process(x) = ifNcNo(2,3, x<0, -1,-1,-1, x>0, 1,1,1, 0,0,0); outputs -1,-1,-1 if x<0 , 1,1,1 if x>0 , 0,0,0 otherwise. (ba.)selector Selects the ith input among n at compile time. Usage selector(I,N) _,_,_,_ : selector(2,4) : _ // selects the 3rd input among 4 Where: I : input to select (int, numbered from 0, known at compile time) N : number of inputs (int, known at compile time, N > I) There is also cselector for selecting among complex input signals of the form (real,imag). (ba.)select2stereo Select between 2 stereo signals. Usage _,_,_,_ : select2stereo(bpc) : _,_ Where: bpc : the selector switch (0/1) (ba.)selectn Selects the ith input among N at run time. Usage selectn(N,i) _,_,_,_ : selectn(4,2) : _ // selects the 3rd input among 4 Where: N : number of inputs (int, known at compile time, N > 0) i : input to select (int, numbered from 0) Example test program N = 64; process = par(n, N, (par(i,N,i) : selectn(N,n))); (ba.)selectmulti Selects the ith circuit among N at run time (all should have the same number of inputs and outputs) with a crossfade. Usage selectmulti(n,lgen,id) Where: n : crossfade in samples lgen : list of circuits id : circuit to select (int, numbered from 0) Example test program process = selectmulti(ma.SR/10, ((3,9),(2,8),(5,7)), nentry(\"choice\", 0, 0, 2, 1)); process = selectmulti(ma.SR/10, ((_*3,_*9),(_*2,_*8),(_*5,_*7)), nentry(\"choice\", 0, 0, 2, 1)); (ba.)selectoutn Route input to the output among N at run time. Usage _ : selectoutn(N, i) : si.bus(N) Where: N : number of outputs (int, known at compile time, N > 0) i : output number to route to (int, numbered from 0) (i.e. slider) Example test program process = 1 : selectoutn(3, sel) : par(i, 3, vbargraph(\"v.bargraph %i\", 0, 1)); sel = hslider(\"volume\", 0, 0, 2, 1) : int; Other (ba.)latch Latch input on positive-going transition of trig:\"records\" the input when trig switches from 0 to 1, outputs a frozen values everytime else. Usage _ : latch(trig) : _ Where: trig : hold trigger (0 for hold, 1 for bypass) (ba.)sAndH Sample And Hold: \"records\" the input when trig is 1, outputs a frozen value when trig is 0. sAndH is a standard Faust function. Usage _ : sAndH(trig) : _ Where: trig : hold trigger (0 for hold, 1 for bypass) (ba.)downSample Down sample a signal. WARNING: this function doesn't change the rate of a signal, it just holds samples... downSample is a standard Faust function. Usage _ : downSample(freq) : _ Where: freq : new rate in Hz (ba.)peakhold Outputs current max value above zero. Usage _ : peakhold(mode) : _ Where: mode means: 0 - Pass through. A single sample 0 trigger will work as a reset. 1 - Track and hold max value. (ba.)peakholder While peak-holder functions are scarcely discussed in the literature (please do send me an email if you know otherwise), common sense tells that the expected behaviour should be as follows: the absolute value of the input signal is compared with the output of the peak-holder; if the input is greater or equal to the output, a new peak is detected and sent to the output; otherwise, a timer starts and the current peak is held for N samples; once the timer is out and no new peaks have been detected, the absolute value of the current input becomes the new peak. Usage _ : peakholder(holdTime) : _ Where: holdTime : hold time in samples (ba.)impulsify Turns a signal into an impulse with the value of the current sample (0.3,0.2,0.1 becomes 0.3,0.0,0.0). This function is typically used with a button to turn its output into an impulse. impulsify is a standard Faust function. Usage button(\"gate\") : impulsify; (ba.)automat Record and replay in a loop the successives values of the input signal. Usage hslider(...) : automat(t, size, init) : _ Where: t : tempo in BPM size : number of items in the loop init : init value in the loop (ba.)bpf bpf is an environment (a group of related definitions) that can be used to create break-point functions. It contains three functions: start(x,y) to start a break-point function end(x,y) to end a break-point function point(x,y) to add intermediate points to a break-point function A minimal break-point function must contain at least a start and an end point: f = bpf.start(x0,y0) : bpf.end(x1,y1); A more involved break-point function can contains any number of intermediate points: f = bpf.start(x0,y0) : bpf.point(x1,y1) : bpf.point(x2,y2) : bpf.end(x3,y3); In any case the x_{i} must be in increasing order (for all i , x_{i} < x_{i+1} ). For example the following definition: f = bpf.start(x0,y0) : ... : bpf.point(xi,yi) : ... : bpf.end(xn,yn); implements a break-point function f such that: f(x) = y_{0} when x < x_{0} f(x) = y_{n} when x > x_{n} f(x) = y_{i} + (y_{i+1}-y_{i})*(x-x_{i})/(x_{i+1}-x_{i}) when x_{i} <= x and x < x_{i+1} bpf is a standard Faust function. (ba.)listInterp Linearly interpolates between the elements of a list. Usage index = 1.69; // range is 0-4 process = listInterp((800,400,350,450,325),index); Where: index : the index (float) to interpolate between the different values. The range of index depends on the size of the list. (ba.)bypass1 Takes a mono input signal, route it to e and bypass it if bpc = 1 . When bypassed, e is feed with zeros so that its state is cleanup up. bypass1 is a standard Faust function. Usage _ : bypass1(bpc,e) : _ Where: bpc : bypass switch (0/1) e : a mono effect (ba.)bypass2 Takes a stereo input signal, route it to e and bypass it if bpc = 1 . When bypassed, e is feed with zeros so that its state is cleanup up. bypass2 is a standard Faust function. Usage _,_ : bypass2(bpc,e) : _,_ Where: bpc : bypass switch (0/1) e : a stereo effect (ba.)bypass1to2 Bypass switch for effect e having mono input signal and stereo output. Effect e is bypassed if bpc = 1 .When bypassed, e is feed with zeros so that its state is cleanup up. bypass1to2 is a standard Faust function. Usage _ : bypass1to2(bpc,e) : _,_ Where: bpc : bypass switch (0/1) e : a mono-to-stereo effect (ba.)bypass_fade Bypass an arbitrary (N x N) circuit with 'n' samples crossfade. Inputs and outputs signals are faded out when 'e' is bypassed, so that 'e' state is cleanup up. Once bypassed the effect is replaced by par(i,N,_) . Bypassed circuits can be chained. Usage _ : bypass_fade(n,b,e) : _ or _,_ : bypass_fade(n,b,e) : _,_ n : number of samples for the crossfade b : bypass switch (0/1) e : N x N circuit Example test program process = bypass_fade(ma.SR/10, checkbox(\"bypass echo\"), echo); process = bypass_fade(ma.SR/10, checkbox(\"bypass reverb\"), freeverb); (ba.)toggle Triggered by the change of 0 to 1, it toggles the output value between 0 and 1. Usage _ : toggle : _ Example test program button(\"toggle\") : toggle : vbargraph(\"output\", 0, 1) (an.amp_follower(0.1) > 0.01) : toggle : vbargraph(\"output\", 0, 1) // takes audio input (ba.)on_and_off The first channel set the output to 1, the second channel to 0. Usage _,_ : on_and_off : _ Example test program button(\"on\"), button(\"off\") : on_and_off : vbargraph(\"output\", 0, 1) (ba.)bitcrusher Produce distortion by reduction of the signal resolution. Usage _ : bitcrusher(nbits) : _ Where: nbits : the number of bits of the wanted resolution Sliding Reduce Provides various operations on the last n samples using a high order slidingReduce(op,n,maxN,disabledVal,x) fold-like function: slidingSum(n) : the sliding sum of the last n input samples, CPU-light slidingSump(n,maxN) : the sliding sum of the last n input samples, numerically stable \"forever\" slidingMax(n,maxN) : the sliding max of the last n input samples slidingMin(n,maxN) : the sliding min of the last n input samples slidingMean(n) : the sliding mean of the last n input samples, CPU-light slidingMeanp(n,maxN) : the sliding mean of the last n input samples, numerically stable \"forever\" slidingRMS(n) : the sliding RMS of the last n input samples, CPU-light slidingRMSp(n,maxN) : the sliding RMS of the last n input samples, numerically stable \"forever\" Working Principle If we want the maximum of the last 8 values, we can do that as: simpleMax(x) = ( ( max(x@0,x@1), max(x@2,x@3) ) :max ), ( ( max(x@4,x@5), max(x@6,x@7) ) :max ) :max; max(x@2,x@3) is the same as max(x@0,x@1)@2 but the latter re-uses a value we already computed,so is more efficient. Using the same trick for values 4 trough 7, we can write: efficientMax(x)= ( ( max(x@0,x@1), max(x@0,x@1)@2 ) :max ), ( ( max(x@0,x@1), max(x@0,x@1)@2 ) :max@4 ) :max; We can rewrite it recursively, so it becomes possible to get the maximum at have any number of values, as long as it's a power of 2. recursiveMax = case { (1,x) => x; (N,x) => max(recursiveMax(N/2,x), recursiveMax(N/2,x)@(N/2)); }; What if we want to look at a number of values that's not a power of 2? For each value, we will have to decide whether to use it or not. If n is bigger than the index of the value, we use it, otherwise we replace it with ( 0-(ma.MAX) ): variableMax(n,x) = max( max( ( (x@0 : useVal(0)), (x@1 : useVal(1)) ):max, ( (x@2 : useVal(2)), (x@3 : useVal(3)) ):max ), max( ( (x@4 : useVal(4)), (x@5 : useVal(5)) ):max, ( (x@6 : useVal(6)), (x@7 : useVal(7)) ):max ) ) with { useVal(i) = select2((n>=i) , (0-(ma.MAX)),_); }; Now it becomes impossible to re-use any values. To fix that let's first look at how we'd implement it using recursiveMax, but with a fixed n that is not a power of 2. For example, this is how you'd do it with n=3 : binaryMaxThree(x) = ( recursiveMax(1,x)@0, // the first x recursiveMax(2,x)@1 // the second and third x ):max; n=6 binaryMaxSix(x) = ( recursiveMax(2,x)@0, // first two recursiveMax(4,x)@2 // third trough sixth ):max; Note that recursiveMax(2,x) is used at a different delay then in binaryMaxThree , since it represents 1 and 2, not 2 and 3. Each block is delayed the combined size of the previous blocks. n=7 binaryMaxSeven(x) = ( ( recursiveMax(1,x)@0, // first x recursiveMax(2,x)@1 // second and third ):max, ( recursiveMax(4,x)@3 // fourth trough seventh ) ):max; To make a variable version, we need to know which powers of two are used, and at which delay time. Then it becomes a matter of: lining up all the different block sizes in parallel: sequentialOperatorParOut() delaying each the appropriate amount: sumOfPrevBlockSizes() turning it on or off: useVal() getting the maximum of all of them: parallelOp() In Faust, we can only do that for a fixed maximum number of values: maxN , known at compile time. (ba.)slidingReduce Fold-like high order function. Apply a commutative binary operation op to the last n consecutive samples of a signal x . For example : slidingReduce(max,128,128,0-(ma.MAX)) will compute the maximum of the last 128 samples. The output is updated each sample, unlike reduce, where the output is constant for the duration of a block. Usage _ : slidingReduce(op,n,maxN,disabledVal) : _ Where: n : the number of values to process maxN : the maximum number of values to process (int, known at compile time, maxN > 0) op : the operator. Needs to be a commutative one. disabledVal : the value to use when we want to ignore a value. In other words, op(x,disabledVal) should equal to x . For example, +(x,0) equals x and min(x,ma.MAX) equals x . So if we want to calculate the sum, we need to give 0 as disabledVal , and if we want the minimum, we need to give ma.MAX as disabledVal . (ba.)slidingSum The sliding sum of the last n input samples. It will eventually run into numerical trouble when there is a persistent dc component. If that matters in your application, use the more CPU-intensive ba.slidingSump . Usage _ : slidingSum(n) : _ Where: n : the number of values to process (ba.)slidingSump The sliding sum of the last n input samples. It uses a lot more CPU than ba.slidingSum , but is numerically stable \"forever\" in return. Usage _ : slidingSump(n,maxN) : _ Where: n : the number of values to process maxN : the maximum number of values to process (int, known at compile time, maxN > 0) (ba.)slidingMax The sliding maximum of the last n input samples. Usage _ : slidingMax(n,maxN) : _ Where: n : the number of values to process maxN : the maximum number of values to process (int, known at compile time, maxN > 0) (ba.)slidingMin The sliding minimum of the last n input samples. Usage _ : slidingMin(n,maxN) : _ Where: n : the number of values to process maxN : the maximum number of values to process (int, known at compile time, maxN > 0) (ba.)slidingMean The sliding mean of the last n input samples. It will eventually run into numerical trouble when there is a persistent dc component. If that matters in your application, use the more CPU-intensive ba.slidingMeanp . Usage _ : slidingMean(n) : _ Where: n : the number of values to process (ba.)slidingMeanp The sliding mean of the last n input samples. It uses a lot more CPU than ba.slidingMean , but is numerically stable \"forever\" in return. Usage _ : slidingMeanp(n,maxN) : _ Where: n : the number of values to process maxN : the maximum number of values to process (int, known at compile time, maxN > 0) (ba.)slidingRMS The root mean square of the last n input samples. It will eventually run into numerical trouble when there is a persistent dc component. If that matters in your application, use the more CPU-intensive ba.slidingRMSp . Usage _ : slidingRMS(n) : _ Where: n : the number of values to process (ba.)slidingRMSp The root mean square of the last n input samples. It uses a lot more CPU than ba.slidingRMS , but is numerically stable \"forever\" in return. Usage _ : slidingRMSp(n,maxN) : _ Where: n : the number of values to process maxN : the maximum number of values to process (int, known at compile time, maxN > 0) Parallel Operators Provides various operations on N parallel inputs using a high order parallelOp(op,N,x) function: parallelMax(N) : the max of n parallel inputs parallelMin(N) : the min of n parallel inputs parallelMean(N) : the mean of n parallel inputs parallelRMS(N) : the RMS of n parallel inputs (ba.)parallelOp Apply a commutative binary operation op to N parallel inputs. usage si.bus(N) : parallelOp(op,N) : _ where: N : the number of parallel inputs known at compile time op : the operator which needs to be commutative (ba.)parallelMax The maximum of N parallel inputs. Usage si.bus(N) : parallelMax(N) : _ Where: N : the number of parallel inputs known at compile time (ba.)parallelMin The minimum of N parallel inputs. Usage si.bus(N) : parallelMin(N) : _ Where: N : the number of parallel inputs known at compile time (ba.)parallelMean The mean of N parallel inputs. Usage si.bus(N) : parallelMean(N) : _ Where: N : the number of parallel inputs known at compile time (ba.)parallelRMS The RMS of N parallel inputs. Usage si.bus(N) : parallelRMS(N) : _ Where: N : the number of parallel inputs known at compile time","title":" basics "},{"location":"libs/basics/#basicslib","text":"A library of basic elements. Its official prefix is ba .","title":"basics.lib"},{"location":"libs/basics/#references","text":"https://github.com/grame-cncm/faustlibraries/blob/master/basics.lib","title":"References"},{"location":"libs/basics/#conversion-tools","text":"","title":"Conversion Tools"},{"location":"libs/basics/#basamp2sec","text":"Converts a number of samples to a duration in seconds at the current sampling rate (see ma.SR ). samp2sec is a standard Faust function.","title":"(ba.)samp2sec"},{"location":"libs/basics/#usage","text":"samp2sec(n) : _ Where: n : number of samples","title":"Usage"},{"location":"libs/basics/#basec2samp","text":"Converts a duration in seconds to a number of samples at the current sampling rate (see ma.SR ). samp2sec is a standard Faust function.","title":"(ba.)sec2samp"},{"location":"libs/basics/#usage_1","text":"sec2samp(d) : _ Where: d : duration in seconds","title":"Usage"},{"location":"libs/basics/#badb2linear","text":"dB-to-linear value converter. It can be used to convert an amplitude in dB to a linear gain ]0-N]. db2linear is a standard Faust function.","title":"(ba.)db2linear"},{"location":"libs/basics/#usage_2","text":"db2linear(l) : _ Where: l : amplitude in dB","title":"Usage"},{"location":"libs/basics/#balinear2db","text":"linea-to-dB value converter. It can be used to convert a linear gain ]0-N] to an amplitude in dB. linear2db is a standard Faust function.","title":"(ba.)linear2db"},{"location":"libs/basics/#usage_3","text":"linear2db(g) : _ Where: g : a linear gain","title":"Usage"},{"location":"libs/basics/#balin2loggain","text":"Converts a linear gain (0-1) to a log gain (0-1).","title":"(ba.)lin2LogGain"},{"location":"libs/basics/#usage_4","text":"lin2LogGain(n) : _ Where: n : the linear gain","title":"Usage"},{"location":"libs/basics/#balog2lingain","text":"Converts a log gain (0-1) to a linear gain (0-1).","title":"(ba.)log2LinGain"},{"location":"libs/basics/#usage_5","text":"log2LinGain(n) : _ Where: n : the log gain","title":"Usage"},{"location":"libs/basics/#batau2pole","text":"Returns a real pole giving exponential decay. Note that t60 (time to decay 60 dB) is ~6.91 time constants. tau2pole is a standard Faust function.","title":"(ba.)tau2pole"},{"location":"libs/basics/#usage_6","text":"_ : smooth(tau2pole(tau)) : _ Where: tau : time-constant in seconds","title":"Usage"},{"location":"libs/basics/#bapole2tau","text":"Returns the time-constant, in seconds, corresponding to the given real, positive pole in (0-1). pole2tau is a standard Faust function.","title":"(ba.)pole2tau"},{"location":"libs/basics/#usage_7","text":"pole2tau(pole) : _ Where: pole : the pole","title":"Usage"},{"location":"libs/basics/#bamidikey2hz","text":"Converts a MIDI key number to a frequency in Hz (MIDI key 69 = A440). midikey2hz is a standard Faust function.","title":"(ba.)midikey2hz"},{"location":"libs/basics/#usage_8","text":"midikey2hz(mk) : _ Where: mk : the MIDI key number","title":"Usage"},{"location":"libs/basics/#bahz2midikey","text":"Converts a frequency in Hz to a MIDI key number (MIDI key 69 = A440). hz2midikey is a standard Faust function.","title":"(ba.)hz2midikey"},{"location":"libs/basics/#usage_9","text":"hz2midikey(freq) : _ Where: freq : frequency in Hz","title":"Usage"},{"location":"libs/basics/#basemi2ratio","text":"Converts semitones in a frequency multiplicative ratio. semi2ratio is a standard Faust function.","title":"(ba.)semi2ratio"},{"location":"libs/basics/#usage_10","text":"semi2ratio(semi) : _ Where: semi : number of semitone","title":"Usage"},{"location":"libs/basics/#baratio2semi","text":"Converts a frequency multiplicative ratio in semitones. ratio2semi is a standard Faust function.","title":"(ba.)ratio2semi"},{"location":"libs/basics/#usage_11","text":"ratio2semi(ratio) : _ Where: ratio : frequency multiplicative ratio","title":"Usage"},{"location":"libs/basics/#bacent2ratio","text":"Converts cents in a frequency multiplicative ratio.","title":"(ba.)cent2ratio"},{"location":"libs/basics/#usage_12","text":"cent2ratio(cent) : _ Where: cent : number of cents","title":"Usage"},{"location":"libs/basics/#baratio2cent","text":"Converts a frequency multiplicative ratio in cents.","title":"(ba.)ratio2cent"},{"location":"libs/basics/#usage_13","text":"ratio2cent(ratio) : _ Where: ratio : frequency multiplicative ratio","title":"Usage"},{"location":"libs/basics/#bapianokey2hz","text":"Converts a piano key number to a frequency in Hz (piano key 49 = A440).","title":"(ba.)pianokey2hz"},{"location":"libs/basics/#usage_14","text":"pianokey2hz(pk) : _ Where: pk : the piano key number","title":"Usage"},{"location":"libs/basics/#bahz2pianokey","text":"Converts a frequency in Hz to a piano key number (piano key 49 = A440).","title":"(ba.)hz2pianokey"},{"location":"libs/basics/#usage_15","text":"hz2pianokey(freq) : _ Where: freq : frequency in Hz","title":"Usage"},{"location":"libs/basics/#counters-and-timetempo-tools","text":"","title":"Counters and Time/Tempo Tools"},{"location":"libs/basics/#bacounter","text":"Starts counting 0, 1, 2, 3..., and raise the current integer value at each upfront of the trigger.","title":"(ba.)counter"},{"location":"libs/basics/#usage_16","text":"counter(trig) : _ Where: trig : the trigger signal, each upfront will move the counter to the next integer","title":"Usage"},{"location":"libs/basics/#bacountdown","text":"Starts counting down from n included to 0. While trig is 1 the output is n. The countdown starts with the transition of trig from 1 to 0. At the end of the countdown the output value will remain at 0 until the next trig. countdown is a standard Faust function.","title":"(ba.)countdown"},{"location":"libs/basics/#usage_17","text":"countdown(n,trig) : _ Where: n : the starting point of the countdown trig : the trigger signal (1: start at n ; 0: decrease until 0)","title":"Usage"},{"location":"libs/basics/#bacountup","text":"Starts counting up from 0 to n included. While trig is 1 the output is 0. The countup starts with the transition of trig from 1 to 0. At the end of the countup the output value will remain at n until the next trig. countup is a standard Faust function.","title":"(ba.)countup"},{"location":"libs/basics/#usage_18","text":"countup(n,trig) : _ Where: n : the maximum count value trig : the trigger signal (1: start at 0; 0: increase until n )","title":"Usage"},{"location":"libs/basics/#basweep","text":"Counts from 0 to period-1 repeatedly, generating a sawtooth waveform, like os.lf_rawsaw , starting at 1 when run transitions from 0 to 1. Outputs zero while run is 0.","title":"(ba.)sweep"},{"location":"libs/basics/#usage_19","text":"sweep(period,run) : _","title":"Usage"},{"location":"libs/basics/#batime","text":"A simple timer that counts every samples from the beginning of the process. time is a standard Faust function.","title":"(ba.)time"},{"location":"libs/basics/#usage_20","text":"time : _","title":"Usage"},{"location":"libs/basics/#baramp","text":"A linear ramp with a slope of '(+/-)1/n' samples to reach the next target value.","title":"(ba.)ramp"},{"location":"libs/basics/#usage_21","text":"_ : ramp(n) : _ Where: n : number of samples to increment/decrement the value by one","title":"Usage"},{"location":"libs/basics/#baline","text":"A ramp interpolator that generates a linear transition to reach a target value: the interpolation process restarts each time a new and distinct input value is received it utilizes 'n' samples to achieve the transition to the target value after reaching the target value, the output value is maintained.","title":"(ba.)line"},{"location":"libs/basics/#usage_22","text":"_ : line(n) : _ Where: n : number of samples to reach the new target received at its input","title":"Usage"},{"location":"libs/basics/#batempo","text":"Converts a tempo in BPM into a number of samples.","title":"(ba.)tempo"},{"location":"libs/basics/#usage_23","text":"tempo(t) : _ Where: t : tempo in BPM","title":"Usage"},{"location":"libs/basics/#baperiod","text":"Basic sawtooth wave of period p .","title":"(ba.)period"},{"location":"libs/basics/#usage_24","text":"period(p) : _ Where: p : period as a number of samples","title":"Usage"},{"location":"libs/basics/#bapulse","text":"Pulses (like 10000) generated at period p .","title":"(ba.)pulse"},{"location":"libs/basics/#usage_25","text":"pulse(p) : _ Where: p : period as a number of samples","title":"Usage"},{"location":"libs/basics/#bapulsen","text":"Pulses (like 11110000) of length n generated at period p .","title":"(ba.)pulsen"},{"location":"libs/basics/#usage_26","text":"pulsen(n,p) : _ Where: n : pulse length as a number of samples p : period as a number of samples","title":"Usage"},{"location":"libs/basics/#bacycle","text":"Split nonzero input values into n cycles.","title":"(ba.)cycle"},{"location":"libs/basics/#usage_27","text":"_ : cycle(n) : si.bus(n) Where: n : the number of cycles/output signals","title":"Usage"},{"location":"libs/basics/#babeat","text":"Pulses at tempo t . beat is a standard Faust function.","title":"(ba.)beat"},{"location":"libs/basics/#usage_28","text":"beat(t) : _ Where: t : tempo in BPM","title":"Usage"},{"location":"libs/basics/#bapulse_countup","text":"Starts counting up pulses. While trig is 1 the output is counting up, while trig is 0 the counter is reset to 0.","title":"(ba.)pulse_countup"},{"location":"libs/basics/#usage_29","text":"_ : pulse_countup(trig) : _ Where: trig : the trigger signal (1: start at next pulse; 0: reset to 0)","title":"Usage"},{"location":"libs/basics/#bapulse_countdown","text":"Starts counting down pulses. While trig is 1 the output is counting down, while trig is 0 the counter is reset to 0.","title":"(ba.)pulse_countdown"},{"location":"libs/basics/#usage_30","text":"_ : pulse_countdown(trig) : _ Where: trig : the trigger signal (1: start at next pulse; 0: reset to 0)","title":"Usage"},{"location":"libs/basics/#bapulse_countup_loop","text":"Starts counting up pulses from 0 to n included. While trig is 1 the output is counting up, while trig is 0 the counter is reset to 0. At the end of the countup (n) the output value will be reset to 0.","title":"(ba.)pulse_countup_loop"},{"location":"libs/basics/#usage_31","text":"_ : pulse_countup_loop(n,trig) : _ Where: n : the highest number of the countup (included) before reset to 0 trig : the trigger signal (1: start at next pulse; 0: reset to 0)","title":"Usage"},{"location":"libs/basics/#bapulse_countdown_loop","text":"Starts counting down pulses from 0 to n included. While trig is 1 the output is counting down, while trig is 0 the counter is reset to 0. At the end of the countdown (n) the output value will be reset to 0.","title":"(ba.)pulse_countdown_loop"},{"location":"libs/basics/#usage_32","text":"_ : pulse_countdown_loop(n,trig) : _ Where: n : the highest number of the countup (included) before reset to 0 trig : the trigger signal (1: start at next pulse; 0: reset to 0)","title":"Usage"},{"location":"libs/basics/#baresetctr","text":"Function that lets through the mth impulse out of each consecutive group of n impulses.","title":"(ba.)resetCtr"},{"location":"libs/basics/#usage_33","text":"_ : resetCtr(n,m) : _ Where: n : the total number of impulses being split m : index of impulse to allow to be output","title":"Usage"},{"location":"libs/basics/#array-processingpattern-matching","text":"","title":"Array Processing/Pattern Matching"},{"location":"libs/basics/#bacount","text":"Count the number of elements of list l. count is a standard Faust function.","title":"(ba.)count"},{"location":"libs/basics/#usage_34","text":"count(l) count((10,20,30,40)) -> 4 Where: l : list of elements","title":"Usage"},{"location":"libs/basics/#batake","text":"Take an element from a list. take is a standard Faust function.","title":"(ba.)take"},{"location":"libs/basics/#usage_35","text":"take(P,l) take(3,(10,20,30,40)) -> 30 Where: P : position (int, known at compile time, P > 0) l : list of elements","title":"Usage"},{"location":"libs/basics/#basubseq","text":"Extract a part of a list.","title":"(ba.)subseq"},{"location":"libs/basics/#usage_36","text":"subseq(l, P, N) subseq((10,20,30,40,50,60), 1, 3) -> (20,30,40) subseq((10,20,30,40,50,60), 4, 1) -> 50 Where: l : list P : start point (int, known at compile time, 0: begin of list) N : number of elements (int, known at compile time)","title":"Usage"},{"location":"libs/basics/#note","text":"Faust doesn't have proper lists. Lists are simulated with parallel compositions and there is no empty list.","title":"Note:"},{"location":"libs/basics/#function-tabulation","text":"The purpose of function tabulation is to speed up the computation of heavy functions over an interval, so that the computation at runtime can be faster than directly using the function. Two techniques are implemented: tabulate computes the function in a table and read the points using interpolation. tabulateNd is the N dimensions version of tabulate tabulate_chebychev uses Chebyshev polynomial approximation","title":"Function tabulation"},{"location":"libs/basics/#comparison-program-example","text":"process = line(50000, r0, r1) <: FX-tb,FX-ch : par(i, 2, maxerr) with { C = 0; FX = sin; NX = 50; CD = 3; r0 = 0; r1 = ma.PI; tb(x) = ba.tabulate(C, FX, NX*(CD+1), r0, r1, x).cub; ch(x) = ba.tabulate_chebychev(C, FX, NX, CD, r0, r1, x); maxerr = abs : max ~ _; line(n, x0, x1) = x0 + (ba.time%n)/n * (x1-x0); };","title":"Comparison program example"},{"location":"libs/basics/#batabulate","text":"Tabulate a 1D function over the range [r0, r1] for access via nearest-value, linear, cubic interpolation. In other words, the uniformly tabulated function can be evaluated using interpolation of order 0 (none), 1 (linear), or 3 (cubic).","title":"(ba.)tabulate"},{"location":"libs/basics/#usage_37","text":"tabulate(C, FX, S, r0, r1, x).(val|lin|cub) : _ C : whether to dynamically force the x value to the range [r0, r1]: 1 forces the check, 0 deactivates it (constant numerical expression) FX : unary function Y=F(X) with one output (scalar function of one variable) S : size of the table in samples (constant numerical expression) r0 : minimum value of argument x r1 : maximum value of argument x tabulate(C, FX, S, r0, r1, x).val uses the value in the table closest to x tabulate(C, FX, S, r0, r1, x).lin evaluates at x using linear interpolation between the closest stored values tabulate(C, FX, S, r0, r1, x).cub evaluates at x using cubic interpolation between the closest stored values","title":"Usage"},{"location":"libs/basics/#example-test-program","text":"midikey2hz(mk) = ba.tabulate(1, ba.midikey2hz, 512, 0, 127, mk).lin; process = midikey2hz(ba.time), ba.midikey2hz(ba.time);","title":"Example test program"},{"location":"libs/basics/#batabulate_chebychev","text":"Tabulate a 1D function over the range [r0, r1] for access via Chebyshev polynomial approximation. In contrast to (ba.)tabulate , which interpolates only between tabulated samples, (ba.)tabulate_chebychev stores coefficients of Chebyshev polynomials that are evaluated to provide better approximations in many cases. Two new arguments controlling this are NX, the number of segments into which [r0, r1] is divided, and CD, the maximum Chebyshev polynomial degree to use for each segment. A rdtable of size NX*(CD+1) is internally used. Note that processing r1 the last point in the interval is not safe. So either be sure the input stays in [r0, r1[ or use C = 1 .","title":"(ba.)tabulate_chebychev"},{"location":"libs/basics/#usage_38","text":"_ : tabulate_chebychev(C, FX, NX, CD, r0, r1) : _ C : whether to dynamically force the value to the range [r0, r1]: 1 forces the check, 0 deactivates it (constant numerical expression) FX : unary function Y=F(X) with one output (scalar function of one variable) NX : number of segments for uniformly partitioning [r0, r1] (constant numerical expression) CD : maximum polynomial degree for each Chebyshev polynomial (constant numerical expression) r0 : minimum value of argument x r1 : maximum value of argument x","title":"Usage"},{"location":"libs/basics/#example-test-program_1","text":"midikey2hz_chebychev(mk) = ba.tabulate_chebychev(1, ba.midikey2hz, 100, 4, 0, 127, mk); process = midikey2hz_chebychev(ba.time), ba.midikey2hz(ba.time);","title":"Example test program"},{"location":"libs/basics/#batabulatend","text":"Tabulate an nD function for access via nearest-value or linear or cubic interpolation. In other words, the tabulated function can be evaluated using interpolation of order 0 (none), 1 (linear), or 3 (cubic). The table size and parameter range of each dimension can and must be separately specified. You can use it anywhere you have an expensive function with multiple parameters with known ranges. You could use it to build a wavetable synth, for example. The number of dimensions is deduced from the number of parameters you give, see below. Note that processing the last point in each interval is not safe. So either be sure the inputs stay in their respective ranges, or use C = 1 . Similarly for the first point when doing cubic interpolation.","title":"(ba.)tabulateNd"},{"location":"libs/basics/#usage_39","text":"tabulateNd(C, function, (parameters) ).(val|lin|cub) : _ C : whether to dynamically force the parameter values for each dimension to the ranges specified in parameters: 1 forces the check, 0 deactivates it (constant numerical expression) function : the function we want to tabulate. Can have any number of inputs, but needs to have just one output. (parameters) : sizes, ranges and read values. Note: these need to be in brackets, to make them one entity. If N is the number of dimensions, we need: N times S : number of values to store for this dimension (constant numerical expression) N times r0 : minimum value of this dimension N times r1 : maximum value of this dimension N times x : read value of this dimension By providing these parameters, you indirectly specify the number of dimensions; it's the number of parameters divided by 4. The user facing functions are: tabulateNd(C, function, S, parameters).val Uses the value in the table closest to x. tabulateNd(C, function, S, parameters).lin Evaluates at x using linear interpolation between the closest stored values. tabulateNd(C, function, S, parameters).cub Evaluates at x using cubic interpolation between the closest stored values.","title":"Usage"},{"location":"libs/basics/#example-test-program_2","text":"powSin(x,y) = sin(pow(x,y)); // The function we want to tabulate powSinTable(x,y) = ba.tabulateNd(1, powSin, (sizeX,sizeY, rx0,ry0, rx1,ry1, x,y) ).lin; sizeX = 512; // table size of the first parameter sizeY = 512; // table size of the second parameter rx0 = 2; // start of the range of the first parameter ry0 = 2; // start of the range of the second parameter rx1 = 10; // end of the range of the first parameter ry1 = 10; // end of the range of the second parameter x = hslider(\"x\", rx0, rx0, rx1, 0.001):si.smoo; y = hslider(\"y\", ry0, ry0, ry1, 0.001):si.smoo; process = powSinTable(x,y), powSin(x,y);","title":"Example test program"},{"location":"libs/basics/#working-principle","text":"The .val function just outputs the closest stored value. The .lin and .cub functions interpolate in N dimensions.","title":"Working principle"},{"location":"libs/basics/#multi-dimensional-interpolation","text":"To understand what it means to interpolate in N dimensions, here's a quick reminder on the general principle of 2D linear interpolation: We have a grid of values, and we want to find the value at a point (x, y) within this grid. We first find the four closest points (A, B, C, D) in the grid surrounding the point (x, y). Then, we perform linear interpolation in the x-direction between points A and B, and between points C and D. This gives us two new points E and F. Finally, we perform linear interpolation in the y-direction between points E and F to get our value. To implement this in Faust, we need N sequential groups of interpolators, where N is the number of dimensions. Each group feeds into the next, with the last \"group\" being a single interpolator, and the group before it containing one interpolator for each input of the group it's feeding. Some examples: Our 2D linear example has two interpolators feeding into one. A 3D linear interpolator has four interpolators feeding into two, feeding into one. A 2D cubic interpolater has four interpolators feeding into one. A 3D cubic interpolator has sixteen interpolators feeding into four, feeding into one. To understand which values we need to look up, let's consider the 2D linear example again. The four values going into the first group represent the four closest points (A, B, C, D) mentioned above. 1) The first interpolator gets: The closest value that is stored (A) The next value in the x dimension, keeping y fixed (B) 2) The second interpolator gets: One step over in the y dimension, keeping x fixed (C) One step over in both the x dimension and the y dimension (D) The outputs of these two interpolators are points E and F. In other words: the interpolated x values and, respectively, the following y values: The closest stored value of the y dimension One step forward in the y dimension The last interpolator takes these two values and interpolates them in the y dimension. To generalize for N dimensions and linear interpolation: The first group has 2^(n-1) parallel interpolators interpolating in the first dimension. The second group has 2^(n-2) parallel interpolators interpolating in the second dimension. The process continues until the n-th group, which has a single interpolator interpolating in the n-th dimension. The same principle applies to the cubic interpolation in nD. The only difference is that there would be 4^(n-1) parallel interpolators in the first group, compared to 2^(n-1) for linear interpolation. This is what the mixers function does. Besides the values, each interpolator also needs to know the weight of each value in it's output. Let's call this d , like in ba.interpolate . It is the same for each group of interpolators, since it correlates to a dimension. It's value is calculated the similarly to ba.interpolate : First we prepare a \"float table read-index\" for that dimension ( id in ba.tabulate ) If the table only had that dimension and it could read a float index, what would it be. Then we int the float index to get the value we have stored that is closest to, but lower than the input value; the actual index for that dimension. Our d is the difference between the float index and the actual index. The ids function calculates the id for each dimension and inside the mixer function they get turned into d s.","title":"Multi dimensional interpolation"},{"location":"libs/basics/#storage-method","text":"The elephant in the room is: how do we get these indexes? For that we need to know how the values are stored. We use one big table to store everything. To understand the concept, let's look at the 2D example again, and then we'll extend it to 3d and the general nD case. Let's say we have a 2D table with dimensions A and B where: A has 3 values between 0 and 5 and B has 4 values between 0 and 1. The 1D array representation of this 2D table will have a size of 3 * 4 = 12. The values are stored in the following way: First 3 values: A is 0, then 3, then 5 while B is at 0. Next 3 values: A changes from 0 to 5 while B is at 1/3. Next 3 values: A changes from 0 to 5 while B is at 2/3. Last 3 values: A changes from 0 to 5 while B is at 1. For the 3D example, let's extend the 2D example with an additional dimension C having 2 values between 0 and 2. The total size will be 3 * 4 * 2 = 24. The values are stored like so: First 3 values: A changes from 0 to 5, B is at 0, and C is at 0. Next 3 values: A changes from 0 to 5, B is at 1/3, and C is at 0. Next 3 values: A changes from 0 to 5, B is at 2/3, and C is at 0. Next 3 values: A changes from 0 to 5, B is at 1, and C is at 0. The last 12 values are the same as the first 12, but with C at 2. For the general n-dimensional case, we iterate through all dimensions, changing the values of the innermost dimension first, then moving towards the outer dimensions.","title":"Storage method"},{"location":"libs/basics/#read-indexes","text":"To get the float read index ( id ) corresponding to a particular dimension, we scale the function input value to be between 0 and 1, and multiply it by the size of that dimension minus one. To understand how we get the readIndex for .val , let's work trough how we'd do it in our 2D linear example. For simplicity's sake, the ranges of the inputs to our function are both 0 to 1. Say we wanted to read the value closest to x=0.5 and y=0 , so the id of x is 1 (the second value) and the id of y is 0 (first value). In this case, the read index is just the id of x , rounded to the nearest integer, just like in ba.tabulate . If we want to read the value belonging to x=0.5 and y=2/3 , things get more complicated. The id for y is now 2 , the third value. For each step in the y direction, we need to increase the index by 3 , the number of values that are stored for x . So the influence of the y is: the size of x times the rounded id of y . The final read index is the rounded id of x plus the influence of y . For the general nD case, we need to do the same operation N times, each feeding into the next. This operation is the riN function. We take four parameters: the size of the dimension before it prevSize , the index of the previous dimension prevIX , the current size sizeX and the current id idX . riN has 2 outputs, the size, for feeding into the next dimension's prevSize , and the read index feeding into the next dimension's prevIX . The size is the sizeX times prevSize . The read index is the rounded idX times prevSize added to the prevIX . Our final readIndex is the read index output of the last dimension. To get the read values for the interpolators need a pattern of offsets in each dimension, since we are looking for the read indexes surrounding the point of interest. These offsets are best explained by looking at the code of tabulate2d , the hardcoded 2D version: tabulate2d(C,function, sizeX,sizeY, rx0,ry0, rx1,ry1, x,y) = environment { size = sizeX*sizeY; // Maximum X index to access midX = sizeX-1; // Maximum Y index to access midY = sizeY-1; // Maximum total index to access mid = size-1; // Create the table wf = function(wfX,wfY); // Prepare the 'float' table read index for X idX = (x-rx0)/(rx1-rx0)*midX; // Prepare the 'float' table read index for Y idY = ((y-ry0)/(ry1-ry0))*midY; // table creation X: wfX = rx0+float(ba.time%sizeX)*(rx1-rx0) /float(midX); // table creation Y: wfY = ry0+ ((float(ba.time-(ba.time%sizeX)) /float(sizeX)) *(ry1-ry0)) /float(midY); // Limit the table read index in [0, mid] if C = 1 rid(x,mid, 0) = x; rid(x,mid, 1) = max(0, min(x, mid)); // Tabulate a binary 'FX' function on a range [rx0, rx1] [ry0, ry1] val(x,y) = rdtable(size, wf, readIndex); readIndex = rid( rid(int(idX+0.5),midX, C) +yOffset , mid, C); yOffset = sizeX*rid(int(idY),midY,C); // Tabulate a binary 'FX' function over the range [rx0, rx1] [ry0, ry1] with linear interpolation lin = it.interpolate_linear( dy , it.interpolate_linear(dx,v0,v1) , it.interpolate_linear(dx,v2,v3)) with { i0 = rid(int(idX), midX, C)+yOffset; i1 = i0+1; i2 = i0+sizeX; i3 = i1+sizeX; dx = idX-int(idX); dy = idY-int(idY); v0 = rdtable(size, wf, rid(i0, mid, C)); v1 = rdtable(size, wf, rid(i1, mid, C)); v2 = rdtable(size, wf, rid(i2, mid, C)); v3 = rdtable(size, wf, rid(i3, mid, C)); }; // Tabulate a binary 'FX' function over the range [rx0, rx1] [ry0, ry1] with cubic interpolation cub = it.interpolate_cubic( dy , it.interpolate_cubic(dx,v0,v1,v2,v3) , it.interpolate_cubic(dx,v4,v5,v6,v7) , it.interpolate_cubic(dx,v8,v9,v10,v11) , it.interpolate_cubic(dx,v12,v13,v14,v15) ) with { i0 = i4-sizeX; i1 = i5-sizeX; i2 = i6-sizeX; i3 = i7-sizeX; i4 = i5-1; i5 = rid(int(idX), midX, C)+yOffset; i6 = i5+1; i7 = i6+1; i8 = i4+sizeX; i9 = i5+sizeX; i10 = i6+sizeX; i11 = i7+sizeX; i12 = i4+(2*sizeX); i13 = i5+(2*sizeX); i14 = i6+(2*sizeX); i15 = i7+(2*sizeX); dx = idX-int(idX); dy = idY-int(idY); v0 = rdtable(size, wf, rid(i0 , mid, C)); v1 = rdtable(size, wf, rid(i1 , mid, C)); v2 = rdtable(size, wf, rid(i2 , mid, C)); v3 = rdtable(size, wf, rid(i3 , mid, C)); v4 = rdtable(size, wf, rid(i4 , mid, C)); v5 = rdtable(size, wf, rid(i5 , mid, C)); v6 = rdtable(size, wf, rid(i6 , mid, C)); v7 = rdtable(size, wf, rid(i7 , mid, C)); v8 = rdtable(size, wf, rid(i8 , mid, C)); v9 = rdtable(size, wf, rid(i9 , mid, C)); v10 = rdtable(size, wf, rid(i10, mid, C)); v11 = rdtable(size, wf, rid(i11, mid, C)); v12 = rdtable(size, wf, rid(i12, mid, C)); v13 = rdtable(size, wf, rid(i13, mid, C)); v14 = rdtable(size, wf, rid(i14, mid, C)); v15 = rdtable(size, wf, rid(i15, mid, C)); }; }; In the interest of brevity, we'll stop explaining here. If you have any more questions, feel free to open an issue on faustlibraries and tag @magnetophon.","title":"Read indexes"},{"location":"libs/basics/#selectors-conditions","text":"","title":"Selectors (Conditions)"},{"location":"libs/basics/#baif","text":"if-then-else implemented with a select2. WARNING: since select2 is strict (always evaluating both branches), the resulting if does not have the usual \"lazy\" semantic of the C if form, and thus cannot be used to protect against forbidden computations like division-by-zero for instance.","title":"(ba.)if"},{"location":"libs/basics/#usage_40","text":"if(cond, then, else) : _ Where: cond : condition then : signal selected while cond is true else : signal selected while cond is false","title":"Usage"},{"location":"libs/basics/#baifnc","text":"if-then-elseif-then-...elsif-then-else implemented on top of ba.if .","title":"(ba.)ifNc"},{"location":"libs/basics/#usage_41","text":"ifNc((cond1,then1, cond2,then2, ... condN,thenN, else)) : _ or ifNc(Nc, cond1,then1, cond2,then2, ... condN,thenN, else) : _ or cond1,then1, cond2,then2, ... condN,thenN, else : ifNc(Nc) : _ Where: Nc : number of branches/conditions (constant numerical expression) condX : condition thenX : signal selected if condX is the 1st true condition else : signal selected if all the cond1-condN conditions are false","title":"Usage"},{"location":"libs/basics/#example-test-program_3","text":"process(x,y) = ifNc((xy,+1, 0)); or process(x,y) = ifNc(2, xy,+1, 0); or process(x,y) = xy,+1, 0 : ifNc(2); outputs -1 if xy , 0 otherwise.","title":"Example test program"},{"location":"libs/basics/#baifncno","text":"ifNcNo(Nc,No) is similar to ifNc(Nc) above but then/else branches have No outputs.","title":"(ba.)ifNcNo"},{"location":"libs/basics/#usage_42","text":"ifNcNo(Nc,No, cond1,then1, cond2,then2, ... condN,thenN, else) : sig.bus(No) Where: Nc : number of branches/conditions (constant numerical expression) No : number of outputs (constant numerical expression) condX : condition thenX : list of No signals selected if condX is the 1st true condition else : list of No signals selected if all the cond1-condN conditions are false","title":"Usage"},{"location":"libs/basics/#example-test-program_4","text":"process(x) = ifNcNo(2,3, x<0, -1,-1,-1, x>0, 1,1,1, 0,0,0); outputs -1,-1,-1 if x<0 , 1,1,1 if x>0 , 0,0,0 otherwise.","title":"Example test program"},{"location":"libs/basics/#baselector","text":"Selects the ith input among n at compile time.","title":"(ba.)selector"},{"location":"libs/basics/#usage_43","text":"selector(I,N) _,_,_,_ : selector(2,4) : _ // selects the 3rd input among 4 Where: I : input to select (int, numbered from 0, known at compile time) N : number of inputs (int, known at compile time, N > I) There is also cselector for selecting among complex input signals of the form (real,imag).","title":"Usage"},{"location":"libs/basics/#baselect2stereo","text":"Select between 2 stereo signals.","title":"(ba.)select2stereo"},{"location":"libs/basics/#usage_44","text":"_,_,_,_ : select2stereo(bpc) : _,_ Where: bpc : the selector switch (0/1)","title":"Usage"},{"location":"libs/basics/#baselectn","text":"Selects the ith input among N at run time.","title":"(ba.)selectn"},{"location":"libs/basics/#usage_45","text":"selectn(N,i) _,_,_,_ : selectn(4,2) : _ // selects the 3rd input among 4 Where: N : number of inputs (int, known at compile time, N > 0) i : input to select (int, numbered from 0)","title":"Usage"},{"location":"libs/basics/#example-test-program_5","text":"N = 64; process = par(n, N, (par(i,N,i) : selectn(N,n)));","title":"Example test program"},{"location":"libs/basics/#baselectmulti","text":"Selects the ith circuit among N at run time (all should have the same number of inputs and outputs) with a crossfade.","title":"(ba.)selectmulti"},{"location":"libs/basics/#usage_46","text":"selectmulti(n,lgen,id) Where: n : crossfade in samples lgen : list of circuits id : circuit to select (int, numbered from 0)","title":"Usage"},{"location":"libs/basics/#example-test-program_6","text":"process = selectmulti(ma.SR/10, ((3,9),(2,8),(5,7)), nentry(\"choice\", 0, 0, 2, 1)); process = selectmulti(ma.SR/10, ((_*3,_*9),(_*2,_*8),(_*5,_*7)), nentry(\"choice\", 0, 0, 2, 1));","title":"Example test program"},{"location":"libs/basics/#baselectoutn","text":"Route input to the output among N at run time.","title":"(ba.)selectoutn"},{"location":"libs/basics/#usage_47","text":"_ : selectoutn(N, i) : si.bus(N) Where: N : number of outputs (int, known at compile time, N > 0) i : output number to route to (int, numbered from 0) (i.e. slider)","title":"Usage"},{"location":"libs/basics/#example-test-program_7","text":"process = 1 : selectoutn(3, sel) : par(i, 3, vbargraph(\"v.bargraph %i\", 0, 1)); sel = hslider(\"volume\", 0, 0, 2, 1) : int;","title":"Example test program"},{"location":"libs/basics/#other","text":"","title":"Other"},{"location":"libs/basics/#balatch","text":"Latch input on positive-going transition of trig:\"records\" the input when trig switches from 0 to 1, outputs a frozen values everytime else.","title":"(ba.)latch"},{"location":"libs/basics/#usage_48","text":"_ : latch(trig) : _ Where: trig : hold trigger (0 for hold, 1 for bypass)","title":"Usage"},{"location":"libs/basics/#basandh","text":"Sample And Hold: \"records\" the input when trig is 1, outputs a frozen value when trig is 0. sAndH is a standard Faust function.","title":"(ba.)sAndH"},{"location":"libs/basics/#usage_49","text":"_ : sAndH(trig) : _ Where: trig : hold trigger (0 for hold, 1 for bypass)","title":"Usage"},{"location":"libs/basics/#badownsample","text":"Down sample a signal. WARNING: this function doesn't change the rate of a signal, it just holds samples... downSample is a standard Faust function.","title":"(ba.)downSample"},{"location":"libs/basics/#usage_50","text":"_ : downSample(freq) : _ Where: freq : new rate in Hz","title":"Usage"},{"location":"libs/basics/#bapeakhold","text":"Outputs current max value above zero.","title":"(ba.)peakhold"},{"location":"libs/basics/#usage_51","text":"_ : peakhold(mode) : _ Where: mode means: 0 - Pass through. A single sample 0 trigger will work as a reset. 1 - Track and hold max value.","title":"Usage"},{"location":"libs/basics/#bapeakholder","text":"While peak-holder functions are scarcely discussed in the literature (please do send me an email if you know otherwise), common sense tells that the expected behaviour should be as follows: the absolute value of the input signal is compared with the output of the peak-holder; if the input is greater or equal to the output, a new peak is detected and sent to the output; otherwise, a timer starts and the current peak is held for N samples; once the timer is out and no new peaks have been detected, the absolute value of the current input becomes the new peak.","title":"(ba.)peakholder"},{"location":"libs/basics/#usage_52","text":"_ : peakholder(holdTime) : _ Where: holdTime : hold time in samples","title":"Usage"},{"location":"libs/basics/#baimpulsify","text":"Turns a signal into an impulse with the value of the current sample (0.3,0.2,0.1 becomes 0.3,0.0,0.0). This function is typically used with a button to turn its output into an impulse. impulsify is a standard Faust function.","title":"(ba.)impulsify"},{"location":"libs/basics/#usage_53","text":"button(\"gate\") : impulsify;","title":"Usage"},{"location":"libs/basics/#baautomat","text":"Record and replay in a loop the successives values of the input signal.","title":"(ba.)automat"},{"location":"libs/basics/#usage_54","text":"hslider(...) : automat(t, size, init) : _ Where: t : tempo in BPM size : number of items in the loop init : init value in the loop","title":"Usage"},{"location":"libs/basics/#babpf","text":"bpf is an environment (a group of related definitions) that can be used to create break-point functions. It contains three functions: start(x,y) to start a break-point function end(x,y) to end a break-point function point(x,y) to add intermediate points to a break-point function A minimal break-point function must contain at least a start and an end point: f = bpf.start(x0,y0) : bpf.end(x1,y1); A more involved break-point function can contains any number of intermediate points: f = bpf.start(x0,y0) : bpf.point(x1,y1) : bpf.point(x2,y2) : bpf.end(x3,y3); In any case the x_{i} must be in increasing order (for all i , x_{i} < x_{i+1} ). For example the following definition: f = bpf.start(x0,y0) : ... : bpf.point(xi,yi) : ... : bpf.end(xn,yn); implements a break-point function f such that: f(x) = y_{0} when x < x_{0} f(x) = y_{n} when x > x_{n} f(x) = y_{i} + (y_{i+1}-y_{i})*(x-x_{i})/(x_{i+1}-x_{i}) when x_{i} <= x and x < x_{i+1} bpf is a standard Faust function.","title":"(ba.)bpf"},{"location":"libs/basics/#balistinterp","text":"Linearly interpolates between the elements of a list.","title":"(ba.)listInterp"},{"location":"libs/basics/#usage_55","text":"index = 1.69; // range is 0-4 process = listInterp((800,400,350,450,325),index); Where: index : the index (float) to interpolate between the different values. The range of index depends on the size of the list.","title":"Usage"},{"location":"libs/basics/#babypass1","text":"Takes a mono input signal, route it to e and bypass it if bpc = 1 . When bypassed, e is feed with zeros so that its state is cleanup up. bypass1 is a standard Faust function.","title":"(ba.)bypass1"},{"location":"libs/basics/#usage_56","text":"_ : bypass1(bpc,e) : _ Where: bpc : bypass switch (0/1) e : a mono effect","title":"Usage"},{"location":"libs/basics/#babypass2","text":"Takes a stereo input signal, route it to e and bypass it if bpc = 1 . When bypassed, e is feed with zeros so that its state is cleanup up. bypass2 is a standard Faust function.","title":"(ba.)bypass2"},{"location":"libs/basics/#usage_57","text":"_,_ : bypass2(bpc,e) : _,_ Where: bpc : bypass switch (0/1) e : a stereo effect","title":"Usage"},{"location":"libs/basics/#babypass1to2","text":"Bypass switch for effect e having mono input signal and stereo output. Effect e is bypassed if bpc = 1 .When bypassed, e is feed with zeros so that its state is cleanup up. bypass1to2 is a standard Faust function.","title":"(ba.)bypass1to2"},{"location":"libs/basics/#usage_58","text":"_ : bypass1to2(bpc,e) : _,_ Where: bpc : bypass switch (0/1) e : a mono-to-stereo effect","title":"Usage"},{"location":"libs/basics/#babypass_fade","text":"Bypass an arbitrary (N x N) circuit with 'n' samples crossfade. Inputs and outputs signals are faded out when 'e' is bypassed, so that 'e' state is cleanup up. Once bypassed the effect is replaced by par(i,N,_) . Bypassed circuits can be chained.","title":"(ba.)bypass_fade"},{"location":"libs/basics/#usage_59","text":"_ : bypass_fade(n,b,e) : _ or _,_ : bypass_fade(n,b,e) : _,_ n : number of samples for the crossfade b : bypass switch (0/1) e : N x N circuit","title":"Usage"},{"location":"libs/basics/#example-test-program_8","text":"process = bypass_fade(ma.SR/10, checkbox(\"bypass echo\"), echo); process = bypass_fade(ma.SR/10, checkbox(\"bypass reverb\"), freeverb);","title":"Example test program"},{"location":"libs/basics/#batoggle","text":"Triggered by the change of 0 to 1, it toggles the output value between 0 and 1.","title":"(ba.)toggle"},{"location":"libs/basics/#usage_60","text":"_ : toggle : _","title":"Usage"},{"location":"libs/basics/#example-test-program_9","text":"button(\"toggle\") : toggle : vbargraph(\"output\", 0, 1) (an.amp_follower(0.1) > 0.01) : toggle : vbargraph(\"output\", 0, 1) // takes audio input","title":"Example test program"},{"location":"libs/basics/#baon_and_off","text":"The first channel set the output to 1, the second channel to 0.","title":"(ba.)on_and_off"},{"location":"libs/basics/#usage_61","text":"_,_ : on_and_off : _","title":"Usage"},{"location":"libs/basics/#example-test-program_10","text":"button(\"on\"), button(\"off\") : on_and_off : vbargraph(\"output\", 0, 1)","title":"Example test program"},{"location":"libs/basics/#babitcrusher","text":"Produce distortion by reduction of the signal resolution.","title":"(ba.)bitcrusher"},{"location":"libs/basics/#usage_62","text":"_ : bitcrusher(nbits) : _ Where: nbits : the number of bits of the wanted resolution","title":"Usage"},{"location":"libs/basics/#sliding-reduce","text":"Provides various operations on the last n samples using a high order slidingReduce(op,n,maxN,disabledVal,x) fold-like function: slidingSum(n) : the sliding sum of the last n input samples, CPU-light slidingSump(n,maxN) : the sliding sum of the last n input samples, numerically stable \"forever\" slidingMax(n,maxN) : the sliding max of the last n input samples slidingMin(n,maxN) : the sliding min of the last n input samples slidingMean(n) : the sliding mean of the last n input samples, CPU-light slidingMeanp(n,maxN) : the sliding mean of the last n input samples, numerically stable \"forever\" slidingRMS(n) : the sliding RMS of the last n input samples, CPU-light slidingRMSp(n,maxN) : the sliding RMS of the last n input samples, numerically stable \"forever\"","title":"Sliding Reduce"},{"location":"libs/basics/#working-principle_1","text":"If we want the maximum of the last 8 values, we can do that as: simpleMax(x) = ( ( max(x@0,x@1), max(x@2,x@3) ) :max ), ( ( max(x@4,x@5), max(x@6,x@7) ) :max ) :max; max(x@2,x@3) is the same as max(x@0,x@1)@2 but the latter re-uses a value we already computed,so is more efficient. Using the same trick for values 4 trough 7, we can write: efficientMax(x)= ( ( max(x@0,x@1), max(x@0,x@1)@2 ) :max ), ( ( max(x@0,x@1), max(x@0,x@1)@2 ) :max@4 ) :max; We can rewrite it recursively, so it becomes possible to get the maximum at have any number of values, as long as it's a power of 2. recursiveMax = case { (1,x) => x; (N,x) => max(recursiveMax(N/2,x), recursiveMax(N/2,x)@(N/2)); }; What if we want to look at a number of values that's not a power of 2? For each value, we will have to decide whether to use it or not. If n is bigger than the index of the value, we use it, otherwise we replace it with ( 0-(ma.MAX) ): variableMax(n,x) = max( max( ( (x@0 : useVal(0)), (x@1 : useVal(1)) ):max, ( (x@2 : useVal(2)), (x@3 : useVal(3)) ):max ), max( ( (x@4 : useVal(4)), (x@5 : useVal(5)) ):max, ( (x@6 : useVal(6)), (x@7 : useVal(7)) ):max ) ) with { useVal(i) = select2((n>=i) , (0-(ma.MAX)),_); }; Now it becomes impossible to re-use any values. To fix that let's first look at how we'd implement it using recursiveMax, but with a fixed n that is not a power of 2. For example, this is how you'd do it with n=3 : binaryMaxThree(x) = ( recursiveMax(1,x)@0, // the first x recursiveMax(2,x)@1 // the second and third x ):max; n=6 binaryMaxSix(x) = ( recursiveMax(2,x)@0, // first two recursiveMax(4,x)@2 // third trough sixth ):max; Note that recursiveMax(2,x) is used at a different delay then in binaryMaxThree , since it represents 1 and 2, not 2 and 3. Each block is delayed the combined size of the previous blocks. n=7 binaryMaxSeven(x) = ( ( recursiveMax(1,x)@0, // first x recursiveMax(2,x)@1 // second and third ):max, ( recursiveMax(4,x)@3 // fourth trough seventh ) ):max; To make a variable version, we need to know which powers of two are used, and at which delay time. Then it becomes a matter of: lining up all the different block sizes in parallel: sequentialOperatorParOut() delaying each the appropriate amount: sumOfPrevBlockSizes() turning it on or off: useVal() getting the maximum of all of them: parallelOp() In Faust, we can only do that for a fixed maximum number of values: maxN , known at compile time.","title":"Working Principle"},{"location":"libs/basics/#baslidingreduce","text":"Fold-like high order function. Apply a commutative binary operation op to the last n consecutive samples of a signal x . For example : slidingReduce(max,128,128,0-(ma.MAX)) will compute the maximum of the last 128 samples. The output is updated each sample, unlike reduce, where the output is constant for the duration of a block.","title":"(ba.)slidingReduce"},{"location":"libs/basics/#usage_63","text":"_ : slidingReduce(op,n,maxN,disabledVal) : _ Where: n : the number of values to process maxN : the maximum number of values to process (int, known at compile time, maxN > 0) op : the operator. Needs to be a commutative one. disabledVal : the value to use when we want to ignore a value. In other words, op(x,disabledVal) should equal to x . For example, +(x,0) equals x and min(x,ma.MAX) equals x . So if we want to calculate the sum, we need to give 0 as disabledVal , and if we want the minimum, we need to give ma.MAX as disabledVal .","title":"Usage"},{"location":"libs/basics/#baslidingsum","text":"The sliding sum of the last n input samples. It will eventually run into numerical trouble when there is a persistent dc component. If that matters in your application, use the more CPU-intensive ba.slidingSump .","title":"(ba.)slidingSum"},{"location":"libs/basics/#usage_64","text":"_ : slidingSum(n) : _ Where: n : the number of values to process","title":"Usage"},{"location":"libs/basics/#baslidingsump","text":"The sliding sum of the last n input samples. It uses a lot more CPU than ba.slidingSum , but is numerically stable \"forever\" in return.","title":"(ba.)slidingSump"},{"location":"libs/basics/#usage_65","text":"_ : slidingSump(n,maxN) : _ Where: n : the number of values to process maxN : the maximum number of values to process (int, known at compile time, maxN > 0)","title":"Usage"},{"location":"libs/basics/#baslidingmax","text":"The sliding maximum of the last n input samples.","title":"(ba.)slidingMax"},{"location":"libs/basics/#usage_66","text":"_ : slidingMax(n,maxN) : _ Where: n : the number of values to process maxN : the maximum number of values to process (int, known at compile time, maxN > 0)","title":"Usage"},{"location":"libs/basics/#baslidingmin","text":"The sliding minimum of the last n input samples.","title":"(ba.)slidingMin"},{"location":"libs/basics/#usage_67","text":"_ : slidingMin(n,maxN) : _ Where: n : the number of values to process maxN : the maximum number of values to process (int, known at compile time, maxN > 0)","title":"Usage"},{"location":"libs/basics/#baslidingmean","text":"The sliding mean of the last n input samples. It will eventually run into numerical trouble when there is a persistent dc component. If that matters in your application, use the more CPU-intensive ba.slidingMeanp .","title":"(ba.)slidingMean"},{"location":"libs/basics/#usage_68","text":"_ : slidingMean(n) : _ Where: n : the number of values to process","title":"Usage"},{"location":"libs/basics/#baslidingmeanp","text":"The sliding mean of the last n input samples. It uses a lot more CPU than ba.slidingMean , but is numerically stable \"forever\" in return.","title":"(ba.)slidingMeanp"},{"location":"libs/basics/#usage_69","text":"_ : slidingMeanp(n,maxN) : _ Where: n : the number of values to process maxN : the maximum number of values to process (int, known at compile time, maxN > 0)","title":"Usage"},{"location":"libs/basics/#baslidingrms","text":"The root mean square of the last n input samples. It will eventually run into numerical trouble when there is a persistent dc component. If that matters in your application, use the more CPU-intensive ba.slidingRMSp .","title":"(ba.)slidingRMS"},{"location":"libs/basics/#usage_70","text":"_ : slidingRMS(n) : _ Where: n : the number of values to process","title":"Usage"},{"location":"libs/basics/#baslidingrmsp","text":"The root mean square of the last n input samples. It uses a lot more CPU than ba.slidingRMS , but is numerically stable \"forever\" in return.","title":"(ba.)slidingRMSp"},{"location":"libs/basics/#usage_71","text":"_ : slidingRMSp(n,maxN) : _ Where: n : the number of values to process maxN : the maximum number of values to process (int, known at compile time, maxN > 0)","title":"Usage"},{"location":"libs/basics/#parallel-operators","text":"Provides various operations on N parallel inputs using a high order parallelOp(op,N,x) function: parallelMax(N) : the max of n parallel inputs parallelMin(N) : the min of n parallel inputs parallelMean(N) : the mean of n parallel inputs parallelRMS(N) : the RMS of n parallel inputs","title":"Parallel Operators"},{"location":"libs/basics/#baparallelop","text":"Apply a commutative binary operation op to N parallel inputs.","title":"(ba.)parallelOp"},{"location":"libs/basics/#usage_72","text":"si.bus(N) : parallelOp(op,N) : _ where: N : the number of parallel inputs known at compile time op : the operator which needs to be commutative","title":"usage"},{"location":"libs/basics/#baparallelmax","text":"The maximum of N parallel inputs.","title":"(ba.)parallelMax"},{"location":"libs/basics/#usage_73","text":"si.bus(N) : parallelMax(N) : _ Where: N : the number of parallel inputs known at compile time","title":"Usage"},{"location":"libs/basics/#baparallelmin","text":"The minimum of N parallel inputs.","title":"(ba.)parallelMin"},{"location":"libs/basics/#usage_74","text":"si.bus(N) : parallelMin(N) : _ Where: N : the number of parallel inputs known at compile time","title":"Usage"},{"location":"libs/basics/#baparallelmean","text":"The mean of N parallel inputs.","title":"(ba.)parallelMean"},{"location":"libs/basics/#usage_75","text":"si.bus(N) : parallelMean(N) : _ Where: N : the number of parallel inputs known at compile time","title":"Usage"},{"location":"libs/basics/#baparallelrms","text":"The RMS of N parallel inputs.","title":"(ba.)parallelRMS"},{"location":"libs/basics/#usage_76","text":"si.bus(N) : parallelRMS(N) : _ Where: N : the number of parallel inputs known at compile time","title":"Usage"},{"location":"libs/compressors/","text":"compressors.lib A library of compressor effects. Its official prefix is co . References https://github.com/grame-cncm/faustlibraries/blob/master/compressors.lib Functions Reference (co.)peak_compression_gain_mono_db Mono dynamic range compressor gain computer with dB output. peak_compression_gain_mono_db is a standard Faust function. Usage _ : peak_compression_gain_mono_db(strength,thresh,att,rel,knee,prePost) : _ Where: strength : strength of the compression (0 = no compression, 1 means hard limiting, >1 means over-compression) thresh : dB level threshold above which compression kicks in att : attack time = time constant (sec) when level & compression going up rel : release time = time constant (sec) coming out of compression knee : a gradual increase in gain reduction around the threshold: below thresh-(knee/2) there is no gain reduction, above thresh+(knee/2) there is the same gain reduction as without a knee, and in between there is a gradual increase in gain reduction prePost : places the level detector either at the input or after the gain computer; this turns it from a linear return-to-zero detector into a log domain return-to-threshold detector It uses a strength parameter instead of the traditional ratio, in order to be able to function as a hard limiter. For that you'd need a ratio of infinity:1, and you cannot express that in Faust. Sometimes even bigger ratios are useful: for example a group recording where one instrument is recorded with both a close microphone and a room microphone, and the instrument is loud enough in the room mic when playing loud, but you want to boost it when it is playing soft. References http://en.wikipedia.org/wiki/Dynamic_range_compression Digital Dynamic Range Compressor Design, A Tutorial and Analysis, Dimitrios GIANNOULIS ( Dimitrios.Giannoulis@eecs.qmul.ac.uk ), Michael MASSBERG ( michael@massberg.org ), and Josuah D.REISS ( josh.reiss@eecs.qmul.ac.uk ) (co.)peak_compression_gain_N_chan_db N channels dynamic range compressor gain computer with dB output. peak_compression_gain_N_chan_db is a standard Faust function. Usage si.bus(N) : peak_compression_gain_N_chan_db(strength,thresh,att,rel,knee,prePost,link,N) : si.bus(N) Where: strength : strength of the compression (0 = no compression, 1 means hard limiting, >1 means over-compression) thresh : dB level threshold above which compression kicks in att : attack time = time constant (sec) when level & compression going up rel : release time = time constant (sec) coming out of compression knee : a gradual increase in gain reduction around the threshold: below thresh-(knee/2) there is no gain reduction, above thresh+(knee/2) there is the same gain reduction as without a knee, and in between there is a gradual increase in gain reduction prePost : places the level detector either at the input or after the gain computer; this turns it from a linear return-to-zero detector into a log domain return-to-threshold detector link : the amount of linkage between the channels: 0 = each channel is independent, 1 = all channels have the same amount of gain reduction N : the number of channels of the compressor, known at compile time It uses a strength parameter instead of the traditional ratio, in order to be able to function as a hard limiter. For that you'd need a ratio of infinity:1, and you cannot express that in Faust. Sometimes even bigger ratios are useful: for example a group recording where one instrument is recorded with both a close microphone and a room microphone, and the instrument is loud enough in the room mic when playing loud, but you want to boost it when it is playing soft. References http://en.wikipedia.org/wiki/Dynamic_range_compression Digital Dynamic Range Compressor Design, A Tutorial and Analysis, Dimitrios GIANNOULIS ( Dimitrios.Giannoulis@eecs.qmul.ac.uk ), Michael MASSBERG ( michael@massberg.org ), and Josuah D.REISS ( josh.reiss@eecs.qmul.ac.uk ) (co.)FFcompressor_N_chan Feed forward N channels dynamic range compressor. FFcompressor_N_chan is a standard Faust function. Usage si.bus(N) : FFcompressor_N_chan(strength,thresh,att,rel,knee,prePost,link,meter,N) : si.bus(N) Where: strength : strength of the compression (0 = no compression, 1 means hard limiting, >1 means over-compression) thresh : dB level threshold above which compression kicks in att : attack time = time constant (sec) when level & compression going up rel : release time = time constant (sec) coming out of compression knee : a gradual increase in gain reduction around the threshold: below thresh-(knee/2) there is no gain reduction, above thresh+(knee/2) there is the same gain reduction as without a knee, and in between there is a gradual increase in gain reduction prePost : places the level detector either at the input or after the gain computer; this turns it from a linear return-to-zero detector into a log domain return-to-threshold detector link : the amount of linkage between the channels: 0 = each channel is independent, 1 = all channels have the same amount of gain reduction meter : a gain reduction meter. It can be implemented like so: meter = _<:(_, (ba.linear2db:max(maxGR):meter_group((hbargraph(\"[1][unit:dB][tooltip: gain reduction in dB]\", maxGR, 0))))):attach; N : the number of channels of the compressor, known at compile time It uses a strength parameter instead of the traditional ratio, in order to be able to function as a hard limiter. For that you'd need a ratio of infinity:1, and you cannot express that in Faust. Sometimes even bigger ratios are useful: for example a group recording where one instrument is recorded with both a close microphone and a room microphone, and the instrument is loud enough in the room mic when playing loud, but you want to boost it when it is playing soft. References http://en.wikipedia.org/wiki/Dynamic_range_compression Digital Dynamic Range Compressor Design, A Tutorial and Analysis, Dimitrios GIANNOULIS ( Dimitrios.Giannoulis@eecs.qmul.ac.uk ), Michael MASSBERG ( michael@massberg.org ), and Josuah D.REISS ( josh.reiss@eecs.qmul.ac.uk ) (co.)FBcompressor_N_chan Feed back N channels dynamic range compressor. FBcompressor_N_chan is a standard Faust function. Usage si.bus(N) : FBcompressor_N_chan(strength,thresh,att,rel,knee,prePost,link,meter,N) : si.bus(N) Where: strength : strength of the compression (0 = no compression, 1 means hard limiting, >1 means over-compression) thresh : dB level threshold above which compression kicks in att : attack time = time constant (sec) when level & compression going up rel : release time = time constant (sec) coming out of compression knee : a gradual increase in gain reduction around the threshold: below thresh-(knee/2) there is no gain reduction, above thresh+(knee/2) there is the same gain reduction as without a knee, and in between there is a gradual increase in gain reduction prePost : places the level detector either at the input or after the gain computer; this turns it from a linear return-to-zero detector into a log domain return-to-threshold detector link : the amount of linkage between the channels. 0 = each channel is independent, 1 = all channels have the same amount of gain reduction meter : a gain reduction meter. It can be implemented with: meter = _ <: (_,(ba.linear2db:max(maxGR):meter_group((hbargraph(\"[1][unit:dB][tooltip: gain reduction in dB]\", maxGR, 0))))):attach; or it can be omitted by defining meter = _; . N : the number of channels of the compressor, known at compile time It uses a strength parameter instead of the traditional ratio, in order to be able to function as a hard limiter. For that you'd need a ratio of infinity:1, and you cannot express that in Faust. Sometimes even bigger ratios are useful: for example a group recording where one instrument is recorded with both a close microphone and a room microphone, and the instrument is loud enough in the room mic when playing loud, but you want to boost it when it is playing soft. References http://en.wikipedia.org/wiki/Dynamic_range_compression Digital Dynamic Range Compressor Design, A Tutorial and Analysis, Dimitrios GIANNOULIS ( Dimitrios.Giannoulis@eecs.qmul.ac.uk ), Michael MASSBERG ( michael@massberg.org ), and Josuah D.REISS ( josh.reiss@eecs.qmul.ac.uk ) (co.)FBFFcompressor_N_chan Feed forward / feed back N channels dynamic range compressor. The feedback part has a much higher strength, so they end up sounding similar. FBFFcompressor_N_chan is a standard Faust function. Usage si.bus(N) : FBFFcompressor_N_chan(strength,thresh,att,rel,knee,prePost,link,FBFF,meter,N) : si.bus(N) Where: strength : strength of the compression (0 = no compression, 1 means hard limiting, >1 means over-compression) thresh : dB level threshold above which compression kicks in att : attack time = time constant (sec) when level & compression going up rel : release time = time constant (sec) coming out of compression knee : a gradual increase in gain reduction around the threshold: below thresh-(knee/2) there is no gain reduction, above thresh+(knee/2) there is the same gain reduction as without a knee, and in between there is a gradual increase in gain reduction prePost : places the level detector either at the input or after the gain computer; this turns it from a linear return-to-zero detector into a log domain return-to-threshold detector link : the amount of linkage between the channels: 0 = each channel is independent, 1 = all channels have the same amount of gain reduction FBFF : fade between feed forward (0) and feed back (1) compression meter : a gain reduction meter. It can be implemented like so: meter = _<:(_,(max(maxGR):meter_group((hbargraph(\"[1][unit:dB][tooltip: gain reduction in dB]\", maxGR, 0))))):attach; N : the number of channels of the compressor, known at compile time It uses a strength parameter instead of the traditional ratio, in order to be able to function as a hard limiter. For that you'd need a ratio of infinity:1, and you cannot express that in Faust. Sometimes even bigger ratios are useful: for example a group recording where one instrument is recorded with both a close microphone and a room microphone, and the instrument is loud enough in the room mic when playing loud, but you want to boost it when it is playing soft. References http://en.wikipedia.org/wiki/Dynamic_range_compression Digital Dynamic Range Compressor Design, A Tutorial and Analysis, Dimitrios GIANNOULIS ( Dimitrios.Giannoulis@eecs.qmul.ac.uk ), Michael MASSBERG ( michael@massberg.org ), and Josuah D.REISS ( josh.reiss@eecs.qmul.ac.uk ) (co.)RMS_compression_gain_mono_db Mono RMS dynamic range compressor gain computer with dB output. RMS_compression_gain_mono_db is a standard Faust function. Usage _ : RMS_compression_gain_mono_db(strength,thresh,att,rel,knee,prePost) : _ Where: strength : strength of the compression (0 = no compression, 1 means hard limiting, >1 means over-compression) thresh : dB level threshold above which compression kicks in att : attack time = time constant (sec) when level & compression going up rel : release time = time constant (sec) coming out of compression knee : a gradual increase in gain reduction around the threshold: below thresh-(knee/2) there is no gain reduction, above thresh+(knee/2) there is the same gain reduction as without a knee, and in between there is a gradual increase in gain reduction prePost : places the level detector either at the input or after the gain computer; this turns it from a linear return-to-zero detector into a log domain return-to-threshold detector It uses a strength parameter instead of the traditional ratio, in order to be able to function as a hard limiter. For that you'd need a ratio of infinity:1, and you cannot express that in Faust. Sometimes even bigger ratios are useful: for example a group recording where one instrument is recorded with both a close microphone and a room microphone, and the instrument is loud enough in the room mic when playing loud, but you want to boost it when it is playing soft. References http://en.wikipedia.org/wiki/Dynamic_range_compression Digital Dynamic Range Compressor Design, A Tutorial and Analysis, Dimitrios GIANNOULIS ( Dimitrios.Giannoulis@eecs.qmul.ac.uk ), Michael MASSBERG ( michael@massberg.org ), and Josuah D.REISS ( josh.reiss@eecs.qmul.ac.uk ) (co.)RMS_compression_gain_N_chan_db RMS N channels dynamic range compressor gain computer with dB output. RMS_compression_gain_N_chan_db is a standard Faust function. Usage si.bus(N) : RMS_compression_gain_N_chan_db(strength,thresh,att,rel,knee,prePost,link,N) : si.bus(N) Where: strength : strength of the compression (0 = no compression, 1 means hard limiting, >1 means over-compression) thresh : dB level threshold above which compression kicks in att : attack time = time constant (sec) when level & compression going up rel : release time = time constant (sec) coming out of compression knee : a gradual increase in gain reduction around the threshold: below thresh-(knee/2) there is no gain reduction, above thresh+(knee/2) there is the same gain reduction as without a knee, and in between there is a gradual increase in gain reduction prePost : places the level detector either at the input or after the gain computer; this turns it from a linear return-to-zero detector into a log domain return-to-threshold detector link : the amount of linkage between the channels: 0 = each channel is independent, 1 = all channels have the same amount of gain reduction N : the number of channels of the compressor It uses a strength parameter instead of the traditional ratio, in order to be able to function as a hard limiter. For that you'd need a ratio of infinity:1, and you cannot express that in Faust. Sometimes even bigger ratios are useful: for example a group recording where one instrument is recorded with both a close microphone and a room microphone, and the instrument is loud enough in the room mic when playing loud, but you want to boost it when it is playing soft. References http://en.wikipedia.org/wiki/Dynamic_range_compression Digital Dynamic Range Compressor Design, A Tutorial and Analysis, Dimitrios GIANNOULIS ( Dimitrios.Giannoulis@eecs.qmul.ac.uk ), Michael MASSBERG ( michael@massberg.org ), and Josuah D.REISS ( josh.reiss@eecs.qmul.ac.uk ) (co.)RMS_FBFFcompressor_N_chan RMS feed forward / feed back N channels dynamic range compressor. The feedback part has a much higher strength, so they end up sounding similar. RMS_FBFFcompressor_N_chan is a standard Faust function. Usage si.bus(N) : RMS_FBFFcompressor_N_chan(strength,thresh,att,rel,knee,prePost,link,FBFF,meter,N) : si.bus(N) Where: strength : strength of the compression (0 = no compression, 1 means hard limiting, >1 means over-compression) thresh : dB level threshold above which compression kicks in att : attack time = time constant (sec) when level & compression going up rel : release time = time constant (sec) coming out of compression knee : a gradual increase in gain reduction around the threshold: below thresh-(knee/2) there is no gain reduction, above thresh+(knee/2) there is the same gain reduction as without a knee, and in between there is a gradual increase in gain reduction prePost : places the level detector either at the input or after the gain computer; this turns it from a linear return-to-zero detector into a log domain return-to-threshold detector link : the amount of linkage between the channels: 0 = each channel is independent, 1 = all channels have the same amount of gain reduction FBFF : fade between feed forward (0) and feed back (1) compression. meter : a gain reduction meter. It can be implemented with: meter = _<:(_,(max(maxGR):meter_group((hbargraph(\"[1][unit:dB][tooltip: gain reduction in dB]\", maxGR, 0))))):attach; N : the number of channels of the compressor, known at compile time It uses a strength parameter instead of the traditional ratio, in order to be able to function as a hard limiter. For that you'd need a ratio of infinity:1, and you cannot express that in Faust. Sometimes even bigger ratios are useful: for example a group recording where one instrument is recorded with both a close microphone and a room microphone, and the instrument is loud enough in the room mic when playing loud, but you want to boost it when it is playing soft. To save CPU we cheat a bit, in a similar way as in the original libs: instead of crosfading between two sets of gain calculators as above, we take the abs of the audio from both the FF and FB, and crossfade between those, and feed that into one set of gain calculators again the strength is much higher when in FB mode, but implemented differently. References http://en.wikipedia.org/wiki/Dynamic_range_compression Digital Dynamic Range Compressor Design, A Tutorial and Analysis, Dimitrios GIANNOULIS ( Dimitrios.Giannoulis@eecs.qmul.ac.uk ), Michael MASSBERG ( michael@massberg.org ), and Josuah D.REISS ( josh.reiss@eecs.qmul.ac.uk ) (co.)RMS_FBcompressor_peak_limiter_N_chan N channel RMS feed back compressor into peak limiter feeding back into the FB compressor. By combining them this way, they complement each other optimally: the RMS compressor doesn't have to deal with the peaks, and the peak limiter get's spared from the steady state signal. The feedback part has a much higher strength, so they end up sounding similar. RMS_FBcompressor_peak_limiter_N_chan is a standard Faust function. Usage si.bus(N) : RMS_FBcompressor_peak_limiter_N_chan(strength,thresh,threshLim,att,rel,knee,link,meter,meterLim,N) : si.bus(N) Where: strength : strength of the compression (0 = no compression, 1 means hard limiting, >1 means over-compression) thresh : dB level threshold above which compression kicks in threshLim : dB level threshold above which the brickwall limiter kicks in att : attack time = time constant (sec) when level & compression going up this is also used as the release time of the limiter rel : release time = time constant (sec) coming out of compression knee : a gradual increase in gain reduction around the threshold: below thresh-(knee/2) there is no gain reduction, above thresh+(knee/2) there is the same gain reduction as without a knee, and in between there is a gradual increase in gain reduction the limiter uses a knee half this size link : the amount of linkage between the channels: 0 = each channel is independent, 1 = all channels have the same amount of gain reduction meter : compressor gain reduction meter. It can be implemented with: meter = _<:(_,(max(maxGR):meter_group((hbargraph(\"[1][unit:dB][tooltip: gain reduction in dB]\", maxGR, 0))))):attach; meterLim : brickwall limiter gain reduction meter. It can be implemented with: meterLim = _<:(_,(max(maxGR):meter_group((hbargraph(\"[1][unit:dB][tooltip: gain reduction in dB]\", maxGR, 0))))):attach; N : the number of channels of the compressor, known at compile time It uses a strength parameter instead of the traditional ratio, in order to be able to function as a hard limiter. For that you'd need a ratio of infinity:1, and you cannot express that in Faust. Sometimes even bigger ratios are useful: for example a group recording where one instrument is recorded with both a close microphone and a room microphone, and the instrument is loud enough in the room mic when playing loud, but you want to boost it when it is playing soft. References http://en.wikipedia.org/wiki/Dynamic_range_compression Digital Dynamic Range Compressor Design, A Tutorial and Analysis, Dimitrios GIANNOULIS ( Dimitrios.Giannoulis@eecs.qmul.ac.uk ), Michael MASSBERG ( michael@massberg.org ), and Josuah D.REISS ( josh.reiss@eecs.qmul.ac.uk ) Linear gain computer section The gain computer functions in this section have been replaced by a version that outputs dBs, but we retain the linear output version for backward compatibility. (co.)peak_compression_gain_mono Mono dynamic range compressor gain computer with linear output. peak_compression_gain_mono is a standard Faust function. Usage _ : peak_compression_gain_mono(strength,thresh,att,rel,knee,prePost) : _ Where: strength : strength of the compression (0 = no compression, 1 means hard limiting, >1 means over-compression) thresh : dB level threshold above which compression kicks in att : attack time = time constant (sec) when level & compression going up rel : release time = time constant (sec) coming out of compression knee : a gradual increase in gain reduction around the threshold: below thresh-(knee/2) there is no gain reduction, above thresh+(knee/2) there is the same gain reduction as without a knee, and in between there is a gradual increase in gain reduction prePost : places the level detector either at the input or after the gain computer; this turns it from a linear return-to-zero detector into a log domain return-to-threshold detector It uses a strength parameter instead of the traditional ratio, in order to be able to function as a hard limiter. For that you'd need a ratio of infinity:1, and you cannot express that in Faust. Sometimes even bigger ratios are useful: for example a group recording where one instrument is recorded with both a close microphone and a room microphone, and the instrument is loud enough in the room mic when playing loud, but you want to boost it when it is playing soft. References http://en.wikipedia.org/wiki/Dynamic_range_compression Digital Dynamic Range Compressor Design, A Tutorial and Analysis, Dimitrios GIANNOULIS ( Dimitrios.Giannoulis@eecs.qmul.ac.uk ), Michael MASSBERG ( michael@massberg.org ), and Josuah D.REISS ( josh.reiss@eecs.qmul.ac.uk ) (co.)peak_compression_gain_N_chan N channels dynamic range compressor gain computer with linear output. peak_compression_gain_N_chan is a standard Faust function. Usage si.bus(N) : peak_compression_gain_N_chan(strength,thresh,att,rel,knee,prePost,link,N) : si.bus(N) Where: strength : strength of the compression (0 = no compression, 1 means hard limiting, >1 means over-compression) thresh : dB level threshold above which compression kicks in att : attack time = time constant (sec) when level & compression going up rel : release time = time constant (sec) coming out of compression knee : a gradual increase in gain reduction around the threshold: below thresh-(knee/2) there is no gain reduction, above thresh+(knee/2) there is the same gain reduction as without a knee, and in between there is a gradual increase in gain reduction prePost : places the level detector either at the input or after the gain computer; this turns it from a linear return-to-zero detector into a log domain return-to-threshold detector link : the amount of linkage between the channels: 0 = each channel is independent, 1 = all channels have the same amount of gain reduction N : the number of channels of the compressor, known at compile time It uses a strength parameter instead of the traditional ratio, in order to be able to function as a hard limiter. For that you'd need a ratio of infinity:1, and you cannot express that in Faust. Sometimes even bigger ratios are useful: for example a group recording where one instrument is recorded with both a close microphone and a room microphone, and the instrument is loud enough in the room mic when playing loud, but you want to boost it when it is playing soft. References http://en.wikipedia.org/wiki/Dynamic_range_compression Digital Dynamic Range Compressor Design, A Tutorial and Analysis, Dimitrios GIANNOULIS ( Dimitrios.Giannoulis@eecs.qmul.ac.uk ), Michael MASSBERG ( michael@massberg.org ), and Josuah D.REISS ( josh.reiss@eecs.qmul.ac.uk ) (co.)RMS_compression_gain_mono Mono RMS dynamic range compressor gain computer with linear output. RMS_compression_gain_mono is a standard Faust function. Usage _ : RMS_compression_gain_mono(strength,thresh,att,rel,knee,prePost) : _ Where: strength : strength of the compression (0 = no compression, 1 means hard limiting, >1 means over-compression) thresh : dB level threshold above which compression kicks in att : attack time = time constant (sec) when level & compression going up rel : release time = time constant (sec) coming out of compression knee : a gradual increase in gain reduction around the threshold: below thresh-(knee/2) there is no gain reduction, above thresh+(knee/2) there is the same gain reduction as without a knee, and in between there is a gradual increase in gain reduction prePost : places the level detector either at the input or after the gain computer; this turns it from a linear return-to-zero detector into a log domain return-to-threshold detector It uses a strength parameter instead of the traditional ratio, in order to be able to function as a hard limiter. For that you'd need a ratio of infinity:1, and you cannot express that in Faust. Sometimes even bigger ratios are useful: for example a group recording where one instrument is recorded with both a close microphone and a room microphone, and the instrument is loud enough in the room mic when playing loud, but you want to boost it when it is playing soft. References http://en.wikipedia.org/wiki/Dynamic_range_compression Digital Dynamic Range Compressor Design, A Tutorial and Analysis, Dimitrios GIANNOULIS ( Dimitrios.Giannoulis@eecs.qmul.ac.uk ), Michael MASSBERG ( michael@massberg.org ), and Josuah D.REISS ( josh.reiss@eecs.qmul.ac.uk ) (co.)RMS_compression_gain_N_chan RMS N channels dynamic range compressor gain computer with linear output. RMS_compression_gain_N_chan is a standard Faust function. Usage si.bus(N) : RMS_compression_gain_N_chan(strength,thresh,att,rel,knee,prePost,link,N) : si.bus(N) Where: strength : strength of the compression (0 = no compression, 1 means hard limiting, >1 means over-compression) thresh : dB level threshold above which compression kicks in att : attack time = time constant (sec) when level & compression going up rel : release time = time constant (sec) coming out of compression knee : a gradual increase in gain reduction around the threshold: below thresh-(knee/2) there is no gain reduction, above thresh+(knee/2) there is the same gain reduction as without a knee, and in between there is a gradual increase in gain reduction prePost : places the level detector either at the input or after the gain computer; this turns it from a linear return-to-zero detector into a log domain return-to-threshold detector link : the amount of linkage between the channels: 0 = each channel is independent, 1 = all channels have the same amount of gain reduction N : the number of channels of the compressor, known at compile time It uses a strength parameter instead of the traditional ratio, in order to be able to function as a hard limiter. For that you'd need a ratio of infinity:1, and you cannot express that in Faust. Sometimes even bigger ratios are useful: for example a group recording where one instrument is recorded with both a close microphone and a room microphone, and the instrument is loud enough in the room mic when playing loud, but you want to boost it when it is playing soft. References http://en.wikipedia.org/wiki/Dynamic_range_compression Digital Dynamic Range Compressor Design, A Tutorial and Analysis, Dimitrios GIANNOULIS ( Dimitrios.Giannoulis@eecs.qmul.ac.uk ), Michael MASSBERG ( michael@massberg.org ), and Josuah D.REISS ( josh.reiss@eecs.qmul.ac.uk ) Original versions section The functions in this section are largely superseded by the limiters above, but we retain them for backward compatibility and for situations in which a more permissive, MIT-style license is required. (co.)compressor_lad_mono Mono dynamic range compressor with lookahead delay. compressor_lad_mono is a standard Faust function. Usage _ : compressor_lad_mono(lad,ratio,thresh,att,rel) : _ Where: lad : lookahead delay in seconds (nonnegative) - gets rounded to nearest sample. The effective attack time is a good setting ratio : compression ratio (1 = no compression, >1 means compression) Ratios: 4 is moderate compression, 8 is strong compression, 12 is mild limiting, and 20 is pretty hard limiting at the threshold thresh : dB level threshold above which compression kicks in (0 dB = max level) att : attack time = time constant (sec) when level & compression are going up rel : release time = time constant (sec) coming out of compression References http://en.wikipedia.org/wiki/Dynamic_range_compression https://ccrma.stanford.edu/~jos/filters/Nonlinear_Filter_Example_Dynamic.html Albert Graef's \"faust2pd\"/examples/synth/compressor_.dsp More features: https://github.com/magnetophon/faustCompressors (co.)compressor_mono Mono dynamic range compressors. compressor_mono is a standard Faust function. Usage _ : compressor_mono(ratio,thresh,att,rel) : _ Where: ratio : compression ratio (1 = no compression, >1 means compression) Ratios: 4 is moderate compression, 8 is strong compression, 12 is mild limiting, and 20 is pretty hard limiting at the threshold thresh : dB level threshold above which compression kicks in (0 dB = max level) att : attack time = time constant (sec) when level & compression are going up rel : release time = time constant (sec) coming out of compression References http://en.wikipedia.org/wiki/Dynamic_range_compression https://ccrma.stanford.edu/~jos/filters/Nonlinear_Filter_Example_Dynamic.html Albert Graef's \"faust2pd\"/examples/synth/compressor_.dsp More features: https://github.com/magnetophon/faustCompressors (co.)compressor_stereo Stereo dynamic range compressors. Usage _,_ : compressor_stereo(ratio,thresh,att,rel) : _,_ Where: ratio : compression ratio (1 = no compression, >1 means compression) thresh : dB level threshold above which compression kicks in (0 dB = max level) att : attack time = time constant (sec) when level & compression going up rel : release time = time constant (sec) coming out of compression References http://en.wikipedia.org/wiki/Dynamic_range_compression https://ccrma.stanford.edu/~jos/filters/Nonlinear_Filter_Example_Dynamic.html Albert Graef's \"faust2pd\"/examples/synth/compressor_.dsp More features: https://github.com/magnetophon/faustCompressors (co.)compression_gain_mono Compression-gain calculation for dynamic range compressors. Usage _ : compression_gain_mono(ratio,thresh,att,rel) : _ Where: ratio : compression ratio (1 = no compression, >1 means compression) thresh : dB level threshold above which compression kicks in (0 dB = max level) att : attack time = time constant (sec) when level & compression going up rel : release time = time constant (sec) coming out of compression References http://en.wikipedia.org/wiki/Dynamic_range_compression https://ccrma.stanford.edu/~jos/filters/Nonlinear_Filter_Example_Dynamic.html Albert Graef's \"faust2pd\"/examples/synth/compressor_.dsp More features: https://github.com/magnetophon/faustCompressors (co.)limiter_1176_R4_mono A limiter guards against hard-clipping. It can be implemented as a compressor having a high threshold (near the clipping level), fast attack, and high ratio. Since the compression ratio is so high, some knee smoothing is desirable (for softer limiting). This example is intended to get you started using compressors as limiters, so all parameters are hardwired here to nominal values. ratio : 4 (moderate compression). See compressor_mono comments for a guide to other choices. Mike Shipley likes this (lowest) setting on the 1176. (Grammy award-winning mixer for Queen, Tom Petty, etc.). thresh : -6 dB, meaning 4:1 compression begins at amplitude 1/2. att : 800 MICROseconds (Note: scaled by ratio in the 1176) The 1176 range is said to be 20-800 microseconds. Faster attack gives \"more bite\" (e.g. on vocals), and makes hard-clipping less likely on fast overloads. rel : 0.5 s (Note: scaled by ratio in the 1176) The 1176 range is said to be 50-1100 ms. The 1176 also has a \"bright, clear eq effect\" (use filters.lib if desired). limiter_1176_R4_mono is a standard Faust function. Usage _ : limiter_1176_R4_mono : _ Reference: http://en.wikipedia.org/wiki/1176_Peak_Limiter (co.)limiter_1176_R4_stereo A limiter guards against hard-clipping. It can be implemented as a compressor having a high threshold (near the clipping level), fast attack and release, and high ratio. Since the ratio is so high, some knee smoothing is desirable (\"soft limiting\"). This example is intended to get you started using compressor_* as a limiter, so all parameters are hardwired to nominal values here. ratio : 4 (moderate compression), 8 (severe compression), 12 (mild limiting), or 20 to 1 (hard limiting). att : 20-800 MICROseconds (Note: scaled by ratio in the 1176). rel : 50-1100 ms (Note: scaled by ratio in the 1176). Mike Shipley likes 4:1 (Grammy-winning mixer for Queen, Tom Petty, etc.) Faster attack gives \"more bite\" (e.g. on vocals). He hears a bright, clear eq effect as well (not implemented here). Usage _,_ : limiter_1176_R4_stereo : _,_ Reference: http://en.wikipedia.org/wiki/1176_Peak_Limiter Expanders (co.)peak_expansion_gain_N_chan_db N channels dynamic range expander gain computer. peak_expansion_gain_N_chan_db is a standard Faust function. Usage si.bus(N) : peak_expansion_gain_N_chan_db(strength,thresh,range,att,hold,rel,knee,prePost,link,maxHold,N) : si.bus(N) Where: strength : strength of the expansion (0 = no expansion, 100 means gating, <1 means upward compression) thresh : dB level threshold below which expansion kicks in range : maximum amount of expansion in dB att : attack time = time constant (sec) coming out of expansion hold : hold time (sec) rel : release time = time constant (sec) going into expansion knee : a gradual increase in gain reduction around the threshold: above thresh+(knee/2) there is no gain reduction, below thresh-(knee/2) there is the same gain reduction as without a knee, and in between there is a gradual increase in gain reduction prePost : places the level detector either at the input or after the gain computer; this turns it from a linear return-to-zero detector into a log domain return-to-range detector link : the amount of linkage between the channels: 0 = each channel is independent, 1 = all channels have the same amount of gain reduction maxHold : the maximum hold time in samples, known at compile time N : the number of channels of the gain computer, known at compile time (co.)expander_N_chan Feed forward N channels dynamic range expander. expander_N_chan is a standard Faust function. Usage si.bus(N) : expander_N_chan(strength,thresh,range,att,hold,rel,knee,prePost,link,meter,maxHold,N) : si.bus(N) Where: strength : strength of the expansion (0 = no expansion, 100 means gating, <1 means upward compression) thresh : dB level threshold below which expansion kicks in range : maximum amount of expansion in dB att : attack time = time constant (sec) coming out of expansion hold : hold time rel : release time = time constant (sec) going into expansion knee : a gradual increase in gain reduction around the threshold: above thresh+(knee/2) there is no gain reduction, below thresh-(knee/2) there is the same gain reduction as without a knee, and in between there is a gradual increase in gain reduction prePost : places the level detector either at the input or after the gain computer; this turns it from a linear return-to-zero detector into a log domain return-to-range detector link : the amount of linkage between the channels: 0 = each channel is independent, 1 = all channels have the same amount of gain reduction meter : a gain reduction meter. It can be implemented like so: meter = _<:(_, (ba.linear2db:max(maxGR):meter_group((hbargraph(\"[1][unit:dB][tooltip: gain reduction in dB]\", maxGR, 0))))):attach; maxHold : the maximum hold time in samples, known at compile time N : the number of channels of the expander, known at compile time (co.)expanderSC_N_chan Feed forward N channels dynamic range expander with sidechain. expanderSC_N_chan is a standard Faust function. Usage si.bus(N) : expanderSC_N_chan(strength,thresh,range,att,hold,rel,knee,prePost,link,meter,maxHold,N,SCfunction,SCswitch,SCsignal) : si.bus(N) Where: strength : strength of the expansion (0 = no expansion, 100 means gating, <1 means upward compression) thresh : dB level threshold below which expansion kicks in range : maximum amount of expansion in dB att : attack time = time constant (sec) coming out of expansion hold : hold time rel : release time = time constant (sec) going into expansion knee : a gradual increase in gain reduction around the threshold: above thresh+(knee/2) there is no gain reduction, below thresh-(knee/2) there is the same gain reduction as without a knee, and in between there is a gradual increase in gain reduction prePost : places the level detector either at the input or after the gain computer; this turns it from a linear return-to-zero detector into a log domain return-to-range detector link : the amount of linkage between the channels: 0 = each channel is independent, 1 = all channels have the same amount of gain reduction meter : a gain reduction meter. It can be implemented like so: meter = _<:(_, (ba.linear2db:max(maxGR):meter_group((hbargraph(\"[1][unit:dB][tooltip: gain reduction in dB]\", maxGR, 0))))):attach; maxHold : the maximum hold time in samples, known at compile time N : the number of channels of the expander, known at compile time SCfunction : a function that get's placed before the level-detector, needs to have a single input and output SCswitch : use either the regular audio input or the SCsignal as the input for the level detector SCsignal : an audio signal, to be used as the input for the level detector when SCswitch is 1 Lookahead Limiters (co.)limiter_lad_N N-channels lookahead limiter inspired by IOhannes Zm\u00f6lnig's post, which is in turn based on the thesis by Peter Falkner \"Entwicklung eines digitalen Stereo-Limiters mit Hilfe des Signalprozessors DSP56001\". This version of the limiter uses a peak-holder with smoothed attack and release based on tau time constant filters. It is also possible to use a time constant that is 2PI*tau by dividing the attack and release times by 2PI . This time constant allows for the amplitude profile to reach 1 - e^(-2PI) of the final peak after the attack time. The input path can be delayed by the same amount as the attack time to synchronise input and amplitude profile, realising a system that is particularly effective as a colourless (ideally) brickwall limiter. Note that the effectiveness of the ceiling settings are dependent on the other parameters, especially the time constant used for the smoothing filters and the lookahead delay. Similarly, the colourless characteristics are also dependent on attack, hold, and release times. Since fluctuations above ~15 Hz are perceived as timbral effects, [Vassilakis and Kendall 2010] it is reasonable to set the attack time to 1/15 seconds for a smooth amplitude modulation. On the other hand, the hold time can be set to the peak-to-peak period of the expected lowest frequency in the signal, which allows for minimal distortion of the low frequencies. The release time can then provide a perceptually linear and gradual gain increase determined by the user for any specific application. The scaling factor for all the channels is determined by the loudest peak between them all, so that amplitude ratios between the signals are kept. Usage si.bus(N) : limiter_lad_N(N, LD, ceiling, attack, hold, release) : si.bus(N) Where: N : is the number of channels, known at compile-time LD : is the lookahead delay in seconds, known at compile-time ceiling : is the linear amplitude output limit attack : is the attack time in seconds hold : is the hold time in seconds release : is the release time in seconds Example for a stereo limiter: limiter_lad_N(2, .01, 1, .01, .1, 1); Reference: http://iem.at/~zmoelnig/publications/limiter (co.)limiter_lad_mono Specialised case of limiter_lad_N mono limiter. Usage _ : limiter_lad_mono(LD, ceiling, attack, hold, release) : _ Where: LD : is the lookahead delay in seconds, known at compile-time ceiling : is the linear amplitude output limit attack : is the attack time in seconds hold : is the hold time in seconds release : is the release time in seconds Reference: http://iem.at/~zmoelnig/publications/limiter (co.)limiter_lad_stereo Specialised case of limiter_lad_N stereo limiter. Usage _,_ : limiter_lad_stereo(LD, ceiling, attack, hold, release) : _,_ Where: LD : is the lookahead delay in seconds, known at compile-time ceiling : is the linear amplitude output limit attack : is the attack time in seconds hold : is the hold time in seconds release : is the release time in seconds Reference: http://iem.at/~zmoelnig/publications/limiter (co.)limiter_lad_quad Specialised case of limiter_lad_N quadraphonic limiter. Usage si.bus(4) : limiter_lad_quad(LD, ceiling, attack, hold, release) : si.bus(4) Where: LD : is the lookahead delay in seconds, known at compile-time ceiling : is the linear amplitude output limit attack : is the attack time in seconds hold : is the hold time in seconds release : is the release time in seconds Reference: http://iem.at/~zmoelnig/publications/limiter (co.)limiter_lad_bw Specialised case of limiter_lad_N and ready-to-use unit-amplitude mono limiting function. This implementation, in particular, uses 2PI*tau time constant filters for attack and release smoothing with synchronised input and gain signals. This function's best application is to be used as a brickwall limiter with the least colouring artefacts while keeping a not-so-slow release curve. Tests have shown that, given a pop song with 60 dB of amplification and a 0-dB-ceiling, the loudest peak recorded was ~0.38 dB. Usage _ : limiter_lad_bw : _ Reference: http://iem.at/~zmoelnig/publications/limiter","title":" compressors "},{"location":"libs/compressors/#compressorslib","text":"A library of compressor effects. Its official prefix is co .","title":"compressors.lib"},{"location":"libs/compressors/#references","text":"https://github.com/grame-cncm/faustlibraries/blob/master/compressors.lib","title":"References"},{"location":"libs/compressors/#functions-reference","text":"","title":"Functions Reference"},{"location":"libs/compressors/#copeak_compression_gain_mono_db","text":"Mono dynamic range compressor gain computer with dB output. peak_compression_gain_mono_db is a standard Faust function.","title":"(co.)peak_compression_gain_mono_db"},{"location":"libs/compressors/#usage","text":"_ : peak_compression_gain_mono_db(strength,thresh,att,rel,knee,prePost) : _ Where: strength : strength of the compression (0 = no compression, 1 means hard limiting, >1 means over-compression) thresh : dB level threshold above which compression kicks in att : attack time = time constant (sec) when level & compression going up rel : release time = time constant (sec) coming out of compression knee : a gradual increase in gain reduction around the threshold: below thresh-(knee/2) there is no gain reduction, above thresh+(knee/2) there is the same gain reduction as without a knee, and in between there is a gradual increase in gain reduction prePost : places the level detector either at the input or after the gain computer; this turns it from a linear return-to-zero detector into a log domain return-to-threshold detector It uses a strength parameter instead of the traditional ratio, in order to be able to function as a hard limiter. For that you'd need a ratio of infinity:1, and you cannot express that in Faust. Sometimes even bigger ratios are useful: for example a group recording where one instrument is recorded with both a close microphone and a room microphone, and the instrument is loud enough in the room mic when playing loud, but you want to boost it when it is playing soft.","title":"Usage"},{"location":"libs/compressors/#references_1","text":"http://en.wikipedia.org/wiki/Dynamic_range_compression Digital Dynamic Range Compressor Design, A Tutorial and Analysis, Dimitrios GIANNOULIS ( Dimitrios.Giannoulis@eecs.qmul.ac.uk ), Michael MASSBERG ( michael@massberg.org ), and Josuah D.REISS ( josh.reiss@eecs.qmul.ac.uk )","title":"References"},{"location":"libs/compressors/#copeak_compression_gain_n_chan_db","text":"N channels dynamic range compressor gain computer with dB output. peak_compression_gain_N_chan_db is a standard Faust function.","title":"(co.)peak_compression_gain_N_chan_db"},{"location":"libs/compressors/#usage_1","text":"si.bus(N) : peak_compression_gain_N_chan_db(strength,thresh,att,rel,knee,prePost,link,N) : si.bus(N) Where: strength : strength of the compression (0 = no compression, 1 means hard limiting, >1 means over-compression) thresh : dB level threshold above which compression kicks in att : attack time = time constant (sec) when level & compression going up rel : release time = time constant (sec) coming out of compression knee : a gradual increase in gain reduction around the threshold: below thresh-(knee/2) there is no gain reduction, above thresh+(knee/2) there is the same gain reduction as without a knee, and in between there is a gradual increase in gain reduction prePost : places the level detector either at the input or after the gain computer; this turns it from a linear return-to-zero detector into a log domain return-to-threshold detector link : the amount of linkage between the channels: 0 = each channel is independent, 1 = all channels have the same amount of gain reduction N : the number of channels of the compressor, known at compile time It uses a strength parameter instead of the traditional ratio, in order to be able to function as a hard limiter. For that you'd need a ratio of infinity:1, and you cannot express that in Faust. Sometimes even bigger ratios are useful: for example a group recording where one instrument is recorded with both a close microphone and a room microphone, and the instrument is loud enough in the room mic when playing loud, but you want to boost it when it is playing soft.","title":"Usage"},{"location":"libs/compressors/#references_2","text":"http://en.wikipedia.org/wiki/Dynamic_range_compression Digital Dynamic Range Compressor Design, A Tutorial and Analysis, Dimitrios GIANNOULIS ( Dimitrios.Giannoulis@eecs.qmul.ac.uk ), Michael MASSBERG ( michael@massberg.org ), and Josuah D.REISS ( josh.reiss@eecs.qmul.ac.uk )","title":"References"},{"location":"libs/compressors/#coffcompressor_n_chan","text":"Feed forward N channels dynamic range compressor. FFcompressor_N_chan is a standard Faust function.","title":"(co.)FFcompressor_N_chan"},{"location":"libs/compressors/#usage_2","text":"si.bus(N) : FFcompressor_N_chan(strength,thresh,att,rel,knee,prePost,link,meter,N) : si.bus(N) Where: strength : strength of the compression (0 = no compression, 1 means hard limiting, >1 means over-compression) thresh : dB level threshold above which compression kicks in att : attack time = time constant (sec) when level & compression going up rel : release time = time constant (sec) coming out of compression knee : a gradual increase in gain reduction around the threshold: below thresh-(knee/2) there is no gain reduction, above thresh+(knee/2) there is the same gain reduction as without a knee, and in between there is a gradual increase in gain reduction prePost : places the level detector either at the input or after the gain computer; this turns it from a linear return-to-zero detector into a log domain return-to-threshold detector link : the amount of linkage between the channels: 0 = each channel is independent, 1 = all channels have the same amount of gain reduction meter : a gain reduction meter. It can be implemented like so: meter = _<:(_, (ba.linear2db:max(maxGR):meter_group((hbargraph(\"[1][unit:dB][tooltip: gain reduction in dB]\", maxGR, 0))))):attach; N : the number of channels of the compressor, known at compile time It uses a strength parameter instead of the traditional ratio, in order to be able to function as a hard limiter. For that you'd need a ratio of infinity:1, and you cannot express that in Faust. Sometimes even bigger ratios are useful: for example a group recording where one instrument is recorded with both a close microphone and a room microphone, and the instrument is loud enough in the room mic when playing loud, but you want to boost it when it is playing soft.","title":"Usage"},{"location":"libs/compressors/#references_3","text":"http://en.wikipedia.org/wiki/Dynamic_range_compression Digital Dynamic Range Compressor Design, A Tutorial and Analysis, Dimitrios GIANNOULIS ( Dimitrios.Giannoulis@eecs.qmul.ac.uk ), Michael MASSBERG ( michael@massberg.org ), and Josuah D.REISS ( josh.reiss@eecs.qmul.ac.uk )","title":"References"},{"location":"libs/compressors/#cofbcompressor_n_chan","text":"Feed back N channels dynamic range compressor. FBcompressor_N_chan is a standard Faust function.","title":"(co.)FBcompressor_N_chan"},{"location":"libs/compressors/#usage_3","text":"si.bus(N) : FBcompressor_N_chan(strength,thresh,att,rel,knee,prePost,link,meter,N) : si.bus(N) Where: strength : strength of the compression (0 = no compression, 1 means hard limiting, >1 means over-compression) thresh : dB level threshold above which compression kicks in att : attack time = time constant (sec) when level & compression going up rel : release time = time constant (sec) coming out of compression knee : a gradual increase in gain reduction around the threshold: below thresh-(knee/2) there is no gain reduction, above thresh+(knee/2) there is the same gain reduction as without a knee, and in between there is a gradual increase in gain reduction prePost : places the level detector either at the input or after the gain computer; this turns it from a linear return-to-zero detector into a log domain return-to-threshold detector link : the amount of linkage between the channels. 0 = each channel is independent, 1 = all channels have the same amount of gain reduction meter : a gain reduction meter. It can be implemented with: meter = _ <: (_,(ba.linear2db:max(maxGR):meter_group((hbargraph(\"[1][unit:dB][tooltip: gain reduction in dB]\", maxGR, 0))))):attach; or it can be omitted by defining meter = _; . N : the number of channels of the compressor, known at compile time It uses a strength parameter instead of the traditional ratio, in order to be able to function as a hard limiter. For that you'd need a ratio of infinity:1, and you cannot express that in Faust. Sometimes even bigger ratios are useful: for example a group recording where one instrument is recorded with both a close microphone and a room microphone, and the instrument is loud enough in the room mic when playing loud, but you want to boost it when it is playing soft.","title":"Usage"},{"location":"libs/compressors/#references_4","text":"http://en.wikipedia.org/wiki/Dynamic_range_compression Digital Dynamic Range Compressor Design, A Tutorial and Analysis, Dimitrios GIANNOULIS ( Dimitrios.Giannoulis@eecs.qmul.ac.uk ), Michael MASSBERG ( michael@massberg.org ), and Josuah D.REISS ( josh.reiss@eecs.qmul.ac.uk )","title":"References"},{"location":"libs/compressors/#cofbffcompressor_n_chan","text":"Feed forward / feed back N channels dynamic range compressor. The feedback part has a much higher strength, so they end up sounding similar. FBFFcompressor_N_chan is a standard Faust function.","title":"(co.)FBFFcompressor_N_chan"},{"location":"libs/compressors/#usage_4","text":"si.bus(N) : FBFFcompressor_N_chan(strength,thresh,att,rel,knee,prePost,link,FBFF,meter,N) : si.bus(N) Where: strength : strength of the compression (0 = no compression, 1 means hard limiting, >1 means over-compression) thresh : dB level threshold above which compression kicks in att : attack time = time constant (sec) when level & compression going up rel : release time = time constant (sec) coming out of compression knee : a gradual increase in gain reduction around the threshold: below thresh-(knee/2) there is no gain reduction, above thresh+(knee/2) there is the same gain reduction as without a knee, and in between there is a gradual increase in gain reduction prePost : places the level detector either at the input or after the gain computer; this turns it from a linear return-to-zero detector into a log domain return-to-threshold detector link : the amount of linkage between the channels: 0 = each channel is independent, 1 = all channels have the same amount of gain reduction FBFF : fade between feed forward (0) and feed back (1) compression meter : a gain reduction meter. It can be implemented like so: meter = _<:(_,(max(maxGR):meter_group((hbargraph(\"[1][unit:dB][tooltip: gain reduction in dB]\", maxGR, 0))))):attach; N : the number of channels of the compressor, known at compile time It uses a strength parameter instead of the traditional ratio, in order to be able to function as a hard limiter. For that you'd need a ratio of infinity:1, and you cannot express that in Faust. Sometimes even bigger ratios are useful: for example a group recording where one instrument is recorded with both a close microphone and a room microphone, and the instrument is loud enough in the room mic when playing loud, but you want to boost it when it is playing soft.","title":"Usage"},{"location":"libs/compressors/#references_5","text":"http://en.wikipedia.org/wiki/Dynamic_range_compression Digital Dynamic Range Compressor Design, A Tutorial and Analysis, Dimitrios GIANNOULIS ( Dimitrios.Giannoulis@eecs.qmul.ac.uk ), Michael MASSBERG ( michael@massberg.org ), and Josuah D.REISS ( josh.reiss@eecs.qmul.ac.uk )","title":"References"},{"location":"libs/compressors/#corms_compression_gain_mono_db","text":"Mono RMS dynamic range compressor gain computer with dB output. RMS_compression_gain_mono_db is a standard Faust function.","title":"(co.)RMS_compression_gain_mono_db"},{"location":"libs/compressors/#usage_5","text":"_ : RMS_compression_gain_mono_db(strength,thresh,att,rel,knee,prePost) : _ Where: strength : strength of the compression (0 = no compression, 1 means hard limiting, >1 means over-compression) thresh : dB level threshold above which compression kicks in att : attack time = time constant (sec) when level & compression going up rel : release time = time constant (sec) coming out of compression knee : a gradual increase in gain reduction around the threshold: below thresh-(knee/2) there is no gain reduction, above thresh+(knee/2) there is the same gain reduction as without a knee, and in between there is a gradual increase in gain reduction prePost : places the level detector either at the input or after the gain computer; this turns it from a linear return-to-zero detector into a log domain return-to-threshold detector It uses a strength parameter instead of the traditional ratio, in order to be able to function as a hard limiter. For that you'd need a ratio of infinity:1, and you cannot express that in Faust. Sometimes even bigger ratios are useful: for example a group recording where one instrument is recorded with both a close microphone and a room microphone, and the instrument is loud enough in the room mic when playing loud, but you want to boost it when it is playing soft.","title":"Usage"},{"location":"libs/compressors/#references_6","text":"http://en.wikipedia.org/wiki/Dynamic_range_compression Digital Dynamic Range Compressor Design, A Tutorial and Analysis, Dimitrios GIANNOULIS ( Dimitrios.Giannoulis@eecs.qmul.ac.uk ), Michael MASSBERG ( michael@massberg.org ), and Josuah D.REISS ( josh.reiss@eecs.qmul.ac.uk )","title":"References"},{"location":"libs/compressors/#corms_compression_gain_n_chan_db","text":"RMS N channels dynamic range compressor gain computer with dB output. RMS_compression_gain_N_chan_db is a standard Faust function.","title":"(co.)RMS_compression_gain_N_chan_db"},{"location":"libs/compressors/#usage_6","text":"si.bus(N) : RMS_compression_gain_N_chan_db(strength,thresh,att,rel,knee,prePost,link,N) : si.bus(N) Where: strength : strength of the compression (0 = no compression, 1 means hard limiting, >1 means over-compression) thresh : dB level threshold above which compression kicks in att : attack time = time constant (sec) when level & compression going up rel : release time = time constant (sec) coming out of compression knee : a gradual increase in gain reduction around the threshold: below thresh-(knee/2) there is no gain reduction, above thresh+(knee/2) there is the same gain reduction as without a knee, and in between there is a gradual increase in gain reduction prePost : places the level detector either at the input or after the gain computer; this turns it from a linear return-to-zero detector into a log domain return-to-threshold detector link : the amount of linkage between the channels: 0 = each channel is independent, 1 = all channels have the same amount of gain reduction N : the number of channels of the compressor It uses a strength parameter instead of the traditional ratio, in order to be able to function as a hard limiter. For that you'd need a ratio of infinity:1, and you cannot express that in Faust. Sometimes even bigger ratios are useful: for example a group recording where one instrument is recorded with both a close microphone and a room microphone, and the instrument is loud enough in the room mic when playing loud, but you want to boost it when it is playing soft.","title":"Usage"},{"location":"libs/compressors/#references_7","text":"http://en.wikipedia.org/wiki/Dynamic_range_compression Digital Dynamic Range Compressor Design, A Tutorial and Analysis, Dimitrios GIANNOULIS ( Dimitrios.Giannoulis@eecs.qmul.ac.uk ), Michael MASSBERG ( michael@massberg.org ), and Josuah D.REISS ( josh.reiss@eecs.qmul.ac.uk )","title":"References"},{"location":"libs/compressors/#corms_fbffcompressor_n_chan","text":"RMS feed forward / feed back N channels dynamic range compressor. The feedback part has a much higher strength, so they end up sounding similar. RMS_FBFFcompressor_N_chan is a standard Faust function.","title":"(co.)RMS_FBFFcompressor_N_chan"},{"location":"libs/compressors/#usage_7","text":"si.bus(N) : RMS_FBFFcompressor_N_chan(strength,thresh,att,rel,knee,prePost,link,FBFF,meter,N) : si.bus(N) Where: strength : strength of the compression (0 = no compression, 1 means hard limiting, >1 means over-compression) thresh : dB level threshold above which compression kicks in att : attack time = time constant (sec) when level & compression going up rel : release time = time constant (sec) coming out of compression knee : a gradual increase in gain reduction around the threshold: below thresh-(knee/2) there is no gain reduction, above thresh+(knee/2) there is the same gain reduction as without a knee, and in between there is a gradual increase in gain reduction prePost : places the level detector either at the input or after the gain computer; this turns it from a linear return-to-zero detector into a log domain return-to-threshold detector link : the amount of linkage between the channels: 0 = each channel is independent, 1 = all channels have the same amount of gain reduction FBFF : fade between feed forward (0) and feed back (1) compression. meter : a gain reduction meter. It can be implemented with: meter = _<:(_,(max(maxGR):meter_group((hbargraph(\"[1][unit:dB][tooltip: gain reduction in dB]\", maxGR, 0))))):attach; N : the number of channels of the compressor, known at compile time It uses a strength parameter instead of the traditional ratio, in order to be able to function as a hard limiter. For that you'd need a ratio of infinity:1, and you cannot express that in Faust. Sometimes even bigger ratios are useful: for example a group recording where one instrument is recorded with both a close microphone and a room microphone, and the instrument is loud enough in the room mic when playing loud, but you want to boost it when it is playing soft. To save CPU we cheat a bit, in a similar way as in the original libs: instead of crosfading between two sets of gain calculators as above, we take the abs of the audio from both the FF and FB, and crossfade between those, and feed that into one set of gain calculators again the strength is much higher when in FB mode, but implemented differently.","title":"Usage"},{"location":"libs/compressors/#references_8","text":"http://en.wikipedia.org/wiki/Dynamic_range_compression Digital Dynamic Range Compressor Design, A Tutorial and Analysis, Dimitrios GIANNOULIS ( Dimitrios.Giannoulis@eecs.qmul.ac.uk ), Michael MASSBERG ( michael@massberg.org ), and Josuah D.REISS ( josh.reiss@eecs.qmul.ac.uk )","title":"References"},{"location":"libs/compressors/#corms_fbcompressor_peak_limiter_n_chan","text":"N channel RMS feed back compressor into peak limiter feeding back into the FB compressor. By combining them this way, they complement each other optimally: the RMS compressor doesn't have to deal with the peaks, and the peak limiter get's spared from the steady state signal. The feedback part has a much higher strength, so they end up sounding similar. RMS_FBcompressor_peak_limiter_N_chan is a standard Faust function.","title":"(co.)RMS_FBcompressor_peak_limiter_N_chan"},{"location":"libs/compressors/#usage_8","text":"si.bus(N) : RMS_FBcompressor_peak_limiter_N_chan(strength,thresh,threshLim,att,rel,knee,link,meter,meterLim,N) : si.bus(N) Where: strength : strength of the compression (0 = no compression, 1 means hard limiting, >1 means over-compression) thresh : dB level threshold above which compression kicks in threshLim : dB level threshold above which the brickwall limiter kicks in att : attack time = time constant (sec) when level & compression going up this is also used as the release time of the limiter rel : release time = time constant (sec) coming out of compression knee : a gradual increase in gain reduction around the threshold: below thresh-(knee/2) there is no gain reduction, above thresh+(knee/2) there is the same gain reduction as without a knee, and in between there is a gradual increase in gain reduction the limiter uses a knee half this size link : the amount of linkage between the channels: 0 = each channel is independent, 1 = all channels have the same amount of gain reduction meter : compressor gain reduction meter. It can be implemented with: meter = _<:(_,(max(maxGR):meter_group((hbargraph(\"[1][unit:dB][tooltip: gain reduction in dB]\", maxGR, 0))))):attach; meterLim : brickwall limiter gain reduction meter. It can be implemented with: meterLim = _<:(_,(max(maxGR):meter_group((hbargraph(\"[1][unit:dB][tooltip: gain reduction in dB]\", maxGR, 0))))):attach; N : the number of channels of the compressor, known at compile time It uses a strength parameter instead of the traditional ratio, in order to be able to function as a hard limiter. For that you'd need a ratio of infinity:1, and you cannot express that in Faust. Sometimes even bigger ratios are useful: for example a group recording where one instrument is recorded with both a close microphone and a room microphone, and the instrument is loud enough in the room mic when playing loud, but you want to boost it when it is playing soft.","title":"Usage"},{"location":"libs/compressors/#references_9","text":"http://en.wikipedia.org/wiki/Dynamic_range_compression Digital Dynamic Range Compressor Design, A Tutorial and Analysis, Dimitrios GIANNOULIS ( Dimitrios.Giannoulis@eecs.qmul.ac.uk ), Michael MASSBERG ( michael@massberg.org ), and Josuah D.REISS ( josh.reiss@eecs.qmul.ac.uk )","title":"References"},{"location":"libs/compressors/#linear-gain-computer-section","text":"The gain computer functions in this section have been replaced by a version that outputs dBs, but we retain the linear output version for backward compatibility.","title":"Linear gain computer section"},{"location":"libs/compressors/#copeak_compression_gain_mono","text":"Mono dynamic range compressor gain computer with linear output. peak_compression_gain_mono is a standard Faust function.","title":"(co.)peak_compression_gain_mono"},{"location":"libs/compressors/#usage_9","text":"_ : peak_compression_gain_mono(strength,thresh,att,rel,knee,prePost) : _ Where: strength : strength of the compression (0 = no compression, 1 means hard limiting, >1 means over-compression) thresh : dB level threshold above which compression kicks in att : attack time = time constant (sec) when level & compression going up rel : release time = time constant (sec) coming out of compression knee : a gradual increase in gain reduction around the threshold: below thresh-(knee/2) there is no gain reduction, above thresh+(knee/2) there is the same gain reduction as without a knee, and in between there is a gradual increase in gain reduction prePost : places the level detector either at the input or after the gain computer; this turns it from a linear return-to-zero detector into a log domain return-to-threshold detector It uses a strength parameter instead of the traditional ratio, in order to be able to function as a hard limiter. For that you'd need a ratio of infinity:1, and you cannot express that in Faust. Sometimes even bigger ratios are useful: for example a group recording where one instrument is recorded with both a close microphone and a room microphone, and the instrument is loud enough in the room mic when playing loud, but you want to boost it when it is playing soft.","title":"Usage"},{"location":"libs/compressors/#references_10","text":"http://en.wikipedia.org/wiki/Dynamic_range_compression Digital Dynamic Range Compressor Design, A Tutorial and Analysis, Dimitrios GIANNOULIS ( Dimitrios.Giannoulis@eecs.qmul.ac.uk ), Michael MASSBERG ( michael@massberg.org ), and Josuah D.REISS ( josh.reiss@eecs.qmul.ac.uk )","title":"References"},{"location":"libs/compressors/#copeak_compression_gain_n_chan","text":"N channels dynamic range compressor gain computer with linear output. peak_compression_gain_N_chan is a standard Faust function.","title":"(co.)peak_compression_gain_N_chan"},{"location":"libs/compressors/#usage_10","text":"si.bus(N) : peak_compression_gain_N_chan(strength,thresh,att,rel,knee,prePost,link,N) : si.bus(N) Where: strength : strength of the compression (0 = no compression, 1 means hard limiting, >1 means over-compression) thresh : dB level threshold above which compression kicks in att : attack time = time constant (sec) when level & compression going up rel : release time = time constant (sec) coming out of compression knee : a gradual increase in gain reduction around the threshold: below thresh-(knee/2) there is no gain reduction, above thresh+(knee/2) there is the same gain reduction as without a knee, and in between there is a gradual increase in gain reduction prePost : places the level detector either at the input or after the gain computer; this turns it from a linear return-to-zero detector into a log domain return-to-threshold detector link : the amount of linkage between the channels: 0 = each channel is independent, 1 = all channels have the same amount of gain reduction N : the number of channels of the compressor, known at compile time It uses a strength parameter instead of the traditional ratio, in order to be able to function as a hard limiter. For that you'd need a ratio of infinity:1, and you cannot express that in Faust. Sometimes even bigger ratios are useful: for example a group recording where one instrument is recorded with both a close microphone and a room microphone, and the instrument is loud enough in the room mic when playing loud, but you want to boost it when it is playing soft.","title":"Usage"},{"location":"libs/compressors/#references_11","text":"http://en.wikipedia.org/wiki/Dynamic_range_compression Digital Dynamic Range Compressor Design, A Tutorial and Analysis, Dimitrios GIANNOULIS ( Dimitrios.Giannoulis@eecs.qmul.ac.uk ), Michael MASSBERG ( michael@massberg.org ), and Josuah D.REISS ( josh.reiss@eecs.qmul.ac.uk )","title":"References"},{"location":"libs/compressors/#corms_compression_gain_mono","text":"Mono RMS dynamic range compressor gain computer with linear output. RMS_compression_gain_mono is a standard Faust function.","title":"(co.)RMS_compression_gain_mono"},{"location":"libs/compressors/#usage_11","text":"_ : RMS_compression_gain_mono(strength,thresh,att,rel,knee,prePost) : _ Where: strength : strength of the compression (0 = no compression, 1 means hard limiting, >1 means over-compression) thresh : dB level threshold above which compression kicks in att : attack time = time constant (sec) when level & compression going up rel : release time = time constant (sec) coming out of compression knee : a gradual increase in gain reduction around the threshold: below thresh-(knee/2) there is no gain reduction, above thresh+(knee/2) there is the same gain reduction as without a knee, and in between there is a gradual increase in gain reduction prePost : places the level detector either at the input or after the gain computer; this turns it from a linear return-to-zero detector into a log domain return-to-threshold detector It uses a strength parameter instead of the traditional ratio, in order to be able to function as a hard limiter. For that you'd need a ratio of infinity:1, and you cannot express that in Faust. Sometimes even bigger ratios are useful: for example a group recording where one instrument is recorded with both a close microphone and a room microphone, and the instrument is loud enough in the room mic when playing loud, but you want to boost it when it is playing soft.","title":"Usage"},{"location":"libs/compressors/#references_12","text":"http://en.wikipedia.org/wiki/Dynamic_range_compression Digital Dynamic Range Compressor Design, A Tutorial and Analysis, Dimitrios GIANNOULIS ( Dimitrios.Giannoulis@eecs.qmul.ac.uk ), Michael MASSBERG ( michael@massberg.org ), and Josuah D.REISS ( josh.reiss@eecs.qmul.ac.uk )","title":"References"},{"location":"libs/compressors/#corms_compression_gain_n_chan","text":"RMS N channels dynamic range compressor gain computer with linear output. RMS_compression_gain_N_chan is a standard Faust function.","title":"(co.)RMS_compression_gain_N_chan"},{"location":"libs/compressors/#usage_12","text":"si.bus(N) : RMS_compression_gain_N_chan(strength,thresh,att,rel,knee,prePost,link,N) : si.bus(N) Where: strength : strength of the compression (0 = no compression, 1 means hard limiting, >1 means over-compression) thresh : dB level threshold above which compression kicks in att : attack time = time constant (sec) when level & compression going up rel : release time = time constant (sec) coming out of compression knee : a gradual increase in gain reduction around the threshold: below thresh-(knee/2) there is no gain reduction, above thresh+(knee/2) there is the same gain reduction as without a knee, and in between there is a gradual increase in gain reduction prePost : places the level detector either at the input or after the gain computer; this turns it from a linear return-to-zero detector into a log domain return-to-threshold detector link : the amount of linkage between the channels: 0 = each channel is independent, 1 = all channels have the same amount of gain reduction N : the number of channels of the compressor, known at compile time It uses a strength parameter instead of the traditional ratio, in order to be able to function as a hard limiter. For that you'd need a ratio of infinity:1, and you cannot express that in Faust. Sometimes even bigger ratios are useful: for example a group recording where one instrument is recorded with both a close microphone and a room microphone, and the instrument is loud enough in the room mic when playing loud, but you want to boost it when it is playing soft.","title":"Usage"},{"location":"libs/compressors/#references_13","text":"http://en.wikipedia.org/wiki/Dynamic_range_compression Digital Dynamic Range Compressor Design, A Tutorial and Analysis, Dimitrios GIANNOULIS ( Dimitrios.Giannoulis@eecs.qmul.ac.uk ), Michael MASSBERG ( michael@massberg.org ), and Josuah D.REISS ( josh.reiss@eecs.qmul.ac.uk )","title":"References"},{"location":"libs/compressors/#original-versions-section","text":"The functions in this section are largely superseded by the limiters above, but we retain them for backward compatibility and for situations in which a more permissive, MIT-style license is required.","title":"Original versions section"},{"location":"libs/compressors/#cocompressor_lad_mono","text":"Mono dynamic range compressor with lookahead delay. compressor_lad_mono is a standard Faust function.","title":"(co.)compressor_lad_mono"},{"location":"libs/compressors/#usage_13","text":"_ : compressor_lad_mono(lad,ratio,thresh,att,rel) : _ Where: lad : lookahead delay in seconds (nonnegative) - gets rounded to nearest sample. The effective attack time is a good setting ratio : compression ratio (1 = no compression, >1 means compression) Ratios: 4 is moderate compression, 8 is strong compression, 12 is mild limiting, and 20 is pretty hard limiting at the threshold thresh : dB level threshold above which compression kicks in (0 dB = max level) att : attack time = time constant (sec) when level & compression are going up rel : release time = time constant (sec) coming out of compression","title":"Usage"},{"location":"libs/compressors/#references_14","text":"http://en.wikipedia.org/wiki/Dynamic_range_compression https://ccrma.stanford.edu/~jos/filters/Nonlinear_Filter_Example_Dynamic.html Albert Graef's \"faust2pd\"/examples/synth/compressor_.dsp More features: https://github.com/magnetophon/faustCompressors","title":"References"},{"location":"libs/compressors/#cocompressor_mono","text":"Mono dynamic range compressors. compressor_mono is a standard Faust function.","title":"(co.)compressor_mono"},{"location":"libs/compressors/#usage_14","text":"_ : compressor_mono(ratio,thresh,att,rel) : _ Where: ratio : compression ratio (1 = no compression, >1 means compression) Ratios: 4 is moderate compression, 8 is strong compression, 12 is mild limiting, and 20 is pretty hard limiting at the threshold thresh : dB level threshold above which compression kicks in (0 dB = max level) att : attack time = time constant (sec) when level & compression are going up rel : release time = time constant (sec) coming out of compression","title":"Usage"},{"location":"libs/compressors/#references_15","text":"http://en.wikipedia.org/wiki/Dynamic_range_compression https://ccrma.stanford.edu/~jos/filters/Nonlinear_Filter_Example_Dynamic.html Albert Graef's \"faust2pd\"/examples/synth/compressor_.dsp More features: https://github.com/magnetophon/faustCompressors","title":"References"},{"location":"libs/compressors/#cocompressor_stereo","text":"Stereo dynamic range compressors.","title":"(co.)compressor_stereo"},{"location":"libs/compressors/#usage_15","text":"_,_ : compressor_stereo(ratio,thresh,att,rel) : _,_ Where: ratio : compression ratio (1 = no compression, >1 means compression) thresh : dB level threshold above which compression kicks in (0 dB = max level) att : attack time = time constant (sec) when level & compression going up rel : release time = time constant (sec) coming out of compression","title":"Usage"},{"location":"libs/compressors/#references_16","text":"http://en.wikipedia.org/wiki/Dynamic_range_compression https://ccrma.stanford.edu/~jos/filters/Nonlinear_Filter_Example_Dynamic.html Albert Graef's \"faust2pd\"/examples/synth/compressor_.dsp More features: https://github.com/magnetophon/faustCompressors","title":"References"},{"location":"libs/compressors/#cocompression_gain_mono","text":"Compression-gain calculation for dynamic range compressors.","title":"(co.)compression_gain_mono"},{"location":"libs/compressors/#usage_16","text":"_ : compression_gain_mono(ratio,thresh,att,rel) : _ Where: ratio : compression ratio (1 = no compression, >1 means compression) thresh : dB level threshold above which compression kicks in (0 dB = max level) att : attack time = time constant (sec) when level & compression going up rel : release time = time constant (sec) coming out of compression","title":"Usage"},{"location":"libs/compressors/#references_17","text":"http://en.wikipedia.org/wiki/Dynamic_range_compression https://ccrma.stanford.edu/~jos/filters/Nonlinear_Filter_Example_Dynamic.html Albert Graef's \"faust2pd\"/examples/synth/compressor_.dsp More features: https://github.com/magnetophon/faustCompressors","title":"References"},{"location":"libs/compressors/#colimiter_1176_r4_mono","text":"A limiter guards against hard-clipping. It can be implemented as a compressor having a high threshold (near the clipping level), fast attack, and high ratio. Since the compression ratio is so high, some knee smoothing is desirable (for softer limiting). This example is intended to get you started using compressors as limiters, so all parameters are hardwired here to nominal values. ratio : 4 (moderate compression). See compressor_mono comments for a guide to other choices. Mike Shipley likes this (lowest) setting on the 1176. (Grammy award-winning mixer for Queen, Tom Petty, etc.). thresh : -6 dB, meaning 4:1 compression begins at amplitude 1/2. att : 800 MICROseconds (Note: scaled by ratio in the 1176) The 1176 range is said to be 20-800 microseconds. Faster attack gives \"more bite\" (e.g. on vocals), and makes hard-clipping less likely on fast overloads. rel : 0.5 s (Note: scaled by ratio in the 1176) The 1176 range is said to be 50-1100 ms. The 1176 also has a \"bright, clear eq effect\" (use filters.lib if desired). limiter_1176_R4_mono is a standard Faust function.","title":"(co.)limiter_1176_R4_mono"},{"location":"libs/compressors/#usage_17","text":"_ : limiter_1176_R4_mono : _","title":"Usage"},{"location":"libs/compressors/#reference","text":"http://en.wikipedia.org/wiki/1176_Peak_Limiter","title":"Reference:"},{"location":"libs/compressors/#colimiter_1176_r4_stereo","text":"A limiter guards against hard-clipping. It can be implemented as a compressor having a high threshold (near the clipping level), fast attack and release, and high ratio. Since the ratio is so high, some knee smoothing is desirable (\"soft limiting\"). This example is intended to get you started using compressor_* as a limiter, so all parameters are hardwired to nominal values here. ratio : 4 (moderate compression), 8 (severe compression), 12 (mild limiting), or 20 to 1 (hard limiting). att : 20-800 MICROseconds (Note: scaled by ratio in the 1176). rel : 50-1100 ms (Note: scaled by ratio in the 1176). Mike Shipley likes 4:1 (Grammy-winning mixer for Queen, Tom Petty, etc.) Faster attack gives \"more bite\" (e.g. on vocals). He hears a bright, clear eq effect as well (not implemented here).","title":"(co.)limiter_1176_R4_stereo"},{"location":"libs/compressors/#usage_18","text":"_,_ : limiter_1176_R4_stereo : _,_","title":"Usage"},{"location":"libs/compressors/#reference_1","text":"http://en.wikipedia.org/wiki/1176_Peak_Limiter","title":"Reference:"},{"location":"libs/compressors/#expanders","text":"","title":"Expanders"},{"location":"libs/compressors/#copeak_expansion_gain_n_chan_db","text":"N channels dynamic range expander gain computer. peak_expansion_gain_N_chan_db is a standard Faust function.","title":"(co.)peak_expansion_gain_N_chan_db"},{"location":"libs/compressors/#usage_19","text":"si.bus(N) : peak_expansion_gain_N_chan_db(strength,thresh,range,att,hold,rel,knee,prePost,link,maxHold,N) : si.bus(N) Where: strength : strength of the expansion (0 = no expansion, 100 means gating, <1 means upward compression) thresh : dB level threshold below which expansion kicks in range : maximum amount of expansion in dB att : attack time = time constant (sec) coming out of expansion hold : hold time (sec) rel : release time = time constant (sec) going into expansion knee : a gradual increase in gain reduction around the threshold: above thresh+(knee/2) there is no gain reduction, below thresh-(knee/2) there is the same gain reduction as without a knee, and in between there is a gradual increase in gain reduction prePost : places the level detector either at the input or after the gain computer; this turns it from a linear return-to-zero detector into a log domain return-to-range detector link : the amount of linkage between the channels: 0 = each channel is independent, 1 = all channels have the same amount of gain reduction maxHold : the maximum hold time in samples, known at compile time N : the number of channels of the gain computer, known at compile time","title":"Usage"},{"location":"libs/compressors/#coexpander_n_chan","text":"Feed forward N channels dynamic range expander. expander_N_chan is a standard Faust function.","title":"(co.)expander_N_chan"},{"location":"libs/compressors/#usage_20","text":"si.bus(N) : expander_N_chan(strength,thresh,range,att,hold,rel,knee,prePost,link,meter,maxHold,N) : si.bus(N) Where: strength : strength of the expansion (0 = no expansion, 100 means gating, <1 means upward compression) thresh : dB level threshold below which expansion kicks in range : maximum amount of expansion in dB att : attack time = time constant (sec) coming out of expansion hold : hold time rel : release time = time constant (sec) going into expansion knee : a gradual increase in gain reduction around the threshold: above thresh+(knee/2) there is no gain reduction, below thresh-(knee/2) there is the same gain reduction as without a knee, and in between there is a gradual increase in gain reduction prePost : places the level detector either at the input or after the gain computer; this turns it from a linear return-to-zero detector into a log domain return-to-range detector link : the amount of linkage between the channels: 0 = each channel is independent, 1 = all channels have the same amount of gain reduction meter : a gain reduction meter. It can be implemented like so: meter = _<:(_, (ba.linear2db:max(maxGR):meter_group((hbargraph(\"[1][unit:dB][tooltip: gain reduction in dB]\", maxGR, 0))))):attach; maxHold : the maximum hold time in samples, known at compile time N : the number of channels of the expander, known at compile time","title":"Usage"},{"location":"libs/compressors/#coexpandersc_n_chan","text":"Feed forward N channels dynamic range expander with sidechain. expanderSC_N_chan is a standard Faust function.","title":"(co.)expanderSC_N_chan"},{"location":"libs/compressors/#usage_21","text":"si.bus(N) : expanderSC_N_chan(strength,thresh,range,att,hold,rel,knee,prePost,link,meter,maxHold,N,SCfunction,SCswitch,SCsignal) : si.bus(N) Where: strength : strength of the expansion (0 = no expansion, 100 means gating, <1 means upward compression) thresh : dB level threshold below which expansion kicks in range : maximum amount of expansion in dB att : attack time = time constant (sec) coming out of expansion hold : hold time rel : release time = time constant (sec) going into expansion knee : a gradual increase in gain reduction around the threshold: above thresh+(knee/2) there is no gain reduction, below thresh-(knee/2) there is the same gain reduction as without a knee, and in between there is a gradual increase in gain reduction prePost : places the level detector either at the input or after the gain computer; this turns it from a linear return-to-zero detector into a log domain return-to-range detector link : the amount of linkage between the channels: 0 = each channel is independent, 1 = all channels have the same amount of gain reduction meter : a gain reduction meter. It can be implemented like so: meter = _<:(_, (ba.linear2db:max(maxGR):meter_group((hbargraph(\"[1][unit:dB][tooltip: gain reduction in dB]\", maxGR, 0))))):attach; maxHold : the maximum hold time in samples, known at compile time N : the number of channels of the expander, known at compile time SCfunction : a function that get's placed before the level-detector, needs to have a single input and output SCswitch : use either the regular audio input or the SCsignal as the input for the level detector SCsignal : an audio signal, to be used as the input for the level detector when SCswitch is 1","title":"Usage"},{"location":"libs/compressors/#lookahead-limiters","text":"","title":"Lookahead Limiters"},{"location":"libs/compressors/#colimiter_lad_n","text":"N-channels lookahead limiter inspired by IOhannes Zm\u00f6lnig's post, which is in turn based on the thesis by Peter Falkner \"Entwicklung eines digitalen Stereo-Limiters mit Hilfe des Signalprozessors DSP56001\". This version of the limiter uses a peak-holder with smoothed attack and release based on tau time constant filters. It is also possible to use a time constant that is 2PI*tau by dividing the attack and release times by 2PI . This time constant allows for the amplitude profile to reach 1 - e^(-2PI) of the final peak after the attack time. The input path can be delayed by the same amount as the attack time to synchronise input and amplitude profile, realising a system that is particularly effective as a colourless (ideally) brickwall limiter. Note that the effectiveness of the ceiling settings are dependent on the other parameters, especially the time constant used for the smoothing filters and the lookahead delay. Similarly, the colourless characteristics are also dependent on attack, hold, and release times. Since fluctuations above ~15 Hz are perceived as timbral effects, [Vassilakis and Kendall 2010] it is reasonable to set the attack time to 1/15 seconds for a smooth amplitude modulation. On the other hand, the hold time can be set to the peak-to-peak period of the expected lowest frequency in the signal, which allows for minimal distortion of the low frequencies. The release time can then provide a perceptually linear and gradual gain increase determined by the user for any specific application. The scaling factor for all the channels is determined by the loudest peak between them all, so that amplitude ratios between the signals are kept.","title":"(co.)limiter_lad_N"},{"location":"libs/compressors/#usage_22","text":"si.bus(N) : limiter_lad_N(N, LD, ceiling, attack, hold, release) : si.bus(N) Where: N : is the number of channels, known at compile-time LD : is the lookahead delay in seconds, known at compile-time ceiling : is the linear amplitude output limit attack : is the attack time in seconds hold : is the hold time in seconds release : is the release time in seconds Example for a stereo limiter: limiter_lad_N(2, .01, 1, .01, .1, 1);","title":"Usage"},{"location":"libs/compressors/#reference_2","text":"http://iem.at/~zmoelnig/publications/limiter","title":"Reference:"},{"location":"libs/compressors/#colimiter_lad_mono","text":"Specialised case of limiter_lad_N mono limiter.","title":"(co.)limiter_lad_mono"},{"location":"libs/compressors/#usage_23","text":"_ : limiter_lad_mono(LD, ceiling, attack, hold, release) : _ Where: LD : is the lookahead delay in seconds, known at compile-time ceiling : is the linear amplitude output limit attack : is the attack time in seconds hold : is the hold time in seconds release : is the release time in seconds","title":"Usage"},{"location":"libs/compressors/#reference_3","text":"http://iem.at/~zmoelnig/publications/limiter","title":"Reference:"},{"location":"libs/compressors/#colimiter_lad_stereo","text":"Specialised case of limiter_lad_N stereo limiter.","title":"(co.)limiter_lad_stereo"},{"location":"libs/compressors/#usage_24","text":"_,_ : limiter_lad_stereo(LD, ceiling, attack, hold, release) : _,_ Where: LD : is the lookahead delay in seconds, known at compile-time ceiling : is the linear amplitude output limit attack : is the attack time in seconds hold : is the hold time in seconds release : is the release time in seconds","title":"Usage"},{"location":"libs/compressors/#reference_4","text":"http://iem.at/~zmoelnig/publications/limiter","title":"Reference:"},{"location":"libs/compressors/#colimiter_lad_quad","text":"Specialised case of limiter_lad_N quadraphonic limiter.","title":"(co.)limiter_lad_quad"},{"location":"libs/compressors/#usage_25","text":"si.bus(4) : limiter_lad_quad(LD, ceiling, attack, hold, release) : si.bus(4) Where: LD : is the lookahead delay in seconds, known at compile-time ceiling : is the linear amplitude output limit attack : is the attack time in seconds hold : is the hold time in seconds release : is the release time in seconds","title":"Usage"},{"location":"libs/compressors/#reference_5","text":"http://iem.at/~zmoelnig/publications/limiter","title":"Reference:"},{"location":"libs/compressors/#colimiter_lad_bw","text":"Specialised case of limiter_lad_N and ready-to-use unit-amplitude mono limiting function. This implementation, in particular, uses 2PI*tau time constant filters for attack and release smoothing with synchronised input and gain signals. This function's best application is to be used as a brickwall limiter with the least colouring artefacts while keeping a not-so-slow release curve. Tests have shown that, given a pop song with 60 dB of amplification and a 0-dB-ceiling, the loudest peak recorded was ~0.38 dB.","title":"(co.)limiter_lad_bw"},{"location":"libs/compressors/#usage_26","text":"_ : limiter_lad_bw : _","title":"Usage"},{"location":"libs/compressors/#reference_6","text":"http://iem.at/~zmoelnig/publications/limiter","title":"Reference:"},{"location":"libs/delays/","text":"delays.lib This library contains a collection of delay functions. Its official prefix is de . References https://github.com/grame-cncm/faustlibraries/blob/master/delays.lib Basic Delay Functions (de.)delay Simple d samples delay where n is the maximum delay length as a number of samples. Unlike the @ delay operator, here the delay signal d is explicitly bounded to the interval [0..n]. The consequence is that delay will compile even if the interval of d can't be computed by the compiler. delay is a standard Faust function. Usage _ : delay(n,d) : _ Where: n : the max delay length in samples d : the delay length in samples (integer) (de.)fdelay Simple d samples fractional delay based on 2 interpolated delay lines where n is the maximum delay length as a number of samples. fdelay is a standard Faust function. Usage _ : fdelay(n,d) : _ Where: n : the max delay length in samples d : the delay length in samples (float) (de.)sdelay s(mooth)delay: a mono delay that doesn't click and doesn't transpose when the delay time is changed. Usage _ : sdelay(n,it,d) : _ Where : n : the max delay length in samples it : interpolation time (in samples), for example 1024 d : the delay length in samples (float) Lagrange Interpolation (de.)fdelaylti and (de.)fdelayltv Fractional delay line using Lagrange interpolation. Usage _ : fdelaylt[i|v](N, n, d) : _ Where: N=1,2,3,... is the order of the Lagrange interpolation polynomial (constant numerical expression) n : the max delay length in samples d : the delay length in samples fdelaylti is most efficient, but designed for constant/slowly-varying delay. fdelayltv is more expensive and more robust when the delay varies rapidly. Note: the requested delay should not be less than (N-1)/2 . References https://ccrma.stanford.edu/~jos/pasp/Lagrange_Interpolation.html fixed-delay case variable-delay case Timo I. Laakso et al., \"Splitting the Unit Delay - Tools for Fractional Delay Filter Design\", IEEE Signal Processing Magazine, vol. 13, no. 1, pp. 30-60, Jan 1996. Philippe Depalle and Stephan Tassart, \"Fractional Delay Lines using Lagrange Interpolators\", ICMC Proceedings, pp. 341-343, 1996. (de.)fdelay[N] For convenience, fdelay1 , fdelay2 , fdelay3 , fdelay4 , fdelay5 are also available where N is the order of the interpolation, built using fdelayltv . Thiran Allpass Interpolation Thiran Allpass Interpolation. Reference https://ccrma.stanford.edu/~jos/pasp/Thiran_Allpass_Interpolators.html (de.)fdelay[N]a Delay lines interpolated using Thiran allpass interpolation. Usage _ : fdelay[N]a(n, d) : _ (exactly like fdelay ) Where: N=1,2,3, or 4 is the order of the Thiran interpolation filter (constant numerical expression), and the delay argument is at least N-1/2 . First-order: d at least 0.5, second-order: d at least 1.5, third-order: d at least 2.5, fourth-order: d at least 3.5. n : the max delay length in samples d : the delay length in samples Note The interpolated delay should not be less than N-1/2 . (The allpass delay ranges from N-1/2 to N+1/2 ). This constraint can be alleviated by altering the code, but be aware that allpass filters approach zero delay by means of pole-zero cancellations. Delay arguments too small will produce an UNSTABLE allpass! Because allpass interpolation is recursive, it is not as robust as Lagrange interpolation under time-varying conditions (you may hear clicks when changing the delay rapidly).","title":" delays "},{"location":"libs/delays/#delayslib","text":"This library contains a collection of delay functions. Its official prefix is de .","title":"delays.lib"},{"location":"libs/delays/#references","text":"https://github.com/grame-cncm/faustlibraries/blob/master/delays.lib","title":"References"},{"location":"libs/delays/#basic-delay-functions","text":"","title":"Basic Delay Functions"},{"location":"libs/delays/#dedelay","text":"Simple d samples delay where n is the maximum delay length as a number of samples. Unlike the @ delay operator, here the delay signal d is explicitly bounded to the interval [0..n]. The consequence is that delay will compile even if the interval of d can't be computed by the compiler. delay is a standard Faust function.","title":"(de.)delay"},{"location":"libs/delays/#usage","text":"_ : delay(n,d) : _ Where: n : the max delay length in samples d : the delay length in samples (integer)","title":"Usage"},{"location":"libs/delays/#defdelay","text":"Simple d samples fractional delay based on 2 interpolated delay lines where n is the maximum delay length as a number of samples. fdelay is a standard Faust function.","title":"(de.)fdelay"},{"location":"libs/delays/#usage_1","text":"_ : fdelay(n,d) : _ Where: n : the max delay length in samples d : the delay length in samples (float)","title":"Usage"},{"location":"libs/delays/#desdelay","text":"s(mooth)delay: a mono delay that doesn't click and doesn't transpose when the delay time is changed.","title":"(de.)sdelay"},{"location":"libs/delays/#usage_2","text":"_ : sdelay(n,it,d) : _ Where : n : the max delay length in samples it : interpolation time (in samples), for example 1024 d : the delay length in samples (float)","title":"Usage"},{"location":"libs/delays/#lagrange-interpolation","text":"","title":"Lagrange Interpolation"},{"location":"libs/delays/#defdelaylti-and-defdelayltv","text":"Fractional delay line using Lagrange interpolation.","title":"(de.)fdelaylti and (de.)fdelayltv"},{"location":"libs/delays/#usage_3","text":"_ : fdelaylt[i|v](N, n, d) : _ Where: N=1,2,3,... is the order of the Lagrange interpolation polynomial (constant numerical expression) n : the max delay length in samples d : the delay length in samples fdelaylti is most efficient, but designed for constant/slowly-varying delay. fdelayltv is more expensive and more robust when the delay varies rapidly. Note: the requested delay should not be less than (N-1)/2 .","title":"Usage"},{"location":"libs/delays/#references_1","text":"https://ccrma.stanford.edu/~jos/pasp/Lagrange_Interpolation.html fixed-delay case variable-delay case Timo I. Laakso et al., \"Splitting the Unit Delay - Tools for Fractional Delay Filter Design\", IEEE Signal Processing Magazine, vol. 13, no. 1, pp. 30-60, Jan 1996. Philippe Depalle and Stephan Tassart, \"Fractional Delay Lines using Lagrange Interpolators\", ICMC Proceedings, pp. 341-343, 1996.","title":"References"},{"location":"libs/delays/#defdelayn","text":"For convenience, fdelay1 , fdelay2 , fdelay3 , fdelay4 , fdelay5 are also available where N is the order of the interpolation, built using fdelayltv .","title":"(de.)fdelay[N]"},{"location":"libs/delays/#thiran-allpass-interpolation","text":"Thiran Allpass Interpolation.","title":"Thiran Allpass Interpolation"},{"location":"libs/delays/#reference","text":"https://ccrma.stanford.edu/~jos/pasp/Thiran_Allpass_Interpolators.html","title":"Reference"},{"location":"libs/delays/#defdelayna","text":"Delay lines interpolated using Thiran allpass interpolation.","title":"(de.)fdelay[N]a"},{"location":"libs/delays/#usage_4","text":"_ : fdelay[N]a(n, d) : _ (exactly like fdelay ) Where: N=1,2,3, or 4 is the order of the Thiran interpolation filter (constant numerical expression), and the delay argument is at least N-1/2 . First-order: d at least 0.5, second-order: d at least 1.5, third-order: d at least 2.5, fourth-order: d at least 3.5. n : the max delay length in samples d : the delay length in samples","title":"Usage"},{"location":"libs/delays/#note","text":"The interpolated delay should not be less than N-1/2 . (The allpass delay ranges from N-1/2 to N+1/2 ). This constraint can be alleviated by altering the code, but be aware that allpass filters approach zero delay by means of pole-zero cancellations. Delay arguments too small will produce an UNSTABLE allpass! Because allpass interpolation is recursive, it is not as robust as Lagrange interpolation under time-varying conditions (you may hear clicks when changing the delay rapidly).","title":"Note"},{"location":"libs/demos/","text":"demos.lib This library contains a set of demo functions based on examples located in the /examples folder. Its official prefix is dm . References https://github.com/grame-cncm/faustlibraries/blob/master/demos.lib Analyzers (dm.)mth_octave_spectral_level_demo Demonstrate mth_octave_spectral_level in a standalone GUI. Usage _ : mth_octave_spectral_level_demo(BandsPerOctave) : _ _ : spectral_level_demo : _ // 2/3 octave Filters (dm.)parametric_eq_demo A parametric equalizer application. Usage: _ : parametric_eq_demo : _ (dm.)spectral_tilt_demo A spectral tilt application. Usage _ : spectral_tilt_demo(N) : _ Where: N : filter order (integer) All other parameters interactive (dm.)mth_octave_filterbank_demo and (dm.)filterbank_demo Graphic Equalizer: each filter-bank output signal routes through a fader. Usage _ : mth_octave_filterbank_demo(M) : _ _ : filterbank_demo : _ Where: M : number of bands per octave Effects (dm.)cubicnl_demo Distortion demo application. Usage: _ : cubicnl_demo : _ (dm.)gate_demo Gate demo application. Usage _,_ : gate_demo : _,_ (dm.)compressor_demo Compressor demo application. Usage _,_ : compressor_demo : _,_ (dm.)moog_vcf_demo Illustrate and compare all three Moog VCF implementations above. Usage _ : moog_vcf_demo : _ (dm.)wah4_demo Wah pedal application. Usage _ : wah4_demo : _ (dm.)crybaby_demo Crybaby effect application. Usage _ : crybaby_demo : _ (dm.)flanger_demo Flanger effect application. Usage _,_ : flanger_demo : _,_ (dm.)phaser2_demo Phaser effect demo application. Usage _,_ : phaser2_demo : _,_ Reverbs (dm.)freeverb_demo Freeverb demo application. Usage _,_ : freeverb_demo : _,_ (dm.)stereo_reverb_tester Handy test inputs for reverberator demos below. Usage _ : stereo_reverb_tester : _ (dm.)fdnrev0_demo A reverb application using fdnrev0 . Usage _,_,_,_ : fdnrev0_demo(N,NB,BBSO) : _,_ Where: N : feedback Delay Network (FDN) order / number of delay lines used = order of feedback matrix / 2, 4, 8, or 16 [extend primes array below for 32, 64, ...] NB : number of frequency bands / Number of (nearly) independent T60 controls / Integer 3 or greater BBSO : butterworth band-split order / order of lowpass/highpass bandsplit used at each crossover freq / odd positive integer (dm.)zita_rev_fdn_demo Reverb demo application based on zita_rev_fdn . Usage si.bus(8) : zita_rev_fdn_demo : si.bus(8) (dm.)zita_light Light version of dm.zita_rev1 with only 2 UI elements. Usage _,_ : zita_light : _,_ (dm.)zita_rev1 Example GUI for zita_rev1_stereo (mostly following the Linux zita-rev1 GUI). Only the dry/wet and output level parameters are \"dezippered\" here. If parameters are to be varied in real time, use smooth(0.999) or the like in the same way. Usage _,_ : zita_rev1 : _,_ Reference http://www.kokkinizita.net/linuxaudio/zita-rev1-doc/quickguide.html (dm.)dattorro_rev_demo Example GUI for dattorro_rev with all parameters exposed. With additional dry/wet and output gain control. Usage _,_ : dattorro_rev_demo : _,_ (dm.)jprev_demo Example GUI for jprev with all parameters exposed. Usage _,_ : jprev_demo : _,_ (dm.)greyhole_demo Example GUI for greyhole with all parameters exposed. Usage _,_ : greyhole_demo : _,_ Generators (dm.)sawtooth_demo An application demonstrating the different sawtooth oscillators of Faust. Usage sawtooth_demo : _ (dm.)virtual_analog_oscillator_demo Virtual analog oscillator demo application. Usage virtual_analog_oscillator_demo : _ (dm.)oscrs_demo Simple application demoing filter based oscillators. Usage oscrs_demo : _ (dm.)velvet_noise_demo Listen to velvet_noise! Usage velvet_noise_demo : _ (dm.)latch_demo Illustrate latch operation. Usage echo 'import(\"stdfaust.lib\");' > latch_demo.dsp echo 'process = dm.latch_demo;' >> latch_demo.dsp faust2octave latch_demo.dsp Octave:1> plot(faustout); (dm.)envelopes_demo Illustrate various envelopes overlaid, including their gate * 1.1. Usage echo 'import(\"stdfaust.lib\");' > envelopes_demo.dsp echo 'process = dm.envelopes_demo;' >> envelopes_demo.dsp faust2octave envelopes_demo.dsp Octave:1> plot(faustout); (dm.)fft_spectral_level_demo Make a real-time spectrum analyzer using FFT from analyzers.lib. Usage echo 'import(\"stdfaust.lib\");' > fft_spectral_level_demo.dsp echo 'process = dm.fft_spectral_level_demo;' >> fft_spectral_level_demo.dsp Mac: faust2caqt fft_spectral_level_demo.dsp open fft_spectral_level_demo.app Linux GTK: faust2jack fft_spectral_level_demo.dsp ./fft_spectral_level_demo Linux QT: faust2jaqt fft_spectral_level_demo.dsp ./fft_spectral_level_demo (dm.)reverse_echo_demo(nChans) Multichannel echo effect with reverse delays. Usage echo 'import(\"stdfaust.lib\");' > reverse_echo_demo.dsp echo 'nChans = 3; // Any integer > 1 should work here' >> reverse_echo_demo.dsp echo 'process = dm.reverse_echo_demo(nChans);' >> reverse_echo_demo.dsp Mac: faust2caqt reverse_echo_demo.dsp open reverse_echo_demo.app Linux GTK: faust2jack reverse_echo_demo.dsp ./reverse_echo_demo Linux QT: faust2jaqt reverse_echo_demo.dsp ./reverse_echo_demo Etc. (dm.)pospass_demo Use Positive-Pass Filter pospass() to frequency-shift a sine tone. First, a real sinusoid is converted to its analytic-signal form using pospass() to filter out its negative frequency component. Next, it is multiplied by a modulating complex sinusoid at the shifting frequency to create the frequency-shifted result. The real and imaginary parts are output to channels 1 & 2. For a more interesting frequency-shifting example, check the \"Use Mic\" checkbox to replace the input sinusoid by mic input. Note that frequency shifting is not the same as frequency scaling. A frequency-shifted harmonic signal is usually not harmonic. Very small frequency shifts give interesting chirp effects when there is feedback around the frequency shifter. Usage echo 'import(\"stdfaust.lib\");' > pospass_demo.dsp echo 'process = dm.pospass_demo;' >> pospass_demo.dsp Mac: faust2caqt pospass_demo.dsp open pospass_demo.app Linux GTK: faust2jack pospass_demo.dsp ./pospass_demo Linux QT: faust2jaqt pospass_demo.dsp ./pospass_demo Etc. (dm.)exciter Psychoacoustic harmonic exciter, with GUI. Usage _ : exciter : _ References https://secure.aes.org/forum/pubs/ebriefs/?elib=16939 https://www.researchgate.net/publication/258333577_Modeling_the_Harmonic_Exciter (dm.)vocoder_demo Use example of the vocoder function where an impulse train is used as excitation. Usage _ : vocoder_demo : _ (dm.)colored_noise_demo A coloured noise signal generator. Usage colored_noise_demo : _","title":" demos "},{"location":"libs/demos/#demoslib","text":"This library contains a set of demo functions based on examples located in the /examples folder. Its official prefix is dm .","title":"demos.lib"},{"location":"libs/demos/#references","text":"https://github.com/grame-cncm/faustlibraries/blob/master/demos.lib","title":"References"},{"location":"libs/demos/#analyzers","text":"","title":"Analyzers"},{"location":"libs/demos/#dmmth_octave_spectral_level_demo","text":"Demonstrate mth_octave_spectral_level in a standalone GUI.","title":"(dm.)mth_octave_spectral_level_demo"},{"location":"libs/demos/#usage","text":"_ : mth_octave_spectral_level_demo(BandsPerOctave) : _ _ : spectral_level_demo : _ // 2/3 octave","title":"Usage"},{"location":"libs/demos/#filters","text":"","title":"Filters"},{"location":"libs/demos/#dmparametric_eq_demo","text":"A parametric equalizer application.","title":"(dm.)parametric_eq_demo"},{"location":"libs/demos/#usage_1","text":"_ : parametric_eq_demo : _","title":"Usage:"},{"location":"libs/demos/#dmspectral_tilt_demo","text":"A spectral tilt application.","title":"(dm.)spectral_tilt_demo"},{"location":"libs/demos/#usage_2","text":"_ : spectral_tilt_demo(N) : _ Where: N : filter order (integer) All other parameters interactive","title":"Usage"},{"location":"libs/demos/#dmmth_octave_filterbank_demo-and-dmfilterbank_demo","text":"Graphic Equalizer: each filter-bank output signal routes through a fader.","title":"(dm.)mth_octave_filterbank_demo and (dm.)filterbank_demo"},{"location":"libs/demos/#usage_3","text":"_ : mth_octave_filterbank_demo(M) : _ _ : filterbank_demo : _ Where: M : number of bands per octave","title":"Usage"},{"location":"libs/demos/#effects","text":"","title":"Effects"},{"location":"libs/demos/#dmcubicnl_demo","text":"Distortion demo application.","title":"(dm.)cubicnl_demo"},{"location":"libs/demos/#usage_4","text":"_ : cubicnl_demo : _","title":"Usage:"},{"location":"libs/demos/#dmgate_demo","text":"Gate demo application.","title":"(dm.)gate_demo"},{"location":"libs/demos/#usage_5","text":"_,_ : gate_demo : _,_","title":"Usage"},{"location":"libs/demos/#dmcompressor_demo","text":"Compressor demo application.","title":"(dm.)compressor_demo"},{"location":"libs/demos/#usage_6","text":"_,_ : compressor_demo : _,_","title":"Usage"},{"location":"libs/demos/#dmmoog_vcf_demo","text":"Illustrate and compare all three Moog VCF implementations above.","title":"(dm.)moog_vcf_demo"},{"location":"libs/demos/#usage_7","text":"_ : moog_vcf_demo : _","title":"Usage"},{"location":"libs/demos/#dmwah4_demo","text":"Wah pedal application.","title":"(dm.)wah4_demo"},{"location":"libs/demos/#usage_8","text":"_ : wah4_demo : _","title":"Usage"},{"location":"libs/demos/#dmcrybaby_demo","text":"Crybaby effect application.","title":"(dm.)crybaby_demo"},{"location":"libs/demos/#usage_9","text":"_ : crybaby_demo : _","title":"Usage"},{"location":"libs/demos/#dmflanger_demo","text":"Flanger effect application.","title":"(dm.)flanger_demo"},{"location":"libs/demos/#usage_10","text":"_,_ : flanger_demo : _,_","title":"Usage"},{"location":"libs/demos/#dmphaser2_demo","text":"Phaser effect demo application.","title":"(dm.)phaser2_demo"},{"location":"libs/demos/#usage_11","text":"_,_ : phaser2_demo : _,_","title":"Usage"},{"location":"libs/demos/#reverbs","text":"","title":"Reverbs"},{"location":"libs/demos/#dmfreeverb_demo","text":"Freeverb demo application.","title":"(dm.)freeverb_demo"},{"location":"libs/demos/#usage_12","text":"_,_ : freeverb_demo : _,_","title":"Usage"},{"location":"libs/demos/#dmstereo_reverb_tester","text":"Handy test inputs for reverberator demos below.","title":"(dm.)stereo_reverb_tester"},{"location":"libs/demos/#usage_13","text":"_ : stereo_reverb_tester : _","title":"Usage"},{"location":"libs/demos/#dmfdnrev0_demo","text":"A reverb application using fdnrev0 .","title":"(dm.)fdnrev0_demo"},{"location":"libs/demos/#usage_14","text":"_,_,_,_ : fdnrev0_demo(N,NB,BBSO) : _,_ Where: N : feedback Delay Network (FDN) order / number of delay lines used = order of feedback matrix / 2, 4, 8, or 16 [extend primes array below for 32, 64, ...] NB : number of frequency bands / Number of (nearly) independent T60 controls / Integer 3 or greater BBSO : butterworth band-split order / order of lowpass/highpass bandsplit used at each crossover freq / odd positive integer","title":"Usage"},{"location":"libs/demos/#dmzita_rev_fdn_demo","text":"Reverb demo application based on zita_rev_fdn .","title":"(dm.)zita_rev_fdn_demo"},{"location":"libs/demos/#usage_15","text":"si.bus(8) : zita_rev_fdn_demo : si.bus(8)","title":"Usage"},{"location":"libs/demos/#dmzita_light","text":"Light version of dm.zita_rev1 with only 2 UI elements.","title":"(dm.)zita_light"},{"location":"libs/demos/#usage_16","text":"_,_ : zita_light : _,_","title":"Usage"},{"location":"libs/demos/#dmzita_rev1","text":"Example GUI for zita_rev1_stereo (mostly following the Linux zita-rev1 GUI). Only the dry/wet and output level parameters are \"dezippered\" here. If parameters are to be varied in real time, use smooth(0.999) or the like in the same way.","title":"(dm.)zita_rev1"},{"location":"libs/demos/#usage_17","text":"_,_ : zita_rev1 : _,_","title":"Usage"},{"location":"libs/demos/#reference","text":"http://www.kokkinizita.net/linuxaudio/zita-rev1-doc/quickguide.html","title":"Reference"},{"location":"libs/demos/#dmdattorro_rev_demo","text":"Example GUI for dattorro_rev with all parameters exposed. With additional dry/wet and output gain control.","title":"(dm.)dattorro_rev_demo"},{"location":"libs/demos/#usage_18","text":"_,_ : dattorro_rev_demo : _,_","title":"Usage"},{"location":"libs/demos/#dmjprev_demo","text":"Example GUI for jprev with all parameters exposed.","title":"(dm.)jprev_demo"},{"location":"libs/demos/#usage_19","text":"_,_ : jprev_demo : _,_","title":"Usage"},{"location":"libs/demos/#dmgreyhole_demo","text":"Example GUI for greyhole with all parameters exposed.","title":"(dm.)greyhole_demo"},{"location":"libs/demos/#usage_20","text":"_,_ : greyhole_demo : _,_","title":"Usage"},{"location":"libs/demos/#generators","text":"","title":"Generators"},{"location":"libs/demos/#dmsawtooth_demo","text":"An application demonstrating the different sawtooth oscillators of Faust.","title":"(dm.)sawtooth_demo"},{"location":"libs/demos/#usage_21","text":"sawtooth_demo : _","title":"Usage"},{"location":"libs/demos/#dmvirtual_analog_oscillator_demo","text":"Virtual analog oscillator demo application.","title":"(dm.)virtual_analog_oscillator_demo"},{"location":"libs/demos/#usage_22","text":"virtual_analog_oscillator_demo : _","title":"Usage"},{"location":"libs/demos/#dmoscrs_demo","text":"Simple application demoing filter based oscillators.","title":"(dm.)oscrs_demo"},{"location":"libs/demos/#usage_23","text":"oscrs_demo : _","title":"Usage"},{"location":"libs/demos/#dmvelvet_noise_demo","text":"Listen to velvet_noise!","title":"(dm.)velvet_noise_demo"},{"location":"libs/demos/#usage_24","text":"velvet_noise_demo : _","title":"Usage"},{"location":"libs/demos/#dmlatch_demo","text":"Illustrate latch operation.","title":"(dm.)latch_demo"},{"location":"libs/demos/#usage_25","text":"echo 'import(\"stdfaust.lib\");' > latch_demo.dsp echo 'process = dm.latch_demo;' >> latch_demo.dsp faust2octave latch_demo.dsp Octave:1> plot(faustout);","title":"Usage"},{"location":"libs/demos/#dmenvelopes_demo","text":"Illustrate various envelopes overlaid, including their gate * 1.1.","title":"(dm.)envelopes_demo"},{"location":"libs/demos/#usage_26","text":"echo 'import(\"stdfaust.lib\");' > envelopes_demo.dsp echo 'process = dm.envelopes_demo;' >> envelopes_demo.dsp faust2octave envelopes_demo.dsp Octave:1> plot(faustout);","title":"Usage"},{"location":"libs/demos/#dmfft_spectral_level_demo","text":"Make a real-time spectrum analyzer using FFT from analyzers.lib.","title":"(dm.)fft_spectral_level_demo"},{"location":"libs/demos/#usage_27","text":"echo 'import(\"stdfaust.lib\");' > fft_spectral_level_demo.dsp echo 'process = dm.fft_spectral_level_demo;' >> fft_spectral_level_demo.dsp Mac: faust2caqt fft_spectral_level_demo.dsp open fft_spectral_level_demo.app Linux GTK: faust2jack fft_spectral_level_demo.dsp ./fft_spectral_level_demo Linux QT: faust2jaqt fft_spectral_level_demo.dsp ./fft_spectral_level_demo","title":"Usage"},{"location":"libs/demos/#dmreverse_echo_demonchans","text":"Multichannel echo effect with reverse delays.","title":"(dm.)reverse_echo_demo(nChans)"},{"location":"libs/demos/#usage_28","text":"echo 'import(\"stdfaust.lib\");' > reverse_echo_demo.dsp echo 'nChans = 3; // Any integer > 1 should work here' >> reverse_echo_demo.dsp echo 'process = dm.reverse_echo_demo(nChans);' >> reverse_echo_demo.dsp Mac: faust2caqt reverse_echo_demo.dsp open reverse_echo_demo.app Linux GTK: faust2jack reverse_echo_demo.dsp ./reverse_echo_demo Linux QT: faust2jaqt reverse_echo_demo.dsp ./reverse_echo_demo Etc.","title":"Usage"},{"location":"libs/demos/#dmpospass_demo","text":"Use Positive-Pass Filter pospass() to frequency-shift a sine tone. First, a real sinusoid is converted to its analytic-signal form using pospass() to filter out its negative frequency component. Next, it is multiplied by a modulating complex sinusoid at the shifting frequency to create the frequency-shifted result. The real and imaginary parts are output to channels 1 & 2. For a more interesting frequency-shifting example, check the \"Use Mic\" checkbox to replace the input sinusoid by mic input. Note that frequency shifting is not the same as frequency scaling. A frequency-shifted harmonic signal is usually not harmonic. Very small frequency shifts give interesting chirp effects when there is feedback around the frequency shifter.","title":"(dm.)pospass_demo"},{"location":"libs/demos/#usage_29","text":"echo 'import(\"stdfaust.lib\");' > pospass_demo.dsp echo 'process = dm.pospass_demo;' >> pospass_demo.dsp Mac: faust2caqt pospass_demo.dsp open pospass_demo.app Linux GTK: faust2jack pospass_demo.dsp ./pospass_demo Linux QT: faust2jaqt pospass_demo.dsp ./pospass_demo Etc.","title":"Usage"},{"location":"libs/demos/#dmexciter","text":"Psychoacoustic harmonic exciter, with GUI.","title":"(dm.)exciter"},{"location":"libs/demos/#usage_30","text":"_ : exciter : _","title":"Usage"},{"location":"libs/demos/#references_1","text":"https://secure.aes.org/forum/pubs/ebriefs/?elib=16939 https://www.researchgate.net/publication/258333577_Modeling_the_Harmonic_Exciter","title":"References"},{"location":"libs/demos/#dmvocoder_demo","text":"Use example of the vocoder function where an impulse train is used as excitation.","title":"(dm.)vocoder_demo"},{"location":"libs/demos/#usage_31","text":"_ : vocoder_demo : _","title":"Usage"},{"location":"libs/demos/#dmcolored_noise_demo","text":"A coloured noise signal generator.","title":"(dm.)colored_noise_demo"},{"location":"libs/demos/#usage_32","text":"colored_noise_demo : _","title":"Usage"},{"location":"libs/dx7/","text":"dx7.lib Yamaha DX7 emulation library. Its official prefix is dx . References https://github.com/grame-cncm/faustlibraries/blob/master/dx7.lib (dx.)dx7_ampf DX7 amplitude conversion function. 3 versions of this function are available: dx7_amp_bpf : BPF version (same as in the CSOUND toolkit) dx7_amp_func : estimated mathematical equivalent of dx7_amp_bpf dx7_ampf : default (sugar for dx7_amp_func ) Usage: dx7AmpPreset : dx7_ampf_bpf : _ Where: dx7AmpPreset : DX7 amplitude value (0-99) (dx.)dx7_egraterisef DX7 envelope generator rise conversion function. 3 versions of this function are available: dx7_egraterise_bpf : BPF version (same as in the CSOUND toolkit) dx7_egraterise_func : estimated mathematical equivalent of dx7_egraterise_bpf dx7_egraterisef : default (sugar for dx7_egraterise_func ) Usage: dx7envelopeRise : dx7_egraterisef : _ Where: dx7envelopeRise : DX7 envelope rise value (0-99) (dx.)dx7_egraterisepercf DX7 envelope generator percussive rise conversion function. 3 versions of this function are available: dx7_egrateriseperc_bpf : BPF version (same as in the CSOUND toolkit) dx7_egrateriseperc_func : estimated mathematical equivalent of dx7_egrateriseperc_bpf dx7_egraterisepercf : default (sugar for dx7_egrateriseperc_func ) Usage: dx7envelopePercRise : dx7_egraterisepercf : _ Where: dx7envelopePercRise : DX7 envelope percussive rise value (0-99) (dx.)dx7_egratedecayf DX7 envelope generator decay conversion function. 3 versions of this function are available: dx7_egratedecay_bpf : BPF version (same as in the CSOUND toolkit) dx7_egratedecay_func : estimated mathematical equivalent of dx7_egratedecay_bpf dx7_egratedecayf : default (sugar for dx7_egratedecay_func ) Usage: dx7envelopeDecay : dx7_egratedecayf : _ Where: dx7envelopeDecay : DX7 envelope decay value (0-99) (dx.)dx7_egratedecaypercf DX7 envelope generator percussive decay conversion function. 3 versions of this function are available: dx7_egratedecayperc_bpf : BPF version (same as in the CSOUND toolkit) dx7_egratedecayperc_func : estimated mathematical equivalent of dx7_egratedecayperc_bpf dx7_egratedecaypercf : default (sugar for dx7_egratedecayperc_func ) Usage: dx7envelopePercDecay : dx7_egratedecaypercf : _ Where: dx7envelopePercDecay : DX7 envelope decay value (0-99) (dx.)dx7_eglv2peakf DX7 envelope level to peak conversion function. 3 versions of this function are available: dx7_eglv2peak_bpf : BPF version (same as in the CSOUND toolkit) dx7_eglv2peak_func : estimated mathematical equivalent of dx7_eglv2peak_bpf dx7_eglv2peakf : default (sugar for dx7_eglv2peak_func ) Usage: dx7Level : dx7_eglv2peakf : _ Where: dx7Level : DX7 level value (0-99) (dx.)dx7_velsensf DX7 velocity sensitivity conversion function. Usage: dx7Velocity : dx7_velsensf : _ Where: dx7Velocity : DX7 level value (0-8) (dx.)dx7_fdbkscalef DX7 feedback scaling conversion function. Usage: dx7Feedback : dx7_fdbkscalef : _ Where: dx7Feedback : DX7 feedback value (dx.)dx7_op DX7 Operator. Implements a phase-modulable sine wave oscillator connected to a DX7 envelope generator. Usage: dx7_op(freq,phaseMod,outLev,R1,R2,R3,R4,L1,L2,L3,L4,keyVel,rateScale,type,gain,gate) : _ Where: freq : frequency of the oscillator phaseMod : phase deviation (-1 - 1) outLev : preset output level (0-99) R1 : preset envelope rate 1 (0-99) R2 : preset envelope rate 2 (0-99) R3 : preset envelope rate 3 (0-99) R4 : preset envelope rate 4 (0-99) L1 : preset envelope level 1 (0-99) L2 : preset envelope level 2 (0-99) L3 : preset envelope level 3 (0-99) L4 : preset envelope level 4 (0-99) keyVel : preset key velocity sensitivity (0-99) rateScale : preset envelope rate scale type : preset operator type gain : general gain gate : trigger signal (dx.)dx7_algo DX7 algorithms. Implements the 32 DX7 algorithms (a quick Google search should give your more details on this). Each algorithm uses 6 operators. Usage: dx7_algo(algN,egR1,egR2,egR3,egR4,egL1,egL2,egL3,egL4,outLevel,keyVelSens,ampModSens,opMode,opFreq,opDetune,opRateScale,feedback,lfoDelay,lfoDepth,lfoSpeed,freq,gain,gate) : _ Where: algN : algorithm number (0-31, should be an int...) egR1 : preset envelope rates 1 (a list of 6 values between 0-99) egR2 : preset envelope rates 2 (a list of 6 values between 0-99) egR3 : preset envelope rates 3 (a list of 6 values between 0-99) egR4 : preset envelope rates 4 (a list of 6 values between 0-99) egL1 : preset envelope levels 1 (a list of 6 values between 0-99) egL2 : preset envelope levels 2 (a list of 6 values between 0-99) egL3 : preset envelope levels 3 (a list of 6 values between 0-99) egL4 : preset envelope levels 4 (a list of 6 values between 0-99) outLev : preset output levels (a list of 6 values between 0-99) keyVel : preset key velocity sensitivities (a list of 6 values between 0-99) ampModSens : preset amplitude sensitivities (a list of 6 values between 0-99) opMode : preset operator mode (a list of 6 values between 0-1) opFreq : preset operator frequencies (a list of 6 values between 0-99) opDetune : preset operator detuning (a list of 6 values between 0-99) opRateScale : preset operator rate scale (a list of 6 values between 0-99) feedback : preset operator feedback (a list of 6 values between 0-99) lfoDelay : preset LFO delay (a list of 6 values between 0-99) lfoDepth : preset LFO depth (a list of 6 values between 0-99) lfoSpeed : preset LFO speed (a list of 6 values between 0-99) freq : fundamental frequency gain : general gain gate : trigger signal (dx.)dx7_ui Generic DX7 function where all parameters are controllable using UI elements. The master-with-mute branch must be used for this function to work... This function is MIDI-compatible. Usage dx7_ui : _","title":" dx7 "},{"location":"libs/dx7/#dx7lib","text":"Yamaha DX7 emulation library. Its official prefix is dx .","title":"dx7.lib"},{"location":"libs/dx7/#references","text":"https://github.com/grame-cncm/faustlibraries/blob/master/dx7.lib","title":"References"},{"location":"libs/dx7/#dxdx7_ampf","text":"DX7 amplitude conversion function. 3 versions of this function are available: dx7_amp_bpf : BPF version (same as in the CSOUND toolkit) dx7_amp_func : estimated mathematical equivalent of dx7_amp_bpf dx7_ampf : default (sugar for dx7_amp_func )","title":"(dx.)dx7_ampf"},{"location":"libs/dx7/#usage","text":"dx7AmpPreset : dx7_ampf_bpf : _ Where: dx7AmpPreset : DX7 amplitude value (0-99)","title":"Usage:"},{"location":"libs/dx7/#dxdx7_egraterisef","text":"DX7 envelope generator rise conversion function. 3 versions of this function are available: dx7_egraterise_bpf : BPF version (same as in the CSOUND toolkit) dx7_egraterise_func : estimated mathematical equivalent of dx7_egraterise_bpf dx7_egraterisef : default (sugar for dx7_egraterise_func )","title":"(dx.)dx7_egraterisef"},{"location":"libs/dx7/#usage_1","text":"dx7envelopeRise : dx7_egraterisef : _ Where: dx7envelopeRise : DX7 envelope rise value (0-99)","title":"Usage:"},{"location":"libs/dx7/#dxdx7_egraterisepercf","text":"DX7 envelope generator percussive rise conversion function. 3 versions of this function are available: dx7_egrateriseperc_bpf : BPF version (same as in the CSOUND toolkit) dx7_egrateriseperc_func : estimated mathematical equivalent of dx7_egrateriseperc_bpf dx7_egraterisepercf : default (sugar for dx7_egrateriseperc_func )","title":"(dx.)dx7_egraterisepercf"},{"location":"libs/dx7/#usage_2","text":"dx7envelopePercRise : dx7_egraterisepercf : _ Where: dx7envelopePercRise : DX7 envelope percussive rise value (0-99)","title":"Usage:"},{"location":"libs/dx7/#dxdx7_egratedecayf","text":"DX7 envelope generator decay conversion function. 3 versions of this function are available: dx7_egratedecay_bpf : BPF version (same as in the CSOUND toolkit) dx7_egratedecay_func : estimated mathematical equivalent of dx7_egratedecay_bpf dx7_egratedecayf : default (sugar for dx7_egratedecay_func )","title":"(dx.)dx7_egratedecayf"},{"location":"libs/dx7/#usage_3","text":"dx7envelopeDecay : dx7_egratedecayf : _ Where: dx7envelopeDecay : DX7 envelope decay value (0-99)","title":"Usage:"},{"location":"libs/dx7/#dxdx7_egratedecaypercf","text":"DX7 envelope generator percussive decay conversion function. 3 versions of this function are available: dx7_egratedecayperc_bpf : BPF version (same as in the CSOUND toolkit) dx7_egratedecayperc_func : estimated mathematical equivalent of dx7_egratedecayperc_bpf dx7_egratedecaypercf : default (sugar for dx7_egratedecayperc_func )","title":"(dx.)dx7_egratedecaypercf"},{"location":"libs/dx7/#usage_4","text":"dx7envelopePercDecay : dx7_egratedecaypercf : _ Where: dx7envelopePercDecay : DX7 envelope decay value (0-99)","title":"Usage:"},{"location":"libs/dx7/#dxdx7_eglv2peakf","text":"DX7 envelope level to peak conversion function. 3 versions of this function are available: dx7_eglv2peak_bpf : BPF version (same as in the CSOUND toolkit) dx7_eglv2peak_func : estimated mathematical equivalent of dx7_eglv2peak_bpf dx7_eglv2peakf : default (sugar for dx7_eglv2peak_func )","title":"(dx.)dx7_eglv2peakf"},{"location":"libs/dx7/#usage_5","text":"dx7Level : dx7_eglv2peakf : _ Where: dx7Level : DX7 level value (0-99)","title":"Usage:"},{"location":"libs/dx7/#dxdx7_velsensf","text":"DX7 velocity sensitivity conversion function.","title":"(dx.)dx7_velsensf"},{"location":"libs/dx7/#usage_6","text":"dx7Velocity : dx7_velsensf : _ Where: dx7Velocity : DX7 level value (0-8)","title":"Usage:"},{"location":"libs/dx7/#dxdx7_fdbkscalef","text":"DX7 feedback scaling conversion function.","title":"(dx.)dx7_fdbkscalef"},{"location":"libs/dx7/#usage_7","text":"dx7Feedback : dx7_fdbkscalef : _ Where: dx7Feedback : DX7 feedback value","title":"Usage:"},{"location":"libs/dx7/#dxdx7_op","text":"DX7 Operator. Implements a phase-modulable sine wave oscillator connected to a DX7 envelope generator.","title":"(dx.)dx7_op"},{"location":"libs/dx7/#usage_8","text":"dx7_op(freq,phaseMod,outLev,R1,R2,R3,R4,L1,L2,L3,L4,keyVel,rateScale,type,gain,gate) : _ Where: freq : frequency of the oscillator phaseMod : phase deviation (-1 - 1) outLev : preset output level (0-99) R1 : preset envelope rate 1 (0-99) R2 : preset envelope rate 2 (0-99) R3 : preset envelope rate 3 (0-99) R4 : preset envelope rate 4 (0-99) L1 : preset envelope level 1 (0-99) L2 : preset envelope level 2 (0-99) L3 : preset envelope level 3 (0-99) L4 : preset envelope level 4 (0-99) keyVel : preset key velocity sensitivity (0-99) rateScale : preset envelope rate scale type : preset operator type gain : general gain gate : trigger signal","title":"Usage:"},{"location":"libs/dx7/#dxdx7_algo","text":"DX7 algorithms. Implements the 32 DX7 algorithms (a quick Google search should give your more details on this). Each algorithm uses 6 operators.","title":"(dx.)dx7_algo"},{"location":"libs/dx7/#usage_9","text":"dx7_algo(algN,egR1,egR2,egR3,egR4,egL1,egL2,egL3,egL4,outLevel,keyVelSens,ampModSens,opMode,opFreq,opDetune,opRateScale,feedback,lfoDelay,lfoDepth,lfoSpeed,freq,gain,gate) : _ Where: algN : algorithm number (0-31, should be an int...) egR1 : preset envelope rates 1 (a list of 6 values between 0-99) egR2 : preset envelope rates 2 (a list of 6 values between 0-99) egR3 : preset envelope rates 3 (a list of 6 values between 0-99) egR4 : preset envelope rates 4 (a list of 6 values between 0-99) egL1 : preset envelope levels 1 (a list of 6 values between 0-99) egL2 : preset envelope levels 2 (a list of 6 values between 0-99) egL3 : preset envelope levels 3 (a list of 6 values between 0-99) egL4 : preset envelope levels 4 (a list of 6 values between 0-99) outLev : preset output levels (a list of 6 values between 0-99) keyVel : preset key velocity sensitivities (a list of 6 values between 0-99) ampModSens : preset amplitude sensitivities (a list of 6 values between 0-99) opMode : preset operator mode (a list of 6 values between 0-1) opFreq : preset operator frequencies (a list of 6 values between 0-99) opDetune : preset operator detuning (a list of 6 values between 0-99) opRateScale : preset operator rate scale (a list of 6 values between 0-99) feedback : preset operator feedback (a list of 6 values between 0-99) lfoDelay : preset LFO delay (a list of 6 values between 0-99) lfoDepth : preset LFO depth (a list of 6 values between 0-99) lfoSpeed : preset LFO speed (a list of 6 values between 0-99) freq : fundamental frequency gain : general gain gate : trigger signal","title":"Usage:"},{"location":"libs/dx7/#dxdx7_ui","text":"Generic DX7 function where all parameters are controllable using UI elements. The master-with-mute branch must be used for this function to work... This function is MIDI-compatible.","title":"(dx.)dx7_ui"},{"location":"libs/dx7/#usage_10","text":"dx7_ui : _","title":"Usage"},{"location":"libs/envelopes/","text":"envelopes.lib This library contains a collection of envelope generators. Its official prefix is en . References https://github.com/grame-cncm/faustlibraries/blob/master/envelopes.lib Functions Reference (en.)ar AR (Attack, Release) envelope generator (useful to create percussion envelopes). ar is a standard Faust function. Usage ar(at,rt,t) : _ Where: at : attack (sec) rt : release (sec) t : trigger signal (attack is triggered when t>0 , release is triggered when t=0 ) (en.)asr ASR (Attack, Sustain, Release) envelope generator. asr is a standard Faust function. Usage asr(at,sl,rt,t) : _ Where: at : attack (sec) sl : sustain level (between 0..1) rt : release (sec) t : trigger signal (attack is triggered when t>0 , release is triggered when t=0 ) (en.)adsr ADSR (Attack, Decay, Sustain, Release) envelope generator. adsr is a standard Faust function. Usage adsr(at,dt,sl,rt,t) : _ Where: at : attack time (sec) dt : decay time (sec) sl : sustain level (between 0..1) rt : release time (sec) t : trigger signal (attack is triggered when t>0 , release is triggered when t=0 ) (en.)smoothEnvelope An envelope with an exponential attack and release. smoothEnvelope is a standard Faust function. Usage smoothEnvelope(ar,t) : _ ar : attack and release duration (sec) t : trigger signal (attack is triggered when t>0 , release is triggered when t=0 ) (en.)arfe ARFE (Attack and Release-to-Final-value Exponentially) envelope generator. Approximately equal to smoothEnvelope(Attack/6.91) when Attack == Release. Usage arfe(at,rt,fl,t) : _ Where: at : attack (sec) rt : release (sec) fl : final level to approach upon release (such as 0) t : trigger signal (attack is triggered when t>0 , release is triggered when t=0 ) (en.)are ARE (Attack, Release) envelope generator with Exponential segments. Approximately equal to smoothEnvelope(Attack/6.91) when Attack == Release. Usage are(at,rt,t) : _ Where: at : attack (sec) rt : release (sec) t : trigger signal (attack is triggered when t>0 , release is triggered when t=0 ) (en.)asre ASRE (Attack, Sustain, Release) envelope generator with Exponential segments. Usage asre(at,sl,rt,t) : _ Where: at : attack (sec) sl : sustain level (between 0..1) rt : release (sec) t : trigger signal (attack is triggered when t>0 , release is triggered when t=0 ) (en.)adsre ADSRE (Attack, Decay, Sustain, Release) envelope generator with Exponential segments. Usage adsre(at,dt,sl,rt,t) : _ Where: at : attack (sec) dt : decay (sec) sl : sustain level (between 0..1) rt : release (sec) t : trigger signal (attack is triggered when t>0 , release is triggered when t=0 ) (en.)ahdsre AHDSRE (Attack, Hold, Decay, Sustain, Release) envelope generator with Exponential segments. Usage ahdsre(at,ht,dt,sl,rt,t) : _ Where: at : attack (sec) ht : hold (sec) dt : decay (sec) sl : sustain level (between 0..1) rt : release (sec) t : trigger signal (attack is triggered when t>0 , release is triggered when t=0 ) (en.)dx7envelope DX7 operator envelope generator with 4 independent rates and levels. It is essentially a 4 points BPF. Usage dx7_envelope(R1,R2,R3,R4,L1,L2,L3,L4,t) : _ Where: RN : rates in seconds LN : levels (0-1) t : trigger signal","title":" envelopes "},{"location":"libs/envelopes/#envelopeslib","text":"This library contains a collection of envelope generators. Its official prefix is en .","title":"envelopes.lib"},{"location":"libs/envelopes/#references","text":"https://github.com/grame-cncm/faustlibraries/blob/master/envelopes.lib","title":"References"},{"location":"libs/envelopes/#functions-reference","text":"","title":"Functions Reference"},{"location":"libs/envelopes/#enar","text":"AR (Attack, Release) envelope generator (useful to create percussion envelopes). ar is a standard Faust function.","title":"(en.)ar"},{"location":"libs/envelopes/#usage","text":"ar(at,rt,t) : _ Where: at : attack (sec) rt : release (sec) t : trigger signal (attack is triggered when t>0 , release is triggered when t=0 )","title":"Usage"},{"location":"libs/envelopes/#enasr","text":"ASR (Attack, Sustain, Release) envelope generator. asr is a standard Faust function.","title":"(en.)asr"},{"location":"libs/envelopes/#usage_1","text":"asr(at,sl,rt,t) : _ Where: at : attack (sec) sl : sustain level (between 0..1) rt : release (sec) t : trigger signal (attack is triggered when t>0 , release is triggered when t=0 )","title":"Usage"},{"location":"libs/envelopes/#enadsr","text":"ADSR (Attack, Decay, Sustain, Release) envelope generator. adsr is a standard Faust function.","title":"(en.)adsr"},{"location":"libs/envelopes/#usage_2","text":"adsr(at,dt,sl,rt,t) : _ Where: at : attack time (sec) dt : decay time (sec) sl : sustain level (between 0..1) rt : release time (sec) t : trigger signal (attack is triggered when t>0 , release is triggered when t=0 )","title":"Usage"},{"location":"libs/envelopes/#ensmoothenvelope","text":"An envelope with an exponential attack and release. smoothEnvelope is a standard Faust function.","title":"(en.)smoothEnvelope"},{"location":"libs/envelopes/#usage_3","text":"smoothEnvelope(ar,t) : _ ar : attack and release duration (sec) t : trigger signal (attack is triggered when t>0 , release is triggered when t=0 )","title":"Usage"},{"location":"libs/envelopes/#enarfe","text":"ARFE (Attack and Release-to-Final-value Exponentially) envelope generator. Approximately equal to smoothEnvelope(Attack/6.91) when Attack == Release.","title":"(en.)arfe"},{"location":"libs/envelopes/#usage_4","text":"arfe(at,rt,fl,t) : _ Where: at : attack (sec) rt : release (sec) fl : final level to approach upon release (such as 0) t : trigger signal (attack is triggered when t>0 , release is triggered when t=0 )","title":"Usage"},{"location":"libs/envelopes/#enare","text":"ARE (Attack, Release) envelope generator with Exponential segments. Approximately equal to smoothEnvelope(Attack/6.91) when Attack == Release.","title":"(en.)are"},{"location":"libs/envelopes/#usage_5","text":"are(at,rt,t) : _ Where: at : attack (sec) rt : release (sec) t : trigger signal (attack is triggered when t>0 , release is triggered when t=0 )","title":"Usage"},{"location":"libs/envelopes/#enasre","text":"ASRE (Attack, Sustain, Release) envelope generator with Exponential segments.","title":"(en.)asre"},{"location":"libs/envelopes/#usage_6","text":"asre(at,sl,rt,t) : _ Where: at : attack (sec) sl : sustain level (between 0..1) rt : release (sec) t : trigger signal (attack is triggered when t>0 , release is triggered when t=0 )","title":"Usage"},{"location":"libs/envelopes/#enadsre","text":"ADSRE (Attack, Decay, Sustain, Release) envelope generator with Exponential segments.","title":"(en.)adsre"},{"location":"libs/envelopes/#usage_7","text":"adsre(at,dt,sl,rt,t) : _ Where: at : attack (sec) dt : decay (sec) sl : sustain level (between 0..1) rt : release (sec) t : trigger signal (attack is triggered when t>0 , release is triggered when t=0 )","title":"Usage"},{"location":"libs/envelopes/#enahdsre","text":"AHDSRE (Attack, Hold, Decay, Sustain, Release) envelope generator with Exponential segments.","title":"(en.)ahdsre"},{"location":"libs/envelopes/#usage_8","text":"ahdsre(at,ht,dt,sl,rt,t) : _ Where: at : attack (sec) ht : hold (sec) dt : decay (sec) sl : sustain level (between 0..1) rt : release (sec) t : trigger signal (attack is triggered when t>0 , release is triggered when t=0 )","title":"Usage"},{"location":"libs/envelopes/#endx7envelope","text":"DX7 operator envelope generator with 4 independent rates and levels. It is essentially a 4 points BPF.","title":"(en.)dx7envelope"},{"location":"libs/envelopes/#usage_9","text":"dx7_envelope(R1,R2,R3,R4,L1,L2,L3,L4,t) : _ Where: RN : rates in seconds LN : levels (0-1) t : trigger signal","title":"Usage"},{"location":"libs/fds/","text":"fds.lib This library allows to build linear, explicit finite difference schemes physical models in 1 or 2 dimensions using an approach based on the cellular automata formalism. Its official prefix is fd . In order to use the library, one needs to discretize the linear partial differential equation of the desired system both at boundaries and in-between them, thus obtaining a set of explicit recursion relations. Each one of these will provide, for each spatial point the scalar coefficients to be multiplied by the states of the current and past neighbour points. Coefficients need to be stacked in parallel in order to form a coefficients matrix for each point in the mesh. It is necessary to provide one matrix for coefficients matrices are defined, they need to be placed in parallel and ordered following the desired mesh structure (i.e., coefficients for the top left boundaries will come first, while bottom right boundaries will come last), to form a coefficients scheme , which can be used with the library functions. Sources Here are listed some works on finite difference schemes and cellular automata thet were the basis for the implementation of this library S. Bilbao, Numerical Sound Synthesis.Chichester, UK: John Wiley Sons, Ltd, 2009 P. Narbel, \"Qualitative and quantitative cellular automata from differential equations,\" Lecture Notes in Computer Science, vol. 4173, pp. 112\u2013121, 10 2006 X.-S. Yang and Y. Young, Cellular Automata, PDEs, and Pattern Formation. Chapman & Hall/CRC, 092005, ch. 18, pp. 271\u2013282. References https://github.com/grame-cncm/faustlibraries/blob/master/fds.lib Model Construction Once the coefficients scheme is defined, the user can simply call one of these functions to obtain a fully working physical model. They expect to receive a force input signal for each mesh point and output the state of each point. Interpolation operators can be used to drive external forces to the desired points, and to get the signal only from a certain area of the mesh. (fd.)model1D This function can be used to obtain a physical model in 1 dimension. Takes a force input signal for each point and outputs the state of each point. Usage si.bus(points) : model1D(points,R,T,scheme) : si.bus(points) Where: points : size of the mesh in points R : neighbourhood radius, indicates how many side points are needed (i.e. if R=1 the mesh depends on one point on the left and one on the right) T : time coefficient, indicates how much steps back in time are needed (i. e. if T=1 the maximum delay needed for a neighbour state is 1 sample) scheme : coefficients scheme (fd.)model2D This function can be used to obtain a physical model in 2 dimension. Takes a force input signal for each point and outputs the state of each point. IMPORTANT: 2D models with more than 30x20 points might crash the c++ compiler. 2D models need to be compiled with the command line compiler, the online one presents some issues. Usage si.bus(pointsX*pointsY) : model2D(pointsX,pointsY,R,T,scheme) : si.bus(pointsX*pointsY) Where: pointsX : horizontal size of the mesh in points pointsY : vertical size of the mesh in points R : neighbourhood radius, indicates how many side points are needed (i.e. if R=1 the mesh depends on one point on the left and one on the right) T : time coefficient, indicates how much steps back in time are needed (i. e. if T=1 the maximum delay needed for a neighbour state is 1 sample) scheme : coefficients scheme Interpolation Interpolation functions can be used to drive the input signals to the correct mesh points, or to get the output signal from the desired points. All the interpolation functions allow to change the input/output points at run time. In general, all these functions get in input a number of connections, and output the same number of connections, where each signal is multiplied by zero except the ones specified by the arguments. (fd.)stairsInterp1D Stairs interpolator in 1 dimension. Takes a number of signals and outputs the same number of signals, where each one is multiplied by zero except the one specified by the argument. This can vary at run time (i.e. a slider), but must be an integer. Usage si.bus(points) : stairsInterp1D(points,point) : si.bus(points) Where: points : total number of points in the mesh point : number of the desired nonzero signal (fd.)stairsInterp2D Stairs interpolator in 2 dimensions. Similar to the 1-D version. Usage si.bus(pointsX*pointsY) : stairsInterp2D(pointsX,pointsY,pointX,pointY) : si.bus(pointsX*pointsY) Where: pointsX : total number of points in the X direction pointsY : total number of points in the Y direction pointX : horizontal index of the desired nonzero signal pointY : vertical index of the desired nonzero signal (fd.)linInterp1D Linear interpolator in 1 dimension. Takes a number of signals and outputs the same number of signals, where each one is multiplied by zero except two signals around a floating point index. This is essentially a Faust implementation of the $J(x_i)$ operator, not scaled by the spatial step. (see Stefan Bilbao's book, Numerical Sound Synthesis). The index can vary at run time. Usage si.bus(points) : linInterp1D(points,point) : si.bus(points) Where: points : total number of points in the mesh point : floating point index (fd.)linInterp2D Linear interpolator in 2 dimensions. Similar to the 1 D version. Usage si.bus(pointsX*pointsY) : linInterp2D(pointsX,pointsY,pointX,pointY) : si.bus(pointsX*pointsY) Where: pointsX : total number of points in the X direction pointsY : total number of points in the Y direction pointX : horizontal float index pointY : vertical float index (fd.)stairsInterp1DOut Stairs interpolator in 1 dimension. Similar to stairsInterp1D , except it outputs only the desired signal. Usage si.bus(points) : stairsInterp1DOut(points,point) : _ Where: points : total number of points in the mesh point : number of the desired nonzero signal (fd.)stairsInterp2DOut Stairs interpolator in 2 dimensions which outputs only one signal. Usage si.bus(pointsX*pointsY) : stairsInterp2DOut(pointsX,pointsY,pointX,pointY) : _ Where: pointsX : total number of points in the X direction pointsY : total number of points in the Y direction pointX : horizontal index of the desired nonzero signal pointY : vertical index of the desired nonzero signal (fd.)linInterp1DOut Linear interpolator in 1 dimension. Similar to stairsInterp1D , except it sums each output signal and provides only one output value. Usage si.bus(points) : linInterp1DOut(points,point) : _ Where: points : total number of points in the mesh point : floating point index (fd.)stairsInterp2DOut Linear interpolator in 2 dimensions which outputs only one signal. Usage si.bus(pointsX*pointsY) : linInterp2DOut(pointsX,pointsY,pointX,pointY) : _ Where: pointsX : total number of points in the X direction pointsY : total number of points in the Y direction pointX : horizontal float index pointY : vertical float index Routing The routing functions are used internally by the model building functions, but can also be taken separately. These functions route the forces, the coefficients scheme and the neighbours\u2019 signals into the correct scheme points and take as input, in this order: the coefficients block, the feedback signals and the forces. In output they provide, in order, for each scheme point: the force signal, the coefficient matrices and the neighbours\u2019 signals. These functions are based on the Faust route primitive. (fd.)route1D Routing function for 1 dimensional schemes. Usage si.bus((2*R+1)*(T+1)*points),si.bus(points*2) : route1D(points, R, T) : si.bus((1 + ((2*R+1)*(T+1)) + (2*R+1))*points) Where: points : total number of points in the mesh R : neighbourhood radius T : time coefficient (fd.)route2D Routing function for 2 dimensional schemes. Usage si.bus((2*R+1)^2*(T+1)*pointsX*pointsY),si.bus(pointsX*pointsY*2) : route2D(pointsX, pointsY, R, T) : si.bus((1 + ((2*R+1)^2*(T+1)) + (2*R+1)^2)*pointsX*pointsY) Where: pointsX : total number of points in the X direction pointsY : total number of points in the Y direction R : neighbourhood radius T : time coefficient Scheme Operations The scheme operation functions are used internally by the model building functions but can also be taken separately. The schemePoint function is where the update equation is actually calculated. The buildScheme functions are used to stack in parallel several schemePoint blocks, according to the choosed mesh size. (fd.)schemePoint This function calculates the next state for each mesh point, in order to form a scheme, several of these blocks need to be stacked in parallel. This function takes in input, in order, the force, the coefficient matrices and the neighbours\u2019 signals and outputs the next point state. Usage _,si.bus((2*R+1)^D*(T+1)),si.bus((2*R+1)^D) : schemePoint(R,T,D) : _ Where: R : neighbourhood radius T : time coefficient D : scheme spatial dimensions (i.e. 1 if 1-D, 2 if 2-D) (fd.)buildScheme1D This function is used to stack in parallel several schemePoint functions in 1 dimension, according to the number of points. Usage si.bus((1 + ((2*R+1)*(T+1)) + (2*R+1))*points) : buildScheme1D(points,R,T) : si.bus(points) Where: points : total number of points in the mesh R : neighbourhood radius T : time coefficient (fd.)buildScheme2D This function is used to stack in parallel several schemePoint functions in 2 dimensions, according to the number of points in the X and Y directions. Usage si.bus((1 + ((2*R+1)^2*(T+1)) + (2*R+1)^2)*pointsX*pointsY) : buildScheme2D(pointsX,pointsY,R,T) : si.bus(pointsX*pointsY) Where: pointsX : total number of points in the X direction pointsY : total number of points in the Y direction R : neighbourhood radius T : time coefficient Interaction Models Here are defined two physically based interaction algorithms: a hammer and a bow. These functions need to be coupled to the mesh pde, in the point where the interaction happens: to do so, the mesh output signals can be fed back and driven into the force block using the interpolation operators. The latters can be also used to drive the single force output signal to the correct scheme points. (fd.)hammer Implementation of a nonlinear collision model. The hammer is essentially a finite difference scheme of a linear damped oscillator, which is coupled with the mesh through the collision model (see Stefan Bilbao's book, Numerical Sound Synthesis). Usage _ :hammer(coeff,omega0Sqr,sigma0,kH,alpha,k,offset,fIn) : _ Where: coeff : output force scaling coefficient omega0Sqr : squared angular frequency of the hammer oscillator sigma0 : damping coefficient of the hammer oscillator kH : hammer stiffness coefficient alpha : nonlinearity parameter k : time sampling step (the same as for the mesh) offset : distance between the string and the hammer at rest in meters fIn : hammer excitation signal (i.e. a button) (fd.)bow Implementation of a nonlinear friction based interaction model that induces Helmholtz motion. (see Stefan Bilbao's book, Numerical Sound Synthesis). Usage _ :bow(coeff,alpha,k,vb) : _ Where: coeff : output force scaling coefficient alpha : nonlinearity parameter k : time sampling step (the same as for the mesh) vb : bow velocity [m/s]","title":" fds "},{"location":"libs/fds/#fdslib","text":"This library allows to build linear, explicit finite difference schemes physical models in 1 or 2 dimensions using an approach based on the cellular automata formalism. Its official prefix is fd . In order to use the library, one needs to discretize the linear partial differential equation of the desired system both at boundaries and in-between them, thus obtaining a set of explicit recursion relations. Each one of these will provide, for each spatial point the scalar coefficients to be multiplied by the states of the current and past neighbour points. Coefficients need to be stacked in parallel in order to form a coefficients matrix for each point in the mesh. It is necessary to provide one matrix for coefficients matrices are defined, they need to be placed in parallel and ordered following the desired mesh structure (i.e., coefficients for the top left boundaries will come first, while bottom right boundaries will come last), to form a coefficients scheme , which can be used with the library functions.","title":"fds.lib"},{"location":"libs/fds/#sources","text":"Here are listed some works on finite difference schemes and cellular automata thet were the basis for the implementation of this library S. Bilbao, Numerical Sound Synthesis.Chichester, UK: John Wiley Sons, Ltd, 2009 P. Narbel, \"Qualitative and quantitative cellular automata from differential equations,\" Lecture Notes in Computer Science, vol. 4173, pp. 112\u2013121, 10 2006 X.-S. Yang and Y. Young, Cellular Automata, PDEs, and Pattern Formation. Chapman & Hall/CRC, 092005, ch. 18, pp. 271\u2013282.","title":"Sources"},{"location":"libs/fds/#references","text":"https://github.com/grame-cncm/faustlibraries/blob/master/fds.lib","title":"References"},{"location":"libs/fds/#model-construction","text":"Once the coefficients scheme is defined, the user can simply call one of these functions to obtain a fully working physical model. They expect to receive a force input signal for each mesh point and output the state of each point. Interpolation operators can be used to drive external forces to the desired points, and to get the signal only from a certain area of the mesh.","title":"Model Construction"},{"location":"libs/fds/#fdmodel1d","text":"This function can be used to obtain a physical model in 1 dimension. Takes a force input signal for each point and outputs the state of each point.","title":"(fd.)model1D"},{"location":"libs/fds/#usage","text":"si.bus(points) : model1D(points,R,T,scheme) : si.bus(points) Where: points : size of the mesh in points R : neighbourhood radius, indicates how many side points are needed (i.e. if R=1 the mesh depends on one point on the left and one on the right) T : time coefficient, indicates how much steps back in time are needed (i. e. if T=1 the maximum delay needed for a neighbour state is 1 sample) scheme : coefficients scheme","title":"Usage"},{"location":"libs/fds/#fdmodel2d","text":"This function can be used to obtain a physical model in 2 dimension. Takes a force input signal for each point and outputs the state of each point. IMPORTANT: 2D models with more than 30x20 points might crash the c++ compiler. 2D models need to be compiled with the command line compiler, the online one presents some issues.","title":"(fd.)model2D"},{"location":"libs/fds/#usage_1","text":"si.bus(pointsX*pointsY) : model2D(pointsX,pointsY,R,T,scheme) : si.bus(pointsX*pointsY) Where: pointsX : horizontal size of the mesh in points pointsY : vertical size of the mesh in points R : neighbourhood radius, indicates how many side points are needed (i.e. if R=1 the mesh depends on one point on the left and one on the right) T : time coefficient, indicates how much steps back in time are needed (i. e. if T=1 the maximum delay needed for a neighbour state is 1 sample) scheme : coefficients scheme","title":"Usage"},{"location":"libs/fds/#interpolation","text":"Interpolation functions can be used to drive the input signals to the correct mesh points, or to get the output signal from the desired points. All the interpolation functions allow to change the input/output points at run time. In general, all these functions get in input a number of connections, and output the same number of connections, where each signal is multiplied by zero except the ones specified by the arguments.","title":"Interpolation"},{"location":"libs/fds/#fdstairsinterp1d","text":"Stairs interpolator in 1 dimension. Takes a number of signals and outputs the same number of signals, where each one is multiplied by zero except the one specified by the argument. This can vary at run time (i.e. a slider), but must be an integer.","title":"(fd.)stairsInterp1D"},{"location":"libs/fds/#usage_2","text":"si.bus(points) : stairsInterp1D(points,point) : si.bus(points) Where: points : total number of points in the mesh point : number of the desired nonzero signal","title":"Usage"},{"location":"libs/fds/#fdstairsinterp2d","text":"Stairs interpolator in 2 dimensions. Similar to the 1-D version.","title":"(fd.)stairsInterp2D"},{"location":"libs/fds/#usage_3","text":"si.bus(pointsX*pointsY) : stairsInterp2D(pointsX,pointsY,pointX,pointY) : si.bus(pointsX*pointsY) Where: pointsX : total number of points in the X direction pointsY : total number of points in the Y direction pointX : horizontal index of the desired nonzero signal pointY : vertical index of the desired nonzero signal","title":"Usage"},{"location":"libs/fds/#fdlininterp1d","text":"Linear interpolator in 1 dimension. Takes a number of signals and outputs the same number of signals, where each one is multiplied by zero except two signals around a floating point index. This is essentially a Faust implementation of the $J(x_i)$ operator, not scaled by the spatial step. (see Stefan Bilbao's book, Numerical Sound Synthesis). The index can vary at run time.","title":"(fd.)linInterp1D"},{"location":"libs/fds/#usage_4","text":"si.bus(points) : linInterp1D(points,point) : si.bus(points) Where: points : total number of points in the mesh point : floating point index","title":"Usage"},{"location":"libs/fds/#fdlininterp2d","text":"Linear interpolator in 2 dimensions. Similar to the 1 D version.","title":"(fd.)linInterp2D"},{"location":"libs/fds/#usage_5","text":"si.bus(pointsX*pointsY) : linInterp2D(pointsX,pointsY,pointX,pointY) : si.bus(pointsX*pointsY) Where: pointsX : total number of points in the X direction pointsY : total number of points in the Y direction pointX : horizontal float index pointY : vertical float index","title":"Usage"},{"location":"libs/fds/#fdstairsinterp1dout","text":"Stairs interpolator in 1 dimension. Similar to stairsInterp1D , except it outputs only the desired signal.","title":"(fd.)stairsInterp1DOut"},{"location":"libs/fds/#usage_6","text":"si.bus(points) : stairsInterp1DOut(points,point) : _ Where: points : total number of points in the mesh point : number of the desired nonzero signal","title":"Usage"},{"location":"libs/fds/#fdstairsinterp2dout","text":"Stairs interpolator in 2 dimensions which outputs only one signal.","title":"(fd.)stairsInterp2DOut"},{"location":"libs/fds/#usage_7","text":"si.bus(pointsX*pointsY) : stairsInterp2DOut(pointsX,pointsY,pointX,pointY) : _ Where: pointsX : total number of points in the X direction pointsY : total number of points in the Y direction pointX : horizontal index of the desired nonzero signal pointY : vertical index of the desired nonzero signal","title":"Usage"},{"location":"libs/fds/#fdlininterp1dout","text":"Linear interpolator in 1 dimension. Similar to stairsInterp1D , except it sums each output signal and provides only one output value.","title":"(fd.)linInterp1DOut"},{"location":"libs/fds/#usage_8","text":"si.bus(points) : linInterp1DOut(points,point) : _ Where: points : total number of points in the mesh point : floating point index","title":"Usage"},{"location":"libs/fds/#fdstairsinterp2dout_1","text":"Linear interpolator in 2 dimensions which outputs only one signal.","title":"(fd.)stairsInterp2DOut"},{"location":"libs/fds/#usage_9","text":"si.bus(pointsX*pointsY) : linInterp2DOut(pointsX,pointsY,pointX,pointY) : _ Where: pointsX : total number of points in the X direction pointsY : total number of points in the Y direction pointX : horizontal float index pointY : vertical float index","title":"Usage"},{"location":"libs/fds/#routing","text":"The routing functions are used internally by the model building functions, but can also be taken separately. These functions route the forces, the coefficients scheme and the neighbours\u2019 signals into the correct scheme points and take as input, in this order: the coefficients block, the feedback signals and the forces. In output they provide, in order, for each scheme point: the force signal, the coefficient matrices and the neighbours\u2019 signals. These functions are based on the Faust route primitive.","title":"Routing"},{"location":"libs/fds/#fdroute1d","text":"Routing function for 1 dimensional schemes.","title":"(fd.)route1D"},{"location":"libs/fds/#usage_10","text":"si.bus((2*R+1)*(T+1)*points),si.bus(points*2) : route1D(points, R, T) : si.bus((1 + ((2*R+1)*(T+1)) + (2*R+1))*points) Where: points : total number of points in the mesh R : neighbourhood radius T : time coefficient","title":"Usage"},{"location":"libs/fds/#fdroute2d","text":"Routing function for 2 dimensional schemes.","title":"(fd.)route2D"},{"location":"libs/fds/#usage_11","text":"si.bus((2*R+1)^2*(T+1)*pointsX*pointsY),si.bus(pointsX*pointsY*2) : route2D(pointsX, pointsY, R, T) : si.bus((1 + ((2*R+1)^2*(T+1)) + (2*R+1)^2)*pointsX*pointsY) Where: pointsX : total number of points in the X direction pointsY : total number of points in the Y direction R : neighbourhood radius T : time coefficient","title":"Usage"},{"location":"libs/fds/#scheme-operations","text":"The scheme operation functions are used internally by the model building functions but can also be taken separately. The schemePoint function is where the update equation is actually calculated. The buildScheme functions are used to stack in parallel several schemePoint blocks, according to the choosed mesh size.","title":"Scheme Operations"},{"location":"libs/fds/#fdschemepoint","text":"This function calculates the next state for each mesh point, in order to form a scheme, several of these blocks need to be stacked in parallel. This function takes in input, in order, the force, the coefficient matrices and the neighbours\u2019 signals and outputs the next point state.","title":"(fd.)schemePoint"},{"location":"libs/fds/#usage_12","text":"_,si.bus((2*R+1)^D*(T+1)),si.bus((2*R+1)^D) : schemePoint(R,T,D) : _ Where: R : neighbourhood radius T : time coefficient D : scheme spatial dimensions (i.e. 1 if 1-D, 2 if 2-D)","title":"Usage"},{"location":"libs/fds/#fdbuildscheme1d","text":"This function is used to stack in parallel several schemePoint functions in 1 dimension, according to the number of points.","title":"(fd.)buildScheme1D"},{"location":"libs/fds/#usage_13","text":"si.bus((1 + ((2*R+1)*(T+1)) + (2*R+1))*points) : buildScheme1D(points,R,T) : si.bus(points) Where: points : total number of points in the mesh R : neighbourhood radius T : time coefficient","title":"Usage"},{"location":"libs/fds/#fdbuildscheme2d","text":"This function is used to stack in parallel several schemePoint functions in 2 dimensions, according to the number of points in the X and Y directions.","title":"(fd.)buildScheme2D"},{"location":"libs/fds/#usage_14","text":"si.bus((1 + ((2*R+1)^2*(T+1)) + (2*R+1)^2)*pointsX*pointsY) : buildScheme2D(pointsX,pointsY,R,T) : si.bus(pointsX*pointsY) Where: pointsX : total number of points in the X direction pointsY : total number of points in the Y direction R : neighbourhood radius T : time coefficient","title":"Usage"},{"location":"libs/fds/#interaction-models","text":"Here are defined two physically based interaction algorithms: a hammer and a bow. These functions need to be coupled to the mesh pde, in the point where the interaction happens: to do so, the mesh output signals can be fed back and driven into the force block using the interpolation operators. The latters can be also used to drive the single force output signal to the correct scheme points.","title":"Interaction Models"},{"location":"libs/fds/#fdhammer","text":"Implementation of a nonlinear collision model. The hammer is essentially a finite difference scheme of a linear damped oscillator, which is coupled with the mesh through the collision model (see Stefan Bilbao's book, Numerical Sound Synthesis).","title":"(fd.)hammer"},{"location":"libs/fds/#usage_15","text":"_ :hammer(coeff,omega0Sqr,sigma0,kH,alpha,k,offset,fIn) : _ Where: coeff : output force scaling coefficient omega0Sqr : squared angular frequency of the hammer oscillator sigma0 : damping coefficient of the hammer oscillator kH : hammer stiffness coefficient alpha : nonlinearity parameter k : time sampling step (the same as for the mesh) offset : distance between the string and the hammer at rest in meters fIn : hammer excitation signal (i.e. a button)","title":"Usage"},{"location":"libs/fds/#fdbow","text":"Implementation of a nonlinear friction based interaction model that induces Helmholtz motion. (see Stefan Bilbao's book, Numerical Sound Synthesis).","title":"(fd.)bow"},{"location":"libs/fds/#usage_16","text":"_ :bow(coeff,alpha,k,vb) : _ Where: coeff : output force scaling coefficient alpha : nonlinearity parameter k : time sampling step (the same as for the mesh) vb : bow velocity [m/s]","title":"Usage"},{"location":"libs/filters/","text":"filters.lib Filters library. Its official prefix is fi . The Filters library is organized into 22 sections: Basic Filters Comb Filters Direct-Form Digital Filter Sections Direct-Form Second-Order Biquad Sections Ladder/Lattice Digital Filters Useful Special Cases Ladder/Lattice Allpass Filters Digital Filter Sections Specified as Analog Filter Sections Simple Resonator Filters Butterworth Lowpass/Highpass Filters Special Filter-Bank Delay-Equalizing Allpass Filters Elliptic (Cauer) Lowpass Filters Elliptic Highpass Filters Butterworth Bandpass/Bandstop Filters Elliptic Bandpass Filters Parametric Equalizers (Shelf, Peaking) Mth-Octave Filter-Banks Arbitrary-Crossover Filter-Banks and Spectrum Analyzers State Variable Filters (SVF) Linkwitz-Riley 4th-order 2-way, 3-way, and 4-way crossovers Standardized Filters Averaging Functions References https://github.com/grame-cncm/faustlibraries/blob/master/filters.lib Basic Filters (fi.)zero One zero filter. Difference equation: y(n) = x(n) - zx(n-1) . Usage _ : zero(z) : _ Where: z : location of zero along real axis in z-plane Reference https://ccrma.stanford.edu/~jos/filters/One_Zero.html (fi.)pole One pole filter. Could also be called a \"leaky integrator\". Difference equation: y(n) = x(n) + py(n-1) . Usage _ : pole(p) : _ Where: p : pole location = feedback coefficient Reference https://ccrma.stanford.edu/~jos/filters/One_Pole.html (fi.)integrator Same as pole(1) [implemented separately for block-diagram clarity]. (fi.)dcblockerat DC blocker with configurable break frequency. The amplitude response is substantially flat above fb , and sloped at about +6 dB/octave below fb . Derived from the analog transfer function: H(s) = \\frac{s}{(s + 2 \\pi fb)} (which can be seen as a 1st-order Butterworth highpass filter) by the low-frequency-matching bilinear transform method (i.e., the standard frequency-scaling constant 2*SR). Usage _ : dcblockerat(fb) : _ Where: fb : \"break frequency\" in Hz, i.e., -3 dB gain frequency. Reference https://ccrma.stanford.edu/~jos/pasp/Bilinear_Transformation.html (fi.)dcblocker DC blocker. Default dc blocker has -3dB point near 35 Hz (at 44.1 kHz) and high-frequency gain near 1.0025 (due to no scaling). dcblocker is as standard Faust function. Usage _ : dcblocker : _ (fi.)lptN One-pole lowpass filter with arbitrary dis/charging factors set in dB and times set in seconds. Usage _ : lptN(N, tN) : _ Where: N : is the attenuation factor in dB tN : is the filter period in seconds, that is, the time for the impulse response to decay by N dB Reference https://ccrma.stanford.edu/~jos/mdft/Exponentials.html Comb Filters (fi.)ff_comb Feed-Forward Comb Filter. Note that ff_comb requires integer delays (uses delay internally). ff_comb is a standard Faust function. Usage _ : ff_comb(maxdel,intdel,b0,bM) : _ Where: maxdel : maximum delay (a power of 2) intdel : current (integer) comb-filter delay between 0 and maxdel del : current (float) comb-filter delay between 0 and maxdel b0 : gain applied to delay-line input bM : gain applied to delay-line output and then summed with input Reference https://ccrma.stanford.edu/~jos/pasp/Feedforward_Comb_Filters.html (fi.)ff_fcomb Feed-Forward Comb Filter. Note that ff_fcomb takes floating-point delays (uses fdelay internally). ff_fcomb is a standard Faust function. Usage _ : ff_fcomb(maxdel,del,b0,bM) : _ Where: maxdel : maximum delay (a power of 2) intdel : current (integer) comb-filter delay between 0 and maxdel del : current (float) comb-filter delay between 0 and maxdel b0 : gain applied to delay-line input bM : gain applied to delay-line output and then summed with input Reference https://ccrma.stanford.edu/~jos/pasp/Feedforward_Comb_Filters.html (fi.)ffcombfilter Typical special case of ff_comb() where: b0 = 1 . (fi.)fb_comb Feed-Back Comb Filter (integer delay). Usage _ : fb_comb(maxdel,intdel,b0,aN) : _ Where: maxdel : maximum delay (a power of 2) intdel : current (integer) comb-filter delay between 0 and maxdel del : current (float) comb-filter delay between 0 and maxdel b0 : gain applied to delay-line input and forwarded to output aN : minus the gain applied to delay-line output before summing with the input and feeding to the delay line Reference https://ccrma.stanford.edu/~jos/pasp/Feedback_Comb_Filters.html (fi.)fb_fcomb Feed-Back Comb Filter (floating point delay). Usage _ : fb_fcomb(maxdel,del,b0,aN) : _ Where: maxdel : maximum delay (a power of 2) intdel : current (integer) comb-filter delay between 0 and maxdel del : current (float) comb-filter delay between 0 and maxdel b0 : gain applied to delay-line input and forwarded to output aN : minus the gain applied to delay-line output before summing with the input and feeding to the delay line Reference https://ccrma.stanford.edu/~jos/pasp/Feedback_Comb_Filters.html (fi.)rev1 Special case of fb_comb ( rev1(maxdel,N,g) ). The \"rev1 section\" dates back to the 1960s in computer-music reverberation. See the jcrev and brassrev in reverbs.lib for usage examples. (fi.)fbcombfilter and (fi.)ffbcombfilter Other special cases of Feed-Back Comb Filter. Usage _ : fbcombfilter(maxdel,intdel,g) : _ _ : ffbcombfilter(maxdel,del,g) : _ Where: maxdel : maximum delay (a power of 2) intdel : current (integer) comb-filter delay between 0 and maxdel del : current (float) comb-filter delay between 0 and maxdel g : feedback gain Reference https://ccrma.stanford.edu/~jos/pasp/Feedback_Comb_Filters.html (fi.)allpass_comb Schroeder Allpass Comb Filter. Note that: allpass_comb(maxlen,len,aN) = ff_comb(maxlen,len,aN,1) : fb_comb(maxlen,len-1,1,aN); which is a direct-form-1 implementation, requiring two delay lines. The implementation here is direct-form-2 requiring only one delay line. Usage _ : allpass_comb(maxdel,intdel,aN) : _ Where: maxdel : maximum delay (a power of 2) intdel : current (integer) comb-filter delay between 0 and maxdel del : current (float) comb-filter delay between 0 and maxdel aN : minus the feedback gain References https://ccrma.stanford.edu/~jos/pasp/Allpass_Two_Combs.html https://ccrma.stanford.edu/~jos/pasp/Schroeder_Allpass_Sections.html https://ccrma.stanford.edu/~jos/filters/Four_Direct_Forms.html (fi.)allpass_fcomb Schroeder Allpass Comb Filter. Note that: allpass_comb(maxlen,len,aN) = ff_comb(maxlen,len,aN,1) : fb_comb(maxlen,len-1,1,aN); which is a direct-form-1 implementation, requiring two delay lines. The implementation here is direct-form-2 requiring only one delay line. allpass_fcomb is a standard Faust library. Usage _ : allpass_comb(maxdel,intdel,aN) : _ _ : allpass_fcomb(maxdel,del,aN) : _ Where: maxdel : maximum delay (a power of 2) intdel : current (float) comb-filter delay between 0 and maxdel del : current (float) comb-filter delay between 0 and maxdel aN : minus the feedback gain References https://ccrma.stanford.edu/~jos/pasp/Allpass_Two_Combs.html https://ccrma.stanford.edu/~jos/pasp/Schroeder_Allpass_Sections.html https://ccrma.stanford.edu/~jos/filters/Four_Direct_Forms.html (fi.)rev2 Special case of allpass_comb ( rev2(maxlen,len,g) ). The \"rev2 section\" dates back to the 1960s in computer-music reverberation. See the jcrev and brassrev in reverbs.lib for usage examples. (fi.)allpass_fcomb5 and (fi.)allpass_fcomb1a Same as allpass_fcomb but use fdelay5 and fdelay1a internally (Interpolation helps - look at an fft of faust2octave on `1-1' <: allpass_fcomb(1024,10.5,0.95), allpass_fcomb5(1024,10.5,0.95);`). Direct-Form Digital Filter Sections (fi.)iir Nth-order Infinite-Impulse-Response (IIR) digital filter, implemented in terms of the Transfer-Function (TF) coefficients. Such filter structures are termed \"direct form\". iir is a standard Faust function. Usage _ : iir(bcoeffs,acoeffs) : _ Where: bcoeffs : (b0,b1,...,b_order) = TF numerator coefficients acoeffs : (a1,...,a_order) = TF denominator coeffs (a0=1) Reference https://ccrma.stanford.edu/~jos/filters/Four_Direct_Forms.html (fi.)fir FIR filter (convolution of FIR filter coefficients with a signal). fir is standard Faust function. Usage _ : fir(bv) : _ Where: bv = b0,b1,...,bn is a parallel bank of coefficient signals. Note bv is processed using pattern-matching at compile time, so it must have this normal form (parallel signals). Example test program Smoothing white noise with a five-point moving average: bv = .2,.2,.2,.2,.2; process = noise : fir(bv); Equivalent (note double parens): process = noise : fir((.2,.2,.2,.2,.2)); (fi.)conv and (fi.)convN Convolution of input signal with given coefficients. Usage _ : conv((k1,k2,k3,...,kN)) : _ // Argument = one signal bank _ : convN(N,(k1,k2,k3,...)) : _ // Useful when N < count((k1,...)) (fi.)tf1 , (fi.)tf2 and (fi.)tf3 tfN = N'th-order direct-form digital filter. Usage _ : tf1(b0,b1,a1) : _ _ : tf2(b0,b1,b2,a1,a2) : _ _ : tf3(b0,b1,b2,b3,a1,a2,a3) : _ Where: a : the poles b : the zeros Reference https://ccrma.stanford.edu/~jos/fp/Direct_Form_I.html (fi.)notchw Simple notch filter based on a biquad ( tf2 ). notchw is a standard Faust function. Usage: _ : notchw(width,freq) : _ Where: width : \"notch width\" in Hz (approximate) freq : \"notch frequency\" in Hz Reference https://ccrma.stanford.edu/~jos/pasp/Phasing_2nd_Order_Allpass_Filters.html Direct-Form Second-Order Biquad Sections Direct-Form Second-Order Biquad Sections Reference https://ccrma.stanford.edu/~jos/filters/Four_Direct_Forms.html (fi.)tf21 , (fi.)tf22 , (fi.)tf22t and (fi.)tf21t tfN = N'th-order direct-form digital filter where: tf21 is tf2, direct-form 1 tf22 is tf2, direct-form 2 tf22t is tf2, direct-form 2 transposed tf21t is tf2, direct-form 1 transposed Usage _ : tf21(b0,b1,b2,a1,a2) : _ _ : tf22(b0,b1,b2,a1,a2) : _ _ : tf22t(b0,b1,b2,a1,a2) : _ _ : tf21t(b0,b1,b2,a1,a2) : _ Where: a : the poles b : the zeros Reference https://ccrma.stanford.edu/~jos/fp/Direct_Form_I.html Ladder/Lattice Digital Filters Ladder and lattice digital filters generally have superior numerical properties relative to direct-form digital filters. They can be derived from digital waveguide filters, which gives them a physical interpretation. Reference F. Itakura and S. Saito: \"Digital Filtering Techniques for Speech Analysis and Synthesis\", 7th Int. Cong. Acoustics, Budapest, 25 C 1, 1971. J. D. Markel and A. H. Gray: Linear Prediction of Speech, New York: Springer Verlag, 1976. https://ccrma.stanford.edu/~jos/pasp/Conventional_Ladder_Filters.html (fi.)av2sv Compute reflection coefficients sv from transfer-function denominator av. Usage sv = av2sv(av) Where: av : parallel signal bank a1,...,aN sv : parallel signal bank s1,...,sN where ro = ith reflection coefficient, and ai = coefficient of z^(-i) in the filter transfer-function denominator A(z) . Reference https://ccrma.stanford.edu/~jos/filters/Step_Down_Procedure.html (where reflection coefficients are denoted by k rather than s). (fi.)bvav2nuv Compute lattice tap coefficients from transfer-function coefficients. Usage nuv = bvav2nuv(bv,av) Where: av : parallel signal bank a1,...,aN bv : parallel signal bank b0,b1,...,aN nuv : parallel signal bank nu1,...,nuN where nui is the i'th tap coefficient, bi is the coefficient of z^(-i) in the filter numerator, ai is the coefficient of z^(-i) in the filter denominator (fi.)iir_lat2 Two-multiply latice IIR filter of arbitrary order. Usage _ : iir_lat2(bv,av) : _ Where: bv: zeros as a bank of parallel signals av: poles as a bank of parallel signals (fi.)allpassnt Two-multiply lattice allpass (nested order-1 direct-form-ii allpasses). Usage _ : allpassnt(n,sv) : _ Where: n : the order of the filter sv : the reflection coefficients (-1 1) (fi.)iir_kl Kelly-Lochbaum ladder IIR filter of arbitrary order. Usage _ : iir_kl(bv,av) : _ Where: bv: zeros as a bank of parallel signals av: poles as a bank of parallel signals (fi.)allpassnklt Kelly-Lochbaum ladder allpass. Usage: _ : allpassnklt(n,sv) : _ Where: n : the order of the filter sv : the reflection coefficients (-1 1) (fi.)iir_lat1 One-multiply latice IIR filter of arbitrary order. Usage _ : iir_lat1(bv,av) : _ Where: bv: zeros as a bank of parallel signals av: poles as a bank of parallel signals (fi.)allpassn1mt One-multiply lattice allpass with tap lines. Usage _ : allpassn1mt(N,sv) : _ Where: N : the order of the filter (fixed at compile time) sv : the reflection coefficients (-1 1) (fi.)iir_nl Normalized ladder filter of arbitrary order. Usage _ : iir_nl(bv,av) : _ Where: bv: zeros as a bank of parallel signals av: poles as a bank of parallel signals References J. D. Markel and A. H. Gray, Linear Prediction of Speech, New York: Springer Verlag, 1976. https://ccrma.stanford.edu/~jos/pasp/Normalized_Scattering_Junctions.html (fi.)allpassnnlt Normalized ladder allpass filter of arbitrary order. Usage: _ : allpassnnlt(N,sv) : _ Where: N : the order of the filter (fixed at compile time) sv : the reflection coefficients (-1,1) References J. D. Markel and A. H. Gray, Linear Prediction of Speech, New York: Springer Verlag, 1976. https://ccrma.stanford.edu/~jos/pasp/Normalized_Scattering_Junctions.html Useful Special Cases (fi.)tf2np Biquad based on a stable second-order Normalized Ladder Filter (more robust to modulation than tf2 and protected against instability). Usage _ : tf2np(b0,b1,b2,a1,a2) : _ Where: a : the poles b : the zeros (fi.)wgr Second-order transformer-normalized digital waveguide resonator. Usage _ : wgr(f,r) : _ Where: f : resonance frequency (Hz) r : loss factor for exponential decay (set to 1 to make a numerically stable oscillator) References https://ccrma.stanford.edu/~jos/pasp/Power_Normalized_Waveguide_Filters.html https://ccrma.stanford.edu/~jos/pasp/Digital_Waveguide_Oscillator.html (fi.)nlf2 Second order normalized digital waveguide resonator. Usage _ : nlf2(f,r) : _ Where: f : resonance frequency (Hz) r : loss factor for exponential decay (set to 1 to make a sinusoidal oscillator) Reference https://ccrma.stanford.edu/~jos/pasp/Power_Normalized_Waveguide_Filters.html (fi.)apnl Passive Nonlinear Allpass based on Pierce switching springs idea. Switch between allpass coefficient a1 and a2 at signal zero crossings. Usage _ : apnl(a1,a2) : _ Where: a1 and a2 : allpass coefficients Reference \"A Passive Nonlinear Digital Filter Design ...\" by John R. Pierce and Scott A. Van Duyne, JASA, vol. 101, no. 2, pp. 1120-1126, 1997 Ladder/Lattice Allpass Filters An allpass filter has gain 1 at every frequency, but variable phase. Ladder/lattice allpass filters are specified by reflection coefficients. They are defined here as nested allpass filters, hence the names allpassn*. References https://ccrma.stanford.edu/~jos/pasp/Conventional_Ladder_Filters.html https://ccrma.stanford.edu/~jos/pasp/Nested_Allpass_Filters.html Linear Prediction of Speech, Markel and Gray, Springer Verlag, 1976 (fi.)allpassn Two-multiply lattice - each section is two multiply-adds. Usage: _ : allpassn(n,sv) : _ Where: n : the order of the filter sv : the reflection coefficients (-1 1) References J. O. Smith and R. Michon, \"Nonlinear Allpass Ladder Filters in FAUST\", in Proceedings of the 14th International Conference on Digital Audio Effects (DAFx-11), Paris, France, September 19-23, 2011. (fi.)allpassnn Normalized form - four multiplies and two adds per section, but coefficients can be time varying and nonlinear without \"parametric amplification\" (modulation of signal energy). Usage: _ : allpassnn(n,tv) : _ Where: n : the order of the filter tv : the reflection coefficients (-PI PI) (fi.)allpassnkl Kelly-Lochbaum form - four multiplies and two adds per section, but all signals have an immediate physical interpretation as traveling pressure waves, etc. Usage: _ : allpassnkl(n,sv) : _ Where: n : the order of the filter sv : the reflection coefficients (-1 1) (fi.)allpass1m One-multiply form - one multiply and three adds per section. Normally the most efficient in special-purpose hardware. Usage: _ : allpassn1m(n,sv) : _ Where: n : the order of the filter sv : the reflection coefficients (-1 1) Digital Filter Sections Specified as Analog Filter Sections (fi.)tf2s and (fi.)tf2snp Second-order direct-form digital filter, specified by ANALOG transfer-function polynomials B(s)/A(s), and a frequency-scaling parameter. Digitization via the bilinear transform is built in. Usage _ : tf2s(b2,b1,b0,a1,a0,w1) : _ Where: b2 s^2 + b1 s + b0 H(s) = -------------------- s^2 + a1 s + a0 and w1 is the desired digital frequency (in radians/second) corresponding to analog frequency 1 rad/sec (i.e., s = j ). Example test program A second-order ANALOG Butterworth lowpass filter, normalized to have cutoff frequency at 1 rad/sec, has transfer function: 1 H(s) = ----------------- s^2 + a1 s + 1 where a1 = sqrt(2) . Therefore, a DIGITAL Butterworth lowpass cutting off at SR/4 is specified as tf2s(0,0,1,sqrt(2),1,PI*SR/2); Method Bilinear transform scaled for exact mapping of w1. Reference https://ccrma.stanford.edu/~jos/pasp/Bilinear_Transformation.html (fi.)tf1snp First-order special case of tf2snp above. Usage _ : tf1snp(b1,b0,a0) : _ (fi.)tf3slf Analogous to tf2s above, but third order, and using the typical low-frequency-matching bilinear-transform constant 2/T (\"lf\" series) instead of the specific-frequency-matching value used in tf2s and tf1s . Note the lack of a \"w1\" argument. Usage _ : tf3slf(b3,b2,b1,b0,a3,a2,a1,a0) : _ (fi.)tf1s First-order direct-form digital filter, specified by ANALOG transfer-function polynomials B(s)/A(s), and a frequency-scaling parameter. Usage _ : tf1s(b1,b0,a0,w1) : _ Where: b1 s + b0 H(s) = ---------- s + a0 and w1 is the desired digital frequency (in radians/second) corresponding to analog frequency 1 rad/sec (i.e., s = j ). Example test program A first-order ANALOG Butterworth lowpass filter, normalized to have cutoff frequency at 1 rad/sec, has transfer function: 1 H(s) = ------- s + 1 so b0 = a0 = 1 and b1 = 0 . Therefore, a DIGITAL first-order Butterworth lowpass with gain -3dB at SR/4 is specified as tf1s(0,1,1,PI*SR/2); // digital half-band order 1 Butterworth Method Bilinear transform scaled for exact mapping of w1. Reference https://ccrma.stanford.edu/~jos/pasp/Bilinear_Transformation.html (fi.)tf2sb Bandpass mapping of tf2s : In addition to a frequency-scaling parameter w1 (set to HALF the desired passband width in rad/sec), there is a desired center-frequency parameter wc (also in rad/s). Thus, tf2sb implements a fourth-order digital bandpass filter section specified by the coefficients of a second-order analog lowpass prototype section. Such sections can be combined in series for higher orders. The order of mappings is (1) frequency scaling (to set lowpass cutoff w1), (2) bandpass mapping to wc, then (3) the bilinear transform, with the usual scale parameter 2*SR . Algebra carried out in maxima and pasted here. Usage _ : tf2sb(b2,b1,b0,a1,a0,w1,wc) : _ (fi.)tf1sb First-to-second-order lowpass-to-bandpass section mapping, analogous to tf2sb above. Usage _ : tf1sb(b1,b0,a0,w1,wc) : _ Simple Resonator Filters (fi.)resonlp Simple resonant lowpass filter based on tf2s (virtual analog). resonlp is a standard Faust function. Usage _ : resonlp(fc,Q,gain) : _ _ : resonhp(fc,Q,gain) : _ _ : resonbp(fc,Q,gain) : _ Where: fc : center frequency (Hz) Q : q gain : gain (0-1) (fi.)resonhp Simple resonant highpass filters based on tf2s (virtual analog). resonhp is a standard Faust function. Usage _ : resonlp(fc,Q,gain) : _ _ : resonhp(fc,Q,gain) : _ _ : resonbp(fc,Q,gain) : _ Where: fc : center frequency (Hz) Q : q gain : gain (0-1) (fi.)resonbp Simple resonant bandpass filters based on tf2s (virtual analog). resonbp is a standard Faust function. Usage _ : resonlp(fc,Q,gain) : _ _ : resonhp(fc,Q,gain) : _ _ : resonbp(fc,Q,gain) : _ Where: fc : center frequency (Hz) Q : q gain : gain (0-1) Butterworth Lowpass/Highpass Filters (fi.)lowpass Nth-order Butterworth lowpass filter. lowpass is a standard Faust function. Usage _ : lowpass(N,fc) : _ Where: N : filter order (number of poles), nonnegative constant numerical expression fc : desired cut-off frequency (-3dB frequency) in Hz References https://ccrma.stanford.edu/~jos/filters/Butterworth_Lowpass_Design.html butter function in Octave (\"[z,p,g] = butter(N,1,'s');\") (fi.)highpass Nth-order Butterworth highpass filters. highpass is a standard Faust function. Usage _ : highpass(N,fc) : _ Where: N : filter order (number of poles), nonnegative constant numerical expression fc : desired cut-off frequency (-3dB frequency) in Hz References https://ccrma.stanford.edu/~jos/filters/Butterworth_Lowpass_Design.html butter function in Octave (\"[z,p,g] = butter(N,1,'s');\") (fi.)lowpass0_highpass1 Special Filter-Bank Delay-Equalizing Allpass Filters These special allpass filters are needed by filterbank et al. below. They are equivalent to ( lowpass(N,fc) +|- highpass(N,fc))/2 , but with canceling pole-zero pairs removed (which occurs for odd N). (fi.)lowpass_plus | minus_highpass Catch-all definitions for generality - even order is done: Catch-all definitions for generality - even order is done: FIXME: Rewrite the following, as for orders 3 and 5 above, to eliminate pole-zero cancellations: FIXME: Rewrite the following, as for orders 3 and 5 above, to eliminate pole-zero cancellations: Elliptic (Cauer) Lowpass Filters Elliptic (Cauer) Lowpass Filters References http://en.wikipedia.org/wiki/Elliptic_filter functions ncauer and ellip in Octave. (fi.)lowpass3e Third-order Elliptic (Cauer) lowpass filter. Usage _ : lowpass3e(fc) : _ Where: fc : -3dB frequency in Hz Design For spectral band-slice level display (see octave_analyzer3e ): [z,p,g] = ncauer(Rp,Rs,3); % analog zeros, poles, and gain, where Rp = 60 % dB ripple in stopband Rs = 0.2 % dB ripple in passband (fi.)lowpass6e Sixth-order Elliptic/Cauer lowpass filter. Usage _ : lowpass6e(fc) : _ Where: fc : -3dB frequency in Hz Design For spectral band-slice level display (see octave_analyzer6e): [z,p,g] = ncauer(Rp,Rs,6); % analog zeros, poles, and gain, where Rp = 80 % dB ripple in stopband Rs = 0.2 % dB ripple in passband Elliptic Highpass Filters (fi.)highpass3e Third-order Elliptic (Cauer) highpass filter. Inversion of lowpass3e wrt unit circle in s plane (s <- 1/s). Usage _ : highpass3e(fc) : _ Where: fc : -3dB frequency in Hz (fi.)highpass6e Sixth-order Elliptic/Cauer highpass filter. Inversion of lowpass3e wrt unit circle in s plane (s <- 1/s). Usage _ : highpass6e(fc) : _ Where: fc : -3dB frequency in Hz Butterworth Bandpass/Bandstop Filters (fi.)bandpass Order 2*Nh Butterworth bandpass filter made using the transformation s <- s + wc^2/s on lowpass(Nh) , where wc is the desired bandpass center frequency. The lowpass(Nh) cutoff w1 is half the desired bandpass width. bandpass is a standard Faust function. Usage _ : bandpass(Nh,fl,fu) : _ Where: Nh : HALF the desired bandpass order (which is therefore even) fl : lower -3dB frequency in Hz fu : upper -3dB frequency in Hz Thus, the passband width is fu-fl , and its center frequency is (fl+fu)/2 . Reference http://cnx.org/content/m16913/latest/ (fi.)bandstop Order 2*Nh Butterworth bandstop filter made using the transformation s <- s + wc^2/s on highpass(Nh) , where wc is the desired bandpass center frequency. The highpass(Nh) cutoff w1 is half the desired bandpass width. bandstop is a standard Faust function. Usage _ : bandstop(Nh,fl,fu) : _ Where: Nh : HALF the desired bandstop order (which is therefore even) fl : lower -3dB frequency in Hz fu : upper -3dB frequency in Hz Thus, the passband (stopband) width is fu-fl , and its center frequency is (fl+fu)/2 . Reference http://cnx.org/content/m16913/latest/ Elliptic Bandpass Filters (fi.)bandpass6e Order 12 elliptic bandpass filter analogous to bandpass(6) . (fi.)bandpass12e Order 24 elliptic bandpass filter analogous to bandpass(6) . (fi.)pospass Positive-Pass Filter (single-side-band filter). Usage _ : pospass(N,fc) : _,_ where N : filter order (Butterworth bandpass for positive frequencies). fc : lower bandpass cutoff frequency in Hz. Highpass cutoff frequency at ma.SR/2 - fc Hz. Example test program See dm.pospass_demo Look at frequency response Method A filter passing only positive frequencies can be made from a half-band lowpass by modulating it up to the positive-frequency range. Equivalently, down-modulate the input signal using a complex sinusoid at -SR/4 Hz, lowpass it with a half-band filter, and modulate back up by SR/4 Hz. In Faust/math notation: pospass(N) = \\ast(e^{-j\\frac{\\pi}{2}n}) : \\mbox{lowpass(N,SR/4)} : \\ast(e^{j\\frac{\\pi}{2}n}) An approximation to the Hilbert transform is given by the imaginary output signal: hilbert(N) = pospass(N) : !,*(2); References https://ccrma.stanford.edu/~jos/mdft/Analytic_Signals_Hilbert_Transform.html https://ccrma.stanford.edu/~jos/sasp/Comparison_Optimal_Chebyshev_FIR_I.html https://ccrma.stanford.edu/~jos/sasp/Hilbert_Transform.html Parametric Equalizers (Shelf, Peaking) Parametric Equalizers (Shelf, Peaking). References http://en.wikipedia.org/wiki/Equalization https://webaudio.github.io/Audio-EQ-Cookbook/Audio-EQ-Cookbook.txt Digital Audio Signal Processing, Udo Zolzer, Wiley, 1999, p. 124 https://ccrma.stanford.edu/~jos/filters/Low_High_Shelving_Filters.html https://ccrma.stanford.edu/~jos/filters/Peaking_Equalizers.html maxmsp.lib in the Faust distribution bandfilter.dsp in the faust2pd distribution (fi.)low_shelf First-order \"low shelf\" filter (gain boost|cut between dc and some frequency) low_shelf is a standard Faust function. Usage _ : lowshelf(N,L0,fx) : _ _ : low_shelf(L0,fx) : _ // default case (order 3) _ : lowshelf_other_freq(N,L0,fx) : _ Where: * N : filter order 1, 3, 5, ... (odd only, default should be 3, a constant numerical expression) * L0 : desired level (dB) between dc and fx (boost L0>0 or cut L0<0 ) * fx : -3dB frequency of lowpass band ( L0>0 ) or upper band ( L0<0 ) (see \"SHELF SHAPE\" below). The gain at SR/2 is constrained to be 1. The generalization to arbitrary odd orders is based on the well known fact that odd-order Butterworth band-splits are allpass-complementary (see filterbank documentation below for references). Shelf Shape The magnitude frequency response is approximately piecewise-linear on a log-log plot (\"BODE PLOT\"). The Bode \"stick diagram\" approximation L(lf) is easy to state in dB versus dB-frequency lf = dB(f): L0 > 0: L(lf) = L0, f between 0 and fx = 1st corner frequency; L(lf) = L0 - N * (lf - lfx), f between fx and f2 = 2nd corner frequency; L(lf) = 0, lf > lf2. lf2 = lfx + L0/N = dB-frequency at which level gets back to 0 dB. L0 < 0: L(lf) = L0, f between 0 and f1 = 1st corner frequency; L(lf) = - N * (lfx - lf), f between f1 and lfx = 2nd corner frequency; L(lf) = 0, lf > lfx. lf1 = lfx + L0/N = dB-frequency at which level goes up from L0. See lowshelf_other_freq . References See \"Parametric Equalizers\" above for references regarding low_shelf , high_shelf , and peak_eq . (fi.)high_shelf First-order \"high shelf\" filter (gain boost|cut above some frequency). high_shelf is a standard Faust function. Usage _ : highshelf(N,Lpi,fx) : _ _ : high_shelf(L0,fx) : _ // default case (order 3) _ : highshelf_other_freq(N,Lpi,fx) : _ Where: N : filter order 1, 3, 5, ... (odd only, a constant numerical expression). Lpi : desired level (dB) between fx and SR/2 (boost Lpi>0 or cut Lpi<0) fx : -3dB frequency of highpass band (L0>0) or lower band (L0<0) (Use highshelf_other_freq() below to find the other one.) The gain at dc is constrained to be 1. See lowshelf documentation above for more details on shelf shape. References See \"Parametric Equalizers\" above for references regarding low_shelf , high_shelf , and peak_eq . (fi.)peak_eq Second order \"peaking equalizer\" section (gain boost or cut near some frequency) Also called a \"parametric equalizer\" section. peak_eq is a standard Faust function. Usage _ : peak_eq(Lfx,fx,B) : _ Where: Lfx : level (dB) at fx (boost Lfx>0 or cut Lfx<0) fx : peak frequency (Hz) B : bandwidth (B) of peak in Hz References See \"Parametric Equalizers\" above for references regarding low_shelf , high_shelf , and peak_eq . (fi.)peak_eq_cq Constant-Q second order peaking equalizer section. Usage _ : peak_eq_cq(Lfx,fx,Q) : _ Where: Lfx : level (dB) at fx fx : boost or cut frequency (Hz) Q : \"Quality factor\" = fx/B where B = bandwidth of peak in Hz References See \"Parametric Equalizers\" above for references regarding low_shelf , high_shelf , and peak_eq . (fi.)peak_eq_rm Regalia-Mitra second order peaking equalizer section. Usage _ : peak_eq_rm(Lfx,fx,tanPiBT) : _ Where: Lfx : level (dB) at fx fx : boost or cut frequency (Hz) tanPiBT : tan(PI*B/SR) , where B = -3dB bandwidth (Hz) when 10^(Lfx/20) = 0 ~ PI*B/SR for narrow bandwidths B Reference P.A. Regalia, S.K. Mitra, and P.P. Vaidyanathan, \"The Digital All-Pass Filter: A Versatile Signal Processing Building Block\" Proceedings of the IEEE, 76(1):19-37, Jan. 1988. (See pp. 29-30.) See also \"Parametric Equalizers\" above for references on shelf and peaking equalizers in general. (fi.)spectral_tilt Spectral tilt filter, providing an arbitrary spectral rolloff factor alpha in (-1,1), where -1 corresponds to one pole (-6 dB per octave), and +1 corresponds to one zero (+6 dB per octave). In other words, alpha is the slope of the ln magnitude versus ln frequency. For a \"pinking filter\" (e.g., to generate 1/f noise from white noise), set alpha to -1/2. Usage _ : spectral_tilt(N,f0,bw,alpha) : _ Where: N : desired integer filter order (fixed at compile time) f0 : lower frequency limit for desired roll-off band > 0 bw : bandwidth of desired roll-off band alpha : slope of roll-off desired in nepers per neper, between -1 and 1 (ln mag / ln radian freq) Example test program See dm.spectral_tilt_demo and the documentation for no.pink_noise . Reference J.O. Smith and H.F. Smith, \"Closed Form Fractional Integration and Differentiation via Real Exponentially Spaced Pole-Zero Pairs\", arXiv.org publication arXiv:1606.06154 [cs.CE], June 7, 2016, * http://arxiv.org/abs/1606.06154 (fi.)levelfilter Dynamic level lowpass filter. levelfilter is a standard Faust function. Usage _ : levelfilter(L,freq) : _ Where: L : desired level (in dB) at Nyquist limit (SR/2), e.g., -60 freq : corner frequency (-3dB point) usually set to fundamental freq N : Number of filters in series where L = L/N Reference https://ccrma.stanford.edu/realsimple/faust_strings/Dynamic_Level_Lowpass_Filter.html (fi.)levelfilterN Dynamic level lowpass filter. Usage _ : levelfilterN(N,freq,L) : _ Where: N : Number of filters in series where L = L/N, a constant numerical expression freq : corner frequency (-3dB point) usually set to fundamental freq L : desired level (in dB) at Nyquist limit (SR/2), e.g., -60 Reference https://ccrma.stanford.edu/realsimple/faust_strings/Dynamic_Level_Lowpass_Filter.html Mth-Octave Filter-Banks Mth-octave filter-banks split the input signal into a bank of parallel signals, one for each spectral band. They are related to the Mth-Octave Spectrum-Analyzers in analysis.lib . The documentation of this library contains more details about the implementation. The parameters are: M : number of band-slices per octave (>1), a constant numerical expression N : total number of bands (>2), a constant numerical expression ftop : upper bandlimit of the Mth-octave bands (0 or cut L0<0 ) * fx : -3dB frequency of lowpass band ( L0>0 ) or upper band ( L0<0 ) (see \"SHELF SHAPE\" below). The gain at SR/2 is constrained to be 1. The generalization to arbitrary odd orders is based on the well known fact that odd-order Butterworth band-splits are allpass-complementary (see filterbank documentation below for references).","title":"Usage"},{"location":"libs/filters/#shelf-shape","text":"The magnitude frequency response is approximately piecewise-linear on a log-log plot (\"BODE PLOT\"). The Bode \"stick diagram\" approximation L(lf) is easy to state in dB versus dB-frequency lf = dB(f): L0 > 0: L(lf) = L0, f between 0 and fx = 1st corner frequency; L(lf) = L0 - N * (lf - lfx), f between fx and f2 = 2nd corner frequency; L(lf) = 0, lf > lf2. lf2 = lfx + L0/N = dB-frequency at which level gets back to 0 dB. L0 < 0: L(lf) = L0, f between 0 and f1 = 1st corner frequency; L(lf) = - N * (lfx - lf), f between f1 and lfx = 2nd corner frequency; L(lf) = 0, lf > lfx. lf1 = lfx + L0/N = dB-frequency at which level goes up from L0. See lowshelf_other_freq .","title":"Shelf Shape"},{"location":"libs/filters/#references_13","text":"See \"Parametric Equalizers\" above for references regarding low_shelf , high_shelf , and peak_eq .","title":"References"},{"location":"libs/filters/#fihigh_shelf","text":"First-order \"high shelf\" filter (gain boost|cut above some frequency). high_shelf is a standard Faust function.","title":"(fi.)high_shelf"},{"location":"libs/filters/#usage_55","text":"_ : highshelf(N,Lpi,fx) : _ _ : high_shelf(L0,fx) : _ // default case (order 3) _ : highshelf_other_freq(N,Lpi,fx) : _ Where: N : filter order 1, 3, 5, ... (odd only, a constant numerical expression). Lpi : desired level (dB) between fx and SR/2 (boost Lpi>0 or cut Lpi<0) fx : -3dB frequency of highpass band (L0>0) or lower band (L0<0) (Use highshelf_other_freq() below to find the other one.) The gain at dc is constrained to be 1. See lowshelf documentation above for more details on shelf shape.","title":"Usage"},{"location":"libs/filters/#references_14","text":"See \"Parametric Equalizers\" above for references regarding low_shelf , high_shelf , and peak_eq .","title":"References"},{"location":"libs/filters/#fipeak_eq","text":"Second order \"peaking equalizer\" section (gain boost or cut near some frequency) Also called a \"parametric equalizer\" section. peak_eq is a standard Faust function.","title":"(fi.)peak_eq"},{"location":"libs/filters/#usage_56","text":"_ : peak_eq(Lfx,fx,B) : _ Where: Lfx : level (dB) at fx (boost Lfx>0 or cut Lfx<0) fx : peak frequency (Hz) B : bandwidth (B) of peak in Hz","title":"Usage"},{"location":"libs/filters/#references_15","text":"See \"Parametric Equalizers\" above for references regarding low_shelf , high_shelf , and peak_eq .","title":"References"},{"location":"libs/filters/#fipeak_eq_cq","text":"Constant-Q second order peaking equalizer section.","title":"(fi.)peak_eq_cq"},{"location":"libs/filters/#usage_57","text":"_ : peak_eq_cq(Lfx,fx,Q) : _ Where: Lfx : level (dB) at fx fx : boost or cut frequency (Hz) Q : \"Quality factor\" = fx/B where B = bandwidth of peak in Hz","title":"Usage"},{"location":"libs/filters/#references_16","text":"See \"Parametric Equalizers\" above for references regarding low_shelf , high_shelf , and peak_eq .","title":"References"},{"location":"libs/filters/#fipeak_eq_rm","text":"Regalia-Mitra second order peaking equalizer section.","title":"(fi.)peak_eq_rm"},{"location":"libs/filters/#usage_58","text":"_ : peak_eq_rm(Lfx,fx,tanPiBT) : _ Where: Lfx : level (dB) at fx fx : boost or cut frequency (Hz) tanPiBT : tan(PI*B/SR) , where B = -3dB bandwidth (Hz) when 10^(Lfx/20) = 0 ~ PI*B/SR for narrow bandwidths B","title":"Usage"},{"location":"libs/filters/#reference_22","text":"P.A. Regalia, S.K. Mitra, and P.P. Vaidyanathan, \"The Digital All-Pass Filter: A Versatile Signal Processing Building Block\" Proceedings of the IEEE, 76(1):19-37, Jan. 1988. (See pp. 29-30.) See also \"Parametric Equalizers\" above for references on shelf and peaking equalizers in general.","title":"Reference"},{"location":"libs/filters/#fispectral_tilt","text":"Spectral tilt filter, providing an arbitrary spectral rolloff factor alpha in (-1,1), where -1 corresponds to one pole (-6 dB per octave), and +1 corresponds to one zero (+6 dB per octave). In other words, alpha is the slope of the ln magnitude versus ln frequency. For a \"pinking filter\" (e.g., to generate 1/f noise from white noise), set alpha to -1/2.","title":"(fi.)spectral_tilt"},{"location":"libs/filters/#usage_59","text":"_ : spectral_tilt(N,f0,bw,alpha) : _ Where: N : desired integer filter order (fixed at compile time) f0 : lower frequency limit for desired roll-off band > 0 bw : bandwidth of desired roll-off band alpha : slope of roll-off desired in nepers per neper, between -1 and 1 (ln mag / ln radian freq)","title":"Usage"},{"location":"libs/filters/#example-test-program_4","text":"See dm.spectral_tilt_demo and the documentation for no.pink_noise .","title":"Example test program"},{"location":"libs/filters/#reference_23","text":"J.O. Smith and H.F. Smith, \"Closed Form Fractional Integration and Differentiation via Real Exponentially Spaced Pole-Zero Pairs\", arXiv.org publication arXiv:1606.06154 [cs.CE], June 7, 2016, * http://arxiv.org/abs/1606.06154","title":"Reference"},{"location":"libs/filters/#filevelfilter","text":"Dynamic level lowpass filter. levelfilter is a standard Faust function.","title":"(fi.)levelfilter"},{"location":"libs/filters/#usage_60","text":"_ : levelfilter(L,freq) : _ Where: L : desired level (in dB) at Nyquist limit (SR/2), e.g., -60 freq : corner frequency (-3dB point) usually set to fundamental freq N : Number of filters in series where L = L/N","title":"Usage"},{"location":"libs/filters/#reference_24","text":"https://ccrma.stanford.edu/realsimple/faust_strings/Dynamic_Level_Lowpass_Filter.html","title":"Reference"},{"location":"libs/filters/#filevelfiltern","text":"Dynamic level lowpass filter.","title":"(fi.)levelfilterN"},{"location":"libs/filters/#usage_61","text":"_ : levelfilterN(N,freq,L) : _ Where: N : Number of filters in series where L = L/N, a constant numerical expression freq : corner frequency (-3dB point) usually set to fundamental freq L : desired level (in dB) at Nyquist limit (SR/2), e.g., -60","title":"Usage"},{"location":"libs/filters/#reference_25","text":"https://ccrma.stanford.edu/realsimple/faust_strings/Dynamic_Level_Lowpass_Filter.html","title":"Reference"},{"location":"libs/filters/#mth-octave-filter-banks","text":"Mth-octave filter-banks split the input signal into a bank of parallel signals, one for each spectral band. They are related to the Mth-Octave Spectrum-Analyzers in analysis.lib . The documentation of this library contains more details about the implementation. The parameters are: M : number of band-slices per octave (>1), a constant numerical expression N : total number of bands (>2), a constant numerical expression ftop : upper bandlimit of the Mth-octave bands (0. Usage _ : signum : _ (ma.)nextpow2 The nextpow2(x) returns the lowest integer m such that 2^m >= x. Usage 2^nextpow2(n) : _ Useful for allocating delay lines, e.g., delay(2^nextpow2(maxDelayNeeded), currentDelay); (ma.)zc Indicator function for zero-crossing: it returns 1 if a zero-crossing occurs, 0 otherwise. Usage _ : zc : _","title":" maths "},{"location":"libs/maths/#mathslib","text":"Mathematic library for Faust. Its official prefix is ma .","title":"maths.lib"},{"location":"libs/maths/#references","text":"https://github.com/grame-cncm/faustlibraries/blob/master/maths.lib","title":"References"},{"location":"libs/maths/#functions-reference","text":"","title":"Functions Reference"},{"location":"libs/maths/#masr","text":"Current sampling rate given at init time. Constant during program execution.","title":"(ma.)SR"},{"location":"libs/maths/#usage","text":"SR : _","title":"Usage"},{"location":"libs/maths/#mat","text":"Current sample duration in seconds computed from the sampling rate given at init time. Constant during program execution.","title":"(ma.)T"},{"location":"libs/maths/#usage_1","text":"T : _","title":"Usage"},{"location":"libs/maths/#mabs","text":"Current block-size. Can change during the execution at each block.","title":"(ma.)BS"},{"location":"libs/maths/#usage_2","text":"BS : _","title":"Usage"},{"location":"libs/maths/#mapi","text":"Constant PI in double precision.","title":"(ma.)PI"},{"location":"libs/maths/#usage_3","text":"PI : _","title":"Usage"},{"location":"libs/maths/#madeg2rad","text":"Convert degrees to radians.","title":"(ma.)deg2rad"},{"location":"libs/maths/#usage_4","text":"45. : deg2rad","title":"Usage"},{"location":"libs/maths/#marad2deg","text":"Convert radians to degrees.","title":"(ma.)rad2deg"},{"location":"libs/maths/#usage_5","text":"ma.PI : rad2deg","title":"Usage"},{"location":"libs/maths/#mae","text":"Constant e in double precision.","title":"(ma.)E"},{"location":"libs/maths/#usage_6","text":"E : _","title":"Usage"},{"location":"libs/maths/#maepsilon","text":"Constant EPSILON available in simple/double/quad precision.","title":"(ma.)EPSILON"},{"location":"libs/maths/#usage_7","text":"EPSILON : _","title":"Usage"},{"location":"libs/maths/#mamin","text":"Constant MIN available in simple/double/quad precision (minimal positive value).","title":"(ma.)MIN"},{"location":"libs/maths/#usage_8","text":"MIN : _","title":"Usage"},{"location":"libs/maths/#mamax","text":"Constant MAX available in simple/double/quad precision (maximal positive value).","title":"(ma.)MAX"},{"location":"libs/maths/#usage_9","text":"MAX : _","title":"Usage"},{"location":"libs/maths/#maftz","text":"Flush to zero: force samples under the \"maximum subnormal number\" to be zero. Usually not needed in C++ because the architecture file take care of this, but can be useful in JavaScript for instance.","title":"(ma.)FTZ"},{"location":"libs/maths/#usage_10","text":"_ : FTZ : _","title":"Usage"},{"location":"libs/maths/#reference","text":"http://docs.oracle.com/cd/E19957-01/806-3568/ncg_math.html","title":"Reference"},{"location":"libs/maths/#macopysign","text":"Changes the sign of x (first input) to that of y (second input).","title":"(ma.)copysign"},{"location":"libs/maths/#usage_11","text":"_,_ : copysign : _","title":"Usage"},{"location":"libs/maths/#maneg","text":"Invert the sign (-x) of a signal.","title":"(ma.)neg"},{"location":"libs/maths/#usage_12","text":"_ : neg : _","title":"Usage"},{"location":"libs/maths/#masubxy","text":"Subtract x and y .","title":"(ma.)sub(x,y)"},{"location":"libs/maths/#usage_13","text":"_,_ : sub : _","title":"Usage"},{"location":"libs/maths/#mainv","text":"Compute the inverse (1/x) of the input signal.","title":"(ma.)inv"},{"location":"libs/maths/#usage_14","text":"_ : inv : _","title":"Usage"},{"location":"libs/maths/#macbrt","text":"Computes the cube root of of the input signal.","title":"(ma.)cbrt"},{"location":"libs/maths/#usage_15","text":"_ : cbrt : _","title":"Usage"},{"location":"libs/maths/#mahypot","text":"Computes the euclidian distance of the two input signals sqrt(x x+y y) without undue overflow or underflow.","title":"(ma.)hypot"},{"location":"libs/maths/#usage_16","text":"_,_ : hypot : _","title":"Usage"},{"location":"libs/maths/#maldexp","text":"Takes two input signals: x and n, and multiplies x by 2 to the power n.","title":"(ma.)ldexp"},{"location":"libs/maths/#usage_17","text":"_,_ : ldexp : _","title":"Usage"},{"location":"libs/maths/#mascalb","text":"Takes two input signals: x and n, and multiplies x by 2 to the power n.","title":"(ma.)scalb"},{"location":"libs/maths/#usage_18","text":"_,_ : scalb : _","title":"Usage"},{"location":"libs/maths/#malog1p","text":"Computes log(1 + x) without undue loss of accuracy when x is nearly zero.","title":"(ma.)log1p"},{"location":"libs/maths/#usage_19","text":"_ : log1p : _","title":"Usage"},{"location":"libs/maths/#malogb","text":"Return exponent of the input signal as a floating-point number.","title":"(ma.)logb"},{"location":"libs/maths/#usage_20","text":"_ : logb : _","title":"Usage"},{"location":"libs/maths/#mailogb","text":"Return exponent of the input signal as an integer number.","title":"(ma.)ilogb"},{"location":"libs/maths/#usage_21","text":"_ : ilogb : _","title":"Usage"},{"location":"libs/maths/#malog2","text":"Returns the base 2 logarithm of x.","title":"(ma.)log2"},{"location":"libs/maths/#usage_22","text":"_ : log2 : _","title":"Usage"},{"location":"libs/maths/#maexpm1","text":"Return exponent of the input signal minus 1 with better precision.","title":"(ma.)expm1"},{"location":"libs/maths/#usage_23","text":"_ : expm1 : _","title":"Usage"},{"location":"libs/maths/#maacosh","text":"Computes the principle value of the inverse hyperbolic cosine of the input signal.","title":"(ma.)acosh"},{"location":"libs/maths/#usage_24","text":"_ : acosh : _","title":"Usage"},{"location":"libs/maths/#maasinh","text":"Computes the inverse hyperbolic sine of the input signal.","title":"(ma.)asinh"},{"location":"libs/maths/#usage_25","text":"_ : asinh : _","title":"Usage"},{"location":"libs/maths/#maatanh","text":"Computes the inverse hyperbolic tangent of the input signal.","title":"(ma.)atanh"},{"location":"libs/maths/#usage_26","text":"_ : atanh : _","title":"Usage"},{"location":"libs/maths/#masinh","text":"Computes the hyperbolic sine of the input signal.","title":"(ma.)sinh"},{"location":"libs/maths/#usage_27","text":"_ : sinh : _","title":"Usage"},{"location":"libs/maths/#macosh","text":"Computes the hyperbolic cosine of the input signal.","title":"(ma.)cosh"},{"location":"libs/maths/#usage_28","text":"_ : cosh : _","title":"Usage"},{"location":"libs/maths/#matanh","text":"Computes the hyperbolic tangent of the input signal.","title":"(ma.)tanh"},{"location":"libs/maths/#usage_29","text":"_ : tanh : _","title":"Usage"},{"location":"libs/maths/#maerf","text":"Computes the error function of the input signal.","title":"(ma.)erf"},{"location":"libs/maths/#usage_30","text":"_ : erf : _","title":"Usage"},{"location":"libs/maths/#maerfc","text":"Computes the complementary error function of the input signal.","title":"(ma.)erfc"},{"location":"libs/maths/#usage_31","text":"_ : erfc : _","title":"Usage"},{"location":"libs/maths/#magamma","text":"Computes the gamma function of the input signal.","title":"(ma.)gamma"},{"location":"libs/maths/#usage_32","text":"_ : gamma : _","title":"Usage"},{"location":"libs/maths/#malgamma","text":"Calculates the natural logorithm of the absolute value of the gamma function of the input signal.","title":"(ma.)lgamma"},{"location":"libs/maths/#usage_33","text":"_ : lgamma : _","title":"Usage"},{"location":"libs/maths/#maj0","text":"Computes the Bessel function of the first kind of order 0 of the input signal.","title":"(ma.)J0"},{"location":"libs/maths/#usage_34","text":"_ : J0 : _","title":"Usage"},{"location":"libs/maths/#maj1","text":"Computes the Bessel function of the first kind of order 1 of the input signal.","title":"(ma.)J1"},{"location":"libs/maths/#usage_35","text":"_ : J1 : _","title":"Usage"},{"location":"libs/maths/#majn","text":"Computes the Bessel function of the first kind of order n (first input signal) of the second input signal.","title":"(ma.)Jn"},{"location":"libs/maths/#usage_36","text":"_,_ : Jn : _","title":"Usage"},{"location":"libs/maths/#may0","text":"Computes the linearly independent Bessel function of the second kind of order 0 of the input signal.","title":"(ma.)Y0"},{"location":"libs/maths/#usage_37","text":"_ : Y0 : _","title":"Usage"},{"location":"libs/maths/#may1","text":"Computes the linearly independent Bessel function of the second kind of order 1 of the input signal.","title":"(ma.)Y1"},{"location":"libs/maths/#usage_38","text":"_ : Y0 : _","title":"Usage"},{"location":"libs/maths/#mayn","text":"Computes the linearly independent Bessel function of the second kind of order n (first input signal) of the second input signal.","title":"(ma.)Yn"},{"location":"libs/maths/#usage_39","text":"_,_ : Yn : _","title":"Usage"},{"location":"libs/maths/#mafabs-mafmax-mafmin","text":"Just for compatibility... fabs = abs fmax = max fmin = min","title":"(ma.)fabs, (ma.)fmax, (ma.)fmin"},{"location":"libs/maths/#manp2","text":"Gives the next power of 2 of x.","title":"(ma.)np2"},{"location":"libs/maths/#usage_40","text":"np2(n) : _ Where: n : an integer","title":"Usage"},{"location":"libs/maths/#mafrac","text":"Gives the fractional part of n.","title":"(ma.)frac"},{"location":"libs/maths/#usage_41","text":"frac(n) : _ Where: n : a decimal number","title":"Usage"},{"location":"libs/maths/#mamodulo","text":"Modulus operation.","title":"(ma.)modulo"},{"location":"libs/maths/#usage_42","text":"modulo(x,y) : _ Where: x : the numerator y : the denominator","title":"Usage"},{"location":"libs/maths/#maisnan","text":"Return non-zero if x is a NaN.","title":"(ma.)isnan"},{"location":"libs/maths/#usage_43","text":"isnan(x) _ : isnan : _ Where: x : signal to analyse","title":"Usage"},{"location":"libs/maths/#maisinf","text":"Return non-zero if x is a positive or negative infinity.","title":"(ma.)isinf"},{"location":"libs/maths/#usage_44","text":"isinf(x) _ : isinf : _ Where: x : signal to analyse","title":"Usage"},{"location":"libs/maths/#machebychev","text":"Chebychev transformation of order N.","title":"(ma.)chebychev"},{"location":"libs/maths/#usage_45","text":"_ : chebychev(N) : _ Where: N : the order of the polynomial, a constant numerical expression","title":"Usage"},{"location":"libs/maths/#semantics","text":"T[0](x) = 1, T[1](x) = x, T[n](x) = 2x*T[n-1](x) - T[n-2](x)","title":"Semantics"},{"location":"libs/maths/#reference_1","text":"http://en.wikipedia.org/wiki/Chebyshev_polynomial","title":"Reference"},{"location":"libs/maths/#machebychevpoly","text":"Linear combination of the first Chebyshev polynomials.","title":"(ma.)chebychevpoly"},{"location":"libs/maths/#usage_46","text":"_ : chebychevpoly((c0,c1,...,cn)) : _ Where: cn : the different Chebychevs polynomials such that: chebychevpoly((c0,c1,...,cn)) = Sum of chebychev(i)*ci","title":"Usage"},{"location":"libs/maths/#reference_2","text":"http://www.csounds.com/manual/html/chebyshevpoly.html","title":"Reference"},{"location":"libs/maths/#madiffn","text":"Negated first-order difference.","title":"(ma.)diffn"},{"location":"libs/maths/#usage_47","text":"_ : diffn : _","title":"Usage"},{"location":"libs/maths/#masignum","text":"The signum function signum(x) is defined as -1 for x<0, 0 for x==0, and 1 for x>0.","title":"(ma.)signum"},{"location":"libs/maths/#usage_48","text":"_ : signum : _","title":"Usage"},{"location":"libs/maths/#manextpow2","text":"The nextpow2(x) returns the lowest integer m such that 2^m >= x.","title":"(ma.)nextpow2"},{"location":"libs/maths/#usage_49","text":"2^nextpow2(n) : _ Useful for allocating delay lines, e.g., delay(2^nextpow2(maxDelayNeeded), currentDelay);","title":"Usage"},{"location":"libs/maths/#mazc","text":"Indicator function for zero-crossing: it returns 1 if a zero-crossing occurs, 0 otherwise.","title":"(ma.)zc"},{"location":"libs/maths/#usage_50","text":"_ : zc : _","title":"Usage"},{"location":"libs/mi/","text":"mi.lib This ongoing work is the fruit of a collaboration between GRAME-CNCM and the ANIS (Arts Num\u00e9riques et Immersions Sensorielles) research group from GIPSA-Lab (Universit\u00e9 Grenoble Alpes). This library implements basic 1-DoF mass-interaction physics algorithms, allowing to declare and connect physical elements (masses, springs, non linear interactions, etc.) together to form topological networks. Models can be assembled by hand, however in more complex scenarios it is recommended to use a scripting tool (such as MIMS) to generate the FAUST signal routing for a given physical network. Its official prefix is mi . https://github.com/rmichon/mi_faust http://mi-creative.eu/tool_miFaust.html http://mi-creative.eu/paper_lac19.html Sources The core mass-interaction algorithms implemented in this library are in the public domain and are disclosed in the following scientific publications: Claude Cadoz, Annie Luciani, Jean-Loup Florens, Curtis Roads and Fran\u00e7oise Chabade. Responsive Input Devices and Sound Synthesis by Stimulation of Instrumental Mechanisms: The Cordis System. Computer Music Journal, Vol 8. No. 3, 1984. Claude Cadoz, Annie Luciani and Jean Loup Florens. CORDIS-ANIMA: A Modeling and Simulation System for Sound and Image Synthesis: The General Formalism. Computer Music Journal. Vol. 17, No. 1, 1993. Alexandros Kontogeorgakopoulos and Claude Cadoz. Cordis Anima Physical Modeling and Simulation System Analysis. In Proceedings of the Sound and Music Computing Conference (SMC-07), Lefkada, Greece, 2007. Nicolas Castagne, Claude Cadoz, Ali Allaoui and Olivier Tache. G3: Genesis Software Environment Update. In Proceedings of the International Computer Music Conference (ICMC-09), Montreal, Canada, 2009. Nicolas Castagn\u00e9 and Claude Cadoz. Genesis 3: Plate-forme pour la cr\u00e9ation musicale \u00e0 l'aide des mod\u00e8les physiques Cordis-Anima. In Proceedings of the Journ\u00e9e de l'Informatique Musicale, Grenoble, France, 2009. Edgar Berdahl and Julius O. Smith. An Introduction to the Synth-A-Modeler Compiler: Modular and Open-Source Sound Synthesis using Physical Models. In Proceedings of the Linux Audio Conference (LAC-12), Stanford, USA, 2012. James Leonard and Claude Cadoz. Physical Modelling Concepts for a Collection of Multisensory Virtual Musical Instruments. In Proceedings of the New Interfaces for Musical Expression (NIME-15) Conference, Baton Rouge, USA, 2015. References https://github.com/grame-cncm/faustlibraries/blob/master/mi.lib Utility Functions These utility functions are used to help certain operations (e.g. define initial positions and velocities for physical elements). (mi.)initState Used to set initial delayed position values that must be initialised at step 0 of the physics simulation. If you develop any of your own modules, you will need to use this (see mass and springDamper algorithm codes for examples). Usage x : initState(x0) : _ Where: x : position value signal x0 : initial value for position Mass Algorithms All mass-type physical element functions are declared here. They all expect to receive a force input signal and produce a position signal. All physical parameters are expressed in sample-rate dependant values. (mi.)mass Implementation of a punctual mass element. Takes an input force and produces output position. Usage mass(m, grav, x0, xr0),_ : _ Where: m : mass value grav : gravity force value x0 : initial position xr0 : initial delayed position (inferred from initial velocity) (mi.)oscil Implementation of a simple linear harmonic oscillator. Takes an input force and produces output position. Usage oscil(m, k, z, grav, x0, xr0),_ : _ Where: m : mass value k : stiffness value z : damping value grav : gravity force value x0 : initial position xr0 : initial delayed position (inferred from initial velocity) (mi.)ground Implementation of a fixed point element. The position output produced by this module never changes, however it still expects a force input signal (for compliance with connection rules). Usage ground(x0),_ : _ Where: x0 : initial position (mi.)posInput Implementation of a position input module (driven by an outside signal). Takes two signal inputs: incoming force (which doesn't affect position) and the driving position signal. Usage posInput(x0),_,_ : _ Where: x0 : initial position Interaction Algorithms All interaction-type physical element functions are declared here. They each expect to receive two position signals (coming from the two mass-elements that they connect) and produce two equal and opposite force signals that must be routed back to the mass elements' inputs. All physical parameters are expressed in sample-rate dependant values. (mi.)spring Implementation of a linear elastic spring interaction. Usage spring(k, x1r, x2r),_,_ : _,_ Where: k : stiffness value x1r : initial delayed position of mass 1 (unused here) x2r : initial delayed position of mass 2 (unused here) (mi.)damper Implementation of a linear damper interaction. Beware: in 32bit precision mode, damping forces can become truncated if position values are not centered around zero! Usage damper(z, x1r, x2r),_,_ : _,_ Where: z : damping value x1r : initial delayed position of mass 1 x2r : initial delayed position of mass 2 (mi.)springDamper Implementation of a linear viscoelastic spring-damper interaction (a combination of the spring and damper modules). Usage springDamper(k, z, x1r, x2r),_,_ : _,_ Where: k : stiffness value z : damping value x1r : initial delayed position of mass 1 x2r : initial delayed position of mass 2 (mi.)nlSpringDamper2 Implementation of a non-linear viscoelastic spring-damper interaction containing a quadratic term (function of squared distance). Beware: at high displacements, this interaction will break numerical stability conditions ! The nlSpringDamperClipped is a safer option. Usage nlSpringDamper2(k, q, z, x1r, x2r),_,_ : _,_ Where: k : linear stiffness value q : quadratic stiffness value z : damping value x1r : initial delayed position of mass 1 x2r : initial delayed position of mass 2 (mi.)nlSpringDamper3 Implementation of a non-linear viscoelastic spring-damper interaction containing a cubic term (function of distance^3). Beware: at high displacements, this interaction will break numerical stability conditions ! The nlSpringDamperClipped is a safer option. Usage nlSpringDamper3(k, q, z, x1r, x2r),_,_ : _,_ Where: k : linear stiffness value q : cubic stiffness value z : damping value x1r : initial delayed position of mass 1 x2r : initial delayed position of mass 2 (mi.)nlSpringDamperClipped Implementation of a non-linear viscoelastic spring-damper interaction containing a cubic term (function of distance^3), bound by an upper linear stiffness (hard-clipping). This bounding means that when faced with strong displacements, the interaction profile will \"clip\" at a given point and never produce forces higher than the bounding equivalent linear spring, stopping models from becoming unstable. So far the interaction clips \"hard\" (with no soft-knee spline interpolation, etc.) Usage nlSpringDamperClipped(s, c, k, z, x1r, x2r),_,_ : _,_ Where: s : linear stiffness value c : cubic stiffness value k : upper-bound linear stiffness value z : (linear) damping value x1r : initial delayed position of mass 1 x2r : initial delayed position of mass 2 (mi.)nlPluck Implementation of a piecewise linear plucking interaction. The symmetric function provides a repulsive viscoelastic interaction upon contact, until a tipping point is reached (when the plucking occurs). The tipping point depends both on the stiffness and the distance scaling of the interaction. Usage nlPluck(knl, scale, z, x1r, x2r),_,_ : _,_ Where: knl : stiffness scaling parameter (vertical stretch of the NL function) scale : distance scaling parameter (horizontal stretch of the NL function) z : (linear) damping value x1r : initial delayed position of mass 1 x2r : initial delayed position of mass 2 (mi.)nlBow Implementation of a non-linear friction based interaction that allows for stick-slip bowing behaviour. Two versions are proposed : a piecewise linear function (very similar to the nlPluck ) or a mathematical approximation (see Stefan Bilbao's book, Numerical Sound Synthesis). Usage nlBow(znl, scale, type, x1r, x2r),_,_ : _,_ Where: znl : friction scaling parameter (vertical stretch of the NL function) scale : velocity scaling parameter (horizontal stretch of the NL function) type : interaction profile (0 = piecewise linear, 1 = smooth function) x1r : initial delayed position of mass 1 x2r : initial delayed position of mass 2 (mi.)collision Implementation of a collision interaction, producing linear visco-elastic repulsion forces when two mass elements are interpenetrating. Usage collision(k, z, thres, x1r, x2r),_,_ : _,_ Where: k : collision stiffness parameter z : collision damping parameter thres : threshold distance for the contact between elements x1r : initial delayed position of mass 1 x2r : initial delayed position of mass 2 (mi.)nlCollisionClipped Implementation of a collision interaction, producing non-linear visco-elastic repulsion forces when two mass elements are interpenetrating. Bound by an upper stiffness value to maintain stability. This interaction is particularly useful for more realistic contact dynamics (greater difference in velocity provides sharper contacts, and reciprocally). Usage nlCollisionClipped(s, c, k, z, thres, x1r, x2r),_,_ : _,_ Where: s : collision linear stiffness parameter c : collision cubic stiffness parameter k : collision upper-bounding stiffness parameter z : collision damping parameter thres : threshold distance for the contact between elements x1r : initial delayed position of mass 1 x2r : initial delayed position of mass 2","title":" mi "},{"location":"libs/mi/#milib","text":"This ongoing work is the fruit of a collaboration between GRAME-CNCM and the ANIS (Arts Num\u00e9riques et Immersions Sensorielles) research group from GIPSA-Lab (Universit\u00e9 Grenoble Alpes). This library implements basic 1-DoF mass-interaction physics algorithms, allowing to declare and connect physical elements (masses, springs, non linear interactions, etc.) together to form topological networks. Models can be assembled by hand, however in more complex scenarios it is recommended to use a scripting tool (such as MIMS) to generate the FAUST signal routing for a given physical network. Its official prefix is mi . https://github.com/rmichon/mi_faust http://mi-creative.eu/tool_miFaust.html http://mi-creative.eu/paper_lac19.html","title":"mi.lib"},{"location":"libs/mi/#sources","text":"The core mass-interaction algorithms implemented in this library are in the public domain and are disclosed in the following scientific publications: Claude Cadoz, Annie Luciani, Jean-Loup Florens, Curtis Roads and Fran\u00e7oise Chabade. Responsive Input Devices and Sound Synthesis by Stimulation of Instrumental Mechanisms: The Cordis System. Computer Music Journal, Vol 8. No. 3, 1984. Claude Cadoz, Annie Luciani and Jean Loup Florens. CORDIS-ANIMA: A Modeling and Simulation System for Sound and Image Synthesis: The General Formalism. Computer Music Journal. Vol. 17, No. 1, 1993. Alexandros Kontogeorgakopoulos and Claude Cadoz. Cordis Anima Physical Modeling and Simulation System Analysis. In Proceedings of the Sound and Music Computing Conference (SMC-07), Lefkada, Greece, 2007. Nicolas Castagne, Claude Cadoz, Ali Allaoui and Olivier Tache. G3: Genesis Software Environment Update. In Proceedings of the International Computer Music Conference (ICMC-09), Montreal, Canada, 2009. Nicolas Castagn\u00e9 and Claude Cadoz. Genesis 3: Plate-forme pour la cr\u00e9ation musicale \u00e0 l'aide des mod\u00e8les physiques Cordis-Anima. In Proceedings of the Journ\u00e9e de l'Informatique Musicale, Grenoble, France, 2009. Edgar Berdahl and Julius O. Smith. An Introduction to the Synth-A-Modeler Compiler: Modular and Open-Source Sound Synthesis using Physical Models. In Proceedings of the Linux Audio Conference (LAC-12), Stanford, USA, 2012. James Leonard and Claude Cadoz. Physical Modelling Concepts for a Collection of Multisensory Virtual Musical Instruments. In Proceedings of the New Interfaces for Musical Expression (NIME-15) Conference, Baton Rouge, USA, 2015.","title":"Sources"},{"location":"libs/mi/#references","text":"https://github.com/grame-cncm/faustlibraries/blob/master/mi.lib","title":"References"},{"location":"libs/mi/#utility-functions","text":"These utility functions are used to help certain operations (e.g. define initial positions and velocities for physical elements).","title":"Utility Functions"},{"location":"libs/mi/#miinitstate","text":"Used to set initial delayed position values that must be initialised at step 0 of the physics simulation. If you develop any of your own modules, you will need to use this (see mass and springDamper algorithm codes for examples).","title":"(mi.)initState"},{"location":"libs/mi/#usage","text":"x : initState(x0) : _ Where: x : position value signal x0 : initial value for position","title":"Usage"},{"location":"libs/mi/#mass-algorithms","text":"All mass-type physical element functions are declared here. They all expect to receive a force input signal and produce a position signal. All physical parameters are expressed in sample-rate dependant values.","title":"Mass Algorithms"},{"location":"libs/mi/#mimass","text":"Implementation of a punctual mass element. Takes an input force and produces output position.","title":"(mi.)mass"},{"location":"libs/mi/#usage_1","text":"mass(m, grav, x0, xr0),_ : _ Where: m : mass value grav : gravity force value x0 : initial position xr0 : initial delayed position (inferred from initial velocity)","title":"Usage"},{"location":"libs/mi/#mioscil","text":"Implementation of a simple linear harmonic oscillator. Takes an input force and produces output position.","title":"(mi.)oscil"},{"location":"libs/mi/#usage_2","text":"oscil(m, k, z, grav, x0, xr0),_ : _ Where: m : mass value k : stiffness value z : damping value grav : gravity force value x0 : initial position xr0 : initial delayed position (inferred from initial velocity)","title":"Usage"},{"location":"libs/mi/#miground","text":"Implementation of a fixed point element. The position output produced by this module never changes, however it still expects a force input signal (for compliance with connection rules).","title":"(mi.)ground"},{"location":"libs/mi/#usage_3","text":"ground(x0),_ : _ Where: x0 : initial position","title":"Usage"},{"location":"libs/mi/#miposinput","text":"Implementation of a position input module (driven by an outside signal). Takes two signal inputs: incoming force (which doesn't affect position) and the driving position signal.","title":"(mi.)posInput"},{"location":"libs/mi/#usage_4","text":"posInput(x0),_,_ : _ Where: x0 : initial position","title":"Usage"},{"location":"libs/mi/#interaction-algorithms","text":"All interaction-type physical element functions are declared here. They each expect to receive two position signals (coming from the two mass-elements that they connect) and produce two equal and opposite force signals that must be routed back to the mass elements' inputs. All physical parameters are expressed in sample-rate dependant values.","title":"Interaction Algorithms"},{"location":"libs/mi/#mispring","text":"Implementation of a linear elastic spring interaction.","title":"(mi.)spring"},{"location":"libs/mi/#usage_5","text":"spring(k, x1r, x2r),_,_ : _,_ Where: k : stiffness value x1r : initial delayed position of mass 1 (unused here) x2r : initial delayed position of mass 2 (unused here)","title":"Usage"},{"location":"libs/mi/#midamper","text":"Implementation of a linear damper interaction. Beware: in 32bit precision mode, damping forces can become truncated if position values are not centered around zero!","title":"(mi.)damper"},{"location":"libs/mi/#usage_6","text":"damper(z, x1r, x2r),_,_ : _,_ Where: z : damping value x1r : initial delayed position of mass 1 x2r : initial delayed position of mass 2","title":"Usage"},{"location":"libs/mi/#mispringdamper","text":"Implementation of a linear viscoelastic spring-damper interaction (a combination of the spring and damper modules).","title":"(mi.)springDamper"},{"location":"libs/mi/#usage_7","text":"springDamper(k, z, x1r, x2r),_,_ : _,_ Where: k : stiffness value z : damping value x1r : initial delayed position of mass 1 x2r : initial delayed position of mass 2","title":"Usage"},{"location":"libs/mi/#minlspringdamper2","text":"Implementation of a non-linear viscoelastic spring-damper interaction containing a quadratic term (function of squared distance). Beware: at high displacements, this interaction will break numerical stability conditions ! The nlSpringDamperClipped is a safer option.","title":"(mi.)nlSpringDamper2"},{"location":"libs/mi/#usage_8","text":"nlSpringDamper2(k, q, z, x1r, x2r),_,_ : _,_ Where: k : linear stiffness value q : quadratic stiffness value z : damping value x1r : initial delayed position of mass 1 x2r : initial delayed position of mass 2","title":"Usage"},{"location":"libs/mi/#minlspringdamper3","text":"Implementation of a non-linear viscoelastic spring-damper interaction containing a cubic term (function of distance^3). Beware: at high displacements, this interaction will break numerical stability conditions ! The nlSpringDamperClipped is a safer option.","title":"(mi.)nlSpringDamper3"},{"location":"libs/mi/#usage_9","text":"nlSpringDamper3(k, q, z, x1r, x2r),_,_ : _,_ Where: k : linear stiffness value q : cubic stiffness value z : damping value x1r : initial delayed position of mass 1 x2r : initial delayed position of mass 2","title":"Usage"},{"location":"libs/mi/#minlspringdamperclipped","text":"Implementation of a non-linear viscoelastic spring-damper interaction containing a cubic term (function of distance^3), bound by an upper linear stiffness (hard-clipping). This bounding means that when faced with strong displacements, the interaction profile will \"clip\" at a given point and never produce forces higher than the bounding equivalent linear spring, stopping models from becoming unstable. So far the interaction clips \"hard\" (with no soft-knee spline interpolation, etc.)","title":"(mi.)nlSpringDamperClipped"},{"location":"libs/mi/#usage_10","text":"nlSpringDamperClipped(s, c, k, z, x1r, x2r),_,_ : _,_ Where: s : linear stiffness value c : cubic stiffness value k : upper-bound linear stiffness value z : (linear) damping value x1r : initial delayed position of mass 1 x2r : initial delayed position of mass 2","title":"Usage"},{"location":"libs/mi/#minlpluck","text":"Implementation of a piecewise linear plucking interaction. The symmetric function provides a repulsive viscoelastic interaction upon contact, until a tipping point is reached (when the plucking occurs). The tipping point depends both on the stiffness and the distance scaling of the interaction.","title":"(mi.)nlPluck"},{"location":"libs/mi/#usage_11","text":"nlPluck(knl, scale, z, x1r, x2r),_,_ : _,_ Where: knl : stiffness scaling parameter (vertical stretch of the NL function) scale : distance scaling parameter (horizontal stretch of the NL function) z : (linear) damping value x1r : initial delayed position of mass 1 x2r : initial delayed position of mass 2","title":"Usage"},{"location":"libs/mi/#minlbow","text":"Implementation of a non-linear friction based interaction that allows for stick-slip bowing behaviour. Two versions are proposed : a piecewise linear function (very similar to the nlPluck ) or a mathematical approximation (see Stefan Bilbao's book, Numerical Sound Synthesis).","title":"(mi.)nlBow"},{"location":"libs/mi/#usage_12","text":"nlBow(znl, scale, type, x1r, x2r),_,_ : _,_ Where: znl : friction scaling parameter (vertical stretch of the NL function) scale : velocity scaling parameter (horizontal stretch of the NL function) type : interaction profile (0 = piecewise linear, 1 = smooth function) x1r : initial delayed position of mass 1 x2r : initial delayed position of mass 2","title":"Usage"},{"location":"libs/mi/#micollision","text":"Implementation of a collision interaction, producing linear visco-elastic repulsion forces when two mass elements are interpenetrating.","title":"(mi.)collision"},{"location":"libs/mi/#usage_13","text":"collision(k, z, thres, x1r, x2r),_,_ : _,_ Where: k : collision stiffness parameter z : collision damping parameter thres : threshold distance for the contact between elements x1r : initial delayed position of mass 1 x2r : initial delayed position of mass 2","title":"Usage"},{"location":"libs/mi/#minlcollisionclipped","text":"Implementation of a collision interaction, producing non-linear visco-elastic repulsion forces when two mass elements are interpenetrating. Bound by an upper stiffness value to maintain stability. This interaction is particularly useful for more realistic contact dynamics (greater difference in velocity provides sharper contacts, and reciprocally).","title":"(mi.)nlCollisionClipped"},{"location":"libs/mi/#usage_14","text":"nlCollisionClipped(s, c, k, z, thres, x1r, x2r),_,_ : _,_ Where: s : collision linear stiffness parameter c : collision cubic stiffness parameter k : collision upper-bounding stiffness parameter z : collision damping parameter thres : threshold distance for the contact between elements x1r : initial delayed position of mass 1 x2r : initial delayed position of mass 2","title":"Usage"},{"location":"libs/misceffects/","text":"misceffects.lib Collection of audio effects library. Its official prefix is ef . The library is organized into 7 sections: Dynamic Filtering Meshes Mixing Time Based Pitch Shifting Saturators References https://github.com/grame-cncm/faustlibraries/blob/master/misceffects.lib Dynamic (ef.)cubicnl Cubic nonlinearity distortion. cubicnl is a standard Faust function. Usage: _ : cubicnl(drive,offset) : _ _ : cubicnl_nodc(drive,offset) : _ Where: drive : distortion amount, between 0 and 1 offset : constant added before nonlinearity to give even harmonics. Note: offset can introduce a nonzero mean - feed cubicnl output to dcblocker to remove this. References: https://ccrma.stanford.edu/~jos/pasp/Cubic_Soft_Clipper.html https://ccrma.stanford.edu/~jos/pasp/Nonlinear_Distortion.html (ef.)gate_mono Mono signal gate. gate_mono is a standard Faust function. Usage _ : gate_mono(thresh,att,hold,rel) : _ Where: thresh : dB level threshold above which gate opens (e.g., -60 dB) att : attack time = time constant (sec) for gate to open (e.g., 0.0001 s = 0.1 ms) hold : hold time = time (sec) gate stays open after signal level < thresh (e.g., 0.1 s) rel : release time = time constant (sec) for gate to close (e.g., 0.020 s = 20 ms) References http://en.wikipedia.org/wiki/Noise_gate http://www.soundonsound.com/sos/apr01/articles/advanced.asp http://en.wikipedia.org/wiki/Gating_(sound_engineering) (ef.)gate_stereo Stereo signal gates. gate_stereo is a standard Faust function. Usage _,_ : gate_stereo(thresh,att,hold,rel) : _,_ Where: thresh : dB level threshold above which gate opens (e.g., -60 dB) att : attack time = time constant (sec) for gate to open (e.g., 0.0001 s = 0.1 ms) hold : hold time = time (sec) gate stays open after signal level < thresh (e.g., 0.1 s) rel : release time = time constant (sec) for gate to close (e.g., 0.020 s = 20 ms) References http://en.wikipedia.org/wiki/Noise_gate http://www.soundonsound.com/sos/apr01/articles/advanced.asp http://en.wikipedia.org/wiki/Gating_(sound_engineering) Filtering (ef.)speakerbp Dirt-simple speaker simulator (overall bandpass eq with observed roll-offs above and below the passband). Low-frequency speaker model = +12 dB/octave slope breaking to flat near f1. Implemented using two dc blockers in series. High-frequency model = -24 dB/octave slope implemented using a fourth-order Butterworth lowpass. Example based on measured Celestion G12 (12\" speaker): speakerbp is a standard Faust function. Usage speakerbp(f1,f2) _ : speakerbp(130,5000) : _ (ef.)piano_dispersion_filter Piano dispersion allpass filter in closed form. Usage piano_dispersion_filter(M,B,f0) _ : piano_dispersion_filter(1,B,f0) : +(totalDelay),_ : fdelay(maxDelay) : _ Where: M : number of first-order allpass sections (compile-time only) Keep below 20. 8 is typical for medium-sized piano strings. B : string inharmonicity coefficient (0.0001 is typical) f0 : fundamental frequency in Hz Outputs MINUS the estimated delay at f0 of allpass chain in samples, provided in negative form to facilitate subtraction from delay-line length. Output signal from allpass chain Reference \"Dispersion Modeling in Waveguide Piano Synthesis Using Tunable Allpass Filters\", by Jukka Rauhala and Vesa Valimaki, DAFX-2006, pp. 71-76 http://lib.tkk.fi/Diss/2007/isbn9789512290666/article2.pdf An erratum in Eq. (7) is corrected in Dr. Rauhala's encompassing dissertation (and below). http://www.acoustics.hut.fi/research/asp/piano/ (ef.)stereo_width Stereo Width effect using the Blumlein Shuffler technique. stereo_width is a standard Faust function. Usage _,_ : stereo_width(w) : _,_ Where: w : stereo width between 0 and 1 At w=0 , the output signal is mono ((left+right)/2 in both channels). At w=1 , there is no effect (original stereo image). Thus, w between 0 and 1 varies stereo width from 0 to \"original\". Reference \"Applications of Blumlein Shuffling to Stereo Microphone Techniques\" Michael A. Gerzon, JAES vol. 42, no. 6, June 1994 Meshes (ef.)mesh_square Square Rectangular Digital Waveguide Mesh. Usage bus(4*N) : mesh_square(N) : bus(4*N) Where: N : number of nodes along each edge - a power of two (1,2,4,8,...) Reference https://ccrma.stanford.edu/~jos/pasp/Digital_Waveguide_Mesh.html Signal Order In and Out The mesh is constructed recursively using 2x2 embeddings. Thus, the top level of mesh_square(M) is a block 2x2 mesh, where each block is a mesh(M/2) . Let these blocks be numbered 1,2,3,4 in the geometry NW,NE,SW,SE, i.e., as: 1 2 3 4 Each block has four vector inputs and four vector outputs, where the length of each vector is M/2 . Label the input vectors as Ni,Ei,Wi,Si, i.e., as the inputs from the North, East South, and West, and similarly for the outputs. Then, for example, the upper left input block of M/2 signals is labeled 1Ni. Most of the connections are internal, such as 1Eo -> 2Wi. The 8*(M/2) input signals are grouped in the order: 1Ni 2Ni 3Si 4Si 1Wi 3Wi 2Ei 4Ei and the output signals are: 1No 1Wo 2No 2Eo 3So 3Wo 4So 4Eo or: In: 1No 1Wo 2No 2Eo 3So 3Wo 4So 4Eo Out: 1Ni 2Ni 3Si 4Si 1Wi 3Wi 2Ei 4Ei Thus, the inputs are grouped by direction N,S,W,E, while the outputs are grouped by block number 1,2,3,4, which can also be interpreted as directions NW, NE, SW, SE. A simple program illustrating these orderings is process = mesh_square(2); . Example Reflectively terminated mesh impulsed at one corner: mesh_square_test(N,x) = mesh_square(N)~(busi(4*N,x)) // input to corner with { busi(N,x) = bus(N) : par(i,N,*(-1)) : par(i,N-1,_), +(x); }; process = 1-1' : mesh_square_test(4); // all modes excited forever In this simple example, the mesh edges are connected as follows: 1No -> 1Ni, 1Wo -> 2Ni, 2No -> 3Si, 2Eo -> 4Si, 3So -> 1Wi, 3Wo -> 3Wi, 4So -> 2Ei, 4Eo -> 4Ei A routing matrix can be used to obtain other connection geometries. (ef.)reverseEchoN(nChans,delay) Reverse echo effect. Usage _ : ef.reverseEchoN(N,delay) : si.bus(N) Where: N : Number of output channels desired (1 or more) delay : echo delay (integer power of 2) Demo _ : dm.reverseEchoN(N) : _,_ Description The effect uses N instances of reverseDelayRamped at different phases. (ef.)reverseDelayRamped(delay,phase) Reverse delay with amplitude ramp. Usage _ : ef.reverseDelayRamped(delay,phase) : _ Where: delay : echo delay (integer power of 2) phase : float between 0 and 1 giving ramp delay phase*delay Demo _ : ef.reverseDelayRamped(32,0.6) : _,_ (ef.)uniformPanToStereo(nChans) Pan nChans channels to the stereo field, spread uniformly left to right. Usage si.bus(N) : ef.uniformPanToStereo(N) : _,_ Where: N : Number of input channels to pan down to stereo Demo _,_,_ : ef.uniformPanToStereo(3) : _,_ Mixing (ef.)dryWetMixer Linear dry-wet mixer for a N inputs and N outputs effect. Usage si.bus(inputs(FX)) : dryWetMixer(wetAmount, FX) : si.bus(inputs(FX)) Where: wetAmount : the wet amount (0-1). 0 produces only the dry signal and 1 produces only the wet signal FX : an arbitrary effect (N inputs and N outputs) to apply to the input bus (ef.)dryWetMixerConstantPower Constant-power dry-wet mixer for a N inputs and N outputs effect. Usage si.bus(inputs(FX)) : dryWetMixerConstantPower(wetAmount, FX) :si.bus(inputs(FX)) Where: wetAmount : the wet amount (0-1). 0 produces only the dry signal and 1 produces only the wet signal FX : an arbitrary effect (N inputs and N outputs) to apply to the input bus Time Based (ef.)echo A simple echo effect. echo is a standard Faust function. Usage _ : echo(maxDuration,duration,feedback) : _ Where: maxDuration : the max echo duration in seconds duration : the echo duration in seconds feedback : the feedback coefficient Pitch Shifting (ef.)transpose A simple pitch shifter based on 2 delay lines. transpose is a standard Faust function. Usage _ : transpose(w, x, s) : _ Where: w : the window length (samples) x : crossfade duration duration (samples) s : shift (semitones) Saturators (ef.)softclipQuadratic Quadratic softclip nonlinearity. Usage _ : softclipQuadratic : _; (ef.)wavefold Wavefolding nonlinearity. Usage _ : wavefold(width) : _; Where: width : The width of the folded section [0..1] (float).","title":" misceffects "},{"location":"libs/misceffects/#misceffectslib","text":"Collection of audio effects library. Its official prefix is ef . The library is organized into 7 sections: Dynamic Filtering Meshes Mixing Time Based Pitch Shifting Saturators","title":"misceffects.lib"},{"location":"libs/misceffects/#references","text":"https://github.com/grame-cncm/faustlibraries/blob/master/misceffects.lib","title":"References"},{"location":"libs/misceffects/#dynamic","text":"","title":"Dynamic"},{"location":"libs/misceffects/#efcubicnl","text":"Cubic nonlinearity distortion. cubicnl is a standard Faust function.","title":"(ef.)cubicnl"},{"location":"libs/misceffects/#usage","text":"_ : cubicnl(drive,offset) : _ _ : cubicnl_nodc(drive,offset) : _ Where: drive : distortion amount, between 0 and 1 offset : constant added before nonlinearity to give even harmonics. Note: offset can introduce a nonzero mean - feed cubicnl output to dcblocker to remove this.","title":"Usage:"},{"location":"libs/misceffects/#references_1","text":"https://ccrma.stanford.edu/~jos/pasp/Cubic_Soft_Clipper.html https://ccrma.stanford.edu/~jos/pasp/Nonlinear_Distortion.html","title":"References:"},{"location":"libs/misceffects/#efgate_mono","text":"Mono signal gate. gate_mono is a standard Faust function.","title":"(ef.)gate_mono"},{"location":"libs/misceffects/#usage_1","text":"_ : gate_mono(thresh,att,hold,rel) : _ Where: thresh : dB level threshold above which gate opens (e.g., -60 dB) att : attack time = time constant (sec) for gate to open (e.g., 0.0001 s = 0.1 ms) hold : hold time = time (sec) gate stays open after signal level < thresh (e.g., 0.1 s) rel : release time = time constant (sec) for gate to close (e.g., 0.020 s = 20 ms)","title":"Usage"},{"location":"libs/misceffects/#references_2","text":"http://en.wikipedia.org/wiki/Noise_gate http://www.soundonsound.com/sos/apr01/articles/advanced.asp http://en.wikipedia.org/wiki/Gating_(sound_engineering)","title":"References"},{"location":"libs/misceffects/#efgate_stereo","text":"Stereo signal gates. gate_stereo is a standard Faust function.","title":"(ef.)gate_stereo"},{"location":"libs/misceffects/#usage_2","text":"_,_ : gate_stereo(thresh,att,hold,rel) : _,_ Where: thresh : dB level threshold above which gate opens (e.g., -60 dB) att : attack time = time constant (sec) for gate to open (e.g., 0.0001 s = 0.1 ms) hold : hold time = time (sec) gate stays open after signal level < thresh (e.g., 0.1 s) rel : release time = time constant (sec) for gate to close (e.g., 0.020 s = 20 ms)","title":"Usage"},{"location":"libs/misceffects/#references_3","text":"http://en.wikipedia.org/wiki/Noise_gate http://www.soundonsound.com/sos/apr01/articles/advanced.asp http://en.wikipedia.org/wiki/Gating_(sound_engineering)","title":"References"},{"location":"libs/misceffects/#filtering","text":"","title":"Filtering"},{"location":"libs/misceffects/#efspeakerbp","text":"Dirt-simple speaker simulator (overall bandpass eq with observed roll-offs above and below the passband). Low-frequency speaker model = +12 dB/octave slope breaking to flat near f1. Implemented using two dc blockers in series. High-frequency model = -24 dB/octave slope implemented using a fourth-order Butterworth lowpass. Example based on measured Celestion G12 (12\" speaker): speakerbp is a standard Faust function.","title":"(ef.)speakerbp"},{"location":"libs/misceffects/#usage_3","text":"speakerbp(f1,f2) _ : speakerbp(130,5000) : _","title":"Usage"},{"location":"libs/misceffects/#efpiano_dispersion_filter","text":"Piano dispersion allpass filter in closed form.","title":"(ef.)piano_dispersion_filter"},{"location":"libs/misceffects/#usage_4","text":"piano_dispersion_filter(M,B,f0) _ : piano_dispersion_filter(1,B,f0) : +(totalDelay),_ : fdelay(maxDelay) : _ Where: M : number of first-order allpass sections (compile-time only) Keep below 20. 8 is typical for medium-sized piano strings. B : string inharmonicity coefficient (0.0001 is typical) f0 : fundamental frequency in Hz","title":"Usage"},{"location":"libs/misceffects/#outputs","text":"MINUS the estimated delay at f0 of allpass chain in samples, provided in negative form to facilitate subtraction from delay-line length. Output signal from allpass chain","title":"Outputs"},{"location":"libs/misceffects/#reference","text":"\"Dispersion Modeling in Waveguide Piano Synthesis Using Tunable Allpass Filters\", by Jukka Rauhala and Vesa Valimaki, DAFX-2006, pp. 71-76 http://lib.tkk.fi/Diss/2007/isbn9789512290666/article2.pdf An erratum in Eq. (7) is corrected in Dr. Rauhala's encompassing dissertation (and below). http://www.acoustics.hut.fi/research/asp/piano/","title":"Reference"},{"location":"libs/misceffects/#efstereo_width","text":"Stereo Width effect using the Blumlein Shuffler technique. stereo_width is a standard Faust function.","title":"(ef.)stereo_width"},{"location":"libs/misceffects/#usage_5","text":"_,_ : stereo_width(w) : _,_ Where: w : stereo width between 0 and 1 At w=0 , the output signal is mono ((left+right)/2 in both channels). At w=1 , there is no effect (original stereo image). Thus, w between 0 and 1 varies stereo width from 0 to \"original\".","title":"Usage"},{"location":"libs/misceffects/#reference_1","text":"\"Applications of Blumlein Shuffling to Stereo Microphone Techniques\" Michael A. Gerzon, JAES vol. 42, no. 6, June 1994","title":"Reference"},{"location":"libs/misceffects/#meshes","text":"","title":"Meshes"},{"location":"libs/misceffects/#efmesh_square","text":"Square Rectangular Digital Waveguide Mesh.","title":"(ef.)mesh_square"},{"location":"libs/misceffects/#usage_6","text":"bus(4*N) : mesh_square(N) : bus(4*N) Where: N : number of nodes along each edge - a power of two (1,2,4,8,...)","title":"Usage"},{"location":"libs/misceffects/#reference_2","text":"https://ccrma.stanford.edu/~jos/pasp/Digital_Waveguide_Mesh.html","title":"Reference"},{"location":"libs/misceffects/#signal-order-in-and-out","text":"The mesh is constructed recursively using 2x2 embeddings. Thus, the top level of mesh_square(M) is a block 2x2 mesh, where each block is a mesh(M/2) . Let these blocks be numbered 1,2,3,4 in the geometry NW,NE,SW,SE, i.e., as: 1 2 3 4 Each block has four vector inputs and four vector outputs, where the length of each vector is M/2 . Label the input vectors as Ni,Ei,Wi,Si, i.e., as the inputs from the North, East South, and West, and similarly for the outputs. Then, for example, the upper left input block of M/2 signals is labeled 1Ni. Most of the connections are internal, such as 1Eo -> 2Wi. The 8*(M/2) input signals are grouped in the order: 1Ni 2Ni 3Si 4Si 1Wi 3Wi 2Ei 4Ei and the output signals are: 1No 1Wo 2No 2Eo 3So 3Wo 4So 4Eo or: In: 1No 1Wo 2No 2Eo 3So 3Wo 4So 4Eo Out: 1Ni 2Ni 3Si 4Si 1Wi 3Wi 2Ei 4Ei Thus, the inputs are grouped by direction N,S,W,E, while the outputs are grouped by block number 1,2,3,4, which can also be interpreted as directions NW, NE, SW, SE. A simple program illustrating these orderings is process = mesh_square(2); .","title":"Signal Order In and Out"},{"location":"libs/misceffects/#example","text":"Reflectively terminated mesh impulsed at one corner: mesh_square_test(N,x) = mesh_square(N)~(busi(4*N,x)) // input to corner with { busi(N,x) = bus(N) : par(i,N,*(-1)) : par(i,N-1,_), +(x); }; process = 1-1' : mesh_square_test(4); // all modes excited forever In this simple example, the mesh edges are connected as follows: 1No -> 1Ni, 1Wo -> 2Ni, 2No -> 3Si, 2Eo -> 4Si, 3So -> 1Wi, 3Wo -> 3Wi, 4So -> 2Ei, 4Eo -> 4Ei A routing matrix can be used to obtain other connection geometries.","title":"Example"},{"location":"libs/misceffects/#efreverseechonnchansdelay","text":"Reverse echo effect.","title":"(ef.)reverseEchoN(nChans,delay)"},{"location":"libs/misceffects/#usage_7","text":"_ : ef.reverseEchoN(N,delay) : si.bus(N) Where: N : Number of output channels desired (1 or more) delay : echo delay (integer power of 2)","title":"Usage"},{"location":"libs/misceffects/#demo","text":"_ : dm.reverseEchoN(N) : _,_","title":"Demo"},{"location":"libs/misceffects/#description","text":"The effect uses N instances of reverseDelayRamped at different phases.","title":"Description"},{"location":"libs/misceffects/#efreversedelayrampeddelayphase","text":"Reverse delay with amplitude ramp.","title":"(ef.)reverseDelayRamped(delay,phase)"},{"location":"libs/misceffects/#usage_8","text":"_ : ef.reverseDelayRamped(delay,phase) : _ Where: delay : echo delay (integer power of 2) phase : float between 0 and 1 giving ramp delay phase*delay","title":"Usage"},{"location":"libs/misceffects/#demo_1","text":"_ : ef.reverseDelayRamped(32,0.6) : _,_","title":"Demo"},{"location":"libs/misceffects/#efuniformpantostereonchans","text":"Pan nChans channels to the stereo field, spread uniformly left to right.","title":"(ef.)uniformPanToStereo(nChans)"},{"location":"libs/misceffects/#usage_9","text":"si.bus(N) : ef.uniformPanToStereo(N) : _,_ Where: N : Number of input channels to pan down to stereo","title":"Usage"},{"location":"libs/misceffects/#demo_2","text":"_,_,_ : ef.uniformPanToStereo(3) : _,_","title":"Demo"},{"location":"libs/misceffects/#mixing","text":"","title":"Mixing"},{"location":"libs/misceffects/#efdrywetmixer","text":"Linear dry-wet mixer for a N inputs and N outputs effect.","title":"(ef.)dryWetMixer"},{"location":"libs/misceffects/#usage_10","text":"si.bus(inputs(FX)) : dryWetMixer(wetAmount, FX) : si.bus(inputs(FX)) Where: wetAmount : the wet amount (0-1). 0 produces only the dry signal and 1 produces only the wet signal FX : an arbitrary effect (N inputs and N outputs) to apply to the input bus","title":"Usage"},{"location":"libs/misceffects/#efdrywetmixerconstantpower","text":"Constant-power dry-wet mixer for a N inputs and N outputs effect.","title":"(ef.)dryWetMixerConstantPower"},{"location":"libs/misceffects/#usage_11","text":"si.bus(inputs(FX)) : dryWetMixerConstantPower(wetAmount, FX) :si.bus(inputs(FX)) Where: wetAmount : the wet amount (0-1). 0 produces only the dry signal and 1 produces only the wet signal FX : an arbitrary effect (N inputs and N outputs) to apply to the input bus","title":"Usage"},{"location":"libs/misceffects/#time-based","text":"","title":"Time Based"},{"location":"libs/misceffects/#efecho","text":"A simple echo effect. echo is a standard Faust function.","title":"(ef.)echo"},{"location":"libs/misceffects/#usage_12","text":"_ : echo(maxDuration,duration,feedback) : _ Where: maxDuration : the max echo duration in seconds duration : the echo duration in seconds feedback : the feedback coefficient","title":"Usage"},{"location":"libs/misceffects/#pitch-shifting","text":"","title":"Pitch Shifting"},{"location":"libs/misceffects/#eftranspose","text":"A simple pitch shifter based on 2 delay lines. transpose is a standard Faust function.","title":"(ef.)transpose"},{"location":"libs/misceffects/#usage_13","text":"_ : transpose(w, x, s) : _ Where: w : the window length (samples) x : crossfade duration duration (samples) s : shift (semitones)","title":"Usage"},{"location":"libs/misceffects/#saturators","text":"","title":"Saturators"},{"location":"libs/misceffects/#efsoftclipquadratic","text":"Quadratic softclip nonlinearity.","title":"(ef.)softclipQuadratic"},{"location":"libs/misceffects/#usage_14","text":"_ : softclipQuadratic : _;","title":"Usage"},{"location":"libs/misceffects/#efwavefold","text":"Wavefolding nonlinearity.","title":"(ef.)wavefold"},{"location":"libs/misceffects/#usage_15","text":"_ : wavefold(width) : _; Where: width : The width of the folded section [0..1] (float).","title":"Usage"},{"location":"libs/noises/","text":"noises.lib Faust Noise Generator Library. Its official prefix is no . References https://github.com/grame-cncm/faustlibraries/blob/master/noises.lib Functions Reference (no.)noise White noise generator (outputs random number between -1 and 1). noise is a standard Faust function. Usage noise : _ (no.)multirandom Generates multiple decorrelated random numbers in parallel. Usage multirandom(N) : si.bus(N) Where: N : the number of decorrelated random numbers in parallel, a constant numerical expression (no.)multinoise Generates multiple decorrelated noises in parallel. Usage multinoise(N) : si.bus(N) Where: N : the number of decorrelated random numbers in parallel, a constant numerical expression (no.)noises A convenient wrapper around multinoise. Usage noises(N,i) : _ Where: N : the number of decorrelated random numbers in parallel, a constant numerical expression i : the selected random number (i in [0..N[) (no.)randomseed A random seed based on the foreign function arc4random (see man arc4random). Used in rnoise , rmultirandom , etc. to avoid having the same pseudo random sequence at each run. WARNING: using the foreign function arc4random , so only available in C/C++ and LLVM backends. Usage randomseed : _ (no.)rnoise A randomized white noise generator (outputs random number between -1 and 1). WARNING: using the foreign function arc4random , so only available in C/C++ and LLVM backends. Usage rnoise : _ (no.)rmultirandom Generates multiple decorrelated random numbers in parallel. WARNING: using the foreign function arc4random , so only available in C/C++ and LLVM backends. Usage rmultirandom(N) : _ Where: N : the number of decorrelated random numbers in parallel, a constant numerical expression (no.)rmultinoise Generates multiple decorrelated noises in parallel. WARNING: using the foreign function arc4random , so only available in C/C++ and LLVM backends. Usage rmultinoise(N) : _ Where: N : the number of decorrelated random numbers in parallel, a constant numerical expression (no.)rnoises A convenient wrapper around rmultinoise. WARNING: using the foreign function arc4random , so only available in C/C++ and LLVM backends. Usage rnoises(N,i) : _ Where: N : the number of decorrelated random numbers in parallel i : the selected random number (i in [0..N[) (no.)pink_noise Pink noise (1/f noise) generator (third-order approximation covering the audio band well). pink_noise is a standard Faust function. Usage pink_noise : _ Reference https://ccrma.stanford.edu/~jos/sasp/Example_Synthesis_1_F_Noise.html Alternatives Higher-order approximations covering any frequency band can be obtained using no.noise : fi.spectral_tilt(order,lowerBandLimit,Bandwidth,p) where p=-0.5 means filter rolloff f^(-1/2) which gives 1/f rolloff in the power spectral density, and can be changed to other real values. Example // pink_noise_compare.dsp - compare three pinking filters process = pink_noises with { f0 = 35; // Lower bandlimit in Hz bw3 = 0.7 * ma.SR/2.0 - f0; // Bandwidth in Hz, 3rd order case bw9 = 0.8 * ma.SR/2.0 - f0; // Bandwidth in Hz, 9th order case pink_tilt_3 = fi.spectral_tilt(3,f0,bw3,-0.5); pink_tilt_9 = fi.spectral_tilt(9,f0,bw9,-0.5); pink_noises = 1-1' <: no.pink_filter, // original designed by invfreqz in Octave pink_tilt_3, // newer method using the same filter order pink_tilt_9; // newer method using a higher filter order }; Output of Example faust2octave pink_noise_compare.dsp Octave:1> semilogx(20*log10(abs(fft(faustout,8192))(1:4096,:))); ... (no.)pink_noise_vm Multi pink noise generator. Usage pink_noise_vm(N) : _ Where: N : number of latched white-noise processes to sum, not to exceed sizeof(int) in C++ (typically 32). References http://www.dsprelated.com/showarticle/908.php http://www.firstpr.com.au/dsp/pink-noise/#Voss-McCartney (no.)lfnoise , (no.)lfnoise0 and (no.)lfnoiseN Low-frequency noise generators (Butterworth-filtered downsampled white noise). Usage lfnoise0(rate) : _ // new random number every int(SR/rate) samples or so lfnoiseN(N,rate) : _ // same as \"lfnoise0(rate) : lowpass(N,rate)\" [see filters.lib] lfnoise(rate) : _ // same as \"lfnoise0(rate) : seq(i,5,lowpass(N,rate))\" (no overshoot) Example (view waveforms in faust2octave): rate = SR/100.0; // new random value every 100 samples (SR from music.lib) process = lfnoise0(rate), // sampled/held noise (piecewise constant) lfnoiseN(3,rate), // lfnoise0 smoothed by 3rd order Butterworth LPF lfnoise(rate); // lfnoise0 smoothed with no overshoot (no.)sparse_noise Sparse noise generator. Usage sparse_noise(f0) : _ Where: f0 : average frequency of noise impulses per second Random impulses in the amplitude range -1 to 1 are generated at an average rate of f0 impulses per second. Reference See velvet_noise (no.)velvet_noise_vm Velvet noise generator. Usage velvet_noise(amp, f0) : _ Where: amp : amplitude of noise impulses (positive and negative) f0 : average frequency of noise impulses per second Reference Matti Karjalainen and Hanna Jarvelainen, \"Reverberation Modeling Using Velvet Noise\", in Proc. 30th Int. Conf. Intelligent Audio Environments (AES07), March 2007. (no.)gnoise Approximate zero-mean, unit-variance Gaussian white noise generator. Usage gnoise(N) : _ Where: N : number of uniform random numbers added to approximate Gaussian white noise Reference See Central Limit Theorem (no.)colored_noise Generates a colored noise signal with an arbitrary spectral roll-off factor (alpha) over the entire audible frequency range (20-20000 Hz). The output is normalized so that an equal RMS level is maintained for different values of alpha. Usage colored_noise(N,alpha) : _ Where: N : desired integer filter order (constant numerical expression) alpha : slope of roll-off, between -1 and 1. -1 corresponds to brown/red noise, -1/2 pink noise, 0 white noise, 1/2 blue noise, and 1 violet/azure noise. Examples See dm.colored_noise_demo .","title":" noises "},{"location":"libs/noises/#noiseslib","text":"Faust Noise Generator Library. Its official prefix is no .","title":"noises.lib"},{"location":"libs/noises/#references","text":"https://github.com/grame-cncm/faustlibraries/blob/master/noises.lib","title":"References"},{"location":"libs/noises/#functions-reference","text":"","title":"Functions Reference"},{"location":"libs/noises/#nonoise","text":"White noise generator (outputs random number between -1 and 1). noise is a standard Faust function.","title":"(no.)noise"},{"location":"libs/noises/#usage","text":"noise : _","title":"Usage"},{"location":"libs/noises/#nomultirandom","text":"Generates multiple decorrelated random numbers in parallel.","title":"(no.)multirandom"},{"location":"libs/noises/#usage_1","text":"multirandom(N) : si.bus(N) Where: N : the number of decorrelated random numbers in parallel, a constant numerical expression","title":"Usage"},{"location":"libs/noises/#nomultinoise","text":"Generates multiple decorrelated noises in parallel.","title":"(no.)multinoise"},{"location":"libs/noises/#usage_2","text":"multinoise(N) : si.bus(N) Where: N : the number of decorrelated random numbers in parallel, a constant numerical expression","title":"Usage"},{"location":"libs/noises/#nonoises","text":"A convenient wrapper around multinoise.","title":"(no.)noises"},{"location":"libs/noises/#usage_3","text":"noises(N,i) : _ Where: N : the number of decorrelated random numbers in parallel, a constant numerical expression i : the selected random number (i in [0..N[)","title":"Usage"},{"location":"libs/noises/#norandomseed","text":"A random seed based on the foreign function arc4random (see man arc4random). Used in rnoise , rmultirandom , etc. to avoid having the same pseudo random sequence at each run. WARNING: using the foreign function arc4random , so only available in C/C++ and LLVM backends.","title":"(no.)randomseed"},{"location":"libs/noises/#usage_4","text":"randomseed : _","title":"Usage"},{"location":"libs/noises/#nornoise","text":"A randomized white noise generator (outputs random number between -1 and 1). WARNING: using the foreign function arc4random , so only available in C/C++ and LLVM backends.","title":"(no.)rnoise"},{"location":"libs/noises/#usage_5","text":"rnoise : _","title":"Usage"},{"location":"libs/noises/#normultirandom","text":"Generates multiple decorrelated random numbers in parallel. WARNING: using the foreign function arc4random , so only available in C/C++ and LLVM backends.","title":"(no.)rmultirandom"},{"location":"libs/noises/#usage_6","text":"rmultirandom(N) : _ Where: N : the number of decorrelated random numbers in parallel, a constant numerical expression","title":"Usage"},{"location":"libs/noises/#normultinoise","text":"Generates multiple decorrelated noises in parallel. WARNING: using the foreign function arc4random , so only available in C/C++ and LLVM backends.","title":"(no.)rmultinoise"},{"location":"libs/noises/#usage_7","text":"rmultinoise(N) : _ Where: N : the number of decorrelated random numbers in parallel, a constant numerical expression","title":"Usage"},{"location":"libs/noises/#nornoises","text":"A convenient wrapper around rmultinoise. WARNING: using the foreign function arc4random , so only available in C/C++ and LLVM backends.","title":"(no.)rnoises"},{"location":"libs/noises/#usage_8","text":"rnoises(N,i) : _ Where: N : the number of decorrelated random numbers in parallel i : the selected random number (i in [0..N[)","title":"Usage"},{"location":"libs/noises/#nopink_noise","text":"Pink noise (1/f noise) generator (third-order approximation covering the audio band well). pink_noise is a standard Faust function.","title":"(no.)pink_noise"},{"location":"libs/noises/#usage_9","text":"pink_noise : _","title":"Usage"},{"location":"libs/noises/#reference","text":"https://ccrma.stanford.edu/~jos/sasp/Example_Synthesis_1_F_Noise.html","title":"Reference"},{"location":"libs/noises/#alternatives","text":"Higher-order approximations covering any frequency band can be obtained using no.noise : fi.spectral_tilt(order,lowerBandLimit,Bandwidth,p) where p=-0.5 means filter rolloff f^(-1/2) which gives 1/f rolloff in the power spectral density, and can be changed to other real values.","title":"Alternatives"},{"location":"libs/noises/#example","text":"// pink_noise_compare.dsp - compare three pinking filters process = pink_noises with { f0 = 35; // Lower bandlimit in Hz bw3 = 0.7 * ma.SR/2.0 - f0; // Bandwidth in Hz, 3rd order case bw9 = 0.8 * ma.SR/2.0 - f0; // Bandwidth in Hz, 9th order case pink_tilt_3 = fi.spectral_tilt(3,f0,bw3,-0.5); pink_tilt_9 = fi.spectral_tilt(9,f0,bw9,-0.5); pink_noises = 1-1' <: no.pink_filter, // original designed by invfreqz in Octave pink_tilt_3, // newer method using the same filter order pink_tilt_9; // newer method using a higher filter order };","title":"Example"},{"location":"libs/noises/#output-of-example","text":"faust2octave pink_noise_compare.dsp Octave:1> semilogx(20*log10(abs(fft(faustout,8192))(1:4096,:))); ...","title":"Output of Example"},{"location":"libs/noises/#nopink_noise_vm","text":"Multi pink noise generator.","title":"(no.)pink_noise_vm"},{"location":"libs/noises/#usage_10","text":"pink_noise_vm(N) : _ Where: N : number of latched white-noise processes to sum, not to exceed sizeof(int) in C++ (typically 32).","title":"Usage"},{"location":"libs/noises/#references_1","text":"http://www.dsprelated.com/showarticle/908.php http://www.firstpr.com.au/dsp/pink-noise/#Voss-McCartney","title":"References"},{"location":"libs/noises/#nolfnoise-nolfnoise0-and-nolfnoisen","text":"Low-frequency noise generators (Butterworth-filtered downsampled white noise).","title":"(no.)lfnoise, (no.)lfnoise0 and (no.)lfnoiseN"},{"location":"libs/noises/#usage_11","text":"lfnoise0(rate) : _ // new random number every int(SR/rate) samples or so lfnoiseN(N,rate) : _ // same as \"lfnoise0(rate) : lowpass(N,rate)\" [see filters.lib] lfnoise(rate) : _ // same as \"lfnoise0(rate) : seq(i,5,lowpass(N,rate))\" (no overshoot)","title":"Usage"},{"location":"libs/noises/#example_1","text":"(view waveforms in faust2octave): rate = SR/100.0; // new random value every 100 samples (SR from music.lib) process = lfnoise0(rate), // sampled/held noise (piecewise constant) lfnoiseN(3,rate), // lfnoise0 smoothed by 3rd order Butterworth LPF lfnoise(rate); // lfnoise0 smoothed with no overshoot","title":"Example"},{"location":"libs/noises/#nosparse_noise","text":"Sparse noise generator.","title":"(no.)sparse_noise"},{"location":"libs/noises/#usage_12","text":"sparse_noise(f0) : _ Where: f0 : average frequency of noise impulses per second Random impulses in the amplitude range -1 to 1 are generated at an average rate of f0 impulses per second.","title":"Usage"},{"location":"libs/noises/#reference_1","text":"See velvet_noise","title":"Reference"},{"location":"libs/noises/#novelvet_noise_vm","text":"Velvet noise generator.","title":"(no.)velvet_noise_vm"},{"location":"libs/noises/#usage_13","text":"velvet_noise(amp, f0) : _ Where: amp : amplitude of noise impulses (positive and negative) f0 : average frequency of noise impulses per second","title":"Usage"},{"location":"libs/noises/#reference_2","text":"Matti Karjalainen and Hanna Jarvelainen, \"Reverberation Modeling Using Velvet Noise\", in Proc. 30th Int. Conf. Intelligent Audio Environments (AES07), March 2007.","title":"Reference"},{"location":"libs/noises/#nognoise","text":"Approximate zero-mean, unit-variance Gaussian white noise generator.","title":"(no.)gnoise"},{"location":"libs/noises/#usage_14","text":"gnoise(N) : _ Where: N : number of uniform random numbers added to approximate Gaussian white noise","title":"Usage"},{"location":"libs/noises/#reference_3","text":"See Central Limit Theorem","title":"Reference"},{"location":"libs/noises/#nocolored_noise","text":"Generates a colored noise signal with an arbitrary spectral roll-off factor (alpha) over the entire audible frequency range (20-20000 Hz). The output is normalized so that an equal RMS level is maintained for different values of alpha.","title":"(no.)colored_noise"},{"location":"libs/noises/#usage_15","text":"colored_noise(N,alpha) : _ Where: N : desired integer filter order (constant numerical expression) alpha : slope of roll-off, between -1 and 1. -1 corresponds to brown/red noise, -1/2 pink noise, 0 white noise, 1/2 blue noise, and 1 violet/azure noise.","title":"Usage"},{"location":"libs/noises/#examples","text":"See dm.colored_noise_demo .","title":"Examples"},{"location":"libs/oscillators/","text":"oscillators.lib This library contains a collection of sound generators. Its official prefix is os . The oscillators library is organized into 9 sections: Wave-Table-Based Oscillators Low Frequency Oscillators Low Frequency Sawtooths Alias-Suppressed Sawtooth Alias-Suppressed Pulse, Square, and Impulse Trains Filter-Based Oscillators Waveguide-Resonator-Based Oscillators Casio CZ Oscillators PolyBLEP-Based Oscillators References https://github.com/grame-cncm/faustlibraries/blob/master/oscillators.lib Wave-Table-Based Oscillators (os.)sinwaveform Sine waveform ready to use with a rdtable . Usage sinwaveform(tablesize) : _ Where: tablesize : the table size (os.)coswaveform Cosine waveform ready to use with a rdtable . Usage coswaveform(tablesize) : _ Where: tablesize : the table size (os.)phasor A simple phasor to be used with a rdtable . phasor is a standard Faust function. Usage phasor(tablesize,freq) : _ Where: tablesize : the table size freq : the frequency in Hz (os.)hs_phasor Hardsyncing phasor to be used with a rdtable . Usage hs_phasor(tablesize,freq,reset) : _ Where: tablesize : the table size freq : the frequency in Hz reset : a reset signal, reset phase to 0 when equal to 1 (os.)hsp_phasor Hardsyncing phasor with selectable phase to be used with a rdtable . Usage hsp_phasor(tablesize,freq,reset,phase) Where: tablesize : the table size freq : the frequency in Hz reset : reset the oscillator to phase when equal to 1 phase : phase between 0 and 1 (os.)oscsin Sine wave oscillator. oscsin is a standard Faust function. Usage oscsin(freq) : _ Where: freq : the frequency in Hz (os.)hs_oscsin Sin lookup table with hardsyncing phase. Usage hs_oscsin(freq,reset) : _ Where: freq : the frequency in Hz reset : reset the oscillator to 0 when equal to 1 (os.)osccos Cosine wave oscillator. Usage osccos(freq) : _ Where: freq : the frequency in Hz (os.)hs_osccos Cos lookup table with hardsyncing phase. Usage hs_osccos(freq,reset) : _ Where: freq : the frequency in Hz reset : reset the oscillator to 0 when equal to 1 (os.)oscp A sine wave generator with controllable phase. Usage oscp(freq,phase) : _ Where: freq : the frequency in Hz phase : the phase in radian (os.)osci Interpolated phase sine wave oscillator. Usage osci(freq) : _ Where: freq : the frequency in Hz (os.)osc Default sine wave oscillator (same as oscsin ). osc is a standard Faust function. Usage osc(freq) : _ Where: freq : the frequency in Hz Wave-Table-Based Oscillators Oscillators based on mathematical functions. (os.)m_oscsin Sine wave oscillator based on the sin mathematical function. Usage m_oscsin(freq) : _ Where: freq : the frequency in Hz (os.)m_osccos Sine wave oscillator based on the sin mathematical function. Usage m_osccos(freq) : _ Where: freq : the frequency in Hz Low Frequency Oscillators Low Frequency Oscillators (LFOs) have prefix lf_ (no aliasing suppression, since it is inaudible at LF). Use sawN and its derivatives for audio oscillators with suppressed aliasing. (os.)lf_imptrain Unit-amplitude low-frequency impulse train. lf_imptrain is a standard Faust function. Usage lf_imptrain(freq) : _ Where: freq : frequency in Hz (os.)lf_pulsetrainpos Unit-amplitude nonnegative LF pulse train, duty cycle between 0 and 1. Usage lf_pulsetrainpos(freq, duty) : _ Where: freq : frequency in Hz duty : duty cycle between 0 and 1 (os.)lf_pulsetrain Unit-amplitude zero-mean LF pulse train, duty cycle between 0 and 1. Usage lf_pulsetrain(freq,duty) : _ Where: freq : frequency in Hz duty : duty cycle between 0 and 1 (os.)lf_squarewavepos Positive LF square wave in [0,1] Usage lf_squarewavepos(freq) : _ Where: freq : frequency in Hz (os.)lf_squarewave Zero-mean unit-amplitude LF square wave. lf_squarewave is a standard Faust function. Usage lf_squarewave(freq) : _ Where: freq : frequency in Hz (os.)lf_trianglepos Positive unit-amplitude LF positive triangle wave. Usage lf_trianglepos(freq) : _ Where: freq : frequency in Hz (os.)lf_triangle Positive unit-amplitude LF triangle wave. lf_triangle is a standard Faust function. Usage lf_triangle(freq) : _ Where: freq : frequency in Hz Low Frequency Sawtooths Sawtooth waveform oscillators for virtual analog synthesis et al. The 'simple' versions ( lf_rawsaw , lf_sawpos and saw1 ), are mere samplings of the ideal continuous-time (\"analog\") waveforms. While simple, the aliasing due to sampling is quite audible. The differentiated polynomial waveform family ( saw2 , sawN , and derived functions) do some extra processing to suppress aliasing (not audible for very low fundamental frequencies). According to Lehtonen et al. (JASA 2012), the aliasing of saw2 should be inaudible at fundamental frequencies below 2 kHz or so, for a 44.1 kHz sampling rate and 60 dB SPL presentation level; fundamentals 415 and below required no aliasing suppression (i.e., saw1 is ok). (os.)lf_rawsaw Simple sawtooth waveform oscillator between 0 and period in samples. Usage lf_rawsaw(periodsamps) : _ Where: periodsamps : number of periods per samples (os.)lf_sawpos Simple sawtooth waveform oscillator between 0 and 1. Usage lf_sawpos(freq) : _ Where: freq : frequency in Hz (os.)lf_sawpos_phase Simple sawtooth waveform oscillator between 0 and 1 with phase control. Usage lf_sawpos_phase(freq, phase) : _ Where: freq : frequency in Hz phase : phase between 0 and 1 (os.)lf_sawpos_reset Simple sawtooth waveform oscillator between 0 and 1 with reset. Usage lf_sawpos_reset(freq,reset) : _ Where: freq : frequency in Hz reset : reset the oscillator to 0 when equal to 1 (os.)lf_sawpos_phase_reset Simple sawtooth waveform oscillator between 0 and 1 with phase control and reset. Usage lf_sawpos_phase_reset(freq,phase,reset) : _ Where: freq : frequency in Hz phase : phase between 0 and 1 reset : reset the oscillator to phase when equal to 1 (os.)lf_saw Simple sawtooth waveform oscillator between -1 and 1. lf_saw is a standard Faust function. Usage lf_saw(freq) : _ Where: freq : frequency in Hz Alias-Suppressed Sawtooth (os.)sawN Alias-Suppressed Sawtooth Audio-Frequency Oscillator using Nth-order polynomial transitions to reduce aliasing. sawN(N,freq) , sawNp(N,freq,phase) , saw2dpw(freq) , saw2(freq) , saw3(freq) , saw4(freq) , sawtooth(freq) , saw2f2(freq) , saw2f4(freq) Usage sawN(N,freq) : _ // Nth-order aliasing-suppressed sawtooth using DPW method (see below) sawNp(N,freq,phase) : _ // sawN with phase offset feature saw2dpw(freq) : _ // saw2 using DPW saw2ptr(freq) : _ // saw2 using the faster, stateless PTR method saw2(freq) : _ // DPW method, but subject to change if a better method emerges saw3(freq) : _ // sawN(3) saw4(freq) : _ // sawN(4) sawtooth(freq) : _ // saw2 saw2f2(freq) : _ // saw2dpw with 2nd-order droop-correction filtering saw2f4(freq) : _ // saw2dpw with 4th-order droop-correction filtering Where: N : polynomial order, a constant numerical expression between 1 and 4 freq : frequency in Hz phase : phase between 0 and 1 Method Differentiated Polynomial Wave (DPW). Reference \"Alias-Suppressed Oscillators based on Differentiated Polynomial Waveforms\", Vesa Valimaki, Juhan Nam, Julius Smith, and Jonathan Abel, IEEE Tr. Audio, Speech, and Language Processing (IEEE-ASLP), Vol. 18, no. 5, pp 786-798, May 2010. 10.1109/TASL.2009.2026507. Notes The polynomial order N is limited to 4 because noise has been observed at very low freq values. (LFO sawtooths should of course be generated using lf_sawpos instead.) (os.)sawNp Same as (os.)sawN but with a controllable waveform phase. Usage sawNp(N,freq,phase) : _ where N : waveform interpolation polynomial order 1 to 4 (constant integer expression) freq : frequency in Hz phase : waveform phase as a fraction of one period (rounded to nearest sample) Implementation Notes The phase offset is implemented by delaying sawN(N,freq) by round(phase*ma.SR/freq) samples, for up to 8191 samples. The minimum sawtooth frequency that can be delayed a whole period is therefore ma.SR/8191 , which is well below audibility for normal audio sampling rates. (os.)saw2, (os.)saw3, (os.)saw4 Alias-Suppressed Sawtooth Audio-Frequency Oscillators of order 2, 3, 4. Usage saw2(freq) : _ saw3(freq) : _ saw4(freq) : _ where freq : frequency in Hz References See sawN above. Implementation Notes Presently, only saw2 uses the PTR method, while saw3 and saw4 use DPW. This is because PTR has been implemented and tested for the 2nd-order case only. (os.)saw2ptr Alias-Suppressed Sawtooth Audio-Frequency Oscillator using Polynomial Transition Regions (PTR) for order 2. Usage saw2ptr(freq) : _ where freq : frequency in Hz Implementation Polynomial Transition Regions (PTR) method for aliasing suppression. References Kleimola, J.; Valimaki, V., \"Reducing Aliasing from Synthetic Audio Signals Using Polynomial Transition Regions,\" in Signal Processing Letters, IEEE , vol.19, no.2, pp.67-70, Feb. 2012 https://aaltodoc.aalto.fi/bitstream/handle/123456789/7747/publication6.pdf?sequence=9 http://research.spa.aalto.fi/publications/papers/spl-ptr/ Notes Method PTR may be preferred because it requires less computation and is stateless which means that the frequency freq can be modulated arbitrarily fast over time without filtering artifacts. For this reason, saw2 is presently defined as saw2ptr . (os.)saw2dpw Alias-Suppressed Sawtooth Audio-Frequency Oscillator using the Differentiated Polynomial Waveform (DWP) method. Usage saw2dpw(freq) : _ where freq : frequency in Hz This is the original Faust saw2 function using the DPW method. Since saw2 is now defined as saw2ptr , the DPW version is now available as saw2dwp . (os.)sawtooth Alias-suppressed aliasing-suppressed sawtooth oscillator, presently defined as saw2 . sawtooth is a standard Faust function. Usage sawtooth(freq) : _ with freq : frequency in Hz (os.)saw2f2, (os.)saw2f4 Alias-Suppressed Sawtooth Audio-Frequency Oscillator with Order 2 or 4 Droop Correction Filtering. Usage saw2f2(freq) : _ saw2f4(freq) : _ with freq : frequency in Hz In return for aliasing suppression, there is some attenuation near half the sampling rate. This can be considered as beneficial, or it can be compensated with a high-frequency boost. The boost filter is second-order for saw2f2 and fourth-order for saw2f4 , and both are designed for the DWP case and therefore use saw2dpw . See Figure 4(b) in the DPW reference for a plot of the slight droop in the DPW case. Alias-Suppressed Pulse, Square, and Impulse Trains Alias-Suppressed Pulse, Square and Impulse Trains. pulsetrainN , pulsetrain , squareN , square , imptrainN , imptrain , triangleN , triangle All are zero-mean and meant to oscillate in the audio frequency range. Use simpler sample-rounded lf_* versions above for LFOs. Usage pulsetrainN(N,freq,duty) : _ pulsetrain(freq, duty) : _ // = pulsetrainN(2) squareN(N,freq) : _ square : _ // = squareN(2) imptrainN(N,freq) : _ imptrain : _ // = imptrainN(2) triangleN(N,freq) : _ triangle : _ // = triangleN(2) Where: N : polynomial order, a constant numerical expression freq : frequency in Hz (os.)impulse One-time impulse generated when the Faust process is started. impulse is a standard Faust function. Usage impulse : _ (os.)pulsetrainN Alias-suppressed pulse train oscillator. Usage pulsetrainN(N,freq,duty) : _ Where: N : order, as a constant numerical expression freq : frequency in Hz duty : duty cycle between 0 and 1 (os.)pulsetrain Alias-suppressed pulse train oscillator. Based on pulsetrainN(2) . pulsetrain is a standard Faust function. Usage pulsetrain(freq,duty) : _ Where: freq : frequency in Hz duty : duty cycle between 0 and 1 (os.)squareN Alias-suppressed square wave oscillator. Usage squareN(N,freq) : _ Where: N : order, as a constant numerical expression freq : frequency in Hz (os.)square Alias-suppressed square wave oscillator. Based on squareN(2) . square is a standard Faust function. Usage square(freq) : _ Where: freq : frequency in Hz (os.)imptrainN Alias-suppressed impulse train generator. Usage imptrainN(N,freq) : _ Where: N : order, as a constant numerical expression freq : frequency in Hz (os.)imptrain Alias-suppressed impulse train generator. Based on imptrainN(2) . imptrain is a standard Faust function. Usage imptrain(freq) : _ Where: freq : frequency in Hz (os.)triangleN Alias-suppressed triangle wave oscillator. Usage triangleN(N,freq) : _ Where: N : order, as a constant numerical expression freq : frequency in Hz (os.)triangle Alias-suppressed triangle wave oscillator. Based on triangleN(2) . triangle is a standard Faust function. Usage triangle(freq) : _ Where: freq : frequency in Hz Filter-Based Oscillators Filter-Based Oscillators. Usage osc[b|rq|rs|rc|s](freq), where freq = frequency in Hz. References http://lac.linuxaudio.org/2012/download/lac12-slides-jos.pdf https://ccrma.stanford.edu/~jos/pdf/lac12-paper-jos.pdf (os.)oscb Sinusoidal oscillator based on the biquad. Usage oscb(freq) : _ Where: freq : frequency in Hz (os.)oscrq Sinusoidal (sine and cosine) oscillator based on 2D vector rotation, = undamped \"coupled-form\" resonator = lossless 2nd-order normalized ladder filter. Usage oscrq(freq) : _,_ Where: freq : frequency in Hz Reference https://ccrma.stanford.edu/~jos/pasp/Normalized_Scattering_Junctions.html (os.)oscrs Sinusoidal (sine) oscillator based on 2D vector rotation, = undamped \"coupled-form\" resonator = lossless 2nd-order normalized ladder filter. Usage oscrs(freq) : _ Where: freq : frequency in Hz Reference https://ccrma.stanford.edu/~jos/pasp/Normalized_Scattering_Junctions.html (os.)oscrc Sinusoidal (cosine) oscillator based on 2D vector rotation, = undamped \"coupled-form\" resonator = lossless 2nd-order normalized ladder filter. Usage oscrc(freq) : _ Where: freq : frequency in Hz Reference https://ccrma.stanford.edu/~jos/pasp/Normalized_Scattering_Junctions.html (os.)oscs Sinusoidal oscillator based on the state variable filter = undamped \"modified-coupled-form\" resonator = \"magic circle\" algorithm used in graphics. Usage oscs(freq) : _ Where: freq : frequency in Hz (os.)quadosc Sinusoidal oscillator based on QuadOsc by Martin Vicanek. Usage quadosc(freq) : _ where freq : frequency in Hz Reference https://vicanek.de/articles/QuadOsc.pdf Waveguide-Resonator-Based Oscillators Sinusoidal oscillator based on the waveguide resonator wgr . (os.)oscwc Sinusoidal oscillator based on the waveguide resonator wgr . Unit-amplitude cosine oscillator. Usage oscwc(freq) : _ Where: freq : frequency in Hz Reference https://ccrma.stanford.edu/~jos/pasp/Digital_Waveguide_Oscillator.html (os.)oscws Sinusoidal oscillator based on the waveguide resonator wgr . Unit-amplitude sine oscillator. Usage oscws(freq) : _ Where: freq : frequency in Hz Reference https://ccrma.stanford.edu/~jos/pasp/Digital_Waveguide_Oscillator.html (os.)oscq Sinusoidal oscillator based on the waveguide resonator wgr . Unit-amplitude cosine and sine (quadrature) oscillator. Usage oscq(freq) : _,_ Where: freq : frequency in Hz Reference https://ccrma.stanford.edu/~jos/pasp/Digital_Waveguide_Oscillator.html (os.)oscw Sinusoidal oscillator based on the waveguide resonator wgr . Unit-amplitude cosine oscillator (default). Usage oscw(freq) : _ Where: freq : frequency in Hz Reference https://ccrma.stanford.edu/~jos/pasp/Digital_Waveguide_Oscillator.html Casio CZ Oscillators Oscillators that mimic some of the Casio CZ oscillators. There are two sets: a set with an index parameter a set with a res parameter The \"index oscillators\" outputs a sine wave at index=0 and gets brighter with a higher index. There are two versions of the \"index oscillators\": with P appended to the name: is phase aligned with fund:sin without P appended to the name: has the phase of the original CZ oscillators The \"res oscillators\" have a resonant frequency. \"res\" is the frequency of resonance as a factor of the fundamental pitch. (os.)CZsaw Oscillator that mimics the Casio CZ saw oscillator. CZsaw is a standard Faust function. Usage CZsaw(fund,index) : _ Where: fund : a saw-tooth waveform between 0 and 1 that the oscillator slaves to index : the brightness of the oscillator, 0 to 1. 0 = sine-wave, 1 = saw-wave (os.)CZsawP Oscillator that mimics the Casio CZ saw oscillator, with it's phase aligned to fund:sin . CZsawP is a standard Faust function. Usage CZsawP(fund,index) : _ Where: fund : a saw-tooth waveform between 0 and 1 that the oscillator slaves to index : the brightness of the oscillator, 0 to 1. 0 = sine-wave, 1 = saw-wave (os.)CZsquare Oscillator that mimics the Casio CZ square oscillator CZsquare is a standard Faust function. Usage CZsquare(fund,index) : _ Where: fund : a saw-tooth waveform between 0 and 1 that the oscillator slaves to index : the brightness of the oscillator, 0 to 1. 0 = sine-wave, 1 = square-wave (os.)CZsquareP Oscillator that mimics the Casio CZ square oscillator, with it's phase aligned to fund:sin . CZsquareP is a standard Faust function. Usage CZsquareP(fund,index) : _ Where: fund : a saw-tooth waveform between 0 and 1 that the oscillator slaves to index : the brightness of the oscillator, 0 to 1. 0 = sine-wave, 1 = square-wave (os.)CZpulse Oscillator that mimics the Casio CZ pulse oscillator. CZpulse is a standard Faust function. Usage CZpulse(fund,index) : _ Where: fund : a saw-tooth waveform between 0 and 1 that the oscillator slaves to index : the brightness of the oscillator, 0 gives a sine-wave, 1 is closer to a pulse (os.)CZpulseP Oscillator that mimics the Casio CZ pulse oscillator, with it's phase aligned to fund:sin . CZpulseP is a standard Faust function. Usage CZpulseP(fund,index) : _ Where: fund : a saw-tooth waveform between 0 and 1 that the oscillator slaves to index : the brightness of the oscillator, 0 gives a sine-wave, 1 is closer to a pulse (os.)CZsinePulse Oscillator that mimics the Casio CZ sine/pulse oscillator. CZsinePulse is a standard Faust function. Usage CZsinePulse(fund,index) : _ Where: fund : a saw-tooth waveform between 0 and 1 that the oscillator slaves to index : the brightness of the oscillator, 0 gives a sine-wave, 1 is a sine minus a pulse (os.)CZsinePulseP Oscillator that mimics the Casio CZ sine/pulse oscillator, with it's phase aligned to fund:sin . CZsinePulseP is a standard Faust function. Usage CZsinePulseP(fund,index) : _ Where: fund : a saw-tooth waveform between 0 and 1 that the oscillator slaves to index : the brightness of the oscillator, 0 gives a sine-wave, 1 is a sine minus a pulse (os.)CZhalfSine Oscillator that mimics the Casio CZ half sine oscillator. CZhalfSine is a standard Faust function. Usage CZhalfSine(fund,index) : _ Where: fund : a saw-tooth waveform between 0 and 1 that the oscillator slaves to index : the brightness of the oscillator, 0 gives a sine-wave, 1 is somewhere between a saw and a square (os.)CZhalfSineP Oscillator that mimics the Casio CZ half sine oscillator, with it's phase aligned to fund:sin . CZhalfSineP is a standard Faust function. Usage CZhalfSineP(fund,index) : _ Where: fund : a saw-tooth waveform between 0 and 1 that the oscillator slaves to index : the brightness of the oscillator, 0 gives a sine-wave, 1 is somewhere between a saw and a square (os.)CZresSaw Oscillator that mimics the Casio CZ resonant sawtooth oscillator. CZresSaw is a standard Faust function. Usage CZresSaw(fund,res) : _ Where: fund : a saw-tooth waveform between 0 and 1 that the oscillator slaves to res : the frequency of resonance as a factor of the fundamental pitch. (os.)CZresTriangle Oscillator that mimics the Casio CZ resonant triangle oscillator. CZresTriangle is a standard Faust function. Usage CZresTriangle(fund,res) : _ Where: fund : a saw-tooth waveform between 0 and 1 that the oscillator slaves to res : the frequency of resonance as a factor of the fundamental pitch. (os.)CZresTrap Oscillator that mimics the Casio CZ resonant trapeze oscillator CZresTrap is a standard Faust function. Usage CZresTrap(fund,res) : _ Where: fund : a saw-tooth waveform between 0 and 1 that the oscillator slaves to res : the frequency of resonance as a factor of the fundamental pitch. PolyBLEP-Based Oscillators (os.)polyblep PolyBLEP residual function, used for smoothing steps in the audio signal. Usage polyblep(Q,phase) : _ Where: Q : smoothing factor between 0 and 0.5. Determines how far from the ends of the phase interval the quadratic function is used. phase : normalised phase (between 0 and 1) (os.)polyblep_saw Sawtooth oscillator with suppressed aliasing (using polyblep ). Usage polyblep_saw(freq) : _ Where: freq : frequency in Hz (os.)polyblep_square Square wave oscillator with suppressed aliasing (using polyblep ). Usage polyblep_square(freq) : _ Where: freq : frequency in Hz (os.)polyblep_triangle Triangle wave oscillator with suppressed aliasing (using polyblep ). Usage polyblep_triangle(freq) : _ Where: freq : frequency in Hz","title":" oscillators "},{"location":"libs/oscillators/#oscillatorslib","text":"This library contains a collection of sound generators. Its official prefix is os . The oscillators library is organized into 9 sections: Wave-Table-Based Oscillators Low Frequency Oscillators Low Frequency Sawtooths Alias-Suppressed Sawtooth Alias-Suppressed Pulse, Square, and Impulse Trains Filter-Based Oscillators Waveguide-Resonator-Based Oscillators Casio CZ Oscillators PolyBLEP-Based Oscillators","title":"oscillators.lib"},{"location":"libs/oscillators/#references","text":"https://github.com/grame-cncm/faustlibraries/blob/master/oscillators.lib","title":"References"},{"location":"libs/oscillators/#wave-table-based-oscillators","text":"","title":"Wave-Table-Based Oscillators"},{"location":"libs/oscillators/#ossinwaveform","text":"Sine waveform ready to use with a rdtable .","title":"(os.)sinwaveform"},{"location":"libs/oscillators/#usage","text":"sinwaveform(tablesize) : _ Where: tablesize : the table size","title":"Usage"},{"location":"libs/oscillators/#oscoswaveform","text":"Cosine waveform ready to use with a rdtable .","title":"(os.)coswaveform"},{"location":"libs/oscillators/#usage_1","text":"coswaveform(tablesize) : _ Where: tablesize : the table size","title":"Usage"},{"location":"libs/oscillators/#osphasor","text":"A simple phasor to be used with a rdtable . phasor is a standard Faust function.","title":"(os.)phasor"},{"location":"libs/oscillators/#usage_2","text":"phasor(tablesize,freq) : _ Where: tablesize : the table size freq : the frequency in Hz","title":"Usage"},{"location":"libs/oscillators/#oshs_phasor","text":"Hardsyncing phasor to be used with a rdtable .","title":"(os.)hs_phasor"},{"location":"libs/oscillators/#usage_3","text":"hs_phasor(tablesize,freq,reset) : _ Where: tablesize : the table size freq : the frequency in Hz reset : a reset signal, reset phase to 0 when equal to 1","title":"Usage"},{"location":"libs/oscillators/#oshsp_phasor","text":"Hardsyncing phasor with selectable phase to be used with a rdtable .","title":"(os.)hsp_phasor"},{"location":"libs/oscillators/#usage_4","text":"hsp_phasor(tablesize,freq,reset,phase) Where: tablesize : the table size freq : the frequency in Hz reset : reset the oscillator to phase when equal to 1 phase : phase between 0 and 1","title":"Usage"},{"location":"libs/oscillators/#ososcsin","text":"Sine wave oscillator. oscsin is a standard Faust function.","title":"(os.)oscsin"},{"location":"libs/oscillators/#usage_5","text":"oscsin(freq) : _ Where: freq : the frequency in Hz","title":"Usage"},{"location":"libs/oscillators/#oshs_oscsin","text":"Sin lookup table with hardsyncing phase.","title":"(os.)hs_oscsin"},{"location":"libs/oscillators/#usage_6","text":"hs_oscsin(freq,reset) : _ Where: freq : the frequency in Hz reset : reset the oscillator to 0 when equal to 1","title":"Usage"},{"location":"libs/oscillators/#ososccos","text":"Cosine wave oscillator.","title":"(os.)osccos"},{"location":"libs/oscillators/#usage_7","text":"osccos(freq) : _ Where: freq : the frequency in Hz","title":"Usage"},{"location":"libs/oscillators/#oshs_osccos","text":"Cos lookup table with hardsyncing phase.","title":"(os.)hs_osccos"},{"location":"libs/oscillators/#usage_8","text":"hs_osccos(freq,reset) : _ Where: freq : the frequency in Hz reset : reset the oscillator to 0 when equal to 1","title":"Usage"},{"location":"libs/oscillators/#ososcp","text":"A sine wave generator with controllable phase.","title":"(os.)oscp"},{"location":"libs/oscillators/#usage_9","text":"oscp(freq,phase) : _ Where: freq : the frequency in Hz phase : the phase in radian","title":"Usage"},{"location":"libs/oscillators/#ososci","text":"Interpolated phase sine wave oscillator.","title":"(os.)osci"},{"location":"libs/oscillators/#usage_10","text":"osci(freq) : _ Where: freq : the frequency in Hz","title":"Usage"},{"location":"libs/oscillators/#ososc","text":"Default sine wave oscillator (same as oscsin ). osc is a standard Faust function.","title":"(os.)osc"},{"location":"libs/oscillators/#usage_11","text":"osc(freq) : _ Where: freq : the frequency in Hz","title":"Usage"},{"location":"libs/oscillators/#wave-table-based-oscillators_1","text":"Oscillators based on mathematical functions.","title":"Wave-Table-Based Oscillators"},{"location":"libs/oscillators/#osm_oscsin","text":"Sine wave oscillator based on the sin mathematical function.","title":"(os.)m_oscsin"},{"location":"libs/oscillators/#usage_12","text":"m_oscsin(freq) : _ Where: freq : the frequency in Hz","title":"Usage"},{"location":"libs/oscillators/#osm_osccos","text":"Sine wave oscillator based on the sin mathematical function.","title":"(os.)m_osccos"},{"location":"libs/oscillators/#usage_13","text":"m_osccos(freq) : _ Where: freq : the frequency in Hz","title":"Usage"},{"location":"libs/oscillators/#low-frequency-oscillators","text":"Low Frequency Oscillators (LFOs) have prefix lf_ (no aliasing suppression, since it is inaudible at LF). Use sawN and its derivatives for audio oscillators with suppressed aliasing.","title":"Low Frequency Oscillators"},{"location":"libs/oscillators/#oslf_imptrain","text":"Unit-amplitude low-frequency impulse train. lf_imptrain is a standard Faust function.","title":"(os.)lf_imptrain"},{"location":"libs/oscillators/#usage_14","text":"lf_imptrain(freq) : _ Where: freq : frequency in Hz","title":"Usage"},{"location":"libs/oscillators/#oslf_pulsetrainpos","text":"Unit-amplitude nonnegative LF pulse train, duty cycle between 0 and 1.","title":"(os.)lf_pulsetrainpos"},{"location":"libs/oscillators/#usage_15","text":"lf_pulsetrainpos(freq, duty) : _ Where: freq : frequency in Hz duty : duty cycle between 0 and 1","title":"Usage"},{"location":"libs/oscillators/#oslf_pulsetrain","text":"Unit-amplitude zero-mean LF pulse train, duty cycle between 0 and 1.","title":"(os.)lf_pulsetrain"},{"location":"libs/oscillators/#usage_16","text":"lf_pulsetrain(freq,duty) : _ Where: freq : frequency in Hz duty : duty cycle between 0 and 1","title":"Usage"},{"location":"libs/oscillators/#oslf_squarewavepos","text":"Positive LF square wave in [0,1]","title":"(os.)lf_squarewavepos"},{"location":"libs/oscillators/#usage_17","text":"lf_squarewavepos(freq) : _ Where: freq : frequency in Hz","title":"Usage"},{"location":"libs/oscillators/#oslf_squarewave","text":"Zero-mean unit-amplitude LF square wave. lf_squarewave is a standard Faust function.","title":"(os.)lf_squarewave"},{"location":"libs/oscillators/#usage_18","text":"lf_squarewave(freq) : _ Where: freq : frequency in Hz","title":"Usage"},{"location":"libs/oscillators/#oslf_trianglepos","text":"Positive unit-amplitude LF positive triangle wave.","title":"(os.)lf_trianglepos"},{"location":"libs/oscillators/#usage_19","text":"lf_trianglepos(freq) : _ Where: freq : frequency in Hz","title":"Usage"},{"location":"libs/oscillators/#oslf_triangle","text":"Positive unit-amplitude LF triangle wave. lf_triangle is a standard Faust function.","title":"(os.)lf_triangle"},{"location":"libs/oscillators/#usage_20","text":"lf_triangle(freq) : _ Where: freq : frequency in Hz","title":"Usage"},{"location":"libs/oscillators/#low-frequency-sawtooths","text":"Sawtooth waveform oscillators for virtual analog synthesis et al. The 'simple' versions ( lf_rawsaw , lf_sawpos and saw1 ), are mere samplings of the ideal continuous-time (\"analog\") waveforms. While simple, the aliasing due to sampling is quite audible. The differentiated polynomial waveform family ( saw2 , sawN , and derived functions) do some extra processing to suppress aliasing (not audible for very low fundamental frequencies). According to Lehtonen et al. (JASA 2012), the aliasing of saw2 should be inaudible at fundamental frequencies below 2 kHz or so, for a 44.1 kHz sampling rate and 60 dB SPL presentation level; fundamentals 415 and below required no aliasing suppression (i.e., saw1 is ok).","title":"Low Frequency Sawtooths"},{"location":"libs/oscillators/#oslf_rawsaw","text":"Simple sawtooth waveform oscillator between 0 and period in samples.","title":"(os.)lf_rawsaw"},{"location":"libs/oscillators/#usage_21","text":"lf_rawsaw(periodsamps) : _ Where: periodsamps : number of periods per samples","title":"Usage"},{"location":"libs/oscillators/#oslf_sawpos","text":"Simple sawtooth waveform oscillator between 0 and 1.","title":"(os.)lf_sawpos"},{"location":"libs/oscillators/#usage_22","text":"lf_sawpos(freq) : _ Where: freq : frequency in Hz","title":"Usage"},{"location":"libs/oscillators/#oslf_sawpos_phase","text":"Simple sawtooth waveform oscillator between 0 and 1 with phase control.","title":"(os.)lf_sawpos_phase"},{"location":"libs/oscillators/#usage_23","text":"lf_sawpos_phase(freq, phase) : _ Where: freq : frequency in Hz phase : phase between 0 and 1","title":"Usage"},{"location":"libs/oscillators/#oslf_sawpos_reset","text":"Simple sawtooth waveform oscillator between 0 and 1 with reset.","title":"(os.)lf_sawpos_reset"},{"location":"libs/oscillators/#usage_24","text":"lf_sawpos_reset(freq,reset) : _ Where: freq : frequency in Hz reset : reset the oscillator to 0 when equal to 1","title":"Usage"},{"location":"libs/oscillators/#oslf_sawpos_phase_reset","text":"Simple sawtooth waveform oscillator between 0 and 1 with phase control and reset.","title":"(os.)lf_sawpos_phase_reset"},{"location":"libs/oscillators/#usage_25","text":"lf_sawpos_phase_reset(freq,phase,reset) : _ Where: freq : frequency in Hz phase : phase between 0 and 1 reset : reset the oscillator to phase when equal to 1","title":"Usage"},{"location":"libs/oscillators/#oslf_saw","text":"Simple sawtooth waveform oscillator between -1 and 1. lf_saw is a standard Faust function.","title":"(os.)lf_saw"},{"location":"libs/oscillators/#usage_26","text":"lf_saw(freq) : _ Where: freq : frequency in Hz","title":"Usage"},{"location":"libs/oscillators/#alias-suppressed-sawtooth","text":"","title":"Alias-Suppressed Sawtooth"},{"location":"libs/oscillators/#ossawn","text":"Alias-Suppressed Sawtooth Audio-Frequency Oscillator using Nth-order polynomial transitions to reduce aliasing. sawN(N,freq) , sawNp(N,freq,phase) , saw2dpw(freq) , saw2(freq) , saw3(freq) , saw4(freq) , sawtooth(freq) , saw2f2(freq) , saw2f4(freq)","title":"(os.)sawN"},{"location":"libs/oscillators/#usage_27","text":"sawN(N,freq) : _ // Nth-order aliasing-suppressed sawtooth using DPW method (see below) sawNp(N,freq,phase) : _ // sawN with phase offset feature saw2dpw(freq) : _ // saw2 using DPW saw2ptr(freq) : _ // saw2 using the faster, stateless PTR method saw2(freq) : _ // DPW method, but subject to change if a better method emerges saw3(freq) : _ // sawN(3) saw4(freq) : _ // sawN(4) sawtooth(freq) : _ // saw2 saw2f2(freq) : _ // saw2dpw with 2nd-order droop-correction filtering saw2f4(freq) : _ // saw2dpw with 4th-order droop-correction filtering Where: N : polynomial order, a constant numerical expression between 1 and 4 freq : frequency in Hz phase : phase between 0 and 1","title":"Usage"},{"location":"libs/oscillators/#method","text":"Differentiated Polynomial Wave (DPW).","title":"Method"},{"location":"libs/oscillators/#reference","text":"\"Alias-Suppressed Oscillators based on Differentiated Polynomial Waveforms\", Vesa Valimaki, Juhan Nam, Julius Smith, and Jonathan Abel, IEEE Tr. Audio, Speech, and Language Processing (IEEE-ASLP), Vol. 18, no. 5, pp 786-798, May 2010. 10.1109/TASL.2009.2026507.","title":"Reference"},{"location":"libs/oscillators/#notes","text":"The polynomial order N is limited to 4 because noise has been observed at very low freq values. (LFO sawtooths should of course be generated using lf_sawpos instead.)","title":"Notes"},{"location":"libs/oscillators/#ossawnp","text":"Same as (os.)sawN but with a controllable waveform phase.","title":"(os.)sawNp"},{"location":"libs/oscillators/#usage_28","text":"sawNp(N,freq,phase) : _ where N : waveform interpolation polynomial order 1 to 4 (constant integer expression) freq : frequency in Hz phase : waveform phase as a fraction of one period (rounded to nearest sample)","title":"Usage"},{"location":"libs/oscillators/#implementation-notes","text":"The phase offset is implemented by delaying sawN(N,freq) by round(phase*ma.SR/freq) samples, for up to 8191 samples. The minimum sawtooth frequency that can be delayed a whole period is therefore ma.SR/8191 , which is well below audibility for normal audio sampling rates.","title":"Implementation Notes"},{"location":"libs/oscillators/#ossaw2-ossaw3-ossaw4","text":"Alias-Suppressed Sawtooth Audio-Frequency Oscillators of order 2, 3, 4.","title":"(os.)saw2, (os.)saw3, (os.)saw4"},{"location":"libs/oscillators/#usage_29","text":"saw2(freq) : _ saw3(freq) : _ saw4(freq) : _ where freq : frequency in Hz","title":"Usage"},{"location":"libs/oscillators/#references_1","text":"See sawN above.","title":"References"},{"location":"libs/oscillators/#implementation-notes_1","text":"Presently, only saw2 uses the PTR method, while saw3 and saw4 use DPW. This is because PTR has been implemented and tested for the 2nd-order case only.","title":"Implementation Notes"},{"location":"libs/oscillators/#ossaw2ptr","text":"Alias-Suppressed Sawtooth Audio-Frequency Oscillator using Polynomial Transition Regions (PTR) for order 2.","title":"(os.)saw2ptr"},{"location":"libs/oscillators/#usage_30","text":"saw2ptr(freq) : _ where freq : frequency in Hz","title":"Usage"},{"location":"libs/oscillators/#implementation","text":"Polynomial Transition Regions (PTR) method for aliasing suppression.","title":"Implementation"},{"location":"libs/oscillators/#references_2","text":"Kleimola, J.; Valimaki, V., \"Reducing Aliasing from Synthetic Audio Signals Using Polynomial Transition Regions,\" in Signal Processing Letters, IEEE , vol.19, no.2, pp.67-70, Feb. 2012 https://aaltodoc.aalto.fi/bitstream/handle/123456789/7747/publication6.pdf?sequence=9 http://research.spa.aalto.fi/publications/papers/spl-ptr/","title":"References"},{"location":"libs/oscillators/#notes_1","text":"Method PTR may be preferred because it requires less computation and is stateless which means that the frequency freq can be modulated arbitrarily fast over time without filtering artifacts. For this reason, saw2 is presently defined as saw2ptr .","title":"Notes"},{"location":"libs/oscillators/#ossaw2dpw","text":"Alias-Suppressed Sawtooth Audio-Frequency Oscillator using the Differentiated Polynomial Waveform (DWP) method.","title":"(os.)saw2dpw"},{"location":"libs/oscillators/#usage_31","text":"saw2dpw(freq) : _ where freq : frequency in Hz This is the original Faust saw2 function using the DPW method. Since saw2 is now defined as saw2ptr , the DPW version is now available as saw2dwp .","title":"Usage"},{"location":"libs/oscillators/#ossawtooth","text":"Alias-suppressed aliasing-suppressed sawtooth oscillator, presently defined as saw2 . sawtooth is a standard Faust function.","title":"(os.)sawtooth"},{"location":"libs/oscillators/#usage_32","text":"sawtooth(freq) : _ with freq : frequency in Hz","title":"Usage"},{"location":"libs/oscillators/#ossaw2f2-ossaw2f4","text":"Alias-Suppressed Sawtooth Audio-Frequency Oscillator with Order 2 or 4 Droop Correction Filtering.","title":"(os.)saw2f2, (os.)saw2f4"},{"location":"libs/oscillators/#usage_33","text":"saw2f2(freq) : _ saw2f4(freq) : _ with freq : frequency in Hz In return for aliasing suppression, there is some attenuation near half the sampling rate. This can be considered as beneficial, or it can be compensated with a high-frequency boost. The boost filter is second-order for saw2f2 and fourth-order for saw2f4 , and both are designed for the DWP case and therefore use saw2dpw . See Figure 4(b) in the DPW reference for a plot of the slight droop in the DPW case.","title":"Usage"},{"location":"libs/oscillators/#alias-suppressed-pulse-square-and-impulse-trains","text":"Alias-Suppressed Pulse, Square and Impulse Trains. pulsetrainN , pulsetrain , squareN , square , imptrainN , imptrain , triangleN , triangle All are zero-mean and meant to oscillate in the audio frequency range. Use simpler sample-rounded lf_* versions above for LFOs.","title":"Alias-Suppressed Pulse, Square, and Impulse Trains"},{"location":"libs/oscillators/#usage_34","text":"pulsetrainN(N,freq,duty) : _ pulsetrain(freq, duty) : _ // = pulsetrainN(2) squareN(N,freq) : _ square : _ // = squareN(2) imptrainN(N,freq) : _ imptrain : _ // = imptrainN(2) triangleN(N,freq) : _ triangle : _ // = triangleN(2) Where: N : polynomial order, a constant numerical expression freq : frequency in Hz","title":"Usage"},{"location":"libs/oscillators/#osimpulse","text":"One-time impulse generated when the Faust process is started. impulse is a standard Faust function.","title":"(os.)impulse"},{"location":"libs/oscillators/#usage_35","text":"impulse : _","title":"Usage"},{"location":"libs/oscillators/#ospulsetrainn","text":"Alias-suppressed pulse train oscillator.","title":"(os.)pulsetrainN"},{"location":"libs/oscillators/#usage_36","text":"pulsetrainN(N,freq,duty) : _ Where: N : order, as a constant numerical expression freq : frequency in Hz duty : duty cycle between 0 and 1","title":"Usage"},{"location":"libs/oscillators/#ospulsetrain","text":"Alias-suppressed pulse train oscillator. Based on pulsetrainN(2) . pulsetrain is a standard Faust function.","title":"(os.)pulsetrain"},{"location":"libs/oscillators/#usage_37","text":"pulsetrain(freq,duty) : _ Where: freq : frequency in Hz duty : duty cycle between 0 and 1","title":"Usage"},{"location":"libs/oscillators/#ossquaren","text":"Alias-suppressed square wave oscillator.","title":"(os.)squareN"},{"location":"libs/oscillators/#usage_38","text":"squareN(N,freq) : _ Where: N : order, as a constant numerical expression freq : frequency in Hz","title":"Usage"},{"location":"libs/oscillators/#ossquare","text":"Alias-suppressed square wave oscillator. Based on squareN(2) . square is a standard Faust function.","title":"(os.)square"},{"location":"libs/oscillators/#usage_39","text":"square(freq) : _ Where: freq : frequency in Hz","title":"Usage"},{"location":"libs/oscillators/#osimptrainn","text":"Alias-suppressed impulse train generator.","title":"(os.)imptrainN"},{"location":"libs/oscillators/#usage_40","text":"imptrainN(N,freq) : _ Where: N : order, as a constant numerical expression freq : frequency in Hz","title":"Usage"},{"location":"libs/oscillators/#osimptrain","text":"Alias-suppressed impulse train generator. Based on imptrainN(2) . imptrain is a standard Faust function.","title":"(os.)imptrain"},{"location":"libs/oscillators/#usage_41","text":"imptrain(freq) : _ Where: freq : frequency in Hz","title":"Usage"},{"location":"libs/oscillators/#ostrianglen","text":"Alias-suppressed triangle wave oscillator.","title":"(os.)triangleN"},{"location":"libs/oscillators/#usage_42","text":"triangleN(N,freq) : _ Where: N : order, as a constant numerical expression freq : frequency in Hz","title":"Usage"},{"location":"libs/oscillators/#ostriangle","text":"Alias-suppressed triangle wave oscillator. Based on triangleN(2) . triangle is a standard Faust function.","title":"(os.)triangle"},{"location":"libs/oscillators/#usage_43","text":"triangle(freq) : _ Where: freq : frequency in Hz","title":"Usage"},{"location":"libs/oscillators/#filter-based-oscillators","text":"Filter-Based Oscillators.","title":"Filter-Based Oscillators"},{"location":"libs/oscillators/#usage_44","text":"osc[b|rq|rs|rc|s](freq), where freq = frequency in Hz.","title":"Usage"},{"location":"libs/oscillators/#references_3","text":"http://lac.linuxaudio.org/2012/download/lac12-slides-jos.pdf https://ccrma.stanford.edu/~jos/pdf/lac12-paper-jos.pdf","title":"References"},{"location":"libs/oscillators/#ososcb","text":"Sinusoidal oscillator based on the biquad.","title":"(os.)oscb"},{"location":"libs/oscillators/#usage_45","text":"oscb(freq) : _ Where: freq : frequency in Hz","title":"Usage"},{"location":"libs/oscillators/#ososcrq","text":"Sinusoidal (sine and cosine) oscillator based on 2D vector rotation, = undamped \"coupled-form\" resonator = lossless 2nd-order normalized ladder filter.","title":"(os.)oscrq"},{"location":"libs/oscillators/#usage_46","text":"oscrq(freq) : _,_ Where: freq : frequency in Hz","title":"Usage"},{"location":"libs/oscillators/#reference_1","text":"https://ccrma.stanford.edu/~jos/pasp/Normalized_Scattering_Junctions.html","title":"Reference"},{"location":"libs/oscillators/#ososcrs","text":"Sinusoidal (sine) oscillator based on 2D vector rotation, = undamped \"coupled-form\" resonator = lossless 2nd-order normalized ladder filter.","title":"(os.)oscrs"},{"location":"libs/oscillators/#usage_47","text":"oscrs(freq) : _ Where: freq : frequency in Hz","title":"Usage"},{"location":"libs/oscillators/#reference_2","text":"https://ccrma.stanford.edu/~jos/pasp/Normalized_Scattering_Junctions.html","title":"Reference"},{"location":"libs/oscillators/#ososcrc","text":"Sinusoidal (cosine) oscillator based on 2D vector rotation, = undamped \"coupled-form\" resonator = lossless 2nd-order normalized ladder filter.","title":"(os.)oscrc"},{"location":"libs/oscillators/#usage_48","text":"oscrc(freq) : _ Where: freq : frequency in Hz","title":"Usage"},{"location":"libs/oscillators/#reference_3","text":"https://ccrma.stanford.edu/~jos/pasp/Normalized_Scattering_Junctions.html","title":"Reference"},{"location":"libs/oscillators/#ososcs","text":"Sinusoidal oscillator based on the state variable filter = undamped \"modified-coupled-form\" resonator = \"magic circle\" algorithm used in graphics.","title":"(os.)oscs"},{"location":"libs/oscillators/#usage_49","text":"oscs(freq) : _ Where: freq : frequency in Hz","title":"Usage"},{"location":"libs/oscillators/#osquadosc","text":"Sinusoidal oscillator based on QuadOsc by Martin Vicanek.","title":"(os.)quadosc"},{"location":"libs/oscillators/#usage_50","text":"quadosc(freq) : _ where freq : frequency in Hz","title":"Usage"},{"location":"libs/oscillators/#reference_4","text":"https://vicanek.de/articles/QuadOsc.pdf","title":"Reference"},{"location":"libs/oscillators/#waveguide-resonator-based-oscillators","text":"Sinusoidal oscillator based on the waveguide resonator wgr .","title":"Waveguide-Resonator-Based Oscillators"},{"location":"libs/oscillators/#ososcwc","text":"Sinusoidal oscillator based on the waveguide resonator wgr . Unit-amplitude cosine oscillator.","title":"(os.)oscwc"},{"location":"libs/oscillators/#usage_51","text":"oscwc(freq) : _ Where: freq : frequency in Hz","title":"Usage"},{"location":"libs/oscillators/#reference_5","text":"https://ccrma.stanford.edu/~jos/pasp/Digital_Waveguide_Oscillator.html","title":"Reference"},{"location":"libs/oscillators/#ososcws","text":"Sinusoidal oscillator based on the waveguide resonator wgr . Unit-amplitude sine oscillator.","title":"(os.)oscws"},{"location":"libs/oscillators/#usage_52","text":"oscws(freq) : _ Where: freq : frequency in Hz","title":"Usage"},{"location":"libs/oscillators/#reference_6","text":"https://ccrma.stanford.edu/~jos/pasp/Digital_Waveguide_Oscillator.html","title":"Reference"},{"location":"libs/oscillators/#ososcq","text":"Sinusoidal oscillator based on the waveguide resonator wgr . Unit-amplitude cosine and sine (quadrature) oscillator.","title":"(os.)oscq"},{"location":"libs/oscillators/#usage_53","text":"oscq(freq) : _,_ Where: freq : frequency in Hz","title":"Usage"},{"location":"libs/oscillators/#reference_7","text":"https://ccrma.stanford.edu/~jos/pasp/Digital_Waveguide_Oscillator.html","title":"Reference"},{"location":"libs/oscillators/#ososcw","text":"Sinusoidal oscillator based on the waveguide resonator wgr . Unit-amplitude cosine oscillator (default).","title":"(os.)oscw"},{"location":"libs/oscillators/#usage_54","text":"oscw(freq) : _ Where: freq : frequency in Hz","title":"Usage"},{"location":"libs/oscillators/#reference_8","text":"https://ccrma.stanford.edu/~jos/pasp/Digital_Waveguide_Oscillator.html","title":"Reference"},{"location":"libs/oscillators/#casio-cz-oscillators","text":"Oscillators that mimic some of the Casio CZ oscillators. There are two sets: a set with an index parameter a set with a res parameter The \"index oscillators\" outputs a sine wave at index=0 and gets brighter with a higher index. There are two versions of the \"index oscillators\": with P appended to the name: is phase aligned with fund:sin without P appended to the name: has the phase of the original CZ oscillators The \"res oscillators\" have a resonant frequency. \"res\" is the frequency of resonance as a factor of the fundamental pitch.","title":"Casio CZ Oscillators"},{"location":"libs/oscillators/#osczsaw","text":"Oscillator that mimics the Casio CZ saw oscillator. CZsaw is a standard Faust function.","title":"(os.)CZsaw"},{"location":"libs/oscillators/#usage_55","text":"CZsaw(fund,index) : _ Where: fund : a saw-tooth waveform between 0 and 1 that the oscillator slaves to index : the brightness of the oscillator, 0 to 1. 0 = sine-wave, 1 = saw-wave","title":"Usage"},{"location":"libs/oscillators/#osczsawp","text":"Oscillator that mimics the Casio CZ saw oscillator, with it's phase aligned to fund:sin . CZsawP is a standard Faust function.","title":"(os.)CZsawP"},{"location":"libs/oscillators/#usage_56","text":"CZsawP(fund,index) : _ Where: fund : a saw-tooth waveform between 0 and 1 that the oscillator slaves to index : the brightness of the oscillator, 0 to 1. 0 = sine-wave, 1 = saw-wave","title":"Usage"},{"location":"libs/oscillators/#osczsquare","text":"Oscillator that mimics the Casio CZ square oscillator CZsquare is a standard Faust function.","title":"(os.)CZsquare"},{"location":"libs/oscillators/#usage_57","text":"CZsquare(fund,index) : _ Where: fund : a saw-tooth waveform between 0 and 1 that the oscillator slaves to index : the brightness of the oscillator, 0 to 1. 0 = sine-wave, 1 = square-wave","title":"Usage"},{"location":"libs/oscillators/#osczsquarep","text":"Oscillator that mimics the Casio CZ square oscillator, with it's phase aligned to fund:sin . CZsquareP is a standard Faust function.","title":"(os.)CZsquareP"},{"location":"libs/oscillators/#usage_58","text":"CZsquareP(fund,index) : _ Where: fund : a saw-tooth waveform between 0 and 1 that the oscillator slaves to index : the brightness of the oscillator, 0 to 1. 0 = sine-wave, 1 = square-wave","title":"Usage"},{"location":"libs/oscillators/#osczpulse","text":"Oscillator that mimics the Casio CZ pulse oscillator. CZpulse is a standard Faust function.","title":"(os.)CZpulse"},{"location":"libs/oscillators/#usage_59","text":"CZpulse(fund,index) : _ Where: fund : a saw-tooth waveform between 0 and 1 that the oscillator slaves to index : the brightness of the oscillator, 0 gives a sine-wave, 1 is closer to a pulse","title":"Usage"},{"location":"libs/oscillators/#osczpulsep","text":"Oscillator that mimics the Casio CZ pulse oscillator, with it's phase aligned to fund:sin . CZpulseP is a standard Faust function.","title":"(os.)CZpulseP"},{"location":"libs/oscillators/#usage_60","text":"CZpulseP(fund,index) : _ Where: fund : a saw-tooth waveform between 0 and 1 that the oscillator slaves to index : the brightness of the oscillator, 0 gives a sine-wave, 1 is closer to a pulse","title":"Usage"},{"location":"libs/oscillators/#osczsinepulse","text":"Oscillator that mimics the Casio CZ sine/pulse oscillator. CZsinePulse is a standard Faust function.","title":"(os.)CZsinePulse"},{"location":"libs/oscillators/#usage_61","text":"CZsinePulse(fund,index) : _ Where: fund : a saw-tooth waveform between 0 and 1 that the oscillator slaves to index : the brightness of the oscillator, 0 gives a sine-wave, 1 is a sine minus a pulse","title":"Usage"},{"location":"libs/oscillators/#osczsinepulsep","text":"Oscillator that mimics the Casio CZ sine/pulse oscillator, with it's phase aligned to fund:sin . CZsinePulseP is a standard Faust function.","title":"(os.)CZsinePulseP"},{"location":"libs/oscillators/#usage_62","text":"CZsinePulseP(fund,index) : _ Where: fund : a saw-tooth waveform between 0 and 1 that the oscillator slaves to index : the brightness of the oscillator, 0 gives a sine-wave, 1 is a sine minus a pulse","title":"Usage"},{"location":"libs/oscillators/#osczhalfsine","text":"Oscillator that mimics the Casio CZ half sine oscillator. CZhalfSine is a standard Faust function.","title":"(os.)CZhalfSine"},{"location":"libs/oscillators/#usage_63","text":"CZhalfSine(fund,index) : _ Where: fund : a saw-tooth waveform between 0 and 1 that the oscillator slaves to index : the brightness of the oscillator, 0 gives a sine-wave, 1 is somewhere between a saw and a square","title":"Usage"},{"location":"libs/oscillators/#osczhalfsinep","text":"Oscillator that mimics the Casio CZ half sine oscillator, with it's phase aligned to fund:sin . CZhalfSineP is a standard Faust function.","title":"(os.)CZhalfSineP"},{"location":"libs/oscillators/#usage_64","text":"CZhalfSineP(fund,index) : _ Where: fund : a saw-tooth waveform between 0 and 1 that the oscillator slaves to index : the brightness of the oscillator, 0 gives a sine-wave, 1 is somewhere between a saw and a square","title":"Usage"},{"location":"libs/oscillators/#osczressaw","text":"Oscillator that mimics the Casio CZ resonant sawtooth oscillator. CZresSaw is a standard Faust function.","title":"(os.)CZresSaw"},{"location":"libs/oscillators/#usage_65","text":"CZresSaw(fund,res) : _ Where: fund : a saw-tooth waveform between 0 and 1 that the oscillator slaves to res : the frequency of resonance as a factor of the fundamental pitch.","title":"Usage"},{"location":"libs/oscillators/#osczrestriangle","text":"Oscillator that mimics the Casio CZ resonant triangle oscillator. CZresTriangle is a standard Faust function.","title":"(os.)CZresTriangle"},{"location":"libs/oscillators/#usage_66","text":"CZresTriangle(fund,res) : _ Where: fund : a saw-tooth waveform between 0 and 1 that the oscillator slaves to res : the frequency of resonance as a factor of the fundamental pitch.","title":"Usage"},{"location":"libs/oscillators/#osczrestrap","text":"Oscillator that mimics the Casio CZ resonant trapeze oscillator CZresTrap is a standard Faust function.","title":"(os.)CZresTrap"},{"location":"libs/oscillators/#usage_67","text":"CZresTrap(fund,res) : _ Where: fund : a saw-tooth waveform between 0 and 1 that the oscillator slaves to res : the frequency of resonance as a factor of the fundamental pitch.","title":"Usage"},{"location":"libs/oscillators/#polyblep-based-oscillators","text":"","title":"PolyBLEP-Based Oscillators"},{"location":"libs/oscillators/#ospolyblep","text":"PolyBLEP residual function, used for smoothing steps in the audio signal.","title":"(os.)polyblep"},{"location":"libs/oscillators/#usage_68","text":"polyblep(Q,phase) : _ Where: Q : smoothing factor between 0 and 0.5. Determines how far from the ends of the phase interval the quadratic function is used. phase : normalised phase (between 0 and 1)","title":"Usage"},{"location":"libs/oscillators/#ospolyblep_saw","text":"Sawtooth oscillator with suppressed aliasing (using polyblep ).","title":"(os.)polyblep_saw"},{"location":"libs/oscillators/#usage_69","text":"polyblep_saw(freq) : _ Where: freq : frequency in Hz","title":"Usage"},{"location":"libs/oscillators/#ospolyblep_square","text":"Square wave oscillator with suppressed aliasing (using polyblep ).","title":"(os.)polyblep_square"},{"location":"libs/oscillators/#usage_70","text":"polyblep_square(freq) : _ Where: freq : frequency in Hz","title":"Usage"},{"location":"libs/oscillators/#ospolyblep_triangle","text":"Triangle wave oscillator with suppressed aliasing (using polyblep ).","title":"(os.)polyblep_triangle"},{"location":"libs/oscillators/#usage_71","text":"polyblep_triangle(freq) : _ Where: freq : frequency in Hz","title":"Usage"},{"location":"libs/phaflangers/","text":"phaflangers.lib A library of phasor and flanger effects. Its official prefix is pf . References https://github.com/grame-cncm/faustlibraries/blob/master/phaflangers.lib Functions Reference (pf.)flanger_mono Mono flanging effect. Usage: _ : flanger_mono(dmax,curdel,depth,fb,invert) : _ Where: dmax : maximum delay-line length (power of 2) - 10 ms typical curdel : current dynamic delay (not to exceed dmax) depth : effect strength between 0 and 1 (1 typical) fb : feedback gain between 0 and 1 (0 typical) invert : 0 for normal, 1 to invert sign of flanging sum Reference https://ccrma.stanford.edu/~jos/pasp/Flanging.html (pf.)flanger_stereo Stereo flanging effect. flanger_stereo is a standard Faust function. Usage: _,_ : flanger_stereo(dmax,curdel1,curdel2,depth,fb,invert) : _,_ Where: dmax : maximum delay-line length (power of 2) - 10 ms typical curdel1 : current dynamic delay for the left channel (not to exceed dmax) curdel2 : current dynamic delay for the right channel (not to exceed dmax) depth : effect strength between 0 and 1 (1 typical) fb : feedback gain between 0 and 1 (0 typical) invert : 0 for normal, 1 to invert sign of flanging sum Reference https://ccrma.stanford.edu/~jos/pasp/Flanging.html (pf.)phaser2_mono Mono phasing effect. Phaser _ : phaser2_mono(Notches,phase,width,frqmin,fratio,frqmax,speed,depth,fb,invert) : _ Where: Notches : number of spectral notches (MACRO ARGUMENT - not a signal) phase : phase of the oscillator (0-1) width : approximate width of spectral notches in Hz frqmin : approximate minimum frequency of first spectral notch in Hz fratio : ratio of adjacent notch frequencies frqmax : approximate maximum frequency of first spectral notch in Hz speed : LFO frequency in Hz (rate of periodic notch sweep cycles) depth : effect strength between 0 and 1 (1 typical) (aka \"intensity\") when depth=2, \"vibrato mode\" is obtained (pure allpass chain) fb : feedback gain between -1 and 1 (0 typical) invert : 0 for normal, 1 to invert sign of flanging sum Reference: https://ccrma.stanford.edu/~jos/pasp/Phasing.html http://www.geofex.com/Article_Folders/phasers/phase.html 'An Allpass Approach to Digital Phasing and Flanging', Julius O. Smith III, CCRMA Tech. Report STAN-M-21: https://ccrma.stanford.edu/STANM/stanms/stanm21/ (pf.)phaser2_stereo Stereo phasing effect. phaser2_stereo is a standard Faust function. Phaser _,_ : phaser2_stereo(Notches,width,frqmin,fratio,frqmax,speed,depth,fb,invert) : _,_ Where: Notches : number of spectral notches (MACRO ARGUMENT - not a signal) width : approximate width of spectral notches in Hz frqmin : approximate minimum frequency of first spectral notch in Hz fratio : ratio of adjacent notch frequencies frqmax : approximate maximum frequency of first spectral notch in Hz speed : LFO frequency in Hz (rate of periodic notch sweep cycles) depth : effect strength between 0 and 1 (1 typical) (aka \"intensity\") when depth=2, \"vibrato mode\" is obtained (pure allpass chain) fb : feedback gain between -1 and 1 (0 typical) invert : 0 for normal, 1 to invert sign of flanging sum Reference: https://ccrma.stanford.edu/~jos/pasp/Phasing.html http://www.geofex.com/Article_Folders/phasers/phase.html 'An Allpass Approach to Digital Phasing and Flanging', Julius O. Smith III, CCRMA Tech. Report STAN-M-21: https://ccrma.stanford.edu/STANM/stanms/stanm21/","title":" phaflangers "},{"location":"libs/phaflangers/#phaflangerslib","text":"A library of phasor and flanger effects. Its official prefix is pf .","title":"phaflangers.lib"},{"location":"libs/phaflangers/#references","text":"https://github.com/grame-cncm/faustlibraries/blob/master/phaflangers.lib","title":"References"},{"location":"libs/phaflangers/#functions-reference","text":"","title":"Functions Reference"},{"location":"libs/phaflangers/#pfflanger_mono","text":"Mono flanging effect.","title":"(pf.)flanger_mono"},{"location":"libs/phaflangers/#usage","text":"_ : flanger_mono(dmax,curdel,depth,fb,invert) : _ Where: dmax : maximum delay-line length (power of 2) - 10 ms typical curdel : current dynamic delay (not to exceed dmax) depth : effect strength between 0 and 1 (1 typical) fb : feedback gain between 0 and 1 (0 typical) invert : 0 for normal, 1 to invert sign of flanging sum","title":"Usage:"},{"location":"libs/phaflangers/#reference","text":"https://ccrma.stanford.edu/~jos/pasp/Flanging.html","title":"Reference"},{"location":"libs/phaflangers/#pfflanger_stereo","text":"Stereo flanging effect. flanger_stereo is a standard Faust function.","title":"(pf.)flanger_stereo"},{"location":"libs/phaflangers/#usage_1","text":"_,_ : flanger_stereo(dmax,curdel1,curdel2,depth,fb,invert) : _,_ Where: dmax : maximum delay-line length (power of 2) - 10 ms typical curdel1 : current dynamic delay for the left channel (not to exceed dmax) curdel2 : current dynamic delay for the right channel (not to exceed dmax) depth : effect strength between 0 and 1 (1 typical) fb : feedback gain between 0 and 1 (0 typical) invert : 0 for normal, 1 to invert sign of flanging sum","title":"Usage:"},{"location":"libs/phaflangers/#reference_1","text":"https://ccrma.stanford.edu/~jos/pasp/Flanging.html","title":"Reference"},{"location":"libs/phaflangers/#pfphaser2_mono","text":"Mono phasing effect.","title":"(pf.)phaser2_mono"},{"location":"libs/phaflangers/#phaser","text":"_ : phaser2_mono(Notches,phase,width,frqmin,fratio,frqmax,speed,depth,fb,invert) : _ Where: Notches : number of spectral notches (MACRO ARGUMENT - not a signal) phase : phase of the oscillator (0-1) width : approximate width of spectral notches in Hz frqmin : approximate minimum frequency of first spectral notch in Hz fratio : ratio of adjacent notch frequencies frqmax : approximate maximum frequency of first spectral notch in Hz speed : LFO frequency in Hz (rate of periodic notch sweep cycles) depth : effect strength between 0 and 1 (1 typical) (aka \"intensity\") when depth=2, \"vibrato mode\" is obtained (pure allpass chain) fb : feedback gain between -1 and 1 (0 typical) invert : 0 for normal, 1 to invert sign of flanging sum Reference: https://ccrma.stanford.edu/~jos/pasp/Phasing.html http://www.geofex.com/Article_Folders/phasers/phase.html 'An Allpass Approach to Digital Phasing and Flanging', Julius O. Smith III, CCRMA Tech. Report STAN-M-21: https://ccrma.stanford.edu/STANM/stanms/stanm21/","title":"Phaser"},{"location":"libs/phaflangers/#pfphaser2_stereo","text":"Stereo phasing effect. phaser2_stereo is a standard Faust function.","title":"(pf.)phaser2_stereo"},{"location":"libs/phaflangers/#phaser_1","text":"_,_ : phaser2_stereo(Notches,width,frqmin,fratio,frqmax,speed,depth,fb,invert) : _,_ Where: Notches : number of spectral notches (MACRO ARGUMENT - not a signal) width : approximate width of spectral notches in Hz frqmin : approximate minimum frequency of first spectral notch in Hz fratio : ratio of adjacent notch frequencies frqmax : approximate maximum frequency of first spectral notch in Hz speed : LFO frequency in Hz (rate of periodic notch sweep cycles) depth : effect strength between 0 and 1 (1 typical) (aka \"intensity\") when depth=2, \"vibrato mode\" is obtained (pure allpass chain) fb : feedback gain between -1 and 1 (0 typical) invert : 0 for normal, 1 to invert sign of flanging sum Reference: https://ccrma.stanford.edu/~jos/pasp/Phasing.html http://www.geofex.com/Article_Folders/phasers/phase.html 'An Allpass Approach to Digital Phasing and Flanging', Julius O. Smith III, CCRMA Tech. Report STAN-M-21: https://ccrma.stanford.edu/STANM/stanms/stanm21/","title":"Phaser"},{"location":"libs/physmodels/","text":"physmodels.lib Faust physical modeling library. Its official prefix is pm . This library provides an environment to facilitate physical modeling of musical instruments. It contains dozens of functions implementing low and high level elements going from a simple waveguide to fully operational models with built-in UI, etc. It is organized as follows: Global Variables : useful pre-defined variables for physical modeling (e.g., speed of sound, etc.). Conversion Tools : conversion functions specific to physical modeling (e.g., length to frequency, etc.). Bidirectional Utilities : functions to create bidirectional block diagrams for physical modeling. Basic Elements : waveguides, specific types of filters, etc. String Instruments : various types of strings (e.g., steel, nylon, etc.), bridges, guitars, etc. Bowed String Instruments : parts and models specific to bowed string instruments (e.g., bows, bridges, violins, etc.). Wind Instrument : parts and models specific to wind instruments (e.g., reeds, mouthpieces, flutes, clarinets, etc.). Exciters : pluck generators, \"blowers\", etc. Modal Percussions : percussion instruments based on modal models. Vocal Synthesis : functions for various vocal synthesis techniques (e.g., fof, source/filter, etc.) and vocal synthesizers. Misc Functions : any other functions that don't fit in the previous category (e.g., nonlinear filters, etc.). This library is part of the Faust Physical Modeling ToolKit. More information on how to use this library can be found on this page . Tutorials on how to make physical models of musical instruments using Faust can be found here as well. References https://github.com/grame-cncm/faustlibraries/blob/master/physmodels.lib Global Variables Useful pre-defined variables for physical modeling. (pm.)speedOfSound Speed of sound in meters per second (340m/s). (pm.)maxLength The default maximum length (3) in meters of strings and tubes used in this library. This variable should be overriden to allow longer strings or tubes. Conversion Tools Useful conversion tools for physical modeling. (pm.)f2l Frequency to length in meters. Usage f2l(freq) : distanceInMeters Where: freq : the frequency (pm.)l2f Length in meters to frequency. Usage l2f(length) : freq Where: length : length/distance in meters (pm.)l2s Length in meters to number of samples. Usage l2s(l) : numberOfSamples Where: l : length in meters Bidirectional Utilities Set of fundamental functions to create bi-directional block diagrams in Faust. These elements are used as the basis of this library to connect high level elements (e.g., mouthpieces, strings, bridge, instrument body, etc.). Each block has 3 inputs and 3 outputs. The first input/output carry left going waves, the second input/output carry right going waves, and the third input/output is used to carry any potential output signal to the end of the algorithm. (pm.)basicBlock Empty bidirectional block to be used with chain : 3 signals ins and 3 signals out. Usage chain(basicBlock : basicBlock : etc.) (pm.)chain Creates a chain of bidirectional blocks. Blocks must have 3 inputs and outputs. The first input/output carry left going waves, the second input/output carry right going waves, and the third input/output is used to carry any potential output signal to the end of the algorithm. The implied one sample delay created by the ~ operator is generalized to the left and right going waves. Thus, n blocks in chain() will add an n samples delay to both left and right going waves. Usage leftGoingWaves,rightGoingWaves,mixedOutput : chain( A : B ) : leftGoingWaves,rightGoingWaves,mixedOutput with{ A = _,_,_; }; (pm.)inLeftWave Adds a signal to left going waves anywhere in a chain of blocks. Usage model(x) = chain(A : inLeftWave(x) : B) Where A and B are bidirectional blocks and x is the signal added to left going waves in that chain. (pm.)inRightWave Adds a signal to right going waves anywhere in a chain of blocks. Usage model(x) = chain(A : inRightWave(x) : B) Where A and B are bidirectional blocks and x is the signal added to right going waves in that chain. (pm.)in Adds a signal to left and right going waves anywhere in a chain of blocks. Usage model(x) = chain(A : in(x) : B) Where A and B are bidirectional blocks and x is the signal added to left and right going waves in that chain. (pm.)outLeftWave Sends the signal of left going waves to the output channel of the chain . Usage chain(A : outLeftWave : B) Where A and B are bidirectional blocks. (pm.)outRightWave Sends the signal of right going waves to the output channel of the chain . Usage chain(A : outRightWave : B) Where A and B are bidirectional blocks. (pm.)out Sends the signal of right and left going waves to the output channel of the chain . Usage chain(A : out : B) Where A and B are bidirectional blocks. (pm.)terminations Creates terminations on both sides of a chain without closing the inputs and outputs of the bidirectional signals chain. As for chain , this function adds a 1 sample delay to the bidirectional signal, both ways. Of course, this function can be nested within a chain . Usage terminations(a,b,c) with{ }; (pm.)lTermination Creates a termination on the left side of a chain without closing the inputs and outputs of the bidirectional signals chain. This function adds a 1 sample delay near the termination and can be nested within another chain . Usage lTerminations(a,b) with{ }; (pm.)rTermination Creates a termination on the right side of a chain without closing the inputs and outputs of the bidirectional signals chain. This function adds a 1 sample delay near the termination and can be nested within another chain . Usage rTerminations(b,c) with{ }; (pm.)closeIns Closes the inputs of a bidirectional chain in all directions. Usage closeIns : chain(...) : _,_,_ (pm.)closeOuts Closes the outputs of a bidirectional chain in all directions except for the main signal output (3d output). Usage _,_,_ : chain(...) : _ (pm.)endChain Closes the inputs and outputs of a bidirectional chain in all directions except for the main signal output (3d output). Usage endChain(chain(...)) : _ Basic Elements Basic elements for physical modeling (e.g., waveguides, specific filters, etc.). (pm.)waveguideN A series of waveguide functions based on various types of delays (see fdelay[n] ). List of functions waveguideUd : unit delay waveguide waveguideFd : fractional delay waveguide waveguideFd2 : second order fractional delay waveguide waveguideFd4 : fourth order fractional delay waveguide Usage chain(A : waveguideUd(nMax,n) : B) Where: nMax : the maximum length of the delays in the waveguide n : the length of the delay lines in samples. (pm.)waveguide Standard pm.lib waveguide (based on waveguideFd4 ). Usage chain(A : waveguide(nMax,n) : B) Where: nMax : the maximum length of the delays in the waveguide n : the length of the delay lines in samples. (pm.)bridgeFilter Generic two zeros bridge FIR filter (as implemented in the STK ) that can be used to implement the reflectance violin, guitar, etc. bridges. Usage _ : bridge(brightness,absorption) : _ Where: brightness : controls the damping of high frequencies (0-1) absorption : controls the absorption of the brige and thus the t60 of the string plugged to it (0-1) (1 = 20 seconds) (pm.)modeFilter Resonant bandpass filter that can be used to implement a single resonance (mode). Usage _ : modeFilter(freq,t60,gain) : _ Where: freq : mode frequency t60 : mode resonance duration (in seconds) gain : mode gain (0-1) String Instruments Low and high level string instruments parts. Most of the elements in this section can be used in a bidirectional chain. (pm.)stringSegment A string segment without terminations (just a simple waveguide). Usage chain(A : stringSegment(maxLength,length) : B) Where: maxLength : the maximum length of the string in meters (should be static) length : the length of the string in meters (pm.)openString A bidirectional block implementing a basic \"generic\" string with a selectable excitation position. Lowpass filters are built-in and allow to simulate the effect of dispersion on the sound and thus to change the \"stiffness\" of the string. Usage chain(... : openString(length,stiffness,pluckPosition,excitation) : ...) Where: length : the length of the string in meters stiffness : the stiffness of the string (0-1) (1 for max stiffness) pluckPosition : excitation position (0-1) (1 is bottom) excitation : the excitation signal (pm.)nylonString A bidirectional block implementing a basic nylon string with selectable excitation position. This element is based on openString and has a fix stiffness corresponding to that of a nylon string. Usage chain(... : nylonString(length,pluckPosition,excitation) : ...) Where: length : the length of the string in meters pluckPosition : excitation position (0-1) (1 is bottom) excitation : the excitation signal (pm.)steelString A bidirectional block implementing a basic steel string with selectable excitation position. This element is based on openString and has a fix stiffness corresponding to that of a steel string. Usage chain(... : steelString(length,pluckPosition,excitation) : ...) Where: length : the length of the string in meters pluckPosition : excitation position (0-1) (1 is bottom) excitation : the excitation signal (pm.)openStringPick A bidirectional block implementing a \"generic\" string with selectable excitation position. It also has a built-in pickup whose position is the same as the excitation position. Thus, moving the excitation position will also move the pickup. Usage chain(... : openStringPick(length,stiffness,pluckPosition,excitation) : ...) Where: length : the length of the string in meters stiffness : the stiffness of the string (0-1) (1 for max stiffness) pluckPosition : excitation position (0-1) (1 is bottom) excitation : the excitation signal (pm.)openStringPickUp A bidirectional block implementing a \"generic\" string with selectable excitation position and stiffness. It also has a built-in pickup whose position can be independenly selected. The only constraint is that the pickup has to be placed after the excitation position. Usage chain(... : openStringPickUp(length,stiffness,pluckPosition,excitation) : ...) Where: length : the length of the string in meters stiffness : the stiffness of the string (0-1) (1 for max stiffness) pluckPosition : pluck position between the top of the string and the pickup (0-1) (1 for same as pickup position) pickupPosition : position of the pickup on the string (0-1) (1 is bottom) excitation : the excitation signal (pm.)openStringPickDown A bidirectional block implementing a \"generic\" string with selectable excitation position and stiffness. It also has a built-in pickup whose position can be independenly selected. The only constraint is that the pickup has to be placed before the excitation position. Usage chain(... : openStringPickDown(length,stiffness,pluckPosition,excitation) : ...) Where: length : the length of the string in meters stiffness : the stiffness of the string (0-1) (1 for max stiffness) pluckPosition : pluck position on the string (0-1) (1 is bottom) pickupPosition : position of the pickup between the top of the string and the excitation position (0-1) (1 is excitation position) excitation : the excitation signal (pm.)ksReflexionFilter The \"typical\" one-zero Karplus-strong feedforward reflexion filter. This filter will be typically used in a termination (see below). Usage terminations(_,chain(...),ksReflexionFilter) (pm.)rStringRigidTermination Bidirectional block implementing a right rigid string termination (no damping, just phase inversion). Usage chain(rStringRigidTermination : stringSegment : ...) (pm.)lStringRigidTermination Bidirectional block implementing a left rigid string termination (no damping, just phase inversion). Usage chain(... : stringSegment : lStringRigidTermination) (pm.)elecGuitarBridge Bidirectional block implementing a simple electric guitar bridge. This block is based on bridgeFilter . The bridge doesn't implement transmittance since it is not meant to be connected to a body (unlike acoustic guitar). It also partially sets the resonance duration of the string with the nuts used on the other side. Usage chain(... : stringSegment : elecGuitarBridge) (pm.)elecGuitarNuts Bidirectional block implementing a simple electric guitar nuts. This block is based on bridgeFilter and does essentially the same thing as elecGuitarBridge , but on the other side of the chain. It also partially sets the resonance duration of the string with the bridge used on the other side. Usage chain(elecGuitarNuts : stringSegment : ...) (pm.)guitarBridge Bidirectional block implementing a simple acoustic guitar bridge. This bridge damps more hight frequencies than elecGuitarBridge and implements a transmittance filter. It also partially sets the resonance duration of the string with the nuts used on the other side. Usage chain(... : stringSegment : guitarBridge) (pm.)guitarNuts Bidirectional block implementing a simple acoustic guitar nuts. This nuts damps more hight frequencies than elecGuitarNuts and implements a transmittance filter. It also partially sets the resonance duration of the string with the bridge used on the other side. Usage chain(guitarNuts : stringSegment : ...) (pm.)idealString An \"ideal\" string with rigid terminations and where the plucking position and the pick-up position are the same. Since terminations are rigid, this string will ring forever. Usage 1-1' : idealString(length,reflexion,xPosition,excitation) With: * length : the length of the string in meters * pluckPosition : the plucking position (0.001-0.999) * excitation : the input signal for the excitation. (pm.)ks A Karplus-Strong string (in that case, the string is implemented as a one dimension waveguide). Usage ks(length,damping,excitation) : _ Where: length : the length of the string in meters damping : string damping (0-1) excitation : excitation signal (pm.)ks_ui_MIDI Ready-to-use, MIDI-enabled Karplus-Strong string with buil-in UI. Usage ks_ui_MIDI : _ (pm.)elecGuitarModel A simple electric guitar model (without audio effects, of course) with selectable pluck position. This model implements a single string. Additional strings should be created by making a polyphonic application out of this function. Pitch is changed by changing the length of the string and not through a finger model. Usage elecGuitarModel(length,pluckPosition,mute,excitation) : _ Where: length : the length of the string in meters pluckPosition : pluck position (0-1) (1 is on the bridge) mute : mute coefficient (1 for no mute and 0 for instant mute) excitation : excitation signal (pm.)elecGuitar A simple electric guitar model with steel strings (based on elecGuitarModel ) implementing an excitation model. This model implements a single string. Additional strings should be created by making a polyphonic application out of this function. Usage elecGuitar(length,pluckPosition,trigger) : _ Where: length : the length of the string in meters pluckPosition : pluck position (0-1) (1 is on the bridge) mute : mute coefficient (1 for no mute and 0 for instant mute) gain : gain of the pluck (0-1) trigger : trigger signal (1 for on, 0 for off) (pm.)elecGuitar_ui_MIDI Ready-to-use MIDI-enabled electric guitar physical model with built-in UI. Usage elecGuitar_ui_MIDI : _ (pm.)guitarBody WARNING: not implemented yet! Bidirectional block implementing a simple acoustic guitar body. Usage chain(... : guitarBody) (pm.)guitarModel A simple acoustic guitar model with steel strings and selectable excitation position. This model implements a single string. Additional strings should be created by making a polyphonic application out of this function. Pitch is changed by changing the length of the string and not through a finger model. WARNING: this function doesn't currently implement a body (just strings and bridge). Usage guitarModel(length,pluckPosition,excitation) : _ Where: length : the length of the string in meters pluckPosition : pluck position (0-1) (1 is on the bridge) excitation : excitation signal (pm.)guitar A simple acoustic guitar model with steel strings (based on guitarModel ) implementing an excitation model. This model implements a single string. Additional strings should be created by making a polyphonic application out of this function. Usage guitar(length,pluckPosition,trigger) : _ Where: length : the length of the string in meters pluckPosition : pluck position (0-1) (1 is on the bridge) gain : gain of the excitation trigger : trigger signal (1 for on, 0 for off) (pm.)guitar_ui_MIDI Ready-to-use MIDI-enabled steel strings acoustic guitar physical model with built-in UI. Usage guitar_ui_MIDI : _ (pm.)nylonGuitarModel A simple acoustic guitar model with nylon strings and selectable excitation position. This model implements a single string. Additional strings should be created by making a polyphonic application out of this function. Pitch is changed by changing the length of the string and not through a finger model. WARNING: this function doesn't currently implement a body (just strings and bridge). Usage nylonGuitarModel(length,pluckPosition,excitation) : _ Where: length : the length of the string in meters pluckPosition : pluck position (0-1) (1 is on the bridge) excitation : excitation signal (pm.)nylonGuitar A simple acoustic guitar model with nylon strings (based on nylonGuitarModel ) implementing an excitation model. This model implements a single string. Additional strings should be created by making a polyphonic application out of this function. Usage nylonGuitar(length,pluckPosition,trigger) : _ Where: length : the length of the string in meters pluckPosition : pluck position (0-1) (1 is on the bridge) gain : gain of the excitation (0-1) trigger : trigger signal (1 for on, 0 for off) (pm.)nylonGuitar_ui_MIDI Ready-to-use MIDI-enabled nylon strings acoustic guitar physical model with built-in UI. Usage nylonGuitar_ui_MIDI : _ (pm.)modeInterpRes Modular string instrument resonator based on IR measurements made on 3D printed models. The 2D space allowing for the control of the shape and the scale of the model is enabled by interpolating between modes parameters. More information about this technique/project can be found here: * https://ccrma.stanford.edu/~rmichon/3dPrintingModeling/ . Usage _ : modeInterpRes(nModes,x,y) : _ Where: nModes : number of modeled modes (40 max) x : shape of the resonator (0: square, 1: square with rounded corners, 2: round) y : scale of the resonator (0: small, 1: medium, 2: large) (pm.)modularInterpBody Bidirectional block implementing a modular string instrument resonator (see modeInterpRes ). Usage chain(... : modularInterpBody(nModes,shape,scale) : ...) Where: nModes : number of modeled modes (40 max) shape : shape of the resonator (0: square, 1: square with rounded corners, 2: round) scale : scale of the resonator (0: small, 1: medium, 2: large) (pm.)modularInterpStringModel String instrument model with a modular body (see modeInterpRes and * https://ccrma.stanford.edu/~rmichon/3dPrintingModeling/ ). Usage modularInterpStringModel(length,pluckPosition,shape,scale,bodyExcitation,stringExcitation) : _ Where: stringLength : the length of the string in meters pluckPosition : pluck position (0-1) (1 is on the bridge) shape : shape of the resonator (0: square, 1: square with rounded corners, 2: round) scale : scale of the resonator (0: small, 1: medium, 2: large) bodyExcitation : excitation signal for the body stringExcitation : excitation signal for the string (pm.)modularInterpInstr String instrument with a modular body (see modeInterpRes and * https://ccrma.stanford.edu/~rmichon/3dPrintingModeling/ ). Usage modularInterpInstr(stringLength,pluckPosition,shape,scale,gain,tapBody,triggerString) : _ Where: stringLength : the length of the string in meters pluckPosition : pluck position (0-1) (1 is on the bridge) shape : shape of the resonator (0: square, 1: square with rounded corners, 2: round) scale : scale of the resonator (0: small, 1: medium, 2: large) gain : of the string excitation tapBody : send an impulse in the body of the instrument where the string is connected (1 for on, 0 for off) triggerString : trigger signal for the string (1 for on, 0 for off) (pm.)modularInterpInstr_ui_MIDI Ready-to-use MIDI-enabled string instrument with a modular body (see modeInterpRes and * https://ccrma.stanford.edu/~rmichon/3dPrintingModeling/ ) with built-in UI. Usage modularInterpInstr_ui_MIDI : _ Bowed String Instruments Low and high level basic string instruments parts. Most of the elements in this section can be used in a bidirectional chain. (pm.)bowTable Extremely basic bow table that can be used to implement a wide range of bow types for many different bowed string instruments (violin, cello, etc.). Usage excitation : bowTable(offeset,slope) : _ Where: excitation : an excitation signal offset : table offset slope : table slope (pm.)violinBowTable Violin bow table based on bowTable . Usage bowVelocity : violinBowTable(bowPressure) : _ Where: bowVelocity : velocity of the bow/excitation signal (0-1) bowPressure : bow pressure on the string (0-1) (pm.)bowInteraction Bidirectional block implementing the interaction of a bow in a chain . Usage chain(... : stringSegment : bowInteraction(bowTable) : stringSegment : ...) Where: bowTable : the bow table (pm.)violinBow Bidirectional block implementing a violin bow and its interaction with a string. Usage chain(... : stringSegment : violinBow(bowPressure,bowVelocity) : stringSegment : ...) Where: bowVelocity : velocity of the bow / excitation signal (0-1) bowPressure : bow pressure on the string (0-1) (pm.)violinBowedString Violin bowed string bidirectional block with controllable bow position. Terminations are not implemented in this model. Usage chain(nuts : violinBowedString(stringLength,bowPressure,bowVelocity,bowPosition) : bridge) Where: stringLength : the length of the string in meters bowVelocity : velocity of the bow / excitation signal (0-1) bowPressure : bow pressure on the string (0-1) bowPosition : the position of the bow on the string (0-1) (pm.)violinNuts Bidirectional block implementing simple violin nuts. This function is based on bridgeFilter . Usage chain(violinNuts : stringSegment : ...) (pm.)violinBridge Bidirectional block implementing a simple violin bridge. This function is based on bridgeFilter . Usage chain(... : stringSegment : violinBridge (pm.)violinBody Bidirectional block implementing a simple violin body (just a simple resonant lowpass filter). Usage chain(... : stringSegment : violinBridge : violinBody) (pm.)violinModel Ready-to-use simple violin physical model. This model implements a single string. Additional strings should be created by making a polyphonic application out of this function. Pitch is changed by changing the length of the string (and not through a finger model). Usage violinModel(stringLength,bowPressure,bowVelocity,bridgeReflexion, bridgeAbsorption,bowPosition) : _ Where: stringLength : the length of the string in meters bowVelocity : velocity of the bow / excitation signal (0-1) bowPressure : bow pressure on the string (0-1)) bowPosition : the position of the bow on the string (0-1) (pm.)violin_ui Ready-to-use violin physical model with built-in UI. Usage violinModel_ui : _ (pm.)violin_ui_MIDI Ready-to-use MIDI-enabled violin physical model with built-in UI. Usage violin_ui_MIDI : _ Wind Instruments Low and high level basic wind instruments parts. Most of the elements in this section can be used in a bidirectional chain. (pm.)openTube A tube segment without terminations (same as stringSegment ). Usage chain(A : openTube(maxLength,length) : B) Where: maxLength : the maximum length of the tube in meters (should be static) length : the length of the tube in meters (pm.)reedTable Extremely basic reed table that can be used to implement a wide range of single reed types for many different instruments (saxophone, clarinet, etc.). Usage excitation : reedTable(offeset,slope) : _ Where: excitation : an excitation signal offset : table offset slope : table slope (pm.)fluteJetTable Extremely basic flute jet table. Usage excitation : fluteJetTable : _ Where: excitation : an excitation signal (pm.)brassLipsTable Simple brass lips/mouthpiece table. Since this implementation is very basic and that the lips and tube of the instrument are coupled to each other, the length of that tube must be provided here. Usage excitation : brassLipsTable(tubeLength,lipsTension) : _ Where: excitation : an excitation signal (can be DC) tubeLength : length in meters of the tube connected to the mouthpiece lipsTension : tension of the lips (0-1) (default: 0.5) (pm.)clarinetReed Clarinet reed based on reedTable with controllable stiffness. Usage excitation : clarinetReed(stiffness) : _ Where: excitation : an excitation signal stiffness : reed stiffness (0-1) (pm.)clarinetMouthPiece Bidirectional block implementing a clarinet mouthpiece as well as the various interactions happening with traveling waves. This element is ready to be plugged to a tube... Usage chain(clarinetMouthPiece(reedStiffness,pressure) : tube : etc.) Where: pressure : the pressure of the air flow (DC) created by the virtual performer (0-1). This can also be any kind of signal that will directly injected in the mouthpiece (e.g., breath noise, etc.). reedStiffness : reed stiffness (0-1) (pm.)brassLips Bidirectional block implementing a brass mouthpiece as well as the various interactions happening with traveling waves. This element is ready to be plugged to a tube... Usage chain(brassLips(tubeLength,lipsTension,pressure) : tube : etc.) Where: tubeLength : length in meters of the tube connected to the mouthpiece lipsTension : tension of the lips (0-1) (default: 0.5) pressure : the pressure of the air flow (DC) created by the virtual performer (0-1). This can also be any kind of signal that will directly injected in the mouthpiece (e.g., breath noise, etc.). (pm.)fluteEmbouchure Bidirectional block implementing a flute embouchure as well as the various interactions happening with traveling waves. This element is ready to be plugged between tubes segments... Usage chain(... : tube : fluteEmbouchure(pressure) : tube : etc.) Where: pressure : the pressure of the air flow (DC) created by the virtual performer (0-1). This can also be any kind of signal that will directly injected in the mouthpiece (e.g., breath noise, etc.). (pm.)wBell Generic wind instrument bell bidirectional block that should be placed at the end of a chain . Usage chain(... : wBell(opening)) Where: opening : the \"opening\" of bell (0-1) (pm.)fluteHead Simple flute head implementing waves reflexion. Usage chain(fluteHead : tube : ...) (pm.)fluteFoot Simple flute foot implementing waves reflexion and dispersion. Usage chain(... : tube : fluteFoot) (pm.)clarinetModel A simple clarinet physical model without tone holes (pitch is changed by changing the length of the tube of the instrument). Usage clarinetModel(length,pressure,reedStiffness,bellOpening) : _ Where: tubeLength : the length of the tube in meters pressure : the pressure of the air flow created by the virtual performer (0-1). This can also be any kind of signal that will directly injected in the mouthpiece (e.g., breath noise, etc.). reedStiffness : reed stiffness (0-1) bellOpening : the opening of bell (0-1) (pm.)clarinetModel_ui Same as clarinetModel but with a built-in UI. This function doesn't implement a virtual \"blower\", thus pressure remains an argument here. Usage clarinetModel_ui(pressure) : _ Where: pressure : the pressure of the air flow created by the virtual performer (0-1). This can also be any kind of signal that will be directly injected in the mouthpiece (e.g., breath noise, etc.). (pm.)clarinet_ui Ready-to-use clarinet physical model with built-in UI based on clarinetModel . Usage clarinet_ui : _ (pm.)clarinet_ui_MIDI Ready-to-use MIDI compliant clarinet physical model with built-in UI. Usage clarinet_ui_MIDI : _ (pm.)brassModel A simple generic brass instrument physical model without pistons (pitch is changed by changing the length of the tube of the instrument). This model is kind of hard to control and might not sound very good if bad parameters are given to it... Usage brassModel(tubeLength,lipsTension,mute,pressure) : _ Where: tubeLength : the length of the tube in meters lipsTension : tension of the lips (0-1) (default: 0.5) mute : mute opening at the end of the instrument (0-1) (default: 0.5) pressure : the pressure of the air flow created by the virtual performer (0-1). This can also be any kind of signal that will directly injected in the mouthpiece (e.g., breath noise, etc.). (pm.)brassModel_ui Same as brassModel but with a built-in UI. This function doesn't implement a virtual \"blower\", thus pressure remains an argument here. Usage brassModel_ui(pressure) : _ Where: pressure : the pressure of the air flow created by the virtual performer (0-1). This can also be any kind of signal that will be directly injected in the mouthpiece (e.g., breath noise, etc.). (pm.)brass_ui Ready-to-use brass instrument physical model with built-in UI based on brassModel . Usage brass_ui : _ (pm.)brass_ui_MIDI Ready-to-use MIDI-controllable brass instrument physical model with built-in UI. Usage brass_ui_MIDI : _ (pm.)fluteModel A simple generic flute instrument physical model without tone holes (pitch is changed by changing the length of the tube of the instrument). Usage fluteModel(tubeLength,mouthPosition,pressure) : _ Where: tubeLength : the length of the tube in meters mouthPosition : position of the mouth on the embouchure (0-1) (default: 0.5) pressure : the pressure of the air flow created by the virtual performer (0-1). This can also be any kind of signal that will directly injected in the mouthpiece (e.g., breath noise, etc.). (pm.)fluteModel_ui Same as fluteModel but with a built-in UI. This function doesn't implement a virtual \"blower\", thus pressure remains an argument here. Usage fluteModel_ui(pressure) : _ Where: pressure : the pressure of the air flow created by the virtual performer (0-1). This can also be any kind of signal that will be directly injected in the mouthpiece (e.g., breath noise, etc.). (pm.)flute_ui Ready-to-use flute physical model with built-in UI based on fluteModel . Usage flute_ui : _ (pm.)flute_ui_MIDI Ready-to-use MIDI-controllable flute physical model with built-in UI. Usage flute_ui_MIDI : _ Exciters Various kind of excitation signal generators. (pm.)impulseExcitation Creates an impulse excitation of one sample. Usage gate = button('gate'); impulseExcitation(gate) : chain; Where: gate : a gate button (pm.)strikeModel Creates a filtered noise excitation. Usage gate = button('gate'); strikeModel(LPcutoff,HPcutoff,sharpness,gain,gate) : chain; Where: HPcutoff : highpass cutoff frequency LPcutoff : lowpass cutoff frequency sharpness : sharpness of the attack and release (0-1) gain : gain of the excitation gate : a gate button/trigger signal (0/1) (pm.)strike Strikes generator with controllable excitation position. Usage gate = button('gate'); strike(exPos,sharpness,gain,gate) : chain; Where: exPos : excitation position wiht 0: for max low freqs and 1: for max high freqs. So, on membrane for example, 0 would be the middle and 1 the edge sharpness : sharpness of the attack and release (0-1) gain : gain of the excitation gate : a gate button/trigger signal (0/1) (pm.)pluckString Creates a plucking excitation signal. Usage trigger = button('gate'); pluckString(stringLength,cutoff,maxFreq,sharpness,trigger) Where: stringLength : length of the string to pluck cutoff : cutoff ratio (1 for default) maxFreq : max frequency ratio (1 for default) sharpness : sharpness of the attack and release (1 for default) gain : gain of the excitation (0-1) trigger : trigger signal (1 for on, 0 for off) (pm.)blower A virtual blower creating a DC signal with some breath noise in it. Usage blower(pressure,breathGain,breathCutoff) : _ Where: pressure : pressure (0-1) breathGain : breath noise gain (0-1) (recommended: 0.005) breathCutoff : breath cuttoff frequency (Hz) (recommended: 2000) (pm.)blower_ui Same as blower but with a built-in UI. Usage blower : somethingToBeBlown Modal Percussions High and low level functions for modal synthesis of percussion instruments. (pm.)djembeModel Dirt-simple djembe modal physical model. Mode parameters are empirically calculated and don't correspond to any measurements or 3D model. They kind of sound good though :). Usage excitation : djembeModel(freq) Where: excitation : excitation signal freq : fundamental frequency of the bar (pm.)djembe Dirt-simple djembe modal physical model. Mode parameters are empirically calculated and don't correspond to any measurements or 3D model. They kind of sound good though :). This model also implements a virtual \"exciter\". Usage djembe(freq,strikePosition,strikeSharpness,gain,trigger) Where: freq : fundamental frequency of the model strikePosition : strike position (0 for the middle of the membrane and 1 for the edge) strikeSharpness : sharpness of the strike (0-1, default: 0.5) gain : gain of the strike trigger : trigger signal (0: off, 1: on) (pm.)djembe_ui_MIDI Simple MIDI controllable djembe physical model with built-in UI. Usage djembe_ui_MIDI : _ (pm.)marimbaBarModel Generic marimba tone bar modal model. This model was generated using mesh2faust from a 3D CAD model of a marimba tone bar ( libraries/modalmodels/marimbaBar ). The corresponding CAD model is that of a C2 tone bar (original fundamental frequency: ~65Hz). While marimbaBarModel allows to translate the harmonic content of the generated sound by providing a frequency ( freq ), mode transposition has limits and the model will sound less and less like a marimba tone bar as it diverges from C2. To make an accurate model of a marimba, we'd want to have an independent model for each bar... This model contains 5 excitation positions going linearly from the center bottom to the center top of the bar. Obviously, a model with more excitation position could be regenerated using mesh2faust . Usage excitation : marimbaBarModel(freq,exPos,t60,t60DecayRatio,t60DecaySlope) Where: excitation : excitation signal freq : fundamental frequency of the bar exPos : excitation position (0-4) t60 : T60 in seconds (recommended value: 0.1) t60DecayRatio : T60 decay ratio (recommended value: 1) t60DecaySlope : T60 decay slope (recommended value: 5) (pm.)marimbaResTube Simple marimba resonance tube. Usage marimbaResTube(tubeLength,excitation) Where: tubeLength : the length of the tube in meters excitation : the excitation signal (audio in) (pm.)marimbaModel Simple marimba physical model implementing a single tone bar connected to tube. This model is scalable and can be adapted to any size of bar/tube (see marimbaBarModel to know more about the limitations of this type of system). Usage excitation : marimbaModel(freq,exPos) : _ Where: freq : the frequency of the bar/tube couple exPos : excitation position (0-4) (pm.)marimba Simple marimba physical model implementing a single tone bar connected to tube. This model is scalable and can be adapted to any size of bar/tube (see marimbaBarModel to know more about the limitations of this type of system). This function also implement a virtual exciter to drive the model. Usage excitation : marimba(freq,strikePosition,strikeCutoff,strikeSharpness,gain,trigger) : _ Where: excitation : the excitation signal freq : the frequency of the bar/tube couple strikePosition : strike position (0-4) strikeCutoff : cuttoff frequency of the strike genarator (recommended: ~7000Hz) strikeSharpness : sharpness of the strike (recommended: ~0.25) gain : gain of the strike (0-1) trigger signal (0: off, 1: on) (pm.)marimba_ui_MIDI Simple MIDI controllable marimba physical model with built-in UI implementing a single tone bar connected to tube. This model is scalable and can be adapted to any size of bar/tube (see marimbaBarModel to know more about the limitations of this type of system). Usage marimba_ui_MIDI : _ (pm.)churchBellModel Generic church bell modal model generated by mesh2faust from libraries/modalmodels/churchBell . Modeled after T. Rossing and R. Perrin, Vibrations of Bells, Applied Acoustics 2, 1987. Model height is 301 mm. This model contains 7 excitation positions going linearly from the bottom to the top of the bell. Obviously, a model with more excitation position could be regenerated using mesh2faust . Usage excitation : churchBellModel(nModes,exPos,t60,t60DecayRatio,t60DecaySlope) Where: excitation : the excitation signal nModes : number of synthesized modes (max: 50) exPos : excitation position (0-6) t60 : T60 in seconds (recommended value: 0.1) t60DecayRatio : T60 decay ratio (recommended value: 1) t60DecaySlope : T60 decay slope (recommended value: 5) (pm.)churchBell Generic church bell modal model. Modeled after T. Rossing and R. Perrin, Vibrations of Bells, Applied Acoustics 2, 1987. Model height is 301 mm. This model contains 7 excitation positions going linearly from the bottom to the top of the bell. Obviously, a model with more excitation position could be regenerated using mesh2faust . This function also implement a virtual exciter to drive the model. Usage excitation : churchBell(strikePosition,strikeCutoff,strikeSharpness,gain,trigger) : _ Where: excitation : the excitation signal strikePosition : strike position (0-6) strikeCutoff : cuttoff frequency of the strike genarator (recommended: ~7000Hz) strikeSharpness : sharpness of the strike (recommended: ~0.25) gain : gain of the strike (0-1) trigger signal (0: off, 1: on) (pm.)churchBell_ui Church bell physical model based on churchBell with built-in UI. Usage churchBell_ui : _ (pm.)englishBellModel English church bell modal model generated by mesh2faust from libraries/modalmodels/englishBell . Modeled after D.Bartocha and Baron, Influence of Tin Bronze Melting and Pouring Parameters on Its Properties and Bell' Tone, Archives of Foundry Engineering, 2016. Model height is 1 m. This model contains 7 excitation positions going linearly from the bottom to the top of the bell. Obviously, a model with more excitation position could be regenerated using mesh2faust . Usage excitation : englishBellModel(nModes,exPos,t60,t60DecayRatio,t60DecaySlope) Where: excitation : the excitation signal nModes : number of synthesized modes (max: 50) exPos : excitation position (0-6) t60 : T60 in seconds (recommended value: 0.1) t60DecayRatio : T60 decay ratio (recommended value: 1) t60DecaySlope : T60 decay slope (recommended value: 5) (pm.)englishBell English church bell modal model. Modeled after D.Bartocha and Baron, Influence of Tin Bronze Melting and Pouring Parameters on Its Properties and Bell' Tone, Archives of Foundry Engineering, 2016. Model height is 1 m. This model contains 7 excitation positions going linearly from the bottom to the top of the bell. Obviously, a model with more excitation position could be regenerated using mesh2faust . This function also implement a virtual exciter to drive the model. Usage excitation : englishBell(strikePosition,strikeCutoff,strikeSharpness,gain,trigger) : _ Where: excitation : the excitation signal strikePosition : strike position (0-6) strikeCutoff : cuttoff frequency of the strike genarator (recommended: ~7000Hz) strikeSharpness : sharpness of the strike (recommended: ~0.25) gain : gain of the strike (0-1) trigger signal (0: off, 1: on) (pm.)englishBell_ui English church bell physical model based on englishBell with built-in UI. Usage englishBell_ui : _ (pm.)frenchBellModel French church bell modal model generated by mesh2faust from libraries/modalmodels/frenchBell . Modeled after D.Bartocha and Baron, Influence of Tin Bronze Melting and Pouring Parameters on Its Properties and Bell' Tone, Archives of Foundry Engineering, 2016. Model height is 1 m. This model contains 7 excitation positions going linearly from the bottom to the top of the bell. Obviously, a model with more excitation position could be regenerated using mesh2faust . Usage excitation : frenchBellModel(nModes,exPos,t60,t60DecayRatio,t60DecaySlope) Where: excitation : the excitation signal nModes : number of synthesized modes (max: 50) exPos : excitation position (0-6) t60 : T60 in seconds (recommended value: 0.1) t60DecayRatio : T60 decay ratio (recommended value: 1) t60DecaySlope : T60 decay slope (recommended value: 5) (pm.)frenchBell French church bell modal model. Modeled after D.Bartocha and Baron, Influence of Tin Bronze Melting and Pouring Parameters on Its Properties and Bell' Tone, Archives of Foundry Engineering, 2016. Model height is 1 m. This model contains 7 excitation positions going linearly from the bottom to the top of the bell. Obviously, a model with more excitation position could be regenerated using mesh2faust . This function also implement a virtual exciter to drive the model. Usage excitation : frenchBell(strikePosition,strikeCutoff,strikeSharpness,gain,trigger) : _ Where: excitation : the excitation signal strikePosition : strike position (0-6) strikeCutoff : cuttoff frequency of the strike genarator (recommended: ~7000Hz) strikeSharpness : sharpness of the strike (recommended: ~0.25) gain : gain of the strike (0-1) trigger signal (0: off, 1: on) (pm.)frenchBell_ui French church bell physical model based on frenchBell with built-in UI. Usage frenchBell_ui : _ (pm.)germanBellModel German church bell modal model generated by mesh2faust from libraries/modalmodels/germanBell . Modeled after D.Bartocha and Baron, Influence of Tin Bronze Melting and Pouring Parameters on Its Properties and Bell' Tone, Archives of Foundry Engineering, 2016. Model height is 1 m. This model contains 7 excitation positions going linearly from the bottom to the top of the bell. Obviously, a model with more excitation position could be regenerated using mesh2faust . Usage excitation : germanBellModel(nModes,exPos,t60,t60DecayRatio,t60DecaySlope) Where: excitation : the excitation signal nModes : number of synthesized modes (max: 50) exPos : excitation position (0-6) t60 : T60 in seconds (recommended value: 0.1) t60DecayRatio : T60 decay ratio (recommended value: 1) t60DecaySlope : T60 decay slope (recommended value: 5) (pm.)germanBell German church bell modal model. Modeled after D.Bartocha and Baron, Influence of Tin Bronze Melting and Pouring Parameters on Its Properties and Bell' Tone, Archives of Foundry Engineering, 2016. Model height is 1 m. This model contains 7 excitation positions going linearly from the bottom to the top of the bell. Obviously, a model with more excitation position could be regenerated using mesh2faust . This function also implement a virtual exciter to drive the model. Usage excitation : germanBell(strikePosition,strikeCutoff,strikeSharpness,gain,trigger) : _ Where: excitation : the excitation signal strikePosition : strike position (0-6) strikeCutoff : cuttoff frequency of the strike genarator (recommended: ~7000Hz) strikeSharpness : sharpness of the strike (recommended: ~0.25) gain : gain of the strike (0-1) trigger signal (0: off, 1: on) (pm.)germanBell_ui German church bell physical model based on germanBell with built-in UI. Usage germanBell_ui : _ (pm.)russianBellModel Russian church bell modal model generated by mesh2faust from libraries/modalmodels/russianBell . Modeled after D.Bartocha and Baron, Influence of Tin Bronze Melting and Pouring Parameters on Its Properties and Bell' Tone, Archives of Foundry Engineering, 2016. Model height is 2 m. This model contains 7 excitation positions going linearly from the bottom to the top of the bell. Obviously, a model with more excitation position could be regenerated using mesh2faust . Usage excitation : russianBellModel(nModes,exPos,t60,t60DecayRatio,t60DecaySlope) Where: excitation : the excitation signal nModes : number of synthesized modes (max: 50) exPos : excitation position (0-6) t60 : T60 in seconds (recommended value: 0.1) t60DecayRatio : T60 decay ratio (recommended value: 1) t60DecaySlope : T60 decay slope (recommended value: 5) (pm.)russianBell Russian church bell modal model. Modeled after D.Bartocha and Baron, Influence of Tin Bronze Melting and Pouring Parameters on Its Properties and Bell' Tone, Archives of Foundry Engineering, 2016. Model height is 2 m. This model contains 7 excitation positions going linearly from the bottom to the top of the bell. Obviously, a model with more excitation position could be regenerated using mesh2faust . This function also implement a virtual exciter to drive the model. Usage excitation : russianBell(strikePosition,strikeCutoff,strikeSharpness,gain,trigger) : _ Where: excitation : the excitation signal strikePosition : strike position (0-6) strikeCutoff : cuttoff frequency of the strike genarator (recommended: ~7000Hz) strikeSharpness : sharpness of the strike (recommended: ~0.25) gain : gain of the strike (0-1) trigger signal (0: off, 1: on) (pm.)russianBell_ui Russian church bell physical model based on russianBell with built-in UI. Usage russianBell_ui : _ (pm.)standardBellModel Standard church bell modal model generated by mesh2faust from libraries/modalmodels/standardBell . Modeled after T. Rossing and R. Perrin, Vibrations of Bells, Applied Acoustics 2, 1987. Model height is 1.8 m. This model contains 7 excitation positions going linearly from the bottom to the top of the bell. Obviously, a model with more excitation position could be regenerated using mesh2faust . Usage excitation : standardBellModel(nModes,exPos,t60,t60DecayRatio,t60DecaySlope) Where: excitation : the excitation signal nModes : number of synthesized modes (max: 50) exPos : excitation position (0-6) t60 : T60 in seconds (recommended value: 0.1) t60DecayRatio : T60 decay ratio (recommended value: 1) t60DecaySlope : T60 decay slope (recommended value: 5) (pm.)standardBell Standard church bell modal model. Modeled after T. Rossing and R. Perrin, Vibrations of Bells, Applied Acoustics 2, 1987. Model height is 1.8 m. This model contains 7 excitation positions going linearly from the bottom to the top of the bell. Obviously, a model with more excitation position could be regenerated using mesh2faust . This function also implement a virtual exciter to drive the model. Usage excitation : standardBell(strikePosition,strikeCutoff,strikeSharpness,gain,trigger) : _ Where: excitation : the excitation signal strikePosition : strike position (0-6) strikeCutoff : cuttoff frequency of the strike genarator (recommended: ~7000Hz) strikeSharpness : sharpness of the strike (recommended: ~0.25) gain : gain of the strike (0-1) trigger signal (0: off, 1: on) (pm.)standardBell_ui Standard church bell physical model based on standardBell with built-in UI. Usage standardBell_ui : _ Vocal Synthesis Vocal synthesizer functions (source/filter, fof, etc.). (pm.)formantValues Formant data values. The formant data used here come from the CSOUND manual * http://www.csounds.com/manual/html/ . Usage ba.take(j+1,formantValues.f(i)) : _ ba.take(j+1,formantValues.g(i)) : _ ba.take(j+1,formantValues.bw(i)) : _ Where: i : formant number j : (voiceType*nFormants)+vowel voiceType : the voice type (0: alto, 1: bass, 2: countertenor, 3: soprano, 4: tenor) vowel : the vowel (0: a, 1: e, 2: i, 3: o, 4: u) (pm.)voiceGender Calculate the gender for the provided voiceType value. (0: male, 1: female) Usage voiceGender(voiceType) : _ Where: voiceType : the voice type (0: alto, 1: bass, 2: countertenor, 3: soprano, 4: tenor) (pm.)skirtWidthMultiplier Calculates value to multiply bandwidth to obtain skirtwidth for a Fof filter. Usage skirtWidthMultiplier(vowel,freq,gender) : _ Where: vowel : the vowel (0: a, 1: e, 2: i, 3: o, 4: u) freq : the fundamental frequency of the excitation signal gender : gender of the voice used in the fof filter (0: male, 1: female) (pm.)autobendFreq Autobends the center frequencies of formants 1 and 2 based on the fundamental frequency of the excitation signal and leaves all other formant frequencies unchanged. Ported from chant-lib . Reference https://ccrma.stanford.edu/~rmichon/chantLib/ . Usage _ : autobendFreq(n,freq,voiceType) : _ Where: n : formant index freq : the fundamental frequency of the excitation signal voiceType : the voice type (0: alto, 1: bass, 2: countertenor, 3: soprano, 4: tenor) input is the center frequency of the corresponding formant (pm.)vocalEffort Changes the gains of the formants based on the fundamental frequency of the excitation signal. Higher formants are reinforced for higher fundamental frequencies. Ported from chant-lib . Reference https://ccrma.stanford.edu/~rmichon/chantLib/ . Usage _ : vocalEffort(freq,gender) : _ Where: freq : the fundamental frequency of the excitation signal gender : the gender of the voice type (0: male, 1: female) input is the linear amplitude of the formant (pm.)fof Function to generate a single Formant-Wave-Function. Reference https://ccrma.stanford.edu/~mjolsen/pdfs/smc2016_MOlsenFOF.pdf . Usage _ : fof(fc,bw,a,g) : _ Where: fc : formant center frequency, bw : formant bandwidth (Hz), sw : formant skirtwidth (Hz) g : linear scale factor (g=1 gives 0dB amplitude response at fc) input is an impulse signal to excite filter (pm.)fofSH FOF with sample and hold used on bw and a parameter used in the filter-cycling FOF function fofCycle . Reference https://ccrma.stanford.edu/~mjolsen/pdfs/smc2016_MOlsenFOF.pdf . Usage _ : fofSH(fc,bw,a,g) : _ Where: all parameters same as for fof (pm.)fofCycle FOF implementation where time-varying filter parameter noise is mitigated by using a cycle of n sample and hold FOF filters. Reference https://ccrma.stanford.edu/~mjolsen/pdfs/smc2016_MOlsenFOF.pdf . Usage _ : fofCycle(fc,bw,a,g,n) : _ Where: n : the number of FOF filters to cycle through all other parameters are same as for fof (pm.)fofSmooth FOF implementation where time-varying filter parameter noise is mitigated by lowpass filtering the filter parameters bw and a with smooth . Usage _ : fofSmooth(fc,bw,sw,g,tau) : _ Where: tau : the desired smoothing time constant in seconds all other parameters are same as for fof (pm.)formantFilterFofCycle Formant filter based on a single FOF filter. Formant parameters are linearly interpolated allowing to go smoothly from one vowel to another. A cycle of n fof filters with sample-and-hold is used so that the fof filter parameters can be varied in realtime. This technique is more robust but more computationally expensive than formantFilterFofSmooth .Voice type can be selected but must correspond to the frequency range of the provided source to be realistic. Usage _ : formantFilterFofCycle(voiceType,vowel,nFormants,i,freq) : _ Where: voiceType : the voice type (0: alto, 1: bass, 2: countertenor, 3: soprano, 4: tenor) vowel : the vowel (0: a, 1: e, 2: i, 3: o, 4: u) nFormants : number of formant regions in frequency domain, typically 5 i : formant number (i.e. 0 - 4) used to index formant data value arrays freq : fundamental frequency of excitation signal. Used to calculate rise time of envelope (pm.)formantFilterFofSmooth Formant filter based on a single FOF filter. Formant parameters are linearly interpolated allowing to go smoothly from one vowel to another. Fof filter parameters are lowpass filtered to mitigate possible noise from varying them in realtime. Voice type can be selected but must correspond to the frequency range of the provided source to be realistic. Usage _ : formantFilterFofSmooth(voiceType,vowel,nFormants,i,freq) : _ Where: voiceType : the voice type (0: alto, 1: bass, 2: countertenor, 3: soprano, 4: tenor) vowel : the vowel (0: a, 1: e, 2: i, 3: o, 4: u) nFormants : number of formant regions in frequency domain, typically 5 i : formant number (i.e. 1 - 5) used to index formant data value arrays freq : fundamental frequency of excitation signal. Used to calculate rise time of envelope (pm.)formantFilterBP Formant filter based on a single resonant bandpass filter. Formant parameters are linearly interpolated allowing to go smoothly from one vowel to another. Voice type can be selected but must correspond to the frequency range of the provided source to be realistic. Usage _ : formantFilterBP(voiceType,vowel,nFormants,i,freq) : _ Where: voiceType : the voice type (0: alto, 1: bass, 2: countertenor, 3: soprano, 4: tenor) vowel : the vowel (0: a, 1: e, 2: i, 3: o, 4: u) nFormants : number of formant regions in frequency domain, typically 5 i : formant index used to index formant data value arrays freq : fundamental frequency of excitation signal. (pm.)formantFilterbank Formant filterbank which can use different types of filterbank functions and different excitation signals. Formant parameters are linearly interpolated allowing to go smoothly from one vowel to another. Voice type can be selected but must correspond to the frequency range of the provided source to be realistic. Usage _ : formantFilterbank(voiceType,vowel,formantGen,freq) : _ Where: voiceType : the voice type (0: alto, 1: bass, 2: countertenor, 3: soprano, 4: tenor) vowel : the vowel (0: a, 1: e, 2: i, 3: o, 4: u) formantGen : the specific formant filterbank function (i.e. FormantFilterbankBP, FormantFilterbankFof,...) freq : fundamental frequency of excitation signal. Needed for FOF version to calculate rise time of envelope (pm.)formantFilterbankFofCycle Formant filterbank based on a bank of fof filters. Formant parameters are linearly interpolated allowing to go smoothly from one vowel to another. Voice type can be selected but must correspond to the frequency range of the provided source to be realistic. Usage _ : formantFilterbankFofCycle(voiceType,vowel,freq) : _ Where: voiceType : the voice type (0: alto, 1: bass, 2: countertenor, 3: soprano, 4: tenor) vowel : the vowel (0: a, 1: e, 2: i, 3: o, 4: u) freq : the fundamental frequency of the excitation signal. Needed to calculate the skirtwidth of the FOF envelopes and for the autobendFreq and vocalEffort functions (pm.)formantFilterbankFofSmooth Formant filterbank based on a bank of fof filters. Formant parameters are linearly interpolated allowing to go smoothly from one vowel to another. Voice type can be selected but must correspond to the frequency range of the provided source to be realistic. Usage _ : formantFilterbankFofSmooth(voiceType,vowel,freq) : _ Where: voiceType : the voice type (0: alto, 1: bass, 2: countertenor, 3: soprano, 4: tenor) vowel : the vowel (0: a, 1: e, 2: i, 3: o, 4: u) freq : the fundamental frequency of the excitation signal. Needed to calculate the skirtwidth of the FOF envelopes and for the autobendFreq and vocalEffort functions (pm.)formantFilterbankBP Formant filterbank based on a bank of resonant bandpass filters. Formant parameters are linearly interpolated allowing to go smoothly from one vowel to another. Voice type can be selected but must correspond to the frequency range of the provided source to be realistic. Usage _ : formantFilterbankBP(voiceType,vowel,freq) : _ Where: voiceType : the voice type (0: alto, 1: bass, 2: countertenor, 3: soprano, 4: tenor) vowel : the vowel (0: a, 1: e, 2: i, 3: o, 4: u) freq : the fundamental frequency of the excitation signal. Needed for the autobendFreq and vocalEffort functions (pm.)SFFormantModel Simple formant/vocal synthesizer based on a source/filter model. The source and filterbank must be specified by the user. filterbank must take the same input parameters as formantFilterbank ( BP / FofCycle / FofSmooth ). Formant parameters are linearly interpolated allowing to go smoothly from one vowel to another. Voice type can be selected but must correspond to the frequency range of the synthesized voice to be realistic. Usage SFFormantModel(voiceType,vowel,exType,freq,gain,source,filterbank,isFof) : _ Where: voiceType : the voice type (0: alto, 1: bass, 2: countertenor, 3: soprano, 4: tenor) vowel : the vowel (0: a, 1: e, 2: i, 3: o, 4: u exType : voice vs. fricative sound ratio (0-1 where 1 is 100% fricative) freq : the fundamental frequency of the source signal gain : linear gain multiplier to multiply the source by isFof : whether model is FOF based (0: no, 1: yes) (pm.)SFFormantModelFofCycle Simple formant/vocal synthesizer based on a source/filter model. The source is just a periodic impulse and the \"filter\" is a bank of FOF filters. Formant parameters are linearly interpolated allowing to go smoothly from one vowel to another. Voice type can be selected but must correspond to the frequency range of the synthesized voice to be realistic. This model does not work with noise in the source signal so exType has been removed and model does not depend on SFFormantModel function. Usage SFFormantModelFofCycle(voiceType,vowel,freq,gain) : _ Where: voiceType : the voice type (0: alto, 1: bass, 2: countertenor, 3: soprano, 4: tenor) vowel : the vowel (0: a, 1: e, 2: i, 3: o, 4: u freq : the fundamental frequency of the source signal gain : linear gain multiplier to multiply the source by (pm.)SFFormantModelFofSmooth Simple formant/vocal synthesizer based on a source/filter model. The source is just a periodic impulse and the \"filter\" is a bank of FOF filters. Formant parameters are linearly interpolated allowing to go smoothly from one vowel to another. Voice type can be selected but must correspond to the frequency range of the synthesized voice to be realistic. Usage SFFormantModelFofSmooth(voiceType,vowel,freq,gain) : _ Where: voiceType : the voice type (0: alto, 1: bass, 2: countertenor, 3: soprano, 4: tenor) vowel : the vowel (0: a, 1: e, 2: i, 3: o, 4: u freq : the fundamental frequency of the source signal gain : linear gain multiplier to multiply the source by (pm.)SFFormantModelBP Simple formant/vocal synthesizer based on a source/filter model. The source is just a sawtooth wave and the \"filter\" is a bank of resonant bandpass filters. Formant parameters are linearly interpolated allowing to go smoothly from one vowel to another. Voice type can be selected but must correspond to the frequency range of the synthesized voice to be realistic. The formant data used here come from the CSOUND manual * http://www.csounds.com/manual/html/ . Usage SFFormantModelBP(voiceType,vowel,exType,freq,gain) : _ Where: voiceType : the voice type (0: alto, 1: bass, 2: countertenor, 3: soprano, 4: tenor) vowel : the vowel (0: a, 1: e, 2: i, 3: o, 4: u exType : voice vs. fricative sound ratio (0-1 where 1 is 100% fricative) freq : the fundamental frequency of the source signal gain : linear gain multiplier to multiply the source by (pm.)SFFormantModelFofCycle_ui Ready-to-use source-filter vocal synthesizer with built-in user interface. Usage SFFormantModelFofCycle_ui : _ (pm.)SFFormantModelFofSmooth_ui Ready-to-use source-filter vocal synthesizer with built-in user interface. Usage SFFormantModelFofSmooth_ui : _ (pm.)SFFormantModelBP_ui Ready-to-use source-filter vocal synthesizer with built-in user interface. Usage SFFormantModelBP_ui : _ (pm.)SFFormantModelFofCycle_ui_MIDI Ready-to-use MIDI-controllable source-filter vocal synthesizer. Usage SFFormantModelFofCycle_ui_MIDI : _ (pm.)SFFormantModelFofSmooth_ui_MIDI Ready-to-use MIDI-controllable source-filter vocal synthesizer. Usage SFFormantModelFofSmooth_ui_MIDI : _ (pm.)SFFormantModelBP_ui_MIDI Ready-to-use MIDI-controllable source-filter vocal synthesizer. Usage SFFormantModelBP_ui_MIDI : _ Misc Functions Various miscellaneous functions. (pm.)allpassNL Bidirectional block adding nonlinearities in both directions in a chain. Nonlinearities are created by modulating the coefficients of a passive allpass filter by the signal it is processing. Usage chain(... : allpassNL(nonlinearity) : ...) Where: nonlinearity : amount of nonlinearity to be added (0-1) (pm).modalModel Implement multiple resonance modes using resonant bandpass filters. Usage _ : modalModel(n, freqs, t60s, gains) : _ Where: n : number of given modes freqs : list of filter center freqencies t60s : list of mode resonance durations (in seconds) gains : list of mode gains (0-1) For example, to generate a model with 2 modes (440 Hz and 660 Hz, a fifth) where the higher one decays faster and is attenuated: os.impulse : modalModel(2, (440, 660), (0.5, 0.25), (ba.db2linear(-1), ba.db2linear(-6)) : _ Further reading: Grumiaux et. al., 2017: Impulse-Response and CAD-Model-Based Physical Modeling in Faust","title":" physmodels "},{"location":"libs/physmodels/#physmodelslib","text":"Faust physical modeling library. Its official prefix is pm . This library provides an environment to facilitate physical modeling of musical instruments. It contains dozens of functions implementing low and high level elements going from a simple waveguide to fully operational models with built-in UI, etc. It is organized as follows: Global Variables : useful pre-defined variables for physical modeling (e.g., speed of sound, etc.). Conversion Tools : conversion functions specific to physical modeling (e.g., length to frequency, etc.). Bidirectional Utilities : functions to create bidirectional block diagrams for physical modeling. Basic Elements : waveguides, specific types of filters, etc. String Instruments : various types of strings (e.g., steel, nylon, etc.), bridges, guitars, etc. Bowed String Instruments : parts and models specific to bowed string instruments (e.g., bows, bridges, violins, etc.). Wind Instrument : parts and models specific to wind instruments (e.g., reeds, mouthpieces, flutes, clarinets, etc.). Exciters : pluck generators, \"blowers\", etc. Modal Percussions : percussion instruments based on modal models. Vocal Synthesis : functions for various vocal synthesis techniques (e.g., fof, source/filter, etc.) and vocal synthesizers. Misc Functions : any other functions that don't fit in the previous category (e.g., nonlinear filters, etc.). This library is part of the Faust Physical Modeling ToolKit. More information on how to use this library can be found on this page . Tutorials on how to make physical models of musical instruments using Faust can be found here as well.","title":"physmodels.lib"},{"location":"libs/physmodels/#references","text":"https://github.com/grame-cncm/faustlibraries/blob/master/physmodels.lib","title":"References"},{"location":"libs/physmodels/#global-variables","text":"Useful pre-defined variables for physical modeling.","title":"Global Variables"},{"location":"libs/physmodels/#pmspeedofsound","text":"Speed of sound in meters per second (340m/s).","title":"(pm.)speedOfSound"},{"location":"libs/physmodels/#pmmaxlength","text":"The default maximum length (3) in meters of strings and tubes used in this library. This variable should be overriden to allow longer strings or tubes.","title":"(pm.)maxLength"},{"location":"libs/physmodels/#conversion-tools","text":"Useful conversion tools for physical modeling.","title":"Conversion Tools"},{"location":"libs/physmodels/#pmf2l","text":"Frequency to length in meters.","title":"(pm.)f2l"},{"location":"libs/physmodels/#usage","text":"f2l(freq) : distanceInMeters Where: freq : the frequency","title":"Usage"},{"location":"libs/physmodels/#pml2f","text":"Length in meters to frequency.","title":"(pm.)l2f"},{"location":"libs/physmodels/#usage_1","text":"l2f(length) : freq Where: length : length/distance in meters","title":"Usage"},{"location":"libs/physmodels/#pml2s","text":"Length in meters to number of samples.","title":"(pm.)l2s"},{"location":"libs/physmodels/#usage_2","text":"l2s(l) : numberOfSamples Where: l : length in meters","title":"Usage"},{"location":"libs/physmodels/#bidirectional-utilities","text":"Set of fundamental functions to create bi-directional block diagrams in Faust. These elements are used as the basis of this library to connect high level elements (e.g., mouthpieces, strings, bridge, instrument body, etc.). Each block has 3 inputs and 3 outputs. The first input/output carry left going waves, the second input/output carry right going waves, and the third input/output is used to carry any potential output signal to the end of the algorithm.","title":"Bidirectional Utilities"},{"location":"libs/physmodels/#pmbasicblock","text":"Empty bidirectional block to be used with chain : 3 signals ins and 3 signals out.","title":"(pm.)basicBlock"},{"location":"libs/physmodels/#usage_3","text":"chain(basicBlock : basicBlock : etc.)","title":"Usage"},{"location":"libs/physmodels/#pmchain","text":"Creates a chain of bidirectional blocks. Blocks must have 3 inputs and outputs. The first input/output carry left going waves, the second input/output carry right going waves, and the third input/output is used to carry any potential output signal to the end of the algorithm. The implied one sample delay created by the ~ operator is generalized to the left and right going waves. Thus, n blocks in chain() will add an n samples delay to both left and right going waves.","title":"(pm.)chain"},{"location":"libs/physmodels/#usage_4","text":"leftGoingWaves,rightGoingWaves,mixedOutput : chain( A : B ) : leftGoingWaves,rightGoingWaves,mixedOutput with{ A = _,_,_; };","title":"Usage"},{"location":"libs/physmodels/#pminleftwave","text":"Adds a signal to left going waves anywhere in a chain of blocks.","title":"(pm.)inLeftWave"},{"location":"libs/physmodels/#usage_5","text":"model(x) = chain(A : inLeftWave(x) : B) Where A and B are bidirectional blocks and x is the signal added to left going waves in that chain.","title":"Usage"},{"location":"libs/physmodels/#pminrightwave","text":"Adds a signal to right going waves anywhere in a chain of blocks.","title":"(pm.)inRightWave"},{"location":"libs/physmodels/#usage_6","text":"model(x) = chain(A : inRightWave(x) : B) Where A and B are bidirectional blocks and x is the signal added to right going waves in that chain.","title":"Usage"},{"location":"libs/physmodels/#pmin","text":"Adds a signal to left and right going waves anywhere in a chain of blocks.","title":"(pm.)in"},{"location":"libs/physmodels/#usage_7","text":"model(x) = chain(A : in(x) : B) Where A and B are bidirectional blocks and x is the signal added to left and right going waves in that chain.","title":"Usage"},{"location":"libs/physmodels/#pmoutleftwave","text":"Sends the signal of left going waves to the output channel of the chain .","title":"(pm.)outLeftWave"},{"location":"libs/physmodels/#usage_8","text":"chain(A : outLeftWave : B) Where A and B are bidirectional blocks.","title":"Usage"},{"location":"libs/physmodels/#pmoutrightwave","text":"Sends the signal of right going waves to the output channel of the chain .","title":"(pm.)outRightWave"},{"location":"libs/physmodels/#usage_9","text":"chain(A : outRightWave : B) Where A and B are bidirectional blocks.","title":"Usage"},{"location":"libs/physmodels/#pmout","text":"Sends the signal of right and left going waves to the output channel of the chain .","title":"(pm.)out"},{"location":"libs/physmodels/#usage_10","text":"chain(A : out : B) Where A and B are bidirectional blocks.","title":"Usage"},{"location":"libs/physmodels/#pmterminations","text":"Creates terminations on both sides of a chain without closing the inputs and outputs of the bidirectional signals chain. As for chain , this function adds a 1 sample delay to the bidirectional signal, both ways. Of course, this function can be nested within a chain .","title":"(pm.)terminations"},{"location":"libs/physmodels/#usage_11","text":"terminations(a,b,c) with{ };","title":"Usage"},{"location":"libs/physmodels/#pmltermination","text":"Creates a termination on the left side of a chain without closing the inputs and outputs of the bidirectional signals chain. This function adds a 1 sample delay near the termination and can be nested within another chain .","title":"(pm.)lTermination"},{"location":"libs/physmodels/#usage_12","text":"lTerminations(a,b) with{ };","title":"Usage"},{"location":"libs/physmodels/#pmrtermination","text":"Creates a termination on the right side of a chain without closing the inputs and outputs of the bidirectional signals chain. This function adds a 1 sample delay near the termination and can be nested within another chain .","title":"(pm.)rTermination"},{"location":"libs/physmodels/#usage_13","text":"rTerminations(b,c) with{ };","title":"Usage"},{"location":"libs/physmodels/#pmcloseins","text":"Closes the inputs of a bidirectional chain in all directions.","title":"(pm.)closeIns"},{"location":"libs/physmodels/#usage_14","text":"closeIns : chain(...) : _,_,_","title":"Usage"},{"location":"libs/physmodels/#pmcloseouts","text":"Closes the outputs of a bidirectional chain in all directions except for the main signal output (3d output).","title":"(pm.)closeOuts"},{"location":"libs/physmodels/#usage_15","text":"_,_,_ : chain(...) : _","title":"Usage"},{"location":"libs/physmodels/#pmendchain","text":"Closes the inputs and outputs of a bidirectional chain in all directions except for the main signal output (3d output).","title":"(pm.)endChain"},{"location":"libs/physmodels/#usage_16","text":"endChain(chain(...)) : _","title":"Usage"},{"location":"libs/physmodels/#basic-elements","text":"Basic elements for physical modeling (e.g., waveguides, specific filters, etc.).","title":"Basic Elements"},{"location":"libs/physmodels/#pmwaveguiden","text":"A series of waveguide functions based on various types of delays (see fdelay[n] ).","title":"(pm.)waveguideN"},{"location":"libs/physmodels/#list-of-functions","text":"waveguideUd : unit delay waveguide waveguideFd : fractional delay waveguide waveguideFd2 : second order fractional delay waveguide waveguideFd4 : fourth order fractional delay waveguide","title":"List of functions"},{"location":"libs/physmodels/#usage_17","text":"chain(A : waveguideUd(nMax,n) : B) Where: nMax : the maximum length of the delays in the waveguide n : the length of the delay lines in samples.","title":"Usage"},{"location":"libs/physmodels/#pmwaveguide","text":"Standard pm.lib waveguide (based on waveguideFd4 ).","title":"(pm.)waveguide"},{"location":"libs/physmodels/#usage_18","text":"chain(A : waveguide(nMax,n) : B) Where: nMax : the maximum length of the delays in the waveguide n : the length of the delay lines in samples.","title":"Usage"},{"location":"libs/physmodels/#pmbridgefilter","text":"Generic two zeros bridge FIR filter (as implemented in the STK ) that can be used to implement the reflectance violin, guitar, etc. bridges.","title":"(pm.)bridgeFilter"},{"location":"libs/physmodels/#usage_19","text":"_ : bridge(brightness,absorption) : _ Where: brightness : controls the damping of high frequencies (0-1) absorption : controls the absorption of the brige and thus the t60 of the string plugged to it (0-1) (1 = 20 seconds)","title":"Usage"},{"location":"libs/physmodels/#pmmodefilter","text":"Resonant bandpass filter that can be used to implement a single resonance (mode).","title":"(pm.)modeFilter"},{"location":"libs/physmodels/#usage_20","text":"_ : modeFilter(freq,t60,gain) : _ Where: freq : mode frequency t60 : mode resonance duration (in seconds) gain : mode gain (0-1)","title":"Usage"},{"location":"libs/physmodels/#string-instruments","text":"Low and high level string instruments parts. Most of the elements in this section can be used in a bidirectional chain.","title":"String Instruments"},{"location":"libs/physmodels/#pmstringsegment","text":"A string segment without terminations (just a simple waveguide).","title":"(pm.)stringSegment"},{"location":"libs/physmodels/#usage_21","text":"chain(A : stringSegment(maxLength,length) : B) Where: maxLength : the maximum length of the string in meters (should be static) length : the length of the string in meters","title":"Usage"},{"location":"libs/physmodels/#pmopenstring","text":"A bidirectional block implementing a basic \"generic\" string with a selectable excitation position. Lowpass filters are built-in and allow to simulate the effect of dispersion on the sound and thus to change the \"stiffness\" of the string.","title":"(pm.)openString"},{"location":"libs/physmodels/#usage_22","text":"chain(... : openString(length,stiffness,pluckPosition,excitation) : ...) Where: length : the length of the string in meters stiffness : the stiffness of the string (0-1) (1 for max stiffness) pluckPosition : excitation position (0-1) (1 is bottom) excitation : the excitation signal","title":"Usage"},{"location":"libs/physmodels/#pmnylonstring","text":"A bidirectional block implementing a basic nylon string with selectable excitation position. This element is based on openString and has a fix stiffness corresponding to that of a nylon string.","title":"(pm.)nylonString"},{"location":"libs/physmodels/#usage_23","text":"chain(... : nylonString(length,pluckPosition,excitation) : ...) Where: length : the length of the string in meters pluckPosition : excitation position (0-1) (1 is bottom) excitation : the excitation signal","title":"Usage"},{"location":"libs/physmodels/#pmsteelstring","text":"A bidirectional block implementing a basic steel string with selectable excitation position. This element is based on openString and has a fix stiffness corresponding to that of a steel string.","title":"(pm.)steelString"},{"location":"libs/physmodels/#usage_24","text":"chain(... : steelString(length,pluckPosition,excitation) : ...) Where: length : the length of the string in meters pluckPosition : excitation position (0-1) (1 is bottom) excitation : the excitation signal","title":"Usage"},{"location":"libs/physmodels/#pmopenstringpick","text":"A bidirectional block implementing a \"generic\" string with selectable excitation position. It also has a built-in pickup whose position is the same as the excitation position. Thus, moving the excitation position will also move the pickup.","title":"(pm.)openStringPick"},{"location":"libs/physmodels/#usage_25","text":"chain(... : openStringPick(length,stiffness,pluckPosition,excitation) : ...) Where: length : the length of the string in meters stiffness : the stiffness of the string (0-1) (1 for max stiffness) pluckPosition : excitation position (0-1) (1 is bottom) excitation : the excitation signal","title":"Usage"},{"location":"libs/physmodels/#pmopenstringpickup","text":"A bidirectional block implementing a \"generic\" string with selectable excitation position and stiffness. It also has a built-in pickup whose position can be independenly selected. The only constraint is that the pickup has to be placed after the excitation position.","title":"(pm.)openStringPickUp"},{"location":"libs/physmodels/#usage_26","text":"chain(... : openStringPickUp(length,stiffness,pluckPosition,excitation) : ...) Where: length : the length of the string in meters stiffness : the stiffness of the string (0-1) (1 for max stiffness) pluckPosition : pluck position between the top of the string and the pickup (0-1) (1 for same as pickup position) pickupPosition : position of the pickup on the string (0-1) (1 is bottom) excitation : the excitation signal","title":"Usage"},{"location":"libs/physmodels/#pmopenstringpickdown","text":"A bidirectional block implementing a \"generic\" string with selectable excitation position and stiffness. It also has a built-in pickup whose position can be independenly selected. The only constraint is that the pickup has to be placed before the excitation position.","title":"(pm.)openStringPickDown"},{"location":"libs/physmodels/#usage_27","text":"chain(... : openStringPickDown(length,stiffness,pluckPosition,excitation) : ...) Where: length : the length of the string in meters stiffness : the stiffness of the string (0-1) (1 for max stiffness) pluckPosition : pluck position on the string (0-1) (1 is bottom) pickupPosition : position of the pickup between the top of the string and the excitation position (0-1) (1 is excitation position) excitation : the excitation signal","title":"Usage"},{"location":"libs/physmodels/#pmksreflexionfilter","text":"The \"typical\" one-zero Karplus-strong feedforward reflexion filter. This filter will be typically used in a termination (see below).","title":"(pm.)ksReflexionFilter"},{"location":"libs/physmodels/#usage_28","text":"terminations(_,chain(...),ksReflexionFilter)","title":"Usage"},{"location":"libs/physmodels/#pmrstringrigidtermination","text":"Bidirectional block implementing a right rigid string termination (no damping, just phase inversion).","title":"(pm.)rStringRigidTermination"},{"location":"libs/physmodels/#usage_29","text":"chain(rStringRigidTermination : stringSegment : ...)","title":"Usage"},{"location":"libs/physmodels/#pmlstringrigidtermination","text":"Bidirectional block implementing a left rigid string termination (no damping, just phase inversion).","title":"(pm.)lStringRigidTermination"},{"location":"libs/physmodels/#usage_30","text":"chain(... : stringSegment : lStringRigidTermination)","title":"Usage"},{"location":"libs/physmodels/#pmelecguitarbridge","text":"Bidirectional block implementing a simple electric guitar bridge. This block is based on bridgeFilter . The bridge doesn't implement transmittance since it is not meant to be connected to a body (unlike acoustic guitar). It also partially sets the resonance duration of the string with the nuts used on the other side.","title":"(pm.)elecGuitarBridge"},{"location":"libs/physmodels/#usage_31","text":"chain(... : stringSegment : elecGuitarBridge)","title":"Usage"},{"location":"libs/physmodels/#pmelecguitarnuts","text":"Bidirectional block implementing a simple electric guitar nuts. This block is based on bridgeFilter and does essentially the same thing as elecGuitarBridge , but on the other side of the chain. It also partially sets the resonance duration of the string with the bridge used on the other side.","title":"(pm.)elecGuitarNuts"},{"location":"libs/physmodels/#usage_32","text":"chain(elecGuitarNuts : stringSegment : ...)","title":"Usage"},{"location":"libs/physmodels/#pmguitarbridge","text":"Bidirectional block implementing a simple acoustic guitar bridge. This bridge damps more hight frequencies than elecGuitarBridge and implements a transmittance filter. It also partially sets the resonance duration of the string with the nuts used on the other side.","title":"(pm.)guitarBridge"},{"location":"libs/physmodels/#usage_33","text":"chain(... : stringSegment : guitarBridge)","title":"Usage"},{"location":"libs/physmodels/#pmguitarnuts","text":"Bidirectional block implementing a simple acoustic guitar nuts. This nuts damps more hight frequencies than elecGuitarNuts and implements a transmittance filter. It also partially sets the resonance duration of the string with the bridge used on the other side.","title":"(pm.)guitarNuts"},{"location":"libs/physmodels/#usage_34","text":"chain(guitarNuts : stringSegment : ...)","title":"Usage"},{"location":"libs/physmodels/#pmidealstring","text":"An \"ideal\" string with rigid terminations and where the plucking position and the pick-up position are the same. Since terminations are rigid, this string will ring forever.","title":"(pm.)idealString"},{"location":"libs/physmodels/#usage_35","text":"1-1' : idealString(length,reflexion,xPosition,excitation) With: * length : the length of the string in meters * pluckPosition : the plucking position (0.001-0.999) * excitation : the input signal for the excitation.","title":"Usage"},{"location":"libs/physmodels/#pmks","text":"A Karplus-Strong string (in that case, the string is implemented as a one dimension waveguide).","title":"(pm.)ks"},{"location":"libs/physmodels/#usage_36","text":"ks(length,damping,excitation) : _ Where: length : the length of the string in meters damping : string damping (0-1) excitation : excitation signal","title":"Usage"},{"location":"libs/physmodels/#pmks_ui_midi","text":"Ready-to-use, MIDI-enabled Karplus-Strong string with buil-in UI.","title":"(pm.)ks_ui_MIDI"},{"location":"libs/physmodels/#usage_37","text":"ks_ui_MIDI : _","title":"Usage"},{"location":"libs/physmodels/#pmelecguitarmodel","text":"A simple electric guitar model (without audio effects, of course) with selectable pluck position. This model implements a single string. Additional strings should be created by making a polyphonic application out of this function. Pitch is changed by changing the length of the string and not through a finger model.","title":"(pm.)elecGuitarModel"},{"location":"libs/physmodels/#usage_38","text":"elecGuitarModel(length,pluckPosition,mute,excitation) : _ Where: length : the length of the string in meters pluckPosition : pluck position (0-1) (1 is on the bridge) mute : mute coefficient (1 for no mute and 0 for instant mute) excitation : excitation signal","title":"Usage"},{"location":"libs/physmodels/#pmelecguitar","text":"A simple electric guitar model with steel strings (based on elecGuitarModel ) implementing an excitation model. This model implements a single string. Additional strings should be created by making a polyphonic application out of this function.","title":"(pm.)elecGuitar"},{"location":"libs/physmodels/#usage_39","text":"elecGuitar(length,pluckPosition,trigger) : _ Where: length : the length of the string in meters pluckPosition : pluck position (0-1) (1 is on the bridge) mute : mute coefficient (1 for no mute and 0 for instant mute) gain : gain of the pluck (0-1) trigger : trigger signal (1 for on, 0 for off)","title":"Usage"},{"location":"libs/physmodels/#pmelecguitar_ui_midi","text":"Ready-to-use MIDI-enabled electric guitar physical model with built-in UI.","title":"(pm.)elecGuitar_ui_MIDI"},{"location":"libs/physmodels/#usage_40","text":"elecGuitar_ui_MIDI : _","title":"Usage"},{"location":"libs/physmodels/#pmguitarbody","text":"WARNING: not implemented yet! Bidirectional block implementing a simple acoustic guitar body.","title":"(pm.)guitarBody"},{"location":"libs/physmodels/#usage_41","text":"chain(... : guitarBody)","title":"Usage"},{"location":"libs/physmodels/#pmguitarmodel","text":"A simple acoustic guitar model with steel strings and selectable excitation position. This model implements a single string. Additional strings should be created by making a polyphonic application out of this function. Pitch is changed by changing the length of the string and not through a finger model. WARNING: this function doesn't currently implement a body (just strings and bridge).","title":"(pm.)guitarModel"},{"location":"libs/physmodels/#usage_42","text":"guitarModel(length,pluckPosition,excitation) : _ Where: length : the length of the string in meters pluckPosition : pluck position (0-1) (1 is on the bridge) excitation : excitation signal","title":"Usage"},{"location":"libs/physmodels/#pmguitar","text":"A simple acoustic guitar model with steel strings (based on guitarModel ) implementing an excitation model. This model implements a single string. Additional strings should be created by making a polyphonic application out of this function.","title":"(pm.)guitar"},{"location":"libs/physmodels/#usage_43","text":"guitar(length,pluckPosition,trigger) : _ Where: length : the length of the string in meters pluckPosition : pluck position (0-1) (1 is on the bridge) gain : gain of the excitation trigger : trigger signal (1 for on, 0 for off)","title":"Usage"},{"location":"libs/physmodels/#pmguitar_ui_midi","text":"Ready-to-use MIDI-enabled steel strings acoustic guitar physical model with built-in UI.","title":"(pm.)guitar_ui_MIDI"},{"location":"libs/physmodels/#usage_44","text":"guitar_ui_MIDI : _","title":"Usage"},{"location":"libs/physmodels/#pmnylonguitarmodel","text":"A simple acoustic guitar model with nylon strings and selectable excitation position. This model implements a single string. Additional strings should be created by making a polyphonic application out of this function. Pitch is changed by changing the length of the string and not through a finger model. WARNING: this function doesn't currently implement a body (just strings and bridge).","title":"(pm.)nylonGuitarModel"},{"location":"libs/physmodels/#usage_45","text":"nylonGuitarModel(length,pluckPosition,excitation) : _ Where: length : the length of the string in meters pluckPosition : pluck position (0-1) (1 is on the bridge) excitation : excitation signal","title":"Usage"},{"location":"libs/physmodels/#pmnylonguitar","text":"A simple acoustic guitar model with nylon strings (based on nylonGuitarModel ) implementing an excitation model. This model implements a single string. Additional strings should be created by making a polyphonic application out of this function.","title":"(pm.)nylonGuitar"},{"location":"libs/physmodels/#usage_46","text":"nylonGuitar(length,pluckPosition,trigger) : _ Where: length : the length of the string in meters pluckPosition : pluck position (0-1) (1 is on the bridge) gain : gain of the excitation (0-1) trigger : trigger signal (1 for on, 0 for off)","title":"Usage"},{"location":"libs/physmodels/#pmnylonguitar_ui_midi","text":"Ready-to-use MIDI-enabled nylon strings acoustic guitar physical model with built-in UI.","title":"(pm.)nylonGuitar_ui_MIDI"},{"location":"libs/physmodels/#usage_47","text":"nylonGuitar_ui_MIDI : _","title":"Usage"},{"location":"libs/physmodels/#pmmodeinterpres","text":"Modular string instrument resonator based on IR measurements made on 3D printed models. The 2D space allowing for the control of the shape and the scale of the model is enabled by interpolating between modes parameters. More information about this technique/project can be found here: * https://ccrma.stanford.edu/~rmichon/3dPrintingModeling/ .","title":"(pm.)modeInterpRes"},{"location":"libs/physmodels/#usage_48","text":"_ : modeInterpRes(nModes,x,y) : _ Where: nModes : number of modeled modes (40 max) x : shape of the resonator (0: square, 1: square with rounded corners, 2: round) y : scale of the resonator (0: small, 1: medium, 2: large)","title":"Usage"},{"location":"libs/physmodels/#pmmodularinterpbody","text":"Bidirectional block implementing a modular string instrument resonator (see modeInterpRes ).","title":"(pm.)modularInterpBody"},{"location":"libs/physmodels/#usage_49","text":"chain(... : modularInterpBody(nModes,shape,scale) : ...) Where: nModes : number of modeled modes (40 max) shape : shape of the resonator (0: square, 1: square with rounded corners, 2: round) scale : scale of the resonator (0: small, 1: medium, 2: large)","title":"Usage"},{"location":"libs/physmodels/#pmmodularinterpstringmodel","text":"String instrument model with a modular body (see modeInterpRes and * https://ccrma.stanford.edu/~rmichon/3dPrintingModeling/ ).","title":"(pm.)modularInterpStringModel"},{"location":"libs/physmodels/#usage_50","text":"modularInterpStringModel(length,pluckPosition,shape,scale,bodyExcitation,stringExcitation) : _ Where: stringLength : the length of the string in meters pluckPosition : pluck position (0-1) (1 is on the bridge) shape : shape of the resonator (0: square, 1: square with rounded corners, 2: round) scale : scale of the resonator (0: small, 1: medium, 2: large) bodyExcitation : excitation signal for the body stringExcitation : excitation signal for the string","title":"Usage"},{"location":"libs/physmodels/#pmmodularinterpinstr","text":"String instrument with a modular body (see modeInterpRes and * https://ccrma.stanford.edu/~rmichon/3dPrintingModeling/ ).","title":"(pm.)modularInterpInstr"},{"location":"libs/physmodels/#usage_51","text":"modularInterpInstr(stringLength,pluckPosition,shape,scale,gain,tapBody,triggerString) : _ Where: stringLength : the length of the string in meters pluckPosition : pluck position (0-1) (1 is on the bridge) shape : shape of the resonator (0: square, 1: square with rounded corners, 2: round) scale : scale of the resonator (0: small, 1: medium, 2: large) gain : of the string excitation tapBody : send an impulse in the body of the instrument where the string is connected (1 for on, 0 for off) triggerString : trigger signal for the string (1 for on, 0 for off)","title":"Usage"},{"location":"libs/physmodels/#pmmodularinterpinstr_ui_midi","text":"Ready-to-use MIDI-enabled string instrument with a modular body (see modeInterpRes and * https://ccrma.stanford.edu/~rmichon/3dPrintingModeling/ ) with built-in UI.","title":"(pm.)modularInterpInstr_ui_MIDI"},{"location":"libs/physmodels/#usage_52","text":"modularInterpInstr_ui_MIDI : _","title":"Usage"},{"location":"libs/physmodels/#bowed-string-instruments","text":"Low and high level basic string instruments parts. Most of the elements in this section can be used in a bidirectional chain.","title":"Bowed String Instruments"},{"location":"libs/physmodels/#pmbowtable","text":"Extremely basic bow table that can be used to implement a wide range of bow types for many different bowed string instruments (violin, cello, etc.).","title":"(pm.)bowTable"},{"location":"libs/physmodels/#usage_53","text":"excitation : bowTable(offeset,slope) : _ Where: excitation : an excitation signal offset : table offset slope : table slope","title":"Usage"},{"location":"libs/physmodels/#pmviolinbowtable","text":"Violin bow table based on bowTable .","title":"(pm.)violinBowTable"},{"location":"libs/physmodels/#usage_54","text":"bowVelocity : violinBowTable(bowPressure) : _ Where: bowVelocity : velocity of the bow/excitation signal (0-1) bowPressure : bow pressure on the string (0-1)","title":"Usage"},{"location":"libs/physmodels/#pmbowinteraction","text":"Bidirectional block implementing the interaction of a bow in a chain .","title":"(pm.)bowInteraction"},{"location":"libs/physmodels/#usage_55","text":"chain(... : stringSegment : bowInteraction(bowTable) : stringSegment : ...) Where: bowTable : the bow table","title":"Usage"},{"location":"libs/physmodels/#pmviolinbow","text":"Bidirectional block implementing a violin bow and its interaction with a string.","title":"(pm.)violinBow"},{"location":"libs/physmodels/#usage_56","text":"chain(... : stringSegment : violinBow(bowPressure,bowVelocity) : stringSegment : ...) Where: bowVelocity : velocity of the bow / excitation signal (0-1) bowPressure : bow pressure on the string (0-1)","title":"Usage"},{"location":"libs/physmodels/#pmviolinbowedstring","text":"Violin bowed string bidirectional block with controllable bow position. Terminations are not implemented in this model.","title":"(pm.)violinBowedString"},{"location":"libs/physmodels/#usage_57","text":"chain(nuts : violinBowedString(stringLength,bowPressure,bowVelocity,bowPosition) : bridge) Where: stringLength : the length of the string in meters bowVelocity : velocity of the bow / excitation signal (0-1) bowPressure : bow pressure on the string (0-1) bowPosition : the position of the bow on the string (0-1)","title":"Usage"},{"location":"libs/physmodels/#pmviolinnuts","text":"Bidirectional block implementing simple violin nuts. This function is based on bridgeFilter .","title":"(pm.)violinNuts"},{"location":"libs/physmodels/#usage_58","text":"chain(violinNuts : stringSegment : ...)","title":"Usage"},{"location":"libs/physmodels/#pmviolinbridge","text":"Bidirectional block implementing a simple violin bridge. This function is based on bridgeFilter .","title":"(pm.)violinBridge"},{"location":"libs/physmodels/#usage_59","text":"chain(... : stringSegment : violinBridge","title":"Usage"},{"location":"libs/physmodels/#pmviolinbody","text":"Bidirectional block implementing a simple violin body (just a simple resonant lowpass filter).","title":"(pm.)violinBody"},{"location":"libs/physmodels/#usage_60","text":"chain(... : stringSegment : violinBridge : violinBody)","title":"Usage"},{"location":"libs/physmodels/#pmviolinmodel","text":"Ready-to-use simple violin physical model. This model implements a single string. Additional strings should be created by making a polyphonic application out of this function. Pitch is changed by changing the length of the string (and not through a finger model).","title":"(pm.)violinModel"},{"location":"libs/physmodels/#usage_61","text":"violinModel(stringLength,bowPressure,bowVelocity,bridgeReflexion, bridgeAbsorption,bowPosition) : _ Where: stringLength : the length of the string in meters bowVelocity : velocity of the bow / excitation signal (0-1) bowPressure : bow pressure on the string (0-1)) bowPosition : the position of the bow on the string (0-1)","title":"Usage"},{"location":"libs/physmodels/#pmviolin_ui","text":"Ready-to-use violin physical model with built-in UI.","title":"(pm.)violin_ui"},{"location":"libs/physmodels/#usage_62","text":"violinModel_ui : _","title":"Usage"},{"location":"libs/physmodels/#pmviolin_ui_midi","text":"Ready-to-use MIDI-enabled violin physical model with built-in UI.","title":"(pm.)violin_ui_MIDI"},{"location":"libs/physmodels/#usage_63","text":"violin_ui_MIDI : _","title":"Usage"},{"location":"libs/physmodels/#wind-instruments","text":"Low and high level basic wind instruments parts. Most of the elements in this section can be used in a bidirectional chain.","title":"Wind Instruments"},{"location":"libs/physmodels/#pmopentube","text":"A tube segment without terminations (same as stringSegment ).","title":"(pm.)openTube"},{"location":"libs/physmodels/#usage_64","text":"chain(A : openTube(maxLength,length) : B) Where: maxLength : the maximum length of the tube in meters (should be static) length : the length of the tube in meters","title":"Usage"},{"location":"libs/physmodels/#pmreedtable","text":"Extremely basic reed table that can be used to implement a wide range of single reed types for many different instruments (saxophone, clarinet, etc.).","title":"(pm.)reedTable"},{"location":"libs/physmodels/#usage_65","text":"excitation : reedTable(offeset,slope) : _ Where: excitation : an excitation signal offset : table offset slope : table slope","title":"Usage"},{"location":"libs/physmodels/#pmflutejettable","text":"Extremely basic flute jet table.","title":"(pm.)fluteJetTable"},{"location":"libs/physmodels/#usage_66","text":"excitation : fluteJetTable : _ Where: excitation : an excitation signal","title":"Usage"},{"location":"libs/physmodels/#pmbrasslipstable","text":"Simple brass lips/mouthpiece table. Since this implementation is very basic and that the lips and tube of the instrument are coupled to each other, the length of that tube must be provided here.","title":"(pm.)brassLipsTable"},{"location":"libs/physmodels/#usage_67","text":"excitation : brassLipsTable(tubeLength,lipsTension) : _ Where: excitation : an excitation signal (can be DC) tubeLength : length in meters of the tube connected to the mouthpiece lipsTension : tension of the lips (0-1) (default: 0.5)","title":"Usage"},{"location":"libs/physmodels/#pmclarinetreed","text":"Clarinet reed based on reedTable with controllable stiffness.","title":"(pm.)clarinetReed"},{"location":"libs/physmodels/#usage_68","text":"excitation : clarinetReed(stiffness) : _ Where: excitation : an excitation signal stiffness : reed stiffness (0-1)","title":"Usage"},{"location":"libs/physmodels/#pmclarinetmouthpiece","text":"Bidirectional block implementing a clarinet mouthpiece as well as the various interactions happening with traveling waves. This element is ready to be plugged to a tube...","title":"(pm.)clarinetMouthPiece"},{"location":"libs/physmodels/#usage_69","text":"chain(clarinetMouthPiece(reedStiffness,pressure) : tube : etc.) Where: pressure : the pressure of the air flow (DC) created by the virtual performer (0-1). This can also be any kind of signal that will directly injected in the mouthpiece (e.g., breath noise, etc.). reedStiffness : reed stiffness (0-1)","title":"Usage"},{"location":"libs/physmodels/#pmbrasslips","text":"Bidirectional block implementing a brass mouthpiece as well as the various interactions happening with traveling waves. This element is ready to be plugged to a tube...","title":"(pm.)brassLips"},{"location":"libs/physmodels/#usage_70","text":"chain(brassLips(tubeLength,lipsTension,pressure) : tube : etc.) Where: tubeLength : length in meters of the tube connected to the mouthpiece lipsTension : tension of the lips (0-1) (default: 0.5) pressure : the pressure of the air flow (DC) created by the virtual performer (0-1). This can also be any kind of signal that will directly injected in the mouthpiece (e.g., breath noise, etc.).","title":"Usage"},{"location":"libs/physmodels/#pmfluteembouchure","text":"Bidirectional block implementing a flute embouchure as well as the various interactions happening with traveling waves. This element is ready to be plugged between tubes segments...","title":"(pm.)fluteEmbouchure"},{"location":"libs/physmodels/#usage_71","text":"chain(... : tube : fluteEmbouchure(pressure) : tube : etc.) Where: pressure : the pressure of the air flow (DC) created by the virtual performer (0-1). This can also be any kind of signal that will directly injected in the mouthpiece (e.g., breath noise, etc.).","title":"Usage"},{"location":"libs/physmodels/#pmwbell","text":"Generic wind instrument bell bidirectional block that should be placed at the end of a chain .","title":"(pm.)wBell"},{"location":"libs/physmodels/#usage_72","text":"chain(... : wBell(opening)) Where: opening : the \"opening\" of bell (0-1)","title":"Usage"},{"location":"libs/physmodels/#pmflutehead","text":"Simple flute head implementing waves reflexion.","title":"(pm.)fluteHead"},{"location":"libs/physmodels/#usage_73","text":"chain(fluteHead : tube : ...)","title":"Usage"},{"location":"libs/physmodels/#pmflutefoot","text":"Simple flute foot implementing waves reflexion and dispersion.","title":"(pm.)fluteFoot"},{"location":"libs/physmodels/#usage_74","text":"chain(... : tube : fluteFoot)","title":"Usage"},{"location":"libs/physmodels/#pmclarinetmodel","text":"A simple clarinet physical model without tone holes (pitch is changed by changing the length of the tube of the instrument).","title":"(pm.)clarinetModel"},{"location":"libs/physmodels/#usage_75","text":"clarinetModel(length,pressure,reedStiffness,bellOpening) : _ Where: tubeLength : the length of the tube in meters pressure : the pressure of the air flow created by the virtual performer (0-1). This can also be any kind of signal that will directly injected in the mouthpiece (e.g., breath noise, etc.). reedStiffness : reed stiffness (0-1) bellOpening : the opening of bell (0-1)","title":"Usage"},{"location":"libs/physmodels/#pmclarinetmodel_ui","text":"Same as clarinetModel but with a built-in UI. This function doesn't implement a virtual \"blower\", thus pressure remains an argument here.","title":"(pm.)clarinetModel_ui"},{"location":"libs/physmodels/#usage_76","text":"clarinetModel_ui(pressure) : _ Where: pressure : the pressure of the air flow created by the virtual performer (0-1). This can also be any kind of signal that will be directly injected in the mouthpiece (e.g., breath noise, etc.).","title":"Usage"},{"location":"libs/physmodels/#pmclarinet_ui","text":"Ready-to-use clarinet physical model with built-in UI based on clarinetModel .","title":"(pm.)clarinet_ui"},{"location":"libs/physmodels/#usage_77","text":"clarinet_ui : _","title":"Usage"},{"location":"libs/physmodels/#pmclarinet_ui_midi","text":"Ready-to-use MIDI compliant clarinet physical model with built-in UI.","title":"(pm.)clarinet_ui_MIDI"},{"location":"libs/physmodels/#usage_78","text":"clarinet_ui_MIDI : _","title":"Usage"},{"location":"libs/physmodels/#pmbrassmodel","text":"A simple generic brass instrument physical model without pistons (pitch is changed by changing the length of the tube of the instrument). This model is kind of hard to control and might not sound very good if bad parameters are given to it...","title":"(pm.)brassModel"},{"location":"libs/physmodels/#usage_79","text":"brassModel(tubeLength,lipsTension,mute,pressure) : _ Where: tubeLength : the length of the tube in meters lipsTension : tension of the lips (0-1) (default: 0.5) mute : mute opening at the end of the instrument (0-1) (default: 0.5) pressure : the pressure of the air flow created by the virtual performer (0-1). This can also be any kind of signal that will directly injected in the mouthpiece (e.g., breath noise, etc.).","title":"Usage"},{"location":"libs/physmodels/#pmbrassmodel_ui","text":"Same as brassModel but with a built-in UI. This function doesn't implement a virtual \"blower\", thus pressure remains an argument here.","title":"(pm.)brassModel_ui"},{"location":"libs/physmodels/#usage_80","text":"brassModel_ui(pressure) : _ Where: pressure : the pressure of the air flow created by the virtual performer (0-1). This can also be any kind of signal that will be directly injected in the mouthpiece (e.g., breath noise, etc.).","title":"Usage"},{"location":"libs/physmodels/#pmbrass_ui","text":"Ready-to-use brass instrument physical model with built-in UI based on brassModel .","title":"(pm.)brass_ui"},{"location":"libs/physmodels/#usage_81","text":"brass_ui : _","title":"Usage"},{"location":"libs/physmodels/#pmbrass_ui_midi","text":"Ready-to-use MIDI-controllable brass instrument physical model with built-in UI.","title":"(pm.)brass_ui_MIDI"},{"location":"libs/physmodels/#usage_82","text":"brass_ui_MIDI : _","title":"Usage"},{"location":"libs/physmodels/#pmflutemodel","text":"A simple generic flute instrument physical model without tone holes (pitch is changed by changing the length of the tube of the instrument).","title":"(pm.)fluteModel"},{"location":"libs/physmodels/#usage_83","text":"fluteModel(tubeLength,mouthPosition,pressure) : _ Where: tubeLength : the length of the tube in meters mouthPosition : position of the mouth on the embouchure (0-1) (default: 0.5) pressure : the pressure of the air flow created by the virtual performer (0-1). This can also be any kind of signal that will directly injected in the mouthpiece (e.g., breath noise, etc.).","title":"Usage"},{"location":"libs/physmodels/#pmflutemodel_ui","text":"Same as fluteModel but with a built-in UI. This function doesn't implement a virtual \"blower\", thus pressure remains an argument here.","title":"(pm.)fluteModel_ui"},{"location":"libs/physmodels/#usage_84","text":"fluteModel_ui(pressure) : _ Where: pressure : the pressure of the air flow created by the virtual performer (0-1). This can also be any kind of signal that will be directly injected in the mouthpiece (e.g., breath noise, etc.).","title":"Usage"},{"location":"libs/physmodels/#pmflute_ui","text":"Ready-to-use flute physical model with built-in UI based on fluteModel .","title":"(pm.)flute_ui"},{"location":"libs/physmodels/#usage_85","text":"flute_ui : _","title":"Usage"},{"location":"libs/physmodels/#pmflute_ui_midi","text":"Ready-to-use MIDI-controllable flute physical model with built-in UI.","title":"(pm.)flute_ui_MIDI"},{"location":"libs/physmodels/#usage_86","text":"flute_ui_MIDI : _","title":"Usage"},{"location":"libs/physmodels/#exciters","text":"Various kind of excitation signal generators.","title":"Exciters"},{"location":"libs/physmodels/#pmimpulseexcitation","text":"Creates an impulse excitation of one sample.","title":"(pm.)impulseExcitation"},{"location":"libs/physmodels/#usage_87","text":"gate = button('gate'); impulseExcitation(gate) : chain; Where: gate : a gate button","title":"Usage"},{"location":"libs/physmodels/#pmstrikemodel","text":"Creates a filtered noise excitation.","title":"(pm.)strikeModel"},{"location":"libs/physmodels/#usage_88","text":"gate = button('gate'); strikeModel(LPcutoff,HPcutoff,sharpness,gain,gate) : chain; Where: HPcutoff : highpass cutoff frequency LPcutoff : lowpass cutoff frequency sharpness : sharpness of the attack and release (0-1) gain : gain of the excitation gate : a gate button/trigger signal (0/1)","title":"Usage"},{"location":"libs/physmodels/#pmstrike","text":"Strikes generator with controllable excitation position.","title":"(pm.)strike"},{"location":"libs/physmodels/#usage_89","text":"gate = button('gate'); strike(exPos,sharpness,gain,gate) : chain; Where: exPos : excitation position wiht 0: for max low freqs and 1: for max high freqs. So, on membrane for example, 0 would be the middle and 1 the edge sharpness : sharpness of the attack and release (0-1) gain : gain of the excitation gate : a gate button/trigger signal (0/1)","title":"Usage"},{"location":"libs/physmodels/#pmpluckstring","text":"Creates a plucking excitation signal.","title":"(pm.)pluckString"},{"location":"libs/physmodels/#usage_90","text":"trigger = button('gate'); pluckString(stringLength,cutoff,maxFreq,sharpness,trigger) Where: stringLength : length of the string to pluck cutoff : cutoff ratio (1 for default) maxFreq : max frequency ratio (1 for default) sharpness : sharpness of the attack and release (1 for default) gain : gain of the excitation (0-1) trigger : trigger signal (1 for on, 0 for off)","title":"Usage"},{"location":"libs/physmodels/#pmblower","text":"A virtual blower creating a DC signal with some breath noise in it.","title":"(pm.)blower"},{"location":"libs/physmodels/#usage_91","text":"blower(pressure,breathGain,breathCutoff) : _ Where: pressure : pressure (0-1) breathGain : breath noise gain (0-1) (recommended: 0.005) breathCutoff : breath cuttoff frequency (Hz) (recommended: 2000)","title":"Usage"},{"location":"libs/physmodels/#pmblower_ui","text":"Same as blower but with a built-in UI.","title":"(pm.)blower_ui"},{"location":"libs/physmodels/#usage_92","text":"blower : somethingToBeBlown","title":"Usage"},{"location":"libs/physmodels/#modal-percussions","text":"High and low level functions for modal synthesis of percussion instruments.","title":"Modal Percussions"},{"location":"libs/physmodels/#pmdjembemodel","text":"Dirt-simple djembe modal physical model. Mode parameters are empirically calculated and don't correspond to any measurements or 3D model. They kind of sound good though :).","title":"(pm.)djembeModel"},{"location":"libs/physmodels/#usage_93","text":"excitation : djembeModel(freq) Where: excitation : excitation signal freq : fundamental frequency of the bar","title":"Usage"},{"location":"libs/physmodels/#pmdjembe","text":"Dirt-simple djembe modal physical model. Mode parameters are empirically calculated and don't correspond to any measurements or 3D model. They kind of sound good though :). This model also implements a virtual \"exciter\".","title":"(pm.)djembe"},{"location":"libs/physmodels/#usage_94","text":"djembe(freq,strikePosition,strikeSharpness,gain,trigger) Where: freq : fundamental frequency of the model strikePosition : strike position (0 for the middle of the membrane and 1 for the edge) strikeSharpness : sharpness of the strike (0-1, default: 0.5) gain : gain of the strike trigger : trigger signal (0: off, 1: on)","title":"Usage"},{"location":"libs/physmodels/#pmdjembe_ui_midi","text":"Simple MIDI controllable djembe physical model with built-in UI.","title":"(pm.)djembe_ui_MIDI"},{"location":"libs/physmodels/#usage_95","text":"djembe_ui_MIDI : _","title":"Usage"},{"location":"libs/physmodels/#pmmarimbabarmodel","text":"Generic marimba tone bar modal model. This model was generated using mesh2faust from a 3D CAD model of a marimba tone bar ( libraries/modalmodels/marimbaBar ). The corresponding CAD model is that of a C2 tone bar (original fundamental frequency: ~65Hz). While marimbaBarModel allows to translate the harmonic content of the generated sound by providing a frequency ( freq ), mode transposition has limits and the model will sound less and less like a marimba tone bar as it diverges from C2. To make an accurate model of a marimba, we'd want to have an independent model for each bar... This model contains 5 excitation positions going linearly from the center bottom to the center top of the bar. Obviously, a model with more excitation position could be regenerated using mesh2faust .","title":"(pm.)marimbaBarModel"},{"location":"libs/physmodels/#usage_96","text":"excitation : marimbaBarModel(freq,exPos,t60,t60DecayRatio,t60DecaySlope) Where: excitation : excitation signal freq : fundamental frequency of the bar exPos : excitation position (0-4) t60 : T60 in seconds (recommended value: 0.1) t60DecayRatio : T60 decay ratio (recommended value: 1) t60DecaySlope : T60 decay slope (recommended value: 5)","title":"Usage"},{"location":"libs/physmodels/#pmmarimbarestube","text":"Simple marimba resonance tube.","title":"(pm.)marimbaResTube"},{"location":"libs/physmodels/#usage_97","text":"marimbaResTube(tubeLength,excitation) Where: tubeLength : the length of the tube in meters excitation : the excitation signal (audio in)","title":"Usage"},{"location":"libs/physmodels/#pmmarimbamodel","text":"Simple marimba physical model implementing a single tone bar connected to tube. This model is scalable and can be adapted to any size of bar/tube (see marimbaBarModel to know more about the limitations of this type of system).","title":"(pm.)marimbaModel"},{"location":"libs/physmodels/#usage_98","text":"excitation : marimbaModel(freq,exPos) : _ Where: freq : the frequency of the bar/tube couple exPos : excitation position (0-4)","title":"Usage"},{"location":"libs/physmodels/#pmmarimba","text":"Simple marimba physical model implementing a single tone bar connected to tube. This model is scalable and can be adapted to any size of bar/tube (see marimbaBarModel to know more about the limitations of this type of system). This function also implement a virtual exciter to drive the model.","title":"(pm.)marimba"},{"location":"libs/physmodels/#usage_99","text":"excitation : marimba(freq,strikePosition,strikeCutoff,strikeSharpness,gain,trigger) : _ Where: excitation : the excitation signal freq : the frequency of the bar/tube couple strikePosition : strike position (0-4) strikeCutoff : cuttoff frequency of the strike genarator (recommended: ~7000Hz) strikeSharpness : sharpness of the strike (recommended: ~0.25) gain : gain of the strike (0-1) trigger signal (0: off, 1: on)","title":"Usage"},{"location":"libs/physmodels/#pmmarimba_ui_midi","text":"Simple MIDI controllable marimba physical model with built-in UI implementing a single tone bar connected to tube. This model is scalable and can be adapted to any size of bar/tube (see marimbaBarModel to know more about the limitations of this type of system).","title":"(pm.)marimba_ui_MIDI"},{"location":"libs/physmodels/#usage_100","text":"marimba_ui_MIDI : _","title":"Usage"},{"location":"libs/physmodels/#pmchurchbellmodel","text":"Generic church bell modal model generated by mesh2faust from libraries/modalmodels/churchBell . Modeled after T. Rossing and R. Perrin, Vibrations of Bells, Applied Acoustics 2, 1987. Model height is 301 mm. This model contains 7 excitation positions going linearly from the bottom to the top of the bell. Obviously, a model with more excitation position could be regenerated using mesh2faust .","title":"(pm.)churchBellModel"},{"location":"libs/physmodels/#usage_101","text":"excitation : churchBellModel(nModes,exPos,t60,t60DecayRatio,t60DecaySlope) Where: excitation : the excitation signal nModes : number of synthesized modes (max: 50) exPos : excitation position (0-6) t60 : T60 in seconds (recommended value: 0.1) t60DecayRatio : T60 decay ratio (recommended value: 1) t60DecaySlope : T60 decay slope (recommended value: 5)","title":"Usage"},{"location":"libs/physmodels/#pmchurchbell","text":"Generic church bell modal model. Modeled after T. Rossing and R. Perrin, Vibrations of Bells, Applied Acoustics 2, 1987. Model height is 301 mm. This model contains 7 excitation positions going linearly from the bottom to the top of the bell. Obviously, a model with more excitation position could be regenerated using mesh2faust . This function also implement a virtual exciter to drive the model.","title":"(pm.)churchBell"},{"location":"libs/physmodels/#usage_102","text":"excitation : churchBell(strikePosition,strikeCutoff,strikeSharpness,gain,trigger) : _ Where: excitation : the excitation signal strikePosition : strike position (0-6) strikeCutoff : cuttoff frequency of the strike genarator (recommended: ~7000Hz) strikeSharpness : sharpness of the strike (recommended: ~0.25) gain : gain of the strike (0-1) trigger signal (0: off, 1: on)","title":"Usage"},{"location":"libs/physmodels/#pmchurchbell_ui","text":"Church bell physical model based on churchBell with built-in UI.","title":"(pm.)churchBell_ui"},{"location":"libs/physmodels/#usage_103","text":"churchBell_ui : _","title":"Usage"},{"location":"libs/physmodels/#pmenglishbellmodel","text":"English church bell modal model generated by mesh2faust from libraries/modalmodels/englishBell . Modeled after D.Bartocha and Baron, Influence of Tin Bronze Melting and Pouring Parameters on Its Properties and Bell' Tone, Archives of Foundry Engineering, 2016. Model height is 1 m. This model contains 7 excitation positions going linearly from the bottom to the top of the bell. Obviously, a model with more excitation position could be regenerated using mesh2faust .","title":"(pm.)englishBellModel"},{"location":"libs/physmodels/#usage_104","text":"excitation : englishBellModel(nModes,exPos,t60,t60DecayRatio,t60DecaySlope) Where: excitation : the excitation signal nModes : number of synthesized modes (max: 50) exPos : excitation position (0-6) t60 : T60 in seconds (recommended value: 0.1) t60DecayRatio : T60 decay ratio (recommended value: 1) t60DecaySlope : T60 decay slope (recommended value: 5)","title":"Usage"},{"location":"libs/physmodels/#pmenglishbell","text":"English church bell modal model. Modeled after D.Bartocha and Baron, Influence of Tin Bronze Melting and Pouring Parameters on Its Properties and Bell' Tone, Archives of Foundry Engineering, 2016. Model height is 1 m. This model contains 7 excitation positions going linearly from the bottom to the top of the bell. Obviously, a model with more excitation position could be regenerated using mesh2faust . This function also implement a virtual exciter to drive the model.","title":"(pm.)englishBell"},{"location":"libs/physmodels/#usage_105","text":"excitation : englishBell(strikePosition,strikeCutoff,strikeSharpness,gain,trigger) : _ Where: excitation : the excitation signal strikePosition : strike position (0-6) strikeCutoff : cuttoff frequency of the strike genarator (recommended: ~7000Hz) strikeSharpness : sharpness of the strike (recommended: ~0.25) gain : gain of the strike (0-1) trigger signal (0: off, 1: on)","title":"Usage"},{"location":"libs/physmodels/#pmenglishbell_ui","text":"English church bell physical model based on englishBell with built-in UI.","title":"(pm.)englishBell_ui"},{"location":"libs/physmodels/#usage_106","text":"englishBell_ui : _","title":"Usage"},{"location":"libs/physmodels/#pmfrenchbellmodel","text":"French church bell modal model generated by mesh2faust from libraries/modalmodels/frenchBell . Modeled after D.Bartocha and Baron, Influence of Tin Bronze Melting and Pouring Parameters on Its Properties and Bell' Tone, Archives of Foundry Engineering, 2016. Model height is 1 m. This model contains 7 excitation positions going linearly from the bottom to the top of the bell. Obviously, a model with more excitation position could be regenerated using mesh2faust .","title":"(pm.)frenchBellModel"},{"location":"libs/physmodels/#usage_107","text":"excitation : frenchBellModel(nModes,exPos,t60,t60DecayRatio,t60DecaySlope) Where: excitation : the excitation signal nModes : number of synthesized modes (max: 50) exPos : excitation position (0-6) t60 : T60 in seconds (recommended value: 0.1) t60DecayRatio : T60 decay ratio (recommended value: 1) t60DecaySlope : T60 decay slope (recommended value: 5)","title":"Usage"},{"location":"libs/physmodels/#pmfrenchbell","text":"French church bell modal model. Modeled after D.Bartocha and Baron, Influence of Tin Bronze Melting and Pouring Parameters on Its Properties and Bell' Tone, Archives of Foundry Engineering, 2016. Model height is 1 m. This model contains 7 excitation positions going linearly from the bottom to the top of the bell. Obviously, a model with more excitation position could be regenerated using mesh2faust . This function also implement a virtual exciter to drive the model.","title":"(pm.)frenchBell"},{"location":"libs/physmodels/#usage_108","text":"excitation : frenchBell(strikePosition,strikeCutoff,strikeSharpness,gain,trigger) : _ Where: excitation : the excitation signal strikePosition : strike position (0-6) strikeCutoff : cuttoff frequency of the strike genarator (recommended: ~7000Hz) strikeSharpness : sharpness of the strike (recommended: ~0.25) gain : gain of the strike (0-1) trigger signal (0: off, 1: on)","title":"Usage"},{"location":"libs/physmodels/#pmfrenchbell_ui","text":"French church bell physical model based on frenchBell with built-in UI.","title":"(pm.)frenchBell_ui"},{"location":"libs/physmodels/#usage_109","text":"frenchBell_ui : _","title":"Usage"},{"location":"libs/physmodels/#pmgermanbellmodel","text":"German church bell modal model generated by mesh2faust from libraries/modalmodels/germanBell . Modeled after D.Bartocha and Baron, Influence of Tin Bronze Melting and Pouring Parameters on Its Properties and Bell' Tone, Archives of Foundry Engineering, 2016. Model height is 1 m. This model contains 7 excitation positions going linearly from the bottom to the top of the bell. Obviously, a model with more excitation position could be regenerated using mesh2faust .","title":"(pm.)germanBellModel"},{"location":"libs/physmodels/#usage_110","text":"excitation : germanBellModel(nModes,exPos,t60,t60DecayRatio,t60DecaySlope) Where: excitation : the excitation signal nModes : number of synthesized modes (max: 50) exPos : excitation position (0-6) t60 : T60 in seconds (recommended value: 0.1) t60DecayRatio : T60 decay ratio (recommended value: 1) t60DecaySlope : T60 decay slope (recommended value: 5)","title":"Usage"},{"location":"libs/physmodels/#pmgermanbell","text":"German church bell modal model. Modeled after D.Bartocha and Baron, Influence of Tin Bronze Melting and Pouring Parameters on Its Properties and Bell' Tone, Archives of Foundry Engineering, 2016. Model height is 1 m. This model contains 7 excitation positions going linearly from the bottom to the top of the bell. Obviously, a model with more excitation position could be regenerated using mesh2faust . This function also implement a virtual exciter to drive the model.","title":"(pm.)germanBell"},{"location":"libs/physmodels/#usage_111","text":"excitation : germanBell(strikePosition,strikeCutoff,strikeSharpness,gain,trigger) : _ Where: excitation : the excitation signal strikePosition : strike position (0-6) strikeCutoff : cuttoff frequency of the strike genarator (recommended: ~7000Hz) strikeSharpness : sharpness of the strike (recommended: ~0.25) gain : gain of the strike (0-1) trigger signal (0: off, 1: on)","title":"Usage"},{"location":"libs/physmodels/#pmgermanbell_ui","text":"German church bell physical model based on germanBell with built-in UI.","title":"(pm.)germanBell_ui"},{"location":"libs/physmodels/#usage_112","text":"germanBell_ui : _","title":"Usage"},{"location":"libs/physmodels/#pmrussianbellmodel","text":"Russian church bell modal model generated by mesh2faust from libraries/modalmodels/russianBell . Modeled after D.Bartocha and Baron, Influence of Tin Bronze Melting and Pouring Parameters on Its Properties and Bell' Tone, Archives of Foundry Engineering, 2016. Model height is 2 m. This model contains 7 excitation positions going linearly from the bottom to the top of the bell. Obviously, a model with more excitation position could be regenerated using mesh2faust .","title":"(pm.)russianBellModel"},{"location":"libs/physmodels/#usage_113","text":"excitation : russianBellModel(nModes,exPos,t60,t60DecayRatio,t60DecaySlope) Where: excitation : the excitation signal nModes : number of synthesized modes (max: 50) exPos : excitation position (0-6) t60 : T60 in seconds (recommended value: 0.1) t60DecayRatio : T60 decay ratio (recommended value: 1) t60DecaySlope : T60 decay slope (recommended value: 5)","title":"Usage"},{"location":"libs/physmodels/#pmrussianbell","text":"Russian church bell modal model. Modeled after D.Bartocha and Baron, Influence of Tin Bronze Melting and Pouring Parameters on Its Properties and Bell' Tone, Archives of Foundry Engineering, 2016. Model height is 2 m. This model contains 7 excitation positions going linearly from the bottom to the top of the bell. Obviously, a model with more excitation position could be regenerated using mesh2faust . This function also implement a virtual exciter to drive the model.","title":"(pm.)russianBell"},{"location":"libs/physmodels/#usage_114","text":"excitation : russianBell(strikePosition,strikeCutoff,strikeSharpness,gain,trigger) : _ Where: excitation : the excitation signal strikePosition : strike position (0-6) strikeCutoff : cuttoff frequency of the strike genarator (recommended: ~7000Hz) strikeSharpness : sharpness of the strike (recommended: ~0.25) gain : gain of the strike (0-1) trigger signal (0: off, 1: on)","title":"Usage"},{"location":"libs/physmodels/#pmrussianbell_ui","text":"Russian church bell physical model based on russianBell with built-in UI.","title":"(pm.)russianBell_ui"},{"location":"libs/physmodels/#usage_115","text":"russianBell_ui : _","title":"Usage"},{"location":"libs/physmodels/#pmstandardbellmodel","text":"Standard church bell modal model generated by mesh2faust from libraries/modalmodels/standardBell . Modeled after T. Rossing and R. Perrin, Vibrations of Bells, Applied Acoustics 2, 1987. Model height is 1.8 m. This model contains 7 excitation positions going linearly from the bottom to the top of the bell. Obviously, a model with more excitation position could be regenerated using mesh2faust .","title":"(pm.)standardBellModel"},{"location":"libs/physmodels/#usage_116","text":"excitation : standardBellModel(nModes,exPos,t60,t60DecayRatio,t60DecaySlope) Where: excitation : the excitation signal nModes : number of synthesized modes (max: 50) exPos : excitation position (0-6) t60 : T60 in seconds (recommended value: 0.1) t60DecayRatio : T60 decay ratio (recommended value: 1) t60DecaySlope : T60 decay slope (recommended value: 5)","title":"Usage"},{"location":"libs/physmodels/#pmstandardbell","text":"Standard church bell modal model. Modeled after T. Rossing and R. Perrin, Vibrations of Bells, Applied Acoustics 2, 1987. Model height is 1.8 m. This model contains 7 excitation positions going linearly from the bottom to the top of the bell. Obviously, a model with more excitation position could be regenerated using mesh2faust . This function also implement a virtual exciter to drive the model.","title":"(pm.)standardBell"},{"location":"libs/physmodels/#usage_117","text":"excitation : standardBell(strikePosition,strikeCutoff,strikeSharpness,gain,trigger) : _ Where: excitation : the excitation signal strikePosition : strike position (0-6) strikeCutoff : cuttoff frequency of the strike genarator (recommended: ~7000Hz) strikeSharpness : sharpness of the strike (recommended: ~0.25) gain : gain of the strike (0-1) trigger signal (0: off, 1: on)","title":"Usage"},{"location":"libs/physmodels/#pmstandardbell_ui","text":"Standard church bell physical model based on standardBell with built-in UI.","title":"(pm.)standardBell_ui"},{"location":"libs/physmodels/#usage_118","text":"standardBell_ui : _","title":"Usage"},{"location":"libs/physmodels/#vocal-synthesis","text":"Vocal synthesizer functions (source/filter, fof, etc.).","title":"Vocal Synthesis"},{"location":"libs/physmodels/#pmformantvalues","text":"Formant data values. The formant data used here come from the CSOUND manual * http://www.csounds.com/manual/html/ .","title":"(pm.)formantValues"},{"location":"libs/physmodels/#usage_119","text":"ba.take(j+1,formantValues.f(i)) : _ ba.take(j+1,formantValues.g(i)) : _ ba.take(j+1,formantValues.bw(i)) : _ Where: i : formant number j : (voiceType*nFormants)+vowel voiceType : the voice type (0: alto, 1: bass, 2: countertenor, 3: soprano, 4: tenor) vowel : the vowel (0: a, 1: e, 2: i, 3: o, 4: u)","title":"Usage"},{"location":"libs/physmodels/#pmvoicegender","text":"Calculate the gender for the provided voiceType value. (0: male, 1: female)","title":"(pm.)voiceGender"},{"location":"libs/physmodels/#usage_120","text":"voiceGender(voiceType) : _ Where: voiceType : the voice type (0: alto, 1: bass, 2: countertenor, 3: soprano, 4: tenor)","title":"Usage"},{"location":"libs/physmodels/#pmskirtwidthmultiplier","text":"Calculates value to multiply bandwidth to obtain skirtwidth for a Fof filter.","title":"(pm.)skirtWidthMultiplier"},{"location":"libs/physmodels/#usage_121","text":"skirtWidthMultiplier(vowel,freq,gender) : _ Where: vowel : the vowel (0: a, 1: e, 2: i, 3: o, 4: u) freq : the fundamental frequency of the excitation signal gender : gender of the voice used in the fof filter (0: male, 1: female)","title":"Usage"},{"location":"libs/physmodels/#pmautobendfreq","text":"Autobends the center frequencies of formants 1 and 2 based on the fundamental frequency of the excitation signal and leaves all other formant frequencies unchanged. Ported from chant-lib .","title":"(pm.)autobendFreq"},{"location":"libs/physmodels/#reference","text":"https://ccrma.stanford.edu/~rmichon/chantLib/ .","title":"Reference"},{"location":"libs/physmodels/#usage_122","text":"_ : autobendFreq(n,freq,voiceType) : _ Where: n : formant index freq : the fundamental frequency of the excitation signal voiceType : the voice type (0: alto, 1: bass, 2: countertenor, 3: soprano, 4: tenor) input is the center frequency of the corresponding formant","title":"Usage"},{"location":"libs/physmodels/#pmvocaleffort","text":"Changes the gains of the formants based on the fundamental frequency of the excitation signal. Higher formants are reinforced for higher fundamental frequencies. Ported from chant-lib .","title":"(pm.)vocalEffort"},{"location":"libs/physmodels/#reference_1","text":"https://ccrma.stanford.edu/~rmichon/chantLib/ .","title":"Reference"},{"location":"libs/physmodels/#usage_123","text":"_ : vocalEffort(freq,gender) : _ Where: freq : the fundamental frequency of the excitation signal gender : the gender of the voice type (0: male, 1: female) input is the linear amplitude of the formant","title":"Usage"},{"location":"libs/physmodels/#pmfof","text":"Function to generate a single Formant-Wave-Function.","title":"(pm.)fof"},{"location":"libs/physmodels/#reference_2","text":"https://ccrma.stanford.edu/~mjolsen/pdfs/smc2016_MOlsenFOF.pdf .","title":"Reference"},{"location":"libs/physmodels/#usage_124","text":"_ : fof(fc,bw,a,g) : _ Where: fc : formant center frequency, bw : formant bandwidth (Hz), sw : formant skirtwidth (Hz) g : linear scale factor (g=1 gives 0dB amplitude response at fc) input is an impulse signal to excite filter","title":"Usage"},{"location":"libs/physmodels/#pmfofsh","text":"FOF with sample and hold used on bw and a parameter used in the filter-cycling FOF function fofCycle .","title":"(pm.)fofSH"},{"location":"libs/physmodels/#reference_3","text":"https://ccrma.stanford.edu/~mjolsen/pdfs/smc2016_MOlsenFOF.pdf .","title":"Reference"},{"location":"libs/physmodels/#usage_125","text":"_ : fofSH(fc,bw,a,g) : _ Where: all parameters same as for fof","title":"Usage"},{"location":"libs/physmodels/#pmfofcycle","text":"FOF implementation where time-varying filter parameter noise is mitigated by using a cycle of n sample and hold FOF filters.","title":"(pm.)fofCycle"},{"location":"libs/physmodels/#reference_4","text":"https://ccrma.stanford.edu/~mjolsen/pdfs/smc2016_MOlsenFOF.pdf .","title":"Reference"},{"location":"libs/physmodels/#usage_126","text":"_ : fofCycle(fc,bw,a,g,n) : _ Where: n : the number of FOF filters to cycle through all other parameters are same as for fof","title":"Usage"},{"location":"libs/physmodels/#pmfofsmooth","text":"FOF implementation where time-varying filter parameter noise is mitigated by lowpass filtering the filter parameters bw and a with smooth .","title":"(pm.)fofSmooth"},{"location":"libs/physmodels/#usage_127","text":"_ : fofSmooth(fc,bw,sw,g,tau) : _ Where: tau : the desired smoothing time constant in seconds all other parameters are same as for fof","title":"Usage"},{"location":"libs/physmodels/#pmformantfilterfofcycle","text":"Formant filter based on a single FOF filter. Formant parameters are linearly interpolated allowing to go smoothly from one vowel to another. A cycle of n fof filters with sample-and-hold is used so that the fof filter parameters can be varied in realtime. This technique is more robust but more computationally expensive than formantFilterFofSmooth .Voice type can be selected but must correspond to the frequency range of the provided source to be realistic.","title":"(pm.)formantFilterFofCycle"},{"location":"libs/physmodels/#usage_128","text":"_ : formantFilterFofCycle(voiceType,vowel,nFormants,i,freq) : _ Where: voiceType : the voice type (0: alto, 1: bass, 2: countertenor, 3: soprano, 4: tenor) vowel : the vowel (0: a, 1: e, 2: i, 3: o, 4: u) nFormants : number of formant regions in frequency domain, typically 5 i : formant number (i.e. 0 - 4) used to index formant data value arrays freq : fundamental frequency of excitation signal. Used to calculate rise time of envelope","title":"Usage"},{"location":"libs/physmodels/#pmformantfilterfofsmooth","text":"Formant filter based on a single FOF filter. Formant parameters are linearly interpolated allowing to go smoothly from one vowel to another. Fof filter parameters are lowpass filtered to mitigate possible noise from varying them in realtime. Voice type can be selected but must correspond to the frequency range of the provided source to be realistic.","title":"(pm.)formantFilterFofSmooth"},{"location":"libs/physmodels/#usage_129","text":"_ : formantFilterFofSmooth(voiceType,vowel,nFormants,i,freq) : _ Where: voiceType : the voice type (0: alto, 1: bass, 2: countertenor, 3: soprano, 4: tenor) vowel : the vowel (0: a, 1: e, 2: i, 3: o, 4: u) nFormants : number of formant regions in frequency domain, typically 5 i : formant number (i.e. 1 - 5) used to index formant data value arrays freq : fundamental frequency of excitation signal. Used to calculate rise time of envelope","title":"Usage"},{"location":"libs/physmodels/#pmformantfilterbp","text":"Formant filter based on a single resonant bandpass filter. Formant parameters are linearly interpolated allowing to go smoothly from one vowel to another. Voice type can be selected but must correspond to the frequency range of the provided source to be realistic.","title":"(pm.)formantFilterBP"},{"location":"libs/physmodels/#usage_130","text":"_ : formantFilterBP(voiceType,vowel,nFormants,i,freq) : _ Where: voiceType : the voice type (0: alto, 1: bass, 2: countertenor, 3: soprano, 4: tenor) vowel : the vowel (0: a, 1: e, 2: i, 3: o, 4: u) nFormants : number of formant regions in frequency domain, typically 5 i : formant index used to index formant data value arrays freq : fundamental frequency of excitation signal.","title":"Usage"},{"location":"libs/physmodels/#pmformantfilterbank","text":"Formant filterbank which can use different types of filterbank functions and different excitation signals. Formant parameters are linearly interpolated allowing to go smoothly from one vowel to another. Voice type can be selected but must correspond to the frequency range of the provided source to be realistic.","title":"(pm.)formantFilterbank"},{"location":"libs/physmodels/#usage_131","text":"_ : formantFilterbank(voiceType,vowel,formantGen,freq) : _ Where: voiceType : the voice type (0: alto, 1: bass, 2: countertenor, 3: soprano, 4: tenor) vowel : the vowel (0: a, 1: e, 2: i, 3: o, 4: u) formantGen : the specific formant filterbank function (i.e. FormantFilterbankBP, FormantFilterbankFof,...) freq : fundamental frequency of excitation signal. Needed for FOF version to calculate rise time of envelope","title":"Usage"},{"location":"libs/physmodels/#pmformantfilterbankfofcycle","text":"Formant filterbank based on a bank of fof filters. Formant parameters are linearly interpolated allowing to go smoothly from one vowel to another. Voice type can be selected but must correspond to the frequency range of the provided source to be realistic.","title":"(pm.)formantFilterbankFofCycle"},{"location":"libs/physmodels/#usage_132","text":"_ : formantFilterbankFofCycle(voiceType,vowel,freq) : _ Where: voiceType : the voice type (0: alto, 1: bass, 2: countertenor, 3: soprano, 4: tenor) vowel : the vowel (0: a, 1: e, 2: i, 3: o, 4: u) freq : the fundamental frequency of the excitation signal. Needed to calculate the skirtwidth of the FOF envelopes and for the autobendFreq and vocalEffort functions","title":"Usage"},{"location":"libs/physmodels/#pmformantfilterbankfofsmooth","text":"Formant filterbank based on a bank of fof filters. Formant parameters are linearly interpolated allowing to go smoothly from one vowel to another. Voice type can be selected but must correspond to the frequency range of the provided source to be realistic.","title":"(pm.)formantFilterbankFofSmooth"},{"location":"libs/physmodels/#usage_133","text":"_ : formantFilterbankFofSmooth(voiceType,vowel,freq) : _ Where: voiceType : the voice type (0: alto, 1: bass, 2: countertenor, 3: soprano, 4: tenor) vowel : the vowel (0: a, 1: e, 2: i, 3: o, 4: u) freq : the fundamental frequency of the excitation signal. Needed to calculate the skirtwidth of the FOF envelopes and for the autobendFreq and vocalEffort functions","title":"Usage"},{"location":"libs/physmodels/#pmformantfilterbankbp","text":"Formant filterbank based on a bank of resonant bandpass filters. Formant parameters are linearly interpolated allowing to go smoothly from one vowel to another. Voice type can be selected but must correspond to the frequency range of the provided source to be realistic.","title":"(pm.)formantFilterbankBP"},{"location":"libs/physmodels/#usage_134","text":"_ : formantFilterbankBP(voiceType,vowel,freq) : _ Where: voiceType : the voice type (0: alto, 1: bass, 2: countertenor, 3: soprano, 4: tenor) vowel : the vowel (0: a, 1: e, 2: i, 3: o, 4: u) freq : the fundamental frequency of the excitation signal. Needed for the autobendFreq and vocalEffort functions","title":"Usage"},{"location":"libs/physmodels/#pmsfformantmodel","text":"Simple formant/vocal synthesizer based on a source/filter model. The source and filterbank must be specified by the user. filterbank must take the same input parameters as formantFilterbank ( BP / FofCycle / FofSmooth ). Formant parameters are linearly interpolated allowing to go smoothly from one vowel to another. Voice type can be selected but must correspond to the frequency range of the synthesized voice to be realistic.","title":"(pm.)SFFormantModel"},{"location":"libs/physmodels/#usage_135","text":"SFFormantModel(voiceType,vowel,exType,freq,gain,source,filterbank,isFof) : _ Where: voiceType : the voice type (0: alto, 1: bass, 2: countertenor, 3: soprano, 4: tenor) vowel : the vowel (0: a, 1: e, 2: i, 3: o, 4: u exType : voice vs. fricative sound ratio (0-1 where 1 is 100% fricative) freq : the fundamental frequency of the source signal gain : linear gain multiplier to multiply the source by isFof : whether model is FOF based (0: no, 1: yes)","title":"Usage"},{"location":"libs/physmodels/#pmsfformantmodelfofcycle","text":"Simple formant/vocal synthesizer based on a source/filter model. The source is just a periodic impulse and the \"filter\" is a bank of FOF filters. Formant parameters are linearly interpolated allowing to go smoothly from one vowel to another. Voice type can be selected but must correspond to the frequency range of the synthesized voice to be realistic. This model does not work with noise in the source signal so exType has been removed and model does not depend on SFFormantModel function.","title":"(pm.)SFFormantModelFofCycle"},{"location":"libs/physmodels/#usage_136","text":"SFFormantModelFofCycle(voiceType,vowel,freq,gain) : _ Where: voiceType : the voice type (0: alto, 1: bass, 2: countertenor, 3: soprano, 4: tenor) vowel : the vowel (0: a, 1: e, 2: i, 3: o, 4: u freq : the fundamental frequency of the source signal gain : linear gain multiplier to multiply the source by","title":"Usage"},{"location":"libs/physmodels/#pmsfformantmodelfofsmooth","text":"Simple formant/vocal synthesizer based on a source/filter model. The source is just a periodic impulse and the \"filter\" is a bank of FOF filters. Formant parameters are linearly interpolated allowing to go smoothly from one vowel to another. Voice type can be selected but must correspond to the frequency range of the synthesized voice to be realistic.","title":"(pm.)SFFormantModelFofSmooth"},{"location":"libs/physmodels/#usage_137","text":"SFFormantModelFofSmooth(voiceType,vowel,freq,gain) : _ Where: voiceType : the voice type (0: alto, 1: bass, 2: countertenor, 3: soprano, 4: tenor) vowel : the vowel (0: a, 1: e, 2: i, 3: o, 4: u freq : the fundamental frequency of the source signal gain : linear gain multiplier to multiply the source by","title":"Usage"},{"location":"libs/physmodels/#pmsfformantmodelbp","text":"Simple formant/vocal synthesizer based on a source/filter model. The source is just a sawtooth wave and the \"filter\" is a bank of resonant bandpass filters. Formant parameters are linearly interpolated allowing to go smoothly from one vowel to another. Voice type can be selected but must correspond to the frequency range of the synthesized voice to be realistic. The formant data used here come from the CSOUND manual * http://www.csounds.com/manual/html/ .","title":"(pm.)SFFormantModelBP"},{"location":"libs/physmodels/#usage_138","text":"SFFormantModelBP(voiceType,vowel,exType,freq,gain) : _ Where: voiceType : the voice type (0: alto, 1: bass, 2: countertenor, 3: soprano, 4: tenor) vowel : the vowel (0: a, 1: e, 2: i, 3: o, 4: u exType : voice vs. fricative sound ratio (0-1 where 1 is 100% fricative) freq : the fundamental frequency of the source signal gain : linear gain multiplier to multiply the source by","title":"Usage"},{"location":"libs/physmodels/#pmsfformantmodelfofcycle_ui","text":"Ready-to-use source-filter vocal synthesizer with built-in user interface.","title":"(pm.)SFFormantModelFofCycle_ui"},{"location":"libs/physmodels/#usage_139","text":"SFFormantModelFofCycle_ui : _","title":"Usage"},{"location":"libs/physmodels/#pmsfformantmodelfofsmooth_ui","text":"Ready-to-use source-filter vocal synthesizer with built-in user interface.","title":"(pm.)SFFormantModelFofSmooth_ui"},{"location":"libs/physmodels/#usage_140","text":"SFFormantModelFofSmooth_ui : _","title":"Usage"},{"location":"libs/physmodels/#pmsfformantmodelbp_ui","text":"Ready-to-use source-filter vocal synthesizer with built-in user interface.","title":"(pm.)SFFormantModelBP_ui"},{"location":"libs/physmodels/#usage_141","text":"SFFormantModelBP_ui : _","title":"Usage"},{"location":"libs/physmodels/#pmsfformantmodelfofcycle_ui_midi","text":"Ready-to-use MIDI-controllable source-filter vocal synthesizer.","title":"(pm.)SFFormantModelFofCycle_ui_MIDI"},{"location":"libs/physmodels/#usage_142","text":"SFFormantModelFofCycle_ui_MIDI : _","title":"Usage"},{"location":"libs/physmodels/#pmsfformantmodelfofsmooth_ui_midi","text":"Ready-to-use MIDI-controllable source-filter vocal synthesizer.","title":"(pm.)SFFormantModelFofSmooth_ui_MIDI"},{"location":"libs/physmodels/#usage_143","text":"SFFormantModelFofSmooth_ui_MIDI : _","title":"Usage"},{"location":"libs/physmodels/#pmsfformantmodelbp_ui_midi","text":"Ready-to-use MIDI-controllable source-filter vocal synthesizer.","title":"(pm.)SFFormantModelBP_ui_MIDI"},{"location":"libs/physmodels/#usage_144","text":"SFFormantModelBP_ui_MIDI : _","title":"Usage"},{"location":"libs/physmodels/#misc-functions","text":"Various miscellaneous functions.","title":"Misc Functions"},{"location":"libs/physmodels/#pmallpassnl","text":"Bidirectional block adding nonlinearities in both directions in a chain. Nonlinearities are created by modulating the coefficients of a passive allpass filter by the signal it is processing.","title":"(pm.)allpassNL"},{"location":"libs/physmodels/#usage_145","text":"chain(... : allpassNL(nonlinearity) : ...) Where: nonlinearity : amount of nonlinearity to be added (0-1)","title":"Usage"},{"location":"libs/physmodels/#pmmodalmodel","text":"Implement multiple resonance modes using resonant bandpass filters.","title":"(pm).modalModel"},{"location":"libs/physmodels/#usage_146","text":"_ : modalModel(n, freqs, t60s, gains) : _ Where: n : number of given modes freqs : list of filter center freqencies t60s : list of mode resonance durations (in seconds) gains : list of mode gains (0-1) For example, to generate a model with 2 modes (440 Hz and 660 Hz, a fifth) where the higher one decays faster and is attenuated: os.impulse : modalModel(2, (440, 660), (0.5, 0.25), (ba.db2linear(-1), ba.db2linear(-6)) : _ Further reading: Grumiaux et. al., 2017: Impulse-Response and CAD-Model-Based Physical Modeling in Faust","title":"Usage"},{"location":"libs/quantizers/","text":"quantizers.lib Faust Frequency Quantization Library. Its official prefix is qu . References https://github.com/grame-cncm/faustlibraries/blob/master/quantizers.lib Functions Reference (qu.)quantize Configurable frequency quantization tool. Output only the frequencies that are part of the specified scale. Works for positive audio frequencies. Usage _ : quantize(rf,nl) : _ Where : rf : frequency of the root note of the scale nl : list of the ratio of the frequencies of each note in relation to the root frequency (qu.)quantizeSmoothed Configurable frequency quantization tool. Output frequencies that are closer to the frequencies of the specified scale notes. Works for positive audio frequencies. Usage _ : quantizeSmoothed(rf,nl) : _ nl = (1,1.2,1.4,1.7); Where : rf : frequency of the root note of the scale nl : list of the ratio of the frequencies of each note in relation to the root frequency (qu.)ionian List of the frequency ratios of the notes of the ionian mode. Usage _ : quantize(rf,ionian) : _ Where: rf : frequency of the root note of the scale (qu.)dorian List of the frequency ratios of the notes of the dorian mode. Usage _ : quantize(rf,dorian) : _ Where: rf : frequency of the root note of the scale (qu.)phrygian List of the frequency ratios of the notes of the phrygian mode. Usage _ : quantize(rf,phrygian) : _ Where: rf : frequency of the root note of the scale (qu.)lydian List of the frequency ratios of the notes of the lydian mode. Usage _ : quantize(rf,lydian) : _ Where: rf : frequency of the root note of the scale (qu.)mixo List of the frequency ratios of the notes of the mixolydian mode. Usage _ : quantize(rf,mixo) : _ Where: rf : frequency of the root note of the scale (qu.)eolian List of the frequency ratios of the notes of the eolian mode. Usage _ : quantize(rf,eolian) : _ Where: rf : frequency of the root note of the scale (qu.)locrian List of the frequency ratios of the notes of the locrian mode. Usage _ : quantize(rf,locrian) : _ Where: rf : frequency of the root note of the scale (qu.)pentanat List of the frequency ratios of the notes of the pythagorean tuning for the minor pentatonic scale. Usage _ : quantize(rf,pentanat) : _ Where: rf : frequency of the root note of the scale (qu.)kumoi List of the frequency ratios of the notes of the kumoijoshi, the japanese pentatonic scale. Usage _ : quantize(rf,kumoi) : _ Where: rf : frequency of the root note of the scale (qu.)natural List of the frequency ratios of the notes of the natural major scale. Usage _ : quantize(rf,natural) : _ Where: rf : frequency of the root note of the scale (qu.)dodeca List of the frequency ratios of the notes of the dodecaphonic scale. Usage _ : quantize(rf,dodeca) : _ Where: rf : frequency of the root note of the scale (qu.)dimin List of the frequency ratios of the notes of the diminished scale. Usage _ : quantize(rf,dimin) : _ Where: rf : frequency of the root note of the scale (qu.)penta List of the frequency ratios of the notes of the minor pentatonic scale. Usage _ : quantize(rf,penta) : _ Where: rf : frequency of the root note of the scale","title":" quantizers "},{"location":"libs/quantizers/#quantizerslib","text":"Faust Frequency Quantization Library. Its official prefix is qu .","title":"quantizers.lib"},{"location":"libs/quantizers/#references","text":"https://github.com/grame-cncm/faustlibraries/blob/master/quantizers.lib","title":"References"},{"location":"libs/quantizers/#functions-reference","text":"","title":"Functions Reference"},{"location":"libs/quantizers/#ququantize","text":"Configurable frequency quantization tool. Output only the frequencies that are part of the specified scale. Works for positive audio frequencies.","title":"(qu.)quantize"},{"location":"libs/quantizers/#usage","text":"_ : quantize(rf,nl) : _ Where : rf : frequency of the root note of the scale nl : list of the ratio of the frequencies of each note in relation to the root frequency","title":"Usage"},{"location":"libs/quantizers/#ququantizesmoothed","text":"Configurable frequency quantization tool. Output frequencies that are closer to the frequencies of the specified scale notes. Works for positive audio frequencies.","title":"(qu.)quantizeSmoothed"},{"location":"libs/quantizers/#usage_1","text":"_ : quantizeSmoothed(rf,nl) : _ nl = (1,1.2,1.4,1.7); Where : rf : frequency of the root note of the scale nl : list of the ratio of the frequencies of each note in relation to the root frequency","title":"Usage"},{"location":"libs/quantizers/#quionian","text":"List of the frequency ratios of the notes of the ionian mode.","title":"(qu.)ionian"},{"location":"libs/quantizers/#usage_2","text":"_ : quantize(rf,ionian) : _ Where: rf : frequency of the root note of the scale","title":"Usage"},{"location":"libs/quantizers/#qudorian","text":"List of the frequency ratios of the notes of the dorian mode.","title":"(qu.)dorian"},{"location":"libs/quantizers/#usage_3","text":"_ : quantize(rf,dorian) : _ Where: rf : frequency of the root note of the scale","title":"Usage"},{"location":"libs/quantizers/#quphrygian","text":"List of the frequency ratios of the notes of the phrygian mode.","title":"(qu.)phrygian"},{"location":"libs/quantizers/#usage_4","text":"_ : quantize(rf,phrygian) : _ Where: rf : frequency of the root note of the scale","title":"Usage"},{"location":"libs/quantizers/#qulydian","text":"List of the frequency ratios of the notes of the lydian mode.","title":"(qu.)lydian"},{"location":"libs/quantizers/#usage_5","text":"_ : quantize(rf,lydian) : _ Where: rf : frequency of the root note of the scale","title":"Usage"},{"location":"libs/quantizers/#qumixo","text":"List of the frequency ratios of the notes of the mixolydian mode.","title":"(qu.)mixo"},{"location":"libs/quantizers/#usage_6","text":"_ : quantize(rf,mixo) : _ Where: rf : frequency of the root note of the scale","title":"Usage"},{"location":"libs/quantizers/#queolian","text":"List of the frequency ratios of the notes of the eolian mode.","title":"(qu.)eolian"},{"location":"libs/quantizers/#usage_7","text":"_ : quantize(rf,eolian) : _ Where: rf : frequency of the root note of the scale","title":"Usage"},{"location":"libs/quantizers/#qulocrian","text":"List of the frequency ratios of the notes of the locrian mode.","title":"(qu.)locrian"},{"location":"libs/quantizers/#usage_8","text":"_ : quantize(rf,locrian) : _ Where: rf : frequency of the root note of the scale","title":"Usage"},{"location":"libs/quantizers/#qupentanat","text":"List of the frequency ratios of the notes of the pythagorean tuning for the minor pentatonic scale.","title":"(qu.)pentanat"},{"location":"libs/quantizers/#usage_9","text":"_ : quantize(rf,pentanat) : _ Where: rf : frequency of the root note of the scale","title":"Usage"},{"location":"libs/quantizers/#qukumoi","text":"List of the frequency ratios of the notes of the kumoijoshi, the japanese pentatonic scale.","title":"(qu.)kumoi"},{"location":"libs/quantizers/#usage_10","text":"_ : quantize(rf,kumoi) : _ Where: rf : frequency of the root note of the scale","title":"Usage"},{"location":"libs/quantizers/#qunatural","text":"List of the frequency ratios of the notes of the natural major scale.","title":"(qu.)natural"},{"location":"libs/quantizers/#usage_11","text":"_ : quantize(rf,natural) : _ Where: rf : frequency of the root note of the scale","title":"Usage"},{"location":"libs/quantizers/#qudodeca","text":"List of the frequency ratios of the notes of the dodecaphonic scale.","title":"(qu.)dodeca"},{"location":"libs/quantizers/#usage_12","text":"_ : quantize(rf,dodeca) : _ Where: rf : frequency of the root note of the scale","title":"Usage"},{"location":"libs/quantizers/#qudimin","text":"List of the frequency ratios of the notes of the diminished scale.","title":"(qu.)dimin"},{"location":"libs/quantizers/#usage_13","text":"_ : quantize(rf,dimin) : _ Where: rf : frequency of the root note of the scale","title":"Usage"},{"location":"libs/quantizers/#qupenta","text":"List of the frequency ratios of the notes of the minor pentatonic scale.","title":"(qu.)penta"},{"location":"libs/quantizers/#usage_14","text":"_ : quantize(rf,penta) : _ Where: rf : frequency of the root note of the scale","title":"Usage"},{"location":"libs/reducemaps/","text":"reducemaps.lib A library providing reduce/map operations in Faust. Its official prefix is rm . The basic idea behind reduce operations is to combine several values into a single one by repeatedly applying a binary operation. A typical example is finding the maximum of a set of values by repeatedly applying the binary operation max . In this reducemaps library, you'll find two types of reduce , depending on whether you want to reduce n consecutive samples of the same signal or a set of n parallel signals. References https://github.com/grame-cncm/faustlibraries/blob/master/reducemaps.lib (rm.)parReduce parReduce(op,N) combines a set of N parallel signals into a single one using a binary operation op . With parReduce , this reduction process simultaneously occurs on each half of the incoming signals. In other words, parReduce(max,256) is equivalent to parReduce(max,128),parReduce(max,128) : max . To be used with parReduce , binary operation op must be associative. Additionally, the concept of a binary operation extends to operations that have 2*n inputs and n outputs. For example, complex signals can be simulated using two signals for the real and imaginary parts. In such case, a binary operation would have 4 inputs and 2 outputs. Please note also that parReduce is faster than topReduce or botReduce for large number of signals. It is therefore the recommended operation whenever op is associative. Usage _,...,_ : parReduce(op, N) : _ Where: op : is a binary operation N : is the number of incomming signals ( N>0 ). We use a capital letter here to indicate that the number of incomming signals must be constant and known at compile time. (rm.)topReduce topReduce(op,N) involves combining a set of N parallel signals into a single one using a binary operation op . With topReduce , the reduction process starts from the top two incoming signals, down to the bottom. In other words, topReduce(max,256) is equivalent to topReduce(max,255),_ : max . Contrary to parReduce , the binary operation op doesn't have to be associative here. Like with parReduce the concept of a binary operation can be extended to operations that have 2*n inputs and n outputs. For example, complex signals can be simulated using two signals representing the real and imaginary parts. In such cases, a binary operation would have 4 inputs and 2 outputs. Usage _,...,_ : topReduce(op, N) : _ Where: op : is a binary operation N : is the number of incomming signals ( N>0 ). We use a capital letter here to indicate that the number of incomming signals must be constant and known at compile time. (rm.)botReduce botReduce(op,N) combines a set of N parallel signals into a single one using a binary operation op . With botReduce , the reduction process starts from the bottom two incoming signals, up to the top. In other words, botReduce(max,256) is equivalent to _,botReduce(max,255): max . Contrary to parReduce , the binary operation op doesn't have to be associative here. Like with parReduce the concept of a binary operation can be extended to operations that have 2*n inputs and n outputs. For example, complex signals can be simulated using two signals representing the real and imaginary parts. In such cases, a binary operation would have 4 inputs and 2 outputs. Usage _,...,_ : botReduce(op, N) : _ Where: op: is a binary operation N: is the number of incomming signals ( N>0 ). We use a capital letter here to indicate that the number of incomming signals must be constant and known at compile time. (rm.)reduce Reduce a block of n consecutive samples of the incomming signal using a binary operation op . For example: reduce(max,128) will compute the maximun value of each block of 128 samples. Please note that the resulting value, while computed continuously, will be constant for the duration of a block. A new value is only produced at the end of a block. Note also that blocks should be of at least one sample (n>0). Usage _ : reduce(op, n) : _ Where: op : is a binary operation n : is the number of consecutive samples in a block. (rm.)reducemap Like reduce but a foo function is applied to the result. From a mathematical point of view: reducemap(op,foo,n) is equivalent to reduce(op,n):foo but more efficient. Usage _ : reducemap(op, foo, n) : _ Where: op : is a binary operation foo : is a function applied to the result of the reduction n : is the number of consecutive samples in a block.","title":" reducemaps "},{"location":"libs/reducemaps/#reducemapslib","text":"A library providing reduce/map operations in Faust. Its official prefix is rm . The basic idea behind reduce operations is to combine several values into a single one by repeatedly applying a binary operation. A typical example is finding the maximum of a set of values by repeatedly applying the binary operation max . In this reducemaps library, you'll find two types of reduce , depending on whether you want to reduce n consecutive samples of the same signal or a set of n parallel signals.","title":"reducemaps.lib"},{"location":"libs/reducemaps/#references","text":"https://github.com/grame-cncm/faustlibraries/blob/master/reducemaps.lib","title":"References"},{"location":"libs/reducemaps/#rmparreduce","text":"parReduce(op,N) combines a set of N parallel signals into a single one using a binary operation op . With parReduce , this reduction process simultaneously occurs on each half of the incoming signals. In other words, parReduce(max,256) is equivalent to parReduce(max,128),parReduce(max,128) : max . To be used with parReduce , binary operation op must be associative. Additionally, the concept of a binary operation extends to operations that have 2*n inputs and n outputs. For example, complex signals can be simulated using two signals for the real and imaginary parts. In such case, a binary operation would have 4 inputs and 2 outputs. Please note also that parReduce is faster than topReduce or botReduce for large number of signals. It is therefore the recommended operation whenever op is associative.","title":"(rm.)parReduce"},{"location":"libs/reducemaps/#usage","text":"_,...,_ : parReduce(op, N) : _ Where: op : is a binary operation N : is the number of incomming signals ( N>0 ). We use a capital letter here to indicate that the number of incomming signals must be constant and known at compile time.","title":"Usage"},{"location":"libs/reducemaps/#rmtopreduce","text":"topReduce(op,N) involves combining a set of N parallel signals into a single one using a binary operation op . With topReduce , the reduction process starts from the top two incoming signals, down to the bottom. In other words, topReduce(max,256) is equivalent to topReduce(max,255),_ : max . Contrary to parReduce , the binary operation op doesn't have to be associative here. Like with parReduce the concept of a binary operation can be extended to operations that have 2*n inputs and n outputs. For example, complex signals can be simulated using two signals representing the real and imaginary parts. In such cases, a binary operation would have 4 inputs and 2 outputs.","title":"(rm.)topReduce"},{"location":"libs/reducemaps/#usage_1","text":"_,...,_ : topReduce(op, N) : _ Where: op : is a binary operation N : is the number of incomming signals ( N>0 ). We use a capital letter here to indicate that the number of incomming signals must be constant and known at compile time.","title":"Usage"},{"location":"libs/reducemaps/#rmbotreduce","text":"botReduce(op,N) combines a set of N parallel signals into a single one using a binary operation op . With botReduce , the reduction process starts from the bottom two incoming signals, up to the top. In other words, botReduce(max,256) is equivalent to _,botReduce(max,255): max . Contrary to parReduce , the binary operation op doesn't have to be associative here. Like with parReduce the concept of a binary operation can be extended to operations that have 2*n inputs and n outputs. For example, complex signals can be simulated using two signals representing the real and imaginary parts. In such cases, a binary operation would have 4 inputs and 2 outputs.","title":"(rm.)botReduce"},{"location":"libs/reducemaps/#usage_2","text":"_,...,_ : botReduce(op, N) : _ Where: op: is a binary operation N: is the number of incomming signals ( N>0 ). We use a capital letter here to indicate that the number of incomming signals must be constant and known at compile time.","title":"Usage"},{"location":"libs/reducemaps/#rmreduce","text":"Reduce a block of n consecutive samples of the incomming signal using a binary operation op . For example: reduce(max,128) will compute the maximun value of each block of 128 samples. Please note that the resulting value, while computed continuously, will be constant for the duration of a block. A new value is only produced at the end of a block. Note also that blocks should be of at least one sample (n>0).","title":"(rm.)reduce"},{"location":"libs/reducemaps/#usage_3","text":"_ : reduce(op, n) : _ Where: op : is a binary operation n : is the number of consecutive samples in a block.","title":"Usage"},{"location":"libs/reducemaps/#rmreducemap","text":"Like reduce but a foo function is applied to the result. From a mathematical point of view: reducemap(op,foo,n) is equivalent to reduce(op,n):foo but more efficient.","title":"(rm.)reducemap"},{"location":"libs/reducemaps/#usage_4","text":"_ : reducemap(op, foo, n) : _ Where: op : is a binary operation foo : is a function applied to the result of the reduction n : is the number of consecutive samples in a block.","title":"Usage"},{"location":"libs/reverbs/","text":"reverbs.lib A library of reverb effects. Its official prefix is re . References https://github.com/grame-cncm/faustlibraries/blob/master/reverbs.lib Schroeder Reverberators (re.)jcrev This artificial reverberator take a mono signal and output stereo ( satrev ) and quad ( jcrev ). They were implemented by John Chowning in the MUS10 computer-music language (descended from Music V by Max Mathews). They are Schroeder Reverberators, well tuned for their size. Nowadays, the more expensive freeverb is more commonly used (see the Faust examples directory). jcrev reverb below was made from a listing of \"RV\", dated April 14, 1972, which was recovered from an old SAIL DART backup tape. John Chowning thinks this might be the one that became the well known and often copied JCREV. jcrev is a standard Faust function. Usage _ : jcrev : _,_,_,_ (re.)satrev This artificial reverberator take a mono signal and output stereo ( satrev ) and quad ( jcrev ). They were implemented by John Chowning in the MUS10 computer-music language (descended from Music V by Max Mathews). They are Schroeder Reverberators, well tuned for their size. Nowadays, the more expensive freeverb is more commonly used (see the Faust examples directory). satrev was made from a listing of \"SATREV\", dated May 15, 1971, which was recovered from an old SAIL DART backup tape. John Chowning thinks this might be the one used on his often-heard brass canon sound examples, one of which can be found at * https://ccrma.stanford.edu/~jos/wav/FM-BrassCanon2.wav . Usage _ : satrev : _,_ Feedback Delay Network (FDN) Reverberators (re.)fdnrev0 Pure Feedback Delay Network Reverberator (generalized for easy scaling). fdnrev0 is a standard Faust function. Usage <1,2,4,...,N signals> <: fdnrev0(MAXDELAY,delays,BBSO,freqs,durs,loopgainmax,nonl) :> <1,2,4,...,N signals> Where: N : 2, 4, 8, ... (power of 2) MAXDELAY : power of 2 at least as large as longest delay-line length delays : N delay lines, N a power of 2, lengths perferably coprime BBSO : odd positive integer = order of bandsplit desired at freqs freqs : NB-1 crossover frequencies separating desired frequency bands durs : NB decay times (t60) desired for the various bands loopgainmax : scalar gain between 0 and 1 used to \"squelch\" the reverb nonl : nonlinearity (0 to 0.999..., 0 being linear) Reference https://ccrma.stanford.edu/~jos/pasp/FDN_Reverberation.html (re.)zita_rev_fdn Internal 8x8 late-reverberation FDN used in the FOSS Linux reverb zita-rev1 by Fons Adriaensen fons@linuxaudio.org . This is an FDN reverb with allpass comb filters in each feedback delay in addition to the damping filters. Usage si.bus(8) : zita_rev_fdn(f1,f2,t60dc,t60m,fsmax) : si.bus(8) Where: f1 : crossover frequency (Hz) separating dc and midrange frequencies f2 : frequency (Hz) above f1 where T60 = t60m/2 (see below) t60dc : desired decay time (t60) at frequency 0 (sec) t60m : desired decay time (t60) at midrange frequencies (sec) fsmax : maximum sampling rate to be used (Hz) Reference http://www.kokkinizita.net/linuxaudio/zita-rev1-doc/quickguide.html https://ccrma.stanford.edu/~jos/pasp/Zita_Rev1.html (re.)zita_rev1_stereo Extend zita_rev_fdn to include zita_rev1 input/output mapping in stereo mode. zita_rev1_stereo is a standard Faust function. Usage _,_ : zita_rev1_stereo(rdel,f1,f2,t60dc,t60m,fsmax) : _,_ Where: rdel = delay (in ms) before reverberation begins (e.g., 0 to ~100 ms) (remaining args and refs as for zita_rev_fdn above) (re.)zita_rev1_ambi Extend zita_rev_fdn to include zita_rev1 input/output mapping in \"ambisonics mode\", as provided in the Linux C++ version. Usage _,_ : zita_rev1_ambi(rgxyz,rdel,f1,f2,t60dc,t60m,fsmax) : _,_,_,_ Where: rgxyz = relative gain of lanes 1,4,2 to lane 0 in output (e.g., -9 to 9) (remaining args and references as for zita_rev1_stereo above) Freeverb (re.)mono_freeverb A simple Schroeder reverberator primarily developed by \"Jezar at Dreampoint\" that is extensively used in the free-software world. It uses four Schroeder allpasses in series and eight parallel Schroeder-Moorer filtered-feedback comb-filters for each audio channel, and is said to be especially well tuned. mono_freeverb is a standard Faust function. Usage _ : mono_freeverb(fb1, fb2, damp, spread) : _ Where: fb1 : coefficient of the lowpass comb filters (0-1) fb2 : coefficient of the allpass comb filters (0-1) damp : damping of the lowpass comb filter (0-1) spread : spatial spread in number of samples (for stereo) License While this version is licensed LGPL (with exception) along with other GRAME library functions, the file freeverb.dsp in the examples directory of older Faust distributions, such as faust-0.9.85, was released under the BSD license, which is less restrictive. (re.)stereo_freeverb A simple Schroeder reverberator primarily developed by \"Jezar at Dreampoint\" that is extensively used in the free-software world. It uses four Schroeder allpasses in series and eight parallel Schroeder-Moorer filtered-feedback comb-filters for each audio channel, and is said to be especially well tuned. Usage _,_ : stereo_freeverb(fb1, fb2, damp, spread) : _,_ Where: fb1 : coefficient of the lowpass comb filters (0-1) fb2 : coefficient of the allpass comb filters (0-1) damp : damping of the lowpass comb filter (0-1) spread : spatial spread in number of samples (for stereo) Dattorro Reverb (re.)dattorro_rev Reverberator based on the Dattorro reverb topology. This implementation does not use modulated delay lengths (excursion). Usage _,_ : dattorro_rev(pre_delay, bw, i_diff1, i_diff2, decay, d_diff1, d_diff2, damping) : _,_ Where: pre_delay : pre-delay in samples (fixed at compile time) bw : band-width filter (pre filtering); (0 - 1) i_diff1 : input diffusion factor 1; (0 - 1) i_diff2 : input diffusion factor 2; decay : decay rate; (0 - 1); infinite decay = 1.0 d_diff1 : decay diffusion factor 1; (0 - 1) d_diff2 : decay diffusion factor 2; damping : high-frequency damping; no damping = 0.0 Reference https://ccrma.stanford.edu/~dattorro/EffectDesignPart1.pdf (re.)dattorro_rev_default Reverberator based on the Dattorro reverb topology with reverb parameters from the original paper. This implementation does not use modulated delay lengths (excursion) and uses zero length pre-delay. Usage _,_ : dattorro_rev_default : _,_ Reference https://ccrma.stanford.edu/~dattorro/EffectDesignPart1.pdf JPverb and Greyhole Reverbs (re.)jpverb An algorithmic reverb (stereo in/out), inspired by the lush chorused sound of certain vintage Lexicon and Alesis reverberation units. Designed to sound great with synthetic sound sources, rather than sound like a realistic space. Usage _,_ : jpverb(t60, damp, size, early_diff, mod_depth, mod_freq, low, mid, high, low_cutoff, high_cutoff) : _,_ Where: t60 : approximate reverberation time in seconds ([0.1..60] sec) (T60 - the time for the reverb to decay by 60db when damp == 0 ). Does not effect early reflections damp : controls damping of high-frequencies as the reverb decays. 0 is no damping, 1 is very strong damping. Values should be between ([0..1]) size : scales size of delay-lines within the reverberator, producing the impression of a larger or smaller space. Values below 1 can sound metallic. Values should be between [0.5..5] early_diff : controls shape of early reflections. Values of 0.707 or more produce smooth exponential decay. Lower values produce a slower build-up of echoes. Values should be between ([0..1]) mod_depth : depth ([0..1]) of delay-line modulation. Use in combination with mod_freq to set amount of chorusing within the structure modFreq : frequency ([0..10] Hz) of delay-line modulation. Use in combination with modDepth to set amount of chorusing within the structure low : multiplier ([0..1]) for the reverberation time within the low band mid : multiplier ([0..1]) for the reverberation time within the mid band high : multiplier ([0..1]) for the reverberation time within the high band lowcut : frequency (100..6000 Hz) at which the crossover between the low and mid bands of the reverb occurs highcut : frequency (1000..10000 Hz) at which the crossover between the mid and high bands of the reverb occurs Reference https://doc.sccode.org/Overviews/DEIND.html (re.)greyhole A complex echo-like effect (stereo in/out), inspired by the classic Eventide effect of a similar name. The effect consists of a diffuser (like a mini-reverb, structurally similar to the one used in jpverb ) connected in a feedback system with a long, modulated delay-line. Excels at producing spacey washes of sound. Usage _,_ : greyhole(dt, damp, size, early_diff, feedback, mod_depth, mod_freq) : _,_ Where: dt : approximate reverberation time in seconds ([0.1..60 sec]) damp : controls damping of high-frequencies as the reverb decays. 0 is no damping, 1 is very strong damping. Values should be between ([0..1]) size : scales size of delay-lines within the diffusion unit, producing the impression of a larger or smaller space. Values below 1 can sound metallic. Values should be between ([0.5..5]) size : control of relative \"room size\" roughly between ([0.5..3]) early_diff : controls pattern of echoes produced by the diffuser. At very low values, the diffuser acts like a delay-line whose length is controlled by the 'size' parameter. Medium values produce a slow build-up of echoes, giving the sound a reversed-like quality. Values of 0.707 or greater than produce smooth exponentially decaying echoes. Values should be in the range ([0..1]) feedback : amount of feedback through the system. Sets the number of repeating echoes. A setting of 1.0 produces infinite sustain. Values should be in the range ([0..1]) mod_depth : depth ([0..1]) of delay-line modulation. Use in combination with mod_freq to produce chorus and pitch-variations in the echoes mod_freq : frequency ([0..10] Hz) of delay-line modulation. Use in combination with mod_depth to produce chorus and pitch-variations in the echoes Reference https://doc.sccode.org/Overviews/DEIND.html","title":" reverbs "},{"location":"libs/reverbs/#reverbslib","text":"A library of reverb effects. Its official prefix is re .","title":"reverbs.lib"},{"location":"libs/reverbs/#references","text":"https://github.com/grame-cncm/faustlibraries/blob/master/reverbs.lib","title":"References"},{"location":"libs/reverbs/#schroeder-reverberators","text":"","title":"Schroeder Reverberators"},{"location":"libs/reverbs/#rejcrev","text":"This artificial reverberator take a mono signal and output stereo ( satrev ) and quad ( jcrev ). They were implemented by John Chowning in the MUS10 computer-music language (descended from Music V by Max Mathews). They are Schroeder Reverberators, well tuned for their size. Nowadays, the more expensive freeverb is more commonly used (see the Faust examples directory). jcrev reverb below was made from a listing of \"RV\", dated April 14, 1972, which was recovered from an old SAIL DART backup tape. John Chowning thinks this might be the one that became the well known and often copied JCREV. jcrev is a standard Faust function.","title":"(re.)jcrev"},{"location":"libs/reverbs/#usage","text":"_ : jcrev : _,_,_,_","title":"Usage"},{"location":"libs/reverbs/#resatrev","text":"This artificial reverberator take a mono signal and output stereo ( satrev ) and quad ( jcrev ). They were implemented by John Chowning in the MUS10 computer-music language (descended from Music V by Max Mathews). They are Schroeder Reverberators, well tuned for their size. Nowadays, the more expensive freeverb is more commonly used (see the Faust examples directory). satrev was made from a listing of \"SATREV\", dated May 15, 1971, which was recovered from an old SAIL DART backup tape. John Chowning thinks this might be the one used on his often-heard brass canon sound examples, one of which can be found at * https://ccrma.stanford.edu/~jos/wav/FM-BrassCanon2.wav .","title":"(re.)satrev"},{"location":"libs/reverbs/#usage_1","text":"_ : satrev : _,_","title":"Usage"},{"location":"libs/reverbs/#feedback-delay-network-fdn-reverberators","text":"","title":"Feedback Delay Network (FDN) Reverberators"},{"location":"libs/reverbs/#refdnrev0","text":"Pure Feedback Delay Network Reverberator (generalized for easy scaling). fdnrev0 is a standard Faust function.","title":"(re.)fdnrev0"},{"location":"libs/reverbs/#usage_2","text":"<1,2,4,...,N signals> <: fdnrev0(MAXDELAY,delays,BBSO,freqs,durs,loopgainmax,nonl) :> <1,2,4,...,N signals> Where: N : 2, 4, 8, ... (power of 2) MAXDELAY : power of 2 at least as large as longest delay-line length delays : N delay lines, N a power of 2, lengths perferably coprime BBSO : odd positive integer = order of bandsplit desired at freqs freqs : NB-1 crossover frequencies separating desired frequency bands durs : NB decay times (t60) desired for the various bands loopgainmax : scalar gain between 0 and 1 used to \"squelch\" the reverb nonl : nonlinearity (0 to 0.999..., 0 being linear)","title":"Usage"},{"location":"libs/reverbs/#reference","text":"https://ccrma.stanford.edu/~jos/pasp/FDN_Reverberation.html","title":"Reference"},{"location":"libs/reverbs/#rezita_rev_fdn","text":"Internal 8x8 late-reverberation FDN used in the FOSS Linux reverb zita-rev1 by Fons Adriaensen fons@linuxaudio.org . This is an FDN reverb with allpass comb filters in each feedback delay in addition to the damping filters.","title":"(re.)zita_rev_fdn"},{"location":"libs/reverbs/#usage_3","text":"si.bus(8) : zita_rev_fdn(f1,f2,t60dc,t60m,fsmax) : si.bus(8) Where: f1 : crossover frequency (Hz) separating dc and midrange frequencies f2 : frequency (Hz) above f1 where T60 = t60m/2 (see below) t60dc : desired decay time (t60) at frequency 0 (sec) t60m : desired decay time (t60) at midrange frequencies (sec) fsmax : maximum sampling rate to be used (Hz)","title":"Usage"},{"location":"libs/reverbs/#reference_1","text":"http://www.kokkinizita.net/linuxaudio/zita-rev1-doc/quickguide.html https://ccrma.stanford.edu/~jos/pasp/Zita_Rev1.html","title":"Reference"},{"location":"libs/reverbs/#rezita_rev1_stereo","text":"Extend zita_rev_fdn to include zita_rev1 input/output mapping in stereo mode. zita_rev1_stereo is a standard Faust function.","title":"(re.)zita_rev1_stereo"},{"location":"libs/reverbs/#usage_4","text":"_,_ : zita_rev1_stereo(rdel,f1,f2,t60dc,t60m,fsmax) : _,_ Where: rdel = delay (in ms) before reverberation begins (e.g., 0 to ~100 ms) (remaining args and refs as for zita_rev_fdn above)","title":"Usage"},{"location":"libs/reverbs/#rezita_rev1_ambi","text":"Extend zita_rev_fdn to include zita_rev1 input/output mapping in \"ambisonics mode\", as provided in the Linux C++ version.","title":"(re.)zita_rev1_ambi"},{"location":"libs/reverbs/#usage_5","text":"_,_ : zita_rev1_ambi(rgxyz,rdel,f1,f2,t60dc,t60m,fsmax) : _,_,_,_ Where: rgxyz = relative gain of lanes 1,4,2 to lane 0 in output (e.g., -9 to 9) (remaining args and references as for zita_rev1_stereo above)","title":"Usage"},{"location":"libs/reverbs/#freeverb","text":"","title":"Freeverb"},{"location":"libs/reverbs/#remono_freeverb","text":"A simple Schroeder reverberator primarily developed by \"Jezar at Dreampoint\" that is extensively used in the free-software world. It uses four Schroeder allpasses in series and eight parallel Schroeder-Moorer filtered-feedback comb-filters for each audio channel, and is said to be especially well tuned. mono_freeverb is a standard Faust function.","title":"(re.)mono_freeverb"},{"location":"libs/reverbs/#usage_6","text":"_ : mono_freeverb(fb1, fb2, damp, spread) : _ Where: fb1 : coefficient of the lowpass comb filters (0-1) fb2 : coefficient of the allpass comb filters (0-1) damp : damping of the lowpass comb filter (0-1) spread : spatial spread in number of samples (for stereo)","title":"Usage"},{"location":"libs/reverbs/#license","text":"While this version is licensed LGPL (with exception) along with other GRAME library functions, the file freeverb.dsp in the examples directory of older Faust distributions, such as faust-0.9.85, was released under the BSD license, which is less restrictive.","title":"License"},{"location":"libs/reverbs/#restereo_freeverb","text":"A simple Schroeder reverberator primarily developed by \"Jezar at Dreampoint\" that is extensively used in the free-software world. It uses four Schroeder allpasses in series and eight parallel Schroeder-Moorer filtered-feedback comb-filters for each audio channel, and is said to be especially well tuned.","title":"(re.)stereo_freeverb"},{"location":"libs/reverbs/#usage_7","text":"_,_ : stereo_freeverb(fb1, fb2, damp, spread) : _,_ Where: fb1 : coefficient of the lowpass comb filters (0-1) fb2 : coefficient of the allpass comb filters (0-1) damp : damping of the lowpass comb filter (0-1) spread : spatial spread in number of samples (for stereo)","title":"Usage"},{"location":"libs/reverbs/#dattorro-reverb","text":"","title":"Dattorro Reverb"},{"location":"libs/reverbs/#redattorro_rev","text":"Reverberator based on the Dattorro reverb topology. This implementation does not use modulated delay lengths (excursion).","title":"(re.)dattorro_rev"},{"location":"libs/reverbs/#usage_8","text":"_,_ : dattorro_rev(pre_delay, bw, i_diff1, i_diff2, decay, d_diff1, d_diff2, damping) : _,_ Where: pre_delay : pre-delay in samples (fixed at compile time) bw : band-width filter (pre filtering); (0 - 1) i_diff1 : input diffusion factor 1; (0 - 1) i_diff2 : input diffusion factor 2; decay : decay rate; (0 - 1); infinite decay = 1.0 d_diff1 : decay diffusion factor 1; (0 - 1) d_diff2 : decay diffusion factor 2; damping : high-frequency damping; no damping = 0.0","title":"Usage"},{"location":"libs/reverbs/#reference_2","text":"https://ccrma.stanford.edu/~dattorro/EffectDesignPart1.pdf","title":"Reference"},{"location":"libs/reverbs/#redattorro_rev_default","text":"Reverberator based on the Dattorro reverb topology with reverb parameters from the original paper. This implementation does not use modulated delay lengths (excursion) and uses zero length pre-delay.","title":"(re.)dattorro_rev_default"},{"location":"libs/reverbs/#usage_9","text":"_,_ : dattorro_rev_default : _,_","title":"Usage"},{"location":"libs/reverbs/#reference_3","text":"https://ccrma.stanford.edu/~dattorro/EffectDesignPart1.pdf","title":"Reference"},{"location":"libs/reverbs/#jpverb-and-greyhole-reverbs","text":"","title":"JPverb and Greyhole Reverbs"},{"location":"libs/reverbs/#rejpverb","text":"An algorithmic reverb (stereo in/out), inspired by the lush chorused sound of certain vintage Lexicon and Alesis reverberation units. Designed to sound great with synthetic sound sources, rather than sound like a realistic space.","title":"(re.)jpverb"},{"location":"libs/reverbs/#usage_10","text":"_,_ : jpverb(t60, damp, size, early_diff, mod_depth, mod_freq, low, mid, high, low_cutoff, high_cutoff) : _,_ Where: t60 : approximate reverberation time in seconds ([0.1..60] sec) (T60 - the time for the reverb to decay by 60db when damp == 0 ). Does not effect early reflections damp : controls damping of high-frequencies as the reverb decays. 0 is no damping, 1 is very strong damping. Values should be between ([0..1]) size : scales size of delay-lines within the reverberator, producing the impression of a larger or smaller space. Values below 1 can sound metallic. Values should be between [0.5..5] early_diff : controls shape of early reflections. Values of 0.707 or more produce smooth exponential decay. Lower values produce a slower build-up of echoes. Values should be between ([0..1]) mod_depth : depth ([0..1]) of delay-line modulation. Use in combination with mod_freq to set amount of chorusing within the structure modFreq : frequency ([0..10] Hz) of delay-line modulation. Use in combination with modDepth to set amount of chorusing within the structure low : multiplier ([0..1]) for the reverberation time within the low band mid : multiplier ([0..1]) for the reverberation time within the mid band high : multiplier ([0..1]) for the reverberation time within the high band lowcut : frequency (100..6000 Hz) at which the crossover between the low and mid bands of the reverb occurs highcut : frequency (1000..10000 Hz) at which the crossover between the mid and high bands of the reverb occurs","title":"Usage"},{"location":"libs/reverbs/#reference_4","text":"https://doc.sccode.org/Overviews/DEIND.html","title":"Reference"},{"location":"libs/reverbs/#regreyhole","text":"A complex echo-like effect (stereo in/out), inspired by the classic Eventide effect of a similar name. The effect consists of a diffuser (like a mini-reverb, structurally similar to the one used in jpverb ) connected in a feedback system with a long, modulated delay-line. Excels at producing spacey washes of sound.","title":"(re.)greyhole"},{"location":"libs/reverbs/#usage_11","text":"_,_ : greyhole(dt, damp, size, early_diff, feedback, mod_depth, mod_freq) : _,_ Where: dt : approximate reverberation time in seconds ([0.1..60 sec]) damp : controls damping of high-frequencies as the reverb decays. 0 is no damping, 1 is very strong damping. Values should be between ([0..1]) size : scales size of delay-lines within the diffusion unit, producing the impression of a larger or smaller space. Values below 1 can sound metallic. Values should be between ([0.5..5]) size : control of relative \"room size\" roughly between ([0.5..3]) early_diff : controls pattern of echoes produced by the diffuser. At very low values, the diffuser acts like a delay-line whose length is controlled by the 'size' parameter. Medium values produce a slow build-up of echoes, giving the sound a reversed-like quality. Values of 0.707 or greater than produce smooth exponentially decaying echoes. Values should be in the range ([0..1]) feedback : amount of feedback through the system. Sets the number of repeating echoes. A setting of 1.0 produces infinite sustain. Values should be in the range ([0..1]) mod_depth : depth ([0..1]) of delay-line modulation. Use in combination with mod_freq to produce chorus and pitch-variations in the echoes mod_freq : frequency ([0..10] Hz) of delay-line modulation. Use in combination with mod_depth to produce chorus and pitch-variations in the echoes","title":"Usage"},{"location":"libs/reverbs/#reference_5","text":"https://doc.sccode.org/Overviews/DEIND.html","title":"Reference"},{"location":"libs/routes/","text":"routes.lib A library to handle signal routing in Faust. Its official prefix is ro . References https://github.com/grame-cncm/faustlibraries/blob/master/routes.lib Functions Reference (ro.)cross Cross N signals: (x1,x2,..,xn) -> (xn,..,x2,x1) . cross is a standard Faust function. Usage cross(N) _,_,_ : cross(3) : _,_,_ Where: N : number of signals (int, as a constant numerical expression) Note Special case: cross2 : cross2 = _,cross(2),_; (ro.)crossnn Cross two bus(N) s. Usage (si.bus(2*N)) : crossnn(N) : (si.bus(2*N)) Where: N : the number of signals in the bus (int, as a constant numerical expression) (ro.)crossn1 Cross bus(N) and bus(1) . Usage (si.bus(N),_) : crossn1(N) : (_,si.bus(N)) Where: N : the number of signals in the first bus (int, as a constant numerical expression) (ro.)cross1n Cross bus(1) and bus(N) . Usage (_,si.bus(N)) : crossn1(N) : (si.bus(N),_) Where: N : the number of signals in the second bus (int, as a constant numerical expression) (ro.)crossNM Cross bus(N) and bus(M) . Usage (si.bus(N),si.bus(M)) : crossNM(N,M) : (si.bus(M),si.bus(N)) Where: N : the number of signals in the first bus (int, as a constant numerical expression) M : the number of signals in the second bus (int, as a constant numerical expression) (ro.)interleave Interleave R x C cables from column order to row order. input : x(0), x(1), x(2) ..., x(row col-1) output: x(0+0 row), x(0+1 row), x(0+2 row), ..., x(1+0 row), x(1+1 row), x(1+2*row), ... Usage si.bus(R*C) : interleave(R,C) : si.bus(R*C) Where: R : the number of row (int, as a constant numerical expression) C : the number of column (int, as a constant numerical expression) (ro.)butterfly Addition (first half) then substraction (second half) of interleaved signals. Usage si.bus(N) : butterfly(N) : si.bus(N) Where: N : size of the butterfly (N is int, even and as a constant numerical expression) (ro.)hadamard Hadamard matrix function of size N = 2^k . Usage si.bus(N) : hadamard(N) : si.bus(N) Where: N : 2^k , size of the matrix (int, as a constant numerical expression) (ro.)recursivize Create a recursion from two arbitrary processors p and q . Usage _,_ : recursivize(p,q) : _,_ Where: p : the forward arbitrary processor q : the feedback arbitrary processor (ro.)bubbleSort Sort a set of N parallel signals in ascending order on-the-fly through the Bubble Sort algorithm. Mechanism: having a set of N parallel signals indexed from 0 to N - 1, compare the first pair of signals and swap them if sig[0] > sig[1]; repeat the pair comparison for the signals sig[1] and sig[2], then again recursively until reaching the signals sig[N - 2] and sig[N - 1]; by the end, the largest element in the set will be placed last; repeat the process for the remaining N - 1 signals until there is a single pair left. Note that this implementation will always perform the worst-case computation, O(n^2). Even though the Bubble Sort algorithm is one of the least efficient ones, it is a useful example of how automatic sorting can be implemented at the signal level. Usage si.bus(N) : bubbleSort(N) : si.bus(N) Where: N : the number of signals to be sorted (must be an int >= 0, as a constant numerical expression) Reference https://en.wikipedia.org/wiki/Bubble_sort","title":" routes "},{"location":"libs/routes/#routeslib","text":"A library to handle signal routing in Faust. Its official prefix is ro .","title":"routes.lib"},{"location":"libs/routes/#references","text":"https://github.com/grame-cncm/faustlibraries/blob/master/routes.lib","title":"References"},{"location":"libs/routes/#functions-reference","text":"","title":"Functions Reference"},{"location":"libs/routes/#rocross","text":"Cross N signals: (x1,x2,..,xn) -> (xn,..,x2,x1) . cross is a standard Faust function.","title":"(ro.)cross"},{"location":"libs/routes/#usage","text":"cross(N) _,_,_ : cross(3) : _,_,_ Where: N : number of signals (int, as a constant numerical expression)","title":"Usage"},{"location":"libs/routes/#note","text":"Special case: cross2 : cross2 = _,cross(2),_;","title":"Note"},{"location":"libs/routes/#rocrossnn","text":"Cross two bus(N) s.","title":"(ro.)crossnn"},{"location":"libs/routes/#usage_1","text":"(si.bus(2*N)) : crossnn(N) : (si.bus(2*N)) Where: N : the number of signals in the bus (int, as a constant numerical expression)","title":"Usage"},{"location":"libs/routes/#rocrossn1","text":"Cross bus(N) and bus(1) .","title":"(ro.)crossn1"},{"location":"libs/routes/#usage_2","text":"(si.bus(N),_) : crossn1(N) : (_,si.bus(N)) Where: N : the number of signals in the first bus (int, as a constant numerical expression)","title":"Usage"},{"location":"libs/routes/#rocross1n","text":"Cross bus(1) and bus(N) .","title":"(ro.)cross1n"},{"location":"libs/routes/#usage_3","text":"(_,si.bus(N)) : crossn1(N) : (si.bus(N),_) Where: N : the number of signals in the second bus (int, as a constant numerical expression)","title":"Usage"},{"location":"libs/routes/#rocrossnm","text":"Cross bus(N) and bus(M) .","title":"(ro.)crossNM"},{"location":"libs/routes/#usage_4","text":"(si.bus(N),si.bus(M)) : crossNM(N,M) : (si.bus(M),si.bus(N)) Where: N : the number of signals in the first bus (int, as a constant numerical expression) M : the number of signals in the second bus (int, as a constant numerical expression)","title":"Usage"},{"location":"libs/routes/#rointerleave","text":"Interleave R x C cables from column order to row order. input : x(0), x(1), x(2) ..., x(row col-1) output: x(0+0 row), x(0+1 row), x(0+2 row), ..., x(1+0 row), x(1+1 row), x(1+2*row), ...","title":"(ro.)interleave"},{"location":"libs/routes/#usage_5","text":"si.bus(R*C) : interleave(R,C) : si.bus(R*C) Where: R : the number of row (int, as a constant numerical expression) C : the number of column (int, as a constant numerical expression)","title":"Usage"},{"location":"libs/routes/#robutterfly","text":"Addition (first half) then substraction (second half) of interleaved signals.","title":"(ro.)butterfly"},{"location":"libs/routes/#usage_6","text":"si.bus(N) : butterfly(N) : si.bus(N) Where: N : size of the butterfly (N is int, even and as a constant numerical expression)","title":"Usage"},{"location":"libs/routes/#rohadamard","text":"Hadamard matrix function of size N = 2^k .","title":"(ro.)hadamard"},{"location":"libs/routes/#usage_7","text":"si.bus(N) : hadamard(N) : si.bus(N) Where: N : 2^k , size of the matrix (int, as a constant numerical expression)","title":"Usage"},{"location":"libs/routes/#rorecursivize","text":"Create a recursion from two arbitrary processors p and q .","title":"(ro.)recursivize"},{"location":"libs/routes/#usage_8","text":"_,_ : recursivize(p,q) : _,_ Where: p : the forward arbitrary processor q : the feedback arbitrary processor","title":"Usage"},{"location":"libs/routes/#robubblesort","text":"Sort a set of N parallel signals in ascending order on-the-fly through the Bubble Sort algorithm. Mechanism: having a set of N parallel signals indexed from 0 to N - 1, compare the first pair of signals and swap them if sig[0] > sig[1]; repeat the pair comparison for the signals sig[1] and sig[2], then again recursively until reaching the signals sig[N - 2] and sig[N - 1]; by the end, the largest element in the set will be placed last; repeat the process for the remaining N - 1 signals until there is a single pair left. Note that this implementation will always perform the worst-case computation, O(n^2). Even though the Bubble Sort algorithm is one of the least efficient ones, it is a useful example of how automatic sorting can be implemented at the signal level.","title":"(ro.)bubbleSort"},{"location":"libs/routes/#usage_9","text":"si.bus(N) : bubbleSort(N) : si.bus(N) Where: N : the number of signals to be sorted (must be an int >= 0, as a constant numerical expression)","title":"Usage"},{"location":"libs/routes/#reference","text":"https://en.wikipedia.org/wiki/Bubble_sort","title":"Reference"},{"location":"libs/signals/","text":"signals.lib A library of basic elements to handle signals in Faust. Its official prefix is si . References https://github.com/grame-cncm/faustlibraries/blob/master/signals.lib Functions Reference (si.)bus Put N cables in parallel. bus is a standard Faust function. Usage bus(N) bus(4) : _,_,_,_ Where: N : is an integer known at compile time that indicates the number of parallel cables (si.)block Block - terminate N signals. block is a standard Faust function. Usage si.bus(N) : block(N) Where: N : the number of signals to be blocked known at compile time (si.)interpolate Linear interpolation between two signals. Usage _,_ : interpolate(i) : _ Where: i : interpolation control between 0 and 1 (0: first input; 1: second input) (si.)smoo Smoothing function based on smooth ideal to smooth UI signals (sliders, etc.) down. Approximately, this is a 7 Hz one-pole low-pass considering the coefficient calculation: exp(-2pi*CF/SR). smoo is a standard Faust function. Usage hslider(...) : smoo; (si.)polySmooth A smoothing function based on smooth that doesn't smooth when a trigger signal is given. This is very useful when making polyphonic synthesizer to make sure that the value of the parameter is the right one when the note is started. Usage hslider(...) : polySmooth(g,s,d) : _ Where: g : the gate/trigger signal used when making polyphonic synths s : the smoothness (see smooth ) d : the number of samples to wait before the signal start being smoothed after g switched to 1 (si.)smoothAndH A smoothing function based on smooth that holds its output signal when a trigger is sent to it. This feature is convenient when implementing polyphonic instruments to prevent some smoothed parameter to change when a note-off event is sent. Usage hslider(...) : smoothAndH(g,s) : _ Where: g : the hold signal (0 for hold, 1 for bypass) s : the smoothness (see smooth ) (si.)bsmooth Block smooth linear interpolation during a block of samples (given by the ma.BS value). Usage hslider(...) : bsmooth : _ (si.)dot Dot product for two vectors of size N. Usage si.bus(N), si.bus(N) : dot(N) : _ Where: N : size of the vectors (int, must be known at compile time) (si.)smooth Exponential smoothing by a unity-dc-gain one-pole lowpass. smooth is a standard Faust function. Usage: _ : si.smooth(ba.tau2pole(tau)) : _ Where: tau : desired smoothing time constant in seconds, or hslider(...) : smooth(s) : _ Where: s : smoothness between 0 and 1. s=0 for no smoothing, s=0.999 is \"very smooth\", s>1 is unstable, and s=1 yields the zero signal for all inputs. The exponential time-constant is approximately 1/(1-s) samples, when s is close to (but less than) 1. References: https://ccrma.stanford.edu/~jos/mdft/Convolution_Example_2_ADSR.html https://ccrma.stanford.edu/~jos/aspf/Appendix_B_Inspecting_Assembly.html (si.)cbus N parallel cables for complex signals. cbus is a standard Faust function. Usage cbus(N) cbus(4) : (r0,i0), (r1,i1), (r2,i2), (r3,i3) Where: N : is an integer known at compile time that indicates the number of parallel cables. each complex number is represented by two real signals as (real,imag) (si.)cmul Multiply two complex signals pointwise. cmul is a standard Faust function. Usage (r1,i1) : cmul(r2,i2) : (_,_) Where: Each complex number is represented by two real signals as (real,imag), so (r1,i1) = real and imaginary parts of signal 1 (r2,i2) = real and imaginary parts of signal 2 (si.)cconj Complex conjugation of a (complex) signal. cconj is a standard Faust function. Usage (r1,i1) : cconj : (_,_) Where: Each complex number is represented by two real signals as (real,imag), so (r1,i1) = real and imaginary parts of the input signal (r1,-i1) = real and imaginary parts of the output signal (si.)onePoleSwitching One pole filter with independent attack and release times. Usage _ : onePoleSwitching(att,rel) : _ Where: att : the attack tau time constant in second rel : the release tau time constant in second (si.)rev Reverse the input signal by blocks of n>0 samples. rev(1) is the indentity function. rev(n) has a latency of n-1 samples. Usage _ : rev(n) : _ Where: n : the block size in samples (si.)vecOp This function is a generalisation of Faust's iterators such as prod and sum , and it allows to perform operations on an arbitrary number of vectors, provided that they all have the same length. Unlike Faust's iterators prod and sum where the vector size is equal to one and the vector space dimension must be specified by the user, this function will infer the vector space dimension and vector size based on the vectors list that we provide. The outputs of the function are equal to the vector size, whereas the number of inputs is dependent on whether the elements of the vectors provided expect an incoming signal themselves or not. We will see a clarifying example later; in general, the number of total inputs will be the sum of the inputs in each input vector. Note that we must provide a list of at least two vectors, each with a size that is greater or equal to one. Usage si.bus(inputs(vectorsList)) : vecOp((vectorsList), op) : si.bus(outputs(ba.take(1, vectorsList))); Where vectorsList : is a list of vectors op : is a two-input, one-output operator For example, consider the following vectors lists: v0 = (0 , 1 , 2 , 3); v1 = (4 , 5 , 6 , 7); v2 = (8 , 9 , 10 , 11); v3 = (12 , 13 , 14 , 15); v4 = (+(16) , _ , 18 , *(19)); vv = (v0 , v1 , v2 , v3); Although Faust has limitations for list processing, these vectors can be combined or processed individually. If we do: process = vecOp(v0, +); the function will deduce a vector space of dimension equal to four and a vector length equal to one. Note that this is equivalent to writing: process = v0 : sum(i, 4, _); Similarly, we can write: process = vecOp((v0 , v1), *) :> _; and we have a dimension-two space and length-four vectors. This is the dot product between vectors v0 and v1, which is equivalent to writing: process = v0 , v1 : dot(4); The examples above have no inputs, as none of the elements of the vectors expect inputs. On the other hand, we can write: process = vecOp((v4 , v4), +); and the function will have six inputs and four outputs, as each vector has three of the four elements expecting an input, times two, as the two input vectors are identical. Finally, we can write: process = vecOp(vv, &); to perform the bitwise AND on all the elements at the same position in each vector, having dimension equal to the vector length equal to four. Or even: process = vecOp((vv , vv), &); which gives us a dimension equal to two, and a vector size equal to sixteen. For a more practical use-case, this is how we can implement a time-invariant feedback delay network with Hadamard matrix: N = 4; normalisation = 1.0 / sqrt(N); coeffVec = par(i, N, .99 * normalisation); delVec = par(i, N, (i + 1) * 3); process = vecOp((si.bus(N) , si.bus(N)), +) ~ vecOp((vecOp((ro.hadamard(N) , coeffVec), *) , delVec), @);","title":" signals "},{"location":"libs/signals/#signalslib","text":"A library of basic elements to handle signals in Faust. Its official prefix is si .","title":"signals.lib"},{"location":"libs/signals/#references","text":"https://github.com/grame-cncm/faustlibraries/blob/master/signals.lib","title":"References"},{"location":"libs/signals/#functions-reference","text":"","title":"Functions Reference"},{"location":"libs/signals/#sibus","text":"Put N cables in parallel. bus is a standard Faust function.","title":"(si.)bus"},{"location":"libs/signals/#usage","text":"bus(N) bus(4) : _,_,_,_ Where: N : is an integer known at compile time that indicates the number of parallel cables","title":"Usage"},{"location":"libs/signals/#siblock","text":"Block - terminate N signals. block is a standard Faust function.","title":"(si.)block"},{"location":"libs/signals/#usage_1","text":"si.bus(N) : block(N) Where: N : the number of signals to be blocked known at compile time","title":"Usage"},{"location":"libs/signals/#siinterpolate","text":"Linear interpolation between two signals.","title":"(si.)interpolate"},{"location":"libs/signals/#usage_2","text":"_,_ : interpolate(i) : _ Where: i : interpolation control between 0 and 1 (0: first input; 1: second input)","title":"Usage"},{"location":"libs/signals/#sismoo","text":"Smoothing function based on smooth ideal to smooth UI signals (sliders, etc.) down. Approximately, this is a 7 Hz one-pole low-pass considering the coefficient calculation: exp(-2pi*CF/SR). smoo is a standard Faust function.","title":"(si.)smoo"},{"location":"libs/signals/#usage_3","text":"hslider(...) : smoo;","title":"Usage"},{"location":"libs/signals/#sipolysmooth","text":"A smoothing function based on smooth that doesn't smooth when a trigger signal is given. This is very useful when making polyphonic synthesizer to make sure that the value of the parameter is the right one when the note is started.","title":"(si.)polySmooth"},{"location":"libs/signals/#usage_4","text":"hslider(...) : polySmooth(g,s,d) : _ Where: g : the gate/trigger signal used when making polyphonic synths s : the smoothness (see smooth ) d : the number of samples to wait before the signal start being smoothed after g switched to 1","title":"Usage"},{"location":"libs/signals/#sismoothandh","text":"A smoothing function based on smooth that holds its output signal when a trigger is sent to it. This feature is convenient when implementing polyphonic instruments to prevent some smoothed parameter to change when a note-off event is sent.","title":"(si.)smoothAndH"},{"location":"libs/signals/#usage_5","text":"hslider(...) : smoothAndH(g,s) : _ Where: g : the hold signal (0 for hold, 1 for bypass) s : the smoothness (see smooth )","title":"Usage"},{"location":"libs/signals/#sibsmooth","text":"Block smooth linear interpolation during a block of samples (given by the ma.BS value).","title":"(si.)bsmooth"},{"location":"libs/signals/#usage_6","text":"hslider(...) : bsmooth : _","title":"Usage"},{"location":"libs/signals/#sidot","text":"Dot product for two vectors of size N.","title":"(si.)dot"},{"location":"libs/signals/#usage_7","text":"si.bus(N), si.bus(N) : dot(N) : _ Where: N : size of the vectors (int, must be known at compile time)","title":"Usage"},{"location":"libs/signals/#sismooth","text":"Exponential smoothing by a unity-dc-gain one-pole lowpass. smooth is a standard Faust function.","title":"(si.)smooth"},{"location":"libs/signals/#usage_8","text":"_ : si.smooth(ba.tau2pole(tau)) : _ Where: tau : desired smoothing time constant in seconds, or hslider(...) : smooth(s) : _ Where: s : smoothness between 0 and 1. s=0 for no smoothing, s=0.999 is \"very smooth\", s>1 is unstable, and s=1 yields the zero signal for all inputs. The exponential time-constant is approximately 1/(1-s) samples, when s is close to (but less than) 1.","title":"Usage:"},{"location":"libs/signals/#references_1","text":"https://ccrma.stanford.edu/~jos/mdft/Convolution_Example_2_ADSR.html https://ccrma.stanford.edu/~jos/aspf/Appendix_B_Inspecting_Assembly.html","title":"References:"},{"location":"libs/signals/#sicbus","text":"N parallel cables for complex signals. cbus is a standard Faust function.","title":"(si.)cbus"},{"location":"libs/signals/#usage_9","text":"cbus(N) cbus(4) : (r0,i0), (r1,i1), (r2,i2), (r3,i3) Where: N : is an integer known at compile time that indicates the number of parallel cables. each complex number is represented by two real signals as (real,imag)","title":"Usage"},{"location":"libs/signals/#sicmul","text":"Multiply two complex signals pointwise. cmul is a standard Faust function.","title":"(si.)cmul"},{"location":"libs/signals/#usage_10","text":"(r1,i1) : cmul(r2,i2) : (_,_) Where: Each complex number is represented by two real signals as (real,imag), so (r1,i1) = real and imaginary parts of signal 1 (r2,i2) = real and imaginary parts of signal 2","title":"Usage"},{"location":"libs/signals/#sicconj","text":"Complex conjugation of a (complex) signal. cconj is a standard Faust function.","title":"(si.)cconj"},{"location":"libs/signals/#usage_11","text":"(r1,i1) : cconj : (_,_) Where: Each complex number is represented by two real signals as (real,imag), so (r1,i1) = real and imaginary parts of the input signal (r1,-i1) = real and imaginary parts of the output signal","title":"Usage"},{"location":"libs/signals/#sionepoleswitching","text":"One pole filter with independent attack and release times.","title":"(si.)onePoleSwitching"},{"location":"libs/signals/#usage_12","text":"_ : onePoleSwitching(att,rel) : _ Where: att : the attack tau time constant in second rel : the release tau time constant in second","title":"Usage"},{"location":"libs/signals/#sirev","text":"Reverse the input signal by blocks of n>0 samples. rev(1) is the indentity function. rev(n) has a latency of n-1 samples.","title":"(si.)rev"},{"location":"libs/signals/#usage_13","text":"_ : rev(n) : _ Where: n : the block size in samples","title":"Usage"},{"location":"libs/signals/#sivecop","text":"This function is a generalisation of Faust's iterators such as prod and sum , and it allows to perform operations on an arbitrary number of vectors, provided that they all have the same length. Unlike Faust's iterators prod and sum where the vector size is equal to one and the vector space dimension must be specified by the user, this function will infer the vector space dimension and vector size based on the vectors list that we provide. The outputs of the function are equal to the vector size, whereas the number of inputs is dependent on whether the elements of the vectors provided expect an incoming signal themselves or not. We will see a clarifying example later; in general, the number of total inputs will be the sum of the inputs in each input vector. Note that we must provide a list of at least two vectors, each with a size that is greater or equal to one.","title":"(si.)vecOp"},{"location":"libs/signals/#usage_14","text":"si.bus(inputs(vectorsList)) : vecOp((vectorsList), op) : si.bus(outputs(ba.take(1, vectorsList)));","title":"Usage"},{"location":"libs/signals/#where","text":"vectorsList : is a list of vectors op : is a two-input, one-output operator For example, consider the following vectors lists: v0 = (0 , 1 , 2 , 3); v1 = (4 , 5 , 6 , 7); v2 = (8 , 9 , 10 , 11); v3 = (12 , 13 , 14 , 15); v4 = (+(16) , _ , 18 , *(19)); vv = (v0 , v1 , v2 , v3); Although Faust has limitations for list processing, these vectors can be combined or processed individually. If we do: process = vecOp(v0, +); the function will deduce a vector space of dimension equal to four and a vector length equal to one. Note that this is equivalent to writing: process = v0 : sum(i, 4, _); Similarly, we can write: process = vecOp((v0 , v1), *) :> _; and we have a dimension-two space and length-four vectors. This is the dot product between vectors v0 and v1, which is equivalent to writing: process = v0 , v1 : dot(4); The examples above have no inputs, as none of the elements of the vectors expect inputs. On the other hand, we can write: process = vecOp((v4 , v4), +); and the function will have six inputs and four outputs, as each vector has three of the four elements expecting an input, times two, as the two input vectors are identical. Finally, we can write: process = vecOp(vv, &); to perform the bitwise AND on all the elements at the same position in each vector, having dimension equal to the vector length equal to four. Or even: process = vecOp((vv , vv), &); which gives us a dimension equal to two, and a vector size equal to sixteen. For a more practical use-case, this is how we can implement a time-invariant feedback delay network with Hadamard matrix: N = 4; normalisation = 1.0 / sqrt(N); coeffVec = par(i, N, .99 * normalisation); delVec = par(i, N, (i + 1) * 3); process = vecOp((si.bus(N) , si.bus(N)), +) ~ vecOp((vecOp((ro.hadamard(N) , coeffVec), *) , delVec), @);","title":"Where"},{"location":"libs/soundfiles/","text":"soundfiles.lib A library to handle soundfiles in Faust. Its official prefix is so . References https://github.com/grame-cncm/faustlibraries/blob/master/soundfiles.lib Functions Reference (so.)loop Play a soundfile in a loop taking into account its sampling rate. loop is a standard Faust function. Usage loop(sf, part) : si.bus(outputs(sf)) Where: sf : the soundfile part : the part in the soundfile list of sounds (so.)loop_speed Play a soundfile in a loop taking into account its sampling rate, with speed control. loop_speed is a standard Faust function. Usage loop_speed(sf, part, speed) : si.bus(outputs(sf)) Where: sf : the soundfile part : the part in the soundfile list of sounds speed : the speed between 0 and n (so.)loop_speed_level Play a soundfile in a loop taking into account its sampling rate, with speed and level controls. loop_speed_level is a standard Faust function. Usage loop_speed_level(sf, part, speed, level) : si.bus(outputs(sf)) Where: sf : the soundfile part : the part in the soundfile list of sounds speed : the speed between 0 and n level : the volume between 0 and n","title":" soundfiles "},{"location":"libs/soundfiles/#soundfileslib","text":"A library to handle soundfiles in Faust. Its official prefix is so .","title":"soundfiles.lib"},{"location":"libs/soundfiles/#references","text":"https://github.com/grame-cncm/faustlibraries/blob/master/soundfiles.lib","title":"References"},{"location":"libs/soundfiles/#functions-reference","text":"","title":"Functions Reference"},{"location":"libs/soundfiles/#soloop","text":"Play a soundfile in a loop taking into account its sampling rate. loop is a standard Faust function.","title":"(so.)loop"},{"location":"libs/soundfiles/#usage","text":"loop(sf, part) : si.bus(outputs(sf)) Where: sf : the soundfile part : the part in the soundfile list of sounds","title":"Usage"},{"location":"libs/soundfiles/#soloop_speed","text":"Play a soundfile in a loop taking into account its sampling rate, with speed control. loop_speed is a standard Faust function.","title":"(so.)loop_speed"},{"location":"libs/soundfiles/#usage_1","text":"loop_speed(sf, part, speed) : si.bus(outputs(sf)) Where: sf : the soundfile part : the part in the soundfile list of sounds speed : the speed between 0 and n","title":"Usage"},{"location":"libs/soundfiles/#soloop_speed_level","text":"Play a soundfile in a loop taking into account its sampling rate, with speed and level controls. loop_speed_level is a standard Faust function.","title":"(so.)loop_speed_level"},{"location":"libs/soundfiles/#usage_2","text":"loop_speed_level(sf, part, speed, level) : si.bus(outputs(sf)) Where: sf : the soundfile part : the part in the soundfile list of sounds speed : the speed between 0 and n level : the volume between 0 and n","title":"Usage"},{"location":"libs/spats/","text":"spats.lib This library contains a collection of tools for sound spatialization. Its official prefix is sp . References https://github.com/grame-cncm/faustlibraries/blob/master/spats.lib (sp.)panner A simple linear stereo panner. panner is a standard Faust function. Usage _ : panner(g) : _,_ Where: g : the panning (0-1) (sp.)constantPowerPan Apply the constant power pan rule to a stereo signal. The channels are not respatialized. Their gains are simply adjusted. A pan of 0 preserves the left channel and silences the right channel. A pan of 1 has the opposite effect. A pan value of 0.5 applies a gain of 0.5 to both channels. Usage _,_ : constantPowerPan(p) : _,_ Where: p : the panning (0-1) (sp.)spat GMEM SPAT: n-outputs spatializer. spat is a standard Faust function. Usage _ : spat(N,r,d) : si.bus(N) Where: N : number of outputs (a constant numerical expression) r : rotation (between 0 et 1) d : distance of the source (between 0 et 1) (sp.)stereoize Transform an arbitrary processor p into a stereo processor with 2 inputs and 2 outputs. Usage _,_ : stereoize(p) : _,_ Where: p : the arbitrary processor","title":" spats "},{"location":"libs/spats/#spatslib","text":"This library contains a collection of tools for sound spatialization. Its official prefix is sp .","title":"spats.lib"},{"location":"libs/spats/#references","text":"https://github.com/grame-cncm/faustlibraries/blob/master/spats.lib","title":"References"},{"location":"libs/spats/#sppanner","text":"A simple linear stereo panner. panner is a standard Faust function.","title":"(sp.)panner"},{"location":"libs/spats/#usage","text":"_ : panner(g) : _,_ Where: g : the panning (0-1)","title":"Usage"},{"location":"libs/spats/#spconstantpowerpan","text":"Apply the constant power pan rule to a stereo signal. The channels are not respatialized. Their gains are simply adjusted. A pan of 0 preserves the left channel and silences the right channel. A pan of 1 has the opposite effect. A pan value of 0.5 applies a gain of 0.5 to both channels.","title":"(sp.)constantPowerPan"},{"location":"libs/spats/#usage_1","text":"_,_ : constantPowerPan(p) : _,_ Where: p : the panning (0-1)","title":"Usage"},{"location":"libs/spats/#spspat","text":"GMEM SPAT: n-outputs spatializer. spat is a standard Faust function.","title":"(sp.)spat"},{"location":"libs/spats/#usage_2","text":"_ : spat(N,r,d) : si.bus(N) Where: N : number of outputs (a constant numerical expression) r : rotation (between 0 et 1) d : distance of the source (between 0 et 1)","title":"Usage"},{"location":"libs/spats/#spstereoize","text":"Transform an arbitrary processor p into a stereo processor with 2 inputs and 2 outputs.","title":"(sp.)stereoize"},{"location":"libs/spats/#usage_3","text":"_,_ : stereoize(p) : _,_ Where: p : the arbitrary processor","title":"Usage"},{"location":"libs/synths/","text":"synths.lib This library contains a collection of synthesizers. Its official prefix is sy . References https://github.com/grame-cncm/faustlibraries/blob/master/synths.lib (sy.)popFilterDrum A simple percussion instrument based on a \"popped\" resonant bandpass filter. popFilterDrum is a standard Faust function. Usage popFilterDrum(freq,q,gate) : _ Where: freq : the resonance frequency of the instrument q : the q of the res filter (typically, 5 is a good value) gate : the trigger signal (0 or 1) (sy.)dubDub A simple synth based on a sawtooth wave filtered by a resonant lowpass. dubDub is a standard Faust function. Usage dubDub(freq,ctFreq,q,gate) : _ Where: freq : frequency of the sawtooth ctFreq : cutoff frequency of the filter q : Q of the filter gate : the trigger signal (0 or 1) (sy.)sawTrombone A simple trombone based on a lowpassed sawtooth wave. sawTrombone is a standard Faust function. Usage sawTrombone(att,freq,gain,gate) : _ Where: att : exponential attack duration in s (typically 0.01) freq : the frequency gain : the gain (0-1) gate : the gate (0 or 1) (sy.)combString Simplest string physical model ever based on a comb filter. combString is a standard Faust function. Usage combString(freq,res,gate) : _ Where: freq : the frequency of the string res : string T60 (resonance time) in second gate : trigger signal (0 or 1) (sy.)additiveDrum A simple drum using additive synthesis. additiveDrum is a standard Faust function. Usage additiveDrum(freq,freqRatio,gain,harmDec,att,rel,gate) : _ Where: freq : the resonance frequency of the drum freqRatio : a list of ratio to choose the frequency of the mode in function of freq e.g.(1 1.2 1.5 ...). The first element should always be one (fundamental). gain : the gain of each mode as a list (1 0.9 0.8 ...). The first element is the gain of the fundamental. harmDec : harmonic decay ratio (0-1): configure the speed at which higher modes decay compare to lower modes. att : attack duration in second rel : release duration in second gate : trigger signal (0 or 1) (sy.)fm An FM synthesizer with an arbitrary number of modulators connected as a sequence. fm is a standard Faust function. Usage freqs = (300,400,...); indices = (20,...); fm(freqs,indices) : _ Where: freqs : a list of frequencies where the first one is the frequency of the carrier and the others, the frequency of the modulator(s) indices : the indices of modulation (Nfreqs-1) Drum Synthesis Drum Synthesis ported in Faust from a version written in Elementary and JavaScript by Nick Thompson. Reference https://www.nickwritesablog.com/drum-synthesis-in-javascript/ (sy.)kick Kick drum synthesis via a pitched sine sweep. Usage kick(pitch, click, attack, decay, drive, gate) : _ Where: pitch : the base frequency of the kick drum in Hz click : the speed of the pitch envelope, tuned for [0.005s, 1s] attack : attack time in seconds, tuned for [0.005s, 0.4s] decay : decay time in seconds, tuned for [0.005s, 4.0s] drive : a gain multiplier going into the saturator. Tuned for [1, 10] gate : the gate which triggers the amp envelope Reference https://github.com/nick-thompson/drumsynth/blob/master/kick.js (sy.)clap Clap synthesis via filtered white noise. Usage clap(tone, attack, decay, gate) : _ Where: tone : bandpass filter cutoff frequency, tuned for [400Hz, 3500Hz] attack : attack time in seconds, tuned for [0s, 0.2s] decay : decay time in seconds, tuned for [0s, 4.0s] gate : the gate which triggers the amp envelope Reference https://github.com/nick-thompson/drumsynth/blob/master/clap.js (sy.)hat Hi hat drum synthesis via phase modulation. Usage hat(pitch, tone, attack, decay, gate): _ Where: pitch : base frequency in the range [317Hz, 3170Hz] tone : bandpass filter cutoff frequency, tuned for [800Hz, 18kHz] attack : attack time in seconds, tuned for [0.005s, 0.2s] decay : decay time in seconds, tuned for [0.005s, 4.0s] gate : the gate which triggers the amp envelope Reference https://github.com/nick-thompson/drumsynth/blob/master/hat.js","title":" synths "},{"location":"libs/synths/#synthslib","text":"This library contains a collection of synthesizers. Its official prefix is sy .","title":"synths.lib"},{"location":"libs/synths/#references","text":"https://github.com/grame-cncm/faustlibraries/blob/master/synths.lib","title":"References"},{"location":"libs/synths/#sypopfilterdrum","text":"A simple percussion instrument based on a \"popped\" resonant bandpass filter. popFilterDrum is a standard Faust function.","title":"(sy.)popFilterDrum"},{"location":"libs/synths/#usage","text":"popFilterDrum(freq,q,gate) : _ Where: freq : the resonance frequency of the instrument q : the q of the res filter (typically, 5 is a good value) gate : the trigger signal (0 or 1)","title":"Usage"},{"location":"libs/synths/#sydubdub","text":"A simple synth based on a sawtooth wave filtered by a resonant lowpass. dubDub is a standard Faust function.","title":"(sy.)dubDub"},{"location":"libs/synths/#usage_1","text":"dubDub(freq,ctFreq,q,gate) : _ Where: freq : frequency of the sawtooth ctFreq : cutoff frequency of the filter q : Q of the filter gate : the trigger signal (0 or 1)","title":"Usage"},{"location":"libs/synths/#sysawtrombone","text":"A simple trombone based on a lowpassed sawtooth wave. sawTrombone is a standard Faust function.","title":"(sy.)sawTrombone"},{"location":"libs/synths/#usage_2","text":"sawTrombone(att,freq,gain,gate) : _ Where: att : exponential attack duration in s (typically 0.01) freq : the frequency gain : the gain (0-1) gate : the gate (0 or 1)","title":"Usage"},{"location":"libs/synths/#sycombstring","text":"Simplest string physical model ever based on a comb filter. combString is a standard Faust function.","title":"(sy.)combString"},{"location":"libs/synths/#usage_3","text":"combString(freq,res,gate) : _ Where: freq : the frequency of the string res : string T60 (resonance time) in second gate : trigger signal (0 or 1)","title":"Usage"},{"location":"libs/synths/#syadditivedrum","text":"A simple drum using additive synthesis. additiveDrum is a standard Faust function.","title":"(sy.)additiveDrum"},{"location":"libs/synths/#usage_4","text":"additiveDrum(freq,freqRatio,gain,harmDec,att,rel,gate) : _ Where: freq : the resonance frequency of the drum freqRatio : a list of ratio to choose the frequency of the mode in function of freq e.g.(1 1.2 1.5 ...). The first element should always be one (fundamental). gain : the gain of each mode as a list (1 0.9 0.8 ...). The first element is the gain of the fundamental. harmDec : harmonic decay ratio (0-1): configure the speed at which higher modes decay compare to lower modes. att : attack duration in second rel : release duration in second gate : trigger signal (0 or 1)","title":"Usage"},{"location":"libs/synths/#syfm","text":"An FM synthesizer with an arbitrary number of modulators connected as a sequence. fm is a standard Faust function.","title":"(sy.)fm"},{"location":"libs/synths/#usage_5","text":"freqs = (300,400,...); indices = (20,...); fm(freqs,indices) : _ Where: freqs : a list of frequencies where the first one is the frequency of the carrier and the others, the frequency of the modulator(s) indices : the indices of modulation (Nfreqs-1)","title":"Usage"},{"location":"libs/synths/#drum-synthesis","text":"Drum Synthesis ported in Faust from a version written in Elementary and JavaScript by Nick Thompson.","title":"Drum Synthesis"},{"location":"libs/synths/#reference","text":"https://www.nickwritesablog.com/drum-synthesis-in-javascript/","title":"Reference"},{"location":"libs/synths/#sykick","text":"Kick drum synthesis via a pitched sine sweep.","title":"(sy.)kick"},{"location":"libs/synths/#usage_6","text":"kick(pitch, click, attack, decay, drive, gate) : _ Where: pitch : the base frequency of the kick drum in Hz click : the speed of the pitch envelope, tuned for [0.005s, 1s] attack : attack time in seconds, tuned for [0.005s, 0.4s] decay : decay time in seconds, tuned for [0.005s, 4.0s] drive : a gain multiplier going into the saturator. Tuned for [1, 10] gate : the gate which triggers the amp envelope","title":"Usage"},{"location":"libs/synths/#reference_1","text":"https://github.com/nick-thompson/drumsynth/blob/master/kick.js","title":"Reference"},{"location":"libs/synths/#syclap","text":"Clap synthesis via filtered white noise.","title":"(sy.)clap"},{"location":"libs/synths/#usage_7","text":"clap(tone, attack, decay, gate) : _ Where: tone : bandpass filter cutoff frequency, tuned for [400Hz, 3500Hz] attack : attack time in seconds, tuned for [0s, 0.2s] decay : decay time in seconds, tuned for [0s, 4.0s] gate : the gate which triggers the amp envelope","title":"Usage"},{"location":"libs/synths/#reference_2","text":"https://github.com/nick-thompson/drumsynth/blob/master/clap.js","title":"Reference"},{"location":"libs/synths/#syhat","text":"Hi hat drum synthesis via phase modulation.","title":"(sy.)hat"},{"location":"libs/synths/#usage_8","text":"hat(pitch, tone, attack, decay, gate): _ Where: pitch : base frequency in the range [317Hz, 3170Hz] tone : bandpass filter cutoff frequency, tuned for [800Hz, 18kHz] attack : attack time in seconds, tuned for [0.005s, 0.2s] decay : decay time in seconds, tuned for [0.005s, 4.0s] gate : the gate which triggers the amp envelope","title":"Usage"},{"location":"libs/synths/#reference_3","text":"https://github.com/nick-thompson/drumsynth/blob/master/hat.js","title":"Reference"},{"location":"libs/vaeffects/","text":"vaeffects.lib A library of virtual analog filter effects. Its official prefix is ve . References https://github.com/grame-cncm/faustlibraries/blob/master/vaeffects.lib Moog Filters (ve.)moog_vcf Moog \"Voltage Controlled Filter\" (VCF) in \"analog\" form. Moog VCF implemented using the same logical block diagram as the classic analog circuit. As such, it neglects the one-sample delay associated with the feedback path around the four one-poles. This extra delay alters the response, especially at high frequencies (see reference [1] for details). See moog_vcf_2b below for a more accurate implementation. Usage _ : moog_vcf(res,fr) : _ Where: res : normalized amount of corner-resonance between 0 and 1 (0 is no resonance, 1 is maximum) fr : corner-resonance frequency in Hz (less than SR/6.3 or so) References https://ccrma.stanford.edu/~stilti/papers/moogvcf.pdf https://ccrma.stanford.edu/~jos/pasp/vegf.html (ve.)moog_vcf_2b[n] Moog \"Voltage Controlled Filter\" (VCF) as two biquads. Implementation of the ideal Moog VCF transfer function factored into second-order sections. As a result, it is more accurate than moog_vcf above, but its coefficient formulas are more complex when one or both parameters are varied. Here, res is the fourth root of that in moog_vcf , so, as the sampling rate approaches infinity, moog_vcf(res,fr) becomes equivalent to moog_vcf_2b[n](res^4,fr) (when res and fr are constant). moog_vcf_2b uses two direct-form biquads ( tf2 ). moog_vcf_2bn uses two protected normalized-ladder biquads ( tf2np ). Usage _ : moog_vcf_2b(res,fr) : _ _ : moog_vcf_2bn(res,fr) : _ Where: res : normalized amount of corner-resonance between 0 and 1 (0 is min resonance, 1 is maximum) fr : corner-resonance frequency in Hz (ve.)moogLadder Virtual analog model of the 4th-order Moog Ladder, which is arguably the most well-known ladder filter in analog synthesizers. Several 1st-order filters are cascaded in series. Feedback is then used, in part, to control the cut-off frequency and the resonance. References [Zavalishin 2012] (revision 2.1.2, February 2020): https://www.native-instruments.com/fileadmin/ni_media/downloads/pdf/VAFilterDesign_2.1.2.pdf This fix is based on Lorenzo Della Cioppa's correction to Pirkle's implementation; see this post: https://www.kvraudio.com/forum/viewtopic.php?f=33&t=571909 Usage _ : moogLadder(normFreq,Q) : _ Where: normFreq : normalized frequency (0-1) Q : quality factor between .707 (0 feedback coefficient) to 25 (feedback = 4, which is the self-oscillating threshold). (ve.)moogHalfLadder Virtual analog model of the 2nd-order Moog Half Ladder (simplified version of (ve.)moogLadder ). Several 1st-order filters are cascaded in series. Feedback is then used, in part, to control the cut-off frequency and the resonance. This filter was implemented in Faust by Eric Tarr during the 2019 Embedded DSP With Faust Workshop . References https://www.willpirkle.com/app-notes/virtual-analog-moog-half-ladder-filter http://www.willpirkle.com/Downloads/AN-8MoogHalfLadderFilter.pdf Usage _ : moogHalfLadder(normFreq,Q) : _ Where: normFreq : normalized frequency (0-1) Q : q (ve.)diodeLadder 4th order virtual analog diode ladder filter. In addition to the individual states used within each independent 1st-order filter, there are also additional feedback paths found in the block diagram. These feedback paths are labeled as connecting states. Rather than separately storing these connecting states in the Faust implementation, they are simply implicitly calculated by tracing back to the other states ( s1 , s2 , s3 , s4 ) each recursive step. This filter was implemented in Faust by Eric Tarr during the 2019 Embedded DSP With Faust Workshop . References https://www.willpirkle.com/virtual-analog-diode-ladder-filter/ http://www.willpirkle.com/Downloads/AN-6DiodeLadderFilter.pdf Usage _ : diodeLadder(normFreq,Q) : _ Where: normFreq : normalized frequency (0-1) Q : q Korg 35 Filters The following filters are virtual analog models of the Korg 35 low-pass filter and high-pass filter found in the MS-10 and MS-20 synthesizers. The virtual analog models for the LPF and HPF are different, making these filters more interesting than simply tapping different states of the same circuit. These filters were implemented in Faust by Eric Tarr during the 2019 Embedded DSP With Faust Workshop . Filter history: https://secretlifeofsynthesizers.com/the-korg-35-filter/ (ve.)korg35LPF Virtual analog models of the Korg 35 low-pass filter found in the MS-10 and MS-20 synthesizers. Usage _ : korg35LPF(normFreq,Q) : _ Where: normFreq : normalized frequency (0-1) Q : q (ve.)korg35HPF Virtual analog models of the Korg 35 high-pass filter found in the MS-10 and MS-20 synthesizers. Usage _ : korg35HPF(normFreq,Q) : _ Where: normFreq : normalized frequency (0-1) Q : q Oberheim Filters The following filter (4 types) is an implementation of the virtual analog model described in Section 7.2 of the Will Pirkle book, \"Designing Software Synthesizer Plug-ins in C++\". It is based on the block diagram in Figure 7.5. The Oberheim filter is a state-variable filter with soft-clipping distortion within the circuit. In many VA filters, distortion is accomplished using the \"tanh\" function. For this Faust implementation, that distortion function was replaced with the (ef.)cubicnl function. (ve.)oberheim Generic multi-outputs Oberheim filter that produces the BSF, BPF, HPF and LPF outputs (see description above). Usage _ : oberheim(normFreq,Q) : _,_,_,_ Where: normFreq : normalized frequency (0-1) Q : q (ve.)oberheimBSF Band-Stop Oberheim filter (see description above). Specialize the generic implementation: keep the first BSF output, the compiler will only generate the needed code. Usage _ : oberheimBSF(normFreq,Q) : _ Where: normFreq : normalized frequency (0-1) Q : q (ve.)oberheimBPF Band-Pass Oberheim filter (see description above). Specialize the generic implementation: keep the second BPF output, the compiler will only generate the needed code. Usage _ : oberheimBPF(normFreq,Q) : _ Where: normFreq : normalized frequency (0-1) Q : q (ve.)oberheimHPF High-Pass Oberheim filter (see description above). Specialize the generic implementation: keep the third HPF output, the compiler will only generate the needed code. Usage _ : oberheimHPF(normFreq,Q) : _ Where: normFreq : normalized frequency (0-1) Q : q (ve.)oberheimLPF Low-Pass Oberheim filter (see description above). Specialize the generic implementation: keep the fourth LPF output, the compiler will only generate the needed code. Usage _ : oberheimLPF(normFreq,Q) : _ Where: normFreq : normalized frequency (0-1) Q : q Sallen Key Filters The following filters were implemented based on VA models of synthesizer filters. The modeling approach is based on a Topology Preserving Transform (TPT) to resolve the delay-free feedback loop in the corresponding analog filters. The primary processing block used to build other filters (Moog, Korg, etc.) is based on a 1st-order Sallen-Key filter. The filters included in this script are 1st-order LPF/HPF and 2nd-order state-variable filters capable of LPF, HPF, and BPF. Resources: Vadim Zavalishin (2018) \"The Art of VA Filter Design\", v2.1.0 https://www.native-instruments.com/fileadmin/ni_media/downloads/pdf/VAFilterDesign_2.1.0.pdf Will Pirkle (2014) \"Resolving Delay-Free Loops in Recursive Filters Using the Modified H\u00e4rm\u00e4 Method\", AES 137 http://www.aes.org/e-lib/browse.cfm?elib=17517 Description and diagrams of 1st- and 2nd-order TPT filters: https://www.willpirkle.com/706-2/ (ve.)sallenKeyOnePole Sallen-Key generic One Pole filter that produces the LPF and HPF outputs (see description above). For the Faust implementation of this filter, recursion ( letrec ) is used for storing filter \"states\". The output (e.g. y ) is calculated by using the input signal and the previous states of the filter. During the current recursive step, the states of the filter (e.g. s ) for the next step are also calculated. Admittedly, this is not an efficient way to implement a filter because it requires independently calculating the output and each state during each recursive step. However, it works as a way to store and use \"states\" within the constraints of Faust. The simplest example is the 1st-order LPF (shown on the cover of Zavalishin * 2018 and Fig 4.3 of https://www.willpirkle.com/706-2/ ). Here, the input signal is split in parallel for the calculation of the output signal, y , and the state s . The value of the state is only used for feedback to the next step of recursion. It is blocked (!) from also being routed to the output. A trick used for calculating the state s is to observe that the input to the delay block is the sum of two signal: what appears to be a feedforward path and a feedback path. In reality, the signals being summed are identical (signal*2) plus the value of the current state. Usage _ : sallenKeyOnePole(normFreq) : _,_ Where: normFreq : normalized frequency (0-1) (ve.)sallenKeyOnePoleLPF Sallen-Key One Pole lowpass filter (see description above). Specialize the generic implementation: keep the first LPF output, the compiler will only generate the needed code. Usage _ : sallenKeyOnePoleLPF(normFreq) : _ Where: normFreq : normalized frequency (0-1) (ve.)sallenKeyOnePoleHPF Sallen-Key One Pole Highpass filter (see description above). The dry input signal is routed in parallel to the output. The LPF'd signal is subtracted from the input so that the HPF remains. Specialize the generic implementation: keep the second HPF output, the compiler will only generate the needed code. Usage _ : sallenKeyOnePoleHPF(normFreq) : _ Where: normFreq : normalized frequency (0-1) (ve.)sallenKey2ndOrder Sallen-Key generic 2nd order filter that produces the LPF, BPF and HPF outputs. This is a 2nd-order Sallen-Key state-variable filter. The idea is that by \"tapping\" into different points in the circuit, different filters (LPF,BPF,HPF) can be achieved. See Figure 4.6 of * https://www.willpirkle.com/706-2/ This is also a good example of the next step for generalizing the Faust programming approach used for all these VA filters. In this case, there are three things to calculate each recursive step ( y , s1 , s2 ). For each thing, the circuit is only calculated up to that point. Comparing the LPF to BPF, the output signal ( y ) is calculated similarly. Except, the output of the BPF stops earlier in the circuit. Similarly, the states ( s1 and s2 ) only differ in that s2 includes a couple more terms beyond what is used for s1 . Usage _ : sallenKey2ndOrder(normFreq,Q) : _,_,_ Where: normFreq : normalized frequency (0-1) Q : q (ve.)sallenKey2ndOrderLPF Sallen-Key 2nd order lowpass filter (see description above). Specialize the generic implementation: keep the first LPF output, the compiler will only generate the needed code. Usage _ : sallenKey2ndOrderLPF(normFreq,Q) : _ Where: normFreq : normalized frequency (0-1) Q : q (ve.)sallenKey2ndOrderBPF Sallen-Key 2nd order bandpass filter (see description above). Specialize the generic implementation: keep the second BPF output, the compiler will only generate the needed code. Usage _ : sallenKey2ndOrderBPF(normFreq,Q) : _ Where: normFreq : normalized frequency (0-1) Q : q (ve.)sallenKey2ndOrderHPF Sallen-Key 2nd order highpass filter (see description above). Specialize the generic implementation: keep the third HPF output, the compiler will only generate the needed code. Usage _ : sallenKey2ndOrderHPF(normFreq,Q) : _ Where: normFreq : normalized frequency (0-1) Q : q Effects (ve.)wah4 Wah effect, 4th order. wah4 is a standard Faust function. Usage _ : wah4(fr) : _ Where: fr : resonance frequency in Hz Reference https://ccrma.stanford.edu/~jos/pasp/vegf.html (ve.)autowah Auto-wah effect. autowah is a standard Faust function. Usage _ : autowah(level) : _ Where: level : amount of effect desired (0 to 1). (ve.)crybaby Digitized CryBaby wah pedal. crybaby is a standard Faust function. Usage _ : crybaby(wah) : _ Where: wah : \"pedal angle\" from 0 to 1 Reference https://ccrma.stanford.edu/~jos/pasp/vegf.html (ve.)vocoder A very simple vocoder where the spectrum of the modulation signal is analyzed using a filter bank. vocoder is a standard Faust function. Usage _ : vocoder(nBands,att,rel,BWRatio,source,excitation) : _ Where: nBands : Number of vocoder bands att : Attack time in seconds rel : Release time in seconds BWRatio : Coefficient to adjust the bandwidth of each band (0.1 - 2) source : Modulation signal excitation : Excitation/Carrier signal","title":" vaeffects "},{"location":"libs/vaeffects/#vaeffectslib","text":"A library of virtual analog filter effects. Its official prefix is ve .","title":"vaeffects.lib"},{"location":"libs/vaeffects/#references","text":"https://github.com/grame-cncm/faustlibraries/blob/master/vaeffects.lib","title":"References"},{"location":"libs/vaeffects/#moog-filters","text":"","title":"Moog Filters"},{"location":"libs/vaeffects/#vemoog_vcf","text":"Moog \"Voltage Controlled Filter\" (VCF) in \"analog\" form. Moog VCF implemented using the same logical block diagram as the classic analog circuit. As such, it neglects the one-sample delay associated with the feedback path around the four one-poles. This extra delay alters the response, especially at high frequencies (see reference [1] for details). See moog_vcf_2b below for a more accurate implementation.","title":"(ve.)moog_vcf"},{"location":"libs/vaeffects/#usage","text":"_ : moog_vcf(res,fr) : _ Where: res : normalized amount of corner-resonance between 0 and 1 (0 is no resonance, 1 is maximum) fr : corner-resonance frequency in Hz (less than SR/6.3 or so)","title":"Usage"},{"location":"libs/vaeffects/#references_1","text":"https://ccrma.stanford.edu/~stilti/papers/moogvcf.pdf https://ccrma.stanford.edu/~jos/pasp/vegf.html","title":"References"},{"location":"libs/vaeffects/#vemoog_vcf_2bn","text":"Moog \"Voltage Controlled Filter\" (VCF) as two biquads. Implementation of the ideal Moog VCF transfer function factored into second-order sections. As a result, it is more accurate than moog_vcf above, but its coefficient formulas are more complex when one or both parameters are varied. Here, res is the fourth root of that in moog_vcf , so, as the sampling rate approaches infinity, moog_vcf(res,fr) becomes equivalent to moog_vcf_2b[n](res^4,fr) (when res and fr are constant). moog_vcf_2b uses two direct-form biquads ( tf2 ). moog_vcf_2bn uses two protected normalized-ladder biquads ( tf2np ).","title":"(ve.)moog_vcf_2b[n]"},{"location":"libs/vaeffects/#usage_1","text":"_ : moog_vcf_2b(res,fr) : _ _ : moog_vcf_2bn(res,fr) : _ Where: res : normalized amount of corner-resonance between 0 and 1 (0 is min resonance, 1 is maximum) fr : corner-resonance frequency in Hz","title":"Usage"},{"location":"libs/vaeffects/#vemoogladder","text":"Virtual analog model of the 4th-order Moog Ladder, which is arguably the most well-known ladder filter in analog synthesizers. Several 1st-order filters are cascaded in series. Feedback is then used, in part, to control the cut-off frequency and the resonance.","title":"(ve.)moogLadder"},{"location":"libs/vaeffects/#references_2","text":"[Zavalishin 2012] (revision 2.1.2, February 2020): https://www.native-instruments.com/fileadmin/ni_media/downloads/pdf/VAFilterDesign_2.1.2.pdf This fix is based on Lorenzo Della Cioppa's correction to Pirkle's implementation; see this post: https://www.kvraudio.com/forum/viewtopic.php?f=33&t=571909","title":"References"},{"location":"libs/vaeffects/#usage_2","text":"_ : moogLadder(normFreq,Q) : _ Where: normFreq : normalized frequency (0-1) Q : quality factor between .707 (0 feedback coefficient) to 25 (feedback = 4, which is the self-oscillating threshold).","title":"Usage"},{"location":"libs/vaeffects/#vemooghalfladder","text":"Virtual analog model of the 2nd-order Moog Half Ladder (simplified version of (ve.)moogLadder ). Several 1st-order filters are cascaded in series. Feedback is then used, in part, to control the cut-off frequency and the resonance. This filter was implemented in Faust by Eric Tarr during the 2019 Embedded DSP With Faust Workshop .","title":"(ve.)moogHalfLadder"},{"location":"libs/vaeffects/#references_3","text":"https://www.willpirkle.com/app-notes/virtual-analog-moog-half-ladder-filter http://www.willpirkle.com/Downloads/AN-8MoogHalfLadderFilter.pdf","title":"References"},{"location":"libs/vaeffects/#usage_3","text":"_ : moogHalfLadder(normFreq,Q) : _ Where: normFreq : normalized frequency (0-1) Q : q","title":"Usage"},{"location":"libs/vaeffects/#vediodeladder","text":"4th order virtual analog diode ladder filter. In addition to the individual states used within each independent 1st-order filter, there are also additional feedback paths found in the block diagram. These feedback paths are labeled as connecting states. Rather than separately storing these connecting states in the Faust implementation, they are simply implicitly calculated by tracing back to the other states ( s1 , s2 , s3 , s4 ) each recursive step. This filter was implemented in Faust by Eric Tarr during the 2019 Embedded DSP With Faust Workshop .","title":"(ve.)diodeLadder"},{"location":"libs/vaeffects/#references_4","text":"https://www.willpirkle.com/virtual-analog-diode-ladder-filter/ http://www.willpirkle.com/Downloads/AN-6DiodeLadderFilter.pdf","title":"References"},{"location":"libs/vaeffects/#usage_4","text":"_ : diodeLadder(normFreq,Q) : _ Where: normFreq : normalized frequency (0-1) Q : q","title":"Usage"},{"location":"libs/vaeffects/#korg-35-filters","text":"The following filters are virtual analog models of the Korg 35 low-pass filter and high-pass filter found in the MS-10 and MS-20 synthesizers. The virtual analog models for the LPF and HPF are different, making these filters more interesting than simply tapping different states of the same circuit. These filters were implemented in Faust by Eric Tarr during the 2019 Embedded DSP With Faust Workshop .","title":"Korg 35 Filters"},{"location":"libs/vaeffects/#filter-history","text":"https://secretlifeofsynthesizers.com/the-korg-35-filter/","title":"Filter history:"},{"location":"libs/vaeffects/#vekorg35lpf","text":"Virtual analog models of the Korg 35 low-pass filter found in the MS-10 and MS-20 synthesizers.","title":"(ve.)korg35LPF"},{"location":"libs/vaeffects/#usage_5","text":"_ : korg35LPF(normFreq,Q) : _ Where: normFreq : normalized frequency (0-1) Q : q","title":"Usage"},{"location":"libs/vaeffects/#vekorg35hpf","text":"Virtual analog models of the Korg 35 high-pass filter found in the MS-10 and MS-20 synthesizers.","title":"(ve.)korg35HPF"},{"location":"libs/vaeffects/#usage_6","text":"_ : korg35HPF(normFreq,Q) : _ Where: normFreq : normalized frequency (0-1) Q : q","title":"Usage"},{"location":"libs/vaeffects/#oberheim-filters","text":"The following filter (4 types) is an implementation of the virtual analog model described in Section 7.2 of the Will Pirkle book, \"Designing Software Synthesizer Plug-ins in C++\". It is based on the block diagram in Figure 7.5. The Oberheim filter is a state-variable filter with soft-clipping distortion within the circuit. In many VA filters, distortion is accomplished using the \"tanh\" function. For this Faust implementation, that distortion function was replaced with the (ef.)cubicnl function.","title":"Oberheim Filters"},{"location":"libs/vaeffects/#veoberheim","text":"Generic multi-outputs Oberheim filter that produces the BSF, BPF, HPF and LPF outputs (see description above).","title":"(ve.)oberheim"},{"location":"libs/vaeffects/#usage_7","text":"_ : oberheim(normFreq,Q) : _,_,_,_ Where: normFreq : normalized frequency (0-1) Q : q","title":"Usage"},{"location":"libs/vaeffects/#veoberheimbsf","text":"Band-Stop Oberheim filter (see description above). Specialize the generic implementation: keep the first BSF output, the compiler will only generate the needed code.","title":"(ve.)oberheimBSF"},{"location":"libs/vaeffects/#usage_8","text":"_ : oberheimBSF(normFreq,Q) : _ Where: normFreq : normalized frequency (0-1) Q : q","title":"Usage"},{"location":"libs/vaeffects/#veoberheimbpf","text":"Band-Pass Oberheim filter (see description above). Specialize the generic implementation: keep the second BPF output, the compiler will only generate the needed code.","title":"(ve.)oberheimBPF"},{"location":"libs/vaeffects/#usage_9","text":"_ : oberheimBPF(normFreq,Q) : _ Where: normFreq : normalized frequency (0-1) Q : q","title":"Usage"},{"location":"libs/vaeffects/#veoberheimhpf","text":"High-Pass Oberheim filter (see description above). Specialize the generic implementation: keep the third HPF output, the compiler will only generate the needed code.","title":"(ve.)oberheimHPF"},{"location":"libs/vaeffects/#usage_10","text":"_ : oberheimHPF(normFreq,Q) : _ Where: normFreq : normalized frequency (0-1) Q : q","title":"Usage"},{"location":"libs/vaeffects/#veoberheimlpf","text":"Low-Pass Oberheim filter (see description above). Specialize the generic implementation: keep the fourth LPF output, the compiler will only generate the needed code.","title":"(ve.)oberheimLPF"},{"location":"libs/vaeffects/#usage_11","text":"_ : oberheimLPF(normFreq,Q) : _ Where: normFreq : normalized frequency (0-1) Q : q","title":"Usage"},{"location":"libs/vaeffects/#sallen-key-filters","text":"The following filters were implemented based on VA models of synthesizer filters. The modeling approach is based on a Topology Preserving Transform (TPT) to resolve the delay-free feedback loop in the corresponding analog filters. The primary processing block used to build other filters (Moog, Korg, etc.) is based on a 1st-order Sallen-Key filter. The filters included in this script are 1st-order LPF/HPF and 2nd-order state-variable filters capable of LPF, HPF, and BPF.","title":"Sallen Key Filters"},{"location":"libs/vaeffects/#resources","text":"Vadim Zavalishin (2018) \"The Art of VA Filter Design\", v2.1.0 https://www.native-instruments.com/fileadmin/ni_media/downloads/pdf/VAFilterDesign_2.1.0.pdf Will Pirkle (2014) \"Resolving Delay-Free Loops in Recursive Filters Using the Modified H\u00e4rm\u00e4 Method\", AES 137 http://www.aes.org/e-lib/browse.cfm?elib=17517 Description and diagrams of 1st- and 2nd-order TPT filters: https://www.willpirkle.com/706-2/","title":"Resources:"},{"location":"libs/vaeffects/#vesallenkeyonepole","text":"Sallen-Key generic One Pole filter that produces the LPF and HPF outputs (see description above). For the Faust implementation of this filter, recursion ( letrec ) is used for storing filter \"states\". The output (e.g. y ) is calculated by using the input signal and the previous states of the filter. During the current recursive step, the states of the filter (e.g. s ) for the next step are also calculated. Admittedly, this is not an efficient way to implement a filter because it requires independently calculating the output and each state during each recursive step. However, it works as a way to store and use \"states\" within the constraints of Faust. The simplest example is the 1st-order LPF (shown on the cover of Zavalishin * 2018 and Fig 4.3 of https://www.willpirkle.com/706-2/ ). Here, the input signal is split in parallel for the calculation of the output signal, y , and the state s . The value of the state is only used for feedback to the next step of recursion. It is blocked (!) from also being routed to the output. A trick used for calculating the state s is to observe that the input to the delay block is the sum of two signal: what appears to be a feedforward path and a feedback path. In reality, the signals being summed are identical (signal*2) plus the value of the current state.","title":"(ve.)sallenKeyOnePole"},{"location":"libs/vaeffects/#usage_12","text":"_ : sallenKeyOnePole(normFreq) : _,_ Where: normFreq : normalized frequency (0-1)","title":"Usage"},{"location":"libs/vaeffects/#vesallenkeyonepolelpf","text":"Sallen-Key One Pole lowpass filter (see description above). Specialize the generic implementation: keep the first LPF output, the compiler will only generate the needed code.","title":"(ve.)sallenKeyOnePoleLPF"},{"location":"libs/vaeffects/#usage_13","text":"_ : sallenKeyOnePoleLPF(normFreq) : _ Where: normFreq : normalized frequency (0-1)","title":"Usage"},{"location":"libs/vaeffects/#vesallenkeyonepolehpf","text":"Sallen-Key One Pole Highpass filter (see description above). The dry input signal is routed in parallel to the output. The LPF'd signal is subtracted from the input so that the HPF remains. Specialize the generic implementation: keep the second HPF output, the compiler will only generate the needed code.","title":"(ve.)sallenKeyOnePoleHPF"},{"location":"libs/vaeffects/#usage_14","text":"_ : sallenKeyOnePoleHPF(normFreq) : _ Where: normFreq : normalized frequency (0-1)","title":"Usage"},{"location":"libs/vaeffects/#vesallenkey2ndorder","text":"Sallen-Key generic 2nd order filter that produces the LPF, BPF and HPF outputs. This is a 2nd-order Sallen-Key state-variable filter. The idea is that by \"tapping\" into different points in the circuit, different filters (LPF,BPF,HPF) can be achieved. See Figure 4.6 of * https://www.willpirkle.com/706-2/ This is also a good example of the next step for generalizing the Faust programming approach used for all these VA filters. In this case, there are three things to calculate each recursive step ( y , s1 , s2 ). For each thing, the circuit is only calculated up to that point. Comparing the LPF to BPF, the output signal ( y ) is calculated similarly. Except, the output of the BPF stops earlier in the circuit. Similarly, the states ( s1 and s2 ) only differ in that s2 includes a couple more terms beyond what is used for s1 .","title":"(ve.)sallenKey2ndOrder"},{"location":"libs/vaeffects/#usage_15","text":"_ : sallenKey2ndOrder(normFreq,Q) : _,_,_ Where: normFreq : normalized frequency (0-1) Q : q","title":"Usage"},{"location":"libs/vaeffects/#vesallenkey2ndorderlpf","text":"Sallen-Key 2nd order lowpass filter (see description above). Specialize the generic implementation: keep the first LPF output, the compiler will only generate the needed code.","title":"(ve.)sallenKey2ndOrderLPF"},{"location":"libs/vaeffects/#usage_16","text":"_ : sallenKey2ndOrderLPF(normFreq,Q) : _ Where: normFreq : normalized frequency (0-1) Q : q","title":"Usage"},{"location":"libs/vaeffects/#vesallenkey2ndorderbpf","text":"Sallen-Key 2nd order bandpass filter (see description above). Specialize the generic implementation: keep the second BPF output, the compiler will only generate the needed code.","title":"(ve.)sallenKey2ndOrderBPF"},{"location":"libs/vaeffects/#usage_17","text":"_ : sallenKey2ndOrderBPF(normFreq,Q) : _ Where: normFreq : normalized frequency (0-1) Q : q","title":"Usage"},{"location":"libs/vaeffects/#vesallenkey2ndorderhpf","text":"Sallen-Key 2nd order highpass filter (see description above). Specialize the generic implementation: keep the third HPF output, the compiler will only generate the needed code.","title":"(ve.)sallenKey2ndOrderHPF"},{"location":"libs/vaeffects/#usage_18","text":"_ : sallenKey2ndOrderHPF(normFreq,Q) : _ Where: normFreq : normalized frequency (0-1) Q : q","title":"Usage"},{"location":"libs/vaeffects/#effects","text":"","title":"Effects"},{"location":"libs/vaeffects/#vewah4","text":"Wah effect, 4th order. wah4 is a standard Faust function.","title":"(ve.)wah4"},{"location":"libs/vaeffects/#usage_19","text":"_ : wah4(fr) : _ Where: fr : resonance frequency in Hz","title":"Usage"},{"location":"libs/vaeffects/#reference","text":"https://ccrma.stanford.edu/~jos/pasp/vegf.html","title":"Reference"},{"location":"libs/vaeffects/#veautowah","text":"Auto-wah effect. autowah is a standard Faust function.","title":"(ve.)autowah"},{"location":"libs/vaeffects/#usage_20","text":"_ : autowah(level) : _ Where: level : amount of effect desired (0 to 1).","title":"Usage"},{"location":"libs/vaeffects/#vecrybaby","text":"Digitized CryBaby wah pedal. crybaby is a standard Faust function.","title":"(ve.)crybaby"},{"location":"libs/vaeffects/#usage_21","text":"_ : crybaby(wah) : _ Where: wah : \"pedal angle\" from 0 to 1","title":"Usage"},{"location":"libs/vaeffects/#reference_1","text":"https://ccrma.stanford.edu/~jos/pasp/vegf.html","title":"Reference"},{"location":"libs/vaeffects/#vevocoder","text":"A very simple vocoder where the spectrum of the modulation signal is analyzed using a filter bank. vocoder is a standard Faust function.","title":"(ve.)vocoder"},{"location":"libs/vaeffects/#usage_22","text":"_ : vocoder(nBands,att,rel,BWRatio,source,excitation) : _ Where: nBands : Number of vocoder bands att : Attack time in seconds rel : Release time in seconds BWRatio : Coefficient to adjust the bandwidth of each band (0.1 - 2) source : Modulation signal excitation : Excitation/Carrier signal","title":"Usage"},{"location":"libs/version/","text":"version.lib Semantic versioning for the Faust libraries. Its official prefix is vl . References https://github.com/grame-cncm/faustlibraries/blob/master/version.lib (vl.)version Return the version number of the Faust standard libraries as a MAJOR, MINOR, PATCH versioning triplet. Usage version : _,_,_","title":" version "},{"location":"libs/version/#versionlib","text":"Semantic versioning for the Faust libraries. Its official prefix is vl .","title":"version.lib"},{"location":"libs/version/#references","text":"https://github.com/grame-cncm/faustlibraries/blob/master/version.lib","title":"References"},{"location":"libs/version/#vlversion","text":"Return the version number of the Faust standard libraries as a MAJOR, MINOR, PATCH versioning triplet.","title":"(vl.)version"},{"location":"libs/version/#usage","text":"version : _,_,_","title":"Usage"},{"location":"libs/wdmodels/","text":"wdmodels.lib A library of basic adaptors and methods to help construct Wave Digital Filter models in Faust. Its official prefix is wd . Library Readme This library is intended for use for creating Wave Digital (WD) based models of audio circuitry for real-time audio processing within the Faust programming language. The goal is to provide a framework to create real-time virtual-analog audio effects and synthesizers using WD models without the use of C++. Furthermore, we seek to provide access to the technique of WD modeling to those without extensive knowledge of advanced digital signal processing techniques. Finally, we hope to provide a library which can integrate with all aspects of Faust, thus creating a platform for virtual circuit bending. The library itself is written in Faust to maintain portability. This library is heavily based on Kurt Werner's Dissertation, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters.\" I have tried to maintain consistent notation between the adaptors appearing within thesis and my adaptor code. The majority of the adaptors found in chapter 1 and chapter 3 are currently supported. For inquires about use of this library in a commercial product, please contact dirk [dot] roosenburg [dot] 30 [at] gmail [dot] com. This documentation is taken directly from the readme . Please refer to it for a more updated version. Many of the more in depth comments within the library include jargon. I plan to create videos detailing the theory of WD models. For now I recommend Kurt Werner's PhD, Virtual analog modeling of Audio circuitry using Wave Digital Filters . I have tried to maintain consistent syntax and notation to the thesis. This library currently includes the majority of the adaptors covered in chapter 1 and some from chapter 3. Using this Library Use of this library expects some level of familiarity with WDF techniques, especially simplification and decomposition of electronic circuits into WDF connection trees. I plan to create video to cover both these techniques and use of the library. Quick Start To get a quick overview of the library, start with the secondOrderFilters.dsp code found in examples . Note that the wdmodels.lib library is now embedded in the online Faust IDE . A Simple RC Filter Model Creating a model using this library consists fo three steps. First, declare a set of components. Second, model the relationship between them using a tree. Finally, build the tree using the libraries build functions. First, a set of components is declared using adaptors from the library. This list of components is created based on analysis of the circuit using WDF techniques, though generally each circuit element (resistor, capacitor, diode, etc.) can be expected to appear within the component set. For example, first order RC lowpass filter would require an unadapted voltage source, a 47k resistor, and a 10nF capacitor which outputs the voltage across itself. These can be declared with: vs1(i) = wd.u_voltage(i, no.noise); r1(i) = wd.resistor(i, 47*10^3); c1(i) = wd.capacitor_Vout(i, 10*10^-9); Note that the first argument, i, is left un-parametrized. Components must be declared in this form, as the build algorithm expects to receive adaptors which have exactly one parameter. Also note that we have chosen to declare a white noise function as the input to our voltage source. We could potentially declare this as a direct input to our model, but to do so is more complicated process which cannot be covered within this tutorial. For information on how to do this see Declaring Model Parameters as Inputs or see various implementations in examples . Second, the declared components and interconnection/structural adaptors (i.e. series, parallel, etc) are arranged into the connection tree which is produced from performing WD analysis on the modeled circuit. For example, to produce our first order RC lowpass circuit model, the following tree is declared: tree_lowpass = vs1 : wd.series : (r1, c1); For more information on how to represent trees in Faust, see Trees in Faust . Finally, the tree is built using the the buildtree function. To build and compute our first order RC lowpass circuit model, we use: process = wd.buildtree(tree_lowpass); More information about build functions, see Model Building Functions . Building a Model After creating a connection tree which consists of WD adaptors, the connection tree must be passed to a build function in order to build the model. Automatic model building buildtree(connection_tree) The simplest build function for use with basic models. This automatically implements buildup , builddown , and buildout to create a working model. However, it gives minimum control to the user and cannot currently be used on trees which have parameters declared as inputs. Manual model building Wave Digital Filters are an explicit state-space model, meaning they use a previous system state in order to calculate the current output. This is achieved in Faust by using a single global feedback operator. The models feed-forward terms are generated using builddown and the models feedback terms are generated using buildup . Thus, the most common model implementation (the method used by buildtree ) is: builddown(connection_tree)~buildup(connection_tree) : buildout(connection_tree) Since the ~ operator in Faust will leave feedback terms hanging as outputs, buildout is a function provided for convenience. It automatically truncates the hanging outputs by identifying leaf components which have an intended output and generating an output matrix. Building the model manually allows for greater user control and is often very helpful in testing. Also provided for testing are the getres and parres functions, which can be used to determine the upward-facing port resistance of an element. Declaring Model Parameters as Inputs When possible, parameters of components should be declared explicitly, meaning they are dependent on a function with no inputs. This might be something as simple as integer(declaring a static component), a function dependent on a UI input (declaring a component with variable value), or even a time-dependent function like an oscillator (declaring an audio input or circuit bending). However, it is often necessary to declare parameters as input. To achieve this there are two possible methods. The first and recommended option is to create a separate model function and declare parameters which will later be implemented as inputs. This allows inputs to be explicitly declared as component parameters. For example, one might use: model(in1) = buildtree(tree) with { ... vin(i) = wd.u_voltage(i, in1); ... tree = vin : ...; }; In order to simulate an audio input to the circuit. Note that the tree and components must be declared inside a with {...} statement, or the model's parameters will not be accessible. The Empty Signal Operator The Empty signal operator, _ should NEVER be used to declare a parameter as in input in a wave-digital model. Using it will result on breaking the internal routing of the model and thus breaks the model. Instead, use explicit declaration as shown directly above. Trees in Faust Since WD models use connection trees to represent relationships of elements, a comprehensive way to represent trees is critical. As there is no current convention for creating trees in Faust, I've developed a method using the existing series and parallel/list methods in Faust. The series operator : is used to separate parent and child elements. For example the tree: A | B is represented by A : B in Faust. To denote a parent element with multiple child elements, simply use a list (a1, a2, ... an) of children connected to a single parent. ` For example the tree: A / \\ B C is represented by: A : (B, C) Finally, for a tree with many levels, simply break the tree into subtrees following the above rules and connect the subtree as if it was an individual node. For example the tree: A / \\ B C / / \\ X Y Z can be represented by: B_sub = B : X; //B subtree C_sub = C : (Y, Z); //C subtree tree = A : (B_sub, C_sub); //full tree or more simply, using parentheses: A : ((B : X), (C : (Y, Z))) How Adaptors are Structured In wave digital filters, adaptors can be described by the form b = Sa where b is a vector of output waves b = (b0, b1, b2, ... bn) , a is a vector of input waves a = (a0, a1, a2, ... an) , and S is an n x n scattering matrix. S is dependent on R , a list of port resistances (R0, R1, R2, ... Rn) . The output wave vector b can be divided into downward-going and upward-going waves (downward-going waves travel down the connection tree, upward-going waves travel up). For adapted adaptors, with the zeroth port being the upward-facing port, the downward-going wave vector is (b1, b2, ... bn) and the upward-going wave vector is (b0) . For unadapted adaptors, there are no upward-going waves, so the downward-going wave vector is simply b = (b0, b1, b2, ... bn) . In order for adaptors to be interpretable by the compiler, they must be structured in a specific way. Each adaptor is divided into three cases by their first parameter. This parameter, while accessible by the user, should only be set by the compiler/builder. All other parameters are value declarations (for components), inputs (for voltage or current ins), or parameter controls (for potentiometers/variable capacitors/variable inductors). First case - downward going waves (0, params) => downward-going(R1, ... Rn, a0, a1, ... an) outputs: (b1, b2, ... bn) this function takes any number of port resistances, the downward going wave, and any number of upward going waves as inputs. These values/waves are used to calculate the downward going waves coming from this adaptor. Second case (1, params) => upward-going(R1, ... Rn, a1, ... an) outputs : (b0) this function takes any number of port resistances and any number of upward going waves as inputs. These values/waves are used to calculate the upward going wave coming from this adaptor. Third case (2, params) => port-resistance(R1, ... Rn) outputs: (R0) this function takes any number of port resistances as inputs. These values are used to calculate the upward going port resistance of the element. Unadapted Adaptors Unadapted adaptor's names will always begin u_ An unadapted adaptor MUST be used as the root of the WD connection tree. Unadapted adaptors can ONLY be used as a root of the WD connection tree. While unadapted adaptors contain all three cases, the second and third are purely structural. Only the first case should contain computational information. How the Build Functions Work Expect this section to be added soon! It's currently in progress. Acknowledgements Many thanks to Kurt Werner for helping me to understand wave digital filter models. Without his publications and consultations, the library would not exist. Thanks also to my advisors, Rob Owen and Eli Stine whose input was critical to the development of the library. Finally, thanks to Romain Michon, Stephane Letz, and the Faust Slack for contributing to testing, development, and inspiration when creating the library. References https://github.com/grame-cncm/faustlibraries/blob/master/wdmodels.lib Algebraic One Port Adaptors (wd.)resistor Adapted Resistor. A basic node implementing a resistor for use within Wave Digital Filter connection trees. It should be used as a leaf/terminating element of the connection tree. Usage r1(i) = resistor(i, R); buildtree( A : r1 ); Where: i : index used by model-building functions. Should never be user declared. R : Resistance/Impedance of the resistor being modeled in Ohms. Note: the adaptor must be declared as a separate function before integration into the connection tree. Correct implementation is shown above. Reference K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.2.1 (wd.)resistor_Vout Adapted Resistor + voltage Out. A basic adaptor implementing a resistor for use within Wave Digital Filter connection trees. It should be used as a leaf/terminating element of the connection tree. The resistor will also pass the voltage across itself as an output of the model. Usage rout(i) = resistor_Vout(i, R); buildtree( A : rout ) : _ Where: i : index used by model-building functions. Should never be user declared. R : Resistance/Impedance of the resistor being modeled in Ohms. Note: the adaptor must be declared as a separate function before integration into the connection tree. Correct implementation is shown above. Reference K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.2.1 (wd.)resistor_Iout Resistor + current Out. A basic adaptor implementing a resistor for use within Wave Digital Filter connection trees. It should be used as a leaf/terminating element of the connection tree. The resistor will also pass the current through itself as an output of the model. Usage rout(i) = resistor_Iout(i, R); buildtree( A : rout ) : _ Where: i : index used by model-building functions. Should never be user declared. R : Resistance/Impedance of the resistor being modeled in Ohms. Note: the adaptor must be declared as a separate function before integration into the connection tree. Correct implementation is shown above. Reference K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.2.1 (wd.)u_voltage Unadapted Ideal Voltage Source. An adaptor implementing an ideal voltage source within Wave Digital Filter connection trees. It should be used as the root/top element of the connection tree. Can be used for either DC (constant) or AC (signal) voltage sources. Usage v1(i) = u_Voltage(i, ein); buildtree( v1 : B ); Where: i : index used by model-building functions. Should never be user declared. ein : Voltage/Potential across ideal voltage source in Volts Note: only usable as the root of a tree. The adaptor must be declared as a separate function before integration into the connection tree. Correct implementation is shown above. Reference K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.2.2 (wd.)u_current Unadapted Ideal Current Source. An unadapted adaptor implementing an ideal current source within Wave Digital Filter connection trees. It should be used as the root/top element of the connection tree. Can be used for either DC (constant) or AC (signal) current sources. Usage i1(i) = u_current(i, jin); buildtree( i1 : B ); Where: i : index used by model-building functions. Should never be user declared. jin : Current through the ideal current source in Amps Note: only usable as the root of a tree. The adaptor must be declared as a separate function before integration into the connection tree. Correct implementation is shown above. Reference K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.2.3 (wd.)resVoltage Adapted Resistive Voltage Source. An adaptor implementing a resistive voltage source within Wave Digital Filter connection trees. It should be used as a leaf/terminating element of the connection tree. It is comprised of an ideal voltage source in series with a resistor. Can be used for either DC (constant) or AC (signal) voltage sources. Usage v1(i) = resVoltage(i, R, ein); buildtree( A : v1 ); Where: i : index used by model-building functions. Should never be user declared R : Resistance/Impedance of the series resistor in Ohms ein : Voltage/Potential of the ideal voltage source in Volts Note: the adaptor must be declared as a separate function before integration into the connection tree. Correct implementation is shown above. Reference K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.2.4 (wd.)resVoltage_Vout Adapted Resistive Voltage Source + voltage output. An adaptor implementing an adapted resistive voltage source within Wave Digital Filter connection trees. It should be used as a leaf/terminating element of the connection tree. It is comprised of an ideal voltage source in series with a resistor. Can be used for either DC (constant) or AC (signal) voltage sources. The resistive voltage source will also pass the voltage across it as an output of the model. Usage vout(i) = resVoltage_Vout(i, R, ein); buildtree( A : vout ) : _ Where: i : index used by model-building functions. Should never be user declared R : Resistance/Impedance of the series resistor in Ohms ein : Voltage/Potential across ideal voltage source in Volts Note: the adaptor must be declared as a separate function before integration into the connection tree. Correct implementation is shown above. Reference K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.2.4 (wd.)u_resVoltage Unadapted Resistive Voltage Source. An unadapted adaptor implementing a resistive voltage source within Wave Digital Filter connection trees. It should be used as the root/top element of the connection tree. It is comprised of an ideal voltage source in series with a resistor. Can be used for either DC (constant) or AC (signal) voltage sources. Usage v1(i) = u_resVoltage(i, R, ein); buildtree( v1 : B ); Where: i : index used by model-building functions. Should never be user declared R : Resistance/Impedance of the series resistor in Ohms ein : Voltage/Potential across ideal voltage source in Volts Note: only usable as the root of a tree. The adaptor must be declared as a separate function before integration into the connection tree. Correct implementation is shown above. Reference K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.2.4 (wd.)resCurrent Adapted Resistive Current Source. An adaptor implementing a resistive current source within Wave Digital Filter connection trees. It should be used as a leaf/terminating element of the connection tree. It is comprised of an ideal current source in parallel with a resistor. Can be used for either DC (constant) or AC (signal) current sources. Usage i1(i) = resCurrent(i, R, jin); buildtree( A : i1 ); Where: i : index used by model-building functions. Should never be user declared. R : Resistance/Impedance of the parallel resistor in Ohms jin : Current through the ideal current source in Amps Note: the adaptor must be declared as a separate function before integration into the connection tree. Correct implementation is shown above. Reference K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.2.5 (wd.)u_resCurrent Unadapted Resistive Current Source. An unadapted adaptor implementing a resistive current source within Wave Digital Filter connection trees. It should be used as the root/top element of the connection tree. It is comprised of an ideal current source in parallel with a resistor. Can be used for either DC (constant) or AC (signal) current sources. Usage i1(i) = u_resCurrent(i, R, jin); buildtree( i1 : B ); Where: i : index used by model-building functions. Should never be user declared. R : Resistance/Impedance of the series resistor in Ohms jin : Current through the ideal current source in Amps Note: only usable as the root of a tree. The adaptor must be declared as a separate function before integration into the connection tree. Correct implementation is shown above. Reference K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.2.5 (wd.)u_switch Unadapted Ideal Switch. An unadapted adaptor implementing an ideal switch for Wave Digital Filter connection trees. It should be used as the root/top element of the connection tree Usage s1(i) = u_resCurrent(i, lambda); buildtree( s1 : B ); Where: i : index used by model-building functions. Should never be user declared. lambda : switch state control. -1 for closed switch, 1 for open switch. Note: only usable as the root of a tree. The adaptor must be declared as a separate function before integration into the connection tree. Correct implementation is shown above. Reference K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.2.8 Reactive One Port Adaptors (wd.)capacitor Adapted Capacitor. A basic adaptor implementing a capacitor for use within Wave Digital Filter connection trees. It should be used as a leaf/terminating element of the connection tree. This capacitor model was digitized using the bi-linear transform. Usage c1(i) = capacitor(i, R); buildtree( A : c1 ) : _ Where: i : index used by model-building functions. Should never be user declared. R : Capacitance/Impedance of the capacitor being modeled in Farads. Note: the adaptor must be declared as a separate function before integration into the connection tree. Correct implementation is shown above. Reference K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.3.1 (wd.)capacitor_Vout Adapted Capacitor + voltage out. A basic adaptor implementing a capacitor for use within Wave Digital Filter connection trees. It should be used as a leaf/terminating element of the connection tree. The capacitor will also pass the voltage across itself as an output of the model. This capacitor model was digitized using the bi-linear transform. Usage cout(i) = capacitor_Vout(i, R); buildtree( A : cout ) : _ Where: i : index used by model-building functions. Should never be user declared R : Capacitance/Impedence of the capacitor being modeled in Farads Note: the adaptor must be declared as a seperate function before integration into the connection tree. Correct implementation is shown above. Reference K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.3.1 (wd.)inductor Unadapted Inductor. A basic adaptor implementing an inductor for use within Wave Digital Filter connection trees. It should be used as a leaf/terminating element of the connection tree. This inductor model was digitized using the bi-linear transform. Usage l1(i) = inductor(i, R); buildtree( A : l1 ); Where: i : index used by model-building functions. Should never be user declared R : Inductance/Impedance of the inductor being modeled in Henries Note: the adaptor must be declared as a separate function before integration into the connection tree. Correct implementation is shown above. Reference K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.3.2 (wd.)inductor_Vout Unadapted Inductor + Voltage out. A basic adaptor implementing an inductor for use within Wave Digital Filter connection trees. It should be used as a leaf/terminating element of the connection tree. The inductor will also pass the voltage across itself as an output of the model. This inductor model was digitized using the bi-linear transform. Usage lout(i) = inductor_Vout(i, R); buildtree( A : lout ) : _ Where: i : index used by model-building functions. Should never be user declared R : Inductance/Impedance of the inductor being modeled in Henries Note: the adaptor must be declared as a separate function before integration into the connection tree. Correct implementation is shown above. Reference K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.3.2 Nonlinear One Port Adaptors (wd.)u_idealDiode Unadapted Ideal Diode. An unadapted adaptor implementing an ideal diode for Wave Digital Filter connection trees. It should be used as the root/top element of the connection tree. Usage buildtree( u_idealDiode : B ); Note: only usable as the root of a tree. Correct implementation is shown above. Reference K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 3.2.3 (wd.)u_chua Unadapted Chua Diode. An adaptor implementing the chua diode / non-linear resistor within Wave Digital Filter connection trees. It should be used as the root/top element of the connection tree. Usage chua1(i) = u_chua(i, G1, G2, V0); buildtree( chua1 : B ); Where: i : index used by model-building functions. Should never be user declared G1 : resistance parameter 1 of the chua diode G2 : resistance parameter 2 of the chua diode V0 : voltage parameter of the chua diode Note: only usable as the root of a tree. The adaptor must be declared as a separate function before integration into the connection tree. Correct implementation is shown above. Reference Meerkotter and Scholz, \"Digital Simulation of Nonlinear Circuits by Wave Digital Filter Principles\" (wd.)lambert An implementation of the lambert function. It uses Halley's method of iteration to approximate the output. Included in the WD library for use in non-linear diode models. Adapted from K M Brigg's c++ lambert function approximation. Usage lambert(n, itr) : _ Where: * n : value at which the lambert function will be evaluated * itr : number of iterations before output (wd.)u_diodePair Unadapted pair of diodes facing in opposite directions. An unadapted adaptor implementing two antiparallel diodes for Wave Digital Filter connection trees. The behavior is approximated using Schottkey's ideal diode law. Usage d1(i) = u_diodePair(i, Is, Vt); buildtree( d1 : B ); Where: i : index used by model-building functions. Should never be user declared Is : saturation current of the diodes Vt : thermal resistances of the diodes Note: only usable as the root of a tree. Correct implementation is shown above. Reference K. Werner et al. \"An Improved and Generalized Diode Clipper Model for Wave Digital Filters\" (wd.)u_diodeSingle Unadapted single diode. An unadapted adaptor implementing a single diode for Wave Digital Filter connection trees. The behavior is approximated using Schottkey's ideal diode law. Usage d1(i) = u_diodeSingle(i, Is, Vt); buildtree( d1 : B ); Where: i : index used by model-building functions. Should never be user declared Is : saturation current of the diodes Vt : thermal resistances of the diodes Note: only usable as the root of a tree. Correct implementation is shown above. Reference K. Werner et al. \"An Improved and Generalized Diode Clipper Model for Wave Digital Filters\" (wd.)u_diodeAntiparallel Unadapted set of antiparallel diodes with M diodes facing forwards and N diodes facing backwards. An unadapted adaptor implementing antiparallel diodes for Wave Digital Filter connection trees. The behavior is approximated using Schottkey's ideal diode law. Usage d1(i) = u_diodeAntiparallel(i, Is, Vt); buildtree( d1 : B ); Where: i : index used by model-building functions. Should never be user declared Is : saturation current of the diodes Vt : thermal resistances of the diodes Note: only usable as the root of a tree. Correct implementation is shown above. Reference K. Werner et al. \"An Improved and Generalized Diode Clipper Model for Wave Digital Filters\" Two Port Adaptors (wd.)u_parallel2Port Unadapted 2-port parallel connection. An unadapted adaptor implementing a 2-port parallel connection between adaptors for Wave Digital Filter connection trees. Elements connected to this adaptor will behave as if connected in parallel in circuit. Usage buildtree( u_parallel2Port : (A, B) ); Note: only usable as the root of a tree. This adaptor has no user-accessible parameters. Correct implementation is shown above. Reference K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.4.1 (wd.)parallel2Port Adapted 2-port parallel connection. An adaptor implementing a 2-port parallel connection between adaptors for Wave Digital Filter connection trees. Elements connected to this adaptor will behave as if connected in parallel in circuit. Usage buildtree( A : parallel2Port : B ); Note: this adaptor has no user-accessible parameters. It should be used within the connection tree with one previous and one forward adaptor. Correct implementation is shown above. Reference K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.4.1 (wd.)u_series2Port Unadapted 2-port series connection. An unadapted adaptor implementing a 2-port series connection between adaptors for Wave Digital Filter connection trees. Elements connected to this adaptor will behave as if connected in series in circuit. Usage buildtree( u_series2Port : (A, B) ); Note: only usable as the root of a tree. This adaptor has no user-accessible parameters. Correct implementation is shown above. Reference K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.4.1 (wd.)series2Port Adapted 2-port series connection. An adaptor implementing a 2-port series connection between adaptors for Wave Digital Filter connection trees. Elements connected to this adaptor will behave as if connected in series in circuit. Usage buildtree( A : series2Port : B ); Note: this adaptor has no user-accessible parameters. It should be used within the connection tree with one previous and one forward adaptor. Correct implementation is shown above. Reference K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.4.1 (wd.)parallelCurrent Adapted 2-port parallel connection + ideal current source. An adaptor implementing a 2-port series connection and internal idealized current source between adaptors for Wave Digital Filter connection trees. This adaptor connects the two connected elements and an additional ideal current source in parallel. Usage i1(i) = parallelCurrent(i, jin); buildtree(A : i1 : B); Where: i : index used by model-building functions. Should never be user declared jin : Current through the ideal current source in Amps Note: the adaptor must be declared as a separate function before integration into the connection tree. It should be used within a connection tree with one previous and one forward adaptor. Correct implementation is shown above. Reference K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.4.2 (wd.)seriesVoltage Adapted 2-port series connection + ideal voltage source. An adaptor implementing a 2-port series connection and internal ideal voltage source between adaptors for Wave Digital Filter connection trees. This adaptor connects the two connected adaptors and an additional ideal voltage source in series. Usage v1(i) = seriesVoltage(i, vin) buildtree( A : v1 : B ); Where: i : index used by model-building functions. Should never be user declared vin : voltage across the ideal current source in Volts Note: the adaptor must be declared as a separate function before integration into the connection tree. It should be used within the connection tree with one previous and one forward adaptor. Reference K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.4.2 (wd.)u_transformer Unadapted ideal transformer. An adaptor implementing an ideal transformer for Wave Digital Filter connection trees. The first downward-facing port corresponds to the primary winding connections, and the second downward-facing port to the secondary winding connections. Usage t1(i) = u_transformer(i, tr); buildtree(t1 : (A , B)); Where: i : index used by model-building functions. Should never be user declared tr : the turn ratio between the windings on the primary and secondary coils Note: the adaptor must be declared as a separate function before integration into the connection tree. It may only be used as the root of the connection tree with two forward nodes. Reference K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.4.3 (wd.)transformer Adapted ideal transformer. An adaptor implementing an ideal transformer for Wave Digital Filter connection trees. The upward-facing port corresponds to the primary winding connections, and the downward-facing port to the secondary winding connections Usage t1(i) = transformer(i, tr); buildtree(A : t1 : B); Where: i : index used by model-building functions. Should never be user declared tr : the turn ratio between the windings on the primary and secondary coils Note: the adaptor must be declared as a separate function before integration into the connection tree. It should be used within the connection tree with one backward and one forward nodes. Reference K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.4.3 (wd.)u_transformerActive Unadapted ideal active transformer. An adaptor implementing an ideal transformer for Wave Digital Filter connection trees. The first downward-facing port corresponds to the primary winding connections, and the second downward-facing port to the secondary winding connections. Usage t1(i) = u_transformerActive(i, gamma1, gamma2); buildtree(t1 : (A , B)); Where: i : index used by model-building functions. Should never be user declared gamma1 : the turn ratio describing the voltage relationship between the primary and secondary coils gamma2 : the turn ratio describing the current relationship between the primary and secondary coils Note: the adaptor must be declared as a separate function before integration into the connection tree. It may only be used as the root of the connection tree with two forward nodes. Reference K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.4.3 (wd.)transformerActive Adapted ideal active transformer. An adaptor implementing an ideal active transformer for Wave Digital Filter connection trees. The upward-facing port corresponds to the primary winding connections, and the downward-facing port to the secondary winding connections Usage t1(i) = transformerActive(i, gamma1, gamma2); buildtree(A : t1 : B); Where: i : index used by model-building functions. Should never be user declared gamma1 : the turn ratio describing the voltage relationship between the primary and secondary coils gamma2 : the turn ratio describing the current relationship between the primary and secondary coils Note: the adaptor must be declared as a separate function before integration into the connection tree. It should be used within the connection tree with two forward nodes. Reference K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.4.3 Three Port Adaptors (wd.)parallel Adapted 3-port parallel connection. An adaptor implementing a 3-port parallel connection between adaptors for Wave Digital Filter connection trees. This adaptor is used to connect adaptors simulating components connected in parallel in the circuit. Usage buildtree( A : parallel : (B, C) ); Note: this adaptor has no user-accessible parameters. It should be used within the connection tree with one previous and two forward adaptors. Reference K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.5.1 (wd.)series Adapted 3-port series connection. An adaptor implementing a 3-port series connection between adaptors for Wave Digital Filter connection trees. This adaptor is used to connect adaptors simulating components connected in series in the circuit. Usage tree = A : (series : (B, C)); Note: this adaptor has no user-accessible parameters. It should be used within the connection tree with one previous and two forward adaptors. Reference K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.5.2 R-Type Adaptors (wd.)u_sixportPassive Unadapted six-port rigid connection. An adaptor implementing a six-port passive rigid connection between elements. It implements the simplest possible rigid connection found in the Fender Bassman Tonestack circuit. Usage tree = u_sixportPassive : (A, B, C, D, E, F)); Note: this adaptor has no user-accessible parameters. It should be used within the connection tree with six forward adaptors. Reference K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 2.1.5 Node Creating Functions (wd.)genericNode Function for generating an adapted node from another faust function or scattering matrix. This function generates a node which is suitable for use in the connection tree structure. genericNode separates the function that it is passed into upward-going and downward-going waves. Usage n1(i) = genericNode(i, scatter, upRes); Where: i : index used by model-building functions. Should never be user declared scatter : the function which describes the the node's scattering behavior upRes : the function which describes the node's upward-facing port-resistance Note: scatter must be a function with n inputs, n outputs, and n-1 parameter inputs. input/output 1 will be used as the adapted upward-facing port of the node, ports 2 to n will all be downward-facing. The first input/output pair is assumed to already be adapted - i.e. the output 1 is not dependent on input 1. The parameter inputs will receive the port resistances of the downward-facing ports. upRes must be a function with n-1 parameter inputs and 1 output. The parameter inputs will receive the port resistances of the downward-facing ports. The output should give the upward-facing port resistance of the node based on the upward-facing port resistances of the input. If used on a leaf element (n=1), the model will automatically introduce a one-sample delay. Thus, the output of the node at sample t based on the input, a[t], should be the output one sample ahead, b[t+1]. This may require transformation of the output signal. (wd.)genericNode_Vout Function for generating a terminating/leaf node which gives the voltage across itself as a model output. This function generates a node which is suitable for use in the connection tree structure. It also calculates the voltage across the element and gives it as a model output. Usage n1(i) = genericNode_Vout(i, scatter, upRes); Where: i : index used by model-building functions. Should never be user declared scatter : the function which describes the the node's scattering behavior upRes : the function which describes the node's upward-facing port-resistance Note: scatter must be a function with 1 input and 1 output. It should give the output from the node based on the incident wave. The model will automatically introduce a one-sample delay to the output of the function Thus, the output of the node at sample t based on the input, a[t], should be the output one sample ahead, b[t+1]. This may require transformation of the output signal. upRes must be a function with no inputs and 1 output. The output should give the upward-facing port resistance of the node. (wd.)genericNode_Iout Function for generating a terminating/leaf node which gives the current through itself as a model output. This function generates a node which is suitable for use in the connection tree structure. It also calculates the current through the element and gives it as a model output. Usage n1(i) = genericNode_Iout(i, scatter, upRes); Where: i : index used by model-building functions. Should never be user declared scatter : the function which describes the the node's scattering behavior upRes : the function which describes the node's upward-facing port-resistance Note: scatter must be a function with 1 input and 1 output. It should give the output from the node based on the incident wave. The model will automatically introduce a one-sample delay to the output of the function. Thus, the output of the node at sample t based on the input, a[t], should be the output one sample ahead, b[t+1]. This may require transformation of the output signal. upRes must be a function with no inputs and 1 output. The output should give the upward-facing port resistance of the node. (wd.)u_genericNode Function for generating an unadapted node from another Faust function or scattering matrix. This function generates a node which is suitable for use as the root of the connection tree structure. Usage n1(i) = u_genericNode(i, scatter); Where: i : index used by model-building functions. Should never be user declared scatter : the function which describes the the node's scattering behavior Note: scatter must be a function with n inputs, n outputs, and n parameter inputs. each input/output pair will be used as a downward-facing port of the node the parameter inputs will receive the port resistances of the downward-facing ports. Model Building Functions (wd.)builddown Function for building the structure for calculating waves traveling down the WD connection tree. It recursively steps through the given tree, parametrizes the adaptors, and builds an algorithm. It is used in conjunction with the buildup() function to create a model. Usage builddown(A : B)~buildup(A : B); Where: (A : B) : is a connection tree composed of WD adaptors (wd.)buildup Function for building the structure for calculating waves traveling up the WD connection tree. It recursively steps through the given tree, parametrizes the adaptors, and builds an algorithm. It is used in conjunction with the builddown() function to create a full structure. Usage builddown(A : B)~buildup(A : B); Where: (A : B) : is a connection tree composed of WD adaptors (wd.)getres Function for determining the upward-facing port resistance of a partial WD connection tree. It recursively steps through the given tree, parametrizes the adaptors, and builds an algorithm. It is used by the buildup and builddown functions but is also helpful in testing. Usage getres(A : B)~getres(A : B); Where: (A : B) : is a partial connection tree composed of WD adaptors Note: This function cannot be used on a complete WD tree. When called on an unadapted adaptor (u_ prefix), it will create errors. (wd.)parres Function for determining the upward-facing port resistance of a partial WD connection tree. It recursively steps through the given tree, parametrizes the adaptors, and builds an algorithm. It is used by the buildup and builddown functions but is also helpful in testing. This function is a parallelized version of getres . Usage parres((A , B))~parres((A , B)); Where: (A , B) : is a partial connection tree composed of WD adaptors Note: this function cannot be used on a complete WD tree. When called on an unadapted adaptor (u_ prefix), it will create errors. (wd.)buildout Function for creating the output matrix for a WD model from a WD connection tree. It recursively steps through the given tree and creates an output matrix passing only outputs. Usage buildout( A : B ); Where: (A : B) : is a connection tree composed of WD adaptors (wd.)buildtree Function for building the DSP model from a WD connection tree structure. It recursively steps through the given tree, parametrizes the adaptors, and builds the algorithm. Usage buildtree(A : B); Where: (A : B) : a connection tree composed of WD adaptors","title":" wdmodels "},{"location":"libs/wdmodels/#wdmodelslib","text":"A library of basic adaptors and methods to help construct Wave Digital Filter models in Faust. Its official prefix is wd .","title":"wdmodels.lib"},{"location":"libs/wdmodels/#library-readme","text":"This library is intended for use for creating Wave Digital (WD) based models of audio circuitry for real-time audio processing within the Faust programming language. The goal is to provide a framework to create real-time virtual-analog audio effects and synthesizers using WD models without the use of C++. Furthermore, we seek to provide access to the technique of WD modeling to those without extensive knowledge of advanced digital signal processing techniques. Finally, we hope to provide a library which can integrate with all aspects of Faust, thus creating a platform for virtual circuit bending. The library itself is written in Faust to maintain portability. This library is heavily based on Kurt Werner's Dissertation, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters.\" I have tried to maintain consistent notation between the adaptors appearing within thesis and my adaptor code. The majority of the adaptors found in chapter 1 and chapter 3 are currently supported. For inquires about use of this library in a commercial product, please contact dirk [dot] roosenburg [dot] 30 [at] gmail [dot] com. This documentation is taken directly from the readme . Please refer to it for a more updated version. Many of the more in depth comments within the library include jargon. I plan to create videos detailing the theory of WD models. For now I recommend Kurt Werner's PhD, Virtual analog modeling of Audio circuitry using Wave Digital Filters . I have tried to maintain consistent syntax and notation to the thesis. This library currently includes the majority of the adaptors covered in chapter 1 and some from chapter 3.","title":"Library Readme"},{"location":"libs/wdmodels/#using-this-library","text":"Use of this library expects some level of familiarity with WDF techniques, especially simplification and decomposition of electronic circuits into WDF connection trees. I plan to create video to cover both these techniques and use of the library.","title":"Using this Library"},{"location":"libs/wdmodels/#quick-start","text":"To get a quick overview of the library, start with the secondOrderFilters.dsp code found in examples . Note that the wdmodels.lib library is now embedded in the online Faust IDE .","title":"Quick Start"},{"location":"libs/wdmodels/#a-simple-rc-filter-model","text":"Creating a model using this library consists fo three steps. First, declare a set of components. Second, model the relationship between them using a tree. Finally, build the tree using the libraries build functions. First, a set of components is declared using adaptors from the library. This list of components is created based on analysis of the circuit using WDF techniques, though generally each circuit element (resistor, capacitor, diode, etc.) can be expected to appear within the component set. For example, first order RC lowpass filter would require an unadapted voltage source, a 47k resistor, and a 10nF capacitor which outputs the voltage across itself. These can be declared with: vs1(i) = wd.u_voltage(i, no.noise); r1(i) = wd.resistor(i, 47*10^3); c1(i) = wd.capacitor_Vout(i, 10*10^-9); Note that the first argument, i, is left un-parametrized. Components must be declared in this form, as the build algorithm expects to receive adaptors which have exactly one parameter. Also note that we have chosen to declare a white noise function as the input to our voltage source. We could potentially declare this as a direct input to our model, but to do so is more complicated process which cannot be covered within this tutorial. For information on how to do this see Declaring Model Parameters as Inputs or see various implementations in examples . Second, the declared components and interconnection/structural adaptors (i.e. series, parallel, etc) are arranged into the connection tree which is produced from performing WD analysis on the modeled circuit. For example, to produce our first order RC lowpass circuit model, the following tree is declared: tree_lowpass = vs1 : wd.series : (r1, c1); For more information on how to represent trees in Faust, see Trees in Faust . Finally, the tree is built using the the buildtree function. To build and compute our first order RC lowpass circuit model, we use: process = wd.buildtree(tree_lowpass); More information about build functions, see Model Building Functions .","title":"A Simple RC Filter Model"},{"location":"libs/wdmodels/#building-a-model","text":"After creating a connection tree which consists of WD adaptors, the connection tree must be passed to a build function in order to build the model.","title":"Building a Model"},{"location":"libs/wdmodels/#automatic-model-building","text":"buildtree(connection_tree) The simplest build function for use with basic models. This automatically implements buildup , builddown , and buildout to create a working model. However, it gives minimum control to the user and cannot currently be used on trees which have parameters declared as inputs.","title":"Automatic model building"},{"location":"libs/wdmodels/#manual-model-building","text":"Wave Digital Filters are an explicit state-space model, meaning they use a previous system state in order to calculate the current output. This is achieved in Faust by using a single global feedback operator. The models feed-forward terms are generated using builddown and the models feedback terms are generated using buildup . Thus, the most common model implementation (the method used by buildtree ) is: builddown(connection_tree)~buildup(connection_tree) : buildout(connection_tree) Since the ~ operator in Faust will leave feedback terms hanging as outputs, buildout is a function provided for convenience. It automatically truncates the hanging outputs by identifying leaf components which have an intended output and generating an output matrix. Building the model manually allows for greater user control and is often very helpful in testing. Also provided for testing are the getres and parres functions, which can be used to determine the upward-facing port resistance of an element.","title":"Manual model building"},{"location":"libs/wdmodels/#declaring-model-parameters-as-inputs","text":"When possible, parameters of components should be declared explicitly, meaning they are dependent on a function with no inputs. This might be something as simple as integer(declaring a static component), a function dependent on a UI input (declaring a component with variable value), or even a time-dependent function like an oscillator (declaring an audio input or circuit bending). However, it is often necessary to declare parameters as input. To achieve this there are two possible methods. The first and recommended option is to create a separate model function and declare parameters which will later be implemented as inputs. This allows inputs to be explicitly declared as component parameters. For example, one might use: model(in1) = buildtree(tree) with { ... vin(i) = wd.u_voltage(i, in1); ... tree = vin : ...; }; In order to simulate an audio input to the circuit. Note that the tree and components must be declared inside a with {...} statement, or the model's parameters will not be accessible.","title":"Declaring Model Parameters as Inputs"},{"location":"libs/wdmodels/#the-empty-signal-operator","text":"The Empty signal operator, _ should NEVER be used to declare a parameter as in input in a wave-digital model. Using it will result on breaking the internal routing of the model and thus breaks the model. Instead, use explicit declaration as shown directly above.","title":"The Empty Signal Operator"},{"location":"libs/wdmodels/#trees-in-faust","text":"Since WD models use connection trees to represent relationships of elements, a comprehensive way to represent trees is critical. As there is no current convention for creating trees in Faust, I've developed a method using the existing series and parallel/list methods in Faust. The series operator : is used to separate parent and child elements. For example the tree: A | B is represented by A : B in Faust. To denote a parent element with multiple child elements, simply use a list (a1, a2, ... an) of children connected to a single parent. ` For example the tree: A / \\ B C is represented by: A : (B, C) Finally, for a tree with many levels, simply break the tree into subtrees following the above rules and connect the subtree as if it was an individual node. For example the tree: A / \\ B C / / \\ X Y Z can be represented by: B_sub = B : X; //B subtree C_sub = C : (Y, Z); //C subtree tree = A : (B_sub, C_sub); //full tree or more simply, using parentheses: A : ((B : X), (C : (Y, Z)))","title":"Trees in Faust"},{"location":"libs/wdmodels/#how-adaptors-are-structured","text":"In wave digital filters, adaptors can be described by the form b = Sa where b is a vector of output waves b = (b0, b1, b2, ... bn) , a is a vector of input waves a = (a0, a1, a2, ... an) , and S is an n x n scattering matrix. S is dependent on R , a list of port resistances (R0, R1, R2, ... Rn) . The output wave vector b can be divided into downward-going and upward-going waves (downward-going waves travel down the connection tree, upward-going waves travel up). For adapted adaptors, with the zeroth port being the upward-facing port, the downward-going wave vector is (b1, b2, ... bn) and the upward-going wave vector is (b0) . For unadapted adaptors, there are no upward-going waves, so the downward-going wave vector is simply b = (b0, b1, b2, ... bn) . In order for adaptors to be interpretable by the compiler, they must be structured in a specific way. Each adaptor is divided into three cases by their first parameter. This parameter, while accessible by the user, should only be set by the compiler/builder. All other parameters are value declarations (for components), inputs (for voltage or current ins), or parameter controls (for potentiometers/variable capacitors/variable inductors).","title":"How Adaptors are Structured"},{"location":"libs/wdmodels/#first-case-downward-going-waves","text":"(0, params) => downward-going(R1, ... Rn, a0, a1, ... an) outputs: (b1, b2, ... bn) this function takes any number of port resistances, the downward going wave, and any number of upward going waves as inputs. These values/waves are used to calculate the downward going waves coming from this adaptor.","title":"First case - downward going waves"},{"location":"libs/wdmodels/#second-case","text":"(1, params) => upward-going(R1, ... Rn, a1, ... an) outputs : (b0) this function takes any number of port resistances and any number of upward going waves as inputs. These values/waves are used to calculate the upward going wave coming from this adaptor.","title":"Second case"},{"location":"libs/wdmodels/#third-case","text":"(2, params) => port-resistance(R1, ... Rn) outputs: (R0) this function takes any number of port resistances as inputs. These values are used to calculate the upward going port resistance of the element.","title":"Third case"},{"location":"libs/wdmodels/#unadapted-adaptors","text":"Unadapted adaptor's names will always begin u_ An unadapted adaptor MUST be used as the root of the WD connection tree. Unadapted adaptors can ONLY be used as a root of the WD connection tree. While unadapted adaptors contain all three cases, the second and third are purely structural. Only the first case should contain computational information.","title":"Unadapted Adaptors"},{"location":"libs/wdmodels/#how-the-build-functions-work","text":"Expect this section to be added soon! It's currently in progress.","title":"How the Build Functions Work"},{"location":"libs/wdmodels/#acknowledgements","text":"Many thanks to Kurt Werner for helping me to understand wave digital filter models. Without his publications and consultations, the library would not exist. Thanks also to my advisors, Rob Owen and Eli Stine whose input was critical to the development of the library. Finally, thanks to Romain Michon, Stephane Letz, and the Faust Slack for contributing to testing, development, and inspiration when creating the library.","title":"Acknowledgements"},{"location":"libs/wdmodels/#references","text":"https://github.com/grame-cncm/faustlibraries/blob/master/wdmodels.lib","title":"References"},{"location":"libs/wdmodels/#algebraic-one-port-adaptors","text":"","title":"Algebraic One Port Adaptors"},{"location":"libs/wdmodels/#wdresistor","text":"Adapted Resistor. A basic node implementing a resistor for use within Wave Digital Filter connection trees. It should be used as a leaf/terminating element of the connection tree.","title":"(wd.)resistor"},{"location":"libs/wdmodels/#usage","text":"r1(i) = resistor(i, R); buildtree( A : r1 ); Where: i : index used by model-building functions. Should never be user declared. R : Resistance/Impedance of the resistor being modeled in Ohms. Note: the adaptor must be declared as a separate function before integration into the connection tree. Correct implementation is shown above.","title":"Usage"},{"location":"libs/wdmodels/#reference","text":"K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.2.1","title":"Reference"},{"location":"libs/wdmodels/#wdresistor_vout","text":"Adapted Resistor + voltage Out. A basic adaptor implementing a resistor for use within Wave Digital Filter connection trees. It should be used as a leaf/terminating element of the connection tree. The resistor will also pass the voltage across itself as an output of the model.","title":"(wd.)resistor_Vout"},{"location":"libs/wdmodels/#usage_1","text":"rout(i) = resistor_Vout(i, R); buildtree( A : rout ) : _ Where: i : index used by model-building functions. Should never be user declared. R : Resistance/Impedance of the resistor being modeled in Ohms. Note: the adaptor must be declared as a separate function before integration into the connection tree. Correct implementation is shown above.","title":"Usage"},{"location":"libs/wdmodels/#reference_1","text":"K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.2.1","title":"Reference"},{"location":"libs/wdmodels/#wdresistor_iout","text":"Resistor + current Out. A basic adaptor implementing a resistor for use within Wave Digital Filter connection trees. It should be used as a leaf/terminating element of the connection tree. The resistor will also pass the current through itself as an output of the model.","title":"(wd.)resistor_Iout"},{"location":"libs/wdmodels/#usage_2","text":"rout(i) = resistor_Iout(i, R); buildtree( A : rout ) : _ Where: i : index used by model-building functions. Should never be user declared. R : Resistance/Impedance of the resistor being modeled in Ohms. Note: the adaptor must be declared as a separate function before integration into the connection tree. Correct implementation is shown above.","title":"Usage"},{"location":"libs/wdmodels/#reference_2","text":"K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.2.1","title":"Reference"},{"location":"libs/wdmodels/#wdu_voltage","text":"Unadapted Ideal Voltage Source. An adaptor implementing an ideal voltage source within Wave Digital Filter connection trees. It should be used as the root/top element of the connection tree. Can be used for either DC (constant) or AC (signal) voltage sources.","title":"(wd.)u_voltage"},{"location":"libs/wdmodels/#usage_3","text":"v1(i) = u_Voltage(i, ein); buildtree( v1 : B ); Where: i : index used by model-building functions. Should never be user declared. ein : Voltage/Potential across ideal voltage source in Volts Note: only usable as the root of a tree. The adaptor must be declared as a separate function before integration into the connection tree. Correct implementation is shown above.","title":"Usage"},{"location":"libs/wdmodels/#reference_3","text":"K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.2.2","title":"Reference"},{"location":"libs/wdmodels/#wdu_current","text":"Unadapted Ideal Current Source. An unadapted adaptor implementing an ideal current source within Wave Digital Filter connection trees. It should be used as the root/top element of the connection tree. Can be used for either DC (constant) or AC (signal) current sources.","title":"(wd.)u_current"},{"location":"libs/wdmodels/#usage_4","text":"i1(i) = u_current(i, jin); buildtree( i1 : B ); Where: i : index used by model-building functions. Should never be user declared. jin : Current through the ideal current source in Amps Note: only usable as the root of a tree. The adaptor must be declared as a separate function before integration into the connection tree. Correct implementation is shown above.","title":"Usage"},{"location":"libs/wdmodels/#reference_4","text":"K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.2.3","title":"Reference"},{"location":"libs/wdmodels/#wdresvoltage","text":"Adapted Resistive Voltage Source. An adaptor implementing a resistive voltage source within Wave Digital Filter connection trees. It should be used as a leaf/terminating element of the connection tree. It is comprised of an ideal voltage source in series with a resistor. Can be used for either DC (constant) or AC (signal) voltage sources.","title":"(wd.)resVoltage"},{"location":"libs/wdmodels/#usage_5","text":"v1(i) = resVoltage(i, R, ein); buildtree( A : v1 ); Where: i : index used by model-building functions. Should never be user declared R : Resistance/Impedance of the series resistor in Ohms ein : Voltage/Potential of the ideal voltage source in Volts Note: the adaptor must be declared as a separate function before integration into the connection tree. Correct implementation is shown above.","title":"Usage"},{"location":"libs/wdmodels/#reference_5","text":"K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.2.4","title":"Reference"},{"location":"libs/wdmodels/#wdresvoltage_vout","text":"Adapted Resistive Voltage Source + voltage output. An adaptor implementing an adapted resistive voltage source within Wave Digital Filter connection trees. It should be used as a leaf/terminating element of the connection tree. It is comprised of an ideal voltage source in series with a resistor. Can be used for either DC (constant) or AC (signal) voltage sources. The resistive voltage source will also pass the voltage across it as an output of the model.","title":"(wd.)resVoltage_Vout"},{"location":"libs/wdmodels/#usage_6","text":"vout(i) = resVoltage_Vout(i, R, ein); buildtree( A : vout ) : _ Where: i : index used by model-building functions. Should never be user declared R : Resistance/Impedance of the series resistor in Ohms ein : Voltage/Potential across ideal voltage source in Volts Note: the adaptor must be declared as a separate function before integration into the connection tree. Correct implementation is shown above.","title":"Usage"},{"location":"libs/wdmodels/#reference_6","text":"K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.2.4","title":"Reference"},{"location":"libs/wdmodels/#wdu_resvoltage","text":"Unadapted Resistive Voltage Source. An unadapted adaptor implementing a resistive voltage source within Wave Digital Filter connection trees. It should be used as the root/top element of the connection tree. It is comprised of an ideal voltage source in series with a resistor. Can be used for either DC (constant) or AC (signal) voltage sources.","title":"(wd.)u_resVoltage"},{"location":"libs/wdmodels/#usage_7","text":"v1(i) = u_resVoltage(i, R, ein); buildtree( v1 : B ); Where: i : index used by model-building functions. Should never be user declared R : Resistance/Impedance of the series resistor in Ohms ein : Voltage/Potential across ideal voltage source in Volts Note: only usable as the root of a tree. The adaptor must be declared as a separate function before integration into the connection tree. Correct implementation is shown above.","title":"Usage"},{"location":"libs/wdmodels/#reference_7","text":"K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.2.4","title":"Reference"},{"location":"libs/wdmodels/#wdrescurrent","text":"Adapted Resistive Current Source. An adaptor implementing a resistive current source within Wave Digital Filter connection trees. It should be used as a leaf/terminating element of the connection tree. It is comprised of an ideal current source in parallel with a resistor. Can be used for either DC (constant) or AC (signal) current sources.","title":"(wd.)resCurrent"},{"location":"libs/wdmodels/#usage_8","text":"i1(i) = resCurrent(i, R, jin); buildtree( A : i1 ); Where: i : index used by model-building functions. Should never be user declared. R : Resistance/Impedance of the parallel resistor in Ohms jin : Current through the ideal current source in Amps Note: the adaptor must be declared as a separate function before integration into the connection tree. Correct implementation is shown above.","title":"Usage"},{"location":"libs/wdmodels/#reference_8","text":"K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.2.5","title":"Reference"},{"location":"libs/wdmodels/#wdu_rescurrent","text":"Unadapted Resistive Current Source. An unadapted adaptor implementing a resistive current source within Wave Digital Filter connection trees. It should be used as the root/top element of the connection tree. It is comprised of an ideal current source in parallel with a resistor. Can be used for either DC (constant) or AC (signal) current sources.","title":"(wd.)u_resCurrent"},{"location":"libs/wdmodels/#usage_9","text":"i1(i) = u_resCurrent(i, R, jin); buildtree( i1 : B ); Where: i : index used by model-building functions. Should never be user declared. R : Resistance/Impedance of the series resistor in Ohms jin : Current through the ideal current source in Amps Note: only usable as the root of a tree. The adaptor must be declared as a separate function before integration into the connection tree. Correct implementation is shown above.","title":"Usage"},{"location":"libs/wdmodels/#reference_9","text":"K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.2.5","title":"Reference"},{"location":"libs/wdmodels/#wdu_switch","text":"Unadapted Ideal Switch. An unadapted adaptor implementing an ideal switch for Wave Digital Filter connection trees. It should be used as the root/top element of the connection tree","title":"(wd.)u_switch"},{"location":"libs/wdmodels/#usage_10","text":"s1(i) = u_resCurrent(i, lambda); buildtree( s1 : B ); Where: i : index used by model-building functions. Should never be user declared. lambda : switch state control. -1 for closed switch, 1 for open switch. Note: only usable as the root of a tree. The adaptor must be declared as a separate function before integration into the connection tree. Correct implementation is shown above.","title":"Usage"},{"location":"libs/wdmodels/#reference_10","text":"K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.2.8","title":"Reference"},{"location":"libs/wdmodels/#reactive-one-port-adaptors","text":"","title":"Reactive One Port Adaptors"},{"location":"libs/wdmodels/#wdcapacitor","text":"Adapted Capacitor. A basic adaptor implementing a capacitor for use within Wave Digital Filter connection trees. It should be used as a leaf/terminating element of the connection tree. This capacitor model was digitized using the bi-linear transform.","title":"(wd.)capacitor"},{"location":"libs/wdmodels/#usage_11","text":"c1(i) = capacitor(i, R); buildtree( A : c1 ) : _ Where: i : index used by model-building functions. Should never be user declared. R : Capacitance/Impedance of the capacitor being modeled in Farads. Note: the adaptor must be declared as a separate function before integration into the connection tree. Correct implementation is shown above.","title":"Usage"},{"location":"libs/wdmodels/#reference_11","text":"K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.3.1","title":"Reference"},{"location":"libs/wdmodels/#wdcapacitor_vout","text":"Adapted Capacitor + voltage out. A basic adaptor implementing a capacitor for use within Wave Digital Filter connection trees. It should be used as a leaf/terminating element of the connection tree. The capacitor will also pass the voltage across itself as an output of the model. This capacitor model was digitized using the bi-linear transform.","title":"(wd.)capacitor_Vout"},{"location":"libs/wdmodels/#usage_12","text":"cout(i) = capacitor_Vout(i, R); buildtree( A : cout ) : _ Where: i : index used by model-building functions. Should never be user declared R : Capacitance/Impedence of the capacitor being modeled in Farads Note: the adaptor must be declared as a seperate function before integration into the connection tree. Correct implementation is shown above.","title":"Usage"},{"location":"libs/wdmodels/#reference_12","text":"K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.3.1","title":"Reference"},{"location":"libs/wdmodels/#wdinductor","text":"Unadapted Inductor. A basic adaptor implementing an inductor for use within Wave Digital Filter connection trees. It should be used as a leaf/terminating element of the connection tree. This inductor model was digitized using the bi-linear transform.","title":"(wd.)inductor"},{"location":"libs/wdmodels/#usage_13","text":"l1(i) = inductor(i, R); buildtree( A : l1 ); Where: i : index used by model-building functions. Should never be user declared R : Inductance/Impedance of the inductor being modeled in Henries Note: the adaptor must be declared as a separate function before integration into the connection tree. Correct implementation is shown above.","title":"Usage"},{"location":"libs/wdmodels/#reference_13","text":"K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.3.2","title":"Reference"},{"location":"libs/wdmodels/#wdinductor_vout","text":"Unadapted Inductor + Voltage out. A basic adaptor implementing an inductor for use within Wave Digital Filter connection trees. It should be used as a leaf/terminating element of the connection tree. The inductor will also pass the voltage across itself as an output of the model. This inductor model was digitized using the bi-linear transform.","title":"(wd.)inductor_Vout"},{"location":"libs/wdmodels/#usage_14","text":"lout(i) = inductor_Vout(i, R); buildtree( A : lout ) : _ Where: i : index used by model-building functions. Should never be user declared R : Inductance/Impedance of the inductor being modeled in Henries Note: the adaptor must be declared as a separate function before integration into the connection tree. Correct implementation is shown above.","title":"Usage"},{"location":"libs/wdmodels/#reference_14","text":"K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.3.2","title":"Reference"},{"location":"libs/wdmodels/#nonlinear-one-port-adaptors","text":"","title":"Nonlinear One Port Adaptors"},{"location":"libs/wdmodels/#wdu_idealdiode","text":"Unadapted Ideal Diode. An unadapted adaptor implementing an ideal diode for Wave Digital Filter connection trees. It should be used as the root/top element of the connection tree.","title":"(wd.)u_idealDiode"},{"location":"libs/wdmodels/#usage_15","text":"buildtree( u_idealDiode : B ); Note: only usable as the root of a tree. Correct implementation is shown above.","title":"Usage"},{"location":"libs/wdmodels/#reference_15","text":"K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 3.2.3","title":"Reference"},{"location":"libs/wdmodels/#wdu_chua","text":"Unadapted Chua Diode. An adaptor implementing the chua diode / non-linear resistor within Wave Digital Filter connection trees. It should be used as the root/top element of the connection tree.","title":"(wd.)u_chua"},{"location":"libs/wdmodels/#usage_16","text":"chua1(i) = u_chua(i, G1, G2, V0); buildtree( chua1 : B ); Where: i : index used by model-building functions. Should never be user declared G1 : resistance parameter 1 of the chua diode G2 : resistance parameter 2 of the chua diode V0 : voltage parameter of the chua diode Note: only usable as the root of a tree. The adaptor must be declared as a separate function before integration into the connection tree. Correct implementation is shown above.","title":"Usage"},{"location":"libs/wdmodels/#reference_16","text":"Meerkotter and Scholz, \"Digital Simulation of Nonlinear Circuits by Wave Digital Filter Principles\"","title":"Reference"},{"location":"libs/wdmodels/#wdlambert","text":"An implementation of the lambert function. It uses Halley's method of iteration to approximate the output. Included in the WD library for use in non-linear diode models. Adapted from K M Brigg's c++ lambert function approximation.","title":"(wd.)lambert"},{"location":"libs/wdmodels/#usage_17","text":"lambert(n, itr) : _ Where: * n : value at which the lambert function will be evaluated * itr : number of iterations before output","title":"Usage"},{"location":"libs/wdmodels/#wdu_diodepair","text":"Unadapted pair of diodes facing in opposite directions. An unadapted adaptor implementing two antiparallel diodes for Wave Digital Filter connection trees. The behavior is approximated using Schottkey's ideal diode law.","title":"(wd.)u_diodePair"},{"location":"libs/wdmodels/#usage_18","text":"d1(i) = u_diodePair(i, Is, Vt); buildtree( d1 : B ); Where: i : index used by model-building functions. Should never be user declared Is : saturation current of the diodes Vt : thermal resistances of the diodes Note: only usable as the root of a tree. Correct implementation is shown above.","title":"Usage"},{"location":"libs/wdmodels/#reference_17","text":"K. Werner et al. \"An Improved and Generalized Diode Clipper Model for Wave Digital Filters\"","title":"Reference"},{"location":"libs/wdmodels/#wdu_diodesingle","text":"Unadapted single diode. An unadapted adaptor implementing a single diode for Wave Digital Filter connection trees. The behavior is approximated using Schottkey's ideal diode law.","title":"(wd.)u_diodeSingle"},{"location":"libs/wdmodels/#usage_19","text":"d1(i) = u_diodeSingle(i, Is, Vt); buildtree( d1 : B ); Where: i : index used by model-building functions. Should never be user declared Is : saturation current of the diodes Vt : thermal resistances of the diodes Note: only usable as the root of a tree. Correct implementation is shown above.","title":"Usage"},{"location":"libs/wdmodels/#reference_18","text":"K. Werner et al. \"An Improved and Generalized Diode Clipper Model for Wave Digital Filters\"","title":"Reference"},{"location":"libs/wdmodels/#wdu_diodeantiparallel","text":"Unadapted set of antiparallel diodes with M diodes facing forwards and N diodes facing backwards. An unadapted adaptor implementing antiparallel diodes for Wave Digital Filter connection trees. The behavior is approximated using Schottkey's ideal diode law.","title":"(wd.)u_diodeAntiparallel"},{"location":"libs/wdmodels/#usage_20","text":"d1(i) = u_diodeAntiparallel(i, Is, Vt); buildtree( d1 : B ); Where: i : index used by model-building functions. Should never be user declared Is : saturation current of the diodes Vt : thermal resistances of the diodes Note: only usable as the root of a tree. Correct implementation is shown above.","title":"Usage"},{"location":"libs/wdmodels/#reference_19","text":"K. Werner et al. \"An Improved and Generalized Diode Clipper Model for Wave Digital Filters\"","title":"Reference"},{"location":"libs/wdmodels/#two-port-adaptors","text":"","title":"Two Port Adaptors"},{"location":"libs/wdmodels/#wdu_parallel2port","text":"Unadapted 2-port parallel connection. An unadapted adaptor implementing a 2-port parallel connection between adaptors for Wave Digital Filter connection trees. Elements connected to this adaptor will behave as if connected in parallel in circuit.","title":"(wd.)u_parallel2Port"},{"location":"libs/wdmodels/#usage_21","text":"buildtree( u_parallel2Port : (A, B) ); Note: only usable as the root of a tree. This adaptor has no user-accessible parameters. Correct implementation is shown above.","title":"Usage"},{"location":"libs/wdmodels/#reference_20","text":"K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.4.1","title":"Reference"},{"location":"libs/wdmodels/#wdparallel2port","text":"Adapted 2-port parallel connection. An adaptor implementing a 2-port parallel connection between adaptors for Wave Digital Filter connection trees. Elements connected to this adaptor will behave as if connected in parallel in circuit.","title":"(wd.)parallel2Port"},{"location":"libs/wdmodels/#usage_22","text":"buildtree( A : parallel2Port : B ); Note: this adaptor has no user-accessible parameters. It should be used within the connection tree with one previous and one forward adaptor. Correct implementation is shown above.","title":"Usage"},{"location":"libs/wdmodels/#reference_21","text":"K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.4.1","title":"Reference"},{"location":"libs/wdmodels/#wdu_series2port","text":"Unadapted 2-port series connection. An unadapted adaptor implementing a 2-port series connection between adaptors for Wave Digital Filter connection trees. Elements connected to this adaptor will behave as if connected in series in circuit.","title":"(wd.)u_series2Port"},{"location":"libs/wdmodels/#usage_23","text":"buildtree( u_series2Port : (A, B) ); Note: only usable as the root of a tree. This adaptor has no user-accessible parameters. Correct implementation is shown above.","title":"Usage"},{"location":"libs/wdmodels/#reference_22","text":"K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.4.1","title":"Reference"},{"location":"libs/wdmodels/#wdseries2port","text":"Adapted 2-port series connection. An adaptor implementing a 2-port series connection between adaptors for Wave Digital Filter connection trees. Elements connected to this adaptor will behave as if connected in series in circuit.","title":"(wd.)series2Port"},{"location":"libs/wdmodels/#usage_24","text":"buildtree( A : series2Port : B ); Note: this adaptor has no user-accessible parameters. It should be used within the connection tree with one previous and one forward adaptor. Correct implementation is shown above.","title":"Usage"},{"location":"libs/wdmodels/#reference_23","text":"K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.4.1","title":"Reference"},{"location":"libs/wdmodels/#wdparallelcurrent","text":"Adapted 2-port parallel connection + ideal current source. An adaptor implementing a 2-port series connection and internal idealized current source between adaptors for Wave Digital Filter connection trees. This adaptor connects the two connected elements and an additional ideal current source in parallel.","title":"(wd.)parallelCurrent"},{"location":"libs/wdmodels/#usage_25","text":"i1(i) = parallelCurrent(i, jin); buildtree(A : i1 : B); Where: i : index used by model-building functions. Should never be user declared jin : Current through the ideal current source in Amps Note: the adaptor must be declared as a separate function before integration into the connection tree. It should be used within a connection tree with one previous and one forward adaptor. Correct implementation is shown above.","title":"Usage"},{"location":"libs/wdmodels/#reference_24","text":"K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.4.2","title":"Reference"},{"location":"libs/wdmodels/#wdseriesvoltage","text":"Adapted 2-port series connection + ideal voltage source. An adaptor implementing a 2-port series connection and internal ideal voltage source between adaptors for Wave Digital Filter connection trees. This adaptor connects the two connected adaptors and an additional ideal voltage source in series.","title":"(wd.)seriesVoltage"},{"location":"libs/wdmodels/#usage_26","text":"v1(i) = seriesVoltage(i, vin) buildtree( A : v1 : B ); Where: i : index used by model-building functions. Should never be user declared vin : voltage across the ideal current source in Volts Note: the adaptor must be declared as a separate function before integration into the connection tree. It should be used within the connection tree with one previous and one forward adaptor.","title":"Usage"},{"location":"libs/wdmodels/#reference_25","text":"K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.4.2","title":"Reference"},{"location":"libs/wdmodels/#wdu_transformer","text":"Unadapted ideal transformer. An adaptor implementing an ideal transformer for Wave Digital Filter connection trees. The first downward-facing port corresponds to the primary winding connections, and the second downward-facing port to the secondary winding connections.","title":"(wd.)u_transformer"},{"location":"libs/wdmodels/#usage_27","text":"t1(i) = u_transformer(i, tr); buildtree(t1 : (A , B)); Where: i : index used by model-building functions. Should never be user declared tr : the turn ratio between the windings on the primary and secondary coils Note: the adaptor must be declared as a separate function before integration into the connection tree. It may only be used as the root of the connection tree with two forward nodes.","title":"Usage"},{"location":"libs/wdmodels/#reference_26","text":"K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.4.3","title":"Reference"},{"location":"libs/wdmodels/#wdtransformer","text":"Adapted ideal transformer. An adaptor implementing an ideal transformer for Wave Digital Filter connection trees. The upward-facing port corresponds to the primary winding connections, and the downward-facing port to the secondary winding connections","title":"(wd.)transformer"},{"location":"libs/wdmodels/#usage_28","text":"t1(i) = transformer(i, tr); buildtree(A : t1 : B); Where: i : index used by model-building functions. Should never be user declared tr : the turn ratio between the windings on the primary and secondary coils Note: the adaptor must be declared as a separate function before integration into the connection tree. It should be used within the connection tree with one backward and one forward nodes.","title":"Usage"},{"location":"libs/wdmodels/#reference_27","text":"K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.4.3","title":"Reference"},{"location":"libs/wdmodels/#wdu_transformeractive","text":"Unadapted ideal active transformer. An adaptor implementing an ideal transformer for Wave Digital Filter connection trees. The first downward-facing port corresponds to the primary winding connections, and the second downward-facing port to the secondary winding connections.","title":"(wd.)u_transformerActive"},{"location":"libs/wdmodels/#usage_29","text":"t1(i) = u_transformerActive(i, gamma1, gamma2); buildtree(t1 : (A , B)); Where: i : index used by model-building functions. Should never be user declared gamma1 : the turn ratio describing the voltage relationship between the primary and secondary coils gamma2 : the turn ratio describing the current relationship between the primary and secondary coils Note: the adaptor must be declared as a separate function before integration into the connection tree. It may only be used as the root of the connection tree with two forward nodes.","title":"Usage"},{"location":"libs/wdmodels/#reference_28","text":"K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.4.3","title":"Reference"},{"location":"libs/wdmodels/#wdtransformeractive","text":"Adapted ideal active transformer. An adaptor implementing an ideal active transformer for Wave Digital Filter connection trees. The upward-facing port corresponds to the primary winding connections, and the downward-facing port to the secondary winding connections","title":"(wd.)transformerActive"},{"location":"libs/wdmodels/#usage_30","text":"t1(i) = transformerActive(i, gamma1, gamma2); buildtree(A : t1 : B); Where: i : index used by model-building functions. Should never be user declared gamma1 : the turn ratio describing the voltage relationship between the primary and secondary coils gamma2 : the turn ratio describing the current relationship between the primary and secondary coils Note: the adaptor must be declared as a separate function before integration into the connection tree. It should be used within the connection tree with two forward nodes.","title":"Usage"},{"location":"libs/wdmodels/#reference_29","text":"K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.4.3","title":"Reference"},{"location":"libs/wdmodels/#three-port-adaptors","text":"","title":"Three Port Adaptors"},{"location":"libs/wdmodels/#wdparallel","text":"Adapted 3-port parallel connection. An adaptor implementing a 3-port parallel connection between adaptors for Wave Digital Filter connection trees. This adaptor is used to connect adaptors simulating components connected in parallel in the circuit.","title":"(wd.)parallel"},{"location":"libs/wdmodels/#usage_31","text":"buildtree( A : parallel : (B, C) ); Note: this adaptor has no user-accessible parameters. It should be used within the connection tree with one previous and two forward adaptors.","title":"Usage"},{"location":"libs/wdmodels/#reference_30","text":"K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.5.1","title":"Reference"},{"location":"libs/wdmodels/#wdseries","text":"Adapted 3-port series connection. An adaptor implementing a 3-port series connection between adaptors for Wave Digital Filter connection trees. This adaptor is used to connect adaptors simulating components connected in series in the circuit.","title":"(wd.)series"},{"location":"libs/wdmodels/#usage_32","text":"tree = A : (series : (B, C)); Note: this adaptor has no user-accessible parameters. It should be used within the connection tree with one previous and two forward adaptors.","title":"Usage"},{"location":"libs/wdmodels/#reference_31","text":"K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 1.5.2","title":"Reference"},{"location":"libs/wdmodels/#r-type-adaptors","text":"","title":"R-Type Adaptors"},{"location":"libs/wdmodels/#wdu_sixportpassive","text":"Unadapted six-port rigid connection. An adaptor implementing a six-port passive rigid connection between elements. It implements the simplest possible rigid connection found in the Fender Bassman Tonestack circuit.","title":"(wd.)u_sixportPassive"},{"location":"libs/wdmodels/#usage_33","text":"tree = u_sixportPassive : (A, B, C, D, E, F)); Note: this adaptor has no user-accessible parameters. It should be used within the connection tree with six forward adaptors.","title":"Usage"},{"location":"libs/wdmodels/#reference_32","text":"K. Werner, \"Virtual Analog Modeling of Audio Circuitry Using Wave Digital Filters\", 2.1.5","title":"Reference"},{"location":"libs/wdmodels/#node-creating-functions","text":"","title":"Node Creating Functions"},{"location":"libs/wdmodels/#wdgenericnode","text":"Function for generating an adapted node from another faust function or scattering matrix. This function generates a node which is suitable for use in the connection tree structure. genericNode separates the function that it is passed into upward-going and downward-going waves.","title":"(wd.)genericNode"},{"location":"libs/wdmodels/#usage_34","text":"n1(i) = genericNode(i, scatter, upRes); Where: i : index used by model-building functions. Should never be user declared scatter : the function which describes the the node's scattering behavior upRes : the function which describes the node's upward-facing port-resistance Note: scatter must be a function with n inputs, n outputs, and n-1 parameter inputs. input/output 1 will be used as the adapted upward-facing port of the node, ports 2 to n will all be downward-facing. The first input/output pair is assumed to already be adapted - i.e. the output 1 is not dependent on input 1. The parameter inputs will receive the port resistances of the downward-facing ports. upRes must be a function with n-1 parameter inputs and 1 output. The parameter inputs will receive the port resistances of the downward-facing ports. The output should give the upward-facing port resistance of the node based on the upward-facing port resistances of the input. If used on a leaf element (n=1), the model will automatically introduce a one-sample delay. Thus, the output of the node at sample t based on the input, a[t], should be the output one sample ahead, b[t+1]. This may require transformation of the output signal.","title":"Usage"},{"location":"libs/wdmodels/#wdgenericnode_vout","text":"Function for generating a terminating/leaf node which gives the voltage across itself as a model output. This function generates a node which is suitable for use in the connection tree structure. It also calculates the voltage across the element and gives it as a model output.","title":"(wd.)genericNode_Vout"},{"location":"libs/wdmodels/#usage_35","text":"n1(i) = genericNode_Vout(i, scatter, upRes); Where: i : index used by model-building functions. Should never be user declared scatter : the function which describes the the node's scattering behavior upRes : the function which describes the node's upward-facing port-resistance Note: scatter must be a function with 1 input and 1 output. It should give the output from the node based on the incident wave. The model will automatically introduce a one-sample delay to the output of the function Thus, the output of the node at sample t based on the input, a[t], should be the output one sample ahead, b[t+1]. This may require transformation of the output signal. upRes must be a function with no inputs and 1 output. The output should give the upward-facing port resistance of the node.","title":"Usage"},{"location":"libs/wdmodels/#wdgenericnode_iout","text":"Function for generating a terminating/leaf node which gives the current through itself as a model output. This function generates a node which is suitable for use in the connection tree structure. It also calculates the current through the element and gives it as a model output.","title":"(wd.)genericNode_Iout"},{"location":"libs/wdmodels/#usage_36","text":"n1(i) = genericNode_Iout(i, scatter, upRes); Where: i : index used by model-building functions. Should never be user declared scatter : the function which describes the the node's scattering behavior upRes : the function which describes the node's upward-facing port-resistance Note: scatter must be a function with 1 input and 1 output. It should give the output from the node based on the incident wave. The model will automatically introduce a one-sample delay to the output of the function. Thus, the output of the node at sample t based on the input, a[t], should be the output one sample ahead, b[t+1]. This may require transformation of the output signal. upRes must be a function with no inputs and 1 output. The output should give the upward-facing port resistance of the node.","title":"Usage"},{"location":"libs/wdmodels/#wdu_genericnode","text":"Function for generating an unadapted node from another Faust function or scattering matrix. This function generates a node which is suitable for use as the root of the connection tree structure.","title":"(wd.)u_genericNode"},{"location":"libs/wdmodels/#usage_37","text":"n1(i) = u_genericNode(i, scatter); Where: i : index used by model-building functions. Should never be user declared scatter : the function which describes the the node's scattering behavior Note: scatter must be a function with n inputs, n outputs, and n parameter inputs. each input/output pair will be used as a downward-facing port of the node the parameter inputs will receive the port resistances of the downward-facing ports.","title":"Usage"},{"location":"libs/wdmodels/#model-building-functions","text":"","title":"Model Building Functions"},{"location":"libs/wdmodels/#wdbuilddown","text":"Function for building the structure for calculating waves traveling down the WD connection tree. It recursively steps through the given tree, parametrizes the adaptors, and builds an algorithm. It is used in conjunction with the buildup() function to create a model.","title":"(wd.)builddown"},{"location":"libs/wdmodels/#usage_38","text":"builddown(A : B)~buildup(A : B); Where: (A : B) : is a connection tree composed of WD adaptors","title":"Usage"},{"location":"libs/wdmodels/#wdbuildup","text":"Function for building the structure for calculating waves traveling up the WD connection tree. It recursively steps through the given tree, parametrizes the adaptors, and builds an algorithm. It is used in conjunction with the builddown() function to create a full structure.","title":"(wd.)buildup"},{"location":"libs/wdmodels/#usage_39","text":"builddown(A : B)~buildup(A : B); Where: (A : B) : is a connection tree composed of WD adaptors","title":"Usage"},{"location":"libs/wdmodels/#wdgetres","text":"Function for determining the upward-facing port resistance of a partial WD connection tree. It recursively steps through the given tree, parametrizes the adaptors, and builds an algorithm. It is used by the buildup and builddown functions but is also helpful in testing.","title":"(wd.)getres"},{"location":"libs/wdmodels/#usage_40","text":"getres(A : B)~getres(A : B); Where: (A : B) : is a partial connection tree composed of WD adaptors Note: This function cannot be used on a complete WD tree. When called on an unadapted adaptor (u_ prefix), it will create errors.","title":"Usage"},{"location":"libs/wdmodels/#wdparres","text":"Function for determining the upward-facing port resistance of a partial WD connection tree. It recursively steps through the given tree, parametrizes the adaptors, and builds an algorithm. It is used by the buildup and builddown functions but is also helpful in testing. This function is a parallelized version of getres .","title":"(wd.)parres"},{"location":"libs/wdmodels/#usage_41","text":"parres((A , B))~parres((A , B)); Where: (A , B) : is a partial connection tree composed of WD adaptors Note: this function cannot be used on a complete WD tree. When called on an unadapted adaptor (u_ prefix), it will create errors.","title":"Usage"},{"location":"libs/wdmodels/#wdbuildout","text":"Function for creating the output matrix for a WD model from a WD connection tree. It recursively steps through the given tree and creates an output matrix passing only outputs.","title":"(wd.)buildout"},{"location":"libs/wdmodels/#usage_42","text":"buildout( A : B ); Where: (A : B) : is a connection tree composed of WD adaptors","title":"Usage"},{"location":"libs/wdmodels/#wdbuildtree","text":"Function for building the DSP model from a WD connection tree structure. It recursively steps through the given tree, parametrizes the adaptors, and builds the algorithm.","title":"(wd.)buildtree"},{"location":"libs/wdmodels/#usage_43","text":"buildtree(A : B); Where: (A : B) : a connection tree composed of WD adaptors","title":"Usage"},{"location":"libs/webaudio/","text":"webaudio.lib This library implement WebAudio filters, using their C++ version as a starting point, taken from Mozilla Firefox implementation. References https://github.com/grame-cncm/faustlibraries/blob/master/webaudio.lib (wa.)lowpass2 Standard second-order resonant lowpass filter with 12dB/octave rolloff. Frequencies below the cutoff pass through, frequencies above it are attenuated. Usage _ : lowpass2(f0, Q, dtune) : _ Where: f0 : cutoff frequency in Hz Q : the quality factor dtune : detuning of the frequency in cents Reference https://searchfox.org/mozilla-central/source/dom/media/webaudio/blink/Biquad.cpp#98 (wa.)highpass2 Standard second-order resonant highpass filter with 12dB/octave rolloff. Frequencies below the cutoff are attenuated, frequencies above it pass through. Usage _ : highpass2(f0, Q, dtune) : _ Where: f0 : cutoff frequency in Hz Q : the quality factor dtune : detuning of the frequency in cents Reference https://searchfox.org/mozilla-central/source/dom/media/webaudio/blink/Biquad.cpp#127 (wa.)bandpass2 Standard second-order bandpass filter. Frequencies outside the given range of frequencies are attenuated, the frequencies inside it pass through. Usage _ : bandpass2(f0, Q, dtune) : _ Where: f0 : cutoff frequency in Hz Q : the quality factor dtune : detuning of the frequency in cents Reference https://searchfox.org/mozilla-central/source/dom/media/webaudio/blink/Biquad.cpp#334 (wa.)notch2 Standard notch filter, also called a band-stop or band-rejection filter. It is the opposite of a bandpass filter: frequencies outside the give range of frequencies pass through, frequencies inside it are attenuated. Usage _ : notch2(f0, Q, dtune) : _ Where: f0 : cutoff frequency in Hz Q : the quality factor dtune : detuning of the frequency in cents Reference https://searchfox.org/mozilla-central/source/dom/media/webaudio/blink/Biquad.cpp#301 (wa.)allpass2 Standard second-order allpass filter. It lets all frequencies through, but changes the phase-relationship between the various frequencies. Usage _ : allpass2(f0, Q, dtune) : _ Where: f0 : cutoff frequency in Hz Q : the quality factor dtune : detuning of the frequency in cents Reference https://searchfox.org/mozilla-central/source/dom/media/webaudio/blink/Biquad.cpp#268 (wa.)peaking2 Frequencies inside the range get a boost or an attenuation, frequencies outside it are unchanged. Usage _ : peaking2(f0, gain, Q, dtune) : _ Where: f0 : cutoff frequency in Hz gain : the gain in dB Q : the quality factor dtune : detuning of the frequency in cents Reference https://searchfox.org/mozilla-central/source/dom/media/webaudio/blink/Biquad.cpp#233 (wa.)lowshelf2 Standard second-order lowshelf filter. Frequencies lower than the frequency get a boost, or an attenuation, frequencies over it are unchanged. _ : lowshelf2(f0, gain, dtune) : _ Where: f0 : cutoff frequency in Hz gain : the gain in dB dtune : detuning of the frequency in cents Reference https://searchfox.org/mozilla-central/source/dom/media/webaudio/blink/Biquad.cpp#169 (wa.)highshelf2 Standard second-order highshelf filter. Frequencies higher than the frequency get a boost or an attenuation, frequencies lower than it are unchanged. _ : highshelf2(f0, gain, dtune) : _ Where: f0 : cutoff frequency in Hz gain : the gain in dB dtune : detuning of the frequency in cents Reference https://searchfox.org/mozilla-central/source/dom/media/webaudio/blink/Biquad.cpp#201","title":" webaudio "},{"location":"libs/webaudio/#webaudiolib","text":"This library implement WebAudio filters, using their C++ version as a starting point, taken from Mozilla Firefox implementation.","title":"webaudio.lib"},{"location":"libs/webaudio/#references","text":"https://github.com/grame-cncm/faustlibraries/blob/master/webaudio.lib","title":"References"},{"location":"libs/webaudio/#walowpass2","text":"Standard second-order resonant lowpass filter with 12dB/octave rolloff. Frequencies below the cutoff pass through, frequencies above it are attenuated.","title":"(wa.)lowpass2"},{"location":"libs/webaudio/#usage","text":"_ : lowpass2(f0, Q, dtune) : _ Where: f0 : cutoff frequency in Hz Q : the quality factor dtune : detuning of the frequency in cents","title":"Usage"},{"location":"libs/webaudio/#reference","text":"https://searchfox.org/mozilla-central/source/dom/media/webaudio/blink/Biquad.cpp#98","title":"Reference"},{"location":"libs/webaudio/#wahighpass2","text":"Standard second-order resonant highpass filter with 12dB/octave rolloff. Frequencies below the cutoff are attenuated, frequencies above it pass through.","title":"(wa.)highpass2"},{"location":"libs/webaudio/#usage_1","text":"_ : highpass2(f0, Q, dtune) : _ Where: f0 : cutoff frequency in Hz Q : the quality factor dtune : detuning of the frequency in cents","title":"Usage"},{"location":"libs/webaudio/#reference_1","text":"https://searchfox.org/mozilla-central/source/dom/media/webaudio/blink/Biquad.cpp#127","title":"Reference"},{"location":"libs/webaudio/#wabandpass2","text":"Standard second-order bandpass filter. Frequencies outside the given range of frequencies are attenuated, the frequencies inside it pass through.","title":"(wa.)bandpass2"},{"location":"libs/webaudio/#usage_2","text":"_ : bandpass2(f0, Q, dtune) : _ Where: f0 : cutoff frequency in Hz Q : the quality factor dtune : detuning of the frequency in cents","title":"Usage"},{"location":"libs/webaudio/#reference_2","text":"https://searchfox.org/mozilla-central/source/dom/media/webaudio/blink/Biquad.cpp#334","title":"Reference"},{"location":"libs/webaudio/#wanotch2","text":"Standard notch filter, also called a band-stop or band-rejection filter. It is the opposite of a bandpass filter: frequencies outside the give range of frequencies pass through, frequencies inside it are attenuated.","title":"(wa.)notch2"},{"location":"libs/webaudio/#usage_3","text":"_ : notch2(f0, Q, dtune) : _ Where: f0 : cutoff frequency in Hz Q : the quality factor dtune : detuning of the frequency in cents","title":"Usage"},{"location":"libs/webaudio/#reference_3","text":"https://searchfox.org/mozilla-central/source/dom/media/webaudio/blink/Biquad.cpp#301","title":"Reference"},{"location":"libs/webaudio/#waallpass2","text":"Standard second-order allpass filter. It lets all frequencies through, but changes the phase-relationship between the various frequencies.","title":"(wa.)allpass2"},{"location":"libs/webaudio/#usage_4","text":"_ : allpass2(f0, Q, dtune) : _ Where: f0 : cutoff frequency in Hz Q : the quality factor dtune : detuning of the frequency in cents","title":"Usage"},{"location":"libs/webaudio/#reference_4","text":"https://searchfox.org/mozilla-central/source/dom/media/webaudio/blink/Biquad.cpp#268","title":"Reference"},{"location":"libs/webaudio/#wapeaking2","text":"Frequencies inside the range get a boost or an attenuation, frequencies outside it are unchanged.","title":"(wa.)peaking2"},{"location":"libs/webaudio/#usage_5","text":"_ : peaking2(f0, gain, Q, dtune) : _ Where: f0 : cutoff frequency in Hz gain : the gain in dB Q : the quality factor dtune : detuning of the frequency in cents","title":"Usage"},{"location":"libs/webaudio/#reference_5","text":"https://searchfox.org/mozilla-central/source/dom/media/webaudio/blink/Biquad.cpp#233","title":"Reference"},{"location":"libs/webaudio/#walowshelf2","text":"Standard second-order lowshelf filter. Frequencies lower than the frequency get a boost, or an attenuation, frequencies over it are unchanged. _ : lowshelf2(f0, gain, dtune) : _ Where: f0 : cutoff frequency in Hz gain : the gain in dB dtune : detuning of the frequency in cents","title":"(wa.)lowshelf2"},{"location":"libs/webaudio/#reference_6","text":"https://searchfox.org/mozilla-central/source/dom/media/webaudio/blink/Biquad.cpp#169","title":"Reference"},{"location":"libs/webaudio/#wahighshelf2","text":"Standard second-order highshelf filter. Frequencies higher than the frequency get a boost or an attenuation, frequencies lower than it are unchanged. _ : highshelf2(f0, gain, dtune) : _ Where: f0 : cutoff frequency in Hz gain : the gain in dB dtune : detuning of the frequency in cents","title":"(wa.)highshelf2"},{"location":"libs/webaudio/#reference_7","text":"https://searchfox.org/mozilla-central/source/dom/media/webaudio/blink/Biquad.cpp#201","title":"Reference"}]}
\ No newline at end of file
diff --git a/docs/sitemap.xml.gz b/docs/sitemap.xml.gz
index 12daa4cc..a8ce1d08 100644
Binary files a/docs/sitemap.xml.gz and b/docs/sitemap.xml.gz differ
diff --git a/filters.lib b/filters.lib
index cabf7250..2a64b02a 100644
--- a/filters.lib
+++ b/filters.lib
@@ -1,5 +1,5 @@
//##################################### filters.lib ########################################
-// Faust Filters library. Its official prefix is `fi`.
+// Filters library. Its official prefix is `fi`.
//
// The Filters library is organized into 22 sections:
//
diff --git a/misceffects.lib b/misceffects.lib
index f5b218bf..fa60adc6 100644
--- a/misceffects.lib
+++ b/misceffects.lib
@@ -1,5 +1,15 @@
//################################## misceffects.lib ##########################################
-// This library contains a collection of audio effects. Its official prefix is `ef`.
+// Collection of audio effects library. Its official prefix is `ef`.
+//
+// The library is organized into 7 sections:
+//
+// * [Dynamic](#Dynamic)
+// * [Filtering](#filtering)
+// * [Meshes](#meshes)
+// * [Mixing](#mixing)
+// * [Time Based](#time-based)
+// * [Pitch Shifting](#pitch-shifting)
+// * [Saturators](#saturators)
//
// #### References
// *