Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Release] 1.0.1 #162

Merged
merged 143 commits into from
Jun 30, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
143 commits
Select commit Hold shift + click to select a range
0243518
mfcc rst and sc help file
tedmoore Feb 18, 2022
1b414bd
mfcc sc examples
tedmoore Feb 18, 2022
efe961f
mfcc output
tedmoore Feb 18, 2022
ee7d5ea
mfcc helpfile readability
tedmoore Feb 18, 2022
1663edd
BufMFCC udpates
tedmoore Feb 18, 2022
2bdf212
update bufonsetslice docs slightly (#87)
jamesb93 Feb 21, 2022
1105e14
fix audio transport segmentation of discussion and desc
jamesb93 Feb 21, 2022
b225dd4
fix audio transport segmentation of discussion and desc (#88)
jamesb93 Feb 21, 2022
d309905
add missing see alsos
jamesb93 Feb 21, 2022
5c2ed33
Merge branch 'docs/bufaudiotransport' into HEAD
jamesb93 Feb 21, 2022
2b27710
optional args: add to C++ wrapper
weefuzzy Feb 24, 2022
7c03d31
ParamDump and python: add choices param type
weefuzzy Feb 25, 2022
4f866de
Json driver (#35)
weefuzzy Feb 28, 2022
7b50523
Update json_api.yml
jamesb93 Feb 28, 2022
6e127c4
Update json_api.yml
jamesb93 Feb 28, 2022
be47611
Update json_api.yml
jamesb93 Feb 28, 2022
757c18b
change name of raw output to api.json
jamesb93 Feb 28, 2022
ffb22ce
Update json_api.yml
jamesb93 Feb 28, 2022
090e7e7
remove indentation on api
jamesb93 Feb 28, 2022
2661adf
typo in UMAP
jamesb93 Feb 28, 2022
d10b4fd
[Docs] OnsetSlice and BufOnsetSlice (#91)
jamesb93 Mar 2, 2022
092ad3f
revamp MelBands and BufMelBands RST, update SC example code
tedmoore Mar 2, 2022
f1d8a82
*melbands description
tedmoore Mar 2, 2022
83c4f65
added a hyphen
tedmoore Mar 2, 2022
a07bee3
pitch and buf pitch RST
tedmoore Mar 3, 2022
68dbdcb
added link to the learn page
tedmoore Mar 3, 2022
b7b7a29
edited normalize description
tedmoore Mar 3, 2022
45b00fd
Merge pull request #92 from flucoma/MelBands-reference
tedmoore Mar 3, 2022
0478be0
pitch sc help files
tedmoore Mar 3, 2022
370be76
BufFlatten RST and SC examples
tedmoore Mar 4, 2022
735cca6
buf thresh
tedmoore Mar 11, 2022
dda150c
sc help file
tedmoore Mar 21, 2022
ca395fb
typo in fluid pitch sc example code
tedmoore Mar 21, 2022
eb23f48
bufthresh rst
tedmoore Mar 21, 2022
d8a96ae
typo
tedmoore Mar 21, 2022
ba3c160
james' feedback
tedmoore Mar 22, 2022
9e29a7c
add .ds_store to gitignore
tremblap Mar 23, 2022
53835d6
Merge pull request #96 from flucoma/BufThresh
tedmoore Mar 24, 2022
88314a3
pa feedback
tedmoore Mar 24, 2022
894bbe6
pa feedback
tedmoore Mar 24, 2022
a6dd05b
Merge pull request #93 from flucoma/pitch
tedmoore Mar 24, 2022
5e23c97
pa feedback
tedmoore Mar 24, 2022
20d88b2
Merge pull request #94 from flucoma/BufFlatten
tedmoore Mar 24, 2022
5eaa22f
PA feedback
tedmoore Mar 24, 2022
ed93c51
Merge pull request #83 from flucoma/MFCC-helpfile-&-sc-example
tedmoore Mar 24, 2022
ccf1939
[Docs] Update Normalize Docs (#76)
jamesb93 Mar 24, 2022
56ad95e
[Docs] Slicer Feature Objects (#101)
jamesb93 Mar 29, 2022
315a61e
Merge branch 'main' into dev
tedmoore Mar 30, 2022
cc12351
changing preset and interface for noveltyslice examples
tremblap Apr 14, 2022
5cd4d72
Merge branch 'dev' of https://github.com/flucoma/flucoma-docs into dev
tremblap Apr 14, 2022
1bbf3c6
Add argument handlers for const DataSet / LabelSet
weefuzzy Apr 14, 2022
04541a6
Max/PD: Generate docs for control-in objects (input size and autosize)
weefuzzy May 2, 2022
65fda83
Merge branch 'dev' into enhance/optional-message-args
weefuzzy May 3, 2022
4e07e57
Merge pull request #89 from weefuzzy/enhance/optional-message-args
weefuzzy May 3, 2022
1b95f6d
Merge branch 'dev' into enhance/choices-param
weefuzzy May 3, 2022
3f45b91
Merge pull request #90 from weefuzzy/enhance/choices-param
weefuzzy May 3, 2022
fb437ad
Enhance/max params (#104)
weefuzzy May 3, 2022
64ca992
Add a `striprst` jinja filter for removing rst markup in templates (#…
weefuzzy May 5, 2022
e57d2fc
UMAP cmake reference to python sorted
tremblap May 5, 2022
a7237b6
Merge branch 'dev' of https://github.com/flucoma/flucoma-docs into dev
tremblap May 5, 2022
2768f74
typo
tedmoore May 5, 2022
a374e49
Wrapper and doc-gen update for new `maxFFTSize`
weefuzzy May 10, 2022
be8c30c
Buf stats (#103)
tedmoore May 10, 2022
6d4b89d
bufcompose update (#95)
jamesb93 May 11, 2022
5b0025e
PCA inverseTransformPoint (#97)
tedmoore May 11, 2022
b039b56
normalize the desc/disc of mfcc entries (#113)
jamesb93 May 23, 2022
1993e87
HPSS Help file (RST) and SC examples (#81)
tedmoore May 25, 2022
3291b01
Enhance/generate stubs (#119)
weefuzzy May 26, 2022
863c917
CI: Debug CMAKE_MODULE_PATH
weefuzzy May 26, 2022
576f6d5
CMake: Try setting module path using explicit source dir for core
weefuzzy May 26, 2022
43998eb
CI Debug: Print core/scripts
weefuzzy May 26, 2022
67301dd
CMake: Correct typo
weefuzzy May 26, 2022
b059120
CMake: MSVC with bigobj, tidy up messages
weefuzzy May 26, 2022
a1be779
set explicit UTF8 encoding when opening text
weefuzzy May 26, 2022
81db8fd
explicitly use utf8 for writing as well as reading
weefuzzy May 26, 2022
531b4c2
MDS RST & SC example code (#121)
tedmoore May 26, 2022
e409a4d
MLPRegressor & MLPClassifier RSTs & SC example Code (#109)
tedmoore May 26, 2022
bb02817
Standardize RST & SC examples (#117)
tedmoore May 26, 2022
9b8ce92
RobustScale (#118)
tedmoore May 26, 2022
d0849dd
KNNClassifier RST and SC example code (#127)
tedmoore May 31, 2022
b9d5a47
Stats RST & SC examples (#124)
tedmoore May 31, 2022
11342d2
PCA RST and SC Examples (#116)
tedmoore May 31, 2022
8439734
Update Standardize.rst
weefuzzy Jun 1, 2022
000f49c
maxFFTSize in SC driver is conditional on buffer-proc species (#129)
tedmoore Jun 1, 2022
488a4b0
BufSTFT RST and SC example code (#112)
tedmoore Jun 1, 2022
e729aa0
[Enhance] Learn platform link generation (#120)
jamesb93 Jun 1, 2022
86f62e4
typo
tedmoore Jun 3, 2022
bd1cc8c
bufnmf: adding resynthmode
tremblap Jun 4, 2022
1469303
resynthMode : camel case
tremblap Jun 4, 2022
8b71aa4
Change size to history (#133)
jamesb93 Jun 5, 2022
d0a99ec
BufNMFCross RST & SC example (#137)
tedmoore Jun 8, 2022
0873a27
NNDSVD (#138)
tedmoore Jun 8, 2022
465fbd2
NMFMorph (& species transformer[0]) (#135)
tedmoore Jun 8, 2022
b55a9ec
put bar chart back in (#123)
tedmoore Jun 8, 2022
0ed7eff
KNNRegressor (#136)
tedmoore Jun 8, 2022
fbe9725
(Buf)Transients(Slice) Family (#140)
tedmoore Jun 10, 2022
c6d002e
typos in rst
tremblap Jun 12, 2022
ceb65f0
typos in knnclassifier~ (#142)
jamesb93 Jun 13, 2022
dc6110a
sc example code for BufNMF now includes resynthMode
tedmoore Jun 13, 2022
5a54545
deleted SC Guid YAML file
tedmoore Jun 13, 2022
3c744bc
put spaces around hyperlinks
tedmoore Jun 13, 2022
bd1c1ca
BufTransients SC example (Waveform only 2 sec.)
tedmoore Jun 13, 2022
a144aa4
BufNNDSVD -> BufNMFSeed (#141)
tremblap Jun 13, 2022
32ca4e0
fix Loudness select in MLPRegressor example code
tedmoore Jun 13, 2022
c93cf97
fix bad link in nmf morph (BufNMFCross was missing the buf part)
tedmoore Jun 13, 2022
0676237
added inverse transform and inverse transform point to Normalize
tedmoore Jun 13, 2022
f93eaea
better code for testing all flucoma objects help files
tedmoore Jun 13, 2022
6668584
added argument k to KDTree RST
tedmoore Jun 13, 2022
1c6c046
fixed a bad link in KNNClassifier RST
tedmoore Jun 13, 2022
5ec761c
removed action arguments from RobustScale RST
tedmoore Jun 13, 2022
9db5839
fixed mistakes in RobustScale RST that was causing it to not render p…
tedmoore Jun 13, 2022
b2842a8
added select argument to BufLoudness and Loudness RST (the rest comin…
tedmoore Jun 13, 2022
83715d7
added pca whitening to PCA RST
tedmoore Jun 13, 2022
90b2e5c
adding select argument to appropriate RST files
tedmoore Jun 13, 2022
42d2d94
added radius argument to KDTree RST
tedmoore Jun 13, 2022
61642fb
added channels argument to BufSelect RST
tedmoore Jun 13, 2022
fda570b
checked example code files that use 'select' for possible errors
tedmoore Jun 13, 2022
031ccfe
found a bit more code needing resynthMode
tedmoore Jun 13, 2022
6996726
[Enhance] Interp to Interplation in NMFMorph (#143)
jamesb93 Jun 14, 2022
3476f8b
SKMeans (#132)
tremblap Jun 14, 2022
9410f1b
(Buf)AmpGate RST & SC examples (#122)
tedmoore Jun 14, 2022
fdc506d
added BufAmpGate maxSize parameter
tedmoore Jun 14, 2022
005f1ef
[Fix] Fix Guide Links in RST (#147)
jamesb93 Jun 15, 2022
8fde3f4
Merge branch 'main' into dev
jamesb93 Jun 15, 2022
35014ba
[Fix] LF line ending enforcement (#149)
jamesb93 Jun 15, 2022
1327d5f
Merge branch 'upmain' into updev
jamesb93 Jun 15, 2022
3e63e3a
interface changes
tremblap Jun 16, 2022
d7e8f35
capitalise beatRemember
jamesb93 Jun 16, 2022
6b0bdde
Fix `<o>` links to `buffer~` for max doc
weefuzzy Jun 16, 2022
0413151
Mop up vestigial scdoc syntax
weefuzzy Jun 16, 2022
b8ae8e2
correct reference to "class" in description
jamesb93 Jun 21, 2022
40d0036
[fix] typos and errors (#153)
jamesb93 Jun 23, 2022
c3e8985
remove bufNum
jamesb93 Jun 23, 2022
dfcf4a2
fix low/mid/ min/median confusion
jamesb93 Jun 23, 2022
7700f40
[docs] Update see-also content (#155)
jamesb93 Jun 23, 2022
8d3b9d9
[docs] Buffer clients link to buffer management tutorial (#157)
jamesb93 Jun 23, 2022
24ea858
proposed layout improvement (#154)
jamesb93 Jun 23, 2022
a71d467
add outward links to RST and templat
jamesb93 Jun 24, 2022
60533e0
small typo in the *transient* family
tremblap Jun 27, 2022
24e96a4
info on passing symbols for algorithm and metric to slicers (#160)
tedmoore Jun 29, 2022
3242f4f
Max to SC translation of example code (#151)
tedmoore Jun 30, 2022
240b252
[fix] typos (#161)
jamesb93 Jun 30, 2022
522abfa
Merge branch 'main' into dev
jamesb93 Jun 30, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
(Buf)AmpGate RST & SC examples (#122)
* (Buf)AmpGate RST & SC examples

* BufAmpGate help file ⚠️

* drum hit example ⚠️

* ⚠️

* gitignore to ignore vs code

* pa feedback
  • Loading branch information
tedmoore authored Jun 14, 2022
commit 9410f1b0626c898803dd7c5ff68b60f7cdbd7089
35 changes: 17 additions & 18 deletions doc/AmpGate.rst
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
:digest: Amplitude-based Gating Slicer
:digest: Gate Detection on a Signal
:species: slicer
:sc-categories: Libraries>FluidDecomposition
:sc-related: Guides/FluidCorpusManipulationToolkit
:see-also: BufAmpGate, AmpSlice, OnsetSlice, NoveltySlice, TransientSlice
:description: This class implements an amplitude-based slicer, with various customisable options and conditions to detect absolute amplitude changes as onsets and offsets.
:discussion:
FluidAmpSlice is based on an envelop follower on a highpassed version of the signal, which is then going through a Schmidt trigger and state-aware time contraints. The example code below is unfolding the various possibilites in order of complexity.
:description: Absolute amplitude threshold gate detector on a real-time signal

The process will return an audio steam with square envelopes around detected slices the different slices, where 1s means in slice and 0s mean in silence.
:discussion:
AmpGate outputs a audio-rate, single-channel signal that is either 0, indicating the gate is closed, or 1, indicating the gate is open. The gate detects an onset (opens) when the internal envelope follower (controlled by ``rampUp`` and ``rampDown``) goes above a specified ``onThreshold`` (in dB) for at least ``minLengthAbove`` samples. The gate will stay open until the envelope follower goes below ``offThreshold`` (in dB) for at least ``minLengthBelow`` samples, which triggers an offset.

:output: An audio stream with square envelopes around the slices. The latency between the input and the output is **max(minLengthAbove + lookBack, max(minLengthBelow,lookAhead))**.
The latency between the input and the output is **max(minLengthAbove + lookBack, max(minLengthBelow,lookAhead))**.

:output: An audio stream of gate information, always either 1, indicating the gate is open, or 0, indicating the gate is closed.

:control rampUp:

Expand All @@ -22,41 +22,40 @@

:control onThreshold:

The threshold in dB of the envelope follower to trigger an onset, aka to go ON when in OFF state.
The threshold in dB of the envelope follower to trigger an onset: go from 0 (closed) to 1 (open).

:control offThreshold:

The threshold in dB of the envelope follower to trigger an offset, , aka to go ON when in OFF state.
The threshold in dB of the envelope follower to trigger an offset: go from 1 (open) to 0 (closed).

:control minSliceLength:

The length in samples that the Slice will stay ON. Changes of states during that period will be ignored.
The minimum length in samples for which the gate will stay open. Changes of states during this period after an onset will be ignored.

:control minSilenceLength:

The length in samples that the Slice will stay OFF. Changes of states during that period will be ignored.
The minimum length in samples for which the gate will stay closed. Changes of states during that period after an offset will be ignored.

:control minLengthAbove:

The length in samples that the envelope have to be above the threshold to consider it a valid transition to ON. The Slice will start at the first sample when the condition is met. Therefore, this affects the latency.
The length in samples that the envelope must be above the threshold to consider it a valid transition to 1. The gate will change to 1 at the first sample when the condition is met. Therefore, this affects the latency (see latency equation in the description).

:control minLengthBelow:

The length in samples that the envelope have to be below the threshold to consider it a valid transition to OFF. The Slice will end at the first sample when the condition is met. Therefore, this affects the latency.
The length in samples that the envelope must be below the threshold to consider it a valid transition to 0. The gate will change to 0 at the first sample when the condition is met. Therefore, this affects the latency (see latency equation in the description).

:control lookBack:

The length of the buffer kept before an onset to allow the algorithm, once a new Slice is detected, to go back in time (up to that many samples) to find the minimum amplitude as the Slice onset point. This affects the latency of the algorithm.
When an onset is detected, the algorithm will look in the recent past (via an internal recorded buffer of this length in samples) for a minimum in the envelope follower to identify as the onset point. This affects the latency of the algorithm (see latency equation in the description).

:control lookAhead:

The length of the buffer kept after an offset to allow the algorithm, once the Slice is considered finished, to wait further in time (up to that many samples) to find a minimum amplitude as the Slice offset point. This affects the latency of the algorithm.

When an offset is detected, the algorithm will wait this duration (in samples) to find a minimum in the envelope follower to identify as the offset point. This affects the latency of the algorithm (see latency equation in the description).
:control highPassFreq:

The frequency of the fourth-order Linkwitz-Riley high-pass filter (https://en.wikipedia.org/wiki/Linkwitz%E2%80%93Riley_filter). This is done first on the signal to minimise low frequency intermodulation with very fast ramp lengths. A frequency of 0 bypasses the filter.
The frequency of the fourth-order Linkwitz-Riley high-pass filter (https://en.wikipedia.org/wiki/Linkwitz%E2%80%93Riley_filter) applied to the input signal to minimise low frequency intermodulation with very short ramp lengths. A frequency of 0 bypasses the filter.

:control maxSize:

How large can the buffer be for time-critical conditions, by allocating memory at instantiation time. This cannot be modulated.

The size of the buffer to allocate at instantiation time for keeping track of the time-critical conditions (``minSliceLength``, ``minSilenceLength``, ``minLengthAbove``, ``minLengthBelow``, ``lookBack``, and ``lookAhead``). This cannot be modulated.
52 changes: 24 additions & 28 deletions doc/BufAmpGate.rst
Original file line number Diff line number Diff line change
@@ -1,86 +1,82 @@
:digest: Amplitude-based Gating Slicer for Buffers
:digest: Gate Detection on a Bfufer
:species: buffer-proc
:sc-categories: Libraries>FluidDecomposition
:sc-related: Guides/FluidCorpusManipulationToolkit
:see-also: AmpGate, BufAmpSlice, BufOnsetSlice, BufNoveltySlice, BufTransientSlice
:description: This class implements an amplitude-based slicer, with various customisable options and conditions to detect absolute amplitude changes as onsets and offsets.
:description: Absolute amplitude threshold gate detector on audio in a buffer

:discussion:
FluidBufAmpGate is based on an envelop follower on a highpassed version of the signal, which is then going through a Schmidt trigger and state-aware time contraints. The example code below is unfolding the various possibilites in order of complexity.

The process will return a two-channel buffer with the addresses of the onset on the first channel, and the address of the offset on the second channel.
BufAmpGate outputs a two-channel buffer containing open and close positions of the gates. Each frame of the buffer contains an onset (opening) position on channel 0 and the corresponding offset (closing) position on channel 1 (both in samples). The buffer will have as many frames as gate events detected.

The gate detects an onset (opens) when the internal envelope follower (controlled by ``rampUp`` and ``rampDown``) goes above a specified ``onThreshold`` (in dB) for at least ``minLengthAbove`` samples. The gate will stay open until the envelope follower goes below ``offThreshold`` (in dB) for at least ``minLengthBelow`` samples, which triggers an offset.

:output: Nothing, as the destination buffer is declared in the function call.


:control source:

The index of the buffer to use as the source material to be sliced through novelty identification. The different channels of multichannel buffers will be summed.
The buffer to analyse for gate information. Multichannel buffers will be summed to mono for analysis.

:control startFrame:

Where in the srcBuf should the slicing process start, in sample.
Where in ``source`` to begin the analysis (in samples). The default is 0.

:control numFrames:

How many frames should be processed.
How many frames (audio samples) to analyse. The default of -1 indicates to analyse through end of the buffer

:control startChan:

For multichannel sources, which channel should be processed.
For multichannel sources, at which channel to begin the analysis. The default is 0.

:control numChans:

For multichannel sources, how many channel should be summed.
For multichannel sources, how many channels should be included in the analysis (starting from ``startChan``). The default of -1 indicates to include all the channels from ``startChan`` through the rest of the buffer. If more than one channel is specified, the channels will be summed to mono for analysis.

:control indices:

The index of the buffer where the indices (in sample) of the estimated starting points of slices will be written. The first and last points are always the boundary points of the analysis.
The buffer to write the gate information into. Buffer will be resized appropriately so each frame contains an onset (opening) position on channel 0 and the corresponding offset (closing) position on channel 1 (both in samples). The buffer will have as many frames as gate events detected.

:control rampUp:

The number of samples the envelope follower will take to reach the next value when raising.
The number of samples the envelope follower will take to reach the next value when rising.

:control rampDown:

The number of samples the envelope follower will take to reach the next value when falling.
The number of samples the envelope follower will take to reach the next value when falling.

:control onThreshold:

The threshold in dB of the envelope follower to trigger an onset, aka to go ON when in OFF state.
The threshold in dB of the envelope follower to trigger an onset.

:control offThreshold:

The threshold in dB of the envelope follower to trigger an offset, , aka to go ON when in OFF state.
The threshold in dB of the envelope follower to trigger an offset.

:control minSliceLength:

The length in samples that the Slice will stay ON. Changes of states during that period will be ignored.
The minimum length in samples for which the gate will stay open. Changes of states during this period after an onset will be ignored.

:control minSilenceLength:

The length in samples that the Slice will stay OFF. Changes of states during that period will be ignored.
The minimum length in samples for which the gate will stay closed. Changes of states during that period after an offset will be ignored.

:control minLengthAbove:

The length in samples that the envelope have to be above the threshold to consider it a valid transition to ON. The Slice will start at the first sample when the condition is met. Therefore, this affects the latency.
The length in samples that the envelope must be above the threshold to consider it a valid onset. The onset will be triggered at the first sample when the condition is met.

:control minLengthBelow:

The length in samples that the envelope have to be below the threshold to consider it a valid transition to OFF. The Slice will end at the first sample when the condition is met. Therefore, this affects the latency.
The length in samples that the envelope must be below the threshold to consider it a valid offset. The offset will be triggered at the first sample when the condition is met.

:control lookBack:

The length of the buffer kept before an onset to allow the algorithm, once a new Slice is detected, to go back in time (up to that many samples) to find the minimum amplitude as the Slice onset point. This affects the latency of the algorithm.
When an onset is detected, the algorithm will look in the recent past (this length in samples) for a minimum in the envelope follower to identify as the onset point.

:control lookAhead:

The length of the buffer kept after an offset to allow the algorithm, once the Slice is considered finished, to wait further in time (up to that many samples) to find a minimum amplitude as the Slice offset point. This affects the latency of the algorithm.

When an offset is detected, the algorithm will wait this duration (in samples) to find a minimum in the envelope follower to identify as the offset point.
:control highPassFreq:

The frequency of the fourth-order Linkwitz–Riley high-pass filter (https://en.wikipedia.org/wiki/Linkwitz%E2%80%93Riley_filter). This is done first on the signal to minimise low frequency intermodulation with very fast ramp lengths. A frequency of 0 bypasses the filter.

:control maxSize:

How large can the buffer be for time-critical conditions, by allocating memory at instantiation time. This cannot be modulated.

The frequency of the fourth-order Linkwitz-Riley high-pass filter (https://en.wikipedia.org/wiki/Linkwitz%E2%80%93Riley_filter) applied to the signal signal to minimise low frequency intermodulation with very short ramp lengths. A frequency of 0 bypasses the filter.
106 changes: 37 additions & 69 deletions example-code/sc/AmpGate.scd
Original file line number Diff line number Diff line change
@@ -1,76 +1,44 @@

strong::Watch the gate::
code::
//basic tests: threshold sanity
(
{var env, source = SinOsc.ar(320,0,LFTri.ar(10).abs);
env = FluidAmpGate.ar(source, rampUp:5, rampDown:25, onThreshold:-12, offThreshold: -12);
[source, env]
}.plot(0.1);
)
//basic tests: threshold hysteresis
(
{var env, source = SinOsc.ar(320,0,LFTri.ar(10).abs);
env = FluidAmpGate.ar(source, rampUp:5, rampDown:25, onThreshold:-12, offThreshold: -16);
[source, env]
}.plot(0.1);
)
//basic tests: threshold min slice
(
{var env, source = SinOsc.ar(320,0,LFTri.ar(10).abs);
env = FluidAmpGate.ar(source, rampUp:5, rampDown:25, onThreshold:-12, offThreshold: -12, minSliceLength:441);
[source, env]
}.plot(0.1);
)
//basic tests: threshold min silence
(
{var env, source = SinOsc.ar(320,0,LFTri.ar(10).abs);
env = FluidAmpGate.ar(source, rampUp:5, rampDown:25, onThreshold:-12, offThreshold: -12, minSilenceLength:441);
[source, env]
}.plot(0.1);
)
//mid tests: threshold time hysteresis on
(
{var env, source = SinOsc.ar(320,0,LFTri.ar(10).abs);
env = FluidAmpGate.ar(source, rampUp:5, rampDown:25, onThreshold:-12, offThreshold: -12, minLengthAbove:441);
[DelayN.ar(source,0.1,441/44100), env]
}.plot(0.1);
)
//mid tests: threshold time hysteresis off
(
{var env, source = SinOsc.ar(320,0,LFTri.ar(10).abs);
env = FluidAmpGate.ar(source, rampUp:5, rampDown:25, onThreshold:-12, offThreshold: -12, minLengthBelow:441);
[DelayN.ar(source,0.1,441/44100), env]
}.plot(0.1);
)
//mid tests: threshold with lookBack
(
{var env, source = SinOsc.ar(320,0,LFTri.ar(10).abs);
env = FluidAmpGate.ar(source, rampUp:5, rampDown:25, onThreshold:-12, offThreshold: -12, lookBack:441);
[DelayN.ar(source,0.1,441/44100), env]
}.plot(0.1);
)
//mid tests: threshold with lookAhead

// make sure the third bus is only output.
(
{var env, source = SinOsc.ar(320,0,LFTri.ar(10).abs);
env = FluidAmpGate.ar(source, rampUp:5, rampDown:25, onThreshold:-12, offThreshold: -12, lookAhead:441);
[DelayN.ar(source,0.1,441/44100), env]
}.plot(0.1);
s.options.numOutputBusChannels_(4);
s.options.numInputBusChannels_(4);
s.reboot;
)
//mid tests: threshold with asymetrical lookBack and lookAhead

~src = Buffer.read(s,FluidFilesPath("Nicol-LoopE-M.wav"));

(
{var env, source = SinOsc.ar(320,0,LFTri.ar(10).abs);
env = FluidAmpGate.ar(source, rampUp:5, rampDown:25, onThreshold:-12, offThreshold: -12, lookBack:221, lookAhead:441);
[DelayN.ar(source,0.1,441/44100), env]
}.plot(0.1);
{
var source = PlayBuf.ar(1,~src,BufRateScale.ir(~src),loop:1);
var env = FluidAmpGate.ar(source, rampUp:441, rampDown:2205, onThreshold:-27, offThreshold: -31, minSilenceLength:4410, lookBack:441, highPassFreq:20).poll;
var sig = DelayN.ar(source,delaytime:441/44100) * env.lag(0.02); // compenstate for latency.
[sig,sig,env];
}.scope;
)
//drum slicing, many ways
//load a buffer
b = Buffer.read(s,FluidFilesPath("Nicol-LoopE-M.wav"));
//have fun with a gate (explore lookahead and lookback, but correct for latency, which will be the greatest of the lookahead and lookback)

::
strong::Use for manipulating FX::
code::

~src = Buffer.read(s,FluidFilesPath("Harker-DS-TenOboeMultiphonics-M.wav"));

(
{var env, source = PlayBuf.ar(1,b);
env = FluidAmpGate.ar(source, rampUp:441, rampDown:2205, onThreshold:-27, offThreshold: -31, minSilenceLength:4410, lookBack:441, highPassFreq:20);
[DelayN.ar(source,delaytime:441/44100), env]
}.plot(2, separately:true);
{
arg thresh = -35;
var src = PlayBuf.ar(1,~src,BufRateScale.ir(~src),loop:1);
var localbuf = LocalBuf(s.sampleRate).clear;
var gate = FluidAmpGate.ar(src,10,10,thresh,thresh-5,441,441,441,441).poll;
var phs = Phasor.ar(0,1 * gate,0,localbuf.numFrames/2); // only write into the buffer when the gate is open
var trig = Dust.kr(50) * (1-gate); // only trigger grains from that buffer when the gate is closed
var dur = 0.1;
var pos = ((phs + localbuf.numFrames/2) - TRand.kr(dur*SampleRate.ir,localbuf.numFrames/2)) / localbuf.numFrames;
var sig = GrainBuf.ar(2,trig,dur,localbuf,1,pos,4,TChoose.kr(trig,[-0.9,0.9]),mul:6.dbamp);
BufWr.ar(src,localbuf,[phs,phs+(localbuf.numFrames/2)]);
sig + src;
}.scope;
)
::

::
Loading