Skip to content

Instantly share code, notes, and snippets.

@jhrr
Created January 15, 2020 15:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jhrr/d8e94fe318c1e58e07808252cffdb334 to your computer and use it in GitHub Desktop.
Save jhrr/d8e94fe318c1e58e07808252cffdb334 to your computer and use it in GitHub Desktop.
// "http://coleingraham.com/2014/09/26/an-approach-to-custom-scales-in-supercollider/"
s.boot;
(
~makeScale = { |ratios|
Scale(
(0..ratios.size-1),
ratios.size,
Tuning((ratios.ratiomidi % 12).sort)
);
};
);
~ratios = [1, 9/8, 6/5, 4/3, 3/2, 8/5, 7/4];
a = ~makeScale.value(~ratios);
b = ~makeScale.value((5/4)*~ratios);
c = ~makeScale.value((3/2)*~ratios);
(
p = Pbind(
\root, 0,
\octave, 5,
\scale, Pstep([a,b,c], 2, inf),
\degree, Pseq((0..a.size), inf),
\dur, 0.125
)
)
p.play;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment