13
0
Commit Graph

13797 Commits

Author SHA1 Message Date
466cbecaba Fix samples-moved (and invalid use of not initialized CubicInterpolation) 2017-10-31 22:01:46 +01:00
f5c5adee6a Interpolation phase[] is initially empty 2017-10-31 22:01:04 +01:00
79b1275b7c Fix set_loop() return value (amend 00a4ad) 2017-10-31 22:00:22 +01:00
8cf323c15d Relax assertion to allow rolling backwards into 0. 2017-10-31 19:54:08 +01:00
00a4ad712c Move Loop Location to Processors
The processors will becomes responsible to know about loop-positions
and map latency-compensated start_sample, end_sample into the loop-range
as needed.
2017-10-31 18:32:26 +01:00
3b785b9d35 Small steps towards rolling backwards.. 2017-10-31 03:51:08 +01:00
9a2433eacf Migrate to Polarity-inversion processor & fix proc positions
* invert polarity after disk i/o proc or return
* fix position of export-proc (after polarity)
* fix input-meter (before disk-writer or after return)
2017-10-31 03:18:59 +01:00
539560bcac Add polarity-invert processor 2017-10-31 03:15:43 +01:00
ea8d089e3c Use new externally_connected API 2017-10-30 19:43:32 +01:00
9fd972c920 NO-OP: whitespace 2017-10-30 19:43:18 +01:00
94e2bce740 Add & implement PortEngine::externally_connected() API 2017-10-30 19:41:42 +01:00
16b4535281 Add missing header (-Wmissing-prototypes) 2017-10-30 19:39:42 +01:00
7adb1297cd Add weak linked symbol for "jack_port_is_mine" 2017-10-30 19:39:10 +01:00
b54db1cab7 Fix fade-out at quit. 2017-10-30 17:27:13 +01:00
d6e96a688d Always optimize zita-resampler, nothing to debug here 2017-10-30 16:31:38 +01:00
ea64e46594 remove non rt-safe debug messages 2017-10-30 16:31:38 +01:00
471644c59d Parallel execution of cycle-start/end 2017-10-30 16:31:38 +01:00
fba0fce441 Add a RT-Tasklist 2017-10-30 16:31:38 +01:00
c0dbe8eaaf Move coreaudio_set_realtime_policy into libpbd 2017-10-30 16:31:38 +01:00
fee03dc467 Add MSVC support for building the 'zita-resampler' library (which is now needed by libardour) 2017-10-30 13:55:51 +00:00
9fbdfaf5a9 Accommodate the change from libtimecode to libtemporal 2017-10-30 11:01:19 +00:00
db674ac8b6 Remove unused per-port buffer offset 2017-10-29 20:04:11 +01:00
4f03b7c101 NO-OP: whitespace 2017-10-29 20:04:09 +01:00
6e11844889 Quick hack to test engine vari-speed (1/2) 2017-10-29 20:04:03 +01:00
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
7fb3c3e137 Add a dedicated mono variable resampler version 2017-10-29 20:03:55 +01:00
c0f27be59e Fix/update alsa backend build recipe (statically link zresampler) 2017-10-29 20:03:51 +01:00
47c97ca7e2 Update Lua Bindings, fix inconsistencies. 2017-10-29 20:01:19 +01:00
7b98ea911d Revert "relax zita-resampler's relative ratio"
This reverts commit d1b5a9ed3d.
2017-10-29 17:55:57 +01:00
e6c8f104d1 Fix loading sessions w/new tempo-map.
Newly constructed sessions don't save "Tempo-start" property.
If there's no "start" node, _legacy_bbt is never explicitly set and
the default c'tor is used, which sets bar = 1.
The test for legacy session checks bar != 0.

All new sessions were processed with fix_legacy_session(), which breaks
the tempo-map and makes the session not loadable (duplicate Tempo).
2017-10-28 15:45:08 +02:00
7512692e79 Fix initial cycle noise with dummy-loopback 2017-10-28 15:45:08 +02:00
d1b5a9ed3d relax zita-resampler's relative ratio 2017-10-28 15:45:08 +02:00
6e017eff22 Accommodate newly added/removed source(s) in our MSVC project (libpbd) 2017-10-27 13:08:32 +01:00
1aa96dc0a1 Add a RAII SpinLock (using boost's spinlock) 2017-10-26 22:33:46 +02:00
eeb148bb61 NO-OP: whitespace cleanup 2017-10-26 15:46:00 -04:00
155f48fc7c move mixbus-only variable declaration 2017-10-26 15:45:16 -04:00
3161ccee43 remove unused variable 2017-10-26 15:44:32 -04:00
79374df84e fix preprocessor error on some/many systems 2017-10-26 15:44:09 -04:00
ceecbf2f4f switch from std::auto_ptr<> (deprecated) to boost::scoped_ptr<> 2017-10-26 15:43:49 -04:00
8a0839f332 remove unused variable 2017-10-26 15:43:31 -04:00
4250940ad8 switch from std::auto_ptr<> (deprecated) to boost::scoped_ptr<> 2017-10-26 15:43:08 -04:00
33af0b0d3d optimization for track with zero audio channels should not short-circuit MIDI disk reading 2017-10-26 15:15:05 -04:00
ea0807d4aa remove unnecessary calls 2017-10-26 10:46:42 -04:00
33c9772fda OSC: fix mixed types keeps from building on server 2017-10-25 23:00:41 -07:00
27c8c82076 OSC: Provide click level control 2017-10-25 21:56:29 -07:00
a2965f585a OSC: add feedback for punch in/out, click and click level 2017-10-25 21:56:29 -07:00
aba52ad8a2 OSC: add feedback for toggle_roll 2017-10-25 21:56:29 -07:00
8f13a0a13b OSC: fix monitor input/disk buttons so both can be on 2017-10-25 08:34:02 -07:00
ea1f0ba825 OSC: fix /strip/receives to have the original ssid like /strip/sends 2017-10-24 20:50:22 -07:00
e28a080651 OSC: fix refresh surface 2017-10-24 20:34:40 -07:00
da4454751d OSC: remove duplicate code. 2017-10-24 17:28:35 -07:00
a546003457 OSC: cleaned up select 2017-10-24 13:30:55 -07:00
7aacd5d71a OSC: fix add and remove tracks to update without bank change. 2017-10-24 12:44:09 -07:00
d6a3db1ac7 lv2 compat for liblilv < 1.10.0 2017-10-23 19:22:16 +02:00
de9ae19d8c OSC: fix various crash points 2017-10-22 21:25:30 -07:00
63b6ab1101 'Route::tape_drive_controllable()' needs to return something 2017-10-21 11:23:05 +01:00
1f842cf994 Add Lua bindings for new VCA/Slavable API 2017-10-20 02:54:28 +02:00
5dc54c91c7 Prevent recursive VCA assignments
The GUI so far only prevents direct connections  VCA 1 > VCA 2 > VCA 1,
but does not recurse  VCA 1 > VCA 2 > VCA 3 > VCA 1
2017-10-20 02:54:28 +02:00
b83e011a40 Remove not implemented API 2017-10-20 02:54:28 +02:00
ade3ea190c Lua: Fix Slavable & Automatable inheritance
This allows to cast VCAs into Slavables.
2017-10-20 02:54:28 +02:00
2a310e5f79 US2400: Mark controls dirty and send them from the periodic update thread. 2017-10-19 11:54:36 -05:00
ee09ae1c6b US2400: allow selecting the master bus. LED does not respond, though :( 2017-10-19 11:53:55 -05:00
48c520a4ef US2400: explicitly toggle switch state in some cases where everything should reset. 2017-10-19 11:53:55 -05:00
23c2b751aa US2400: map knobs for mixbus strips, when selected. 2017-10-19 11:53:55 -05:00
618020424e OSC: Cue observer simplified. 2017-10-19 08:48:25 -07:00
dabe7474b3 OSC: remove unused function. 2017-10-19 08:48:25 -07:00
f87e996013 FP8: unhardcode IDs and strip-count 2017-10-19 16:57:26 +02:00
706805e0ba Consolidate session + template file extensions 2017-10-18 19:22:23 +02:00
5c6e2b5802 Fix g_stat() for 64bit windows/mingw64 2017-10-18 17:54:39 +02:00
4c1feac16e OSC: Move observers to surface based for less traffic. 2017-10-17 14:57:47 -07:00
124092d139 Update ptformat to upstream 72bd66b
- Fix a wrong assumption in the xor code
- Find start of wav list more consistently
- Fix long long constants
2017-10-15 17:14:59 +11:00
f0f822feff OSC: fix crash for wrong number of parameters in set_surface 2017-10-12 13:18:21 -07:00
5c24db2402 Fix pre-roll cycle-split
previously this worked as long as the cycle was only
needed to be split once.
2017-10-12 01:49:05 +02:00
47246c86e2 add missing lock (for audition + mon section) 2017-10-10 22:12:54 +02:00
514c43278b OSC clean up route observer 2017-10-07 20:23:48 -07:00
ad226cf2bb For 'Route::send_pan_azi_controllable()' (when building non-Mixbus) I'm assuming the intention was to return an empty object
(i.e. similar to 'Route::send_enable_controllable()')
2017-10-07 10:11:12 +01:00
2107d09454 US2400: add us2400 files to repository. 2017-10-05 10:55:45 -05:00
0e12c967ea US2400: add us2400 to surfaces. 2017-10-05 10:03:09 -05:00
28d8f2f6b9 US2400: send_pan_azimuth lookup function (currently mb-only) 2017-10-05 09:59:03 -05:00
e156ec28bb US2400: add debug bits 2017-10-05 09:55:32 -05:00
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
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
5dd9acf9ab Fix another hardcoded "tar.xz" -> ARDOUR::session_archive_suffix 2017-10-03 18:03:40 +02:00
0802a0872f API change: expose session-archive compression-level 2017-10-03 02:24:16 +02:00
7613c9cb34 Fix session-archive edge-cases, prepare uncompressed archives
* don't fork/clone midi regions (default snapshot)
* properly handle encoding embedded/external multi-channel files
* use dedicated file-extension (prepare for uncompressed archive)
2017-10-03 02:24:10 +02:00
df83c0381e Prepare support for compression levels (archive + flac) 2017-10-03 02:22:42 +02:00
3f48d00081 use new CubicInterpolation API 2017-10-02 12:46:12 -04:00
45b1f6f6b8 change API and implementation for CubicInterpolation and Interpolation.
Also remove LinearInterpolation which is not used
2017-10-02 12:44:52 -04:00
4b9bf57b39 remove cruft 2017-10-02 12:44:52 -04:00
7921f6dc4d DiskReader should do nothing at all if there are no channels 2017-10-02 12:44:52 -04:00
4cc5958960 remove cruft 2017-10-02 12:43:34 -04:00
a2703ea503 remove midi_interpolation member of DiskIOProcessor (was used only to call ::distance() method 2017-10-02 12:43:34 -04:00
54f9edaf4b NO-OP: comment format change and whitespace 2017-10-02 12:43:34 -04:00
ee3090dff6 remove cruft from DiskIOProcessor header 2017-10-02 12:43:34 -04:00
318600d05e use constructor syntax 2017-10-02 12:43:34 -04:00
275756e96a remove leftover cruft related to wrap buffers from DiskIOProcessor 2017-10-02 12:43:34 -04:00
2153449400 tracks no longer need to be notified about speed changes 2017-10-02 12:43:34 -04:00
9775c5c9f1 set owner or disk-i/o processors
This fixes a race-condition. These plugins may be run w/o being
re-configured which sets the ownershi. currently debug msgs use
owner()->name()
2017-10-01 20:54:40 +02:00
c5a92ef813 Fix MIDI rec-region display
gui_feed_buffer is used for DiskWriter -> GUI notifications.
It was wrongly migrated from MidiDiskstream to DiskReader in 7fb6807
2017-10-01 03:30:02 +02:00
05ab7a46b5 Fix recording MIDI
- Fix API call to add region(midi_region) -- set count to "1"
- Forward DataRecorded() signal
- remove botched merge/rebase"
  a4a87f56 accidentally brought back code from old-destructive API
  which was removed in af103cf3 and 08c13007
  There is no per track NonLayered record mode anymore, it's session global.
- set can_record correctly to not accidentally clear last capture sources
  for cont'd recording (toggle track's rec-arm)
2017-10-01 03:03:44 +02:00
0431ed3d3e Disk-writer: don't record immediate/oob events 2017-09-30 23:38:41 +02:00
93d11d155c Make MIDI disk-reader a bit less buggy :)
* use start/end frame
* differentiate nframes and disk_samples_to_consume
* add global Port::port_offset () when writing data.
* add a note about b0rked vari-speed ..
2017-09-30 23:30:52 +02:00
eb0dded095 Immediate-event/out-of-band injection update & tweak clearing buffers
Immediate events are used for MIDI-Panic and to inject GUI generated
events e.g. patch-changes, note-events from the track-header
(scroomer-keyboard) and patch-change audition.

Current behavior:

- snapshot copy immediate events from ringbuffer into a buffer at
  the beginning of each the cycle.
- Inject immediate events into input-buffer directly after reading the input
- process "normally"
- pass immediate event-buffer to disk-writer, so it can skip them
  (don't write immediate events to disk)
- if the Route is not monitoring input: clear buffer before disk-reader
  and re-inject (original) immediate events after the disk-reader
- immediate events process normally and are also sent to outputs.
2017-09-30 23:16:04 +02:00
97c637e399 MIDI debugging. 2017-09-30 22:44:44 +02:00
37eb68e817 Remove unused IO::process_input() API
This was only needed in order to run the meter on inputs when Ardour did
no processing at all.
2017-09-30 18:56:54 +02:00
56edd3767c NO-OP, re-order code, put all *roll() methods next to each other. 2017-09-30 18:54:47 +02:00
dec10f2f3c First part of consolidating ::roll(), ::no_roll()
This moves common code (get and fill buffers) into ::passthru()
and renames ::passthru() to ::run_route().

passthru_silence() is no longer used (it was only needed A5 style
Track::no_roll_unlocked for no-roll + disk-monitoring)
2017-09-30 18:53:02 +02:00
0fc3bbddb2 remove unused Route::_silent 2017-09-30 18:46:24 +02:00
de4c0eb27c Remove Input-meter special-case
Now that disk is no longer topper-most but a processor, the special
case is no longer needed.
2017-09-30 18:01:45 +02:00
45336723f9 Re-initialize MMC devices when the preference is enabled 2017-09-30 16:48:30 +02:00
5fa9f8b399 Towards fixing no_roll()
Currently ::roll() may actually be a ::no_roll() under some circumstances.

This can also happen during count-in:
  transport_stopped () == transport_rolling()

and during latency-preroll:
   Global session-transport speed != 0, some tracks already roll,
   read data from disk and feed latent plugins.
   but other non-latent tracks or busses don't roll and still have to
   behave like the switch from no_roll() to roll() has not yet happened.

This changes the game WRT to monitoring as well, previously, Route:roll()
called Route::no_roll_unlocked () for conditions outlined above.
Now Track::no_roll_unlocked is called and in some cases wrongly clears
the buffers before the signal hits the disk-writer. (more work is needed
related to 61f8e53b)

On the upside this also fixes an issue with MidiTrack::no_roll not keeping
a lock while pushing data into the step-edit-ringbuffer.

This is also a step towards consolidating all entry points:
::roll(), ::no_roll(), ::silent_roll() in the Route class.
2017-09-30 16:45:45 +02:00
697d29cdc2 Fix thinko in 8139becb -- route split cycle
Individual Routes cannot split the process-cycle in no_roll(); roll()
by themselves. Each of the calls will flush output buffers (and offset
port-buffers). If a route feeds another route the inputs of the other
route will only see partial data.
2017-09-30 13:10:17 +02:00
61f8e53b7e Disk-reader don't silence buffers when not rolling
Doing so may clear out-of-band data which is injected into the
data-stream.
2017-09-30 05:35:12 +02:00
5ada17eba0 Fix MIDI port offsets.
AudioPort::get_audio_buffer() can offset the buffer simply by offsetting
a pointer. This allows to get an offset buffer for a given port.

For MIDI there's no such concept. A method writing to a MIDI buffer
which is backed by a Port can at best offset it by the global port-buffer
offset (static Port::port_offset), but not by the individual target port's
offset.
2017-09-30 05:25:27 +02:00
72fb8a5342 Align punch in/out recording with latency-compensation 2017-09-30 02:45:13 +02:00
915b308a88 amend ccedb2d44 2017-09-29 21:15:51 +02:00
bf41b7cfcb remove cruft 2017-09-29 21:05:46 +02:00
70c4977ab3 remove *.orig files (accidentally added in cba53a202) 2017-09-29 21:05:06 +02:00
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
33811b51b2 Convert Diskstream/Playlist from A5 session format 2017-09-29 06:48:27 +02:00
27b02b672a remove cruft 2017-09-29 06:32:10 +02:00
1339d42c78 Add DiskIOProc & Latency related Lua bindings & scripts 2017-09-29 05:03:48 +02:00
2b20f30d81 Aux-Send Latency compensation, part 2 & code-consolidation 2017-09-29 05:03:48 +02:00
9f9e948d84 Update Send: Include internal 'thru' delay-line
This allows to push latency upstream and delay the source
in case the destination has a longer latency.

Also add a signal to notify the Session in case this happens, intended
to queue a latency-recompute.
2017-09-29 05:03:48 +02:00
ddd4e3cf1d Aux-Send Latency compensation, part 1: latent sources 2017-09-29 05:03:48 +02:00
f974cd5401 Update Timecode Generator/Slave alignment 2017-09-29 05:03:48 +02:00
eb6df8939d Delayline: report if set_delay() actually changed the delay 2017-09-29 05:03:48 +02:00
5a2ea4d0e2 Delayline naming -- for debug purposes 2017-09-29 05:03:48 +02:00
24ec0b974d Properly aligned export (Stem + Session)
Delay ports being exported by their playback latency.
2017-09-29 05:03:48 +02:00
a6cc58d757 Remove unused mechanism 2017-09-29 05:03:48 +02:00
519576c31f Update the Metronome, align to output 2017-09-29 05:03:48 +02:00
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
8ff3b5ecf6 Add API to query IO latencies
IO::connected_latency() is relevant once Ardour publishes individual
per Port latency.

IO::public_latency() is only for debug purposes.
2017-09-29 05:03:48 +02:00
491523d6b7 Add Processor API for global session-transport alignment
These are only relevant for DiskIO Processors, however more
use-cases may present themselves (e.g. LuaDSP)
2017-09-29 05:03:48 +02:00
69b9ad6bcc Prepare removal of initial_delay 2017-09-29 05:03:48 +02:00
3d1e1d7213 clean up route header, NO-OP (except variable re-order) 2017-09-29 05:03:48 +02:00
abb7cb90e7 NO-OP: Whitespace 2017-09-29 05:03:48 +02:00
2fa1f1b0b3 Remove code related to capture-offset. 2017-09-29 05:03:48 +02:00
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
bcdb3aec3a Check in a few MSVC projects to accommodate the change from libtimecode to libtemporal
This is mostly to see if there'll be any problems when merging these changes into Mixbus. I'm guessing there'll be some conflicts in these projects (and a lot more to follow...)
2017-09-28 12:27:56 +01:00
7f327905a0 Accommodate newly added/removed source(s) in our MSVC project (libwidgets) 2017-09-28 12:27:55 +01:00
b2032938b1 Accommodate newly added/removed source(s) in our MSVC project (libtemporal) 2017-09-28 12:27:54 +01:00
657ba64ad2 Rename 'libs/temporal/MSVCtemporal/timecode.vcproj' to 'libs/temporal/MSVCtemporal/temporal.vcproj' 2017-09-28 12:27:54 +01:00
2750f7f485 Rename 'libs/temporal/MSVCtimecode' to 'libs/temporal/MSVCtemporal' 2017-09-28 12:27:53 +01:00
7e2c002ef6 Propagate Latency to backend/system ports (Dummy backend)
amend ab3889ff (which implements this for other backends)
2017-09-28 13:14:11 +02:00
b137a2982f Export needs to offset buffers when processing partial cycle 2017-09-26 17:52:43 +02:00
a80c8e1bb7 Fix FixedDelayline, default configuration increased set max-delay 2017-09-26 17:52:35 +02:00
61be0990fa change libtemporal to be versioned like all others 2017-09-25 12:13:54 -04:00
dcb55c508e additional changes to follow library name change from timecode -> temporal 2017-09-25 12:13:54 -04:00
f27ff4c8b8 Retire ClickBox + AutoSpin
After over 17 years of honorable service to the Ardour Codebase.
ClickBox and AutoSpin are retiring into the git nirvana.

We're glad for the duty, decency, reliability, dignity, respect which
these classes brought to Arodur and look back in gratitude on their years
of service.



PS. First one to say "cruft" will be fired.
2017-09-25 15:45:27 +02:00