--- /dev/null
+// generate and save to files intervals
+
+
+(
+s.latency = 0;
+s.recHeaderFormat = "flac";
+~dur = 1;
+~recDir = "~/intervals";
+~roots = (54, 61..80);
+~stepsSeq = (-12..12);
+~stepsPar = (0..12);
+
+~rec = Recorder.new(s);
+~rec.recHeaderFormat = "flac";
+~rec.recSampleFormat = "int24";
+
+~makeSeqSeq = {|midinote=60, steps=12|
+ Pbind(*[
+ instrument: \default,
+ midinote: Pseq([midinote, midinote+steps], 1),
+ dur: ~dur,
+ legato: 0.8,
+ ]);
+};
+
+~makeSeqPar = {|midinote=60, steps=12|
+ Pbind(*[
+ instrument: \default,
+ midinote: Pseq([[midinote, midinote+steps]], 1),
+ dur: ~dur,
+ legato: 0.8,
+ ]);
+};
+
+~gap = 0.2;
+TempoClock.tempo = 1;
+
+~intervalText = (
+ -1200: "1 / ",
+ -1100: "1 / ",
+ -1000: "1 / ",
+ -900: "1 / ",
+ -800: "1 / ",
+ -700: "1 / ",
+ -600: "1 / ",
+ -500: "1 / ",
+ -400: "1 / ",
+ -300: "1 / ",
+ -200: "1 / ",
+ -100: "1 / ",
+ 0: "0 / 1:1",
+ 100: "1 / ",
+ 200: "1 / ",
+ 300: "1 / ",
+ 400: "1 / ",
+ 500: "1 / ",
+ 600: "1 / ",
+ 700: "1 / ",
+ 800: "1 / ",
+ 900: "1 / ",
+ 1000: "1 / ",
+ 1100: "1 / ",
+ 1200: "1 / ",
+);
+)
+
+(
+{
+ var f;
+ f = File((~recDir++"/intervals.txt").standardizePath, "w");
+ // test [sound:par-61-0.flac] унисон вместе
+ ~roots.do{|note|
+ ~stepsSeq.do{|step|
+ var filename = "seq-"++note++"-"++(step*100).round(1)++".flac";
+ var seq = ~makeSeqSeq.value(note, step);
+ f.write("%-%-%,[sound:%],%,%\n".format(
+ note, (step*100).round(1), "seq",
+ filename,
+ step,
+ "последовательно"
+ ));
+ ~rec.record(
+ path: ~recDir++"/"++filename,
+ duration: 2 * ~dur / TempoClock.tempo + (2*~gap)
+ );
+ ~gap.wait;
+ seq.play();
+ (2*~dur).wait;
+ ~gap.wait;
+ ~gap.wait;
+ };
+ ~stepsPar.do{|step|
+ var filename = "par-"++note++"-"++(step*100).round(1)++".flac";
+ var seq = ~makeSeqPar.value(note, step);
+ f.write("%-%-%,[sound:%],%,%\n".format(
+ note, (step*100).round(1), "par",
+ filename,
+ step,
+ "вместе"
+ ));
+ ~rec.record(
+ path: ~recDir++"/"++filename,
+ duration: ~dur / TempoClock.tempo + (2*~gap)
+ );
+ ~gap.wait;
+ seq.play();
+ (~dur).wait;
+ ~gap.wait;
+ ~gap.wait;
+ };
+ };
+ f.close;
+}.fork();
+)
+
+
+