X Tutup
Skip to content

Looking for help making sound of a train horn #65

@otiv-willem-vanhulle

Description

@otiv-willem-vanhulle

Hi, thanks for making this library publicly available.

I am recreating the sound of a train using your library but looking for help.

I have written the following code to reproduce the main frequencies:

    let train_frequences = (organ_hz(452.20) >> delay(0.1)) * lfo(|t| downarc(0.5 * t))
        + (organ_hz(602.93) >> delay(0.2)) * lfo(|t| downarc(0.5 * t))
        + (organ_hz(624.46) >> delay(0.1)) * lfo(|t| downarc(0.5 * t))
        + (organ_hz(646.00) >> delay(0.05)) * lfo(|t| downarc(0.5 * t))
        + (organ_hz(689.06) >> delay(0.1)) * lfo(|t| downarc(0.5 * t))
        + (organ_hz(710.60) >> delay(0.2)) * lfo(|t| downarc(0.5 * t))
        + (organ_hz(882.86) >> delay(0.3)) * lfo(|t| downarc(0.5 * t))
        + (organ_hz(904.39) >> delay(0.4)) * lfo(|t| downarc(0.5 * t))
        + (organ_hz(925.93) >> delay(0.4)) * lfo(|t| downarc(0.5 * t))
        + (organ_hz(947.46) >> delay(0.4)) * lfo(|t| downarc(0.5 * t))
        + (organ_hz(1076.66) >> delay(0.4)) * lfo(|t| downarc(0.5 * t));

However, I am afraid that I am doing something wrong.

The sound that I would like to recreate can be found on https://www.youtube.com/watch?v=9Ptcd5O1i7E

I have computed a spectrogram as well.

spectrogram

From this spectogram I found the main frequencies and I could kind of reproduce them. I have adjusted the delays a bit, so that it sounds more like the sample.

However, it still sounds far from the sample. Am I doing something wrong here? On the spectrogram I see a lot of frequencies in between the loudest ones. Should I add some kind of noise to make it more realistic?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      X Tutup