Commit Graph

23 Commits

Author SHA1 Message Date
Vincent Wong 44bda6e5d9 Audio/Timing: implement tap-to-time
Tap-to-time provides the user the ability to tap to the lyrics/syllables
of the song in order to time lines or karaoke. It consists of these
extra UI interactions:

- **Indicator**: tap marker: a designated marker that can be moved to
  the current audio position; indicated in:
  - the audio display by a green arrow underneath a marker
  - the karaoke display by a green-colored syllable
- **Control**: tap marker: the tap marker can be changed by selecting
  syllables on audio display in karaoke mode, or clicking the markers on
  audio display in dialogue mode
- **Control**: ctrl-right-click audio display: starts playing the audio
  from that exact position until the end of the file
- **Option**: Timing/Tap To Time: enables the tap marker indicator and
  commands
- **Button**: time_opt_tap_to_time: toggles the Timing/Tap To Time option
- **Button**: time_tap_connect (hotkey I): a command that:
  - moves the tap marker's position to the current playing audio
    position
  - sets the next marker to be the tap marker
  - if the tap marker is already the last marker AND BOTH autocommit AND
    next-line-on-commit is ON, will move onto the next line
  - if moved on to the next line, also sets the start marker to the current
    audio position, so the two lines are connected, and moves to the
    next tap marker (essentially reinvoking time_tap_connect once)
- **Button**: time_tap_no_connect (hotkey O): similar to
  time_tap_connect, except it will not set the next line's start
  position even if moved to the next line

Expected workflow:
1) User loads song lyrics
2) User splits each line into syllables
3) User turns on tap-to-time, autocommit, and next-line-on-commit
4) User plays audio from beginning, tapping time_tap_connect to each
syllable, occasionally tapping time_tap_no_connect when a break between
lines is desired
5) If user messes up a line, they can set the tap marker to where they
want to restart from, and ctrl-right-click to start the audio a few
seconds before it
6) Syllables can be split/merged at will, and adjustments to timing can
be done using normal karaoke timing controls
2018-11-21 21:21:31 -08:00
Thomas Goyne 70edb03b2a Fix some audio display rendering quirks on retina OS X 2017-07-04 10:51:08 -07:00
Thomas Goyne ab35c41a93 Move AudioDisplayInteractionObject to audio_display.cpp 2015-01-01 10:24:00 -08:00
Thomas Goyne c43bf1e822 Limit the range to be painted in the audio display to what is visible 2014-12-21 11:31:21 -08:00
Thomas Goyne 71ee37cd71 Slather around more const 2014-12-21 11:31:17 -08:00
Thomas Goyne 7a3110015e Change AudioDisplay::style_ranges to a vector
This is faster in all cases except for repainting a very small part of
the display with a very large number of range transitions and simplifies
the code a bit.
2014-07-28 12:09:47 -07:00
Thomas Goyne 2df4c4c194 Use wxDCFontChanger correctly
Fixes the audio display timeline font changing based on what else is
being painted.
2014-07-10 11:44:56 -07:00
Thomas Goyne 585e9489d9 Move some of the audio provider machinery to libaegisub
And add tests.
2014-07-10 11:44:56 -07:00
Thomas Goyne 3b34ed9a77 Move AssTime to libaegisub and add tests 2014-07-06 19:25:49 -07:00
Thomas Goyne 37c02ae127 Replace wxString::Format with agi::format
It's modestly faster, significantly more type-safe, and doesn't assert
when there's too few arguments, which causes problems for plural forms.

Closes #1733.
2014-05-30 11:53:14 -07:00
Thomas Goyne 960dc3723b Don't get the duration from the audio controller on audio open
The audio controller's provider may not have been updated yet.
2014-05-26 09:34:20 -07:00
Thomas Goyne 09e325a1c3 Clean up unused includes 2014-05-23 07:28:24 -07:00
Thomas Goyne 19e8f19e52 Redesign project file handling
Add a new Project class which is responsible for everything related to
opening and closing audio, video, subtitles, timecodes and keyframes.
This pulls almost everything not directly related to playing audio/video
out of the audio and video controllers, pulls more crap out of
FrameMain, and happens to make things a little simpler in the process.
2014-05-22 09:29:12 -07:00
Thomas Goyne 9168484fc6 Allow clicking anywhere in the audio display for alt-dragging 2014-05-14 08:37:03 -07:00
Thomas Goyne 1651446e0f Drag the entire audio selection when Alt is held down
Closes #691.
2014-05-12 12:07:46 -07:00
Thomas Goyne 5da847e1ef Use more NSDMIs 2014-05-12 10:05:36 -07:00
Thomas Goyne 6fc4c8da14 Move make_unique to its own header file
Rebuilding the entire project after touching util.h gets old fast.
2014-04-23 15:29:23 -07:00
Thomas Goyne b4284efb38 Trigger the audio selection change logic when switching timing controllers
Results in the display seeking to the active line when audio is opened
(if seeking to active line is enabled), and initializes the scrollbar
properly.

Updates #1732.
2014-04-22 16:42:47 -07:00
Thomas Goyne a30d6121fd Don't block the UI while decoding audio for the caches
Simply zero the memory for audio which hasn't been decoded yet, modify
the audio renderer to avoid caching blocks which aren't ready yet, and
add a progress indiciator to the audio display scrollbar.
2014-04-22 12:34:20 -07:00
Thomas Goyne 09d0d039e0 Convert signal.h to variadic templates 2014-04-17 11:46:27 -07:00
Thomas Goyne 1d5292fdee Kill config.h and just force-include acconf.h in non-pch builds 2014-04-16 08:11:37 -07:00
Thomas Goyne ea96c6e2ad Make everything final that can be
Apparently gcc does use final for devirtualization.
2014-03-12 19:07:30 -07:00
Thomas Goyne 33a4a056a4 Move everything up a level since the root dir no longer has stuff 2014-03-11 12:14:57 -07:00