Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 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)
Feb 21, 2022
1105e14
fix audio transport segmentation of discussion and desc
Feb 21, 2022
b225dd4
fix audio transport segmentation of discussion and desc (#88)
Feb 21, 2022
d309905
add missing see alsos
Feb 21, 2022
5c2ed33
Merge branch 'docs/bufaudiotransport' into HEAD
Feb 21, 2022
4f866de
Json driver (#35)
weefuzzy Feb 28, 2022
7b50523
Update json_api.yml
Feb 28, 2022
6e127c4
Update json_api.yml
Feb 28, 2022
be47611
Update json_api.yml
Feb 28, 2022
757c18b
change name of raw output to api.json
Feb 28, 2022
ffb22ce
Update json_api.yml
Feb 28, 2022
090e7e7
remove indentation on api
Feb 28, 2022
2661adf
typo in UMAP
Feb 28, 2022
d10b4fd
[Docs] OnsetSlice and BufOnsetSlice (#91)
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)
Mar 24, 2022
56ad95e
[Docs] Slicer Feature Objects (#101)
Mar 29, 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
48 changes: 48 additions & 0 deletions .github/workflows/json_api.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Dev API

on:
workflow_dispatch:
push:
branches: [ dev, ci/** ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: flucoma/actions/env@v4
- uses: flucoma/actions/docs@v4
with:
target: 'MAKE_RAW_REF'

- uses: dev-drprasad/[email protected]
with:
delete_release: true # default: false
tag_name: api # tag name to delete
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Setup SSH
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SSH }}
known_hosts: 'placeholder'

- name: Adding Known Hosts
run: |
mkdir -p ~/.ssh
ssh-keyscan -H ${{ secrets.DO_IP }} >> ~/.ssh/known_hosts

- name: package and upload
uses: softprops/action-gh-release@v1
with:
name: FluCoMa Docs API
body: "A JSON that can be accessed to derive parameters/args for objects. The build hash is ${{ github.sha }}"
files: 'build/flucoma.api.json'
prerelease: true
tag_name: api
draft: false

- name: Upload To Droplet
run: |
rsync -avz --delete --no-times --no-o --no-g --no-perms ./build/api.json james@${{ secrets.DO_IP }}:/home/learn/www/
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ schelp
*.pyc
interfaces/*
*.log
**/.DS_Store
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ set(MAX_DOC_OUT "${CMAKE_BINARY_DIR}/max_ref" CACHE PATH "")
set(PD_DOC_OUT "${CMAKE_BINARY_DIR}/pd_ref" CACHE PATH "")
set(CLI_DOC_OUT "${CMAKE_BINARY_DIR}/cli_ref" CACHE PATH "")
set(SC_DOC_OUT "${CMAKE_BINARY_DIR}/sc_ref" CACHE PATH "")
set(RAW_DOC_OUT "${CMAKE_BINARY_DIR}" CACHE PATH "")
# option(TESTS,"Run tests?")
include(FetchContent)

Expand Down Expand Up @@ -138,6 +139,7 @@ add_ref_target(max "Making Max ref")
add_ref_target(pd "Making PD ref")
add_ref_target(cli "Making CLI ref")
add_ref_target(sc "Making SC ref")
add_ref_target(raw "Making raw API JSON")

enable_testing()

Expand Down
41 changes: 41 additions & 0 deletions doc/AmpFeature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
:digest: Realtime Amplitude Differential Feature
:species: transformer
:sc-categories: Libraries>FluidDecomposition
:sc-related: Guides/FluidCorpusManipulationToolkit
:see-also: AmpGate, AmpSlice, OnsetFeature, NoveltyFeature
:description: Calculate the amplitude differential feature in realtime.
:discussion:
:fluid-obj:`AmpSlice` uses the differential between a fast and a slow envelope follower to determine changes in amplitude. This object calculates the amplitude differential and copies it to an output buffer.

:process: The audio rate in, control rate out version of the object.
:output: A KR signal of the feature.

:control in:

The audio to be processed.

:control fastRampUp:

The number of samples the relative envelope follower will take to reach the next value when raising. Typically, this will be faster than slowRampUp.

:control fastRampDown:

The number of samples the relative envelope follower will take to reach the next value when falling. Typically, this will be faster than slowRampDown.

:control slowRampUp:

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

:control slowRampDown:

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

:control floor:

The level in dB the slowRamp needs to be above to consider a detected difference valid, allowing to ignore the slices in the noise floor.

: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.


8 changes: 5 additions & 3 deletions doc/AudioTransport.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@
:species: transformer[2]
:sc-categories: FluidManipulation
:sc-related: Classes/FluidBufAudioTransport
:see-also:
:see-also: NMFMorph, BufNMFCross
:description:
Interpolates between the spectra of two sounds using the Optimal Transport algorithm
Interpolates between the spectra of two sounds using optimal transport.

:discussion:
Interpolates between the spectra of two sounds using the optimal transport algorithm. This enables morphing and hybridisation of the perceptual qualities of each source linearly.
See Henderson and Solomonm (2019) AUDIO TRANSPORT: A GENERALIZED PORTAMENTO VIA OPTIMAL TRANSPORT, DaFx


https://arxiv.org/abs/1906.06763

:control in2:

Expand Down
67 changes: 67 additions & 0 deletions doc/BufAmpFeature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
:digest: Buffer-Based Amplitude Differential Feature
:species: buffer-proc
:sc-categories: Libraries>FluidDecomposition
:sc-related: Guides/FluidCorpusManipulationToolkit
:see-also: BufAmpSlice, BufNoveltyFeature, BufAmpFeature, BufOnsetFeature
:description: Calculate the amplitude differential feature used by :fluid-obj:`BufAmpSlice`.
:discussion:
:fluid-obj:`BufAmpSlice` uses the differential between a fast and a slow envelope follower to determine changes in amplitude. This object calculates the amplitude differential and copies it to an output buffer.

: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.

:control startFrame:

Where in the srcBuf should the slicing process start, in sample.

:control numFrames:

How many frames should be processed.

:control startChan:

For multichannel sources, which channel should be processed.

:control numChans:

For multichannel sources, how many channel should be summed.

:control features:

The index of the buffer where the amplitude differential feature will be copied to.

:control fastRampUp:

The number of samples the relative envelope follower will take to reach the next value when raising. Typically, this will be faster than slowRampUp.

:control fastRampDown:

The number of samples the relative envelope follower will take to reach the next value when falling. Typically, this will be faster than slowRampDown.

:control slowRampUp:

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

:control slowRampDown:

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

:control floor:

The level in dB the slowRamp needs to be above to consider a detected difference valid, allowing to ignore the slices in the noise floor.

: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 padding:

Controls the zero-padding added to either end of the source buffer or segment. Possible values are 0 (no padding), 1 (default, half the window size), or 2 (window size - hop size). Padding ensures that all input samples are completely analysed: with no padding, the first analysis window starts at time 0, and the samples at either end will be tapered by the STFT windowing function. Mode 1 has the effect of centering the first sample in the analysis window and ensuring that the very start and end of the segment are accounted for in the analysis. Mode 2 can be useful when the overlap factor (window size / hop size) is greater than 2, to ensure that the input samples at either end of the segment are covered by the same number of analysis frames as the rest of the analysed material.

:control action:

A Function to be evaluated once the offline process has finished and indices instance variables have been updated on the client side. The function will be passed indices as an argument.
9 changes: 6 additions & 3 deletions doc/BufAudioTransport.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@
:species: buffer-proc
:sc-categories: FluidManipulation
:sc-related: Classes/FluidAudioTransport
:see-also:
:see-also: NMFMorph, BufNMFCross
:description:
Interpolates between the spectra of two sounds using the Optimal Transport algorithm
Interpolates between the spectra of two sounds using optimal transport

See Henderson and Solomonm (2019) AUDIO TRANSPORT: A GENERALIZED PORTAMENTO VIA OPTIMAL TRANSPORT, DaFx
:discussion:
Interpolates between the spectra of two sounds using the optimal transport algorithm. This enables morphing and hybridisation of the perceptual qualities of each source linearly.

See Henderson and Solomonm (2019) AUDIO TRANSPORT: A GENERALIZED PORTAMENTO VIA OPTIMAL TRANSPORT, DaFx

https://arxiv.org/abs/1906.06763

:control sourceA:

Expand Down
29 changes: 13 additions & 16 deletions doc/BufFlatten.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,59 +2,56 @@
:species: buffer-proc
:sc-categories: FluidCorpusManipulation
:sc-related: Classes/Buffer
:see-also:
:see-also: BufCompose, BufStats
:description:
Flatten a multichannel |buffer| to a single channel. This can be useful for constructing n-dimensional data points for use with :fluid-obj:`DataSet`
Flatten a multichannel |buffer| to a single channel. This can be useful to structure a buffer such that it can be added to a :fluid-obj:`DataSet`

The ``axis`` determines how the flattening is arranged. The default value, 1, flattens channel-wise, such that (if we imagine channels are rows, time positions are columns):
The ``axis`` argument determines how the flattening is arranged. The default value, 1, flattens channel-wise (similar to how audio files are stored), such that (if we imagine channels are rows, time positions are columns):

=== === ===
a 1 a 2 a 3
b 1 b 2 b 3
c 1 c 2 c 3
=== === ===


becomes

=== === === === === === === === ===
a 1 b 1 c 1 a 2 b 2 c 2 a 3 b 3 c 3
=== === === === === === === === ===


whereas with ``axis = 0`` we get
whereas with ``axis`` = 0, the buffer is flattened frame-wise, resulting in:

=== === === === === === === === ===
a 1 a 2 a 3 b 1 b 2 b 3 c 1 c 2 c 3
=== === === === === === === === ===


To learn more visit https://learn.flucoma.org/reference/bufflatten/.

:control source:

The |buffer| to flatten
The |buffer| to flatten.

:control startFrame:

Where in the source should the flattening process start, in samples.
Where in ``source`` should the flattening process start, in samples. The default is 0.

:control numFrames:

How many frames should be processed.
How many frames should be processed. The default of -1 indicates to process through the end of the buffer.

:control startChan:

For multichannel source buffers, which channel to start processing at.
For multichannel ``source`` buffers, which which channel to begin the processing. The default is 0.

:control numChans:

For multichannel source buffers, how many channels should be processed.
For multichannel ``source`` buffers, how many channels should be processed. The default of -1 indicates to process up through the last channel in ``source``.

:control destination:

The |buffer| to write the flattened data to
The |buffer| to write the flattened data to.

:control axis:

Whether to group points channel-wise or frame-wise

Whether to flatten the buffer channel-wise (1) or frame-wise (0). The default is 1 (channel-wise).
46 changes: 21 additions & 25 deletions doc/BufMFCC.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,59 +4,64 @@
:sc-related: Guides/FluidCorpusManipulationToolkit, Guides/FluidBufMultiThreading, Classes/FluidBufMelBands
:see-also:
:description:
This class implements a classic spectral descriptor, the Mel-Frequency Cepstral Coefficients (https://en.wikipedia.org/wiki/Mel-frequency_cepstrum). The input is first filtered in to **numBands** perceptually-spaced bands, as in Classes/FluidMelBands. It is then analysed into **numCoeffs** number of cepstral coefficients. It has the advantage of being amplitude invariant, except for the first coefficient. It is part of the Guides/FluidCorpusManipulationToolkit of Guides/FluidCorpusManipulationToolkit. For more explanations, learning material, and discussions on its musicianly uses, visit http://www.flucoma.org/

The process will return a single multichannel buffer of **numCoeffs** per input channel. Each frame represents a value, which is every hopSize.

MFCC stands for Mel-Frequency Cepstral Coefficients ("cepstral" is pronounced like "kepstral"). This analysis is often used for timbral description and timbral comparison. It compresses the overall spectrum into a smaller number of coefficients that, when taken together, describe the general contour the the spectrum.

The MFCC values are derived by first computing a mel-frequency spectrum, just as in :fluid-obj:`MelBands`. ``numCoeffs`` coefficients are then calculated by using that mel-frequency spectrum as input to the discrete cosine transform. This means that the shape of the mel-frequency spectrum is compared to a number of cosine wave shapes (different cosines shapes created from different different frequencies). Each MFCC value (i.e., "coefficient") represents how similar the mel-frequency spectrum is to one of these cosine shapes.

Other that the 0th coefficient, MFCCs are unchanged by differences in the overall energy of the spectrum (which relates to how we perceive loudness). This means that timbres with similar spectral contours, but different volumes, will still have similar MFCC values, other than MFCC 0. To remove any indication of loudness but keep the information about timbre, we can ignore MFCC 0 by setting the parameter ``startCoeff`` to 1.

For more information visit https://learn.flucoma.org/reference/mfcc/.

For an interactive explanation of this relationship, visit https://learn.flucoma.org/reference/mfcc/explain.

:control source:

The index of the buffer to use as the source material to be described through the various descriptors. The different channels of multichannel buffers will be processing sequentially.
The index of the buffer to use as the source material to be analysed. The different channels of multichannel buffers will be processing sequentially.

:control startFrame:

Where in the srcBuf should the process start, in sample.
Where in the ``srcBuf`` the analysis should start, in samples. The default is 0.

:control numFrames:

How many frames should be processed.
How many frames should be analysed. The default of -1 indicates to analyse to the end of the buffer.

:control startChan:

For multichannel srcBuf, which channel should be processed first.
For a multichannel ``srcBuf``, which channel should be processed first. The default is 0.

:control numChans:

For multichannel srcBuf, how many channel should be processed.
For a multichannel ``srcBuf``, how many channels should be processed. The default of -1 indicates to analyse through the last channel.

:control features:

The destination buffer for the numCoeffs coefficients describing the spectral shape.
The destination buffer to write the MFCC analysis into.

:control numCoeffs:

The number of cepstral coefficients to be outputed. It will decide how many channels are produce per channel of the source.
The number of cepstral coefficients to return. The default is 13.

:control numBands:

The number of bands that will be perceptually equally distributed between **minFreq** and **maxFreq**.
The number of bands that will be perceptually equally distributed between ``minFreq`` and ``maxFreq``. The default is 40.

:control startCoeff:

The lowest index of the output cepstral coefficient, zero-counting.
The lowest index of the output cepstral coefficients to return, zero-counting. This can be useful to skip over the 0th coefficient (by indicating ``startCoeff`` = 1), because the 0th coefficient is representative of the overall energy in spectrum, while the rest of the coefficients are not affected by overall energy, only the mel-frequency spectral contour. The default is 0.

:control minFreq:

The lower boundary of the lowest band of the model, in Hz.
The lower bound of the frequency band to use in analysis, in Hz. The default is 20.

:control maxFreq:

The highest boundary of the highest band of the model, in Hz.
The upper bound of the frequency band to use in analysis, in Hz. The default is 20000.

:control windowSize:

The window size. As MFCC computation relies on spectral frames, we need to decide what precision we give it spectrally and temporally, in line with Gabor Uncertainty principles. http://www.subsurfwiki.org/wiki/Gabor_uncertainty
The window size. As MFCC computation relies on spectral frames, we need to decide what precision we give it spectrally and temporally, in line with Gabor Uncertainty principles. http://www.subsurfwiki.org/wiki/Gabor_uncertainty. The default is 1024.

:control hopSize:

Expand All @@ -68,13 +73,4 @@

:control padding:

Controls the zero-padding added to either end of the source buffer or segment. Possible values are 0 (no padding), 1 (default, half the window size), or 2 (window size - hop size). Padding ensures that all input samples are completely analysed: with no padding, the first analysis window starts at time 0, and the samples at either end will be tapered by the STFT windowing function. Mode 1 has the effect of centering the first sample in the analysis window and ensuring that the very start and end of the segment are accounted for in the analysis. Mode 2 can be useful when the overlap factor (window size / hop size) is greater than 2, to ensure that the input samples at either end of the segment are covered by the same number of analysis frames as the rest of the analysed material.

:control maxNumCoeffs:

The maximum number of cepstral coefficients that can be computed. This sets the number of channels of the output, and therefore cannot be modulated.

:control maxFFTSize:

How large can the FFT be, by allocating memory at instantiation time. This cannot be modulated.

Controls the zero-padding added to either end of the source buffer or segment. Possible values are 0 (no padding), 1 (default, half the window size), or 2 (window size - hop size). Padding ensures that all input samples are completely analysed: with no padding, the first analysis window starts at time 0, and the samples at either end will be tapered by the STFT windowing function. Mode 1 has the effect of centring the first sample in the analysis window and ensuring that the very start and end of the segment are accounted for in the analysis. Mode 2 can be useful when the overlap factor (window size / hop size) is greater than 2, to ensure that the input samples at either end of the segment are covered by the same number of analysis frames as the rest of the analysed material.
Loading