Writes a chord using an array containing the intervals (see the music_common module)
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 | |||
real(kind=wp), | intent(in) | :: | f | |||
real(kind=wp), | intent(in) | :: | Amp | |||
integer, | intent(in), | dimension(:) | :: | chord | ||
type(ADSR_envelope), | intent(inout), | optional | :: | envelope |
subroutine add_chord(tape, track, t1, t2, f, Amp, chord, envelope) type(tape_recorder), intent(inout) :: tape integer, intent(in) :: track real(wp), intent(in) :: t1, t2, f, Amp integer, dimension(:), intent(in) :: chord type(ADSR_envelope), optional, intent(inout) :: envelope integer :: i, interval do i = 1, size(chord) interval = chord(i) call add_note(tape, track, t1, t2, f * SEMITONE**interval, Amp, envelope) end do end subroutine add_chord