request: zoomable waveform

Bug #367151 reported by Nick
26
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Mixxx
Fix Released
Wishlist
Thomas Vincent

Bug Description

It would be very useful if the range viewed by the waveform was user-configurable in easy discrete steps. So that you can zoom in and out. A good use case: if you have a very long track and want to see what happens in the next four bars, then the next 32, then the next 64, and then go back to watching only one or two bars at a time. I know this sort of overlaps with having an overview waveform available, but sometimes it's just too small to see the details of what is coming up.

Tags: waveform

Related branches

Revision history for this message
Sean M. Pappalardo (pegasus-renegadetech) wrote :

Wouldn't changing the size of the overview waveform in the skin help? Like make it the full width of the main waveform, putting each under the respective deck.

Or have it be the full height of the display and put it next to each of the channel strips (if it can be oriented vertically, that is.)

Changed in mixxx:
importance: Undecided → Wishlist
Revision history for this message
Nick (kousu) wrote : Re: [Bug 367151] Re: request: zoomable waveform

No I meant configurable -at runtime-, so that you can look ahead or
back as needed.

I saw someone using this in VirtualDJ to great effect.

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

http://www.youtube.com/watch?v=tIFh27mfcjg

You can see this feature at 0:19. Is this really that useful? Isn't it what the waveform overviews are for? It might be interesting to try a skin with much bigger overview waveforms...

RJ Skerry-Ryan (rryan)
Changed in mixxx:
status: New → Confirmed
RJ Skerry-Ryan (rryan)
tags: added: waveform
Revision history for this message
jus (jus) wrote :

For reference, some work on this has already be done by shanxS. https://bugs.launchpad.net/mixxx/+bug/325377

Revision history for this message
shanxS (shanx-shashank) wrote :

Updated patch for zoomable waveform against trunk #2969.

Regards

Revision history for this message
shanxS (shanx-shashank) wrote :

Just for record:
- new CO added called "zoom_waveform"
- right click resets the zoom
- currents zoom changes only by mouse wheel movement captured in WGLWaveformViewer::eventFilter
- Default value is 0 and range is form [-0.8, 0.8]
- Neagtive values means zoom in and vice versa

Changed in mixxx:
assignee: nobody → shanxS (shanx-shashank)
Revision history for this message
Owen Williams (ywwg) wrote :

I implemented this too over the weekend -- My patch isn't any better, I'm really just providing it for reference. One thing I noticed was that as the waveform is zoomed out there are issues with beatmarkers not rendering throughout the waveform and preroll markers causing slow render time. You'll see some simple conditionals that turn off beatmarkers and preroll markers when the zoom level pulls out.

I also made the zoom range much wider. Specifically, I want to be able to zoom way in so I can align the beatgrid precisely. I had to increase the subpixels_per_second size to make this work. I'd suggest that in the official patch we increase that number slightly (maybe not as much as I did) and allow for large amounts of zoom.

Revision history for this message
Sean M. Pappalardo (pegasus-renegadetech) wrote :

Can we just make the pre-roll markers (and other non-music data) disregard the zoom level when rendering so they're always the same size?

Changed in mixxx:
milestone: none → 1.11.0
Revision history for this message
Owen Williams (ywwg) wrote :

Yes, that's possible. I tried to do it but had trouble getting the graphics to draw in the right location (finding the right x value for head of track, etc) so I gave up. The code for drawing them is a little confusing.

Revision history for this message
shanxS (shanx-shashank) wrote :

I just observed one very obvious flaw in my implementation - that range of zooming is being checked in the function that sets it
i.e., WGLWaveformViewer::eventFilter() sets the zooming limits.
While the better approach will be to check the range centrally, somewhere in ratecontrol.cpp or enginemaster.

Also,
1. as Owen mentioned - increase zooming more and
2. as Sean pointed out, pre-roll markers (and other non-music data) should disregard the zoom level when rendering so they're always the same size.

I'll include all above changes in next patch.

Few more things I would like to discuss:
I noticed some talks regarding +/- buttons on waveform for zooming, is that on hit list too ?
If yes, I'll be needing some help with making pixmaps of '+' and '-' for different skins.

I would also suggest disabling zooming with pitch slider (as Jus mentioned in https://bugs.launchpad.net/mixxx/+bug/325377/comments/22).

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

FYI -- no need to update all the skins. All you need to do from the feature
perspective is make the functionality possible and give a proof of concept
(e.g. by re-using an existing +/- graphic from the pitch bend buttons) and
by providing a simple skin.xml example that puts the buttons in the skin.
Jus or another person on the art team (we can dream, right? ;) ) will
update the skins.

On Mon, Nov 28, 2011 at 5:20 PM, Owen Williams <email address hidden> wrote:

> Yes, that's possible. I tried to do it but had trouble getting the
> graphics to draw in the right location (finding the right x value for
> head of track, etc) so I gave up. The code for drawing them is a little
> confusing.
>
> --
> You received this bug notification because you are a member of Mixxx
> Development Team, which is subscribed to Mixxx.
> https://bugs.launchpad.net/bugs/367151
>
> Title:
> request: zoomable waveform
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/mixxx/+bug/367151/+subscriptions
>

Revision history for this message
shanxS (shanx-shashank) wrote :

This patch is against r2970.
Apart from improving my implementation in WGLWaveformViewer::eventFilter(), changes are as follows

1. Increased zooming
2. Pre-roll doesn't zoom any more
3. Pitch slider doesn't affect zoom
4. new COs for adding '+' and '-' zooming buttons on skin
    - new COs are 'zoom_waveform_in' and 'zoom_waveform_out' for zoom in and zoom out resp.
    - I am also attaching a dummy skin.xml from Deree 1280x800 WXGA which uses these new COs to control zooming from
      Raise/Lower pitch buttons on Channel 1

Revision history for this message
shanxS (shanx-shashank) wrote :

Dummy skin.xml from Deree 1280x800 WXGA which uses Raise/Lower pitch buttons on Channel 1 for waveform zooming.
Edited lines are 2918 to 2957

Revision history for this message
Sean M. Pappalardo (pegasus-renegadetech) wrote :

ShanxS's latest patch tests good for me. Nice work!! And nice touch on the right-clicking returning to default zoom!

Just a few recommendations:
1) Switch the direction of the mouse wheel zoom to match Firefox's: wheel up/forward zooms in, wheel down/backward zooms out.
2) Only return to default zoom when the right mouse button is released and only if it had been pressed for less than 150ms or so. The reason is that we're going to add back the jog behavior (that was on the left mouse button in 1.9) to the right button in 1.10, and we don't want to reset the user's zoom level every time they want to jog.
3) Can you make the skin buttons zoom a much larger amount? The user should only have to click no more than 6 times to go from full zoom-out to full zoom-in. (They can use the wheel for finer control.)

Revision history for this message
shanxS (shanx-shashank) wrote :

Thanks for feedback Sean !
I am working on your recommendations and will soon upload a new patch with these changes.

regards

Changed in mixxx:
status: Confirmed → In Progress
Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

vRince has added zooming to his rewrite of the Mixxx waveforms -- thanks for working on this shanx and sorry your work was deprecated!

Changed in mixxx:
assignee: shanxS (shanx-shashank) → Thomas Vincent (vrince)
Revision history for this message
Thomas Vincent (vrince) wrote :

Buttons in skins are not available in the waveform-2.0 branch I'll try to use patches in this tread to introduce it.

Revision history for this message
Thomas Vincent (vrince) wrote :

"waveform_zoom" ControlPotmeter are declared by every WWaveformViewer present in a skin (one per group).
Those potmeters should be accessible like any other ControlObject.
User can sync them vis pref ui.

Revision history for this message
jus (jus) wrote :

Could you please give an working example for use in skin.xml?
I tried to use Channel 1 pitch slider in LateNight1280x800-WXGA from your branch for waveform zoom , around line 2375 but all i got was a segfault.

<SliderComposed>
 <Tooltip>...</Tooltip>
 <Style>...</Style>
 <Handle>knob_pitch1.png</Handle>
 <Slider>slider_pitch1.png</Slider>
 <Pos>3,7</Pos>
 <Horizontal>false</Horizontal>
 <Connection>
  <ConfigKey>[Channel1],waveform_zoom</ConfigKey>
  <EmitOnDownPress>false</EmitOnDownPress>
 </Connection>
</SliderComposed>

Revision history for this message
Thomas Vincent (vrince) wrote :

Ok that sucks ...
Could you attach the modified skin you made so that I can reproduce the crash ?

Revision history for this message
jus (jus) wrote :

Changed only line 2365 in LateNight1280x800-WXGA/skin.xml
from
ConfigKey>[Channel1],rate</ConfigKey>
to
ConfigKey>[Channel1],waveform_zoom</ConfigKey>

My specs:
MacOSX 10.6.8 waveform2.0 r2751
Display type: Simple ( cause filtered GL/GLSL do not work, will file separate bug )
FPS: 30

Crash occurs as soon as i try to move the waveform zoom slider.

Revision history for this message
Thomas Vincent (vrince) wrote :

Ok I tried, no crash for me but nothing append with the rate slider.
When I replace a knob for example <ConfigKey>[Channel1],pregain</ConfigKey> ~line 4227 it works.
Except that the for steps (min 1, max 4, big/small step 1) are not linearly triggered.

Revision history for this message
jus (jus) wrote :

After some more testing: waveform_zoom works for me only with knobs like in your example, but not with sliders and buttons.

* Imo a knob is the most impractical control for this purpose. More practical world be sliders or buttons. Also this would allow to map zoom-in /zoom-out easily to the keyboard for mouse free operation which is preferable while performing.
* We should extend our zoom range. It is fair to say that there are good use cases for zooming in more closely ( e.g. when preparing tracks, setting cuepoints) and zooming far out (e.g. when waveform widget is relatively small because of screen size)
Xwax allows to zoom x10 / ÷10 which is very handy sometimes and many competitors do it in a similar way (some use steps of two).
* Imo It is absolutely fine that waveform_zoom works not seamless but in steps.

The crash i mentioned in #21 was unrelated to waveform_zoom (see lp:979925).

Revision history for this message
Thomas Vincent (vrince) wrote :

Normally ControlPotmeter seems to automaticaly comes with controls to set up/down value step by step.
They are named "waveform_zoom_up" "waveform_zoom_down" ...
I tried to use them but it's does not work for the moment.

The skin parser creates the associate buttons (I used <ConfigKey>[Channel1],rate_perm_up</ConfigKey>) before the waveform viewers, and potmeter controls are created on WWaveformViewer constructor. I guess I have to find a better place to create the waveform_zoom controls.

I can easly extend zoom range, but at at some point zooming in will not add details about the audio visualization. At zoom 100% we already display all the information we have in the waveform data.

Revision history for this message
Thomas Vincent (vrince) wrote :

Commit fix in waveform-2.0 branch I tested it with zoom in/out button.
Entend zoom range 1:1 -> 1:6.

Changed in mixxx:
status: In Progress → Fix Committed
RJ Skerry-Ryan (rryan)
Changed in mixxx:
status: Fix Committed → Fix Released
Revision history for this message
Swiftb0y (swiftb0y) wrote :

Mixxx now uses GitHub for bug tracking. This bug has been migrated to:
https://github.com/mixxxdj/mixxx/issues/5155

lock status: Metadata changes locked and limited to project staff
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Related blueprints

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.