
Clip a splice so segments are of fixed duration
clip_splice.RdClip a splice so segments are of fixed duration
Arguments
- splice_dfr
Spliceobject.- duration
window duration in seconds.
- location
'beginning', 'middle' or 'end'.
See also
Other splicing functions:
get_spliced_view(),
is_splice_overlapping(),
merge_splice(),
splice_time.Duration(),
splice_time.Metre(),
splice_time.OnsetsDifference(),
splice_time.View(),
splice_time.list(),
splice_time(),
split.SplicedView()
Examples
l <- list(a = c(10, 20), b = c(30, 40),c = c(50, 55))
splice_dfr <- splice_time(l)
clip_splice(splice_dfr, duration = 1)
#> Segment Start End
#> 1 a 14.5 15.5
#> 2 b 34.5 35.5
#> 3 c 52.0 53.0
clip_splice(splice_dfr, duration = 6)
#> Warning: Segments too short to clip to duration - using start or end point of segment
#> Segment Start End
#> 1 a 12 18
#> 2 b 32 38
#> 3 c 50 55
clip_splice(splice_dfr, duration = 1, location = 'beginning')
#> Segment Start End
#> 1 a 10 11
#> 2 b 30 31
#> 3 c 50 51
clip_splice(splice_dfr, duration = 10, location = 'beginning')
#> Warning: Segments too short to clip to duration - using end point of segment
#> Segment Start End
#> 1 a 10 20
#> 2 b 30 40
#> 3 c 50 55
clip_splice(splice_dfr, duration = 1, location = 'end')
#> Segment Start End
#> 1 a 19 20
#> 2 b 39 40
#> 3 c 54 55
clip_splice(splice_dfr, duration = 10, location = 'end')
#> Warning: Segments too short to clip to duration - using start point of segment
#> Segment Start End
#> 1 a 10 20
#> 2 b 30 40
#> 3 c 50 55