musikinformatik / SuperDirt

Tidal Audio Engine

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tuning name parameters

patrickt opened this issue · comments

Hi there,

I've been using a little bit of ~dirt.orbits.each hackery to make orbits pick up a tuningName parameter, and if present pass that tuning name onto the associated Event. This allows specifying any tunings present in Supercollider's Tuning.directory. I wanted to gauge any level of community interest in making this a feature of SuperDirt proper. Let me know 💙

For those interested in doing it themselves:

(
~dirt.orbits.do{ |x|
	x.set(\freq, #{
		var degree = ~n;
		var oct = ~octave;
		var tname = ~tuningName;
		if(tname.isNil, #{ ~midinote.value.midicps},
			Event.default.use {
				~degree = degree;
				~octave = oct;
				~scale = Scale.chromatic(tname ?? 'et12').semitones;
				~freq.value
		})
	}
	);
};
)