You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
64 lines
2.1 KiB
Plaintext
64 lines
2.1 KiB
Plaintext
TITLE:: FluidWaveform
|
|
summary:: Buffer waveform display with optional overlays
|
|
categories:: Libraries>FluidCorpusManipulation
|
|
related:: Classes/FluidPlotter, Classes/FluidBufNoveltySlice, Classes/FluidBufOnsetSlice, Classes/FluidBufAmpSlice
|
|
|
|
DESCRIPTION::
|
|
FluidWaveform plots a buffer with optional overlays such as slices derived from a FluCoMa Slicer.
|
|
|
|
CLASSMETHODS::
|
|
|
|
METHOD:: new
|
|
Create a new instance of FluidWaveform.
|
|
|
|
ARGUMENT:: audio_buf
|
|
The audio buffer to plot.
|
|
|
|
ARGUMENT:: slices_buf
|
|
A buffer of slice indices. This will very likely be in the form of a buffer output from a FluCoMa slicer object. Currently this buffer must be only one channel, therefore it will not work with the output of link::Classes/FluidBufAmpGate::.
|
|
|
|
ARGUMENT:: bounds
|
|
A link::Classes/Rect:: of where to place the FluidWaveform.
|
|
|
|
returns:: A new instance of FluidWaveform.
|
|
|
|
|
|
INSTANCEMETHODS::
|
|
|
|
EXAMPLES::
|
|
|
|
code::
|
|
|
|
s.boot;
|
|
// load a sound to slice
|
|
~drums = Buffer.read(s,File.realpath(FluidBufAmpSlice.class.filenameSymbol).dirname.withTrailingSlash ++ "../AudioFiles/Nicol-LoopE-M.wav");
|
|
|
|
// create a buffer to put indices into
|
|
~indices = Buffer(s);
|
|
|
|
// do a slice analysis
|
|
FluidBufAmpSlice.process(s,~drums,indices:~indices,fastRampUp: 10,fastRampDown: 2205,slowRampUp: 4410,slowRampDown: 4410,onThreshold: 10,offThreshold: 5,floor: -40,minSliceLength: 4410,highPassFreq: 20);
|
|
|
|
// plot the buffer with the indices overlayed
|
|
FluidWaveform(~drums,~indices,nil,Rect(0,0,800,200));
|
|
|
|
// do a descriptor analysis
|
|
~features = Buffer(s);
|
|
FluidBufLoudness.process(s,~drums,features:~features,action:{"done".postln;});
|
|
|
|
// copy just the first channel of that buffer to display it
|
|
~features2 = Buffer(s);
|
|
FluidBufCompose.process(s,~features,numChans:1,destination:~features2);
|
|
|
|
// plot the audio with the slices and the loudness analysis
|
|
FluidWaveform(~drums,~indices,~features2,Rect(0,0,1200,300));
|
|
|
|
// with gate info
|
|
~gate_analysis = Buffer(s);
|
|
FluidBufAmpGate.process(s,~drums,indices:~gate_analysis,onThreshold:-35,offThreshold:-35,minSliceLength:4410);
|
|
|
|
// it will plot the ons and offs
|
|
FluidWaveform(~drums,~gate_analysis,~features2,Rect(0,0,1200,300));
|
|
|
|
::
|