Sync function and ~waveform windows

mharter's icon

I have been trying to sync a ~waveform window and a function window so that a user can use the waveform as a guide when adding points. I have the two windows overlaid and I am using a standard rslider to pan and zoom (with a little math to manage the ~waveform window since its zoom and pan require different input than the function.)

Even with the math seemingly correct, the two types of widows behave differently, and I am having trouble figuring out how they differ. One slip along the other, especially when zoomed in close.

My goal is to allow a user to adjust the color and intensity of lights during playback of sounds.

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

Here is my example patch:

Thanks!

mharter's icon

I've solved the waveform~ and function sync issues! It was a bit of work, and there are a few limitations, but it will provide a nice way to edit X,Y points using the sound file as a guide. I also have groove~ playing a loop of the displayed area to help clarify what part of the buffer is being viewed.

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

The next task is to save the X,Y points, along with a reference to the sound file path, so that they can be edited further at a later time. I will bring up the last set of X,Y points when a sound is selected with umenu.