From 8da8e0f4f41d482019f6a95457827825ae8b2282 Mon Sep 17 00:00:00 2001 From: Jamie Hardt Date: Wed, 8 Nov 2023 11:08:07 -0800 Subject: [PATCH 1/7] Cue documentation improvements --- docs/source/scopes/cue.rst | 9 +++++++++ wavinfo/wave_cues_reader.py | 24 +++++++++++++++++++++++- 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/docs/source/scopes/cue.rst b/docs/source/scopes/cue.rst index 96eed0e..8e25944 100644 --- a/docs/source/scopes/cue.rst +++ b/docs/source/scopes/cue.rst @@ -29,3 +29,12 @@ Class Reference .. autoclass:: wavinfo.wave_cues_reader.WavCuesReader :members: + +.. autoclass:: wavinfo.wave_cues_reader.CueEntry + :members: + +.. autoclass:: wavinfo.wave_cues_reader.LabelEntry + :members: + +.. autoclass:: wavinfo.wave_cues_reader.NoteEntry + :members: diff --git a/wavinfo/wave_cues_reader.py b/wavinfo/wave_cues_reader.py index 8d47a07..54ec60a 100644 --- a/wavinfo/wave_cues_reader.py +++ b/wavinfo/wave_cues_reader.py @@ -98,7 +98,14 @@ class CueEntry(NamedTuple): + """ + A ``cue`` element structure. + """ + #: Cue "name" or id number name: int + #: Cue position, as a frame count in the play order of the WAVE file. In + #: principle this can be affected by playlists and ``wavl`` chunk + #: placement. position: int chunk_id: bytes chunk_start: int @@ -114,7 +121,8 @@ def format_size(cls) -> int: @classmethod def read(cls, data: bytes) -> 'CueEntry': assert len(data) == cls.format_size(), \ - f"cue data size incorrect, expected {calcsize(cls.Format)} found {len(data)}" + (f"cue data size incorrect, expected {calcsize(cls.Format)}" + "found {len(data)}") parsed = unpack(cls.Format, data) @@ -124,6 +132,9 @@ def read(cls, data: bytes) -> 'CueEntry': class LabelEntry(NamedTuple): + """ + A ``labl`` structure. + """ name: int text: str @@ -137,6 +148,9 @@ def read(cls, data: bytes, encoding: str): class RangeLabel(NamedTuple): + """ + A ``ltxt`` structure. + """ name: int length: int purpose: str @@ -163,9 +177,17 @@ def read(cls, data: bytes, fallback_encoding: str): @dataclass class WavCuesReader: + + #: Every *cue* entry in the file cues: List[CueEntry] + + #: Every ``labl`` in the file labels: List[LabelEntry] + + #: Every ``ltxt`` in the file ranges: List[RangeLabel] + + #: Every ``note`` in the file notes: List[NoteEntry] @classmethod From 45c6e90db618cc013345dd42a2613cf43cb234c7 Mon Sep 17 00:00:00 2001 From: Jamie Hardt Date: Wed, 8 Nov 2023 11:08:58 -0800 Subject: [PATCH 2/7] Tweaked span formatting in WavCuesReader docs --- wavinfo/wave_cues_reader.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wavinfo/wave_cues_reader.py b/wavinfo/wave_cues_reader.py index 54ec60a..10c5a5a 100644 --- a/wavinfo/wave_cues_reader.py +++ b/wavinfo/wave_cues_reader.py @@ -178,7 +178,7 @@ def read(cls, data: bytes, fallback_encoding: str): @dataclass class WavCuesReader: - #: Every *cue* entry in the file + #: Every ``cue`` entry in the file cues: List[CueEntry] #: Every ``labl`` in the file From 42c0f9ce0d215f2ef4ec215da3699358b9bcecd6 Mon Sep 17 00:00:00 2001 From: Jamie Hardt Date: Wed, 8 Nov 2023 13:31:22 -0800 Subject: [PATCH 3/7] Update README.md Link to cues docs --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 24c1bd1..02e2720 100644 --- a/README.md +++ b/README.md @@ -22,12 +22,13 @@ professional music production. * [iXML][ixml] production recorder metadata, including project, scene, and take tags, recorder notes and file family information. * iXML `STEINBERG` sound library attributes. -* Wave embedded cue markers, cue marker labels, notes and timed ranges as used +* Wave embedded [cue markers][cues], cue marker labels, notes and timed ranges as used by Zoom, iZotope RX, etc. * Most of the common [RIFF INFO][info-tags] metadata fields. * The __wav format__ is also parsed, so you can access the basic sample rate and channel count information. - + +[cues]:https://wavinfo.readthedocs.io/en/latest/scopes/cue.html [bext]:https://wavinfo.readthedocs.io/en/latest/scopes/bext.html [smpte_330m2011]:https://wavinfo.readthedocs.io/en/latest/scopes/bext.html#wavinfo.wave_bext_reader.WavBextReader.umid [adm]:https://wavinfo.readthedocs.io/en/latest/scopes/adm.html From 71a6d752caf768ac6408f9ad5adcdfa26b162a8b Mon Sep 17 00:00:00 2001 From: Jamie Hardt Date: Wed, 8 Nov 2023 13:32:26 -0800 Subject: [PATCH 4/7] Update README.md Added link to wave format --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 02e2720..3524e6d 100644 --- a/README.md +++ b/README.md @@ -25,9 +25,10 @@ professional music production. * Wave embedded [cue markers][cues], cue marker labels, notes and timed ranges as used by Zoom, iZotope RX, etc. * Most of the common [RIFF INFO][info-tags] metadata fields. -* The __wav format__ is also parsed, so you can access the basic sample rate +* The [wav format][format] is also parsed, so you can access the basic sample rate and channel count information. +[format]:https://wavinfo.readthedocs.io/en/latest/classes.html#wavinfo.wave_reader.WavAudioFormat [cues]:https://wavinfo.readthedocs.io/en/latest/scopes/cue.html [bext]:https://wavinfo.readthedocs.io/en/latest/scopes/bext.html [smpte_330m2011]:https://wavinfo.readthedocs.io/en/latest/scopes/bext.html#wavinfo.wave_bext_reader.WavBextReader.umid From f978c5cf8b73123654c5490b802a71f5e8f02d02 Mon Sep 17 00:00:00 2001 From: Jamie Hardt Date: Wed, 8 Nov 2023 18:03:38 -0800 Subject: [PATCH 5/7] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 65dc017..ae42f9d 100644 --- a/README.md +++ b/README.md @@ -7,9 +7,9 @@ # wavinfo The `wavinfo` package allows you to probe WAVE and [RF64/WAVE files][eburf64] -and extract extended metadata, with an emphasis on film, video and -professional music production. - +and extract extended metadata. `wavinfo` has an emphasis on film, video and +professional music production but aspires to be the encyclopedic and final +aource for all WAVE file metadata. ## Metadata Support From a2ea978de0b4972ba1a412d5b612e01c73cc25ea Mon Sep 17 00:00:00 2001 From: Jamie Hardt Date: Wed, 8 Nov 2023 18:04:49 -0800 Subject: [PATCH 6/7] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ae42f9d..a620e44 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ The `wavinfo` package allows you to probe WAVE and [RF64/WAVE files][eburf64] and extract extended metadata. `wavinfo` has an emphasis on film, video and professional music production but aspires to be the encyclopedic and final -aource for all WAVE file metadata. +source for all WAVE file metadata. ## Metadata Support From 9fee03a67b67f0b1e4b1de1f617173c4501cf2fa Mon Sep 17 00:00:00 2001 From: Jamie Hardt Date: Wed, 8 Nov 2023 18:23:46 -0800 Subject: [PATCH 7/7] Update README.md --- README.md | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index a620e44..1580312 100644 --- a/README.md +++ b/README.md @@ -30,13 +30,13 @@ source for all WAVE file metadata. * The __wav format__ is also parsed, so you can access the basic sample rate and channel count information. -[bext]:https://wavinfo.readthedocs.io/en/latest/scopes/bext.html -[smpte_330m2011]:https://wavinfo.readthedocs.io/en/latest/scopes/bext.html#wavinfo.wave_bext_reader.WavBextReader.umid -[adm]:https://wavinfo.readthedocs.io/en/latest/scopes/adm.html -[ebu3285s6]:https://wavinfo.readthedocs.io/en/latest/scopes/dolby.html -[ixml]:https://wavinfo.readthedocs.io/en/latest/scopes/ixml.html -[info-tags]:https://wavinfo.readthedocs.io/en/latest/scopes/info.html -[eburf64]:https://tech.ebu.ch/docs/tech/tech3306v1_1.pdf +[bext]: https://wavinfo.readthedocs.io/en/latest/scopes/bext.html +[smpte_330m2011]: https://wavinfo.readthedocs.io/en/latest/scopes/bext.html#wavinfo.wave_bext_reader.WavBextReader.umid +[adm]: https://wavinfo.readthedocs.io/en/latest/scopes/adm.html +[ebu3285s6]: https://wavinfo.readthedocs.io/en/latest/scopes/dolby.html +[ixml]: https://wavinfo.readthedocs.io/en/latest/scopes/ixml.html +[info-tags]: https://wavinfo.readthedocs.io/en/latest/scopes/info.html +[eburf64]: https://tech.ebu.ch/docs/tech/tech3306v1_1.pdf ## How To Use @@ -60,6 +60,12 @@ The package also installs a shell command: $ wavinfo test_files/A101_1.WAV ``` +## Contributions! + +Any new or different kind of metadata you find, or any +new or different use of exising metadata you encounter, please submit +an Issue or Pull Request! + ## Other Resources * For other file formats and ID3 decoding,