## Dynamically Altering Wave~ Object

Jun 23 2022 | 10:55 am
Hello,
I was hoping someone could help? I'm trying to change the start and end points of a wave object with a sine LFO, but am unsure what values to send to scale, and why? I thought it would be a conversion into milliseconds, but this distorts the signal. Any help is much appreciated.
Thank you

• Jun 23 2022 | 12:42 pm
hz to ms is [!/ 1000.]. but there is one more thing, and that is that your LFO still crosses zero. i would first do [scale -1 1 0 1] and then change the amplitude. the next issue is the end point, which should not be calculated the same way, but substracted from the wave´s possible max, e.g. 500 minus ( [scale -1 1 0 1] * amplitude ) last but not least the two amplitudes of the LFOs summed together may not be longer than the sample, or they would cross each other.
• Jun 23 2022 | 1:51 pm
Hello,
Thank you for the advice. I'm really sorry for being slow, but apart from amending the scale object I can't seem to implement your advice. If you have a few minutes, can be bothered, would you be prepared to amend the patch attached? If not, not to worry, thanks for your help, anyhow. I mean I understand what you're saying, but not how to carry it out in MAX.
Cheers
• Jun 23 2022 | 3:07 pm
can you first explain what you wanted to reach using those scale values? it is a bit warm here and i might have missed something relevant. for the first inlet it is phasor speed, but then you seems to have copied it by accident?
• Jun 23 2022 | 3:20 pm
Hello,
Thanks a lot for getting back to me. To explain. I'm working on the Giri book Electronic Music and Sound Design. This task asks, having done the work of the first inlet of wave~ to apply the same type of sine LFO to the second and third inlets using the same scaling system. To have variable start and end times. With the only proviso being to ensure the values sent to the second inlet are not greater than the third. With this in mind I thought it would be a case of of just amending the low and high output values of scale for the second and third inlet, but I can't work out what to. I thought it might be here that millisecond values are used, but I keep getting it wrong. With the advice you gave above I wasn't sure where/how the amplitude change, after scale, would take place in MAX, or how to calculate the end point.
Thank you
• Jun 23 2022 | 4:09 pm
the problem with more complex objects like wave~ or goove~ is that there are also more complex relations between the values you need for them. the input for the phasor treats the whole lenght as 0-1 while the end and start points are in ms. when you now approach such a system thinking in BPM and calculating in samples you can get easily get lost in a blackhole. i am not getting it to work either in under a minute, but i would advise to start from scratch and solve problems bit by bit. for example i would start getting the beast to run with fixed signal values first. if it does what it should, then insert + or * to add modulation to these signals. to see what is going on, use scope~ objects at different places. when those modulations (start point + x), (end point -y), while x + y may not exceed bufferlenght, do what they should, you can now adapt the playspeed at the first inlet according to the current loop length or whatever you wish. under these conditions these things are now mostly only simply rule of three (or "percentage" or however you would call it in english) issues.
• Jun 23 2022 | 4:45 pm
Hello,
Thank you for spending some time with it, and for the detailed answer. I'll spend some time with your suggestions.
Thanks again