From 932c04717a9cef0e252d22b4b070b110ed1c5c60 Mon Sep 17 00:00:00 2001 From: Mike Lynch Date: Sat, 23 Sep 2023 15:05:08 +1000 Subject: [PATCH] Added routine to dump all four buffers --- granulator.scd | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/granulator.scd b/granulator.scd index b92d226..017fabb 100644 --- a/granulator.scd +++ b/granulator.scd @@ -1,4 +1,5 @@ + ( ~modes = [ [ "saw", \pos_saw ], @@ -8,6 +9,9 @@ [ "random", \pos_random ] ]; +~outputDir = Platform.recordingsDir +/+ "GrainBuffers"; + + ~grainsb = Bus.audio(s, 2); ~granulators = Array.new(4); @@ -31,7 +35,6 @@ ~granulators.add(Granulator.new(~buflen, ~infxb, ~grainsb, pb, rtb)); }); -"Granulators running".postln; // launch the pos synths and triggers to sync the buffer recorders @@ -55,6 +58,10 @@ ~granulators[track].mode_(mode); }; - +~dumpbuffers = { |prefix| + (0..3).do({|i| + var filename = ~outputDir +/+ prefix ++ 'buffer' ++ i.asString ++ '.aiff'; + ~granulators[i].buffer.write(filename); + }); +} ) -