Chance Percentage For Pitch Generation
This week I wanted to talk about my new Max patcher that I've created. I wanted to try and replicate the functionality on my Square Pyramid sequencer. One of its chance functions is really quite simple. It takes any incoming note either in the sequence or playing live and has a percentage chance of whether it will add or subtract to the pitch of that note based on a range in midi. I started on this last week and I've been continuing it this week. You'll be able to download it in the Resources section of my blog for your own use. I wanted to include the basics first so I have a keyslider object and also included a simple sow wave synth output with make note and velocity control. Where it gets really fun is a gate that either allows the basic note to play through or the modified note. The way this works is setting a 100% value split between zero and one meaning that the higher chance increases the more likely gate one will open which lets the modified note through. Like a lot of my chance objects this uses an itable to do this split because it already has inbuilt functionality to randomly output one of the values based on percentage in the itable object. At first I started with a flat increase or decrease to the note so for example if I have an increase of two and I use mid note 62 then either 62 or 64 will come out. That just uses an integer to control so this could be a decrease or an increase. But this week I've also added a random amount in a range which I think is more interesting and closer to the square pyramid functionality. This is done with an expression function that randomly outputs in number between two values and when I set the value of the range it could be between I add and subtract that from the default note that's playing so that I get essentially three numbers. Those are the number that could play, the range beneath it, and the range above it. It's been on my to-do list for awhile and I'm pretty glad that I've created it. I think it'll be a great addition to many of my other patchers. I have some next steps I want to do with it. Feel free to download it and use it as a lesson plan to implement the next feature, included in the comment. What a powerful way to learn! I hope you get a lot of enjoyment and use out of it as well.