[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [sc-users] Re: Tunings beyond 12 notes..
To add to the excitement: ~freqToNote doesn't take ~octaveRatio into
account, and whenever ~freqToScale encounters a frequency it can't
handle, it crashes because of a typo in the error message constructor.
I can clean this stuff up while I'm in there, but as a very occasional
developer, I'm a bit reluctant to mess with such an important class as
Event except insofar as it interfaces with Scale. Maybe I should make
tests that fail and let someone else fix them?
(
e = (degree: 5, scale: (0..11), octaveRatio: 1.9).play;
f = { |event|
event.make {
var freq = ~freq.value;
~note.value.debug("note");
~midinote.value.debug("midinote");
freq.debug("freq");
~freqToNote.(event, freq).debug("freqToNote");
// crashes! Error message in ~freqToNote tries to do freq[i],
should be just freq
//~freqToScale.(event, freq).debug("freqToScale");
};
};
f.(e);
// note: 5
// midinote: 63.472497819586
// freq: 319.73536872257
// freqToNote: 4.6299970927811
)
_______________________________________________
sc-users mailing list
info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/