This is a python module to make, load and unzip esi files
Project description
esi_maker
This is a python module to make, load and unzip esi files.
ESI is a lightweight sound source file format that stores a folder of audio files into a single binary file, together with a setting file, where you can customize the mappings between note names and audio file names, and other specific note control informations.
ESI file stores the uncompressed data of each audio file in the folder you specify, and the information to unzip the audio files with their original file names, along with the settings.
ESI stands for Easy Sampler Instrument
, which is used in Easy Sampler as an audio samples sound source file format, together with SoundFont files and audio files.
For more details about ESI format, you can refer to the musicpy sampler module's wiki, click here
Installation
Make sure you have installed python >= 3.7 first.
Run pip install esi_maker
in cmd/terminal.
Importing
import esi_maker as es
Usage
There are 3 functions in this python module, make_esi
, load_esi
and unzip_esi
.
make_esi(file_path,
name='untitled.esi',
settings=None,
asfile=True,
name_mappings=None,
show_msg=True)
# this function will make an esi file at the path that the parameter `name` specified,
# the file extension of the esi file is esi
# file_path: the directory of folder than contains all of the audio files you want to
# include in the esi file
# name: the name of the esi file
# settings: the settings of the esi file, could be a string or a file path of a text file
# asfile: if set to True, then read settings as a file path of a text file, otherwise read as a string
# name_mappings: the dictionary maps note names to audio file names
# show_msg: print progress messages or not
load_esi(file_path, convert=True)
# this function will load a esi file, return an esi class instance
# file_path: the file path of the esi file you want to load
# convert: if set to True, the audio files in the esi file will be converted to
# pydub AudioSegment instances from binary data
unzip_esi(file_path, folder_name=None, show_msg=True)
# this function will unzip the audio files in the esi file to the folder you specify
# file_path: the file path of the esi file you want to unzip the audio files
# folder_name: the path of the folder you want to unzip the audio files to
# show_msg: print progress messages or not
The esi class:
esi(samples,
settings=None,
name_mappings=None)
# samples: a dictionary which keys are the audio file names, values are the audio file binary data
# settings: the string represents settings
# name_mappings: the dictionary maps note names to audio file names
# file_names: this attribute is an auto-generated dictionary with audio file names
# without file extension maps to audio file names with file extension when an esi instance is initialized
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
File details
Details for the file esi_maker-0.15.tar.gz
.
File metadata
- Download URL: esi_maker-0.15.tar.gz
- Upload date:
- Size: 15.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b2daa6d90046abee0027406d22fffcf6da7be7d50b6ba8ca7af34a81393c7243 |
|
MD5 | 5278f8d7c34619cda0977a953eeee429 |
|
BLAKE2b-256 | 564262833f88b51d15c50daa676eaed52cf4a89dd60bf68ba5fc79b0a138045e |