Python library for Impulse Tracker (IT) module files
Project description
pyIT (upgraded version) – Impulse Tracker Module Library
pyIT is a Python library for reading, writing, and manipulating Impulse Tracker (IT) module files.
It provides a complete toolkit to programmatically create, edit, and convert .it files, with support for patterns, instruments, samples, envelopes, and rendering to audio or SNES soundbanks.
Features
- Full IT file format support – read/write
.itfiles with all header, pattern, instrument, sample, and envelope data. - Pattern construction – build patterns from simple note sequences or guitar-style tablature.
- Instrument & sample creation – load WAV files, generate basic waveforms (sine, square, saw, etc.), and map samples to notes.
- Envelope editing – volume, pan, and pitch envelopes with loop and sustain points.
- Audio rendering – convert modules to OGG Vorbis using Schism Tracker (or a custom renderer).
- SNES integration – prepare IT files for
smconv(PVSNESlib) to create soundbanks for Super Nintendo homebrew. - Pure Python – no external runtime dependencies beyond Python and standard scientific libraries.
Installation
From PyPI
pip install pyITupgrade
From Source
Clone the repository and install in editable mode:
git clone https://github.com/BrunoRNS/pyITupgrade.git
cd pyITupgrade
pip install -e .
For development, install the test dependencies:
pip install -r test-requirements.txt
Detailed build instructions are available in BUILDING_FROM_SOURCE.md.
Quick Start
Load and inspect an IT file
from pyIT import ITfile
module = ITfile()
module.open("song.it")
print(f"Song: {module.SongName.decode()}, Patterns: {len(module.Patterns)}")
Create a simple pattern with PatternBuilder
from pyIT import PatternBuilder
builder = PatternBuilder(bpm=180, lines_per_note=2)
pattern = builder.build_pattern(["C-5", "A-4", None, "G-4"], instrument_id=1)
Add a WAV sample as an instrument
from pyIT import WavInstrumentBuilder
instrument, sample = WavInstrumentBuilder.create_from_wav("piano.wav")
for note in range(120):
instrument.SampleTable[note] = [note, 1] # map all notes to this sample
module.Instruments.append(instrument)
module.Samples.append(sample)
Render to OGG
from pyIT import IT2ogg
converter = IT2ogg("song.it", "song.ogg", sample_rate=44100)
converter.convert()
For more detailed usage, see the full documentation.
Dependencies
- Python 3.10+
numpy,scipy– for waveform synthesispydub– for OGG encoding (requiresffmpeginstalled separately)flit– for building the package (development only)
Optional test dependencies: pytest, mutagen.
Building from Source
See BUILDING_FROM_SOURCE.md for instructions on building the package and creating a distributable wheel.
Testing
The test suite covers unit tests and integration tests (requires Schism Tracker, PVSNESlib, and a SNES emulator).
Run all tests with:
make test
Detailed testing instructions are in TESTING.md.
Contributing
We welcome contributions! Please read our CONTRIBUTING.md for guidelines on reporting issues, submitting pull requests, and coding standards.
Special Thanks
- Original PyIT – the initial implementation by mike burke, published as a GitHub Gist, which served as the foundation for this project.
- Schism Tracker Community – for creating and maintaining the excellent Schism Tracker, which powers the audio rendering capabilities of this library.
- PVSNESlib Developers – for the tools that enable IT modules to run on SNES hardware.
License
This project is licensed under the GNU General Public License v3.0 or later (GPL-3.0-or-later).
See the LICENSE file for details.
Links
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 pyitupgrade-1.0.2.tar.gz.
File metadata
- Download URL: pyitupgrade-1.0.2.tar.gz
- Upload date:
- Size: 40.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b9eedf8a1f8dcf7afd5f34ecb069c62b391997f53ac7985660d5d9bb2fbaecf0
|
|
| MD5 |
f0918402c8b6d3356b95c598506e4f86
|
|
| BLAKE2b-256 |
54a402c5918c676589a89b213a3979a936a23eff9e7704c1dfd2c97529abe370
|
Provenance
The following attestation bundles were made for pyitupgrade-1.0.2.tar.gz:
Publisher:
python-publish.yml on BrunoRNS/pyITupgrade
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyitupgrade-1.0.2.tar.gz -
Subject digest:
b9eedf8a1f8dcf7afd5f34ecb069c62b391997f53ac7985660d5d9bb2fbaecf0 - Sigstore transparency entry: 2188190900
- Sigstore integration time:
-
Permalink:
BrunoRNS/pyITupgrade@79ffcbd38981fa770c25c931450ce95f40ec1e9e -
Branch / Tag:
refs/tags/v1.0.2 - Owner: https://github.com/BrunoRNS
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@79ffcbd38981fa770c25c931450ce95f40ec1e9e -
Trigger Event:
release
-
Statement type:
File details
Details for the file pyitupgrade-1.0.2-py3-none-any.whl.
File metadata
- Download URL: pyitupgrade-1.0.2-py3-none-any.whl
- Upload date:
- Size: 45.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b185fc6555b80a3a474888da9a88a91d604fbcfc939ee6a86f39b480b4da2648
|
|
| MD5 |
65f42d7347bd61125f89c8fd8392259a
|
|
| BLAKE2b-256 |
24f5d96d3d0959e89ced7c95bf132c19eceaa07152330dbda72aeb31e18756ae
|
Provenance
The following attestation bundles were made for pyitupgrade-1.0.2-py3-none-any.whl:
Publisher:
python-publish.yml on BrunoRNS/pyITupgrade
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyitupgrade-1.0.2-py3-none-any.whl -
Subject digest:
b185fc6555b80a3a474888da9a88a91d604fbcfc939ee6a86f39b480b4da2648 - Sigstore transparency entry: 2188190917
- Sigstore integration time:
-
Permalink:
BrunoRNS/pyITupgrade@79ffcbd38981fa770c25c931450ce95f40ec1e9e -
Branch / Tag:
refs/tags/v1.0.2 - Owner: https://github.com/BrunoRNS
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@79ffcbd38981fa770c25c931450ce95f40ec1e9e -
Trigger Event:
release
-
Statement type: