Skip to content

Commit

Permalink
placeholders for testing piano roll
Browse files Browse the repository at this point in the history
  • Loading branch information
yiitozer committed Mar 12, 2024
1 parent 4ac7a6b commit 2f541b4
Showing 1 changed file with 20 additions and 48 deletions.
68 changes: 20 additions & 48 deletions tests/test_pianoroll.py
Original file line number Diff line number Diff line change
@@ -1,48 +1,20 @@
# import numpy as np
# import pandas as pd
# import os
# from scipy.io import wavfile
#
# from libsoni.core import pianoroll
#
# FS = 22050
# EXPORT_AUDIO = True
# DURATIONS = [None, 4.2, 3.0, 5.0]
#
#
# def test_pianoroll_clicks():
# pianoroll_df = pd.read_csv(os.path.join('data_csv', 'Bach_BWV1056-01-mm000-116_Oezer-V1_P_aligned.csv'),
# delimiter=';')
#
# y = pianoroll.sonify_pianoroll_clicks(pianoroll_df,
# tuning_frequency=440.0,
# duration=None,
# fs=FS)
#
# if EXPORT_AUDIO:
# wavfile.write(os.path.join('tests', 'data_audio',
# 'Bach_BWV1056-01-mm000-116_Oezer-V1_P_aligned_pianoroll_sonified_clicks.wav'), FS, y)
#
#
# #test_pianoroll_clicks()
#
# def test_pianoroll_additive_synthesis():
# pianoroll_df = pd.read_csv(os.path.join('data_csv', 'Bach_BWV1056-01-mm000-116_Oezer-V1_P_aligned.csv'),
# delimiter=';')
#
# y = pianoroll.sonify_pianoroll_additive_synthesis(pianoroll_df,
# partials=[1, 2, 3, 4],
# partials_amplitudes=[1, 0.7, 0.3, 0.1],
# partials_phase_offsets=[0, 0, 0, 0],
# tuning_frequency=440.0,
# duration=None,
# fs=FS)
#
# if EXPORT_AUDIO:
# wavfile.write(os.path.join('tests',
# 'data_audio',
# 'Bach_BWV1056-01-mm000-116_Oezer-V1_P_aligned_pianoroll_sonified_additive_synthesis.wav'),
# FS, y)
#
#
# test_pianoroll_additive_synthesis()
import numpy as np
import pandas as pd
import soundfile as sf

from libsoni.core.pianoroll import sonify_pianoroll_clicks,\
sonify_pianoroll_additive_synthesis, sonify_pianoroll_fm_synthesis, sonify_pianoroll_sample

Fs = 22050
SAMPLE, _ = sf.read('data_audio/samples/01Pia1F060f_np___0_short.wav', Fs)

def test_pianoroll_sample():
pass

def test_pianoroll_fm():
pass

def test_pianoroll_additive():

def test_pianoroll_clicks():
pass

0 comments on commit 2f541b4

Please sign in to comment.