13
0
Go to file
Robin Gareus 14da117bc8 Add explicit round/floor integer multiply/divide
This fixes various rounding issues. Notably superclock to sample
conversion must always round down when playing forward.

`::process (start, end, speed = 1)` uses exclusive end.
Processing begins at `start` and end ends just before `end`.
Next cycle will begin with the current end.

One example where this failed:
 - New session at 48kHz
 - Change tempo to 130 BPM
 - Enable snap to 1/8 note
 - Snap playhead to 1|3|0
 - Enable Metronome
 - Play

`assert (superclock_to_samples ((*i).sclock(), sample_rate()) < end);`

end = 177231 samples == superclock 1042118280
A grid point is found at superclock 1042116920 (that is < 1042118280).
However converting it back to samples rounded it to sample 177231 == end,
while actual location is 1360 super-clock ticks before end.

The metronome click has to be started this cycle, since the same
position will not be found at the beginning of the next cycle, with
start = 177232.

Similarly a samplecnt_t t, converted to music-time and back must not be
later than the given sample.

```
timepos_t tsc (t);
assert (timepos_t::from_ticks (tsc.ticks ()).samples () <= t);
```

IOW. When playing forward, all super-clock time between 1|1|0 and 1|1|1
should round down to 1|1|0. "We have not yet reached the first tick".
2022-10-22 02:10:05 +02:00
doc Fix various typos 2022-04-08 19:51:02 +02:00
gtk2_ardour Use libardour's SimpleExport 2022-10-21 19:59:16 +02:00
headless wscript: consistently have at most one empty separator line 2022-04-09 12:16:40 +02:00
libs Add explicit round/floor integer multiply/divide 2022-10-22 02:10:05 +02:00
luasession Add missing comma to luasession/wscript 2022-07-01 17:50:09 -04:00
msvc_extra_headers Fix various typos 2022-04-08 19:51:02 +02:00
MSVCardour3 Add/remove source(s) in our MSVC project (libardour and gtk2_ardour) 2021-07-19 11:27:02 +01:00
MSVCMixbus3
MSVCvst_scan Add/remove source(s) in our MSVC project (vst2_scanner) 2021-07-05 10:25:35 +01:00
session_utils Revert "Small test tool for PBD::Transmitter thread-safety tests" 2022-10-05 22:25:07 +02:00
share Update export presets 2022-10-20 21:38:45 +02:00
tools Add Ardour logo sources (thanks to thorwil) 2022-10-14 02:21:09 +02:00
.dir-locals.el
.gitattributes
.gitignore
ardour.1
COPYING
nutempo-todo todo list text for nutempo-related tasks 2021-08-16 13:41:49 -06:00
PACKAGER_README
README Directly use HTTPS 2021-03-23 23:27:45 +01:00
README-GITHUB.txt
system_config
TRANSLATORS
waf Update waf binary, using doc/updating_waf.txt 2022-01-09 18:46:24 +01:00
wscript Deploy LRDF presets (if any) 2022-10-11 17:07:33 +02:00

Please see the Ardour web site at https://ardour.org/ for all documentation..

For information on building ardour: 
      
     https://ardour.org/development.html