A linear fade out, from relative level 1 to 0:
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tape_recorder), | intent(inout) | :: | tape | |||
integer, | intent(in) | :: | track | |||
real(kind=wp), | intent(in) | :: | t1 | |||
real(kind=wp), | intent(in) | :: | t2 |
subroutine apply_fade_out(tape, track, t1, t2) type(tape_recorder), intent(inout) :: tape integer, intent(in) :: track real(wp), intent(in) :: t1, t2 integer :: i, i1, i2 i1 = nint(t1 * RATE) i2 = nint(t2 * RATE) - 1 do concurrent(i = i1:i2) tape%left( track, i) = tape%left( track, i) * ((i-i2) / real(i1-i2, kind=wp)) tape%right(track, i) = tape%right(track, i) * ((i-i2) / real(i1-i2, kind=wp)) end do end subroutine apply_fade_out