Add CART CHUNK to wave files.
Project description
Python CART CHUNK
Installation
Clone this repo and install using pip:
$ git clone https://github.com/maxtimbo/python_cart_chunk
$ cd python_cart_chunk
$ pip install .
Usage
You can use the CartChunk class to read CART CHUNK headers as well as riff and fmt data of a wave file:
from cart_chunk import CartChunk
from pathlib import Path
src = Path('/path/to/wave/file.wav')
wav = CartChunk(src)
if wav.is_scott:
for key, value in wav.scott_data.items():
print(f'{key:<20}: {value}')
else:
print('Does not contain CART CHUNK')
for key, value in wav.riff_data.items():
print(f'{key:<20}: {value}')
for key, value in wav.fmt_data.items():
print(f'{key:<20}: {value}')
for key, value in wav.data_meta.items():
print(f'{key:<20}: {value}')
Use the CartChunk class to write a new copy with the CART CHUNK. The following keyword args are available:
artiststrtitlestrtriviastryearintcategorystrcartstrintrofloatsecfloateomfloatstart_timestamptupleend_timestamptuplehrcanplaylist[list[int]]
from cart_chunk import NewCart
new_file = Path('/path/to/new/file.wav')
new_cart = NewCart(new_file, artist='artist', title='title')
wav.write_copy(new_cart)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file python_cart_chunk-0.0.2b2.tar.gz.
File metadata
- Download URL: python_cart_chunk-0.0.2b2.tar.gz
- Upload date:
- Size: 8.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6ceb077968b529d096a95ff62e4153589aa2f69ca01f66bd92d3f0f10ed49f98
|
|
| MD5 |
a6c6fb6cc1515fa476ed05d90988446a
|
|
| BLAKE2b-256 |
628daf3fd6bab892a16fe575df3c843d8af3888134aef9c64608e2ef87ef899f
|
File details
Details for the file python_cart_chunk-0.0.2b2-py3-none-any.whl.
File metadata
- Download URL: python_cart_chunk-0.0.2b2-py3-none-any.whl
- Upload date:
- Size: 8.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1ae2d49f865f9b62f0eebb6c1ab53210512024dfd5d6f1838e76905efdf80fed
|
|
| MD5 |
383c2cb4472cca67ac011afd5a3f5312
|
|
| BLAKE2b-256 |
0c728c2390bac3d1ba5aa5bfdccb67484425d26952c21434407abce44b34ab6c
|