A linear fade in, from relative level 0 to 1:
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_in(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-i1) / (i2-i1) tape%right(track, i) = tape%right(track, i) * (i-i1) / (i2-i1) end do end subroutine apply_fade_in