SuperCollider CLASSES (extension)

BStore

Radicles Buffer Store
Inherits from: Store : Radicles : Object

Description

Manage Buffers for Radicles

Class Methods

*add (type, settings, function)

Add a new BStore object.

Arguments:

type

type setting.

settings

settings.

function

format

*remove (type, format, settings)

Removes BStore object.

Arguments:

type

type setting.

format

settings.

settings

format.

Inherited class methods

Undocumented class methods

*addAll (array, function)

*addAlloc (settings, function)

*addCue (settings, path, function)

*addIR (settings, path, function)

*addPlay (settings, path, function)

*addRaw (type, format, settings, function)

*addSampler (settings, path, function)

*allocCount

*allocCount = value

*bstoreTags

*buffByArg (argument, index)

*buffByFormat (format)

*buffByID (bstoreID)

*buffBySetting (setting)

*buffByTag (bstoreID)

*buffByType (type)

*buffIDstoStrArr (bstoreIDArr)

*buffStrByID (bstoreID)

*cueCount

*cueCount = value

*diskBufSize

*diskBufSize = value

*diskStart

*diskStart = value

*getDirPath (format: 'audio', directory, subDir)

*getIRPath (format: 'audio', samplerName: 'str')

*getPlayPath (format: 'audio', fileName: 'test')

*getSamplerPath (format: 'audio', samplerName: 'str')

*playFolder

*playFolder = value

*playFormat

*playFormat = value

*playPath

*removeAll

*removeByArg (argument, index)

*removeByFormat (format)

*removeByIndex (index)

*removeBySetting (setting)

*removeByType (type)

*removeID (ids)

*removeIndices (indices)

*samplerFormat

*samplerFormat = value

*samplerPath

*setBufferID (buffer, blockFuncString)

*updateFree

Instance Methods

Inherited instance methods

Examples

BStore.playFormat = \scpv;
BStore.playFormat = \audio;

BStore.add(\play, \marilyn1);
BStore.add(\play, \marilyn1, {|buf| buf.play});

BStore.add(\play, \SinedPink);

BStore.add(\alloc, [\alloc0, 44100,2]);
BStore.add(\alloc, [\alloc1, 44100,2]);

BStore.add(\cue, [\cue1, \marilyn1], {|buf| buf.postln });
BStore.add(\cue, [\cue2, \marilyn1], {|buf| buf.postln });

BStore.bstoreIDs
BStore.bstores.dopostln

BStore.bstoreIDs
BStore.bstores

BStore.bstores.flat.do{|item| item.postln};

BStore.removeBStores;

BStore.add(\cue, [\cue1, \marilyn1], {|buf| {DiskIn.ar(buf.numChannels, buf.bufnum, 1)}.play } );
BStore.add(\cue, [\cue2, \marilyn1], {|buf| {DiskIn.ar(buf.numChannels, buf.bufnum, 1)}.play } );
BStore.add(\play, \marilyn1, {|buf| buf.play});
BStore.add(\alloc, [\alloc0, 44100,2]);
BStore.add(\alloc, [\alloc1, 44100,2]);

BStore.buffByType(\cue); //get buffers by type
BStore.buffByFormat(\cue1);  //get buffers by format
BStore.buffByFormat(\cue2);
BStore.buffByFormat(\alloc0);
BStore.buffBySetting(\marilyn1).dopostln; //get buffers by setting
BStore.buffBySetting([44100,2]).dopostln;


BStore.samplerFormat = \audio;

BStore.add(\sampler, \str, {|buf| buf.postln});

BStore.removeByIndex(0)

BStore.bstoreIDs.dopostln

BStore.removeID([\cue, \cue2, \marilyn1]);

BStore.removeByType(\play);
BStore.removeByType(\alloc);
BStore.removeByType(\sampler);
BStore.bstoreIDs
BStore.bstores.do{|item| item.do{|it| it.postln}};

BufferSystem.bufferArray.dopostln;

DataFile.read(\sampler).postin(\ide, \doln);

BStore.add(\sampler, \hhk, {|buf| buf.do{|item| item.play } });
BStore.add(\sampler, \tom, {|buf| buf.do{|item| item.play } });

BStore.removeBySetting(\hhk);
BStore.removeBySetting(\tom);

BStore.bstoreIDs.dopostln
BStore.stores.flat.dopostln

BStore.loadBPreset(\test, {|buf| buf.postln});

BStore.bstoreIDs.dopostln;
BStore.remove(\sampler, \audio, \hhk);
BStore.remove(\sampler, \audio, \tom);

BStore.add(\sampler, \gt1, {|buf| buf.postln});

//load impulse response buffers (separate channels)
BStore.add(\ir, [\ortf_s1r1, [0]]);
BStore.add(\ir, [\ortf_s1r1, [1]]);

BStore.buffStrByID([\ir, \audio, [\ortf_s1r1, [0]]]);

BStore.buffIDstoStrArr(BStore.bstoreIDs);


BStore.bstoreIDs;

a = BStore.bstoreIDs;

BStore.removeAll;
//or
BStore.removeBStores;

BStore.addAll(a, {|buf| buf.postln});

BStore.saveBPreset(\test2);
BStore.removeBStores;

BStore.loadBPreset(\test2, {|buf| buf.postln});

BufferSystem.bufferArray.dopostln;

BufferSystem.bufferArray[0]