create_WAV_file Subroutine

public subroutine create_WAV_file(self, filename, tracks, duration)

Create a WAV file with a header:

Type Bound

WAV_file

Arguments

Type IntentOptional Attributes Name
class(WAV_file), intent(inout) :: self
character(len=*), intent(in) :: filename
integer, intent(in) :: tracks
real(kind=wp), intent(in) :: duration

Calls

proc~~create_wav_file~~CallsGraph proc~create_wav_file WAV_file%create_WAV_file proc~new tape_recorder%new proc~create_wav_file->proc~new proc~write_header WAV_file%write_header proc~create_wav_file->proc~write_header proc~clear_tracks tape_recorder%clear_tracks proc~new->proc~clear_tracks

Called by

proc~~create_wav_file~~CalledByGraph proc~create_wav_file WAV_file%create_WAV_file program~all_signals all_signals program~all_signals->proc~create_wav_file program~arpeggios arpeggios program~arpeggios->proc~create_wav_file program~blues blues program~blues->proc~create_wav_file program~chords_and_melody chords_and_melody program~chords_and_melody->proc~create_wav_file program~demo_effects demo_effects program~demo_effects->proc~create_wav_file program~doppler_effect doppler_effect program~doppler_effect->proc~create_wav_file program~drone_music drone_music program~drone_music->proc~create_wav_file program~drum_machine drum_machine program~drum_machine->proc~create_wav_file program~misc_sounds misc_sounds program~misc_sounds->proc~create_wav_file program~shepard_risset_glissando shepard_risset_glissando program~shepard_risset_glissando->proc~create_wav_file program~shepard_scale shepard_scale program~shepard_scale->proc~create_wav_file

Source Code

    subroutine create_WAV_file(self, filename, tracks, duration)
        class(WAV_file), intent(inout) :: self
        character(*), intent(in)       :: filename
        integer, intent(in)  :: tracks
        real(wp), intent(in) :: duration

        call self%new(tracks, duration)

        self%filename   = filename
        open(newunit=self%fileunit, file=self%filename, access='stream', status='replace', action='write')
        call self%write_header()
    end subroutine create_WAV_file