Computer Music

> Step by step

4. Making a parameter control

-

1 “Drag in a live. dial. This is going to be our control to change the sample rate Ratio setting. When the slider is at 1, we’ll be working at your system’s sample rate, maybe 44.1kHz; when it’s at 0.5, we’ll be working at half your system sample rate, maybe 22kHz.” 2 “Connect this dial to this second inlet. Select the live. dial, and let’s customise and change some of the really important properties. The first one is the name: double-click on the long name section and type in Ratio. You can see it hasn’t updated the GUI: the long name is related to Live’s automation. The short name is the one that works with the GUI, so type that in and it updates.” 3 “The next thing to consider is what type of numbers this dial kicks out. We want it to be a floating point number – ie, one with a decimal place – so the data Type is Float. If you hover over the degrade~ input inlet, it says ‘(float)’, so we’ve got a clue inside each object regarding what data type or number the input needs.” 4 “Range/Enum is the range of numbers the slider can kick out. We’ll go not quite from 0 to 1 – we don’t want to take the Ratio all the way to 0. Change the values to 0.1 1.. This tells Max to use floating point numbers from a maximum setting of 1 to a lowest setting of 0.1.” 5 “The last stuff we want to put inside this particular object – probably the final important parameter – is our Unit Style. This lets us customise the GUI. If we were using a filter, we’d want the display for the slider to be in Hz. If it’s a volume control, it should probably be in dB.” 6 “This particular control is a bit wacky – it’s a ratio, so we want to set the Unit Style to float, so we can have decimal places on our dial. So, we’ve got Type, Range and Unit Style – these are three really important things you set on every parameter within your device.” 7 “The final bit in the Inspector for this slider is Initial Enable. This gives us a way of setting what the default value will be when you first load your patch. We’re going to set our Initial Value to 1. – we explicitly put the decimal point in, because it’s a Float.” 8 “So now we’ve made our first parameter: the Ratio control that allows us to set the sample rate of the degrade~ object. We’ve got a dial that’s configured with the correct parameters in its Inspector. Now we lock our patch using the padlock at the bottom left.” 9 “Now we can interact with the patch as a user – we can actually spin the dial around. It goes from 1 down to 0.1, and we can see our parameters have been set correctly in the Inspector to allow this particular control to work successful­ly with the degrade~.”

 ??  ??
 ??  ??
 ??  ??
 ??  ??
 ??  ??

Newspapers in English

Newspapers from Australia