We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hello! I'm trying to use SoundCipher functions like playNote() and playChord() in my project. How can I tell which pitch values are equivalent to which musical notes? Sorry if this is a silly question -- I don't really know how music works. :)
Thanks for your help!
Answers
Assuming you mean e.g. the notes played by the keys of a piano, does this help?
https://en.m.wikipedia.org/wiki/Piano_key_frequencies
The numbers may surprise you -- rather than being 100, 200, 300 they are irregular in regular ways. If you dig into musical theory a bit more -- e.g. octaves -- there is a lot to learn about how these intervals work.
https://en.m.wikipedia.org/wiki/Octave
But for now, you could just transcribe notes using a lookup table.
I can't view the tutorial site from my phone, but there is a Scales entry that might be useful:
http://explodingart.com/soundcipher/tutorials.html
Ah, it was right here in the reference:
http://explodingart.com/soundcipher/doc/arb/soundcipher/constants/PitchClassSets.html
I'm guessing you want sc.MAJOR, which looks like it returns a float array of pitches -- probably 7 notes in C Major, running up the white keys on the piano. MAJOR_MINOR might be an 11-key run of white and black keys? I'm just guessing -- play around with it.
Thanks so much!