From 41780a255ceb6d3b97853ebf63e483eb9d1911d3 Mon Sep 17 00:00:00 2001 From: Owen Green Date: Mon, 14 Dec 2020 21:17:07 +0000 Subject: [PATCH] Update returns --- .../HelpSource/Classes/FluidBufAmpGate.schelp | 3 +-- .../HelpSource/Classes/FluidBufAmpSlice.schelp | 3 +-- .../HelpSource/Classes/FluidBufCompose.schelp | 3 +-- .../HelpSource/Classes/FluidBufFlatten.schelp | 4 +++- release-packaging/HelpSource/Classes/FluidBufHPSS.schelp | 3 +-- .../HelpSource/Classes/FluidBufLoudness.schelp | 3 +-- release-packaging/HelpSource/Classes/FluidBufMFCC.schelp | 3 +-- .../HelpSource/Classes/FluidBufMelBands.schelp | 3 +-- release-packaging/HelpSource/Classes/FluidBufNMF.schelp | 3 +-- .../HelpSource/Classes/FluidBufNMFCross.schelp | 3 ++- .../HelpSource/Classes/FluidBufNNDSVD.schelp | 3 +++ .../HelpSource/Classes/FluidBufNoveltySlice.schelp | 3 +-- .../HelpSource/Classes/FluidBufOnsetSlice.schelp | 3 +-- release-packaging/HelpSource/Classes/FluidBufPitch.schelp | 3 +-- release-packaging/HelpSource/Classes/FluidBufScale.schelp | 3 +-- release-packaging/HelpSource/Classes/FluidBufSines.schelp | 3 +-- .../HelpSource/Classes/FluidBufSpectralShape.schelp | 3 +-- release-packaging/HelpSource/Classes/FluidBufStats.schelp | 3 +-- .../HelpSource/Classes/FluidBufThreadDemo.schelp | 6 ++---- .../HelpSource/Classes/FluidBufThresh.schelp | 3 +-- .../HelpSource/Classes/FluidBufTransientSlice.schelp | 3 +-- .../HelpSource/Classes/FluidBufTransients.schelp | 3 +-- release-packaging/HelpSource/Classes/FluidKDTree.schelp | 5 ++--- release-packaging/HelpSource/Classes/FluidMDS.schelp | 8 +++----- 24 files changed, 33 insertions(+), 50 deletions(-) diff --git a/release-packaging/HelpSource/Classes/FluidBufAmpGate.schelp b/release-packaging/HelpSource/Classes/FluidBufAmpGate.schelp index 643887d..19fda19 100644 --- a/release-packaging/HelpSource/Classes/FluidBufAmpGate.schelp +++ b/release-packaging/HelpSource/Classes/FluidBufAmpGate.schelp @@ -76,8 +76,7 @@ The frequency of the fourth-order link::https://en.wikipedia.org/wiki/Linkwitz%E ARGUMENT:: action A Function to be evaluated once the offline process has finished and indices instance variables have been updated on the client side. The metric will be passed indices as an argument. -RETURNS:: -Nothing, as the destination buffer is declared in the function call. +returns:: an instance of the processor EXAMPLES:: diff --git a/release-packaging/HelpSource/Classes/FluidBufAmpSlice.schelp b/release-packaging/HelpSource/Classes/FluidBufAmpSlice.schelp index c7dbdd5..989527f 100644 --- a/release-packaging/HelpSource/Classes/FluidBufAmpSlice.schelp +++ b/release-packaging/HelpSource/Classes/FluidBufAmpSlice.schelp @@ -70,8 +70,7 @@ ARGUMENT:: highPassFreq ARGUMENT:: action A Function to be evaluated once the offline process has finished and indices instance variables have been updated on the client side. The metric will be passed indices as an argument. -RETURNS:: - Nothing, as the destination buffer is declared in the function call. +returns:: an instance of the processor EXAMPLES:: diff --git a/release-packaging/HelpSource/Classes/FluidBufCompose.schelp b/release-packaging/HelpSource/Classes/FluidBufCompose.schelp index 7a878b0..77d8f45 100644 --- a/release-packaging/HelpSource/Classes/FluidBufCompose.schelp +++ b/release-packaging/HelpSource/Classes/FluidBufCompose.schelp @@ -51,8 +51,7 @@ ARGUMENT:: destGain ARGUMENT:: action A Function to be evaluated once the offline process has finished and destination instance variables have been updated on the client side. The function will be passed destination as an argument. -RETURNS:: - Nothing, as the destination buffer is declared in the function call. +returns:: an instance of the processor DISCUSSION:: It is important to understand the rules used for determining the final desintinaiton buffer dimensions to get the most out of this object. If needs be, the destination buffer will be resized to the maxima of the requsted source numFrames and numChannels. Frames will be written up to the limit of actually available samples (meaning you can create zero padding); channels will be written modulo the available channels, taking into account the channel offsets, meaning you can have channels repeat or loop into the source buffer's channels. See the examples below. diff --git a/release-packaging/HelpSource/Classes/FluidBufFlatten.schelp b/release-packaging/HelpSource/Classes/FluidBufFlatten.schelp index 7acc5e5..2effb3a 100644 --- a/release-packaging/HelpSource/Classes/FluidBufFlatten.schelp +++ b/release-packaging/HelpSource/Classes/FluidBufFlatten.schelp @@ -65,6 +65,8 @@ Whether to group points channel-wise or frame-wise ARGUMENT:: trig Trigger signal to defer / retrigger processing +returns:: an instance of the processor + EXAMPLES:: code:: @@ -89,4 +91,4 @@ FluidBufFlatten.process(s,~pitchdata,~flatdata,axis:1,action:{ }) }) ) -:: \ No newline at end of file +:: diff --git a/release-packaging/HelpSource/Classes/FluidBufHPSS.schelp b/release-packaging/HelpSource/Classes/FluidBufHPSS.schelp index 93cb75e..127be7e 100644 --- a/release-packaging/HelpSource/Classes/FluidBufHPSS.schelp +++ b/release-packaging/HelpSource/Classes/FluidBufHPSS.schelp @@ -105,8 +105,7 @@ ARGUMENT:: fftSize ARGUMENT:: action A Function to be evaluated once the offline process has finished and all Buffer's instance variables have been updated on the client side. The function will be passed [harmonic, percussive, residual] as an argument. -RETURNS:: - Nothing, as the various destination buffers are declared in the function call. +returns:: an instance of the processor Discussion:: HPSS works by using median filters on the spectral magnitudes of a sound. It hinges on a simple modelling assumption that tonal components will tend to yield concentrations of energy across time, spread out in frequency, and percussive components will manifest as concentrations of energy across frequency, spread out in time. By using median filters across time and frequency respectively, we get initial esitmates of the tonal-ness / transient-ness of a point in time and frequency. These are then combined into 'masks' that are applied to the orginal spectral data in order to produce a separation. diff --git a/release-packaging/HelpSource/Classes/FluidBufLoudness.schelp b/release-packaging/HelpSource/Classes/FluidBufLoudness.schelp index 1dd9b68..de6186d 100644 --- a/release-packaging/HelpSource/Classes/FluidBufLoudness.schelp +++ b/release-packaging/HelpSource/Classes/FluidBufLoudness.schelp @@ -54,8 +54,7 @@ ARGUMENT:: hopSize ARGUMENT:: action A Function to be evaluated once the offline process has finished and all Buffer's instance variables have been updated on the client side. The function will be passed [features] as an argument. -RETURNS:: - Nothing, as the destination buffer is declared in the function call. +returns:: an instance of the processor EXAMPLES:: diff --git a/release-packaging/HelpSource/Classes/FluidBufMFCC.schelp b/release-packaging/HelpSource/Classes/FluidBufMFCC.schelp index 1389c0d..a8a6c03 100644 --- a/release-packaging/HelpSource/Classes/FluidBufMFCC.schelp +++ b/release-packaging/HelpSource/Classes/FluidBufMFCC.schelp @@ -62,8 +62,7 @@ ARGUMENT:: fftSize ARGUMENT:: action A Function to be evaluated once the offline process has finished and all Buffer's instance variables have been updated on the client side. The function will be passed [features] as an argument. -RETURNS:: - Nothing, as the destination buffer is declared in the function call. +returns:: an instance of the processor EXAMPLES:: diff --git a/release-packaging/HelpSource/Classes/FluidBufMelBands.schelp b/release-packaging/HelpSource/Classes/FluidBufMelBands.schelp index 4a7d21a..e495fdd 100644 --- a/release-packaging/HelpSource/Classes/FluidBufMelBands.schelp +++ b/release-packaging/HelpSource/Classes/FluidBufMelBands.schelp @@ -63,8 +63,7 @@ ARGUMENT:: fftSize ARGUMENT:: action A Function to be evaluated once the offline process has finished and all Buffer's instance variables have been updated on the client side. The function will be passed [features] as an argument. -RETURNS:: - Nothing, as the destination buffer is declared in the function call. +returns:: an instance of the processor EXAMPLES:: diff --git a/release-packaging/HelpSource/Classes/FluidBufNMF.schelp b/release-packaging/HelpSource/Classes/FluidBufNMF.schelp index 70953ae..32d9271 100644 --- a/release-packaging/HelpSource/Classes/FluidBufNMF.schelp +++ b/release-packaging/HelpSource/Classes/FluidBufNMF.schelp @@ -105,8 +105,7 @@ ARGUMENT:: randomSeed ARGUMENT:: action A Function to be evaluated once the offline process has finished and all Buffer's instance variables have been updated on the client side. The function will be passed [resynth, bases, activations] as an argument. -RETURNS:: - Nothing, as the various destination buffers are declared in the function call. +returns:: an instance of the processor EXAMPLES:: diff --git a/release-packaging/HelpSource/Classes/FluidBufNMFCross.schelp b/release-packaging/HelpSource/Classes/FluidBufNMFCross.schelp index e359dad..bcbc719 100644 --- a/release-packaging/HelpSource/Classes/FluidBufNMFCross.schelp +++ b/release-packaging/HelpSource/Classes/FluidBufNMFCross.schelp @@ -55,6 +55,7 @@ The analsyis FFT size in samples (default = winSize) ARGUMENT:: action A function to run when processing is complete, taking the output buffer as its argument +returns:: an instance of the processor INSTANCEMETHODS:: @@ -69,4 +70,4 @@ t = Buffer.read(s,~path+/+"Tremblay-SA-UprightPianoPedalWide.wav") o = Buffer.new FluidBufNMFCross.process(s,t,b,o,action:{"Ding".postln}) o.play -:: \ No newline at end of file +:: diff --git a/release-packaging/HelpSource/Classes/FluidBufNNDSVD.schelp b/release-packaging/HelpSource/Classes/FluidBufNNDSVD.schelp index 746eee2..af082e7 100644 --- a/release-packaging/HelpSource/Classes/FluidBufNNDSVD.schelp +++ b/release-packaging/HelpSource/Classes/FluidBufNNDSVD.schelp @@ -56,6 +56,9 @@ ARGUMENT:: fftSize ARGUMENT:: action A Function to be evaluated once the offline process has finished and all Buffer's instance variables have been updated on the client side. The function will be passed [destination] as an argument. +returns:: an instance of the processor + + INSTANCEMETHODS:: private:: synth, server diff --git a/release-packaging/HelpSource/Classes/FluidBufNoveltySlice.schelp b/release-packaging/HelpSource/Classes/FluidBufNoveltySlice.schelp index c1d0d87..13436e7 100644 --- a/release-packaging/HelpSource/Classes/FluidBufNoveltySlice.schelp +++ b/release-packaging/HelpSource/Classes/FluidBufNoveltySlice.schelp @@ -70,8 +70,7 @@ ARGUMENT:: fftSize ARGUMENT:: 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. -RETURNS:: - Nothing, as the various destination buffers are declared in the function call. +returns:: an instance of the processor EXAMPLES:: diff --git a/release-packaging/HelpSource/Classes/FluidBufOnsetSlice.schelp b/release-packaging/HelpSource/Classes/FluidBufOnsetSlice.schelp index 8516677..2319289 100644 --- a/release-packaging/HelpSource/Classes/FluidBufOnsetSlice.schelp +++ b/release-packaging/HelpSource/Classes/FluidBufOnsetSlice.schelp @@ -77,8 +77,7 @@ ARGUMENT:: fftSize ARGUMENT:: 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. -RETURNS:: - Nothing, as the destination buffer is declared in the function call. +returns:: an instance of the processor EXAMPLES:: diff --git a/release-packaging/HelpSource/Classes/FluidBufPitch.schelp b/release-packaging/HelpSource/Classes/FluidBufPitch.schelp index 225f068..8a74ebb 100644 --- a/release-packaging/HelpSource/Classes/FluidBufPitch.schelp +++ b/release-packaging/HelpSource/Classes/FluidBufPitch.schelp @@ -68,8 +68,7 @@ ARGUMENT:: fftSize ARGUMENT:: action A Function to be evaluated once the offline process has finished and all Buffer's instance variables have been updated on the client side. The function will be passed [features] as an argument. -RETURNS:: - Nothing, as the destination buffer is declared in the function call. +returns:: an instance of the processor EXAMPLES:: diff --git a/release-packaging/HelpSource/Classes/FluidBufScale.schelp b/release-packaging/HelpSource/Classes/FluidBufScale.schelp index e604433..624dae7 100644 --- a/release-packaging/HelpSource/Classes/FluidBufScale.schelp +++ b/release-packaging/HelpSource/Classes/FluidBufScale.schelp @@ -52,8 +52,7 @@ The output value when the input is inputHigh ARGUMENT:: action A Function to be evaluated once the offline process has finished and indices instance variables have been updated on the client side. The metric will be passed indices as an argument. -RETURNS:: -Nothing, as the destination buffer is declared in the function call. +returns:: an instance of the processor EXAMPLES:: diff --git a/release-packaging/HelpSource/Classes/FluidBufSines.schelp b/release-packaging/HelpSource/Classes/FluidBufSines.schelp index 89d34d2..bd4fda9 100644 --- a/release-packaging/HelpSource/Classes/FluidBufSines.schelp +++ b/release-packaging/HelpSource/Classes/FluidBufSines.schelp @@ -85,8 +85,7 @@ ARGUMENT:: fftSize ARGUMENT:: action A Function to be evaluated once the offline process has finished and all Buffer's instance variables have been updated on the client side. The function will be passed [sines, residual] as an argument. -RETURNS:: - Nothing, as the various destination buffers are declared in the function call. +returns:: an instance of the processor EXAMPLES:: diff --git a/release-packaging/HelpSource/Classes/FluidBufSpectralShape.schelp b/release-packaging/HelpSource/Classes/FluidBufSpectralShape.schelp index 025551c..e231997 100644 --- a/release-packaging/HelpSource/Classes/FluidBufSpectralShape.schelp +++ b/release-packaging/HelpSource/Classes/FluidBufSpectralShape.schelp @@ -67,8 +67,7 @@ ARGUMENT:: fftSize ARGUMENT:: action A Function to be evaluated once the offline process has finished and all Buffer's instance variables have been updated on the client side. The function will be passed [features] as an argument. -RETURNS:: - Nothing, as the destination buffer is declared in the function call. +returns:: an instance of the processor EXAMPLES:: diff --git a/release-packaging/HelpSource/Classes/FluidBufStats.schelp b/release-packaging/HelpSource/Classes/FluidBufStats.schelp index 8b4cb46..d067731 100644 --- a/release-packaging/HelpSource/Classes/FluidBufStats.schelp +++ b/release-packaging/HelpSource/Classes/FluidBufStats.schelp @@ -64,8 +64,7 @@ ARGUMENT:: weights ARGUMENT:: 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 stats as an argument. -RETURNS:: - Nothing, as the destination buffer is declared in the function call. +returns:: an instance of the processor EXAMPLES:: diff --git a/release-packaging/HelpSource/Classes/FluidBufThreadDemo.schelp b/release-packaging/HelpSource/Classes/FluidBufThreadDemo.schelp index d067f25..5978270 100644 --- a/release-packaging/HelpSource/Classes/FluidBufThreadDemo.schelp +++ b/release-packaging/HelpSource/Classes/FluidBufThreadDemo.schelp @@ -27,8 +27,7 @@ ARGUMENT:: time ARGUMENT:: action A function that will be executed upon completion. It is passed the destination buffer as argument. -RETURNS:: - The instance of FluidNRTProcess which can be used to cancel the job. +returns::The instance of FluidNRTProcess which can be used to cancel the job. METHOD:: kr @@ -43,8 +42,7 @@ ARGUMENT:: time ARGUMENT:: doneAction An integer representing an action to be executed when the process is finished. This can be used to free the enclosing synth, etc. See link::Classes/Done:: for more detail. -RETURNS:: - It report the approximate job progress, from 0 to 1. +returns::It report the approximate job progress, from 0 to 1. EXAMPLES:: diff --git a/release-packaging/HelpSource/Classes/FluidBufThresh.schelp b/release-packaging/HelpSource/Classes/FluidBufThresh.schelp index 74cc5b9..436fdda 100644 --- a/release-packaging/HelpSource/Classes/FluidBufThresh.schelp +++ b/release-packaging/HelpSource/Classes/FluidBufThresh.schelp @@ -44,8 +44,7 @@ The threshold under which values will be zeroed ARGUMENT:: action A Function to be evaluated once the offline process has finished and indices instance variables have been updated on the client side. The metric will be passed indices as an argument. -RETURNS:: -Nothing, as the destination buffer is declared in the function call. +returns:: an instance of the processor EXAMPLES:: diff --git a/release-packaging/HelpSource/Classes/FluidBufTransientSlice.schelp b/release-packaging/HelpSource/Classes/FluidBufTransientSlice.schelp index a5e6b2f..f6be935 100644 --- a/release-packaging/HelpSource/Classes/FluidBufTransientSlice.schelp +++ b/release-packaging/HelpSource/Classes/FluidBufTransientSlice.schelp @@ -68,8 +68,7 @@ ARGUMENT:: minSliceLength ARGUMENT:: 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. -RETURNS:: - Nothing, as the destination buffer is declared in the function call. +returns:: an instance of the processor EXAMPLES:: diff --git a/release-packaging/HelpSource/Classes/FluidBufTransients.schelp b/release-packaging/HelpSource/Classes/FluidBufTransients.schelp index e984645..1d7125b 100644 --- a/release-packaging/HelpSource/Classes/FluidBufTransients.schelp +++ b/release-packaging/HelpSource/Classes/FluidBufTransients.schelp @@ -72,8 +72,7 @@ ARGUMENT:: clumpLength ARGUMENT:: action A Function to be evaluated once the offline process has finished and all Buffer's instance variables have been updated on the client side. The function will be passed [transients, residual] as an argument. -RETURNS:: - Nothing, as the various destination buffers are declared in the function call. +returns:: an instance of the processor EXAMPLES:: diff --git a/release-packaging/HelpSource/Classes/FluidKDTree.schelp b/release-packaging/HelpSource/Classes/FluidKDTree.schelp index 45bfe03..cb25c2f 100644 --- a/release-packaging/HelpSource/Classes/FluidKDTree.schelp +++ b/release-packaging/HelpSource/Classes/FluidKDTree.schelp @@ -129,7 +129,7 @@ For instance, whilst fitting the tree against some n-dimensional descriptor data code:: -( + ,( Routine{ var inputBuffer = Buffer.alloc(s,2); var outputBuffer = Buffer.alloc(s,10);//5 neighbours * 2D data points @@ -157,8 +157,7 @@ fork{ ~dsL.load(d, {~dsL.print}); } ) -~dsL.asUGenInput -s.dumpOSC + // Create the buffers, and make a synth, querying our tree with some random points ( Routine{ diff --git a/release-packaging/HelpSource/Classes/FluidMDS.schelp b/release-packaging/HelpSource/Classes/FluidMDS.schelp index 362521a..914098e 100644 --- a/release-packaging/HelpSource/Classes/FluidMDS.schelp +++ b/release-packaging/HelpSource/Classes/FluidMDS.schelp @@ -63,9 +63,9 @@ code:: //Preliminaries: we want some audio, a couple of FluidDataSets, some Buffers, a FluidStandardize and a FluidMDS ( ~audiofile = File.realpath(FluidBufPitch.class.filenameSymbol).dirname +/+ "../AudioFiles/Tremblay-ASWINE-ScratchySynth-M.wav"; -~raw = FluidDataSet(s,\mds_help_12D); -~standardized = FluidDataSet(s,\mds_help_12Ds); -~reduced = FluidDataSet(s,\mds_help_2D); +~raw = FluidDataSet(s); +~standardized = FluidDataSet(s); +~reduced = FluidDataSet(s); ~audio = Buffer.read(s,~audiofile); ~mfcc_feature = Buffer.new(s); ~stats = Buffer.alloc(s, 7, 12); @@ -108,11 +108,9 @@ FluidBufMFCC.process(s,~audio, features: ~mfcc_feature); //Then apply the MDS in-place on the standardized data to get 2 dimensions, using a Euclidean distance metric //Download the DataSet contents into an array for plotting ( - ~reducedarray = Array.new(100); ~standardizer.fitTransform(~raw, ~standardized); ~mds.fitTransform(~standardized, ~reduced, action:{ - "HETE".postln; ~reduced.dump{|x| 100.do{|i| ~reducedarray.add(x["data"][i.asString]) }}});