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);} deletePointMsg{|identifier| ^this.prMakeMsg(\deletePoint,id,identifier.asSymbol);}
deletePoint{|identifier, buffer, action| deletePoint{|identifier, action|
actions[\deletePoint] = [nil,action]; actions[\deletePoint] = [nil,action];
this.prSendMsg(this.deletePointMsg(identifier)); this.prSendMsg(this.deletePointMsg(identifier));
} }

@ -51,4 +51,13 @@ FluidLabelSet : FluidDataObject {
actions[\print] = [string(FluidMessageResponse,_,_),action]; actions[\print] = [string(FluidMessageResponse,_,_),action];
this.prSendMsg(this.printMsg); 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 { FluidNormalizeQuery : FluidRTMultiOutUGen {
*kr{ |trig, model,inputBuffer,outputBuffer,min = 0 ,max = 1,invert = 0| *kr{ |trig, model,inputBuffer,outputBuffer,min = 0 ,max = 1,invert = 0|
inputBuffer.asUGenInput.postln; // inputBuffer.asUGenInput.postln;
^this.multiNew('control',trig, model.asUGenInput, ^this.multiNew('control',trig, model.asUGenInput,
min,max,invert, min,max,invert,
inputBuffer.asUGenInput, outputBuffer.asUGenInput) inputBuffer.asUGenInput, outputBuffer.asUGenInput)

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

@ -39,6 +39,8 @@ ARGUMENT:: identifier
The identifier for the point. The identifier for the point.
ARGUMENT:: buffer ARGUMENT:: buffer
A link::Classes/Buffer:: containing the data for the point. A link::Classes/Buffer:: containing the data for the point.
ARGUMENT:: action
A function to run when the operation completes.
METHOD:: getPoint 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. 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. The identifier for the point.
ARGUMENT:: buffer ARGUMENT:: buffer
A link::Classes/Buffer:: where the retrieved data will be stored. A link::Classes/Buffer:: where the retrieved data will be stored.
ARGUMENT:: action
A function to run when the operation completes.
METHOD:: deletePoint 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. The identifier to be deleted.
ARGUMENT:: action
A function to run when the operation completes.
METHOD:: setPoint METHOD:: setPoint
Set the point. If the identifier exists, this method behaves like updatePoint. If the identifier doesn't exist, it behaves like addPoint. 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. The identifier for the point.
ARGUMENT:: buffer ARGUMENT:: buffer
A link::Classes/Buffer:: containing the data for the point. A link::Classes/Buffer:: containing the data for the point.
ARGUMENT:: action
A function to run when the operation completes.
METHOD:: clear METHOD:: clear
Empty the data set. Empty the data set.
METHOD:: toBuffer 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::. 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 ARGUMENT:: buffer
The buffer to write to. It will be resized. The buffer to write to. It will be resized.
ARGUMENT:: transpose 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. 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 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). 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 ARGUMENT:: action
A function to run when the dump is done. A function to run when the dump is done.
METHOD:: fromBuffer 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::. 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 ARGUMENT:: buffer
The buffer to read from. The dataset will be resized. The buffer to read from. The dataset will be resized.
ARGUMENT:: transpose 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. 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 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). 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 ARGUMENT:: action
A function to run when the import is done. A function to run when the import is done.
METHOD:: getIds METHOD:: getIds
Export to the dataset IDs to a link::Classes/FluidLabelSet::. Export to the dataset IDs to a link::Classes/FluidLabelSet::.
ARGUMENT:: labelSet ARGUMENT:: labelSet
The link::Classes/FluidLabelSet:: to export to. Its content will be replaced. The link::Classes/FluidLabelSet:: to export to. Its content will be replaced.
ARGUMENT:: action ARGUMENT:: action
A function to run when the export is done. A function to run when the export is done.

@ -33,20 +33,32 @@ ARGUMENT:: identifier
The identifier for this label. The identifier for this label.
ARGUMENT:: label ARGUMENT:: label
The label to update. The label to update.
ARGUMENT:: action
A function to run when the operation completes.
METHOD:: getLabel METHOD:: getLabel
Retrieve the label associated with an identifier. Will report an error if the identifier is not present in the set. Retrieve the label associated with an identifier. Will report an error if the identifier is not present in the set.
ARGUMENT:: identifier ARGUMENT:: identifier
The identifier for the label to be retrieved. The identifier for the label to be retrieved.
ARGUMENT:: action
A function to run when the operation completes.
METHOD:: deleteLabel METHOD:: deleteLabel
Delete a label given a certain identifier. Delete a label given a certain identifier.
ARGUMENT:: identifier ARGUMENT:: identifier
The identifier to be deleted. The identifier to be deleted.
ARGUMENT:: action
A function to run when the operation completes.
METHOD:: clear METHOD:: clear
Empty the label set. 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 METHOD:: print
Post an abbreviated content of the label set in the window by default, but you can supply a custom action instead. 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 // now set data
~fp.dict_(~dummy_data.(0.01,1,0.0,1.0).postln); ~fp.dict_(~dummy_data.(0.01,1,0.0,1.0).postln);
:: ::

@ -1,7 +1,7 @@
TITLE:: FluidWaveform TITLE:: FluidWaveform
summary:: Buffer waveform display with optional overlays summary:: Buffer waveform display with optional overlays
categories:: Libraries>FluidCorpusManipulation categories:: Libraries>FluidCorpusManipulation
related:: Classes/FluidPlotter, Classes/FluidBufNoveltySlide, Classes/FluidBufOnsetSlice, Classes/FluidBufAmpSlice related:: Classes/FluidPlotter, Classes/FluidBufNoveltySlice, Classes/FluidBufOnsetSlice, Classes/FluidBufAmpSlice
DESCRIPTION:: DESCRIPTION::
FluidWaveform plots a buffer with optional overlays such as slices derived from a FluCoMa Slicer. 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/FluidBufSelectEvery:: || Select every N elements (frame-wise or channel wise)
##link::Classes/FluidBufFlatten:: || Flatten multichannel data into single channel 'point' ##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 subsection:: Corpus Building
table:: table::
##link::Classes/FluidLoadFolder:: || Load a folder of sounds into a link::Classes/Buffer:: ##link::Classes/FluidLoadFolder:: || Load a folder of sounds into a link::Classes/Buffer::

Loading…
Cancel
Save