apply_fade_in Subroutine

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

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

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_in~~CalledByGraph proc~apply_fade_in apply_fade_in program~drone_music drone_music program~drone_music->proc~apply_fade_in program~shepard_risset_glissando shepard_risset_glissando program~shepard_risset_glissando->proc~apply_fade_in

Source Code

    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