Commit Graph

34 Commits

Author SHA1 Message Date
Damien Zammit 4620d138ee import_pt: Look up tracks by name instead of by number
This allows existing tracks with correct names to be the target for import.
2023-04-22 10:09:55 +10:00
Damien Zammit d2a4e0ac9a import_pt: Fix PT import to session with existing tracks
Previously, the PT import would place regions on tracks
numbered from 0, therefore landing on unrelated tracks
when pre-existing tracks were present in the session.

This change skips all existing ardour tracks and imports
the PT regions onto the correctly named, appended tracks.

If any tracks exist with the same names as the ones in the import,
the new tracks get an incremented number at the end of them and
the imported regions are placed on the new track, as expected.
2023-04-20 15:45:32 +10:00
Damien Zammit a27a88f9f2 import_pt: Update session range to largest audio extents imported
Tested before and after on a small audio-only PT8 session;
session range gets set to [0 to max] extent with this change.
2023-04-08 18:35:26 +10:00
Paul Davis b35518e212 switch from boost::{shared,weak}_ptr to std::{shared,weak}_ptr
This is mostly a simple lexical search+replace but the absence of operator< for
std::weak_ptr<T> leads to some complications, particularly with Evoral::Sequence
and ExportPortChannel.
2023-03-24 14:19:15 -06:00
Robin Gareus 4f4b931ccc
Add import_markers option (1/4) 2022-11-22 01:44:53 +01:00
Ben Loftis a251ba3b76 pt_import: since we aren't using undo here, need to delete the diff_command manually 2022-05-10 15:47:56 -05:00
Ben Loftis f50d5507c3 midi_model: rename some midi diff functions, to (try to) avoid confusion
syntax for beginning and ending a diff command is:
 "new_diff_command"  ->  "apply_diff_command"

syntax for applying a diff_command is:
 "_as_commit" :  Begins and Commits a standalone undo Command
 "_as_subcommand" :  adds to undo but does not Begin or Commit a Command
 "_only" : (new) applies the note_diff but does not have any effect on undo
2022-05-10 15:47:20 -05:00
Damien Zammit 6bbe684304 import_pt: Simplify region to track mapping
This allows regions to be correctly imported to their
actual track number now that they are numbered from zero
without any gaps by ptformat, removing the need for a lookup table.
2022-03-29 19:02:19 +11:00
Robin Gareus ecb1d33c02
Remove Region::position remnants (see cc6c0f1263) 2022-03-04 22:38:41 +01:00
Paul Davis f5fb65a3f8 remove unused local variabl 2021-10-25 13:17:18 -06:00
Paul Davis 04b4fc531d remove default args to Session::new_midi_track() (libs edition) 2021-08-13 12:51:36 -06:00
Paul Davis e38e828152 use explicit timepos_t() for region start property in property lists (libardour edition) 2021-08-13 12:51:31 -06:00
Paul Davis eae9d276fe libardour: conversion to use timeline types (mega-commit) 2021-08-13 12:51:29 -06:00
Paul Davis 4dc048b28a update Temporal::Beats to merge master/nutempo versions, notably with private from-double constructor
This is the libraries-only edition. It still features liberal use of Beats::from_double() but this is now
explicit and will be easier to locate the calls and remove them. Several classes that were using
Beats::to_double() have been (temporarily) made friends of Beats to allow them to keep using it,
pending the much more widespread redesigns of several structures. Once this is done, the friend
relationships can (mostly) be removed. It is expected the ARDOUR::Variant will need to continue
as a friend because it is used to pass beat counts to LV2 as doubles
2021-08-13 12:51:28 -06:00
David Robillard 74e21e942e Remove unused variables (Wunused-variable) 2021-05-30 20:09:35 -04:00
Damien Zammit bdb5aec1cc ptimport: Fix crash when imported session has zero audio tracks 2021-05-29 12:54:10 +10:00
Robin Gareus a829fa58b3
Fix another C++11ism 2021-05-26 04:14:18 +02:00
Robin Gareus 2cf4568d82
Fix C++11isms in 3fb9f47bf1 2021-05-26 03:55:29 +02:00
Robin Gareus d839e9cf14
Consistent _nth_ API call 0-based index 2021-05-26 02:33:31 +02:00
Damien Zammit 3fb9f47bf1 ptimport: Fix importing of large sessions, no more crashing and faster 2021-05-25 20:37:39 +10:00
Damien Zammit ec5a809f54 pt import: Fix crash with bringing in material
Hopefully the weird pt import crash is now gone!
2021-01-17 13:19:54 +11:00
Damien Zammit 772512a62d pt import: Correct the log warning message when at least one audio file failed to load 2021-01-17 13:19:54 +11:00
Damien Zammit 2645ab2e73 pt import: Fix import -> cancel -> import by clearing status 2021-01-17 13:19:54 +11:00
Damien Zammit 5d0de7e037 pt import: Fix progress bar to span the whole import 2021-01-17 13:19:54 +11:00
Damien Zammit ea8b855b4a pt import: Clean up track naming 2021-01-17 13:19:54 +11:00
Damien Zammit 12d62cd16e pt import: Fix race condition/threading, don't call new_audio_track() in bg thread 2021-01-17 13:19:54 +11:00
Robin Gareus 94085b0162
Avoid "Route" in user visible messages
Prefer "Track", "Bus" and/or "Strip" where applicable, or simply
avoid it.
2020-05-24 19:20:45 +02:00
Robin Gareus 8564e6f760
No implicit session save when importing files (backend) 2020-05-19 17:59:52 +02:00
Damien Zammit d95f6039f8 import_pt.cc: Remove process lock on AudioEngine && save less often 2020-03-14 12:03:22 +11:00
Robin Gareus a22f918d9d
Update libardour GPL boilerplate and (C) from git log 2019-08-03 15:53:16 +02:00
Damien Zammit 675759c167 Update references to ptfformat -> ptformat && fix api calls 2019-06-22 17:26:05 +10: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 244098cb40 PT import: Add new import_pt.cc session methods 2018-10-12 19:09:40 +11:00