tape_recorder_class Module

This is the basic class, representing a numeric tape recorder with audio tracks.


Uses

  • module~~tape_recorder_class~~UsesGraph module~tape_recorder_class tape_recorder_class module~forsynth forsynth module~tape_recorder_class->module~forsynth iso_fortran_env iso_fortran_env module~forsynth->iso_fortran_env

Used by

  • module~~tape_recorder_class~~UsedByGraph module~tape_recorder_class tape_recorder_class module~audio_effects audio_effects module~audio_effects->module~tape_recorder_class module~envelopes envelopes module~envelopes->module~tape_recorder_class module~music music module~music->module~tape_recorder_class module~music->module~envelopes module~signals signals module~music->module~signals module~signals->module~tape_recorder_class module~signals->module~envelopes module~wav_file_class wav_file_class module~wav_file_class->module~tape_recorder_class program~misc_sounds misc_sounds program~misc_sounds->module~tape_recorder_class program~misc_sounds->module~music program~misc_sounds->module~wav_file_class program~all_signals all_signals program~all_signals->module~envelopes program~all_signals->module~music program~all_signals->module~signals program~all_signals->module~wav_file_class program~arpeggios arpeggios program~arpeggios->module~envelopes program~arpeggios->module~music program~arpeggios->module~signals program~arpeggios->module~wav_file_class program~blues blues program~blues->module~audio_effects program~blues->module~music program~blues->module~signals program~blues->module~wav_file_class program~chords_and_melody chords_and_melody program~chords_and_melody->module~audio_effects program~chords_and_melody->module~envelopes program~chords_and_melody->module~music program~chords_and_melody->module~signals program~chords_and_melody->module~wav_file_class program~demo_effects demo_effects program~demo_effects->module~audio_effects program~demo_effects->module~envelopes program~demo_effects->module~music program~demo_effects->module~wav_file_class program~doppler_effect doppler_effect program~doppler_effect->module~wav_file_class program~drone_music drone_music program~drone_music->module~envelopes program~drone_music->module~music program~drone_music->module~wav_file_class program~drum_machine drum_machine program~drum_machine->module~signals program~drum_machine->module~wav_file_class program~shepard_risset_glissando shepard_risset_glissando program~shepard_risset_glissando->module~envelopes program~shepard_risset_glissando->module~wav_file_class program~shepard_scale shepard_scale program~shepard_scale->module~audio_effects program~shepard_scale->module~wav_file_class

Derived Types

type, public ::  tape_recorder

Components

Type Visibility Attributes Name Initial
real(kind=wp), public :: duration

Duration in seconds:

real(kind=wp), public, dimension(:, :), allocatable :: left

Two arrays stocking the stereo tracks:

real(kind=wp), public, dimension(:, :), allocatable :: right

Two arrays stocking the stereo tracks:

integer, public :: samples

Number of samples:

integer, public :: tracks

Number of audio tracks (excluding track 0 reserved for the final mix):

Finalizations Procedures

final :: auto_finalize

Type-Bound Procedures

procedure, public :: clear_tracks
procedure, public :: copy_section
procedure, public :: finalize
procedure, public :: mix_tracks
procedure, public :: new

Subroutines

public subroutine auto_finalize(self)

An automatic finalizer, by security.

Arguments

Type IntentOptional Attributes Name
type(tape_recorder), intent(inout) :: self

public subroutine clear_tracks(self)

Erase all tracks on all the channels of the tape.

Arguments

Type IntentOptional Attributes Name
class(tape_recorder), intent(inout) :: self

public subroutine copy_section(self, from_track, to_track, t1, t2, t3)

Copy section t1...t2 at t3, either on the same track or another one. The content already present at t3 is overwritten. The code suppose that t1 < t2 < t3.

Arguments

Type IntentOptional Attributes Name
class(tape_recorder), intent(inout) :: self
integer, intent(in) :: from_track
integer, intent(in) :: to_track
real(kind=wp), intent(in) :: t1
real(kind=wp), intent(in) :: t2
real(kind=wp), intent(in) :: t3

public subroutine finalize(self)

Called by the close_WAV_file() method.

Arguments

Type IntentOptional Attributes Name
class(tape_recorder), intent(inout) :: self

public subroutine mix_tracks(self, levels, pan)

Tracks 1 to tracks-1 are mixed on track 0.

Arguments

Type IntentOptional Attributes Name
class(tape_recorder), intent(inout) :: self
real(kind=wp), intent(in), optional, dimension(1:self%tracks) :: levels
real(kind=wp), intent(in), optional, dimension(1:self%tracks) :: pan

public subroutine new(self, tracks, duration)

Arguments

Type IntentOptional Attributes Name
class(tape_recorder), intent(inout) :: self
integer, intent(in) :: tracks
real(kind=wp), intent(in) :: duration