reAudioPlayer / one

The open source audio player with the most extensive catalogue
https://reaudioplayer.github.io/one/
GNU General Public License v3.0
4 stars 0 forks source link

implement #34

Closed github-actions[bot] closed 1 year ago

github-actions[bot] commented 2 years ago

https://github.com/reAudioPlayer/one/blob/8b68761885408451da6f5933fdc006cb27958eec/prototype/plotWaveForm.py#L2


# TODO mp3 to wav
# TODO implement
# TODO colours

import os
import scipy.io
import scipy.io.wavfile
import numpy as np
import matplotlib.pyplot as plt

myAudioFilename = "D:\\Users\\David\\Musik\\#Selfmade\\FL Studio\\Running Up That Hill (Colour Bounce)\\Running Up That Hill (Colour Bounce).wav"

sampleRate, audioBuffer = scipy.io.wavfile.read(myAudioFilename)

duration = len(audioBuffer)/sampleRate

time = np.arange(0,duration,1/sampleRate) #time vector

plt.figure(figsize=(20, 5))
plt.plot(time, audioBuffer[:,0], color = "white")
plt.tick_params(left=False, labelleft=False, bottom=False, labelbottom=False)
plt.box(False)
plt.tight_layout()
plt.savefig('D:\\Users\\David\\Dokumente\\OneDrive\\Documents\\out.svg', transparent=True)
github-actions[bot] commented 1 year ago

Closed in a0dcdc6a822519e788875f48bf87c66a3c2d9ac1