signals Module

Subroutines generating different kind of signals


Uses

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

Used by

  • module~~signals~~UsedByGraph module~signals signals module~music music module~music->module~signals program~all_signals all_signals program~all_signals->module~signals program~all_signals->module~music program~arpeggios arpeggios program~arpeggios->module~signals program~arpeggios->module~music program~blues blues program~blues->module~signals program~blues->module~music program~chords_and_melody chords_and_melody program~chords_and_melody->module~signals program~chords_and_melody->module~music program~drum_machine drum_machine program~drum_machine->module~signals program~demo_effects demo_effects program~demo_effects->module~music program~drone_music drone_music program~drone_music->module~music program~misc_sounds misc_sounds program~misc_sounds->module~music

Functions

public pure function weierstrass(a, b, x)

https://en.wikipedia.org/wiki/Weierstrass_function

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: a
real(kind=wp), intent(in) :: b
real(kind=wp), intent(in) :: x

Return Value real(kind=wp)


Subroutines

public subroutine add_karplus_strong(tape, track, t1, t2, f, Amp)

Karplus and Strong algorithm (1983), for plucked-string http://crypto.stanford.edu/~blynn/sound/karplusstrong.html https://en.wikipedia.org/wiki/Karplus%E2%80%93Strong_string_synthesis

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
real(kind=wp), intent(in) :: f
real(kind=wp), intent(in) :: Amp

public subroutine add_karplus_strong_drum(tape, track, t1, t2, P, Amp)

Karplus and Strong (1983) algorithm for obtaining a percussion sound. Typically, P is taken to be between 150 and 1000. Caution: this algorithm overwrites what may have existed on the track at the chosen location. You may also want to modify the b parameter to make some weird sounds, somewhere between percussion and guitar... http://crypto.stanford.edu/~blynn/sound/karplusstrong.html https://en.wikipedia.org/wiki/Karplus%E2%80%93Strong_string_synthesis

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
integer, intent(in) :: P
real(kind=wp), intent(in) :: Amp

public subroutine add_karplus_strong_drum_stretched(tape, track, t1, t2, P, Amp)

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
integer, intent(in) :: P
real(kind=wp), intent(in) :: Amp

public subroutine add_karplus_strong_stretched(tape, track, t1, t2, f, Amp)

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
real(kind=wp), intent(in) :: f
real(kind=wp), intent(in) :: Amp

public subroutine add_noise(tape, track, t1, t2, Amp, envelope)

Add white noise on the track:

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
real(kind=wp), intent(in) :: Amp
type(ADSR_envelope), intent(in), optional :: envelope

public subroutine add_sawtooth_wave(tape, track, t1, t2, f, Amp, envelope)

Adds on the track a sawtooth wave with an ADSR envelope:

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
real(kind=wp), intent(in) :: f
real(kind=wp), intent(in) :: Amp
type(ADSR_envelope), intent(in), optional :: envelope

public subroutine add_sine_wave(tape, track, t1, t2, f, Amp, envelope)

Adds on the track a sine wave with an ADSR envelope:

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
real(kind=wp), intent(in) :: f
real(kind=wp), intent(in) :: Amp
type(ADSR_envelope), intent(in), optional :: envelope

public subroutine add_square_wave(tape, track, t1, t2, f, Amp, envelope)

Adds on the track a square wave with an ADSR envelope:

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
real(kind=wp), intent(in) :: f
real(kind=wp), intent(in) :: Amp
type(ADSR_envelope), intent(in), optional :: envelope

public subroutine add_triangle_wave(tape, track, t1, t2, f, Amp, envelope)

Adds on the track a triangle wave with an ADSR envelope:

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
real(kind=wp), intent(in) :: f
real(kind=wp), intent(in) :: Amp
type(ADSR_envelope), intent(in), optional :: envelope

public subroutine add_weierstrass(tape, track, t1, t2, f, Amp, envelope)

Add a fractal signal on the track with an envelope:

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
real(kind=wp), intent(in) :: f
real(kind=wp), intent(in) :: Amp
type(ADSR_envelope), intent(in), optional :: envelope