Commit Graph

935 Commits

Author SHA1 Message Date
Robin Gareus bc2cbfc7ec
Prevent concurrent loop and punch recording (backend)
This also prevents switching between punch-in/out record
and looping without transport-stop.
2020-02-27 02:36:16 +01:00
Paul Davis 4b10beec08 change transport API, session API, transportFSM API to move reverse management and motion state (partially) into TFSM 2020-02-20 00:25:25 -07:00
Paul Davis ad402e76af remove "destination_sample" from API for Session::set_transport_speed()
This was a leftover from changes made for Tracks Live, related to
the concept of an auto-return preference. We don't use this anywhere in Ardour
or Mixbus, and the concept should eventually be removed entirely.
2020-02-19 15:07:42 -07:00
Robin Gareus 6f205f857b
Replace missing .mid files with silence
This fixes a crash: missing playlist due to missing .mid,
and retains regions for missing MIDI files.

As opposed to missing Audio, we cannot use a SilentFileSource,
because MIDI files are destructive.

This also adds an API to query missing files that have been replaced
with silence to report them to the user.
2020-02-18 01:26:20 +01:00
Robin Gareus 0d127813fb
Allow StateProtector to save pending files
This is in preparation for saving state while the session is
record-arm'ed. Most notably config changes and undo/redo.

In case both normal and pending save happens, pending must be
last and is required to recover from crashes during recording.
2020-01-30 04:12:19 +01:00
Ben Loftis 2d07e72d40
Fix the ability to set Session Start&End Range on a new, empty session
set_session_extents had a bug; it wasn't calling locations->add()
on the newly created location.

The correct implementation was in set_session_range_location,
but this was only called from one place.
This function was removed, and set_session_extents will be used in its place.
set_session_extents will create a session location if one no longer exists,
so there is no need for set_session_range_location.
2020-01-26 19:33:41 +01:00
Paul Davis 5949fec987 add Session::locate_initiated()
This differs from ::locate_pending() by covering either phase of a locate - declick or refill
2020-01-23 14:25:38 -07:00
Paul Davis 31db7e91d8 remove no-longer used PostTransportWork bits and renumber the rest 2020-01-23 14:25:38 -07:00
Paul Davis ad82b443f4 fix API and use of Session::force_locate()
Because of the addition of LocateTransportDisposition, this call was unconditionally forcing a roll during startup
2020-01-20 11:07:27 -07:00
Paul Davis 47767738b9 rename DoTheRightThing to RollIfAppropriate 2020-01-18 08:49:18 -07:00
Paul Davis 3c00048b0c Session::request_locate() takes a tri-valued second argument for "roll-after-locate"
This allows callers to defer logic about auto-play/current rolling state and more to TransportFSM where it
can be cnentralized and is less ambiguous
2020-01-18 08:49:18 -07:00
Paul Davis e7542c0611 NOOP: line refolding 2020-01-03 16:13:23 -07:00
Paul Davis 007136cc23 remove MIDI Control input and output ports from session-level objects 2019-12-31 12:06:14 -07:00
Paul Davis 719c3f1457 add Session::transport_stopped_or_stopping()
Session::TransportStateChanged notifies about transport stop before the stop is complete (i.e. at the start of the declick).
Various other objects (notably control surfaces) connect to this signal and use it to modify their displayed state.
We need a method that can tell them we are stopped (or stopping) even though we are not "fully" stopped yet. This is
that method
2019-12-29 18:43:51 -07:00
Paul Davis 5cdeb2401f add new Session method to return the worst_latency_preroll() value rounded up to the nearest buffer size 2019-12-27 21:18:12 -07:00
Paul Davis 7b1a875f9c remove unused member
Note: there is no global state for "the" transport master, since we have several at all times now
2019-12-27 10:53:02 -07:00
Robin Gareus ab58c894d3
Use weak-ptr for source added/removed signals (1/2)
This might fix a "SessionHandleRef exists across session deletion",
when the shared_ptr was be pushed onto a x-thread pool, and not
invalidated in time before the session was closed.
2019-12-25 17:59:38 +01:00
Robin Gareus df17e3f041
Prevent copy-construction of sources to be destroyed list
destroy_sources () is only called from Session::remove_last_capture ().
The list of sources to be destroyed is the local scope of that method
and will hold a reference to the object.
copy-construct the list and removing elements one by one from the
copy is only unnecessary overhead.
2019-12-25 17:57:10 +01:00
Robin Gareus 848831d844
Convert Disksteam & Playlists from old 2.x sessions 2019-12-17 00:42:28 +01:00
Paul Davis cd78a168b2 reinstate missing latency initialization code
Removed (mistakenly) during work on transportFSM
2019-12-16 16:13:39 -07:00
Paul Davis c3e3930f14 revert to single buffer for disk playback, and 5.x-style overwrite
Also address issues with MIDI and also atomicity of _pending_overwrite
2019-12-10 09:29:22 -07:00
Paul Davis 8b4e714006 changes to use overwrite-buffers when loop is disabled or loop range changed 2019-12-05 13:13:16 -07:00
Paul Davis 1a2665e25f redesign of declicking and fades around loop boundaries 2019-11-22 23:41:56 -07:00
Paul Davis 5c9e7b8234 consolidate Session::locate() and Session::do_locate()
The first no longer needs to handle requests by passing them to
JACK transport
2019-11-15 16:06:04 -07:00
Paul Davis c69227fd8d eliminate hacky design for being able to deliver the correct time as JACK timebase master 2019-11-15 16:04:58 -07:00
Paul Davis febaa1ff2d fix unconditional note resolution during DiskReader::realtime_locate()
When looping, we do not want to resolve notes at the end of the loop via ::realtime_locate() -
::get_midi_playback() has already taken care of this. But when not looping, we need this. So,
add an argument to tell all interested parties whether the locate is for a loop end or not
2019-11-06 16:00:31 -07:00
Paul Davis 5241cdcf03 remove unused parameter from Session::set_play_loop() API 2019-11-02 16:32:18 -06:00
Paul Davis a855119bdd rename all Evoral source from .(hpp|cpp)$ to .(h|cc) 2019-11-02 16:32:18 -06:00
Paul Davis 2cf9ad8f8c refactor SessionEvent and DiskIO so that we pass around boost::shared_ptr<Track> rather than Route
(this the raw pointers used inside SessionEvent)
2019-11-02 16:32:18 -06:00
Paul Davis 833927a4ea don't send TFSM event LocateDone after a locate-for-loop-end
See comment for explanation
2019-11-01 15:56:06 -06:00
Paul Davis 7d3c2a4fee provide a mechanism to decide if Session::update_latency_compensation() is being called as part of a callback from the backend.
If it is, do not call AudioEngine::update_latencies() to avoid JACK1-style deadlock
2019-10-28 17:23:54 -06:00
Robin Gareus c398576e4a
Fix latency compensation race-condition
Remove need for explicit `initialize_latencies` call that used
to be called from GUI-thread post_engine_init(), as well as
Session::engine_running().

Further reduce calls, `graph_reordered` implies a latency-update
and fix ordering issue. update_latency_compensation() must be called
*after* resort_routes().
2019-10-26 01:06:04 +02:00
Robin Gareus eade673771
Expose virtual-keyboard port as async-port 2019-10-18 22:56:46 +02:00
Robin Gareus f961fd4687
Add Virtual-Keyboard MIDI port 2019-10-18 03:42:41 +02:00
Robin Gareus 52eea55988
Remove unused API declaration (removed in 789f08891b) 2019-10-13 04:12:02 +02:00
Paul Davis bfb998ca0a remove Session::AudioMidiSetupRequired signal (no longer necessary) 2019-10-12 12:45:13 -06:00
Paul Davis af82a06517 make BusProfile argument to new Session constructor be const (and in associated call tree) 2019-10-10 16:52:00 -06:00
Robin Gareus ecc2597870
Fix remaining doxygen warnings (!) 2019-09-30 21:03:29 +02:00
Robin Gareus 959a37144b
Fix a few hundred doxygen warnings..
There are still over a hundred left, but this addresses many already.
In particular @param references to undocumented parameters.
Most notably in audio_backend.h
2019-09-30 04:45:59 +02:00
Robin Gareus 1c680f116a
Emit signal when session latency was updated 2019-09-29 01:27:35 +02:00
Paul Davis 5ec5bc4523 goodbye USE_TRACKS_CODE_FEATURES and is_tracks_build 2019-09-25 12:16:13 -06:00
Paul Davis 86b23c0f19 add direct access API for transportFSM and session transport speed 2019-09-22 12:23:54 -06:00
Paul Davis 9f8b8d192b remove unused PostTransportDuration and enumeration-writing for Adjust(Playback|Capture)Buffering 2019-09-22 12:23:54 -06:00
Paul Davis 61afcb8e2b replace boost::msm - based FSM for transport with one written in "plain C++"
Still need to use boost::intrusive to managed qeued/deferred containers
2019-09-19 22:34:18 -06:00
Paul Davis bd229936ec add finite state machine to control/manage transport state 2019-09-17 18:26:03 -06:00
Len Ovens 220fa45d35 Add signal for foldback send add or remove 2019-08-26 17:48:22 -07:00
Robin Gareus 3243bf591c
Add method to graphviz plot the process-graph 2019-08-07 17:40:23 +02:00
Robin Gareus a22f918d9d
Update libardour GPL boilerplate and (C) from git log 2019-08-03 15:53:16 +02:00
Ben Loftis 6c052348b5 (Source List) Region Tags (libardour part)
Rough-in: Region-Tags.

More correct implementation of tags property (libardour).

Region Tags (libardour part)
2019-08-01 12:11:31 -05:00
Ben Loftis 3e6ce20fd7 (Source List) Region List rewrite (libardour part) 2019-08-01 12:11:31 -05:00
Ben Loftis ca3c191d7c (Source List) Source property signals (libardour part) 2019-08-01 12:11:31 -05:00
Robin Gareus aef75f87b7
NO-OP: whitespace, comments 2019-04-08 18:32:03 +02:00
Robin Gareus ff8bd935cf
Remove chicken/egg d'tor
Session::Controllables is a shared_ptr<> list. As long
as the session exists the Controllables will be around. Destroyed(*)
can only be called after the session is destroyed and releases the
shared_ptr<>

NB. this code had a nice hack to construct a "shared_from_this"
workaround. For future reference:

struct null_deleter { void operator()(void const *) const {} };
boost::shared_ptr<Controllable>(c, null_deleter())
2019-03-23 14:31:00 +01:00
Robin Gareus cf11e11fc5
Remove global Session::playlists variable, use getter method (1/2)
Global variables that can written by anyone are to be avoided.
This also simplifies exposing SessionPlaylists as Lua bindings.
2019-03-19 05:14:00 +01:00
Robin Gareus 4706201425
NO-OP: Use API to set/test state-of-the-state 2019-03-18 15:36:58 +01:00
Robin Gareus 1854a72b80
Revert Monitor-Section to be per session
This partially reverts 639dff3a7c. When loading a session,
the monitor-bus that was saved with the session is used.

This changes semantics of the monitor-section/config.

Config::set_use_monitor_bus(bool) is used to initiate a change!
Notification about the change is sent asynchronously by
Session::MonitorBusAddedOrRemoved

It is no longer possible to directly call add/remove_monitor_section()
and leave the session + config in an inconsistent state.
2019-03-01 16:45:42 +01:00
Paul Davis bc8286c7eb simplifications to the logic and additional comments for code that handles auto-return at transport stop 2019-02-28 17:18:28 -07:00
Paul Davis 63fdfd9e85 remove PostTransportWorkCurveReallocate (no longer used) 2019-02-22 14:54:34 -07:00
Robin Gareus 522f28b3c5
Add API to check for ongoing de-click 2019-02-21 01:34:58 +01:00
Robin Gareus e48fe0fd42
Remove more cruft (unused rf-scale) 2019-02-21 00:24:56 +01:00
Robin Gareus c3a7c7c452
Remove cruft (unused PostTransportInputChange) 2019-02-20 19:23:37 +01:00
Ben Loftis 688bd28458 Session-range behavior (libardour part) 2019-02-12 11:35:48 -06:00
Len Ovens 80fd215a5c get_stripables and get_routelist are now presentationinfo aware 2018-11-07 17:00:16 -08:00
Robin Gareus 5599cdb911 Fix race-condition/deadlock, plugin-copy while rolling
lili93's session (#ardour) triggered this w/jackd 512fpp:
Drag/Drop copy a latent plugin from one track to another while rolling.
The GUI-thread as well as the auto-connect thread concurrently call
jack_recompute_total_latencies(). The auto-connect thread holds
a process lock while doing so. The GUI does not use any mutexes.
This randomly deadlocks in libjack.

backtrace: https://pastebin.com/6m3KGhWS
2018-10-25 02:00:08 +02:00
John Emmas e31bae4d09 Remove a #include and substitute a forward declaration (to simplify and speed up compilation) 2018-10-15 10:21:45 +01:00
Paul Davis 0cf27fd2cd fix several inter-related problems with libptformat 2018-10-14 20:35:29 -04:00
John Emmas a5a5ba1ace Clarify where the file 'ptfformat.h' can be found 2018-10-13 13:49:50 +01:00
Damien Zammit 3fd7f9478f PT import: Minor changes to session 2018-10-12 19:09:40 +11:00
Paul Davis 970c8939d4 some rather simple code to allow MIDI Clock to set the tempo of the session.
This is only allowed if the session has only 1 tempo marker
2018-10-08 12:59:51 -04:00
Paul Davis 4c7e5dbc74 move away from "sync source" concepts 2018-10-05 14:15:02 -04:00
Paul Davis e6915e01de new transport slave/master implementation, libs/ edition 2018-09-18 19:06:04 -04:00
Robin Gareus cf39ebc966 Add method to conveniently retrieve a sorted routelist 2018-08-02 21:36:34 +02:00
Robin Gareus bee09ac9e1 Remove unused CubicInterpolation from session 2018-07-09 17:30:38 +02:00
Robin Gareus 2953b575f2 Remove unused AutoLoopDeclick, PendingLoopDeclick
The flags were set, but not used. They also won't be needed anymore.
2018-07-09 17:30:38 +02:00
Robin Gareus 249640267c Remove global declick API
De-click will be per disk-reader, latency compensated and buffer-size
independent. Cue-monitoring should not be affected by de-click.
2018-07-09 17:30:38 +02:00
Paul Davis 8a18929d57 remove Session::controllable_by_descriptor() and move code into GenericMIDI code (the only user).
This also removes enums introduced to describe well-known parameters for Mixbus. Lookup now involves string
parsing every time, but this is not likely to be a notable cost.
2018-06-21 13:05:58 -04:00
Ben Loftis e6da4c4846 SoloSelection: libardour part. 2018-02-11 09:39:36 -06:00
John Emmas 2124fb72ea Make sure that 'libardour-config,h' only gets #included when building with waf (as it only gets generated when building with waf)
When building with MSVC this was getting #included in a few places which had the effect of making my session files get generated in a very old format.
2018-02-03 13:58:22 +00:00
Len Ovens 0dc3400707 remove unused line 2017-12-24 08:56:19 -08:00
Robin Gareus 471644c59d Parallel execution of cycle-start/end 2017-10-30 16:31:38 +01:00
Robin Gareus 927788a0b0 Move vari-speed into backend (resample ports)
Previously Ardour used a /local/ per track vari-speed mechanism.
Now that the disk-reader is a latency-compensated processor, the speed
of each disk-reader would need to be maintained locally, offset by each
disk-reader's output latency. Furthermore each disk-reader may
produce a different number of samples, depending on its global alignment.

This commit introduces port-data resampling directly at the engine-level:
Up/down-sample all input ports at the beginning, and down/up-sample output
port-data using the inverse ratio at the end of the session's process
cycle.
The session itself is unaware of the speed-change, and only needs to
handle transport speeds {-1, 0, +1}.

This also allows for aligned cue-monitoring and vari-speed recording,
and also pitch-shifts synthesized MIDI along.
2017-10-29 20:04:00 +01:00
Robin Gareus 9c3983a7a5 Fix various edge-cases with session-archives
* prevent duplicate names when pulling-in external sources
* drop "origin" after including external sources
* don't include unused playlists
  (they may reference sources that are not included)
* likewise exclude unused regions
2017-10-04 05:06:47 +02:00
Robin Gareus e31f5d9998 Clean up State API:
* Processor implement get_state(), classes derived from Processor
  implement protected ::state() -- as documented in processor.h
* likewise for Route, Track: make ::state() a protected interface
* removal of "full_state", use explicit "template_save"
* use RAII/Unwind to skip saving automation-state
2017-10-04 00:54:55 +02:00
Robin Gareus 0802a0872f API change: expose session-archive compression-level 2017-10-03 02:24:16 +02:00
Robin Gareus ccedb2d44e Remove unused punch+preroll API
This API was not used, also superseded by record w/preroll.
2017-09-29 21:02:22 +02:00
Robin Gareus 2b20f30d81 Aux-Send Latency compensation, part 2 & code-consolidation 2017-09-29 05:03:48 +02:00
Robin Gareus 24ec0b974d Properly aligned export (Stem + Session)
Delay ports being exported by their playback latency.
2017-09-29 05:03:48 +02:00
Robin Gareus 8139becb18 Ongoing work on latency compensation
The general goal is to align transport-sample to be the audible frame
and use that as "anchor" for all processing.

transport_sample cannot become negative (00:00:00:00 is the first audible
frame).

Internally transport pre-rolls (read-ahead) before the transport starts
to move. This allows inputs and disk to prefill the pipeline.

When starting to roll, the session counts down a global "remaning preroll"
counter, which is the worst-latency from in-to-out.
Each route in turn will start processing at its own output-latency.

Route::process_output_buffers() - which does the actual processing
incl disk i/o - begins by offsetting the "current sample" by the
route's process-latency and decrements the offset for each latent
processor.  At the end of the function the output will be aligned
and match  transport-sample - downstream-playback-latency (if any).

PS. This commit is a first step only: transport looping & vari-speed have
not yet been implemented/updated.
2017-09-29 05:03:48 +02:00
Robin Gareus abb7cb90e7 NO-OP: Whitespace 2017-09-29 05:03:48 +02:00
Robin Gareus d98f87d542 No more disk-reader roll-delay
It was not working in sdio/6.0-pre anyway and with upcoming changes to
latency compensation the concept of per disk[stream/reader] will go away.
2017-09-29 05:03:48 +02:00
Paul Davis 7db12f6b12 convert codebase to use Temporal for various time types 2017-09-24 12:03:54 -04:00
Robin Gareus 10b76ae631 Various updates and fixes for Latency Compensation
* centralize signal_latency_at_***_position to processors
* update initial-delay/roll-delay when processor order changes
* consolidate signal-latency calculation: use the same method
  for processor-changes and session's post_playback_latency.
* include relative output-delay in roll-delay
* fix capture processor position & optimize stem-export latency

(roll-delay fixes pending Route:roll() update)
2017-09-19 02:11:22 +02:00
Paul Davis 30b087ab3d globally change all use of "frame" to refer to audio into "sample".
Generated by tools/f2s. Some hand-editing will be required in a few places to fix up comments related to timecode
and video in order to keep the legible
2017-09-18 12:39:17 -04:00
Paul Davis ac8dc40035 fix for loading older sessions, where the rest for "is-track" was "has-diskstream", rather than "has-playlist" 2017-09-18 11:40:53 -04:00
Paul Davis f8de3e0c6e reinstate "restart seek" behaviour but use a new Session::_seek_counter member variable for this 2017-09-18 11:40:53 -04:00
Paul Davis e9dd575ca5 remove all code related to "silent roll" concept. some debug output added 2017-09-18 11:40:53 -04:00
Paul Davis 646d6bec7e when DiskReader checks to see if a locate is in progress, it must be atomic with respect to all DiskReaders 2017-09-18 11:40:53 -04:00
Paul Davis 30c6096d20 locating no longer interrupts process() 2017-09-18 11:40:53 -04:00
Paul Davis cb0d9f5607 remove InputConfigurationChange from session events, since it is a no-op in this development branch 2017-09-18 11:40:53 -04:00
Paul Davis e24ca13394 remove all remaining vestiges of per-track varispeed from libardour 2017-09-18 11:40:53 -04:00
Paul Davis 53e6f13852 addd more DEBUG_TRACE for DiskIO; set DiskIOProcess::_need_butler more appropriately; other minor adjustments 2017-09-18 11:40:53 -04:00
Paul Davis 35c7274cc9 remove Diskstream from Track and derivatives; get ardour to actually startup 2017-09-18 11:40:53 -04:00
Paul Davis 11baba0275 remove Session::track_by_diskstream_id() 2017-09-18 11:40:52 -04:00
Robin Gareus 180cbb0af9 Remove cruft 2017-08-22 15:06:43 +02:00
Johannes Mueller ae51d5fd4e Let the user add a template description on saving session templates 2017-08-20 21:09:30 +02:00
Robin Gareus 38a029c069 Expose Lua bindings to create/delete VCAs 2017-08-18 00:11:55 +02:00
Robin Gareus 22055a07c0 Check major session file format version.
Don't allow to load sessions created with a newer version of Ardour
with an old one (no forward compatibility).
2017-08-17 18:32:49 +02:00
Robin Gareus 9f87805d95 The Auditioner is not in the Session's RouteList
Remove various checks, add assert() for now (perhaps some old sessions?)
This fixes an off-by one issue when adding tracks (presentation
info order in add_routes_inner)
2017-08-16 00:51:20 +02:00
Robin Gareus 6ec133ebde Separate "add master bus" (and add Lua bindings)
This is in preparation for "advanced session setup" allow a SessionSetup
Lua script to create the master-bus.
2017-08-16 00:51:20 +02:00
Robin Gareus 9694986a85 Fix LTC encoder removal
Fixed a crash if an x-run or graph-reorder happens after the LTC encoder
has been destroyed (possible at session-close or after disabling
the encoder).  This also fixes duplicate callbacks in case the
encoder was re-enabled times in an active session.
2017-08-01 17:48:42 +02:00
Robin Gareus cc7ff53e1f Create a deep-copy of MIDI sources when saving snapshots 2017-06-25 01:57:19 +02:00
Robin Gareus a1c5d1be43 Extend API to allow calling new_midi_source_path() with source_lock held
This is in preparation for cloning MIDI-sources during snapshot save.
2017-06-25 01:57:19 +02:00
Robin Gareus f80958e168 Add Lua bindings to query all stripables 2017-06-17 04:37:14 +02:00
Robin Gareus 591d75f1d2 Fix stripable order for new strips & master-order 2017-06-17 04:37:05 +02:00
Robin Gareus 140c511d2c Add method to ensure Stripable sort constrains (for UI use) 2017-06-17 04:36:32 +02:00
Robin Gareus 10db824461 Use Stripable::Sorter in libs 2017-06-17 04:36:28 +02:00
Robin Gareus 0c57199a6c Add a scratch buffer for automation.
Useful as temporary buffer: This allows a controllable to
get a master's automation-curve and combine it with its own
(gain, trim, send) automation buffer.
2017-06-03 13:54:55 +02:00
Paul Davis 0c035778e1 libardour now has CoreSelection object to manage selection status of Stripables and AutomationControls 2017-05-05 18:56:25 +01:00
Robin Gareus d2c8d357da Move special-cased FP8 mute-state into libardour 2017-05-05 16:47:25 +02:00
Robin Gareus ec333406f7 Lua bindings for "end-is-free" (automatic session-end location marker) 2017-05-04 21:08:17 +02:00
Robin Gareus 8229124078 Fix vari-speed and non-locked slave modes
A transport-speed-change is no reason to skip processing.

Prior to this change cannot_process() silently skipped in the process
cycle of the speed-change (which may have been every process-cycle),
without moving the transport or doing any processing.
2017-04-30 01:22:25 +02:00
Robin Gareus ea8eb956ff Add session signal to track mute-changes
In preparation for Faderport8 "Mute Clear" LED Button.
2017-04-07 23:26:59 +02:00
Robin Gareus 5ebe6fcde8 Add option for record-only metronome. 2017-04-01 23:52:43 +02:00
Robin Gareus f2c0b0ee3f Add an API to query if the audible frame is latent pending a locate
eg. at the end of a loop, the session may already be playing the
beginning of the loop. The TransportLooped signal was emitted.
Yet due to playback latency, the audible frame is still at the end of
the loop.

To interpolate the playhead position the UI needs to be able to know:
Relying on the TransportLooped signal is not sufficient because it
does not take playback latency into account.
2017-03-31 14:01:50 +02:00
Robin Gareus 478f26b2ad Count-in is a no-roll operation. 2017-03-30 22:07:06 +02:00
Robin Gareus 50f408adf2 remove cruft 2017-03-08 13:03:46 +01:00
Robin Gareus cdc8807728 Prepare re-locating missing external files. 2017-02-22 10:51:08 +01:00
Robin Gareus 32fe5a083e Emit a signal when Lua session script change (prepare UI update to un/set) 2017-02-19 01:29:08 +01:00
Robin Gareus 7946967270 Prepare record with count-in action 2017-02-13 23:01:11 +01:00
nick_m 7b9784fff4 mark session dirty when dragging tempo markers. 2017-01-27 03:05:32 +11:00
Robin Gareus 2dc392b517 update bbe62da55a - use last-modified-with, strip git-rev 2017-01-21 01:19:19 +01:00
Robin Gareus b588be2dea Instrument channel option when adding track
By setting strict-io on the Instrument plugin early during track
creation, adding the plugin will trigger a PluginSetup Dialog for
multi-out instruments in a strict i/o track.
2017-01-20 21:46:47 +01:00
Robin Gareus bbe62da55a Extract program version that a session was created with 2017-01-20 18:15:44 +01:00
Robin Gareus 9c08a403c4 Add alternative preroll record mode:
* Start recording at preroll, trim region to skip preroll at rec-stop
* Keep old punch-in rec-at-preroll API for tape-tracks (later)
2017-01-19 13:05:54 +01:00
Robin Gareus e959a762b5 Rework preroll-rec API:
* rename: indicate that recording happens after preroll, punch-in
* move API into libardour: rec+roll (no separate setup, seek, roll APIs)
2017-01-19 13:05:54 +01:00
Robin Gareus 0f020e59b8 Move preroll duration calc into libardour 2017-01-19 13:05:54 +01:00
Robin Gareus efd10abdfb Implement record with preroll 2017-01-18 15:15:48 +01:00
Robin Gareus a6e02c0d71 Implement Count-In (before recording), fixed BPM, up to 2 bars 2017-01-17 20:43:55 +01:00
Robin Gareus fcbed9c1dc Split metronome methods into re-usable parts (for count-in) 2017-01-17 20:20:34 +01:00
Robin Gareus d0596d815f prototype track/bus sharing: state-export 2017-01-08 01:23:01 +01:00
Robin Gareus e3050d144a Match API: add rt_context option for en/disable_record()
This allows to call maybe_enable_record () from Lua session or DSP scripts
2017-01-02 00:26:21 +01:00
Robin Gareus 3afe3f32df Remove cruft (old MIDI feedback API) 2016-12-30 17:29:08 +01:00
Paul Davis 53be243f6a Session::_ac_thread_active should be used with atomics to create memory barriers, even though lock ordering is likely correct now 2016-12-19 15:33:54 +00:00
Paul Davis f3b3a411d0 use SMF track or instrument names in imported MIDI track names, if requested 2016-12-14 11:46:26 +00:00
Robin Gareus 61c7af141d Clarify "frames" (video, timecode) vs "samples" (audio) 2016-12-08 12:45:44 +01:00
Robin Gareus e1ca4b2887 Speed up recent session display (for many large sessions)
- don't parse XML into XMLTree
- only read the file, extract relevant elements
- don't read session-template contents, only test file
2016-12-08 10:36:12 +01:00
Robin Gareus 7f9befae2d Add Lua bindings to manage Groups 2016-12-05 23:49:19 +01:00
Robin Gareus 4d81e3ec07 RAII to postpone processor changes/graph recalculation 2016-11-25 18:16:08 +01:00
Robin Gareus 0e65852901 Desperate hack to align master-bus on export.
Another 90% solution which hopefully gives us another year :(
see comments Session::start_audio_export() for explanation.
2016-10-25 22:33:37 +02:00
Paul Davis 6866359c48 when fetching MIDI ports for bundles and auto-connection, ignore control-only (and "virtual") MIDI ports
"virtual" is a placeholder name for ALSA sequencer MIDI through ports
2016-10-21 16:32:46 -04:00
Paul Davis f96b698234 infrastructure for MIDI-input-follows-selection 2016-10-19 17:49:35 -04:00
Paul Davis 0a8ab08e5f basics of following MIDI track selection and rewiring input 2016-10-19 17:49:35 -04:00
Robin Gareus 3e32a00a52 fast region export -- don't call process() 2016-10-17 21:35:00 +02:00
Paul Davis 8f9a9523d2 new scheme for managing port deletion
shared_ptr<Port> now uses a deleter functor which pushes Port* to a lock-free FIFO so that the Port is
always deleted (and thus unregistered with the PortEngine/backend) in a safe context w.r.t. various
callbacks in the host. Currently the auto_connect_thread in Session has been tasked with doing these
deletions.
2016-10-13 17:18:54 -04:00
Paul Davis 1c9fdc0ce8 add Session::get_physical_ports() to centralize "get physical ports but (maybe) ignore control-only (and MIDI Through) ports" 2016-09-27 14:59:30 -05:00
Paul Davis 38fbf3c302 change Session::goto_start() to take an argument to optionally roll after locate 2016-09-27 14:59:29 -05:00
Robin Gareus 8018bed0de add an option to exclude unused Audio Sources when archiving the session 2016-09-23 20:34:28 +02:00
nick_m 080e7755a6 Remove _midi_regions_use_bbt_beats from Session, _start_pulse and _length_pulse from MidiRegion.
- _start/length_beats are now quarter notes regardless
	  of loaded session version.

	- also restores note colour update
2016-09-23 03:39:05 +10:00
Robin Gareus aeb1c71211 Add option to flac encode audio when archiving 2016-09-21 04:05:45 +02:00
Robin Gareus 20ebf10ba3 initial support for archiving sessions 2016-09-20 19:52:56 +02:00
Paul Davis 21b919c210 provide Session::declick_out_pending() 2016-09-13 14:11:29 -05:00
nick_m 3f4d49fd2f Load midi region length and start correctly in sessions modified by v5.0 -> 5.3-41 2016-09-07 00:18:35 +10:00
Paul Davis 636522bd79 new libardour API for Session::new_route_from_template to allow specifying insertion point 2016-08-22 09:41:59 -04:00
Paul Davis 41cc35cf6e do not allow undo/redo while actively recording 2016-08-17 19:22:26 -04:00
Robin Gareus 11da4a83e4 expose SessionConfiguration as lua bindings 2016-08-15 22:25:56 +02:00
Robin Gareus e55ef88ee9 refactoring to prepare for real-time export
* add a threaded TmpFile Writer
* update API calls to that process_export_fw() can be used as
  process_function

The idea is to re-use export infrastructure from normalization:
export to a tmp-file and then encode target formats after that.
2016-07-14 04:35:48 +02:00
Paul Davis 9766cc7d8b a better, deeper fix for "cancel all solo", as Session::cancel_all_solo() 2016-07-13 14:33:23 -04:00
Paul Davis 472ef8c55c once the user has explicitly set the session range end, playlist/range changes do not move it.
The user may drag the marker, edit in the Location UI, or use nudge, to set the end
2016-07-12 11:19:49 -04:00
Robin Gareus a4a246b41d towards export latency compensation 2016-07-10 03:21:29 +02:00
Robin Gareus 0d050de94e move latency-recompute into dedicated thread.
this fixes an issue with jack1 and jack_latency_recompute() since must not
send a server request from inside the server callback.
2016-07-09 17:42:58 +02:00
Paul Davis d514cd2fbf remove a bunch of code that will no longer be used 2016-07-06 13:38:13 -04:00
Len Ovens fef79d46bb OSC: Signal for editor mixer change. (Selected or not) 2016-07-04 20:07:38 -07:00
Paul Davis 57ee61772b add session-scope selection ops for Stripables 2016-07-04 12:45:53 -04:00
Len Ovens a373e4cfc8 UI: Add editor_mixer route pointer to session so all UIs can know the same current_strip even in a selected group. 2016-07-03 18:22:09 -07:00
Paul Davis 02db39c1bc remove Session::get_nth_stripable.cc 2016-07-02 16:08:38 -04:00
Robin Gareus e9a8ccc7e2 major internal plugin & processor API change:
Pass current (latency compensated) cycle times to plugin.
This fixes time-reporting to plugins and also fixes automation
and when bouncing (the session->transport* is not valid) etc.
2016-06-25 02:23:56 +02:00
Paul Davis a2fd790252 New editor API to retrieve the Stripable with via presentation info order. 2016-06-10 13:57:19 -04:00
Paul Davis a0fad16648 change name of a Session method to makes its intended function clear 2016-06-02 14:46:35 -04:00
Robin Gareus 0531d0dd0c save version string with session for informational purposes 2016-06-01 22:43:40 +02:00
Paul Davis 7f4880ad12 use correct types in arguments to Session::get_remote_nth...() 2016-05-31 15:30:43 -04:00
Paul Davis 2c9c210213 manually fix rebase/merge issues caused by addition of plugin presets to methods which add a new track/bus 2016-05-31 15:30:42 -04:00
Paul Davis 38dde7f818 add Session::get_stripables() 2016-05-31 15:30:42 -04:00
Paul Davis d5127001bb move ControllableDescriptor from libpbd to libardour; add support for describing VCAs 2016-05-31 15:30:42 -04:00
Paul Davis e0ff70cf86 first vaguely working version using PresentationInfo
remote control ID and "order keys" have been removed.
2016-05-31 15:30:42 -04:00
Paul Davis 4a30e1f4c8 add Session::loading() to allow easy detection of "session is being loaded" condition 2016-05-31 15:30:40 -04:00
Paul Davis 653ae4acd6 universal change in the design of the way Route/Track controls are designed and used. The controls now own their own state, rather than proxy for state in their owners.
Massive changes all over the code to accomodate this. Many things are not finished. Consider this a backup safety commit
2016-05-31 15:30:40 -04:00
Paul Davis 5531c83496 change API of Controllable::Changed signal to include (from_self, GroupControlDisposition)
This allows the signal to convey more information, which may be required by some handlers of a control's Changed signal
2016-05-31 15:30:40 -04:00
Paul Davis 1c0c9b40b7 new API for route solo/mute state mgmt
Route now calls back into Session when solo/mute/listen state changes. All other interested
parties must use the Route::{solo,mute,...}_control()->Changed() to be notified of changes.

The Session requires more information than the Changed signal can provide, in order to
propagate solo/mute changes across the entire Session correctly.

Note that this uses an experimental use of CRTP to isolate a public API within Session
2016-05-31 15:30:40 -04:00
Paul Davis a3c5b81ca1 Session API changes to enable VCAs to set soloed-by-upstream on assigned routes 2016-05-31 15:30:39 -04:00
Paul Davis 1f6800d421 redesign Route and VCA objects to inherit from ARDOUR::Stripable 2016-05-31 15:30:39 -04:00
Paul Davis c61a5cabc7 Session HAS-A VCAManager 2016-05-31 15:30:38 -04:00
nick_m 885f1fd684 Tempo ramps - update midi regions and locations when dragging tempo.
- also make locations and regions use a double beat rather than bbt for musical position.
2016-05-27 23:38:10 +10:00
Robin Gareus 766a120a3c add API to load Instrument Preset when creating a Midi track 2016-05-06 16:02:04 +02:00
Robin Gareus 01286b442e don't show engine dialog when loading a session..
..and the engine is running at the desired samplerate
2016-04-26 12:56:52 +02:00
Robin Gareus 2a7a64a873 delegate port-connections to low priority thread.
This prevents a deadlock with (some versions) jack:
 * add new instrument track with instrument
 * configure processors (takes processor lock)
 * add I/Os (delivery) -> create ports
 * auto-connect ports
 * jack port-connect -> jack graph re-order
 * Ardour graph-re-order
 * needs processor lock (to check sends)
2016-04-23 22:11:48 +02:00
Robin Gareus b2149de37b add notification if Engine Rate changes and mismatches session's SR 2016-04-18 15:16:27 +02:00
Robin Gareus 888614b714 never ever change sample-rate saved with the session after creation. 2016-04-18 14:50:09 +02:00
Robin Gareus a95e7fe275 yet more documentation.. 2016-04-13 00:07:28 +02:00
Robin Gareus 29543a5dcd add a new counter (for sidechain numbering) 2016-04-12 13:49:50 +02:00
Robin Gareus f5e4d3b032 NO-OP; document some more parameters.
Since headers only provide the declaration, function
parameters need to be documented.
2016-04-12 11:06:35 +02:00