Merge branch 'main' into FluidPlotter-and-FluidWaveform

nix
tremblap 4 years ago committed by GitHub
commit 7f58e76a79
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -35,7 +35,7 @@ FluidDataSet : FluidDataObject
deletePointMsg{|identifier| ^this.prMakeMsg(\deletePoint,id,identifier.asSymbol);}
deletePoint{|identifier, buffer, action|
deletePoint{|identifier, action|
actions[\deletePoint] = [nil,action];
this.prSendMsg(this.deletePointMsg(identifier));
}

@ -51,4 +51,13 @@ FluidLabelSet : FluidDataObject {
actions[\print] = [string(FluidMessageResponse,_,_),action];
this.prSendMsg(this.printMsg);
}
getIdsMsg{|labelSet|
^this.prMakeMsg(\getIds, id, labelSet.asUGenInput);
}
getIds{|labelSet, action|
actions[\getIds] = [nil,action];
this.prSendMsg(this.getIdsMsg(labelSet));
}
}

@ -70,7 +70,7 @@ FluidNormalize : FluidModelObject {
FluidNormalizeQuery : FluidRTMultiOutUGen {
*kr{ |trig, model,inputBuffer,outputBuffer,min = 0 ,max = 1,invert = 0|
inputBuffer.asUGenInput.postln;
// inputBuffer.asUGenInput.postln;
^this.multiNew('control',trig, model.asUGenInput,
min,max,invert,
inputBuffer.asUGenInput, outputBuffer.asUGenInput)

@ -9,7 +9,7 @@ FluidStats : MultiOutUGen {
init {arg ...theInputs;
inputs = theInputs;
this.specialIndex = (inputs.size - 2).max(0);
this.specialIndex.postln;
// this.specialIndex.postln;
^this.initOutputs(inputs.size - 1,rate);
}

@ -39,6 +39,8 @@ ARGUMENT:: identifier
The identifier for the point.
ARGUMENT:: buffer
A link::Classes/Buffer:: containing the data for the point.
ARGUMENT:: action
A function to run when the operation completes.
METHOD:: getPoint
Retrieve a point from the data set into a link::Classes/Buffer::. If the identifier does not exist an error will be reported.
@ -46,10 +48,15 @@ ARGUMENT:: identifier
The identifier for the point.
ARGUMENT:: buffer
A link::Classes/Buffer:: where the retrieved data will be stored.
ARGUMENT:: action
A function to run when the operation completes.
METHOD:: deletePoint
Remove a point from the data set. If the identifier doesn't exist an error will be reported. ARGUMENT:: identifier
Remove a point from the data set. If the identifier doesn't exist an error will be reported.
ARGUMENT:: identifier
The identifier to be deleted.
ARGUMENT:: action
A function to run when the operation completes.
METHOD:: setPoint
Set the point. If the identifier exists, this method behaves like updatePoint. If the identifier doesn't exist, it behaves like addPoint.
@ -57,46 +64,38 @@ ARGUMENT:: identifier
The identifier for the point.
ARGUMENT:: buffer
A link::Classes/Buffer:: containing the data for the point.
ARGUMENT:: action
A function to run when the operation completes.
METHOD:: clear
Empty the data set.
METHOD:: toBuffer
Dump the content of the dataset to a link::Classes/Buffer::, with optional transposition, and a map of frames/channels to the original IDs as a link::Classes/FluidLabelSet::.
ARGUMENT:: buffer
The buffer to write to. It will be resized.
ARGUMENT:: transpose
If 0, each dataset point becomes a buffer frame, and each dataset dimension becomes a buffer channel. If 1, points become channels, and dimensions become frames.
ARGUMENT:: labelSet
The link::Classes/FluidLabelSet:: in which to dump the point's IDs associated with their reference frame number (or channel number if transposed).
ARGUMENT:: action
A function to run when the dump is done.
METHOD:: fromBuffer
Import to the dataset the content of a link::Classes/Buffer::, with optional transposition, and a map of frames/channels to the original IDs as a link::Classes/FluidLabelSet::.
ARGUMENT:: buffer
The buffer to read from. The dataset will be resized.
ARGUMENT:: transpose
If 0, each buffer frame becomes a dataset point, and each buffer channel becomes a dataset dimension. If 1, channels become points, and frames become dimensions.
ARGUMENT:: labelSet
The link::Classes/FluidLabelSet:: from which to retrieve the point's IDs associated with their reference frame number (or channel number if transposed).
ARGUMENT:: action
A function to run when the import is done.
METHOD:: getIds
Export to the dataset IDs to a link::Classes/FluidLabelSet::.
ARGUMENT:: labelSet
The link::Classes/FluidLabelSet:: to export to. Its content will be replaced.
ARGUMENT:: action
A function to run when the export is done.

@ -33,20 +33,32 @@ ARGUMENT:: identifier
The identifier for this label.
ARGUMENT:: label
The label to update.
ARGUMENT:: action
A function to run when the operation completes.
METHOD:: getLabel
Retrieve the label associated with an identifier. Will report an error if the identifier is not present in the set.
ARGUMENT:: identifier
The identifier for the label to be retrieved.
ARGUMENT:: action
A function to run when the operation completes.
METHOD:: deleteLabel
Delete a label given a certain identifier.
ARGUMENT:: identifier
The identifier to be deleted.
ARGUMENT:: action
A function to run when the operation completes.
METHOD:: clear
Empty the label set.
METHOD:: getIds
Export to the labelset IDs to a link::Classes/FluidLabelSet::.
ARGUMENT:: labelSet
The link::Classes/FluidLabelSet:: to export to. Its content will be replaced.
ARGUMENT:: action
A function to run when the export is done.
METHOD:: print
Post an abbreviated content of the label set in the window by default, but you can supply a custom action instead.

@ -301,4 +301,4 @@ Window.closeAll;
// now set data
~fp.dict_(~dummy_data.(0.01,1,0.0,1.0).postln);
::
::

@ -1,7 +1,7 @@
TITLE:: FluidWaveform
summary:: Buffer waveform display with optional overlays
categories:: Libraries>FluidCorpusManipulation
related:: Classes/FluidPlotter, Classes/FluidBufNoveltySlide, Classes/FluidBufOnsetSlice, Classes/FluidBufAmpSlice
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.

@ -110,6 +110,13 @@ table::
##link::Classes/FluidBufSelectEvery:: || Select every N elements (frame-wise or channel wise)
##link::Classes/FluidBufFlatten:: || Flatten multichannel data into single channel 'point'
::
subsection::Viewers
table::
##link::Classes/FluidPlotter:: || View a FluidDataSet in a plotter window
##link::Classes/FluidWaveform:: || View an audio buffer with overlays, such as slices from a FluCoMa slicer
::
subsection:: Corpus Building
table::
##link::Classes/FluidLoadFolder:: || Load a folder of sounds into a link::Classes/Buffer::

Loading…
Cancel
Save