Question about K-Slider
Sorry because this is probably such a dumb question, and sorry if this isn't supposed to go here. I'm doing a project for my music tech class and I have to know how to get the K-slider to play in different temperments other than just 12-tone. I emailed my teacher and he gave me this response: "A few ways to do it--the quick down and dirty way might be to use the sel object to take a MIDI pitch number (C=60, etc.) and set it to bang a message box with a specific frequency to a cycle~ object. I'd also map the velocity of kslider to the gain~ object (which would be receiving the cycle~ object signal" but I'm not exactly sure what he's saying. I am a total noob when it comes to Max and I would really appreciate it if someone could explain things to me in really simple terms that a person who hardly knows anything about Max could understand. If you have any questions as to what I need to know, feel free to ask.
Thanks!
If any of you know and could answer right away, it would really help. I'm supposed to know by tomorrow.
The "down and dirty" way he is talking about is assigning each note of the keyboard (C4, A2; or 72, 57) a specific pitch. When you play a note on the keyboard a message assigned to that key with a specific frequency would set a [cycle~] object to that frequency, and thus any note on the keyboard could be assigned to a different frequency, regardless of position.
The way I would suggest, since I'm guessing he wants you to set it to output Meantone, Pythagorean and Just intonation is to first set up a formula that finds what scale degree a note is on.
An easy function to figure out what degree of the scale a note is on is to take it's MIDI value and divide it by 12, then take the mantissa (the decimal part) and find out which degree of the scale that mantissa value correlates to (it will be the same over all octaves).
1st degree of scale is: 0.
2nd degree is: .083 (1/12)
3rd degree is: .167 (1/6)
etc.
From there you can create a formula that takes into account the scale degree and which octave it's in (the number before the decimal) and outputs tones that will be in a certain tuning.
This stuff is fun stuff.
There are easier ways to do it, but the way in which I described goes about it in a way that makes logical sense and doesn't involve tedious assignment of specific notes specific pitches.
Thanks so much for responding! I get what you're saying about both parts, but the thing is I'm not good at actually doing it. How would I physically do the first way and assign different pitches different values? If I did it the second way, how do I make a formula that would actually change the pitches played on the keyboard?
The values would be C=0, C#=.083, and if you were to do it in a higher octave, C=1.0, C#=1.083, etc. and those values would change based on what temperment I was using, but I'm not sure how I would actually physically make those changes.
Thanks so much for responding! If you could help me even further I would be very grateful.
Quote: burbankd1@mail.montclair.edu wrote on Wed, 30 April 2008 20:05
----------------------------------------------------
> How would I physically do the first way and assign different pitches different values? If I did it the second way, how do I make a formula that would actually change the pitches played on the keyboard?
----------------------------------------------------
Here are the two ways using your teacher's suggestions and Eli's (though I do some tedious assignment of pitches, but only for 11 of them). Please let me know what grade we get on the assignment. ;) In the first way I only did a few notes so you can fill in the rest. For the second way you'd have to set up similar mappings of expr objects (or however you want to do the math) for each temperament. You've done the tutorials right? There are many other solutions, perhaps this will get you thinking in new directions and you can come up with some. Have fun!
Also consider using the Microtuner patch for that.
All related info and download links here: