Controlling the parameters of the waveform object
Hi i am new to MAX and i am currently designing a simple glitch software plug-in, the plug-in is currently in its early stages but i have decided to create the glitch in the audio by manipulation of the waveform, i have the buffer moving randomly throughout the audio file which works nicely and creates some interesting sounds but i have come across a problem, the parameters of the buffer are set but i need them to change automatically when i switch to different audio files, for example- the problem is that if i am working with a 10sec audio file and then changed to a 5sec audio file, the parameters would be twice as wide as they needed to be so the buffer would frequently be reading nothing producing no sound. If anyone has any ideas or patches that would help me it would be much appreciated.
many thanks
Rich
Have a look at the [info~] object, use the 7th outlet to get the sample length.
Hi many thanks Fora, exactly what i needed- have another issue tho... i need to find a way to get the number that is generated that tells me the sample length into the urn~ so that the parameter is the same as the number generated by the info~
The number is generated in the message box but not sure how to get it into the urn~ ?
I will upload a screenshot of that part of my patch to help show what i mean
As you can see the correct value reaches the number box above the urn~ but the range of urn~ stays at 999 instead of the value 22029
Arguments in an object box do not update when the value is changed with a message in the right inlet.
Yes you are correct and this is what i have discovered, so how can i update the value of the urn~ object?
Give a look, may clarifying it to you
Thank you Helmuth, this has helped a lot, exactly what i was trying to achieve
When i use your patch it works perfectly although when i use this with my value it doesn't seem to work? I am confused as to why it wont, i will post up patch so you can see, i apologize in advance if its a schoolboy error as i am a novice at using software like this, many thanks.
I've just been into Max for to years now but my advice would be to follow the vers first tutorials about the basic objects And the way they work, you Will gain a lot of Time !
ok, yes i have been and will continue to look at the basic tutorials although i still would appreciate an answer to why my patch wont work properly, it is the same as the patch Helmuth posted except has a different value and Helmuths patch works fine. any ideas why this is so would be much appreciated, thanks
Urn seems to be limited to the maximum of 4096 numbers, (otherwise I get an notice in the max window. ) cycling support may confirm it?
Best
(sorry Trix, I saw your message only now)
Many thanks again Helmuth-i dont think i would have found that information from a basic tutorial lol, i think in that case i will try and rethink my approach
You may achieve your goal using a couple (or more) of urn object whose sizes are divided properly, something like this:
otherwise random object seems to have no limits about size, but it has little differencies...
I have tried it using the random object instead but it only seems to count down from the original value and stops when it reaches 0?
Just realised I had accidentally created a loop so please ignore the last post