Skip to content

Musica #864

@riclegjc-png

Description

@riclegjc-png

from pydub.generators import Sine
from pydub import AudioSegment

Gerar tons senoidais básicos

tone1 = Sine(440).to_audio_segment(duration=3000) # A4 (440Hz)
tone2 = Sine(523.25).to_audio_segment(duration=3000) # C5 (523Hz)
tone3 = Sine(392).to_audio_segment(duration=3000) # G4 (392Hz)

Ajustar volumes

tone1 = tone1 - 15
tone2 = tone2 - 20
tone3 = tone3 - 18

Criar um loop de aproximadamente 1 minuto

loop = (tone1 + tone2 + tone3) * 7 # ~63 segundos

Exportar como MP3

loop.export("musica_ambiental_original.mp3", format="mp3", bitrate="192k")

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