typo corrections in new helpfiles

nix
Pierre Alexandre Tremblay 6 years ago
parent 14aec9832a
commit fb64db6d50

@ -82,10 +82,11 @@ b = Buffer.read(s,~randomsoundfile.path,action:{"Sound Loaded".postln});
FluidBufPitch.process(s,b,numFrames:512 * 10,numChans:1,features:~pitchdata,action:{"Pitch Analysis Done".postln});
// Flatten and print the flat buffer. We expect to see larger numbers (20-2000) interleaved with smaller (0-1)
(
FluidBufFlatten.process(s,~pitchdata,~flatdata,action:{
~flatdata.loadToFloatArray(action:{ |a|
a.postln;
})
})
)
::

@ -33,10 +33,12 @@ s.reboot;
~ds = FluidDataSet(s,\FluidDataSetWr);
)
(
{
var b = LocalBuf.newFrom([0,1,2,3]);
FreeSelfWhenDone.kr(FluidDataSetWr.kr("help_data_point",b,~ds));
}.play(s);
)
~ds.print;

@ -49,7 +49,7 @@ code::
var pitch, stats,statsbuf,label,voice;
label = data.key;
voice = data.value[\voice];
statsbuf = LocalBuf(7);
statsbuf = LocalBuf(7,4);
pitch = FluidBufPitch.kr(src,start,num,features:~featurebuffers[voice]);
stats = FluidBufStats.kr(~featurebuffers[voice],stats:statsbuf,trig:Done.kr(pitch));
FluidDataSetWr.kr(label,statsbuf,~mydataset,Done.kr(stats))
@ -84,7 +84,8 @@ EXAMPLES::
code::
s.reboot;
//Load all the Fluid Corpus Manipulation audio f
//Load all the Fluid Corpus Manipulation audio files
(
~path = File.realpath(FluidLoadFolder.class.filenameSymbol).dirname +/+ "../AudioFiles";
~loader = FluidLoadFolder(~path);
@ -96,12 +97,15 @@ s.reboot;
~pitchbufs = 4.collect{Buffer.new};
~statsbufs = 4.collect{Buffer.new};
)
//segment
~slicer.play(s,~loader.buffer,~loader.index,{|dataDictionary| "Slicing done".postln;});
//In the interests of brevity, let's just take a subset of the slices and process these
~subset = IdentityDictionary.newFrom(~slicer.index.asSortedArray[0..3].flatten(1));
~subset = IdentityDictionary.newFrom(~slicer.index.asSortedArray[0..7].flatten(1));
//write pitch statistics into a dataset
(
~extractor = FluidProcessSlices({|src,start,num,data|
var pitch, stats, label,i;
i = data.value[\voice];
@ -110,7 +114,10 @@ s.reboot;
stats = FluidBufStats.kr(~pitchbufs[i],stats:~statsbufs[i],trig:Done.kr(pitch));
FluidDataSetWr.kr(label,~statsbufs[i],~pitchdata,Done.kr(stats))
});
)
~extractor.play(s,~loader.buffer,~subset,{"Feature extraction done".postln});
//view the data
~pitchdata.print
::

@ -6,7 +6,7 @@ related:: Classes/FluidLoadFolder, Classes/FluidProcessSlices, Classes/FluidBufO
DESCRIPTION::
A utility class that abstracts the boiler plate code involved with batch slicing a buffer containing distinct chunks of audio (a 'corpus' for these purposes).
Whilst this class is designed to be used most easily in conjunction with link::Classes/FluidLoadFolder::, it doesn't have to be. However, it does excpect to be passed an link::Classes/IdentityDictionary:: of a particular format (see link::#indexFormat#description below::).
Whilst this class is designed to be used most easily in conjunction with link::Classes/FluidLoadFolder::, it doesn't have to be. However, it does expect to be passed an link::Classes/IdentityDictionary:: of a particular format (see link::#indexFormat#description below::).
The actual mechanism for doing the slicing is provided by the user, in the form of a function that will form part of a larger link::Classes/Synth:: (see link::#sliceFuncDescription#below::).
@ -88,10 +88,13 @@ s.reboot
~loader.play(s,action:{ |dataDictionary| "Done loading".postln});
)
(
~slicer = FluidSliceCorpus({ |src,start,num,dest|
FluidBufOnsetSlice.kr(src,start,num,indices:dest, threshold:0.7)
});
)
(
~slicer.play(s,~loader.buffer,~loader.index,{|dataDictionary|
"Slicing done".postln;
//we get passed an IdentityDictionary of slice data, let's look at it
@ -102,6 +105,5 @@ s.reboot
')'.postln;
}
});
)
::

Loading…
Cancel
Save