pytimbre.audio.ChunkScanner¶
- class pytimbre.audio.ChunkScanner(file_path: str)¶
Bases:
objectThis class will scan the Wav file, assuming that there is a correctly formatted file, and collect all the various chunks that are available within the file.
- __init__(file_path: str)¶
This constructor will search through the file and determine the collection of data chunks that exist within the correctly formed audio file.
Methods
__init__(file_path)This constructor will search through the file and determine the collection of data chunks that exist within the correctly formed audio file.
read_chunk_name(file)This function reads the next four bytes from the file and returns the chunk name
read_chunk_size(file)This function reads four bytes and formats them as an integer :param file: File - the binary file that is to be read :return: int - the size of the chunk
Attributes
available_chunksdata_chunkfact_chunkformat_chunklist_chunkpeak_chunkxml_chunk- static read_chunk_name(file)¶
This function reads the next four bytes from the file and returns the chunk name
- Parameters:
file – FILE - the binary file that contains the information
- Returns:
str - the name of the next chunk
- static read_chunk_size(file)¶
This function reads four bytes and formats them as an integer :param file: File - the binary file that is to be read :return: int - the size of the chunk