From 79a710bc808681a003ad643416810692e08a9e0a Mon Sep 17 00:00:00 2001 From: Robert Date: Tue, 27 Apr 2021 17:21:35 +0200 Subject: [PATCH] updated readme --- README.md | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 5c02642..a684b03 100644 --- a/README.md +++ b/README.md @@ -2,10 +2,14 @@ A commandline tool for fourier transforming audio files ## Usage +Spectralyze is a commandline tool, type `spectralyze -h` to get a list of available options. Anyways, here is an example command you might run: + ``` -spectralyze file1 [file2...] +spectralyze -i 50 coolSong.wav ``` +This would read in a file called `coolSong.wav`, split it into 50ms long audio segments and then transform each of those individually. The resulting spectrums will be stored in `coolSong.json` + ## Supported Formats * WAV * AIFF @@ -15,9 +19,16 @@ Spectralyze reads one or more audio files from the standard arguments and create Each audio channel in the file is transformed separately. The resulting JSON has the following structure ``` { - "channel_1": [ - {"freq": 0.0, "mag": 1.0"}, - {"freq": 0.1, "mag": 1.1"}, + "channel_1": [ | Channel of the current spectrum + { | + "begin": 0, | Index of the first sample of this segment + "end": 1000, | Index of the last sample of this segment + "spectrum": [ | + {"freq": 0.0, "mag": 1.0"}, | First spectrum datapoint + {"freq": 0.1, "mag": 1.1"}, | Second spectrum datapoint + ... + ] + }, ... ], "channel_2": ...