Commit Graph

99 Commits

Author SHA1 Message Date
Paul Davis adb508b189 no-strobe behavior for varispeed blink 2023-11-11 10:11:30 -07:00
Robin Gareus 417f3647cc
Keep shuttle ctrl in sync with actual speed
When using "VS" the numeric control shows the "default speed"
when not rolling. Then when starting to roll default speed will
be the actual speed.

Previously the shuttle was not updated when `last_speed_displayed`
was the current speed. This dated back to before "VS" showed
default speed.
2023-10-10 04:18:53 +02:00
Robin Gareus 4d940ce5a2
Fix shuttle info sizing text 2023-03-31 18:07:02 +02:00
Robin Gareus 51e93399ba
Update vari-speed availability, depending on port-resampler 2023-02-04 03:21:27 +01:00
Robin Gareus f6c748537f
Fix deflection of shuttle control
See also 89a85da52c
 * Fix deflection when using percent (use sqrt/pow2)
 * Simplify linear deflection when using semitones
 * Allow deflection of > 200% when using semitones
2022-06-05 23:44:39 +02:00
Robin Gareus 89a85da52c
Overhaul vari-speed shuttle control display
* keep shuttle and mouse position in sync when dragging
* do not show speed options above max-transport-speed
* use quadratic deflection with speed percentage
* reduce knob width since the slider is rather narrow these days
2022-05-25 00:21:56 +02:00
Robin Gareus 00bd50882e
Mark speed UI controls insensitive if varispeed is not available 2022-05-24 20:41:59 +02:00
Mads Kiilerich 7f649efd42
gtkmm: use set_can_focus() instead of deprecated Gtk::Widget::set_flags(CAN_FOCUS) 2022-04-08 21:11:06 +02:00
Mads Kiilerich a86aa31747
gtkmm: use get_visible() instead of deprecated Gtk::Widget::is_visible() 2022-04-08 20:20:10 +02:00
Robin Gareus bac8904971
Adjust shuttle info width depending in unit
This allows to fit complete text "> 100.1%",
which is useful when chasing external transport, and yet
still have a reasonable shuttle width when using semi-tones.
2021-07-20 17:29:20 +02:00
Robin Gareus d9bd7ad46e
Set shuttle + vari sensitivity depending on ext-sync 2021-07-20 17:29:20 +02:00
Robin Gareus e9ed448994
Fix various shuttle ctrl issues
This reverts most of 50c555f1a1

* Never render from `map_transport_state()` callback
* re-instantiate deadzone, only update when last_speed_displayed
  differs by 0.5%
* Fix Pool OOM due to mapping state doing direct UI changes
  instead of delegating this to lower priority render()
2021-07-19 18:26:23 +02:00
Robin Gareus 3582c16871
Retain shuttle color regardless of speed
Even if the default text is boring, dark gray on black
is not readable. This makes Ardour behave like mixbus (which
always used default foreground).
2021-07-19 18:26:23 +02:00
Robin Gareus 8b365e238e
NO-OP: clang-format 2021-07-19 02:58:51 +02:00
Robin Gareus e764714157
Toggle varispeed dialog visibility when speed is 100% 2021-07-19 02:58:10 +02:00
Robin Gareus 89a4c98bfd
Allow vari-speed control via scroll-wheel 2021-07-19 02:57:45 +02:00
Robin Gareus 9a66bd6163
Consolidate Varispeed dialog
* localize speed changes into varispeed dialog
* make speed-changes idempotent
* remember window position (do not overlap with button)
  ideally the window would show up below the "Vari" button
2021-07-19 02:56:14 +02:00
Robin Gareus 0ca77db96d
Separate transport and varispeed dialog 2021-07-19 00:55:59 +02:00
Ben Loftis fad1d07747 Fix the shuttle slider (TM) 2021-07-17 20:52:26 -05:00
Ben Loftis d1941c9cbc
Default_Play_Speed: 2nd attempt at varispeed GUI 2021-07-03 19:06:03 +02:00
Ben Loftis 50c555f1a1
Default_Play_Speed: simple varispeed GUI 2021-07-03 19:06:02 +02:00
Ben Loftis d6d60711aa
Default_Play_Speed: nuke shuttle Wheel mode (gtk part) 2021-07-03 19:06:02 +02:00
Ben Loftis a1257beb23
Default_Play_Speed: prep work (gtk2)
* request_transport_speed should -never- set default_play_speed
2021-07-03 19:06:02 +02:00
Robin Gareus cce703bc9a
Resolve microseconds_t ambiguity #3 2021-06-27 17:49:31 +02:00
Paul Davis 6b6114eb75 GUI fix for get_microseconds() move to libpbd 2021-06-26 18:27:54 -06:00
Robin Gareus 83b9ab1bee
Temporarily revert ongoing varispeed development
This reverts bf88f3fe64
until 35813db0f4

in order to move development into a branch, until after the
upcoming 6.8 release
2021-06-26 18:58:24 +02:00
Ben Loftis 5b8835483e Default_Play_Speed: simple varispeed GUI 2021-06-25 11:51:34 -05:00
Ben Loftis af19e1e7e7 Default_Play_Speed: nuke shuttle Wheel mode (gtk part) 2021-06-25 11:51:34 -05:00
Ben Loftis b4eba1a30b Default_Play_Speed: prep work (gtk2)
* request_transport_speed should -never- set default_play_speed
2021-06-25 11:51:34 -05:00
Robin Gareus eeadf5087d
Shuttle wheel context-menu: max speed only applies to percentage 2021-04-20 14:26:30 +02:00
Robin Gareus 80405e41b0
Fix shuttle wheel unit granularity
When switching to Semitones, round speed to nearest semitone.

This fixes an issue when rolling forward at < 25% which is
less that -24st and then scrolling right (increase pitch).
The result may still be < -24st and playback reverses.

When changing max-speed, directly constrain speed.
2021-04-20 14:14:45 +02:00
Robin Gareus 2c8746eda9
Fix shuttle wheel semi-tone mode
Previously it was not possible to return from reverse playback
since left-scroll decreased pitch, even during reverse playback.

This also fixes an edge-case when quickly scrolling through
zero. use_shuttle_fract() ignores rapid events, map_transport_state()
can round speed to zero and next scroll-event set the default +1st
speed (really should have been 0st).This is solved by starting at
-24st, similar to how percentage does not start at 100%.
2021-04-20 13:53:35 +02:00
Paul Davis 81c08b6efb restore sprung shuttle behavior (mistakenly altered in a recent commit 2021-04-19 16:14:08 -06:00
Paul Davis 48e5607f7c use Session::request_roll() instead of request_transport_speed (1.0, ...) 2021-04-19 16:14:08 -06:00
Paul Davis 52b7e68102 use new Session transport API calls in GUI 2021-04-19 16:14:08 -06:00
Paul Davis 0bccc4bffd fix mispelling of actual in shuttle control code 2021-04-19 16:14:08 -06:00
Robin Gareus d23798276a
Use CairoTheme API 2021-01-26 23:37:57 +01:00
Paul Davis 4d17c5179c remove unnecessary call to set_colors()
This call also happens before colors are even defined
2020-04-28 11:45:14 -06:00
Paul Davis ab7b5c6089 add safety tests inside ShuttleControl to deal with _session == 0 2019-12-14 09:58:53 -07:00
Paul Davis b84c99639f parametize the maximum transport speed.
No GUI to adjust this at this, nor is any planned. This just makes it easier if
we ever feel we can change this.
2019-09-17 17:19:15 -06:00
Robin Gareus 4050ca5633
Update GPL boilerplate and (C)
Copyright-holder and year information is extracted from git log.

git history begins in 2005. So (C) from 1998..2005 is lost. Also some
(C) assignment of commits where the committer didn't use --author.
2019-08-03 15:53:15 +02:00
Robin Gareus 3bc9281c31
Fix some Gtk::Menu related memory leaks
A Gtk::manage()d widget will be deleted when its parent container
is destroyed. Top-level context menus are not inside a container and
hence need to be manually deallocated.

This adds explicit delete calls for menus where there is a
member variable reference to the Menu.
2019-03-07 23:50:32 +01:00
Robin Gareus 204d7bf76c
Remove cruft: unused members 2019-03-07 22:25:19 +01:00
Robin Gareus bc18c54c73 Quick hack to test engine vari-speed (2/2) 2017-10-29 20:04:06 +01:00
Robin Gareus 601c317d70 Clean up library inheritance (colors.h, utils.h)
make libwidget independent of libcanvas.
Confine basics to pbd and gtkmm2ext.
2017-07-17 21:06:04 +02:00
Robin Gareus b5e9451bc7 Remove unused sources & includes 2017-07-17 21:06:04 +02:00
Robin Gareus 5c92613698 Separate Ardour UI widgets into dedicated library 2017-07-17 21:06:04 +02:00
Robin Gareus d06de26a4f Towards a consistent render() API.
This fixes an -Woverloaded-virtual ambiguity introduced in b5e613d45

  void render (cairo_t*, cairo_rectagle*)
  void render (Cairo::RefPtr<Cairo::Context> const&, cairo_rectangle_t*)

ArdourCanvas prefers cairomm and CairoWidget itself uses Cairo::Context,
this improves overall API consistency.
2017-03-20 17:12:08 +01:00
Robin Gareus 3aefd0e744 consolidate context-menu popup methods 2017-03-16 02:36:48 +01:00
Robin Gareus 607e7f3b9e Fix flat buttons for the shuttle-ctrl 2016-12-31 20:57:07 +01:00