コード例 #1
0
ファイル: reaper_map.py プロジェクト: jamesb93/interferences
from ftis.analyser import (FluidOnsetslice, FluidMFCC, Stats, Standardise,
                           UMAP, ExplodeAudio)
from ftis.process import FTISProcess as Chain
from ftis.corpus import Corpus, PathLoader

analysis = Chain(source=Corpus("../../reaper/highgain_source/bounces"),
                 folder="../outputs/em_detailed_segmentation")

analysis.add(
    # Segmentation
    FluidOnsetslice(framedelta=20,
                    minslicelength=2,
                    filtersize=5,
                    threshold=0.3,
                    metric=0,
                    cache=1),
    ExplodeAudio(),
    # Analysis
    FluidMFCC(discard=True, numcoeffs=20, fftsettings=[4096, 512, 4096]),
    Stats(numderivs=1),
    Standardise(),
    UMAP(components=2))

if __name__ == "__main__":
    analysis.run()
コード例 #2
0
from ftis.analyser import FluidMFCC, Stats, Standardise, UMAP, Normalise, HDBSCluster
from ftis.corpus import CorpusLoader, CorpusFilter
from ftis.process import FTISProcess as Chain

src = "outputs/micro_segmentation/2_ExplodeAudio"
folder = "outputs/quitest"

process = Chain(source=src, folder=folder)

process.add(CorpusLoader(cache=1), CorpusFilter(max_loudness=10, cache=1),
            FluidMFCC(discard=True, cache=1), Stats(numderivs=1, cache=1),
            UMAP(components=10, cache=1), HDBSCluster(minclustersize=5))

if __name__ == "__main__":
    process.run()
コード例 #3
0
"""
Analyse each segment in the 'gestural' pool and cluster it
"""

from ftis.analyser import (FluidMFCC, HDBSCluster, Stats, UMAP, Standardise,
                           Normalise)
from ftis.process import FTISProcess as Chain

src = "outputs/micro_segmentation/2_ExplodeAudio"
folder = "outputs/micro_clustering"

process = Chain(source=src, folder=folder)

process.add(FluidMFCC(cache=True),
            Stats(numderivs=1,
                  flatten=True, cache=False), Standardise(cache=False),
            Normalise(cache=False), UMAP(components=6),
            HDBSCluster(minclustersize=10))

if __name__ == "__main__":
    process.run()
コード例 #4
0
# Description
"""
Arrange segmentations along a single axis using dimension reduction
"""

from ftis.analyser import FluidMFCC, UMAP, Stats, Normalise
from ftis.process import FTISProcess as Chain
from ftis.common.conversion import samps2ms

src = "outputs/micro_segmentation/2_ExplodeAudio/"
folder = "outputs/oned"

process = Chain(source=src, folder=folder)

mfcc = FluidMFCC(cache=True)
stats = Stats(flatten=True, numderivs=1, cache=True)
umap = UMAP(components=1, cache=True)
normalise = Normalise()

process.add(mfcc, stats, umap, normalise)

if __name__ == "__main__":
    process.run()
コード例 #5
0
ファイル: loudest.py プロジェクト: jamesb93/interferences
from ftis.analyser import FluidMFCC, Stats, Standardise, UMAP, Normalise, HDBSCluster
from ftis.common.io import get_duration
from ftis.corpus import CorpusLoader, CorpusFilter
from ftis.process import FTISProcess as Chain
from pathlib import Path
import jinja2

src = "outputs/micro_segmentation/2_ExplodeAudio"
folder = "outputs/loudest"

process = Chain(source=src, folder=folder)
clustering = HDBSCluster(minclustersize=10)
process.add(
    CorpusLoader(cache=1), CorpusFilter(max_loudness=100, min_loudness=75),
    FluidMFCC(discard=True, numcoeffs=20, fftsettings=[8192, 128, 8192]),
    Stats(numderivs=1,
          spec=["median", "max", "min", "stddev", "mean", "skewness"]),
    UMAP(components=2), clustering)

if __name__ == "__main__":
    process.run()

    tracks = {}
    for cluster, items in clustering.output.items():
        track_id = cluster
        pos = 0
        for audiofile in items:

            dur = get_duration(audiofile)
            item = {
                "file": audiofile,
コード例 #6
0
from ftis.analyser import (FluidMFCC, Stats, Standardise, HDBSCluster)
from ftis.process import FTISProcess as Chain
from ftis.corpus import Corpus, PathLoader
from ftis.common.io import get_duration
from pathlib import Path
import jinja2

folder = "../outputs/em_detailed_clustering"
corpus = Corpus("../outputs/em_detailed_segmentation/1_ExplodeAudio").loudness(
    max_loudness=20)
analysis = Chain(source=corpus, folder=folder)

clustering = HDBSCluster(minclustersize=10, cache=1)
analysis.add(
    FluidMFCC(discard=True, numcoeffs=20, fftsettings=[1024, -1, -1], cache=1),
    Stats(numderivs=1, flatten=True, cache=1), Standardise(cache=1),
    clustering)

if __name__ == "__main__":
    analysis.run()

    tracks = {}
    for cluster, items in clustering.output.items():
        track_id = cluster
        pos = 0
        for audiofile in items:
            dur = get_duration(audiofile)
            item = {
                "file": audiofile,
                "length": get_duration(audiofile),
                "start": 0.0,