3742 lines
161 KiB
HTML
3742 lines
161 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
|
|
|
|
|
<link rel="shortcut icon" href="../../img/favicon.ico">
|
|
<title> physmodels - Faust Libraries</title>
|
|
<link href="../../css/bootstrap.min.css" rel="stylesheet">
|
|
<link href="../../css/font-awesome.min.css" rel="stylesheet">
|
|
<link href="../../css/base.css" rel="stylesheet">
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/github.min.css">
|
|
<link href="../../css/extra.css" rel="stylesheet">
|
|
|
|
<script src="../../js/jquery-3.6.0.min.js" defer></script>
|
|
<script src="../../js/bootstrap.min.js" defer></script>
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
|
|
<script>hljs.initHighlightingOnLoad();</script>
|
|
</head>
|
|
|
|
<body>
|
|
<div class="navbar fixed-top navbar-expand-lg navbar-dark bg-primary">
|
|
<div class="container">
|
|
<a class="navbar-brand" href="../.."><img src="../../img/faustText.svg" width="150px"> </a>
|
|
<!-- Expander button -->
|
|
<button type="button" class="navbar-toggler" data-toggle="collapse" data-target="#navbar-collapse">
|
|
<span class="navbar-toggler-icon"></span>
|
|
</button>
|
|
|
|
<!-- Expanded navigation -->
|
|
<div id="navbar-collapse" class="navbar-collapse collapse">
|
|
<!-- Main navigation -->
|
|
<ul class="nav navbar-nav">
|
|
<li class="dropdown">
|
|
<a href="#" class="nav-link dropdown-toggle" data-toggle="dropdown">Overview <b class="caret"></b></a>
|
|
<ul class="dropdown-menu">
|
|
|
|
<li>
|
|
<a href="../../organization/" class="dropdown-item"> Organization </a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="../../standardFunctions/" class="dropdown-item"> Standard Functions </a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="../../contributing/" class="dropdown-item"> Contributing </a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="../../community/" class="dropdown-item"> Community </a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="../../about/" class="dropdown-item"> Copyright/License </a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li class="navitem">
|
|
<a href="../" class="nav-link">Index</a>
|
|
</li>
|
|
<li class="dropdown active">
|
|
<a href="#" class="nav-link dropdown-toggle" data-toggle="dropdown">Libraries <b class="caret"></b></a>
|
|
<ul class="dropdown-menu">
|
|
|
|
<li>
|
|
<a href="../aanl/" class="dropdown-item"> antialiased </a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="../analyzers/" class="dropdown-item"> analyzers </a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="../basics/" class="dropdown-item"> basics </a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="../compressors/" class="dropdown-item"> compressors </a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="../debug/" class="dropdown-item"> debug </a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="../delays/" class="dropdown-item"> delays </a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="../demos/" class="dropdown-item"> demos </a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="../dx7/dx7/" class="dropdown-item"> dx7/dx7 </a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="../dx7/env/" class="dropdown-item"> dx7/env </a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="../dx7/lfo/" class="dropdown-item"> dx7/lfo </a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="../dx7/operator/" class="dropdown-item"> dx7/operator </a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="../dx7/pitchenv/" class="dropdown-item"> dx7/pitchenv </a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="../envelopes/" class="dropdown-item"> envelopes </a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="../fds/" class="dropdown-item"> fds </a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="../filters/" class="dropdown-item"> filters </a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="../hoa/" class="dropdown-item"> hoa </a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="../hysteresis/" class="dropdown-item"> hysteresis </a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="../interpolators/" class="dropdown-item"> interpolators </a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="../linearalgebra/" class="dropdown-item"> linearalgebra </a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="../maths/" class="dropdown-item"> maths </a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="../mi/" class="dropdown-item"> mi </a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="../misceffects/" class="dropdown-item"> misceffects </a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="../motion/" class="dropdown-item"> motion </a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="../noises/" class="dropdown-item"> noises </a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="../oscillators/" class="dropdown-item"> oscillators </a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="../phaflangers/" class="dropdown-item"> phaflangers </a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="./" class="dropdown-item active"> physmodels </a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="../quantizers/" class="dropdown-item"> quantizers </a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="../reducemaps/" class="dropdown-item"> reducemaps </a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="../reverbs/" class="dropdown-item"> reverbs </a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="../routes/" class="dropdown-item"> routes </a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="../signals/" class="dropdown-item"> signals </a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="../soundfiles/" class="dropdown-item"> soundfiles </a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="../spats/" class="dropdown-item"> spats </a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="../synths/" class="dropdown-item"> synths </a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="../vaeffects/" class="dropdown-item"> vaeffects </a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="../version/" class="dropdown-item"> version </a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="../wdmodels/" class="dropdown-item"> wdmodels </a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="../webaudio/" class="dropdown-item"> webaudio </a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li class="navitem">
|
|
<a href="../../about/" class="nav-link">About</a>
|
|
</li>
|
|
</ul>
|
|
|
|
<ul class="nav navbar-nav ml-auto">
|
|
<li class="nav-item">
|
|
<a href="#" class="nav-link" data-toggle="modal" data-target="#mkdocs_search_modal">
|
|
<i class="fa fa-search"></i> Search
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="container">
|
|
<div class="row"><div class="col-md-3"><div class="navbar-light navbar-expand-md bs-sidebar hidden-print affix" role="complementary">
|
|
<div class="navbar-header">
|
|
<button type="button" class="navbar-toggler collapsed" data-toggle="collapse" data-target="#toc-collapse" title="Table of Contents">
|
|
<span class="fa fa-angle-down"></span>
|
|
</button>
|
|
</div>
|
|
|
|
|
|
<div id="toc-collapse" class="navbar-collapse collapse card bg-secondary">
|
|
<ul class="nav flex-column">
|
|
|
|
<li class="nav-item" data-level="1"><a href="#physmodelslib" class="nav-link">physmodels.lib</a>
|
|
<ul class="nav flex-column">
|
|
<li class="nav-item" data-level="2"><a href="#global-variables" class="nav-link">Global Variables</a>
|
|
<ul class="nav flex-column">
|
|
<li class="nav-item" data-level="3"><a href="#pmspeedofsound" class="nav-link">(pm.)speedOfSound</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmmaxlength" class="nav-link">(pm.)maxLength</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="2"><a href="#conversion-tools" class="nav-link">Conversion Tools</a>
|
|
<ul class="nav flex-column">
|
|
<li class="nav-item" data-level="3"><a href="#pmf2l" class="nav-link">(pm.)f2l</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pml2f" class="nav-link">(pm.)l2f</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pml2s" class="nav-link">(pm.)l2s</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="2"><a href="#bidirectional-utilities" class="nav-link">Bidirectional Utilities</a>
|
|
<ul class="nav flex-column">
|
|
<li class="nav-item" data-level="3"><a href="#pmbasicblock" class="nav-link">(pm.)basicBlock</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmchain" class="nav-link">(pm.)chain</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pminleftwave" class="nav-link">(pm.)inLeftWave</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pminrightwave" class="nav-link">(pm.)inRightWave</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmin" class="nav-link">(pm.)in</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmoutleftwave" class="nav-link">(pm.)outLeftWave</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmoutrightwave" class="nav-link">(pm.)outRightWave</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmout" class="nav-link">(pm.)out</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmterminations" class="nav-link">(pm.)terminations</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmltermination" class="nav-link">(pm.)lTermination</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmrtermination" class="nav-link">(pm.)rTermination</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmcloseins" class="nav-link">(pm.)closeIns</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmcloseouts" class="nav-link">(pm.)closeOuts</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmendchain" class="nav-link">(pm.)endChain</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="2"><a href="#basic-elements" class="nav-link">Basic Elements</a>
|
|
<ul class="nav flex-column">
|
|
<li class="nav-item" data-level="3"><a href="#pmwaveguiden" class="nav-link">(pm.)waveguideN</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmwaveguide" class="nav-link">(pm.)waveguide</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmbridgefilter" class="nav-link">(pm.)bridgeFilter</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmmodefilter" class="nav-link">(pm.)modeFilter</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="2"><a href="#string-instruments" class="nav-link">String Instruments</a>
|
|
<ul class="nav flex-column">
|
|
<li class="nav-item" data-level="3"><a href="#pmstringsegment" class="nav-link">(pm.)stringSegment</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmopenstring" class="nav-link">(pm.)openString</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmnylonstring" class="nav-link">(pm.)nylonString</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmsteelstring" class="nav-link">(pm.)steelString</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmopenstringpick" class="nav-link">(pm.)openStringPick</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmopenstringpickup" class="nav-link">(pm.)openStringPickUp</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmopenstringpickdown" class="nav-link">(pm.)openStringPickDown</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmksreflexionfilter" class="nav-link">(pm.)ksReflexionFilter</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmrstringrigidtermination" class="nav-link">(pm.)rStringRigidTermination</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmlstringrigidtermination" class="nav-link">(pm.)lStringRigidTermination</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmelecguitarbridge" class="nav-link">(pm.)elecGuitarBridge</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmelecguitarnuts" class="nav-link">(pm.)elecGuitarNuts</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmguitarbridge" class="nav-link">(pm.)guitarBridge</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmguitarnuts" class="nav-link">(pm.)guitarNuts</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmidealstring" class="nav-link">(pm.)idealString</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmks" class="nav-link">(pm.)ks</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmks_ui_midi" class="nav-link">(pm.)ks_ui_MIDI</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmelecguitarmodel" class="nav-link">(pm.)elecGuitarModel</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmelecguitar" class="nav-link">(pm.)elecGuitar</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmelecguitar_ui_midi" class="nav-link">(pm.)elecGuitar_ui_MIDI</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmguitarbody" class="nav-link">(pm.)guitarBody</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmguitarmodel" class="nav-link">(pm.)guitarModel</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmguitar" class="nav-link">(pm.)guitar</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmguitar_ui_midi" class="nav-link">(pm.)guitar_ui_MIDI</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmnylonguitarmodel" class="nav-link">(pm.)nylonGuitarModel</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmnylonguitar" class="nav-link">(pm.)nylonGuitar</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmnylonguitar_ui_midi" class="nav-link">(pm.)nylonGuitar_ui_MIDI</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmmodeinterpres" class="nav-link">(pm.)modeInterpRes</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmmodularinterpbody" class="nav-link">(pm.)modularInterpBody</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmmodularinterpstringmodel" class="nav-link">(pm.)modularInterpStringModel</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmmodularinterpinstr" class="nav-link">(pm.)modularInterpInstr</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmmodularinterpinstr_ui_midi" class="nav-link">(pm.)modularInterpInstr_ui_MIDI</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="2"><a href="#bowed-string-instruments" class="nav-link">Bowed String Instruments</a>
|
|
<ul class="nav flex-column">
|
|
<li class="nav-item" data-level="3"><a href="#pmbowtable" class="nav-link">(pm.)bowTable</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmviolinbowtable" class="nav-link">(pm.)violinBowTable</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmbowinteraction" class="nav-link">(pm.)bowInteraction</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmviolinbow" class="nav-link">(pm.)violinBow</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmviolinbowedstring" class="nav-link">(pm.)violinBowedString</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmviolinnuts" class="nav-link">(pm.)violinNuts</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmviolinbridge" class="nav-link">(pm.)violinBridge</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmviolinbody" class="nav-link">(pm.)violinBody</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmviolinmodel" class="nav-link">(pm.)violinModel</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmviolin_ui" class="nav-link">(pm.)violin_ui</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmviolin_ui_midi" class="nav-link">(pm.)violin_ui_MIDI</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="2"><a href="#wind-instruments" class="nav-link">Wind Instruments</a>
|
|
<ul class="nav flex-column">
|
|
<li class="nav-item" data-level="3"><a href="#pmopentube" class="nav-link">(pm.)openTube</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmreedtable" class="nav-link">(pm.)reedTable</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmflutejettable" class="nav-link">(pm.)fluteJetTable</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmbrasslipstable" class="nav-link">(pm.)brassLipsTable</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmclarinetreed" class="nav-link">(pm.)clarinetReed</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmclarinetmouthpiece" class="nav-link">(pm.)clarinetMouthPiece</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmbrasslips" class="nav-link">(pm.)brassLips</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmfluteembouchure" class="nav-link">(pm.)fluteEmbouchure</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmwbell" class="nav-link">(pm.)wBell</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmflutehead" class="nav-link">(pm.)fluteHead</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmflutefoot" class="nav-link">(pm.)fluteFoot</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmclarinetmodel" class="nav-link">(pm.)clarinetModel</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmclarinetmodel_ui" class="nav-link">(pm.)clarinetModel_ui</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmclarinet_ui" class="nav-link">(pm.)clarinet_ui</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmclarinet_ui_midi" class="nav-link">(pm.)clarinet_ui_MIDI</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmbrassmodel" class="nav-link">(pm.)brassModel</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmbrassmodel_ui" class="nav-link">(pm.)brassModel_ui</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmbrass_ui" class="nav-link">(pm.)brass_ui</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmbrass_ui_midi" class="nav-link">(pm.)brass_ui_MIDI</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmflutemodel" class="nav-link">(pm.)fluteModel</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmflutemodel_ui" class="nav-link">(pm.)fluteModel_ui</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmflute_ui" class="nav-link">(pm.)flute_ui</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmflute_ui_midi" class="nav-link">(pm.)flute_ui_MIDI</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="2"><a href="#exciters" class="nav-link">Exciters</a>
|
|
<ul class="nav flex-column">
|
|
<li class="nav-item" data-level="3"><a href="#pmimpulseexcitation" class="nav-link">(pm.)impulseExcitation</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmstrikemodel" class="nav-link">(pm.)strikeModel</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmstrike" class="nav-link">(pm.)strike</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmpluckstring" class="nav-link">(pm.)pluckString</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmblower" class="nav-link">(pm.)blower</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmblower_ui" class="nav-link">(pm.)blower_ui</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="2"><a href="#modal-percussions" class="nav-link">Modal Percussions</a>
|
|
<ul class="nav flex-column">
|
|
<li class="nav-item" data-level="3"><a href="#pmdjembemodel" class="nav-link">(pm.)djembeModel</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmdjembe" class="nav-link">(pm.)djembe</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmdjembe_ui_midi" class="nav-link">(pm.)djembe_ui_MIDI</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmmarimbabarmodel" class="nav-link">(pm.)marimbaBarModel</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmmarimbarestube" class="nav-link">(pm.)marimbaResTube</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmmarimbamodel" class="nav-link">(pm.)marimbaModel</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmmarimba" class="nav-link">(pm.)marimba</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmmarimba_ui_midi" class="nav-link">(pm.)marimba_ui_MIDI</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmchurchbellmodel" class="nav-link">(pm.)churchBellModel</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmchurchbell" class="nav-link">(pm.)churchBell</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmchurchbell_ui" class="nav-link">(pm.)churchBell_ui</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmenglishbellmodel" class="nav-link">(pm.)englishBellModel</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmenglishbell" class="nav-link">(pm.)englishBell</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmenglishbell_ui" class="nav-link">(pm.)englishBell_ui</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmfrenchbellmodel" class="nav-link">(pm.)frenchBellModel</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmfrenchbell" class="nav-link">(pm.)frenchBell</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmfrenchbell_ui" class="nav-link">(pm.)frenchBell_ui</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmgermanbellmodel" class="nav-link">(pm.)germanBellModel</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmgermanbell" class="nav-link">(pm.)germanBell</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmgermanbell_ui" class="nav-link">(pm.)germanBell_ui</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmrussianbellmodel" class="nav-link">(pm.)russianBellModel</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmrussianbell" class="nav-link">(pm.)russianBell</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmrussianbell_ui" class="nav-link">(pm.)russianBell_ui</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmstandardbellmodel" class="nav-link">(pm.)standardBellModel</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmstandardbell" class="nav-link">(pm.)standardBell</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmstandardbell_ui" class="nav-link">(pm.)standardBell_ui</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="2"><a href="#vocal-synthesis" class="nav-link">Vocal Synthesis</a>
|
|
<ul class="nav flex-column">
|
|
<li class="nav-item" data-level="3"><a href="#pmformantvalues" class="nav-link">(pm.)formantValues</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmvoicegender" class="nav-link">(pm.)voiceGender</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmskirtwidthmultiplier" class="nav-link">(pm.)skirtWidthMultiplier</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmautobendfreq" class="nav-link">(pm.)autobendFreq</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmvocaleffort" class="nav-link">(pm.)vocalEffort</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmfof" class="nav-link">(pm.)fof</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmfofsh" class="nav-link">(pm.)fofSH</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmfofcycle" class="nav-link">(pm.)fofCycle</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmfofsmooth" class="nav-link">(pm.)fofSmooth</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmformantfilterfofcycle" class="nav-link">(pm.)formantFilterFofCycle</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmformantfilterfofsmooth" class="nav-link">(pm.)formantFilterFofSmooth</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmformantfilterbp" class="nav-link">(pm.)formantFilterBP</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmformantfilterbank" class="nav-link">(pm.)formantFilterbank</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmformantfilterbankfofcycle" class="nav-link">(pm.)formantFilterbankFofCycle</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmformantfilterbankfofsmooth" class="nav-link">(pm.)formantFilterbankFofSmooth</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmformantfilterbankbp" class="nav-link">(pm.)formantFilterbankBP</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmsfformantmodel" class="nav-link">(pm.)SFFormantModel</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmsfformantmodelfofcycle" class="nav-link">(pm.)SFFormantModelFofCycle</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmsfformantmodelfofsmooth" class="nav-link">(pm.)SFFormantModelFofSmooth</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmsfformantmodelbp" class="nav-link">(pm.)SFFormantModelBP</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmsfformantmodelfofcycle_ui" class="nav-link">(pm.)SFFormantModelFofCycle_ui</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmsfformantmodelfofsmooth_ui" class="nav-link">(pm.)SFFormantModelFofSmooth_ui</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmsfformantmodelbp_ui" class="nav-link">(pm.)SFFormantModelBP_ui</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmsfformantmodelfofcycle_ui_midi" class="nav-link">(pm.)SFFormantModelFofCycle_ui_MIDI</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmsfformantmodelfofsmooth_ui_midi" class="nav-link">(pm.)SFFormantModelFofSmooth_ui_MIDI</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmsfformantmodelbp_ui_midi" class="nav-link">(pm.)SFFormantModelBP_ui_MIDI</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="2"><a href="#misc-functions" class="nav-link">Misc Functions</a>
|
|
<ul class="nav flex-column">
|
|
<li class="nav-item" data-level="3"><a href="#pmallpassnl" class="nav-link">(pm.)allpassNL</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmmodalmodel" class="nav-link">(pm.)modalModel</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item" data-level="3"><a href="#pmrk_solve" class="nav-link">(pm.)rk_solve</a>
|
|
<ul class="nav flex-column">
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div></div>
|
|
<div class="col-md-9 main-container" role="main">
|
|
|
|
<h1 id="physmodelslib">physmodels.lib</h1>
|
|
<p>Faust physical modeling library. Its official prefix is <code>pm</code>.</p>
|
|
<p>This library provides an environment to facilitate physical modeling of musical
|
|
instruments. It includes waveguide, mass-spring, and digital wave
|
|
models for strings, membranes, bars, and resonant systems used in physical modeling
|
|
synthesis and acoustic simulation research. 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.</p>
|
|
<p>It is organized as follows:</p>
|
|
<ul>
|
|
<li><a href="#global-variables">Global Variables</a>: useful pre-defined variables for
|
|
physical modeling (e.g., speed of sound, etc.).</li>
|
|
<li><a href="#conversion-tools-1">Conversion Tools</a>: conversion functions specific
|
|
to physical modeling (e.g., length to frequency, etc.).</li>
|
|
<li><a href="#bidirectional-utilities">Bidirectional Utilities</a>: functions to create
|
|
bidirectional block diagrams for physical modeling.</li>
|
|
<li><a href="#basic-elements-1">Basic Elements</a>: waveguides, specific types of filters, etc.</li>
|
|
<li><a href="#string-instruments">String Instruments</a>: various types of strings
|
|
(e.g., steel, nylon, etc.), bridges, guitars, etc.</li>
|
|
<li><a href="#bowed-string-instruments">Bowed String Instruments</a>: parts and models
|
|
specific to bowed string instruments (e.g., bows, bridges, violins, etc.).</li>
|
|
<li><a href="#wind-instruments">Wind Instrument</a>: parts and models specific to wind
|
|
instruments (e.g., reeds, mouthpieces, flutes, clarinets, etc.).</li>
|
|
<li><a href="#exciters">Exciters</a>: pluck generators, "blowers", etc.</li>
|
|
<li><a href="#modal-percussions">Modal Percussions</a>: percussion instruments based on
|
|
modal models.</li>
|
|
<li><a href="#vocal-synthesis">Vocal Synthesis</a>: functions for various vocal synthesis
|
|
techniques (e.g., fof, source/filter, etc.) and vocal synthesizers.</li>
|
|
<li><a href="#misc-functions">Misc Functions</a>: any other functions that don't fit in
|
|
the previous category (e.g., nonlinear filters, etc.).</li>
|
|
</ul>
|
|
<p>This library is part of the Faust Physical Modeling ToolKit.
|
|
More information on how to use this library can be found on this <a href="https://ccrma.stanford.edu/~rmichon/pmFaust">page</a> or this <a href="https://faust.grame.fr/community/events/#introduction-to-the-faust-physical-modeling-toolkit-romain-michon">video</a>. Tutorials on how to make
|
|
physical models of musical instruments using Faust can be found
|
|
<a href="https://ccrma.stanford.edu/~rmichon/faustTutorials/#making-physical-models-of-musical-instruments-with-faust">here</a> as well.</p>
|
|
<h4 id="references">References</h4>
|
|
<ul>
|
|
<li><a href="https://github.com/grame-cncm/faustlibraries/blob/master/physmodels.lib">https://github.com/grame-cncm/faustlibraries/blob/master/physmodels.lib</a></li>
|
|
</ul>
|
|
<h2 id="global-variables">Global Variables</h2>
|
|
<p>Useful pre-defined variables for physical modeling.</p>
|
|
<hr />
|
|
<h3 id="pmspeedofsound"><code>(pm.)speedOfSound</code></h3>
|
|
<p>Speed of sound in meters per second (340m/s).</p>
|
|
<hr />
|
|
<h3 id="pmmaxlength"><code>(pm.)maxLength</code></h3>
|
|
<p>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.</p>
|
|
<h2 id="conversion-tools">Conversion Tools</h2>
|
|
<p>Useful conversion tools for physical modeling.</p>
|
|
<hr />
|
|
<h3 id="pmf2l"><code>(pm.)f2l</code></h3>
|
|
<p>Frequency to length in meters.</p>
|
|
<h4 id="usage">Usage</h4>
|
|
<pre><code>f2l(freq) : distanceInMeters
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>freq</code>: the frequency</li>
|
|
</ul>
|
|
<h4 id="test">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
f2l_test = pm.f2l(440);
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pml2f"><code>(pm.)l2f</code></h3>
|
|
<p>Length in meters to frequency.</p>
|
|
<h4 id="usage_1">Usage</h4>
|
|
<pre><code>l2f(length) : freq
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>length</code>: length/distance in meters</li>
|
|
</ul>
|
|
<h4 id="test_1">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
l2f_test = pm.l2f(0.75);
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pml2s"><code>(pm.)l2s</code></h3>
|
|
<p>Length in meters to number of samples.</p>
|
|
<h4 id="usage_2">Usage</h4>
|
|
<pre><code>l2s(l) : numberOfSamples
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>l</code>: length in meters</li>
|
|
</ul>
|
|
<h4 id="test_2">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
l2s_test = pm.l2s(1.2);
|
|
</code></pre>
|
|
<h2 id="bidirectional-utilities">Bidirectional Utilities</h2>
|
|
<p>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.</p>
|
|
<hr />
|
|
<h3 id="pmbasicblock"><code>(pm.)basicBlock</code></h3>
|
|
<p>Empty bidirectional block to be used with <a href="#chain"><code>chain</code></a>: 3 signals ins
|
|
and 3 signals out.</p>
|
|
<h4 id="usage_3">Usage</h4>
|
|
<pre><code>chain(basicBlock : basicBlock : etc.)
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>basicBlock</code>: any bidirectional block with 3 inputs and 3 outputs</li>
|
|
</ul>
|
|
<h4 id="test_3">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
basicBlock_test = 0.25, -0.15, 0.05 : pm.basicBlock;
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmchain"><code>(pm.)chain</code></h3>
|
|
<p>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 <code>~</code> operator is
|
|
generalized to the left and right going waves. Thus, <code>n</code> blocks in <code>chain()</code>
|
|
will add an <code>n</code> samples delay to both left and right going waves.</p>
|
|
<h4 id="usage_4">Usage</h4>
|
|
<pre><code>leftGoingWaves,rightGoingWaves,mixedOutput : chain( A : B ) : leftGoingWaves,rightGoingWaves,mixedOutput
|
|
with {
|
|
A = _,_,_;
|
|
B = _,_,_;
|
|
};
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>A</code>: first bidirectional block in the chain</li>
|
|
<li><code>B</code>: next bidirectional block in the chain</li>
|
|
</ul>
|
|
<h4 id="test_4">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
chain_test = 0.25, -0.15, 0.05 : pm.chain(pm.basicBlock);
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pminleftwave"><code>(pm.)inLeftWave</code></h3>
|
|
<p>Adds a signal to left going waves anywhere in a <a href="#chain"><code>chain</code></a> of blocks.</p>
|
|
<h4 id="usage_5">Usage</h4>
|
|
<pre><code>model(x) = chain(A : inLeftWave(x) : B)
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>A</code>: preceding bidirectional block</li>
|
|
<li><code>x</code>: signal added to the left-going wave</li>
|
|
<li><code>B</code>: following bidirectional block</li>
|
|
</ul>
|
|
<h4 id="test_5">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
inLeftWave_test = 0, 0, 0 : pm.inLeftWave(0.25);
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pminrightwave"><code>(pm.)inRightWave</code></h3>
|
|
<p>Adds a signal to right going waves anywhere in a <a href="#chain"><code>chain</code></a> of blocks.</p>
|
|
<h4 id="usage_6">Usage</h4>
|
|
<pre><code>model(x) = chain(A : inRightWave(x) : B)
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>A</code>: preceding bidirectional block</li>
|
|
<li><code>x</code>: signal added to the right-going wave</li>
|
|
<li><code>B</code>: following bidirectional block</li>
|
|
</ul>
|
|
<h4 id="test_6">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
inRightWave_test = 0, 0, 0 : pm.inRightWave(0.25);
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmin"><code>(pm.)in</code></h3>
|
|
<p>Adds a signal to left and right going waves anywhere in a <a href="#chain"><code>chain</code></a>
|
|
of blocks.</p>
|
|
<h4 id="usage_7">Usage</h4>
|
|
<pre><code>model(x) = chain(A : in(x) : B)
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>A</code>: preceding bidirectional block</li>
|
|
<li><code>x</code>: signal added to both left- and right-going waves</li>
|
|
<li><code>B</code>: following bidirectional block</li>
|
|
</ul>
|
|
<h4 id="test_7">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
in_test = 0, 0, 0 : pm.in(0.25);
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmoutleftwave"><code>(pm.)outLeftWave</code></h3>
|
|
<p>Sends the signal of left going waves to the output channel of the <a href="#chain"><code>chain</code></a>.</p>
|
|
<h4 id="usage_8">Usage</h4>
|
|
<pre><code>chain(A : outLeftWave : B)
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>A</code>: preceding bidirectional block</li>
|
|
<li><code>B</code>: following bidirectional block</li>
|
|
</ul>
|
|
<h4 id="test_8">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
outLeftWave_test = pm.outLeftWave(0.1, 0.2, 0.3);
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmoutrightwave"><code>(pm.)outRightWave</code></h3>
|
|
<p>Sends the signal of right going waves to the output channel of the <a href="#chain"><code>chain</code></a>.</p>
|
|
<h4 id="usage_9">Usage</h4>
|
|
<pre><code>chain(A : outRightWave : B)
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>A</code>: preceding bidirectional block</li>
|
|
<li><code>B</code>: following bidirectional block</li>
|
|
</ul>
|
|
<h4 id="test_9">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
outRightWave_test = pm.outRightWave(0.1, 0.2, 0.3);
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmout"><code>(pm.)out</code></h3>
|
|
<p>Sends the signal of right and left going waves to the output channel of the
|
|
<a href="#chain"><code>chain</code></a>.</p>
|
|
<h4 id="usage_10">Usage</h4>
|
|
<pre><code>chain(A : out : B)
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>A</code>: preceding bidirectional block</li>
|
|
<li><code>B</code>: following bidirectional block</li>
|
|
</ul>
|
|
<h4 id="test_10">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
out_test = pm.out(0.1, 0.2, 0.3);
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmterminations"><code>(pm.)terminations</code></h3>
|
|
<p>Creates terminations on both sides of a <a href="#chain"><code>chain</code></a> without closing
|
|
the inputs and outputs of the bidirectional signals chain. As for
|
|
<a href="#chain"><code>chain</code></a>, this function adds a 1 sample delay to the bidirectional
|
|
signal, both ways. Of course, this function can be nested within a
|
|
<a href="#chain"><code>chain</code></a>.</p>
|
|
<h4 id="usage_11">Usage</h4>
|
|
<pre><code>terminations(a,b,c)
|
|
with {
|
|
a = *(-1); // left termination
|
|
b = chain(D : E : F); // bidirectional chain of blocks (D, E, F, etc.)
|
|
c = *(-1); // right termination
|
|
};
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>a</code>: left termination filter</li>
|
|
<li><code>b</code>: bidirectional chain to terminate</li>
|
|
<li><code>c</code>: right termination filter</li>
|
|
</ul>
|
|
<h4 id="test_11">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
terminations_test = 0.25, -0.15, 0.05 : pm.terminations(*(-1), pm.basicBlock, *(-1));
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmltermination"><code>(pm.)lTermination</code></h3>
|
|
<p>Creates a termination on the left side of a <a href="#chain"><code>chain</code></a> 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 <a href="#chain"><code>chain</code></a>.</p>
|
|
<h4 id="usage_12">Usage</h4>
|
|
<pre><code>lTermination(a,b)
|
|
with {
|
|
a = *(-1); // left termination
|
|
b = chain(D : E : F); // bidirectional chain of blocks (D, E, F, etc.)
|
|
};
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>a</code>: left termination filter</li>
|
|
<li><code>b</code>: bidirectional chain to terminate</li>
|
|
</ul>
|
|
<h4 id="test_12">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
lTermination_test = 0.25, -0.15, 0.05 : pm.lTermination(*(-1), pm.basicBlock);
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmrtermination"><code>(pm.)rTermination</code></h3>
|
|
<p>Creates a termination on the right side of a <a href="#chain"><code>chain</code></a> 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 <a href="#chain"><code>chain</code></a>.</p>
|
|
<h4 id="usage_13">Usage</h4>
|
|
<pre><code>rTermination(b,c)
|
|
with {
|
|
b = chain(D : E : F); // bidirectional chain of blocks (D, E, F, etc.)
|
|
c = *(-1); // right termination
|
|
};
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>b</code>: bidirectional chain to terminate</li>
|
|
<li><code>c</code>: right termination filter</li>
|
|
</ul>
|
|
<h4 id="test_13">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
rTermination_test = 0.25, -0.15, 0.05 : pm.rTermination(pm.basicBlock, *(-1));
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmcloseins"><code>(pm.)closeIns</code></h3>
|
|
<p>Closes the inputs of a bidirectional chain in all directions.</p>
|
|
<h4 id="usage_14">Usage</h4>
|
|
<pre><code>closeIns : _,_,_
|
|
</code></pre>
|
|
<p>Typical use: <code>closeIns : chain(...) : _,_,_</code></p>
|
|
<h4 id="test_14">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
closeIns_test = pm.closeIns, 0.25;
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmcloseouts"><code>(pm.)closeOuts</code></h3>
|
|
<p>Closes the outputs of a bidirectional chain in all directions except for the
|
|
main signal output (3d output).</p>
|
|
<h4 id="usage_15">Usage</h4>
|
|
<pre><code>_,_,_ : chain(...) : _
|
|
</code></pre>
|
|
<h4 id="test_15">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
closeOuts_test = ((0.25, -0.15, 0.05) : pm.closeOuts), 0.25;
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmendchain"><code>(pm.)endChain</code></h3>
|
|
<p>Closes the inputs and outputs of a bidirectional chain in all directions
|
|
except for the main signal output (3d output).</p>
|
|
<h4 id="usage_16">Usage</h4>
|
|
<pre><code>endChain(chain(...)) : _
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>b</code>: bidirectional chain to close on all non-audio ports</li>
|
|
</ul>
|
|
<h4 id="test_16">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
endChain_test = pm.endChain((_, _, _ + 0.25));
|
|
</code></pre>
|
|
<h2 id="basic-elements">Basic Elements</h2>
|
|
<p>Basic elements for physical modeling (e.g., waveguides, specific filters,
|
|
etc.).</p>
|
|
<hr />
|
|
<h3 id="pmwaveguiden"><code>(pm.)waveguideN</code></h3>
|
|
<p>A series of waveguide functions based on various types of delays (see
|
|
<a href="#fdelayn"><code>fdelay[n]</code></a>).</p>
|
|
<h4 id="list-of-functions">List of functions</h4>
|
|
<ul>
|
|
<li><code>waveguideUd</code>: unit delay waveguide</li>
|
|
<li><code>waveguideFd</code>: fractional delay waveguide</li>
|
|
<li><code>waveguideFd2</code>: second order fractional delay waveguide</li>
|
|
<li><code>waveguideFd4</code>: fourth order fractional delay waveguide</li>
|
|
</ul>
|
|
<h4 id="usage_17">Usage</h4>
|
|
<pre><code>chain(A : waveguideUd(nMax,n) : B)
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>nMax</code>: the maximum length of the delays in the waveguide</li>
|
|
<li><code>n</code>: the length of the delay lines in samples.</li>
|
|
</ul>
|
|
<h4 id="test_17">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
waveguideUd_test = 0.25, -0.15, 0.05 : pm.waveguideUd(512, 32);
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmwaveguide"><code>(pm.)waveguide</code></h3>
|
|
<p>Standard <code>pm.lib</code> waveguide (based on <a href="#waveguiden"><code>waveguideFd4</code></a>).</p>
|
|
<h4 id="usage_18">Usage</h4>
|
|
<pre><code>chain(A : waveguide(nMax,n) : B)
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>nMax</code>: the maximum length of the delays in the waveguide</li>
|
|
<li><code>n</code>: the length of the delay lines in samples.</li>
|
|
</ul>
|
|
<h4 id="test_18">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
waveguide_test = 0.25, -0.15, 0.05 : pm.waveguide(512, 32);
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmbridgefilter"><code>(pm.)bridgeFilter</code></h3>
|
|
<p>Generic two zeros bridge FIR filter (as implemented in the
|
|
<a href="https://ccrma.stanford.edu/software/stk/">STK</a>) that can be used to
|
|
implement the reflectance violin, guitar, etc. bridges.</p>
|
|
<h4 id="usage_19">Usage</h4>
|
|
<pre><code>_ : bridgeFilter(brightness,absorption) : _
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>brightness</code>: controls the damping of high frequencies (0-1)</li>
|
|
<li><code>absorption</code>: controls the absorption of the brige and thus the t60 of
|
|
the string connected to it (0-1) (1 = 20 seconds)</li>
|
|
</ul>
|
|
<h4 id="test_19">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
os = library("oscillators.lib");
|
|
bridgeFilter_test = os.osc(110) : pm.bridgeFilter(0.6, 0.4);
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmmodefilter"><code>(pm.)modeFilter</code></h3>
|
|
<p>Resonant bandpass filter that can be used to implement a single resonance
|
|
(mode).</p>
|
|
<h4 id="usage_20">Usage</h4>
|
|
<pre><code>_ : modeFilter(freq,t60,gain) : _
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>freq</code>: mode frequency</li>
|
|
<li><code>t60</code>: mode resonance duration (in seconds)</li>
|
|
<li><code>gain</code>: mode gain (0-1)</li>
|
|
</ul>
|
|
<h4 id="test_20">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
os = library("oscillators.lib");
|
|
modeFilter_test = os.osc(110) : pm.modeFilter(440, 1.5, 0.8);
|
|
</code></pre>
|
|
<h2 id="string-instruments">String Instruments</h2>
|
|
<p>Low and high level string instruments parts. Most of the elements in
|
|
this section can be used in a bidirectional chain.</p>
|
|
<hr />
|
|
<h3 id="pmstringsegment"><code>(pm.)stringSegment</code></h3>
|
|
<p>A string segment without terminations (just a simple waveguide).</p>
|
|
<h4 id="usage_21">Usage</h4>
|
|
<pre><code>chain(A : stringSegment(maxLength,length) : B)
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>maxLength</code>: the maximum length of the string in meters (should be static)</li>
|
|
<li><code>length</code>: the length of the string in meters</li>
|
|
</ul>
|
|
<h4 id="test_21">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
stringSegment_test = 0.25, -0.15, 0.05 : pm.stringSegment(1.0, 0.5);
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmopenstring"><code>(pm.)openString</code></h3>
|
|
<p>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.</p>
|
|
<h4 id="usage_22">Usage</h4>
|
|
<pre><code>chain(... : openString(length,stiffness,pluckPosition,excitation) : ...)
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>length</code>: the length of the string in meters</li>
|
|
<li><code>stiffness</code>: the stiffness of the string (0-1) (1 for max stiffness)</li>
|
|
<li><code>pluckPosition</code>: excitation position (0-1) (1 is bottom)</li>
|
|
<li><code>excitation</code>: the excitation signal</li>
|
|
</ul>
|
|
<h4 id="test_22">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
ba = library("basics.lib");
|
|
openString_test = 0.25, -0.15, 0.05 : pm.openString(0.8, 0.5, 0.2, pm.impulseExcitation(ba.pulse(64)));
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmnylonstring"><code>(pm.)nylonString</code></h3>
|
|
<p>A bidirectional block implementing a basic nylon string with selectable
|
|
excitation position. This element is based on <a href="#openstring"><code>openString</code></a>
|
|
and has a fix stiffness corresponding to that of a nylon string.</p>
|
|
<h4 id="usage_23">Usage</h4>
|
|
<pre><code>chain(... : nylonString(length,pluckPosition,excitation) : ...)
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>length</code>: the length of the string in meters</li>
|
|
<li><code>pluckPosition</code>: excitation position (0-1) (1 is bottom)</li>
|
|
<li><code>excitation</code>: the excitation signal</li>
|
|
</ul>
|
|
<h4 id="test_23">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
ba = library("basics.lib");
|
|
nylonString_test = 0.25, -0.15, 0.05 : pm.nylonString(0.8, 0.3, pm.impulseExcitation(ba.pulse(64)));
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmsteelstring"><code>(pm.)steelString</code></h3>
|
|
<p>A bidirectional block implementing a basic steel string with selectable
|
|
excitation position. This element is based on <a href="#openstring"><code>openString</code></a>
|
|
and has a fix stiffness corresponding to that of a steel string.</p>
|
|
<h4 id="usage_24">Usage</h4>
|
|
<pre><code>chain(... : steelString(length,pluckPosition,excitation) : ...)
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>length</code>: the length of the string in meters</li>
|
|
<li><code>pluckPosition</code>: excitation position (0-1) (1 is bottom)</li>
|
|
<li><code>excitation</code>: the excitation signal</li>
|
|
</ul>
|
|
<h4 id="test_24">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
ba = library("basics.lib");
|
|
steelString_test = 0.25, -0.15, 0.05 : pm.steelString(0.8, 0.3, pm.impulseExcitation(ba.pulse(64)));
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmopenstringpick"><code>(pm.)openStringPick</code></h3>
|
|
<p>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.</p>
|
|
<h4 id="usage_25">Usage</h4>
|
|
<pre><code>chain(... : openStringPick(length,stiffness,pluckPosition,excitation) : ...)
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>length</code>: the length of the string in meters</li>
|
|
<li><code>stiffness</code>: the stiffness of the string (0-1) (1 for max stiffness)</li>
|
|
<li><code>pluckPosition</code>: excitation position (0-1) (1 is bottom)</li>
|
|
<li><code>excitation</code>: the excitation signal</li>
|
|
</ul>
|
|
<h4 id="test_25">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
openStringPick_test = pm.endChain(pm.openStringPick(0.8, 0.4, 0.3, pm.impulseExcitation(button("pm.openStringPick/gate"))));
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmopenstringpickup"><code>(pm.)openStringPickUp</code></h3>
|
|
<p>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.</p>
|
|
<h4 id="usage_26">Usage</h4>
|
|
<pre><code>chain(... : openStringPickUp(length,stiffness,pluckPosition,pickupPosition,excitation) : ...)
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>length</code>: the length of the string in meters</li>
|
|
<li><code>stiffness</code>: the stiffness of the string (0-1) (1 for max stiffness)</li>
|
|
<li><code>pluckPosition</code>: pluck position between the top of the string and the
|
|
pickup (0-1) (1 for same as pickup position)</li>
|
|
<li><code>pickupPosition</code>: position of the pickup on the string (0-1) (1 is bottom)</li>
|
|
<li><code>excitation</code>: the excitation signal</li>
|
|
</ul>
|
|
<h4 id="test_26">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
openStringPickUp_test = pm.endChain(pm.openStringPickUp(0.8, 0.4, 0.6, 0.7, pm.impulseExcitation(button("pm.openStringPickUp/gate"))));
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmopenstringpickdown"><code>(pm.)openStringPickDown</code></h3>
|
|
<p>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.</p>
|
|
<h4 id="usage_27">Usage</h4>
|
|
<pre><code>chain(... : openStringPickDown(length,stiffness,pluckPosition,pickupPosition,excitation) : ...)
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>length</code>: the length of the string in meters</li>
|
|
<li><code>stiffness</code>: the stiffness of the string (0-1) (1 for max stiffness)</li>
|
|
<li><code>pluckPosition</code>: pluck position on the string (0-1) (1 is bottom)</li>
|
|
<li><code>pickupPosition</code>: position of the pickup between the top of the string
|
|
and the excitation position (0-1) (1 is excitation position)</li>
|
|
<li><code>excitation</code>: the excitation signal</li>
|
|
</ul>
|
|
<h4 id="test_27">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
openStringPickDown_test = pm.endChain(pm.openStringPickDown(0.8, 0.4, 0.6, 0.5, pm.impulseExcitation(button("pm.openStringPickDown/gate"))));
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmksreflexionfilter"><code>(pm.)ksReflexionFilter</code></h3>
|
|
<p>The "typical" one-zero Karplus-strong feedforward reflexion filter. This
|
|
filter will be typically used in a termination (see below).</p>
|
|
<h4 id="usage_28">Usage</h4>
|
|
<pre><code>_ : ksReflexionFilter : _
|
|
</code></pre>
|
|
<p>Typical use: <code>terminations(_,chain(...),ksReflexionFilter)</code></p>
|
|
<h4 id="test_28">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
os = library("oscillators.lib");
|
|
ksReflexionFilter_test = os.osc(220) : pm.ksReflexionFilter;
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmrstringrigidtermination"><code>(pm.)rStringRigidTermination</code></h3>
|
|
<p>Bidirectional block implementing a right rigid string termination (no damping,
|
|
just phase inversion).</p>
|
|
<h4 id="usage_29">Usage</h4>
|
|
<pre><code>_,_,_ : rStringRigidTermination
|
|
</code></pre>
|
|
<p>Typical use: <code>chain(rStringRigidTermination : stringSegment : ...)</code></p>
|
|
<h4 id="test_29">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
rStringRigidTermination_test = 0.25, -0.15, 0.05 : pm.rStringRigidTermination;
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmlstringrigidtermination"><code>(pm.)lStringRigidTermination</code></h3>
|
|
<p>Bidirectional block implementing a left rigid string termination (no damping,
|
|
just phase inversion).</p>
|
|
<h4 id="usage_30">Usage</h4>
|
|
<pre><code>_,_,_ : lStringRigidTermination
|
|
</code></pre>
|
|
<p>Typical use: <code>chain(... : stringSegment : lStringRigidTermination)</code></p>
|
|
<h4 id="test_30">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
lStringRigidTermination_test = 0.25, -0.15, 0.05 : pm.lStringRigidTermination;
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmelecguitarbridge"><code>(pm.)elecGuitarBridge</code></h3>
|
|
<p>Bidirectional block implementing a simple electric guitar bridge. This
|
|
block is based on <a href="#bridgeFilter"><code>bridgeFilter</code></a>. 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.</p>
|
|
<h4 id="usage_31">Usage</h4>
|
|
<pre><code>_,_,_ : elecGuitarBridge
|
|
</code></pre>
|
|
<p>Typical use: <code>chain(... : stringSegment : elecGuitarBridge)</code></p>
|
|
<h4 id="test_31">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
elecGuitarBridge_test = 0.25, -0.15, 0.05 : pm.elecGuitarBridge;
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmelecguitarnuts"><code>(pm.)elecGuitarNuts</code></h3>
|
|
<p>Bidirectional block implementing a simple electric guitar nuts. This
|
|
block is based on <a href="#bridgeFilter"><code>bridgeFilter</code></a> and does essentially
|
|
the same thing as <a href="#elecguitarbridge"><code>elecGuitarBridge</code></a>, 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.</p>
|
|
<h4 id="usage_32">Usage</h4>
|
|
<pre><code>_,_,_ : elecGuitarNuts
|
|
</code></pre>
|
|
<p>Typical use: <code>chain(elecGuitarNuts : stringSegment : ...)</code></p>
|
|
<h4 id="test_32">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
elecGuitarNuts_test = 0.25, -0.15, 0.05 : pm.elecGuitarNuts;
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmguitarbridge"><code>(pm.)guitarBridge</code></h3>
|
|
<p>Bidirectional block implementing a simple acoustic guitar bridge. This
|
|
bridge damps more hight frequencies than
|
|
<a href="#elecguitarbridge"><code>elecGuitarBridge</code></a> and implements a transmittance
|
|
filter. It also partially sets the resonance duration of the string with
|
|
the nuts used on the other side.</p>
|
|
<h4 id="usage_33">Usage</h4>
|
|
<pre><code>_,_,_ : guitarBridge
|
|
</code></pre>
|
|
<p>Typical use: <code>chain(... : stringSegment : guitarBridge)</code></p>
|
|
<h4 id="test_33">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
guitarBridge_test = 0.25, -0.15, 0.05 : pm.guitarBridge;
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmguitarnuts"><code>(pm.)guitarNuts</code></h3>
|
|
<p>Bidirectional block implementing a simple acoustic guitar nuts. This
|
|
nuts damps more hight frequencies than
|
|
<a href="#elecguitarnuts"><code>elecGuitarNuts</code></a> and implements a transmittance
|
|
filter. It also partially sets the resonance duration of the string with
|
|
the bridge used on the other side.</p>
|
|
<h4 id="usage_34">Usage</h4>
|
|
<pre><code>chain(guitarNuts : stringSegment : ...)
|
|
</code></pre>
|
|
<h4 id="test_34">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
guitarNuts_test = 0.25, -0.15, 0.05 : pm.guitarNuts;
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmidealstring"><code>(pm.)idealString</code></h3>
|
|
<p>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.</p>
|
|
<h4 id="usage_35">Usage</h4>
|
|
<pre><code>_ : idealString(length,pluckPosition,excitation) : _
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>length</code>: the length of the string in meters</li>
|
|
<li><code>pluckPosition</code>: the plucking position (0.001-0.999)</li>
|
|
<li><code>excitation</code>: the excitation signal</li>
|
|
</ul>
|
|
<h4 id="test_35">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
idealString_test = pm.closeIns : pm.idealString(0.9, 0.2, pm.impulseExcitation(button("pm.idealString/gate")));
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmks"><code>(pm.)ks</code></h3>
|
|
<p>A Karplus-Strong string (in that case, the string is implemented as a
|
|
one dimension waveguide).</p>
|
|
<h4 id="usage_36">Usage</h4>
|
|
<pre><code>ks(length,damping,excitation) : _
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>length</code>: the length of the string in meters</li>
|
|
<li><code>damping</code>: string damping (0-1)</li>
|
|
<li><code>excitation</code>: excitation signal</li>
|
|
</ul>
|
|
<h4 id="test_36">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
ks_test = pm.ks(0.9, 0.3, pm.impulseExcitation(button("pm.ks/gate")));
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmks_ui_midi"><code>(pm.)ks_ui_MIDI</code></h3>
|
|
<p>Ready-to-use, MIDI-enabled Karplus-Strong string with buil-in UI.</p>
|
|
<h4 id="usage_37">Usage</h4>
|
|
<pre><code>ks_ui_MIDI : _
|
|
</code></pre>
|
|
<h4 id="test_37">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
ks_ui_MIDI_test = pm.ks_ui_MIDI;
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmelecguitarmodel"><code>(pm.)elecGuitarModel</code></h3>
|
|
<p>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.</p>
|
|
<h4 id="usage_38">Usage</h4>
|
|
<pre><code>elecGuitarModel(length,pluckPosition,mute,excitation) : _
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>length</code>: the length of the string in meters</li>
|
|
<li><code>pluckPosition</code>: pluck position (0-1) (1 is on the bridge)</li>
|
|
<li><code>mute</code>: mute coefficient (1 for no mute and 0 for instant mute)</li>
|
|
<li><code>excitation</code>: excitation signal</li>
|
|
</ul>
|
|
<h4 id="test_38">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
elecGuitarModel_test = pm.elecGuitarModel(0.9, 0.3, 0.8, pm.impulseExcitation(button("pm.elecGuitarModel/gate")));
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmelecguitar"><code>(pm.)elecGuitar</code></h3>
|
|
<p>A simple electric guitar model with steel strings (based on
|
|
<a href="#elecguitarmodel"><code>elecGuitarModel</code></a>) implementing an excitation
|
|
model.
|
|
This model implements a single string. Additional strings should be created
|
|
by making a polyphonic application out of this function.</p>
|
|
<h4 id="usage_39">Usage</h4>
|
|
<pre><code>elecGuitar(length,pluckPosition,mute,gain,trigger) : _
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>length</code>: the length of the string in meters</li>
|
|
<li><code>pluckPosition</code>: pluck position (0-1) (1 is on the bridge)</li>
|
|
<li><code>mute</code>: mute coefficient (1 for no mute and 0 for instant mute)</li>
|
|
<li><code>gain</code>: gain of the pluck (0-1)</li>
|
|
<li><code>trigger</code>: trigger signal (1 for on, 0 for off)</li>
|
|
</ul>
|
|
<h4 id="test_39">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
elecGuitar_test = pm.elecGuitar(0.9, 0.3, 0.8, 0.6, button("pm.elecGuitar/gate"));
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmelecguitar_ui_midi"><code>(pm.)elecGuitar_ui_MIDI</code></h3>
|
|
<p>Ready-to-use MIDI-enabled electric guitar physical model with built-in UI.</p>
|
|
<h4 id="usage_40">Usage</h4>
|
|
<pre><code>elecGuitar_ui_MIDI : _
|
|
</code></pre>
|
|
<h4 id="test_40">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
elecGuitar_ui_MIDI_test = pm.elecGuitar_ui_MIDI;
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmguitarbody"><code>(pm.)guitarBody</code></h3>
|
|
<p>WARNING: not implemented yet!
|
|
Bidirectional block implementing a simple acoustic guitar body.</p>
|
|
<h4 id="usage_41">Usage</h4>
|
|
<pre><code>chain(... : guitarBody)
|
|
</code></pre>
|
|
<h4 id="test_41">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
guitarBody_test = 0.25, -0.15, 0.05 : pm.guitarBody;
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmguitarmodel"><code>(pm.)guitarModel</code></h3>
|
|
<p>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).</p>
|
|
<h4 id="usage_42">Usage</h4>
|
|
<pre><code>guitarModel(length,pluckPosition,excitation) : _
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>length</code>: the length of the string in meters</li>
|
|
<li><code>pluckPosition</code>: pluck position (0-1) (1 is on the bridge)</li>
|
|
<li><code>excitation</code>: excitation signal</li>
|
|
</ul>
|
|
<h4 id="test_42">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
guitarModel_test = pm.guitarModel(0.9, 0.25, pm.impulseExcitation(button("pm.guitarModel/gate")));
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmguitar"><code>(pm.)guitar</code></h3>
|
|
<p>A simple acoustic guitar model with steel strings (based on
|
|
<a href="#guitarmodel"><code>guitarModel</code></a>) implementing an excitation model.
|
|
This model implements a single string. Additional strings should be created
|
|
by making a polyphonic application out of this function.</p>
|
|
<h4 id="usage_43">Usage</h4>
|
|
<pre><code>guitar(length,pluckPosition,gain,trigger) : _
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>length</code>: the length of the string in meters</li>
|
|
<li><code>pluckPosition</code>: pluck position (0-1) (1 is on the bridge)</li>
|
|
<li><code>gain</code>: gain of the excitation</li>
|
|
<li><code>trigger</code>: trigger signal (1 for on, 0 for off)</li>
|
|
</ul>
|
|
<h4 id="test_43">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
guitar_test = pm.guitar(0.9, 0.25, 0.8, button("pm.guitar/gate"));
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmguitar_ui_midi"><code>(pm.)guitar_ui_MIDI</code></h3>
|
|
<p>Ready-to-use MIDI-enabled steel strings acoustic guitar physical model with
|
|
built-in UI.</p>
|
|
<h4 id="usage_44">Usage</h4>
|
|
<pre><code>guitar_ui_MIDI : _
|
|
</code></pre>
|
|
<h4 id="test_44">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
guitar_ui_MIDI_test = pm.guitar_ui_MIDI;
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmnylonguitarmodel"><code>(pm.)nylonGuitarModel</code></h3>
|
|
<p>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).</p>
|
|
<h4 id="usage_45">Usage</h4>
|
|
<pre><code>nylonGuitarModel(length,pluckPosition,excitation) : _
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>length</code>: the length of the string in meters</li>
|
|
<li><code>pluckPosition</code>: pluck position (0-1) (1 is on the bridge)</li>
|
|
<li><code>excitation</code>: excitation signal</li>
|
|
</ul>
|
|
<h4 id="test_45">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
nylonGuitarModel_test = pm.nylonGuitarModel(0.9, 0.25, pm.impulseExcitation(button("pm.nylonGuitarModel/gate")));
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmnylonguitar"><code>(pm.)nylonGuitar</code></h3>
|
|
<p>A simple acoustic guitar model with nylon strings (based on
|
|
<a href="#nylonguitarmodel"><code>nylonGuitarModel</code></a>) implementing an excitation model.
|
|
This model implements a single string. Additional strings should be created
|
|
by making a polyphonic application out of this function.</p>
|
|
<h4 id="usage_46">Usage</h4>
|
|
<pre><code>nylonGuitar(length,pluckPosition,gain,trigger) : _
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>length</code>: the length of the string in meters</li>
|
|
<li><code>pluckPosition</code>: pluck position (0-1) (1 is on the bridge)</li>
|
|
<li><code>gain</code>: gain of the excitation (0-1)</li>
|
|
<li><code>trigger</code>: trigger signal (1 for on, 0 for off)</li>
|
|
</ul>
|
|
<h4 id="test_46">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
nylonGuitar_test = pm.nylonGuitar(0.9, 0.25, 0.8, button("pm.nylonGuitar/gate"));
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmnylonguitar_ui_midi"><code>(pm.)nylonGuitar_ui_MIDI</code></h3>
|
|
<p>Ready-to-use MIDI-enabled nylon strings acoustic guitar physical model with
|
|
built-in UI.</p>
|
|
<h4 id="usage_47">Usage</h4>
|
|
<pre><code>nylonGuitar_ui_MIDI : _
|
|
</code></pre>
|
|
<h4 id="test_47">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
nylonGuitar_ui_MIDI_test = pm.nylonGuitar_ui_MIDI;
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmmodeinterpres"><code>(pm.)modeInterpRes</code></h3>
|
|
<p>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:
|
|
* <a href="https://ccrma.stanford.edu/~rmichon/3dPrintingModeling/">https://ccrma.stanford.edu/~rmichon/3dPrintingModeling/</a>.</p>
|
|
<h4 id="usage_48">Usage</h4>
|
|
<pre><code>_ : modeInterpRes(nModes,x,y) : _
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>nModes</code>: number of modeled modes (40 max)</li>
|
|
<li><code>x</code>: shape of the resonator (0: square, 1: square with rounded corners, 2: round)</li>
|
|
<li><code>y</code>: scale of the resonator (0: small, 1: medium, 2: large)</li>
|
|
</ul>
|
|
<h4 id="test_48">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
os = library("oscillators.lib");
|
|
modeInterpRes_test = os.osc(110) : pm.modeInterpRes(20, 1.0, 1.5);
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmmodularinterpbody"><code>(pm.)modularInterpBody</code></h3>
|
|
<p>Bidirectional block implementing a modular string instrument resonator
|
|
(see <a href="#pm.modeinterpres"><code>modeInterpRes</code></a>).</p>
|
|
<h4 id="usage_49">Usage</h4>
|
|
<pre><code>chain(... : modularInterpBody(nModes,shape,scale) : ...)
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>nModes</code>: number of modeled modes (40 max)</li>
|
|
<li><code>shape</code>: shape of the resonator (0: square, 1: square with rounded corners, 2: round)</li>
|
|
<li><code>scale</code>: scale of the resonator (0: small, 1: medium, 2: large)</li>
|
|
</ul>
|
|
<h4 id="test_49">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
modularInterpBody_test = 0.25, -0.15, 0.05 : pm.modularInterpBody(20, 1.0, 1.5);
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmmodularinterpstringmodel"><code>(pm.)modularInterpStringModel</code></h3>
|
|
<p>String instrument model with a modular body (see
|
|
<a href="#pm.modeinterpres"><code>modeInterpRes</code></a> and
|
|
* <a href="https://ccrma.stanford.edu/~rmichon/3dPrintingModeling/">https://ccrma.stanford.edu/~rmichon/3dPrintingModeling/</a>).</p>
|
|
<h4 id="usage_50">Usage</h4>
|
|
<pre><code>modularInterpStringModel(length,pluckPosition,shape,scale,bodyExcitation,stringExcitation) : _
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>stringLength</code>: the length of the string in meters</li>
|
|
<li><code>pluckPosition</code>: pluck position (0-1) (1 is on the bridge)</li>
|
|
<li><code>shape</code>: shape of the resonator (0: square, 1: square with rounded corners, 2: round)</li>
|
|
<li><code>scale</code>: scale of the resonator (0: small, 1: medium, 2: large)</li>
|
|
<li><code>bodyExcitation</code>: excitation signal for the body</li>
|
|
<li><code>stringExcitation</code>: excitation signal for the string</li>
|
|
</ul>
|
|
<h4 id="test_50">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
modularInterpStringModel_test = pm.modularInterpStringModel(0.9, 0.3, 1.0, 1.5, pm.impulseExcitation(button("pm.modularInterpStringModel/body")), pm.impulseExcitation(button("pm.modularInterpStringModel/string")));
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmmodularinterpinstr"><code>(pm.)modularInterpInstr</code></h3>
|
|
<p>String instrument with a modular body (see
|
|
<a href="#pm.modeinterpres"><code>modeInterpRes</code></a> and
|
|
* <a href="https://ccrma.stanford.edu/~rmichon/3dPrintingModeling/">https://ccrma.stanford.edu/~rmichon/3dPrintingModeling/</a>).</p>
|
|
<h4 id="usage_51">Usage</h4>
|
|
<pre><code>modularInterpInstr(stringLength,pluckPosition,shape,scale,gain,tapBody,triggerString) : _
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>stringLength</code>: the length of the string in meters</li>
|
|
<li><code>pluckPosition</code>: pluck position (0-1) (1 is on the bridge)</li>
|
|
<li><code>shape</code>: shape of the resonator (0: square, 1: square with rounded corners, 2: round)</li>
|
|
<li><code>scale</code>: scale of the resonator (0: small, 1: medium, 2: large)</li>
|
|
<li><code>gain</code>: of the string excitation</li>
|
|
<li><code>tapBody</code>: send an impulse in the body of the instrument where the string is connected (1 for on, 0 for off)</li>
|
|
<li><code>triggerString</code>: trigger signal for the string (1 for on, 0 for off)</li>
|
|
</ul>
|
|
<h4 id="test_51">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
modularInterpInstr_test = pm.modularInterpInstr(0.9, 0.3, 1.0, 1.5, 0.8, button("pm.modularInterpInstr/body"), button("pm.modularInterpInstr/string"));
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmmodularinterpinstr_ui_midi"><code>(pm.)modularInterpInstr_ui_MIDI</code></h3>
|
|
<p>Ready-to-use MIDI-enabled string instrument with a modular body (see
|
|
<a href="#pm.modeinterpres"><code>modeInterpRes</code></a> and
|
|
* <a href="https://ccrma.stanford.edu/~rmichon/3dPrintingModeling/">https://ccrma.stanford.edu/~rmichon/3dPrintingModeling/</a>)
|
|
with built-in UI.</p>
|
|
<h4 id="usage_52">Usage</h4>
|
|
<pre><code>modularInterpInstr_ui_MIDI : _
|
|
</code></pre>
|
|
<h4 id="test_52">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
modularInterpInstr_ui_MIDI_test = pm.modularInterpInstr_ui_MIDI;
|
|
</code></pre>
|
|
<h2 id="bowed-string-instruments">Bowed String Instruments</h2>
|
|
<p>Low and high level basic string instruments parts. Most of the elements in
|
|
this section can be used in a bidirectional chain.</p>
|
|
<hr />
|
|
<h3 id="pmbowtable"><code>(pm.)bowTable</code></h3>
|
|
<p>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.).</p>
|
|
<h4 id="usage_53">Usage</h4>
|
|
<pre><code>excitation : bowTable(offset,slope) : _
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>excitation</code>: an excitation signal</li>
|
|
<li><code>offset</code>: table offset</li>
|
|
<li><code>slope</code>: table slope</li>
|
|
</ul>
|
|
<h4 id="test_53">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
bowTable_test = pm.bowTable(0.4, 0.1);
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmviolinbowtable"><code>(pm.)violinBowTable</code></h3>
|
|
<p>Violin bow table based on <a href="#bowtable"><code>bowTable</code></a>.</p>
|
|
<h4 id="usage_54">Usage</h4>
|
|
<pre><code>bowVelocity : violinBowTable(bowPressure) : _
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>bowVelocity</code>: velocity of the bow/excitation signal (0-1)</li>
|
|
<li><code>bowPressure</code>: bow pressure on the string (0-1)</li>
|
|
</ul>
|
|
<h4 id="test_54">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
violinBowTable_test = pm.violinBowTable(0.4, 0.1);
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmbowinteraction"><code>(pm.)bowInteraction</code></h3>
|
|
<p>Bidirectional block implementing the interaction of a bow in a
|
|
<a href="#chain"><code>chain</code></a>.</p>
|
|
<h4 id="usage_55">Usage</h4>
|
|
<pre><code>chain(... : stringSegment : bowInteraction(bowTable) : stringSegment : ...)
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>bowTable</code>: the bow table</li>
|
|
</ul>
|
|
<h4 id="test_55">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
bowInteraction_test = pm.bowInteraction((0.4, 0.05));
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmviolinbow"><code>(pm.)violinBow</code></h3>
|
|
<p>Bidirectional block implementing a violin bow and its interaction with
|
|
a string.</p>
|
|
<h4 id="usage_56">Usage</h4>
|
|
<pre><code>chain(... : stringSegment : violinBow(bowPressure,bowVelocity) : stringSegment : ...)
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>bowVelocity</code>: velocity of the bow / excitation signal (0-1)</li>
|
|
<li><code>bowPressure</code>: bow pressure on the string (0-1)</li>
|
|
</ul>
|
|
<h4 id="test_56">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
violinBow_test = pm.violinBow(0.4, 0.05);
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmviolinbowedstring"><code>(pm.)violinBowedString</code></h3>
|
|
<p>Violin bowed string bidirectional block with controllable bow position.
|
|
Terminations are not implemented in this model.</p>
|
|
<h4 id="usage_57">Usage</h4>
|
|
<pre><code>chain(nuts : violinBowedString(stringLength,bowPressure,bowVelocity,bowPosition) : bridge)
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>stringLength</code>: the length of the string in meters</li>
|
|
<li><code>bowVelocity</code>: velocity of the bow / excitation signal (0-1)</li>
|
|
<li><code>bowPressure</code>: bow pressure on the string (0-1)</li>
|
|
<li><code>bowPosition</code>: the position of the bow on the string (0-1)</li>
|
|
</ul>
|
|
<h4 id="test_57">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
violinBowedString_test = 0.25, -0.15, 0.05 : pm.violinBowedString(0.82, 0.35, 0.2, 0.15);
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmviolinnuts"><code>(pm.)violinNuts</code></h3>
|
|
<p>Bidirectional block implementing simple violin nuts. This function is
|
|
based on <a href="#bridgefilter"><code>bridgeFilter</code></a>.</p>
|
|
<h4 id="usage_58">Usage</h4>
|
|
<pre><code>_,_,_ : violinNuts
|
|
</code></pre>
|
|
<p>Typical use: <code>chain(violinNuts : stringSegment : ...)</code></p>
|
|
<h4 id="test_58">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
violinNuts_test = 0.25, -0.15, 0.05 : pm.violinNuts;
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmviolinbridge"><code>(pm.)violinBridge</code></h3>
|
|
<p>Bidirectional block implementing a simple violin bridge. This function is
|
|
based on <a href="#bridgefilter"><code>bridgeFilter</code></a>.</p>
|
|
<h4 id="usage_59">Usage</h4>
|
|
<pre><code>chain(... : stringSegment : violinBridge
|
|
</code></pre>
|
|
<h4 id="test_59">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
violinBridge_test = 0.25, -0.15, 0.05 : pm.violinBridge;
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmviolinbody"><code>(pm.)violinBody</code></h3>
|
|
<p>Bidirectional block implementing a simple violin body (just a simple
|
|
resonant lowpass filter).</p>
|
|
<h4 id="usage_60">Usage</h4>
|
|
<pre><code>chain(... : stringSegment : violinBridge : violinBody)
|
|
</code></pre>
|
|
<h4 id="test_60">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
violinBody_test = 0.25, -0.15, 0.05 : pm.violinBody;
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmviolinmodel"><code>(pm.)violinModel</code></h3>
|
|
<p>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).</p>
|
|
<h4 id="usage_61">Usage</h4>
|
|
<pre><code>violinModel(stringLength,bowPressure,bowVelocity,bowPosition) : _
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>stringLength</code>: the length of the string in meters</li>
|
|
<li><code>bowPressure</code>: bow pressure on the string (0-1)</li>
|
|
<li><code>bowVelocity</code>: velocity of the bow / excitation signal (0-1)</li>
|
|
<li><code>bowPosition</code>: the position of the bow on the string (0-1)</li>
|
|
</ul>
|
|
<h4 id="test_61">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
violinModel_test = pm.violinModel(0.82, 0.4, 0.05, 0.15);
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmviolin_ui"><code>(pm.)violin_ui</code></h3>
|
|
<p>Ready-to-use violin physical model with built-in UI.</p>
|
|
<h4 id="usage_62">Usage</h4>
|
|
<pre><code>violinModel_ui : _
|
|
</code></pre>
|
|
<h4 id="test_62">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
violin_ui_test = pm.violinModel(0.82, 0.4, 0.05, 0.15);
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmviolin_ui_midi"><code>(pm.)violin_ui_MIDI</code></h3>
|
|
<p>Ready-to-use MIDI-enabled violin physical model with built-in UI.</p>
|
|
<h4 id="usage_63">Usage</h4>
|
|
<pre><code>violin_ui_MIDI : _
|
|
</code></pre>
|
|
<h4 id="test_63">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
violin_ui_MIDI_test = pm.violin_ui_MIDI;
|
|
</code></pre>
|
|
<h2 id="wind-instruments">Wind Instruments</h2>
|
|
<p>Low and high level basic wind instruments parts. Most of the elements in
|
|
this section can be used in a bidirectional chain.</p>
|
|
<hr />
|
|
<h3 id="pmopentube"><code>(pm.)openTube</code></h3>
|
|
<p>A tube segment without terminations (same as <a href="#stringsegment"><code>stringSegment</code></a>).</p>
|
|
<h4 id="usage_64">Usage</h4>
|
|
<pre><code>chain(A : openTube(maxLength,length) : B)
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>maxLength</code>: the maximum length of the tube in meters (should be static)</li>
|
|
<li><code>length</code>: the length of the tube in meters</li>
|
|
</ul>
|
|
<h4 id="test_64">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
openTube_test = 0.25, -0.15, 0.05 : pm.openTube(pm.maxLength, 0.9);
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmreedtable"><code>(pm.)reedTable</code></h3>
|
|
<p>Extremely basic reed table that can be used to implement a wide range of
|
|
single reed types for many different instruments (saxophone, clarinet, etc.).</p>
|
|
<h4 id="usage_65">Usage</h4>
|
|
<pre><code>excitation : reedTable(offset,slope) : _
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>excitation</code>: an excitation signal</li>
|
|
<li><code>offset</code>: table offset</li>
|
|
<li><code>slope</code>: table slope</li>
|
|
</ul>
|
|
<h4 id="test_65">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
os = library("oscillators.lib");
|
|
reedTable_test = os.osc(220) : pm.reedTable(0.4, 0.2);
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmflutejettable"><code>(pm.)fluteJetTable</code></h3>
|
|
<p>Extremely basic flute jet table.</p>
|
|
<h4 id="usage_66">Usage</h4>
|
|
<pre><code>excitation : fluteJetTable : _
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>excitation</code>: an excitation signal</li>
|
|
</ul>
|
|
<h4 id="test_66">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
os = library("oscillators.lib");
|
|
fluteJetTable_test = os.osc(220) : pm.fluteJetTable;
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmbrasslipstable"><code>(pm.)brassLipsTable</code></h3>
|
|
<p>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.</p>
|
|
<h4 id="usage_67">Usage</h4>
|
|
<pre><code>excitation : brassLipsTable(tubeLength,lipsTension) : _
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>excitation</code>: an excitation signal (can be DC)</li>
|
|
<li><code>tubeLength</code>: length in meters of the tube connected to the mouthpiece</li>
|
|
<li><code>lipsTension</code>: tension of the lips (0-1) (default: 0.5)</li>
|
|
</ul>
|
|
<h4 id="test_67">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
os = library("oscillators.lib");
|
|
brassLipsTable_test = os.osc(220) : pm.brassLipsTable(0.3, 0.2);
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmclarinetreed"><code>(pm.)clarinetReed</code></h3>
|
|
<p>Clarinet reed based on <a href="#reedtable"><code>reedTable</code></a> with controllable
|
|
stiffness.</p>
|
|
<h4 id="usage_68">Usage</h4>
|
|
<pre><code>excitation : clarinetReed(stiffness) : _
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>excitation</code>: an excitation signal</li>
|
|
<li><code>stiffness</code>: reed stiffness (0-1)</li>
|
|
</ul>
|
|
<h4 id="test_68">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
os = library("oscillators.lib");
|
|
clarinetReed_test = os.osc(440) : pm.clarinetReed(0.6);
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmclarinetmouthpiece"><code>(pm.)clarinetMouthPiece</code></h3>
|
|
<p>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...</p>
|
|
<h4 id="usage_69">Usage</h4>
|
|
<pre><code>chain(clarinetMouthPiece(reedStiffness,pressure) : tube : etc.)
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>pressure</code>: 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.).</li>
|
|
<li><code>reedStiffness</code>: reed stiffness (0-1)</li>
|
|
</ul>
|
|
<h4 id="test_69">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
clarinetMouthPiece_test = 0.25, -0.15, 0.05 : pm.clarinetMouthPiece(0.6, 0.4);
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmbrasslips"><code>(pm.)brassLips</code></h3>
|
|
<p>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...</p>
|
|
<h4 id="usage_70">Usage</h4>
|
|
<pre><code>chain(brassLips(tubeLength,lipsTension,pressure) : tube : etc.)
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>tubeLength</code>: length in meters of the tube connected to the mouthpiece</li>
|
|
<li><code>lipsTension</code>: tension of the lips (0-1) (default: 0.5)</li>
|
|
<li><code>pressure</code>: 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.).</li>
|
|
</ul>
|
|
<h4 id="test_70">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
brassLips_test = 0.25, -0.15, 0.05 : pm.brassLips(0.3, 0.2, 0.1);
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmfluteembouchure"><code>(pm.)fluteEmbouchure</code></h3>
|
|
<p>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...</p>
|
|
<h4 id="usage_71">Usage</h4>
|
|
<pre><code>chain(... : tube : fluteEmbouchure(pressure) : tube : etc.)
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>pressure</code>: 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.).</li>
|
|
</ul>
|
|
<h4 id="test_71">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
fluteEmbouchure_test = 0.25, -0.15, 0.05 : pm.fluteEmbouchure(0.5);
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmwbell"><code>(pm.)wBell</code></h3>
|
|
<p>Generic wind instrument bell bidirectional block that should be placed at
|
|
the end of a <a href="#chain"><code>chain</code></a>.</p>
|
|
<h4 id="usage_72">Usage</h4>
|
|
<pre><code>chain(... : wBell(opening))
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>opening</code>: the "opening" of bell (0-1)</li>
|
|
</ul>
|
|
<h4 id="test_72">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
wBell_test = 0.25, -0.15, 0.05 : pm.wBell(0.4);
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmflutehead"><code>(pm.)fluteHead</code></h3>
|
|
<p>Simple flute head implementing waves reflexion.</p>
|
|
<h4 id="usage_73">Usage</h4>
|
|
<pre><code>_,_,_ : fluteHead
|
|
</code></pre>
|
|
<p>Typical use: <code>chain(fluteHead : tube : ...)</code></p>
|
|
<h4 id="test_73">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
fluteHead_test = 0.25, -0.15, 0.05 : pm.fluteHead;
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmflutefoot"><code>(pm.)fluteFoot</code></h3>
|
|
<p>Simple flute foot implementing waves reflexion and dispersion.</p>
|
|
<h4 id="usage_74">Usage</h4>
|
|
<pre><code>chain(... : tube : fluteFoot)
|
|
</code></pre>
|
|
<h4 id="test_74">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
fluteFoot_test = 0.25, -0.15, 0.05 : pm.fluteFoot;
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmclarinetmodel"><code>(pm.)clarinetModel</code></h3>
|
|
<p>A simple clarinet physical model without tone holes (pitch is changed by
|
|
changing the length of the tube of the instrument).</p>
|
|
<h4 id="usage_75">Usage</h4>
|
|
<pre><code>clarinetModel(tubeLength,pressure,reedStiffness,bellOpening) : _
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>tubeLength</code>: the length of the tube in meters</li>
|
|
<li><code>pressure</code>: 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.).</li>
|
|
<li><code>reedStiffness</code>: reed stiffness (0-1)</li>
|
|
<li><code>bellOpening</code>: the opening of bell (0-1)</li>
|
|
</ul>
|
|
<h4 id="test_75">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
clarinetModel_test = pm.clarinetModel(0.9, 0.4, 0.3, 0.2);
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmclarinetmodel_ui"><code>(pm.)clarinetModel_ui</code></h3>
|
|
<p>Same as <a href="#clarinetModel"><code>clarinetModel</code></a> but with a built-in UI. This function
|
|
doesn't implement a virtual "blower", thus <code>pressure</code> remains an argument here.</p>
|
|
<h4 id="usage_76">Usage</h4>
|
|
<pre><code>clarinetModel_ui(pressure) : _
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>pressure</code>: 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.).</li>
|
|
</ul>
|
|
<h4 id="test_76">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
clarinetModel_ui_test = pm.clarinetModel_ui(0.4);
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmclarinet_ui"><code>(pm.)clarinet_ui</code></h3>
|
|
<p>Ready-to-use clarinet physical model with built-in UI based on
|
|
<a href="#clarinetmodel"><code>clarinetModel</code></a>.</p>
|
|
<h4 id="usage_77">Usage</h4>
|
|
<pre><code>clarinet_ui : _
|
|
</code></pre>
|
|
<h4 id="test_77">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
clarinet_ui_test = pm.clarinet_ui;
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmclarinet_ui_midi"><code>(pm.)clarinet_ui_MIDI</code></h3>
|
|
<p>Ready-to-use MIDI compliant clarinet physical model with built-in UI.</p>
|
|
<h4 id="usage_78">Usage</h4>
|
|
<pre><code>clarinet_ui_MIDI : _
|
|
</code></pre>
|
|
<h4 id="test_78">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
clarinet_ui_MIDI_test = pm.clarinet_ui_MIDI;
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmbrassmodel"><code>(pm.)brassModel</code></h3>
|
|
<p>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...</p>
|
|
<h4 id="usage_79">Usage</h4>
|
|
<pre><code>brassModel(tubeLength,lipsTension,mute,pressure) : _
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>tubeLength</code>: the length of the tube in meters</li>
|
|
<li><code>lipsTension</code>: tension of the lips (0-1) (default: 0.5)</li>
|
|
<li><code>mute</code>: mute opening at the end of the instrument (0-1) (default: 0.5)</li>
|
|
<li><code>pressure</code>: 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.).</li>
|
|
</ul>
|
|
<h4 id="test_79">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
brassModel_test = pm.brassModel(0.9, 0.4, 0.2, 0.6);
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmbrassmodel_ui"><code>(pm.)brassModel_ui</code></h3>
|
|
<p>Same as <a href="#brassModel"><code>brassModel</code></a> but with a built-in UI. This function
|
|
doesn't implement a virtual "blower", thus <code>pressure</code> remains an argument here.</p>
|
|
<h4 id="usage_80">Usage</h4>
|
|
<pre><code>brassModel_ui(pressure) : _
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>pressure</code>: 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.).</li>
|
|
</ul>
|
|
<h4 id="test_80">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
brassModel_ui_test = pm.brassModel_ui(0.4);
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmbrass_ui"><code>(pm.)brass_ui</code></h3>
|
|
<p>Ready-to-use brass instrument physical model with built-in UI based on
|
|
<a href="#brassmodel"><code>brassModel</code></a>.</p>
|
|
<h4 id="usage_81">Usage</h4>
|
|
<pre><code>brass_ui : _
|
|
</code></pre>
|
|
<h4 id="test_81">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
brass_ui_test = pm.brass_ui;
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmbrass_ui_midi"><code>(pm.)brass_ui_MIDI</code></h3>
|
|
<p>Ready-to-use MIDI-controllable brass instrument physical model with built-in UI.</p>
|
|
<h4 id="usage_82">Usage</h4>
|
|
<pre><code>brass_ui_MIDI : _
|
|
</code></pre>
|
|
<h4 id="test_82">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
brass_ui_MIDI_test = pm.brass_ui_MIDI;
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmflutemodel"><code>(pm.)fluteModel</code></h3>
|
|
<p>A simple generic flute instrument physical model without tone holes
|
|
(pitch is changed by changing the length of the tube of the instrument).</p>
|
|
<h4 id="usage_83">Usage</h4>
|
|
<pre><code>fluteModel(tubeLength,mouthPosition,pressure) : _
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>tubeLength</code>: the length of the tube in meters</li>
|
|
<li><code>mouthPosition</code>: position of the mouth on the embouchure (0-1) (default: 0.5)</li>
|
|
<li><code>pressure</code>: 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.).</li>
|
|
</ul>
|
|
<h4 id="test_83">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
fluteModel_test = pm.fluteModel(0.9, 0.4, 0.6);
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmflutemodel_ui"><code>(pm.)fluteModel_ui</code></h3>
|
|
<p>Same as <a href="#fluteModel"><code>fluteModel</code></a> but with a built-in UI. This function
|
|
doesn't implement a virtual "blower", thus <code>pressure</code> remains an argument here.</p>
|
|
<h4 id="usage_84">Usage</h4>
|
|
<pre><code>fluteModel_ui(pressure) : _
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>pressure</code>: 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.).</li>
|
|
</ul>
|
|
<h4 id="test_84">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
fluteModel_ui_test = pm.fluteModel_ui(0.4);
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmflute_ui"><code>(pm.)flute_ui</code></h3>
|
|
<p>Ready-to-use flute physical model with built-in UI based on
|
|
<a href="#flutemodel"><code>fluteModel</code></a>.</p>
|
|
<h4 id="usage_85">Usage</h4>
|
|
<pre><code>flute_ui : _
|
|
</code></pre>
|
|
<h4 id="test_85">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
flute_ui_test = pm.flute_ui;
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmflute_ui_midi"><code>(pm.)flute_ui_MIDI</code></h3>
|
|
<p>Ready-to-use MIDI-controllable flute physical model with built-in UI.</p>
|
|
<h4 id="usage_86">Usage</h4>
|
|
<pre><code>flute_ui_MIDI : _
|
|
</code></pre>
|
|
<h4 id="test_86">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
flute_ui_MIDI_test = pm.flute_ui_MIDI;
|
|
</code></pre>
|
|
<h2 id="exciters">Exciters</h2>
|
|
<p>Various kind of excitation signal generators.</p>
|
|
<hr />
|
|
<h3 id="pmimpulseexcitation"><code>(pm.)impulseExcitation</code></h3>
|
|
<p>Creates an impulse excitation of one sample.</p>
|
|
<h4 id="usage_87">Usage</h4>
|
|
<pre><code>gate = button('gate');
|
|
impulseExcitation(gate) : chain;
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>gate</code>: a gate button</li>
|
|
</ul>
|
|
<h4 id="test_87">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
impulseExcitation_test = pm.impulseExcitation(button("pm.impulseExcitation/gate"));
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmstrikemodel"><code>(pm.)strikeModel</code></h3>
|
|
<p>Creates a filtered noise excitation.</p>
|
|
<h4 id="usage_88">Usage</h4>
|
|
<pre><code>gate = button('gate');
|
|
strikeModel(LPcutoff,HPcutoff,sharpness,gain,gate) : chain;
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>HPcutoff</code>: highpass cutoff frequency</li>
|
|
<li><code>LPcutoff</code>: lowpass cutoff frequency</li>
|
|
<li><code>sharpness</code>: sharpness of the attack and release (0-1)</li>
|
|
<li><code>gain</code>: gain of the excitation</li>
|
|
<li><code>gate</code>: a gate button/trigger signal (0/1)</li>
|
|
</ul>
|
|
<h4 id="test_88">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
strikeModel_test = pm.strikeModel(200, 4000, 0.5, 0.8, button("pm.strikeModel/gate"));
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmstrike"><code>(pm.)strike</code></h3>
|
|
<p>Strikes generator with controllable excitation position.</p>
|
|
<h4 id="usage_89">Usage</h4>
|
|
<pre><code>gate = button('gate');
|
|
strike(exPos,sharpness,gain,gate) : chain;
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>exPos</code>: 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</li>
|
|
<li><code>sharpness</code>: sharpness of the attack and release (0-1)</li>
|
|
<li><code>gain</code>: gain of the excitation</li>
|
|
<li><code>gate</code>: a gate button/trigger signal (0/1)</li>
|
|
</ul>
|
|
<h4 id="test_89">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
strike_test = pm.strike(0.4, 0.5, 0.8, button("pm.strike/gate"));
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmpluckstring"><code>(pm.)pluckString</code></h3>
|
|
<p>Creates a plucking excitation signal.</p>
|
|
<h4 id="usage_90">Usage</h4>
|
|
<pre><code>trigger = button('gate');
|
|
pluckString(stringLength,cutoff,maxFreq,sharpness,gain,trigger)
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>stringLength</code>: length of the string to pluck</li>
|
|
<li><code>cutoff</code>: cutoff ratio (1 for default)</li>
|
|
<li><code>maxFreq</code>: max frequency ratio (1 for default)</li>
|
|
<li><code>sharpness</code>: sharpness of the attack and release (1 for default)</li>
|
|
<li><code>gain</code>: gain of the excitation (0-1)</li>
|
|
<li><code>trigger</code>: trigger signal (1 for on, 0 for off)</li>
|
|
</ul>
|
|
<h4 id="test_90">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
pluckString_test = pm.pluckString(0.9, 1, 1, 1, 0.6, button("pm.pluckString/gate"));
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmblower"><code>(pm.)blower</code></h3>
|
|
<p>A virtual blower creating a DC signal with some breath noise in it.</p>
|
|
<h4 id="usage_91">Usage</h4>
|
|
<pre><code>blower(pressure,breathGain,breathCutoff,vibratoFreq,vibratoGain) : _
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>pressure</code>: pressure (0-1)</li>
|
|
<li><code>breathGain</code>: breath noise gain (0-1) (recommended: 0.005)</li>
|
|
<li><code>breathCutoff</code>: breath cutoff frequency (Hz) (recommended: 2000)</li>
|
|
<li><code>vibratoFreq</code>: vibrato frequency in Hz (recommended: 5)</li>
|
|
<li><code>vibratoGain</code>: vibrato depth (0-1) (recommended: 0.2)</li>
|
|
</ul>
|
|
<h4 id="test_91">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
blower_test = pm.blower(0.5, 0.05, 2000, 5, 0.2);
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmblower_ui"><code>(pm.)blower_ui</code></h3>
|
|
<p>Same as <a href="#blower"><code>blower</code></a> but with a built-in UI.</p>
|
|
<h4 id="usage_92">Usage</h4>
|
|
<pre><code>blower : somethingToBeBlown
|
|
</code></pre>
|
|
<h4 id="test_92">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
blower_ui_test = pm.blower_ui;
|
|
</code></pre>
|
|
<h2 id="modal-percussions">Modal Percussions</h2>
|
|
<p>High and low level functions for modal synthesis of percussion instruments.</p>
|
|
<hr />
|
|
<h3 id="pmdjembemodel"><code>(pm.)djembeModel</code></h3>
|
|
<p>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 :).</p>
|
|
<h4 id="usage_93">Usage</h4>
|
|
<pre><code>excitation : djembeModel(freq)
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>excitation</code>: excitation signal</li>
|
|
<li><code>freq</code>: fundamental frequency of the bar</li>
|
|
</ul>
|
|
<h4 id="test_93">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
os = library("oscillators.lib");
|
|
djembeModel_test = os.impulse : pm.djembeModel(110);
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmdjembe"><code>(pm.)djembe</code></h3>
|
|
<p>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 :).</p>
|
|
<p>This model also implements a virtual "exciter".</p>
|
|
<h4 id="usage_94">Usage</h4>
|
|
<pre><code>djembe(freq,strikePosition,strikeSharpness,gain,trigger)
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>freq</code>: fundamental frequency of the model</li>
|
|
<li><code>strikePosition</code>: strike position (0 for the middle of the membrane and
|
|
1 for the edge)</li>
|
|
<li><code>strikeSharpness</code>: sharpness of the strike (0-1, default: 0.5)</li>
|
|
<li><code>gain</code>: gain of the strike</li>
|
|
<li><code>trigger</code>: trigger signal (0: off, 1: on)</li>
|
|
</ul>
|
|
<h4 id="test_94">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
djembe_test = pm.djembe(110, 0.3, 0.5, 0.8, button("pm.djembe/gate"));
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmdjembe_ui_midi"><code>(pm.)djembe_ui_MIDI</code></h3>
|
|
<p>Simple MIDI controllable djembe physical model with built-in UI.</p>
|
|
<h4 id="usage_95">Usage</h4>
|
|
<pre><code>djembe_ui_MIDI : _
|
|
</code></pre>
|
|
<h4 id="test_95">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
djembe_ui_MIDI_test = pm.djembe_ui_MIDI;
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmmarimbabarmodel"><code>(pm.)marimbaBarModel</code></h3>
|
|
<p>Generic marimba tone bar modal model.</p>
|
|
<p>This model was generated using
|
|
<code>mesh2faust</code> from a 3D CAD model of a marimba tone bar
|
|
(<code>libraries/modalmodels/marimbaBar</code>). The corresponding CAD model is that
|
|
of a C2 tone bar (original fundamental frequency: ~65Hz). While
|
|
<code>marimbaBarModel</code> allows to translate the harmonic content of the generated
|
|
sound by providing a frequency (<code>freq</code>), 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...</p>
|
|
<p>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 <code>mesh2faust</code>.</p>
|
|
<h4 id="usage_96">Usage</h4>
|
|
<pre><code>excitation : marimbaBarModel(freq,exPos,t60,t60DecayRatio,t60DecaySlope)
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>excitation</code>: excitation signal</li>
|
|
<li><code>freq</code>: fundamental frequency of the bar</li>
|
|
<li><code>exPos</code>: excitation position (0-4)</li>
|
|
<li><code>t60</code>: T60 in seconds (recommended value: 0.1)</li>
|
|
<li><code>t60DecayRatio</code>: T60 decay ratio (recommended value: 1)</li>
|
|
<li><code>t60DecaySlope</code>: T60 decay slope (recommended value: 5)</li>
|
|
</ul>
|
|
<h4 id="test_96">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
os = library("oscillators.lib");
|
|
marimbaBarModel_test = os.impulse : pm.marimbaBarModel(220, 2, 0.1, 1, 5);
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmmarimbarestube"><code>(pm.)marimbaResTube</code></h3>
|
|
<p>Simple marimba resonance tube.</p>
|
|
<h4 id="usage_97">Usage</h4>
|
|
<pre><code>marimbaResTube(tubeLength,excitation)
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>tubeLength</code>: the length of the tube in meters</li>
|
|
<li><code>excitation</code>: the excitation signal (audio in)</li>
|
|
</ul>
|
|
<h4 id="test_97">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
os = library("oscillators.lib");
|
|
marimbaResTube_test = os.impulse : pm.marimbaResTube(0.5);
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmmarimbamodel"><code>(pm.)marimbaModel</code></h3>
|
|
<p>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 <a href="#marimbabarmodel"><code>marimbaBarModel</code></a> to know more about the
|
|
limitations of this type of system).</p>
|
|
<h4 id="usage_98">Usage</h4>
|
|
<pre><code>excitation : marimbaModel(freq,exPos) : _
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>excitation</code>: the excitation signal</li>
|
|
<li><code>freq</code>: the frequency of the bar/tube couple</li>
|
|
<li><code>exPos</code>: excitation position (0-4)</li>
|
|
</ul>
|
|
<h4 id="test_98">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
os = library("oscillators.lib");
|
|
marimbaModel_test = os.impulse : pm.marimbaModel(220, 2);
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmmarimba"><code>(pm.)marimba</code></h3>
|
|
<p>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 <a href="#marimbabarmodel"><code>marimbaBarModel</code></a> to know more about the
|
|
limitations of this type of system).</p>
|
|
<p>This function also implements a virtual exciter to drive the model.</p>
|
|
<h4 id="usage_99">Usage</h4>
|
|
<pre><code>marimba(freq,strikePosition,strikeCutoff,strikeSharpness,gain,trigger) : _
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>freq</code>: the frequency of the bar/tube couple</li>
|
|
<li><code>strikePosition</code>: strike position (0-4)</li>
|
|
<li><code>strikeCutoff</code>: cutoff frequency of the strike generator (recommended: ~7000 Hz)</li>
|
|
<li><code>strikeSharpness</code>: sharpness of the strike (recommended: ~0.25)</li>
|
|
<li><code>gain</code>: gain of the strike (0-1)</li>
|
|
<li><code>trigger</code>: signal (0: off, 1: on)</li>
|
|
</ul>
|
|
<h4 id="test_99">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
marimba_test = pm.marimba(220, 0.4, 1, 0.5, 0.8, button("pm.marimba/gate"));
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmmarimba_ui_midi"><code>(pm.)marimba_ui_MIDI</code></h3>
|
|
<p>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 <a href="#marimbabarmodel"><code>marimbaBarModel</code></a> to know more about the
|
|
limitations of this type of system).</p>
|
|
<h4 id="usage_100">Usage</h4>
|
|
<pre><code>marimba_ui_MIDI : _
|
|
</code></pre>
|
|
<h4 id="test_100">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
marimba_ui_MIDI_test = pm.marimba_ui_MIDI;
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmchurchbellmodel"><code>(pm.)churchBellModel</code></h3>
|
|
<p>Generic church bell modal model generated by <code>mesh2faust</code> from
|
|
<code>libraries/modalmodels/churchBell</code>.</p>
|
|
<p>Modeled after T. Rossing and R. Perrin, Vibrations of Bells, Applied
|
|
Acoustics 2, 1987.</p>
|
|
<p>Model height is 301 mm.</p>
|
|
<p>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 <code>mesh2faust</code>.</p>
|
|
<h4 id="usage_101">Usage</h4>
|
|
<pre><code>excitation : churchBellModel(nModes,exPos,t60,t60DecayRatio,t60DecaySlope)
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>excitation</code>: the excitation signal</li>
|
|
<li><code>nModes</code>: number of synthesized modes (max: 50)</li>
|
|
<li><code>exPos</code>: excitation position (0-6)</li>
|
|
<li><code>t60</code>: T60 in seconds (recommended value: 0.1)</li>
|
|
<li><code>t60DecayRatio</code>: T60 decay ratio (recommended value: 1)</li>
|
|
<li><code>t60DecaySlope</code>: T60 decay slope (recommended value: 5)</li>
|
|
</ul>
|
|
<h4 id="test_101">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
os = library("oscillators.lib");
|
|
churchBellModel_test = os.impulse : pm.churchBellModel(50, 0, 30, 1, 2.5);
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmchurchbell"><code>(pm.)churchBell</code></h3>
|
|
<p>Generic church bell modal model.</p>
|
|
<p>Modeled after T. Rossing and R. Perrin, Vibrations of Bells, Applied
|
|
Acoustics 2, 1987.</p>
|
|
<p>Model height is 301 mm.</p>
|
|
<p>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 <code>mesh2faust</code>.</p>
|
|
<p>This function also implements a virtual exciter to drive the model.</p>
|
|
<h4 id="usage_102">Usage</h4>
|
|
<pre><code>churchBell(strikePosition,strikeCutoff,strikeSharpness,gain,trigger) : _
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>strikePosition</code>: strike position (0-6)</li>
|
|
<li><code>strikeCutoff</code>: cutoff frequency of the strike generator (recommended: ~7000 Hz)</li>
|
|
<li><code>strikeSharpness</code>: sharpness of the strike (recommended: ~0.25)</li>
|
|
<li><code>gain</code>: gain of the strike (0-1)</li>
|
|
<li><code>trigger</code>: signal (0: off, 1: on)</li>
|
|
</ul>
|
|
<h4 id="test_102">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
churchBell_test = pm.churchBell(0.4, 2000, 0.5, 0.8, button("pm.churchBell/gate"));
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmchurchbell_ui"><code>(pm.)churchBell_ui</code></h3>
|
|
<p>Church bell physical model based on <a href="#pmchurchbell"><code>churchBell</code></a> with
|
|
built-in UI.</p>
|
|
<h4 id="usage_103">Usage</h4>
|
|
<pre><code>churchBell_ui : _
|
|
</code></pre>
|
|
<h4 id="test_103">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
churchBell_ui_test = pm.churchBell_ui;
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmenglishbellmodel"><code>(pm.)englishBellModel</code></h3>
|
|
<p>English church bell modal model generated by <code>mesh2faust</code> from
|
|
<code>libraries/modalmodels/englishBell</code>.</p>
|
|
<p>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.</p>
|
|
<p>Model height is 1 m.</p>
|
|
<p>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 <code>mesh2faust</code>.</p>
|
|
<h4 id="usage_104">Usage</h4>
|
|
<pre><code>excitation : englishBellModel(nModes,exPos,t60,t60DecayRatio,t60DecaySlope)
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>excitation</code>: the excitation signal</li>
|
|
<li><code>nModes</code>: number of synthesized modes (max: 50)</li>
|
|
<li><code>exPos</code>: excitation position (0-6)</li>
|
|
<li><code>t60</code>: T60 in seconds (recommended value: 0.1)</li>
|
|
<li><code>t60DecayRatio</code>: T60 decay ratio (recommended value: 1)</li>
|
|
<li><code>t60DecaySlope</code>: T60 decay slope (recommended value: 5)</li>
|
|
</ul>
|
|
<h4 id="test_104">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
os = library("oscillators.lib");
|
|
englishBellModel_test = os.impulse : pm.englishBellModel(50, 0, 30, 1, 3);
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmenglishbell"><code>(pm.)englishBell</code></h3>
|
|
<p>English church bell modal model.</p>
|
|
<p>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.</p>
|
|
<p>Model height is 1 m.</p>
|
|
<p>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 <code>mesh2faust</code>.</p>
|
|
<p>This function also implements a virtual exciter to drive the model.</p>
|
|
<h4 id="usage_105">Usage</h4>
|
|
<pre><code>englishBell(strikePosition,strikeCutoff,strikeSharpness,gain,trigger) : _
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>strikePosition</code>: strike position (0-6)</li>
|
|
<li><code>strikeCutoff</code>: cutoff frequency of the strike generator (recommended: ~7000 Hz)</li>
|
|
<li><code>strikeSharpness</code>: sharpness of the strike (recommended: ~0.25)</li>
|
|
<li><code>gain</code>: gain of the strike (0-1)</li>
|
|
<li><code>trigger</code>: signal (0: off, 1: on)</li>
|
|
</ul>
|
|
<h4 id="test_105">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
englishBell_test = pm.englishBell(0.4, 2000, 0.5, 0.8, button("pm.englishBell/gate"));
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmenglishbell_ui"><code>(pm.)englishBell_ui</code></h3>
|
|
<p>English church bell physical model based on <a href="#pmenglishbell"><code>englishBell</code></a> with
|
|
built-in UI.</p>
|
|
<h4 id="usage_106">Usage</h4>
|
|
<pre><code>englishBell_ui : _
|
|
</code></pre>
|
|
<h4 id="test_106">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
englishBell_ui_test = pm.englishBell_ui;
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmfrenchbellmodel"><code>(pm.)frenchBellModel</code></h3>
|
|
<p>French church bell modal model generated by <code>mesh2faust</code> from
|
|
<code>libraries/modalmodels/frenchBell</code>.</p>
|
|
<p>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.</p>
|
|
<p>Model height is 1 m.</p>
|
|
<p>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 <code>mesh2faust</code>.</p>
|
|
<h4 id="usage_107">Usage</h4>
|
|
<pre><code>excitation : frenchBellModel(nModes,exPos,t60,t60DecayRatio,t60DecaySlope)
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>excitation</code>: the excitation signal</li>
|
|
<li><code>nModes</code>: number of synthesized modes (max: 50)</li>
|
|
<li><code>exPos</code>: excitation position (0-6)</li>
|
|
<li><code>t60</code>: T60 in seconds (recommended value: 0.1)</li>
|
|
<li><code>t60DecayRatio</code>: T60 decay ratio (recommended value: 1)</li>
|
|
<li><code>t60DecaySlope</code>: T60 decay slope (recommended value: 5)</li>
|
|
</ul>
|
|
<h4 id="test_107">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
os = library("oscillators.lib");
|
|
frenchBellModel_test = os.impulse : pm.frenchBellModel(50, 0, 30, 1, 3);
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmfrenchbell"><code>(pm.)frenchBell</code></h3>
|
|
<p>French church bell modal model.</p>
|
|
<p>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.</p>
|
|
<p>Model height is 1 m.</p>
|
|
<p>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 <code>mesh2faust</code>.</p>
|
|
<p>This function also implements a virtual exciter to drive the model.</p>
|
|
<h4 id="usage_108">Usage</h4>
|
|
<pre><code></code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>strikePosition</code>: strike position (0-6)</li>
|
|
<li><code>strikeCutoff</code>: cutoff frequency of the strike generator (recommended: ~7000 Hz)</li>
|
|
<li><code>strikeSharpness</code>: sharpness of the strike (recommended: ~0.25)</li>
|
|
<li><code>gain</code>: gain of the strike (0-1)</li>
|
|
<li><code>trigger</code>: signal (0: off, 1: on)</li>
|
|
</ul>
|
|
<h4 id="test_108">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
frenchBell_test = pm.frenchBell(0.4, 2000, 0.5, 0.8, button("pm.frenchBell/gate"));
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmfrenchbell_ui"><code>(pm.)frenchBell_ui</code></h3>
|
|
<p>French church bell physical model based on <a href="#pmfrenchbell"><code>frenchBell</code></a> with
|
|
built-in UI.</p>
|
|
<h4 id="usage_109">Usage</h4>
|
|
<pre><code>frenchBell_ui : _
|
|
</code></pre>
|
|
<h4 id="test_109">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
frenchBell_ui_test = pm.frenchBell_ui;
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmgermanbellmodel"><code>(pm.)germanBellModel</code></h3>
|
|
<p>German church bell modal model generated by <code>mesh2faust</code> from
|
|
<code>libraries/modalmodels/germanBell</code>.</p>
|
|
<p>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.</p>
|
|
<p>Model height is 1 m.</p>
|
|
<p>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 <code>mesh2faust</code>.</p>
|
|
<h4 id="usage_110">Usage</h4>
|
|
<pre><code>excitation : germanBellModel(nModes,exPos,t60,t60DecayRatio,t60DecaySlope)
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>excitation</code>: the excitation signal</li>
|
|
<li><code>nModes</code>: number of synthesized modes (max: 50)</li>
|
|
<li><code>exPos</code>: excitation position (0-6)</li>
|
|
<li><code>t60</code>: T60 in seconds (recommended value: 0.1)</li>
|
|
<li><code>t60DecayRatio</code>: T60 decay ratio (recommended value: 1)</li>
|
|
<li><code>t60DecaySlope</code>: T60 decay slope (recommended value: 5)</li>
|
|
</ul>
|
|
<h4 id="test_110">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
os = library("oscillators.lib");
|
|
germanBellModel_test = os.impulse : pm.germanBellModel(50, 0, 30, 1, 2.5);
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmgermanbell"><code>(pm.)germanBell</code></h3>
|
|
<p>German church bell modal model.</p>
|
|
<p>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.</p>
|
|
<p>Model height is 1 m.</p>
|
|
<p>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 <code>mesh2faust</code>.</p>
|
|
<p>This function also implements a virtual exciter to drive the model.</p>
|
|
<h4 id="usage_111">Usage</h4>
|
|
<pre><code>germanBell(strikePosition,strikeCutoff,strikeSharpness,gain,trigger) : _
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>strikePosition</code>: strike position (0-6)</li>
|
|
<li><code>strikeCutoff</code>: cutoff frequency of the strike generator (recommended: ~7000 Hz)</li>
|
|
<li><code>strikeSharpness</code>: sharpness of the strike (recommended: ~0.25)</li>
|
|
<li><code>gain</code>: gain of the strike (0-1)</li>
|
|
<li><code>trigger</code>: signal (0: off, 1: on)</li>
|
|
</ul>
|
|
<h4 id="test_111">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
germanBell_test = pm.germanBell(0.4, 2000, 0.5, 0.8, button("pm.germanBell/gate"));
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmgermanbell_ui"><code>(pm.)germanBell_ui</code></h3>
|
|
<p>German church bell physical model based on <a href="#pmgermanbell"><code>germanBell</code></a> with
|
|
built-in UI.</p>
|
|
<h4 id="usage_112">Usage</h4>
|
|
<pre><code>germanBell_ui : _
|
|
</code></pre>
|
|
<h4 id="test_112">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
germanBell_ui_test = pm.germanBell_ui;
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmrussianbellmodel"><code>(pm.)russianBellModel</code></h3>
|
|
<p>Russian church bell modal model generated by <code>mesh2faust</code> from
|
|
<code>libraries/modalmodels/russianBell</code>.</p>
|
|
<p>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.</p>
|
|
<p>Model height is 2 m.</p>
|
|
<p>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 <code>mesh2faust</code>.</p>
|
|
<h4 id="usage_113">Usage</h4>
|
|
<pre><code>excitation : russianBellModel(nModes,exPos,t60,t60DecayRatio,t60DecaySlope)
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>excitation</code>: the excitation signal</li>
|
|
<li><code>nModes</code>: number of synthesized modes (max: 50)</li>
|
|
<li><code>exPos</code>: excitation position (0-6)</li>
|
|
<li><code>t60</code>: T60 in seconds (recommended value: 0.1)</li>
|
|
<li><code>t60DecayRatio</code>: T60 decay ratio (recommended value: 1)</li>
|
|
<li><code>t60DecaySlope</code>: T60 decay slope (recommended value: 5)</li>
|
|
</ul>
|
|
<h4 id="test_113">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
os = library("oscillators.lib");
|
|
russianBellModel_test = os.impulse : pm.russianBellModel(50, 0, 30, 1, 3);
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmrussianbell"><code>(pm.)russianBell</code></h3>
|
|
<p>Russian church bell modal model.</p>
|
|
<p>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.</p>
|
|
<p>Model height is 2 m.</p>
|
|
<p>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 <code>mesh2faust</code>.</p>
|
|
<p>This function also implements a virtual exciter to drive the model.</p>
|
|
<h4 id="usage_114">Usage</h4>
|
|
<pre><code>russianBell(strikePosition,strikeCutoff,strikeSharpness,gain,trigger) : _
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>strikePosition</code>: strike position (0-6)</li>
|
|
<li><code>strikeCutoff</code>: cutoff frequency of the strike generator (recommended: ~7000 Hz)</li>
|
|
<li><code>strikeSharpness</code>: sharpness of the strike (recommended: ~0.25)</li>
|
|
<li><code>gain</code>: gain of the strike (0-1)</li>
|
|
<li><code>trigger</code>: signal (0: off, 1: on)</li>
|
|
</ul>
|
|
<h4 id="test_114">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
russianBell_test = pm.russianBell(0.4, 2000, 0.5, 0.8, button("pm.russianBell/gate"));
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmrussianbell_ui"><code>(pm.)russianBell_ui</code></h3>
|
|
<p>Russian church bell physical model based on <a href="#pmrussianbell"><code>russianBell</code></a> with
|
|
built-in UI.</p>
|
|
<h4 id="usage_115">Usage</h4>
|
|
<pre><code>russianBell_ui : _
|
|
</code></pre>
|
|
<h4 id="test_115">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
russianBell_ui_test = pm.russianBell_ui;
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmstandardbellmodel"><code>(pm.)standardBellModel</code></h3>
|
|
<p>Standard church bell modal model generated by <code>mesh2faust</code> from
|
|
<code>libraries/modalmodels/standardBell</code>.</p>
|
|
<p>Modeled after T. Rossing and R. Perrin, Vibrations of Bells, Applied
|
|
Acoustics 2, 1987.</p>
|
|
<p>Model height is 1.8 m.</p>
|
|
<p>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 <code>mesh2faust</code>.</p>
|
|
<h4 id="usage_116">Usage</h4>
|
|
<pre><code>excitation : standardBellModel(nModes,exPos,t60,t60DecayRatio,t60DecaySlope)
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>excitation</code>: the excitation signal</li>
|
|
<li><code>nModes</code>: number of synthesized modes (max: 50)</li>
|
|
<li><code>exPos</code>: excitation position (0-6)</li>
|
|
<li><code>t60</code>: T60 in seconds (recommended value: 0.1)</li>
|
|
<li><code>t60DecayRatio</code>: T60 decay ratio (recommended value: 1)</li>
|
|
<li><code>t60DecaySlope</code>: T60 decay slope (recommended value: 5)</li>
|
|
</ul>
|
|
<h4 id="test_116">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
os = library("oscillators.lib");
|
|
standardBellModel_test = os.impulse : pm.standardBellModel(50, 0, 30, 1, 2.5);
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmstandardbell"><code>(pm.)standardBell</code></h3>
|
|
<p>Standard church bell modal model.</p>
|
|
<p>Modeled after T. Rossing and R. Perrin, Vibrations of Bells, Applied
|
|
Acoustics 2, 1987.</p>
|
|
<p>Model height is 1.8 m.</p>
|
|
<p>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 <code>mesh2faust</code>.</p>
|
|
<p>This function also implements a virtual exciter to drive the model.</p>
|
|
<h4 id="usage_117">Usage</h4>
|
|
<pre><code>standardBell(strikePosition,strikeCutoff,strikeSharpness,gain,trigger) : _
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>strikePosition</code>: strike position (0-6)</li>
|
|
<li><code>strikeCutoff</code>: cutoff frequency of the strike generator (recommended: ~7000 Hz)</li>
|
|
<li><code>strikeSharpness</code>: sharpness of the strike (recommended: ~0.25)</li>
|
|
<li><code>gain</code>: gain of the strike (0-1)</li>
|
|
<li><code>trigger</code> signal (0: off, 1: on)</li>
|
|
</ul>
|
|
<h4 id="test_117">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
standardBell_test = pm.standardBell(0.4, 2000, 0.5, 0.8, button("pm.standardBell/gate"));
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmstandardbell_ui"><code>(pm.)standardBell_ui</code></h3>
|
|
<p>Standard church bell physical model based on <a href="#pmstandardbell"><code>standardBell</code></a> with
|
|
built-in UI.</p>
|
|
<h4 id="usage_118">Usage</h4>
|
|
<pre><code>standardBell_ui : _
|
|
</code></pre>
|
|
<h4 id="test_118">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
standardBell_ui_test = pm.standardBell_ui;
|
|
</code></pre>
|
|
<h2 id="vocal-synthesis">Vocal Synthesis</h2>
|
|
<p>Vocal synthesizer functions (source/filter, fof, etc.).</p>
|
|
<hr />
|
|
<h3 id="pmformantvalues"><code>(pm.)formantValues</code></h3>
|
|
<p>Formant data values in an environment.</p>
|
|
<p>The formant data used here come from the CSOUND manual
|
|
* <a href="http://www.csounds.com/manual/html/">http://www.csounds.com/manual/html/</a>.</p>
|
|
<h4 id="usage_119">Usage</h4>
|
|
<pre><code>ba.take(j+1,formantValues.f(i)) : _
|
|
ba.take(j+1,formantValues.g(i)) : _
|
|
ba.take(j+1,formantValues.bw(i)) : _
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>i</code>: formant number</li>
|
|
<li><code>j</code>: (voiceType*nFormants)+vowel</li>
|
|
<li><code>voiceType</code>: the voice type (0: alto, 1: bass, 2: countertenor, 3:
|
|
soprano, 4: tenor)</li>
|
|
<li><code>vowel</code>: the vowel (0: a, 1: e, 2: i, 3: o, 4: u)</li>
|
|
</ul>
|
|
<h4 id="test_119">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
formantValues_test = pm.formantValues.f(0);
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmvoicegender"><code>(pm.)voiceGender</code></h3>
|
|
<p>Calculate the gender for the provided <code>voiceType</code> value. (0: male, 1: female)</p>
|
|
<h4 id="usage_120">Usage</h4>
|
|
<pre><code>voiceGender(voiceType) : _
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>voiceType</code>: the voice type (0: alto, 1: bass, 2: countertenor, 3: soprano, 4: tenor)</li>
|
|
</ul>
|
|
<h4 id="test_120">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
voiceGender_test = pm.voiceGender(0);
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmskirtwidthmultiplier"><code>(pm.)skirtWidthMultiplier</code></h3>
|
|
<p>Calculates value to multiply bandwidth to obtain <code>skirtwidth</code>
|
|
for a FOF filter.</p>
|
|
<h4 id="usage_121">Usage</h4>
|
|
<pre><code>skirtWidthMultiplier(vowel,freq,gender) : _
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>vowel</code>: the vowel (0: a, 1: e, 2: i, 3: o, 4: u)</li>
|
|
<li><code>freq</code>: the fundamental frequency of the excitation signal</li>
|
|
<li><code>gender</code>: gender of the voice used in the fof filter (0: male, 1: female)</li>
|
|
</ul>
|
|
<h4 id="test_121">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
skirtWidthMultiplier_test = pm.skirtWidthMultiplier(0, 220, 0);
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmautobendfreq"><code>(pm.)autobendFreq</code></h3>
|
|
<p>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 <code>chant-lib</code>.</p>
|
|
<h4 id="usage_122">Usage</h4>
|
|
<pre><code>_ : autobendFreq(n,freq,voiceType) : _
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>n</code>: formant index</li>
|
|
<li><code>freq</code>: the fundamental frequency of the excitation signal</li>
|
|
<li><code>voiceType</code>: the voice type (0: alto, 1: bass, 2: countertenor, 3: soprano, 4: tenor)</li>
|
|
<li>input is the center frequency of the corresponding formant</li>
|
|
</ul>
|
|
<h4 id="test_122">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
autobendFreq_test = 440 : pm.autobendFreq(0, 220, 0);
|
|
</code></pre>
|
|
<h4 id="references_1">References</h4>
|
|
<ul>
|
|
<li><a href="https://ccrma.stanford.edu/~rmichon/chantLib/">https://ccrma.stanford.edu/~rmichon/chantLib/</a>.</li>
|
|
</ul>
|
|
<hr />
|
|
<h3 id="pmvocaleffort"><code>(pm.)vocalEffort</code></h3>
|
|
<p>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 <code>chant-lib</code>.</p>
|
|
<h4 id="usage_123">Usage</h4>
|
|
<pre><code>_ : vocalEffort(freq,gender) : _
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>freq</code>: the fundamental frequency of the excitation signal</li>
|
|
<li><code>gender</code>: the gender of the voice type (0: male, 1: female)</li>
|
|
<li>input is the linear amplitude of the formant</li>
|
|
</ul>
|
|
<h4 id="test_123">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
vocalEffort_test = 1 : pm.vocalEffort(440, 0);
|
|
</code></pre>
|
|
<h4 id="references_2">References</h4>
|
|
<ul>
|
|
<li><a href="https://ccrma.stanford.edu/~rmichon/chantLib/">https://ccrma.stanford.edu/~rmichon/chantLib/</a>.</li>
|
|
</ul>
|
|
<hr />
|
|
<h3 id="pmfof"><code>(pm.)fof</code></h3>
|
|
<p>Function to generate a single Formant-Wave-Function.</p>
|
|
<h4 id="usage_124">Usage</h4>
|
|
<pre><code>_ : fof(fc,bw,sw,g) : _
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>fc</code>: formant center frequency,</li>
|
|
<li><code>bw</code>: formant bandwidth (Hz),</li>
|
|
<li><code>sw</code>: formant skirtwidth (Hz)</li>
|
|
<li><code>g</code>: linear scale factor (g=1 gives 0dB amplitude response at fc)</li>
|
|
<li>input is an impulse signal to excite filter</li>
|
|
</ul>
|
|
<h4 id="test_124">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
os = library("oscillators.lib");
|
|
fof_test = pm.fof(0.3, 440, 880, 0.5) + os.osc(110) * 0.001;
|
|
</code></pre>
|
|
<h4 id="references_3">References</h4>
|
|
<ul>
|
|
<li><a href="https://ccrma.stanford.edu/~mjolsen/pdfs/smc2016_MOlsenFOF.pdf">https://ccrma.stanford.edu/~mjolsen/pdfs/smc2016_MOlsenFOF.pdf</a>.</li>
|
|
</ul>
|
|
<hr />
|
|
<h3 id="pmfofsh"><code>(pm.)fofSH</code></h3>
|
|
<p>FOF with sample and hold used on <code>bw</code> and a parameter
|
|
used in the filter-cycling FOF function <code>fofCycle</code>.</p>
|
|
<h4 id="usage_125">Usage</h4>
|
|
<pre><code>_ : fofSH(fc,bw,a,g) : _
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>fc</code>: formant center frequency</li>
|
|
<li><code>bw</code>: formant bandwidth (Hz)</li>
|
|
<li><code>a</code>: formant skirtwidth (Hz)</li>
|
|
<li><code>g</code>: linear scale factor</li>
|
|
</ul>
|
|
<h4 id="test_125">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
os = library("oscillators.lib");
|
|
fofSH_test = pm.fofSH(0.3, 440, 880, 0.5) + os.osc(110) * 0.001;
|
|
</code></pre>
|
|
<h4 id="references_4">References</h4>
|
|
<ul>
|
|
<li><a href="https://ccrma.stanford.edu/~mjolsen/pdfs/smc2016_MOlsenFOF.pdf">https://ccrma.stanford.edu/~mjolsen/pdfs/smc2016_MOlsenFOF.pdf</a>.</li>
|
|
</ul>
|
|
<hr />
|
|
<h3 id="pmfofcycle"><code>(pm.)fofCycle</code></h3>
|
|
<p>FOF implementation where time-varying filter parameter noise is
|
|
mitigated by using a cycle of <code>n</code> sample and hold FOF filters.</p>
|
|
<h4 id="usage_126">Usage</h4>
|
|
<pre><code>_ : fofCycle(fc,bw,a,g,n) : _
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>fc</code>: center frequency of the filter in Hz</li>
|
|
<li><code>bw</code>: bandwidth of the filter in Hz</li>
|
|
<li><code>a</code>: attack bandwidth / skirt width in Hz</li>
|
|
<li><code>g</code>: linear gain multiplier</li>
|
|
<li><code>n</code>: the number of FOF filters to cycle through</li>
|
|
</ul>
|
|
<h4 id="test_126">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
os = library("oscillators.lib");
|
|
fofCycle_test = pm.fofCycle(0.3, 440, 880, 0.5, 3) + os.osc(110) * 0.001;
|
|
</code></pre>
|
|
<h4 id="references_5">References</h4>
|
|
<ul>
|
|
<li><a href="https://ccrma.stanford.edu/~mjolsen/pdfs/smc2016_MOlsenFOF.pdf">https://ccrma.stanford.edu/~mjolsen/pdfs/smc2016_MOlsenFOF.pdf</a>.</li>
|
|
</ul>
|
|
<hr />
|
|
<h3 id="pmfofsmooth"><code>(pm.)fofSmooth</code></h3>
|
|
<p>FOF implementation where time-varying filter parameter
|
|
noise is mitigated by lowpass filtering the filter
|
|
parameters <code>bw</code> and <code>a</code> with <a href="#smooth">smooth</a>.</p>
|
|
<h4 id="usage_127">Usage</h4>
|
|
<pre><code>_ : fofSmooth(fc,bw,sw,g,tau) : _
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>fc</code>: center frequency of the filter in Hz</li>
|
|
<li><code>bw</code>: bandwidth of the filter in Hz</li>
|
|
<li><code>sw</code>: skirt width in Hz</li>
|
|
<li><code>g</code>: linear gain multiplier</li>
|
|
<li><code>tau</code>: the desired smoothing time constant in seconds</li>
|
|
</ul>
|
|
<h4 id="test_127">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
os = library("oscillators.lib");
|
|
fofSmooth_test = pm.fofSmooth(0.3, 440, 880, 0.5, 0.2) + os.osc(110) * 0.001;
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmformantfilterfofcycle"><code>(pm.)formantFilterFofCycle</code></h3>
|
|
<p>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 <code>n</code> 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
|
|
<a href="#formantFilterFofSmooth"><code>formantFilterFofSmooth</code></a>. Voice type can be
|
|
selected but must correspond to
|
|
the frequency range of the provided source to be realistic.</p>
|
|
<h4 id="usage_128">Usage</h4>
|
|
<pre><code>_ : formantFilterFofCycle(voiceType,vowel,nFormants,i,freq) : _
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>voiceType</code>: the voice type (0: alto, 1: bass, 2: countertenor,
|
|
3: soprano, 4: tenor)</li>
|
|
<li><code>vowel</code>: the vowel (0: a, 1: e, 2: i, 3: o, 4: u)</li>
|
|
<li><code>nFormants</code>: number of formant regions in frequency domain, typically 5</li>
|
|
<li><code>i</code>: formant number (i.e. 0 - 4) used to index formant data value arrays</li>
|
|
<li><code>freq</code>: fundamental frequency of excitation signal. Used to calculate
|
|
rise time of envelope</li>
|
|
</ul>
|
|
<h4 id="test_128">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
os = library("oscillators.lib");
|
|
formantFilterFofCycle_test = (os.osc(110) : pm.formantFilterFofCycle(1, 1, 5, 1, 200)) + os.osc(55) * 0.001;
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmformantfilterfofsmooth"><code>(pm.)formantFilterFofSmooth</code></h3>
|
|
<p>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.</p>
|
|
<h4 id="usage_129">Usage</h4>
|
|
<pre><code>_ : formantFilterFofSmooth(voiceType,vowel,nFormants,i,freq) : _
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>voiceType</code>: the voice type (0: alto, 1: bass, 2: countertenor,
|
|
3: soprano, 4: tenor)</li>
|
|
<li><code>vowel</code>: the vowel (0: a, 1: e, 2: i, 3: o, 4: u)</li>
|
|
<li><code>nFormants</code>: number of formant regions in frequency domain, typically 5</li>
|
|
<li><code>i</code>: formant number (i.e. 1 - 5) used to index formant data value arrays</li>
|
|
<li><code>freq</code>: fundamental frequency of excitation signal. Used to calculate
|
|
rise time of envelope</li>
|
|
</ul>
|
|
<h4 id="test_129">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
os = library("oscillators.lib");
|
|
formantFilterFofSmooth_test = os.osc(110) : pm.formantFilterFofSmooth(0, 0, 5, 0, 200);
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmformantfilterbp"><code>(pm.)formantFilterBP</code></h3>
|
|
<p>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.</p>
|
|
<h4 id="usage_130">Usage</h4>
|
|
<pre><code>_ : formantFilterBP(voiceType,vowel,nFormants,i,freq) : _
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>voiceType</code>: the voice type (0: alto, 1: bass, 2: countertenor, 3: soprano, 4: tenor)</li>
|
|
<li><code>vowel</code>: the vowel (0: a, 1: e, 2: i, 3: o, 4: u)</li>
|
|
<li><code>nFormants</code>: number of formant regions in frequency domain, typically 5</li>
|
|
<li><code>i</code>: formant index used to index formant data value arrays</li>
|
|
<li><code>freq</code>: fundamental frequency of excitation signal.</li>
|
|
</ul>
|
|
<h4 id="test_130">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
os = library("oscillators.lib");
|
|
formantFilterBP_test = os.osc(110) : pm.formantFilterBP(0, 0, 5, 0, 200);
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmformantfilterbank"><code>(pm.)formantFilterbank</code></h3>
|
|
<p>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.</p>
|
|
<h4 id="usage_131">Usage</h4>
|
|
<pre><code>_ : formantFilterbank(voiceType,vowel,formantGen,freq) : _
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>voiceType</code>: the voice type (0: alto, 1: bass, 2: countertenor, 3: soprano, 4: tenor)</li>
|
|
<li><code>vowel</code>: the vowel (0: a, 1: e, 2: i, 3: o, 4: u)</li>
|
|
<li><code>formantGen</code>: the specific formant filterbank function
|
|
(i.e. FormantFilterbankBP, FormantFilterbankFof,...)</li>
|
|
<li><code>freq</code>: fundamental frequency of excitation signal. Needed for FOF
|
|
version to calculate rise time of envelope</li>
|
|
</ul>
|
|
<h4 id="test_131">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
os = library("oscillators.lib");
|
|
formantFilterbank_test = os.osc(110) : pm.formantFilterbank(0, 0, pm.formantFilterBP, 200);
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmformantfilterbankfofcycle"><code>(pm.)formantFilterbankFofCycle</code></h3>
|
|
<p>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.</p>
|
|
<h4 id="usage_132">Usage</h4>
|
|
<pre><code>_ : formantFilterbankFofCycle(voiceType,vowel,freq) : _
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>voiceType</code>: the voice type (0: alto, 1: bass, 2: countertenor, 3: soprano, 4: tenor)</li>
|
|
<li><code>vowel</code>: the vowel (0: a, 1: e, 2: i, 3: o, 4: u)</li>
|
|
<li><code>freq</code>: the fundamental frequency of the excitation signal. Needed to calculate the skirtwidth
|
|
of the FOF envelopes and for the autobendFreq and vocalEffort functions</li>
|
|
</ul>
|
|
<h4 id="test_132">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
os = library("oscillators.lib");
|
|
formantFilterbankFofCycle_test = (os.osc(110) : pm.formantFilterbankFofCycle(1, 1, 200)) + os.osc(55) * 0.001;
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmformantfilterbankfofsmooth"><code>(pm.)formantFilterbankFofSmooth</code></h3>
|
|
<p>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.</p>
|
|
<h4 id="usage_133">Usage</h4>
|
|
<pre><code>_ : formantFilterbankFofSmooth(voiceType,vowel,freq) : _
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>voiceType</code>: the voice type (0: alto, 1: bass, 2: countertenor, 3: soprano, 4: tenor)</li>
|
|
<li><code>vowel</code>: the vowel (0: a, 1: e, 2: i, 3: o, 4: u)</li>
|
|
<li><code>freq</code>: the fundamental frequency of the excitation signal. Needed to
|
|
calculate the skirtwidth of the FOF envelopes and for the
|
|
autobendFreq and vocalEffort functions</li>
|
|
</ul>
|
|
<h4 id="test_133">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
os = library("oscillators.lib");
|
|
formantFilterbankFofSmooth_test = os.osc(110) : pm.formantFilterbankFofSmooth(0, 0, 200);
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmformantfilterbankbp"><code>(pm.)formantFilterbankBP</code></h3>
|
|
<p>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.</p>
|
|
<h4 id="usage_134">Usage</h4>
|
|
<pre><code>_ : formantFilterbankBP(voiceType,vowel,freq) : _
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>voiceType</code>: the voice type (0: alto, 1: bass, 2: countertenor, 3: soprano, 4: tenor)</li>
|
|
<li><code>vowel</code>: the vowel (0: a, 1: e, 2: i, 3: o, 4: u)</li>
|
|
<li><code>freq</code>: the fundamental frequency of the excitation signal. Needed for the autobendFreq and vocalEffort functions.</li>
|
|
</ul>
|
|
<h4 id="test_134">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
os = library("oscillators.lib");
|
|
formantFilterbankBP_test = os.osc(110) : pm.formantFilterbankBP(0, 0, 200);
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmsfformantmodel"><code>(pm.)SFFormantModel</code></h3>
|
|
<p>Simple formant/vocal synthesizer based on a source/filter model. The <code>source</code>
|
|
and <code>filterbank</code> must be specified by the user. <code>filterbank</code> must take the same
|
|
input parameters as <a href="#formantFilterbank"><code>formantFilterbank</code></a> (<code>BP</code>/<code>FofCycle</code>
|
|
/<code>FofSmooth</code>).
|
|
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.</p>
|
|
<h4 id="usage_135">Usage</h4>
|
|
<pre><code>SFFormantModel(voiceType,vowel,exType,freq,gain,source,filterbank,isFof) : _
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>voiceType</code>: the voice type (0: alto, 1: bass, 2: countertenor, 3: soprano, 4: tenor)</li>
|
|
<li><code>vowel</code>: the vowel (0: a, 1: e, 2: i, 3: o, 4: u)</li>
|
|
<li><code>exType</code>: voice vs. fricative sound ratio (0-1 where 1 is 100% fricative)</li>
|
|
<li><code>freq</code>: the fundamental frequency of the source signal</li>
|
|
<li><code>gain</code>: linear gain multiplier to multiply the source by</li>
|
|
<li><code>source</code>: excitation signal generator used by the model</li>
|
|
<li><code>filterbank</code>: formant filterbank function, typically one of
|
|
<code>formantFilterbankBP</code>, <code>formantFilterbankFofCycle</code>, or <code>formantFilterbankFofSmooth</code></li>
|
|
<li><code>isFof</code>: whether model is FOF based (0: no, 1: yes)</li>
|
|
</ul>
|
|
<h4 id="test_135">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
os = library("oscillators.lib");
|
|
SFFormantModel_test = pm.SFFormantModel(0, 0, 0.2, 220, 0.7, os.lf_imptrain(220), pm.formantFilterbankFofCycle, 1);
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmsfformantmodelfofcycle"><code>(pm.)SFFormantModelFofCycle</code></h3>
|
|
<p>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 <code>exType</code> has been removed
|
|
and the model does not depend on <code>SFFormantModel</code>.</p>
|
|
<h4 id="usage_136">Usage</h4>
|
|
<pre><code>SFFormantModelFofCycle(voiceType,vowel,freq,gain) : _
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>voiceType</code>: the voice type (0: alto, 1: bass, 2: countertenor, 3: soprano, 4: tenor)</li>
|
|
<li><code>vowel</code>: the vowel (0: a, 1: e, 2: i, 3: o, 4: u)</li>
|
|
<li><code>freq</code>: the fundamental frequency of the source signal</li>
|
|
<li><code>gain</code>: linear gain multiplier to multiply the source by</li>
|
|
</ul>
|
|
<h4 id="test_136">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
SFFormantModelFofCycle_test = pm.SFFormantModelFofCycle(0, 0, 220, 0.7);
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmsfformantmodelfofsmooth"><code>(pm.)SFFormantModelFofSmooth</code></h3>
|
|
<p>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.</p>
|
|
<h4 id="usage_137">Usage</h4>
|
|
<pre><code>SFFormantModelFofSmooth(voiceType,vowel,freq,gain) : _
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>voiceType</code>: the voice type (0: alto, 1: bass, 2: countertenor, 3: soprano, 4: tenor)</li>
|
|
<li><code>vowel</code>: the vowel (0: a, 1: e, 2: i, 3: o, 4: u)</li>
|
|
<li><code>freq</code>: the fundamental frequency of the source signal</li>
|
|
<li><code>gain</code>: linear gain multiplier to multiply the source by</li>
|
|
</ul>
|
|
<h4 id="test_137">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
SFFormantModelFofSmooth_test = pm.SFFormantModelFofSmooth(0, 0, 220, 0.7);
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmsfformantmodelbp"><code>(pm.)SFFormantModelBP</code></h3>
|
|
<p>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.</p>
|
|
<p>The formant data used here come from the CSOUND manual
|
|
* <a href="http://www.csounds.com/manual/html/">http://www.csounds.com/manual/html/</a>.</p>
|
|
<h4 id="usage_138">Usage</h4>
|
|
<pre><code>SFFormantModelBP(voiceType,vowel,exType,freq,gain) : _
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>voiceType</code>: the voice type (0: alto, 1: bass, 2: countertenor, 3: soprano, 4: tenor)</li>
|
|
<li><code>vowel</code>: the vowel (0: a, 1: e, 2: i, 3: o, 4: u)</li>
|
|
<li><code>exType</code>: voice vs. fricative sound ratio (0-1 where 1 is 100% fricative)</li>
|
|
<li><code>freq</code>: the fundamental frequency of the source signal</li>
|
|
<li><code>gain</code>: linear gain multiplier to multiply the source by</li>
|
|
</ul>
|
|
<h4 id="test_138">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
SFFormantModelBP_test = pm.SFFormantModelBP(0, 0, 0.2, 220, 0.7);
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmsfformantmodelfofcycle_ui"><code>(pm.)SFFormantModelFofCycle_ui</code></h3>
|
|
<p>Ready-to-use source-filter vocal synthesizer with built-in user interface.</p>
|
|
<h4 id="usage_139">Usage</h4>
|
|
<pre><code>SFFormantModelFofCycle_ui : _
|
|
</code></pre>
|
|
<h4 id="test_139">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
SFFormantModelFofCycle_ui_test = pm.SFFormantModelFofCycle_ui;
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmsfformantmodelfofsmooth_ui"><code>(pm.)SFFormantModelFofSmooth_ui</code></h3>
|
|
<p>Ready-to-use source-filter vocal synthesizer with built-in user interface.</p>
|
|
<h4 id="usage_140">Usage</h4>
|
|
<pre><code>SFFormantModelFofSmooth_ui : _
|
|
</code></pre>
|
|
<h4 id="test_140">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
SFFormantModelFofSmooth_ui_test = pm.SFFormantModelFofSmooth_ui;
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmsfformantmodelbp_ui"><code>(pm.)SFFormantModelBP_ui</code></h3>
|
|
<p>Ready-to-use source-filter vocal synthesizer with built-in user interface.</p>
|
|
<h4 id="usage_141">Usage</h4>
|
|
<pre><code>SFFormantModelBP_ui : _
|
|
</code></pre>
|
|
<h4 id="test_141">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
SFFormantModelBP_ui_test = pm.SFFormantModelBP_ui;
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmsfformantmodelfofcycle_ui_midi"><code>(pm.)SFFormantModelFofCycle_ui_MIDI</code></h3>
|
|
<p>Ready-to-use MIDI-controllable source-filter vocal synthesizer.</p>
|
|
<h4 id="usage_142">Usage</h4>
|
|
<pre><code>SFFormantModelFofCycle_ui_MIDI : _
|
|
</code></pre>
|
|
<h4 id="test_142">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
SFFormantModelFofCycle_ui_MIDI_test = pm.SFFormantModelFofCycle_ui_MIDI;
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmsfformantmodelfofsmooth_ui_midi"><code>(pm.)SFFormantModelFofSmooth_ui_MIDI</code></h3>
|
|
<p>Ready-to-use MIDI-controllable source-filter vocal synthesizer.</p>
|
|
<h4 id="usage_143">Usage</h4>
|
|
<pre><code>SFFormantModelFofSmooth_ui_MIDI : _
|
|
</code></pre>
|
|
<h4 id="test_143">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
SFFormantModelFofSmooth_ui_MIDI_test = pm.SFFormantModelFofSmooth_ui_MIDI;
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmsfformantmodelbp_ui_midi"><code>(pm.)SFFormantModelBP_ui_MIDI</code></h3>
|
|
<p>Ready-to-use MIDI-controllable source-filter vocal synthesizer.</p>
|
|
<h4 id="usage_144">Usage</h4>
|
|
<pre><code>SFFormantModelBP_ui_MIDI : _
|
|
</code></pre>
|
|
<h4 id="test_144">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
SFFormantModelBP_ui_MIDI_test = pm.SFFormantModelBP_ui_MIDI;
|
|
</code></pre>
|
|
<h2 id="misc-functions">Misc Functions</h2>
|
|
<p>Various miscellaneous functions.</p>
|
|
<hr />
|
|
<h3 id="pmallpassnl"><code>(pm.)allpassNL</code></h3>
|
|
<p>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.</p>
|
|
<h4 id="usage_145">Usage</h4>
|
|
<pre><code>chain(... : allpassNL(nonlinearity) : ...)
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>nonlinearity</code>: amount of nonlinearity to be added (0-1)</li>
|
|
</ul>
|
|
<h4 id="test_145">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
allpassNL_test = 0.25, -0.15, 0.05 : pm.allpassNL(0.4);
|
|
</code></pre>
|
|
<hr />
|
|
<h3 id="pmmodalmodel"><code>(pm.)modalModel</code></h3>
|
|
<p>Implement multiple resonance modes using resonant bandpass filters.</p>
|
|
<h4 id="usage_146">Usage</h4>
|
|
<pre><code>_ : modalModel(n, freqs, t60s, gains) : _
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>n</code>: number of given modes</li>
|
|
<li><code>freqs</code> : list of filter center frequencies</li>
|
|
<li><code>t60s</code> : list of mode resonance durations (in seconds)</li>
|
|
<li><code>gains</code> : list of mode gains (0-1)</li>
|
|
</ul>
|
|
<p>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:</p>
|
|
<pre><code>os.impulse : modalModel(2, (440, 660),
|
|
(0.5, 0.25),
|
|
(ba.db2linear(-1), ba.db2linear(-6)));
|
|
</code></pre>
|
|
<h4 id="test_146">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
os = library("oscillators.lib");
|
|
modalModel_test = os.impulse : pm.modalModel(3, (440,660,880), (0.5,0.4,0.3), (0.8,0.6,0.4));
|
|
</code></pre>
|
|
<p>Further reading: <a href="https://raw.githubusercontent.com/grame-cncm/faust/master-dev/tools/physicalModeling/ir2dsp/lacPaper2017.pdf">Grumiaux et. al., 2017:
|
|
Impulse-Response and CAD-Model-Based Physical Modeling in
|
|
Faust</a></p>
|
|
<hr />
|
|
<h3 id="pmrk_solve"><code>(pm.)rk_solve</code></h3>
|
|
<p>Solves the system of ordinary differential equations of any order using
|
|
the explicit Runge-Kutta methods.</p>
|
|
<h4 id="usage_147">Usage</h4>
|
|
<pre><code>rk_solve(ts,ks, ni,h, eq,iv) : si.bus(outputs(eq))
|
|
</code></pre>
|
|
<p>Where:</p>
|
|
<ul>
|
|
<li><code>ts,ks</code> : the Butcher tableau (see below)</li>
|
|
<li><code>ni</code> : number of iterations at each tick, compile time constant
|
|
ni > 1 can improve accuracy but will degrade performance</li>
|
|
<li><code>h</code> : time step, run time constant, e.g. 1/ma.SR</li>
|
|
<li><code>eq</code> : list of derivative functions</li>
|
|
<li><code>iv</code> : list of initial values</li>
|
|
</ul>
|
|
<p><code>rk_solve()</code> with the "standard" 1-4 tableaux and ni = 1:</p>
|
|
<pre><code>rk_solve_1 = rk_solve((0), (1), 1);
|
|
rk_solve_2 = rk_solve((0,1/2), (1/2, 0,1), 1);
|
|
rk_solve_3 = rk_solve((0,1/2,1), (1/2,-1,2, 1/6,2/3,1/6), 1);
|
|
rk_solve_4 = rk_solve((0,1/2,1/2,1), (1/2,0,1/2,0,0,1, 1/6,1/3,1/3,1/6), 1);
|
|
</code></pre>
|
|
<h4 id="test_147">Test</h4>
|
|
<pre><code>pm = library("physmodels.lib");
|
|
ma = library("maths.lib");
|
|
rk_solve_test = pm.rk_solve((0), (1), 1, 1.0/ma.SR, eq, (1)) with { eq(t,x) = -x; };
|
|
</code></pre>
|
|
<h4 id="example-test-program">Example test program</h4>
|
|
<p>Suppose we have a system of differential equations:</p>
|
|
<pre><code>dx/dt = dx_dt(t,x,y,z)
|
|
dy/dt = dy_dt(t,x,y,z)
|
|
dz/dt = dz_dt(t,x,y,z)
|
|
</code></pre>
|
|
<p>with initial conditions:</p>
|
|
<pre><code> x(0) = x0
|
|
y(0) = y0
|
|
z(0) = z0
|
|
</code></pre>
|
|
<p>and we want to solve it using this Butcher tableau:</p>
|
|
<pre><code> 0 |
|
|
c2 | a21
|
|
c3 | a31 a32
|
|
c4 | a41 a42 a43
|
|
-------------------
|
|
| b1 b1 b3 b4
|
|
</code></pre>
|
|
<pre><code>EQ(t,x,y,z) = dx_dt(t,x,y,z),
|
|
dy_dt(t,x,y,z),
|
|
dz_dt(t,x,y,z);
|
|
|
|
IV = x0, y0, z0;
|
|
|
|
TS = 0, c2, c3, c4;
|
|
KS = a21,
|
|
a31, a32,
|
|
a41, a42, a43,
|
|
b1, b2, b3, b4;
|
|
|
|
process = rk_solve(TS,KS, 1,1/ma.SR, EQ,IV);
|
|
</code></pre>
|
|
<p>Less abstract example which can actually be compiled/tested:</p>
|
|
<pre><code>// Lotka-Volterra equations parameterized by a,b,c,d:
|
|
LV(a,b,c,d, t,x,y) =
|
|
a*x - b*x*y,
|
|
c*x*y - d*y;
|
|
|
|
// Solved using the "standard" fourth-order method:
|
|
process = rk_solve_4(
|
|
0.01, // time step
|
|
LV(0.1,0.02,0.03,0.4), // LV() with random parameters
|
|
(3,4) // initial values
|
|
);
|
|
</code></pre>
|
|
<h4 id="references_6">References</h4>
|
|
<ul>
|
|
<li><a href="https://wikipedia.org/wiki/Runge%E2%80%93Kutta_methods">https://wikipedia.org/wiki/Runge%E2%80%93Kutta_methods</a></li>
|
|
</ul></div>
|
|
</div>
|
|
</div>
|
|
|
|
<footer class="col-md-12">
|
|
<hr>
|
|
<p>Copyright © 2019-2026 <a href="https://www.grame.fr">Grame-CNCM</a></p>
|
|
</footer>
|
|
<script>
|
|
var base_url = "../..",
|
|
shortcuts = {"help": 191, "next": 78, "previous": 80, "search": 83};
|
|
</script>
|
|
<script src="../../js/base.js" defer></script>
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML" defer></script>
|
|
<script src="../../search/main.js" defer></script>
|
|
|
|
<div class="modal" id="mkdocs_search_modal" tabindex="-1" role="dialog" aria-labelledby="searchModalLabel" aria-hidden="true">
|
|
<div class="modal-dialog modal-lg">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h4 class="modal-title" id="searchModalLabel">Search</h4>
|
|
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
|
|
</div>
|
|
<div class="modal-body">
|
|
<p>From here you can search these documents. Enter your search terms below.</p>
|
|
<form>
|
|
<div class="form-group">
|
|
<input type="search" class="form-control" placeholder="Search..." id="mkdocs-search-query" title="Type search term here">
|
|
</div>
|
|
</form>
|
|
<div id="mkdocs-search-results" data-no-results-text="No results found"></div>
|
|
</div>
|
|
<div class="modal-footer">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div><div class="modal" id="mkdocs_keyboard_modal" tabindex="-1" role="dialog" aria-labelledby="keyboardModalLabel" aria-hidden="true">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h4 class="modal-title" id="keyboardModalLabel">Keyboard Shortcuts</h4>
|
|
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
|
|
</div>
|
|
<div class="modal-body">
|
|
<table class="table">
|
|
<thead>
|
|
<tr>
|
|
<th style="width: 20%;">Keys</th>
|
|
<th>Action</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td class="help shortcut"><kbd>?</kbd></td>
|
|
<td>Open this help</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="next shortcut"><kbd>n</kbd></td>
|
|
<td>Next page</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="prev shortcut"><kbd>p</kbd></td>
|
|
<td>Previous page</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="search shortcut"><kbd>s</kbd></td>
|
|
<td>Search</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="modal-footer">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</body>
|
|
</html>
|