I found a library called Pydub (http://pydub.com/) that can easily manipulate music data, so I synthesized WAV files and played with them.
Install with pip install pydub with ffmpeg or avconv.
The source code looks like this
#!/usr/bin/env python2.7
#-*- coding: utf-8 -*-
from pydub import AudioSegment
sound1 = AudioSegment.from_wav("path to wav file 1")
sound2 = AudioSegment.from_wav("path to wav file 2")
sound3 = AudioSegment.from_wav("path to wav file 3")
combined_sounds = sound1 + sound2 + sound3
combined_sounds.export("path to save path/combined_sounds.wav", format="wav")
Recommended Posts