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.
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)
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: email@example.com 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!
----------begin_max5_patcher---------- 1791.3oc0b1sbahCEG+5jmBML6N6tc75vQeAr2sOG6zYGBV1gVavCfaSamtO 6KffDmD4HkD3XkKpcMFK8W+zQ5bzQh7iKuH35xaU0Aj+h7OjKt3GWdwE8Wp6 BWL74KB1kda11z59aKHqb2NUQSvB820ntso+5M2jWS1mV0PVmu4PkplTdng7 0aRaHkYMoeQQ9V4geqRQxKF+sayKTYkGJ5K.1vEWWs4ZsdBWFt3nWfkgjONb S4q5qyxq+zexiFKt8sUZqxRaxKK92JUVitXhBi5947jGTd2UTqKKZpy+tp6l AZ62pubwgc4EaUM8MZ39K11nFu53stOsI6l7hMGWm8kDgy6qZHLo+SwOpZKR 20WsA+cUd51ftu3mWdY2KKdicF6R2uuUQjrapJ20BjLxWR2dnsOooj7oC0Mj U4oMkEsWuNKcqZIQUjktu9v1zFEIsXEYW5mUjckscWkqIM2zBVx5xp1e150p p1Zjzn1sWUk1U60KM1gxescnhf4rqgKh6pbQnVCZqBIcx6ZTeeUZ1+E7z1GC rXvxh5MdhYRiFrOn4SeoMeVTeoFS6KWtX7UxGeEswMo4EFahT2Zhx3vWaSjZ sIJk7t2zMTfeb4qKmlusWo+EA04aJZ6lWPBx6LdeMrnP801l9SFIl8srsJiL h4Hi3xW87VlQG7bnq2fPxNx5f5B4l3AOsB9ZUkIpEZgZRYuzErnId19mwfar NoB8LK1oVmUVqw10oEalbzY1Nbe4WMfSZRvbZNM.lAWuLlcvrdaYZCRHogPI 4lfhL.AqEt9MFcovQqE8TSSJYZwcqtMw.g0YmzSxBI3MNab1IsqaWFmoMmvc j1GZCrwDQ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p Zh6hlD3120sOCVG2wdg96hBgtUdJ6VHwaTecOQl1ssPNtEpKZBd.X8GMgHmX tnIjikJzAM08Pq9R56jxjN6cQDSeVoz+o1Hh81s9cYFCFtQzz8bhacFCZBpV +ToK8pH6AxIMgqGHpKQz7nobmcuhRWGQhnl3dXzCLOTSTOTSfGpoP+SSNsPB bG1ANMrC2f8nNMrC4fXbQR3FqmS8b3FnhvoAc3JIWlaBW6agKSgSQVStXfCH 204hENt4BxEiIbikykP4hQWQ1VrRB5JxVxWgPzkjsbTC.5RxVp7Ab855RVNA bGuk3eRBB8PMAdnlndnlbIYq.xwB3fjvcgSfSQmfrlbwyKfb3ItrBSH1S0Df ZXbvD20wn8GSGPlnOsNz696lvTreQVWt.tNloNsDlP70j0rj+BioZXmE.8QD eXWG5+zaUsNstTjyUsKARvPNuvtDCn.Wm1Bwbmaw1O7yK+e.1pbBV -----------end_max5_patcher-----------
Also consider using the Microtuner patch for that.
All related info and download links here:
Forums > MaxMSP