Skip to main content

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 .it files 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/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, scipy-stubs – for waveform synthesis
  • pydub, audioop-lts (only python 3.13+) – for OGG encoding (requires ffmpeg installed separately)

Optional test dependencies: pytest, pytest-mock, 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.

Metadata

Release files for pyITupgrade 1.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyITupgrade 1.0.4
File Size Uploaded
pyitupgrade-1.0.4.tar.gz 67.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyITupgrade 1.0.4
File Interpreter ABI Platform
pyitupgrade-1.0.4-py3-none-any.whl Python 3 none any Details

Total release size: 139.3 kB

Release files / pyitupgrade-1.0.4.tar.gz

Download URL pyitupgrade-1.0.4.tar.gz
Size 67.9 kB
Tags Source
SHA-256 checksum
How to use checksums
8acd94229a2fbc2fbd4be5922c3a11351559a70dcad9f9ba91192ab2f2c520c7
BLAKE2b-256 checksum
How to use checksums
3529dc99577ebc7655ab001d9da217009bd5f56dff667513f440c0e7ddd08615
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 27, 2026.

Transparency log

Release files / pyitupgrade-1.0.4-py3-none-any.whl

Download URL pyitupgrade-1.0.4-py3-none-any.whl
Size 71.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
880cc1c09650318dcfea6e5eb6280e14b70100423af01b43f9ab19ab5d4cacf5
BLAKE2b-256 checksum
How to use checksums
427b8db7cab42737ada808064afc1018910f3d68e159a7f0447e21cee0f04af5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 27, 2026.

Transparency log

Release history Release notifications | RSS feed

1.0.5

2 release files

This release

1.0.4 This release

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page