apply_fade_out Subroutine

public subroutine apply_fade_out(tape, track, t1, t2)

A linear fade out, from relative level 1 to 0:

Arguments

Type IntentOptional Attributes Name
type(tape_recorder), intent(inout) :: tape
integer, intent(in) :: track
real(kind=wp), intent(in) :: t1
real(kind=wp), intent(in) :: t2

Called by

proc~~apply_fade_out~~CalledByGraph proc~apply_fade_out apply_fade_out program~arpeggios arpeggios program~arpeggios->proc~apply_fade_out program~drone_music drone_music program~drone_music->proc~apply_fade_out program~shepard_risset_glissando shepard_risset_glissando program~shepard_risset_glissando->proc~apply_fade_out

Source Code

    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