From 1dcedeab38f3beb324e08b3c157796c9c1d3e388 Mon Sep 17 00:00:00 2001 From: gesellkammer Date: Thu, 20 Apr 2023 01:59:45 +0200 Subject: [PATCH] better test --- .github/workflows/test.yml | 5 +++-- maelzel/core/synthevent.py | 2 +- maelzel/snd/audiosample.py | 3 ++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3b1636b..e6f0be7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -104,6 +104,7 @@ jobs: strategy: matrix: python-version: ["3.9", "3.10"] + arch: ["x86_64", "arm64"] steps: - uses: actions/checkout@v3 @@ -131,9 +132,9 @@ jobs: mkdir -p artifacts cd test - python test-rec.py + python test-rec.py -o "test-rec-${{ matrix.python-version }}-${{ matrix.arch }}.wav" python test-dependencies.py - python test-notation.py -o 'test-notation-macos-${{ matrix.python-version }}.pdf' + python test-notation.py -o 'test-notation-macos-${{ matrix.python-version }}-${{ matrix.arch }}.pdf' cp *.wav ../artifacts cp *.pdf ../artifacts diff --git a/maelzel/core/synthevent.py b/maelzel/core/synthevent.py index b62fd4f..b29c326 100644 --- a/maelzel/core/synthevent.py +++ b/maelzel/core/synthevent.py @@ -846,4 +846,4 @@ def plotEvents(events: list[SynthEvent], axes: plt.Axes = None, notenames=False axes.yaxis.set_major_formatter(noteformatter) axes.tick_params(axis='y', labelsize=8) - return axes \ No newline at end of file + return axes diff --git a/maelzel/snd/audiosample.py b/maelzel/snd/audiosample.py index 92fbb51..715c709 100755 --- a/maelzel/snd/audiosample.py +++ b/maelzel/snd/audiosample.py @@ -1320,7 +1320,7 @@ def fundamentalBpf(self, fftsize=2048, overlap=4, method: str = None elif method == 'fft': from maelzel.snd import freqestimate - steptime = stepsize/self.sr + stepsize/self.sr samples = self.getChannel(0).samples f0curve, probcurve = freqestimate.f0curve(samples, sr=self.sr, overlap=4, method='fft') @@ -1696,6 +1696,7 @@ def spectrumAt(samples: np.ndarray, endsample = int(endtime * sr) samples = samples[startsample:endsample] samples = np.ascontiguousarray(samples) + try: import loristrck except ImportError: