Scale larger then octave

Hello, ist Scale restricted to scales that repeat after one octave, or can it be used for intevallic structures that repeat after multiple octaves or even any interval? Thanks

yes you can have scales with larger or smaller octaves -
you do this by using a stretched or shrunk octave Tuning - Tunings are created with an octaveRatio argument…

Scale.all.put(\test, Scale((0..11),12, Tuning((0..11)*3/2 ,octaveRatio:3))) 
Scale.test.ratios.do(_.postln)
Pbind(\degree,Pseq((0..12),inf),\scale,Scale.test,\dur,0.3).play
1 Like

Thanks - will have a look into that.
you might have a typo in there - should be “\dur, 0.3” not “dur: 0.3”

1 Like

Hello - I run into trouble with this method when creating midi files - any idea what happens here?

(
// create a chord form a scale that is larger then an octave:
Scale.all.put(\test, Scale((0..11), 12, Tuning(Array.series(12, 0, 3), octaveRatio: 8)));

a = Pbind(
	\dur, Pseq([1/4], 4),
	\degree, Pseries(),
	\scale, Scale.test,
	\root, -24,
);

f=SimpleMIDIFile("~/tmp.mid");
f.fromPattern(a);
f.write;

)

(
// test it:
a.play; // plays back dimished chord
f.plot; // shows diminished chords
f.midiEvents.dopostln; // shows diminished chords
)

(
// test the created midi-file:
f = SimpleMIDIFile.read("~/tmp.mid");
f.midiEvents.dopostln; // different notes - why?
)