buffer~ vs. waveform~ Loadbang Problem

skrasms's icon

This problem existed in Max 4.6, but it is still in Max 5.04.

If I create a waveform~ linked to a buffer~ object, sending it selection start and end values on patch loading kills the waveform~ object. It prevents it from being able to display or select anything.

For example, this patch is what I would like to streamline:

Max Patch
Copy patch and select New From Clipboard in Max.

It works, but I want the selected region to already be selected when the patch opens. I make no changes except to add a loadbang object:

Max Patch
Copy patch and select New From Clipboard in Max.

...and now the waveform~ object ceases to function. It displays nothing, responds to no mouse input, and doesn't interact with messages.

Is there a way to fix this behavior? I do not even have a temporary solution. Using a delay object for the loadbang is not stable on my system unless I use a delay on the order of 30000 ms, and that seems a little unreasonable to me.

I am on XP Pro SP2

Ben Bracken's icon

thanks for sending this along, I can reproduce here.

in the meantime, a deferlow inbetween the loadbang and the message box should do the trick.

-Ben

skrasms's icon

Thank you for looking into it : )

I do not get any change in behavior adding a deferlow object there.

Ben Bracken's icon

huh. works fine for me. are you using the same example patch that you sent? copy/paste/save/reopen the following patch:

Max Patch
Copy patch and select New From Clipboard in Max.

let me know if this doesn't work for you.

-ben

skrasms's icon

I just did "open from clipboard" with the code in your message after a fresh boot of Max, and the waveform~ object is lifeless.

I then saved that patch, quit Max, and re-opened it. Same problem.

Interestingly enough, if I make a new patch and just "paste" it works.

Ben Bracken's icon

thanks for that. I hadn't been reloading it via the finder. I'll pass it along to the engineers to see if anything can be done about it.

From what i can tell, the following bit of hackery using info~ should work regardless of how you open the patch:

Max Patch
Copy patch and select New From Clipboard in Max.

Ben Bracken's icon

actually, you don't even need the info~ object, just two deferlows on a row, which is oh so ugly, but it seems to work:

Max Patch
Copy patch and select New From Clipboard in Max.

skrasms's icon

I didn't even know that could be done. Thank you for that!

It's working for me here, and even fixing some unrelated initialization problems I had in other patches.