Skip to content

Commit

Permalink
Release 0.1.3. Use setuptools instead of requirements.txt. Reformat c…
Browse files Browse the repository at this point in the history
…ode. Bump python version to 3.9.
  • Loading branch information
wojciech-graj committed Sep 23, 2024
1 parent 0f921f8 commit 92de27b
Show file tree
Hide file tree
Showing 6 changed files with 228 additions and 126 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
.local
.local
.ropeproject/
*.egg-info/
23 changes: 17 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,27 +22,38 @@ A MIDI-to-TIC-80 converter.

### Usage

Make sure Python (3.8+) is available on your system.
Make sure Python (3.9+) is available on your system.

Install the dependencies:
```sh
pip install -e .
```
$ pip install -r requirements.txt
OR
```sh
pip install 'mido>=1.2.0,<=1.3.2'
```

Then, simply invoke the script:
```
$ python tic_midi.py input_file -o output_file
```sh
python tic_midi.py input_file -o output_file
```

To learn about the settings you can use, invoke the script with the `-h` flag:
```
$ python tic_midi.py -h
```sh
python tic_midi.py -h
```

When playing the music with your lua code, set `sustain=true` in your `music` function call, since the converter currently doesn't re-play notes when starting a new frame.

A sample MIDI file, and the cartridge produced with it, can be found in the `example` directory.

### Development setup

Install the development dependencies:
```sh
pip install -e '.[dev]'
```

### License
```
Copyright (C) 2023 Wojciech Graj
Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["setuptools>=42", "wheel"]
build-backend = "setuptools.build_meta"
13 changes: 0 additions & 13 deletions requirements.txt

This file was deleted.

22 changes: 22 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[metadata]
name = TIC-MIDI
version = 0.1.3

[options]
python_requires = >=3.9
packages = find:
install_requires =
mido>=1.2.0,<=1.3.2

[options.extras_require]
dev =
pylsp-mypy
pylsp-rope
python-lsp-isort
python-lsp-server[all]

[pydocstyle]
ignore = D101,D102,D103,D107,D203,D212

[mypy]
allow_redefinition = True
Loading

0 comments on commit 92de27b

Please sign in to comment.