-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 8ab60af
Showing
8 changed files
with
558 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
__pycache__/ | ||
/.mypy_cache/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
MIT License | ||
|
||
Copyright (c) 2024-present Kevin Montag <[email protected]> | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# alpacka | ||
|
||
-[![PyPI - Version](https://img.shields.io/pypi/v/alpacka.svg)](https://pypi.org/project/alpacka) | ||
|
||
--- | ||
|
||
`alpacka` allows you to generate custom Ableton Live packs. It | ||
supports adding audio previews and Live 12 tags to the pack content. | ||
|
||
Currently, only directory-based packs can be created - **generating | ||
`.alp` files is not supported.** | ||
|
||
Packs can be added to Live by dragging them into the Places pane. | ||
|
||
_This is alpha software. It works for my use cases but hasn't been | ||
extensively tested, and is missing plenty of functionality. APIS are | ||
subject to change significantly. Please submit issues and/or PRs if | ||
you run into trouble._ | ||
|
||
## Installation | ||
|
||
```console | ||
pip install alpacka | ||
``` | ||
|
||
## Usage | ||
|
||
```python | ||
from alpacka import DirectoryPackWriter | ||
from time import time | ||
|
||
with DirectoryPackWriter( | ||
"/path/to/output_dir", | ||
name="My Pack", | ||
unique_id="my.unique.id", | ||
# Tell Live to re-index the pack when it gets regenerated. | ||
revision=int(time()), | ||
) as p: | ||
p.set_file("Preset.adg", "/path/to/Preset.adg") | ||
p.set_preview("Preset.adg", "/path/to/Preset.adg.ogg") | ||
p.set_tags("Preset", [ | ||
("Sounds", "Lead"), | ||
("Custom", "Tag", "Subtag") | ||
]) | ||
|
||
``` | ||
|
||
An async variant is also available: | ||
|
||
```python | ||
import asyncio | ||
from alpacka import DirectoryPackWriterAsync | ||
from time import time | ||
|
||
async def run(): | ||
async with DirectoryPackWriterAsync( | ||
"/path/to/output_dir", | ||
name="My Pack", | ||
unique_id="my.unique.id", | ||
revision=int(time()), | ||
) as p: | ||
await p.set_file("Preset.adg", "/path/to/Preset.adg") | ||
# ... | ||
asyncio.run(run()) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
[build-system] | ||
requires = ["hatchling"] | ||
build-backend = "hatchling.build" | ||
|
||
[project] | ||
name = "alpacka" | ||
dynamic = ["version"] | ||
description = 'Generate custom Ableton Live packs' | ||
readme = "README.md" | ||
requires-python = ">=3.8" | ||
license = "MIT" | ||
keywords = [] | ||
authors = [ | ||
{ name = "Kevin Montag", email = "[email protected]" }, | ||
] | ||
classifiers = [ | ||
"Development Status :: 4 - Beta", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
"Programming Language :: Python :: Implementation :: CPython", | ||
"Programming Language :: Python :: Implementation :: PyPy", | ||
] | ||
dependencies = [] | ||
|
||
[project.urls] | ||
Documentation = "https://github.com/kmontag/alpacka#readme" | ||
Issues = "https://github.com/kmontag/alpacka/issues" | ||
Source = "https://github.com/kmontag/alpacka" | ||
|
||
[tool.hatch.version] | ||
path = "src/alpacka/__about__.py" | ||
|
||
# [tool.hatch.envs.hatch-test] | ||
# extra-dependencies = [ | ||
# "pytest-asyncio~=0.23.7", | ||
# ] | ||
|
||
[tool.hatch.envs.types] | ||
extra-dependencies = [ | ||
"mypy>=1.0.0", | ||
] | ||
[tool.hatch.envs.types.scripts] | ||
check = "mypy --install-types --non-interactive {args:src/alpacka tests}" | ||
|
||
[tool.coverage.run] | ||
source_pkgs = ["alpacka", "tests"] | ||
branch = true | ||
parallel = true | ||
omit = [ | ||
"src/alpacka/__about__.py", | ||
] | ||
|
||
[tool.coverage.paths] | ||
alpacka = ["src/alpacka", "*/alpacka/src/alpacka"] | ||
tests = ["tests", "*/alpacka/tests"] | ||
|
||
[tool.coverage.report] | ||
exclude_lines = [ | ||
"no cov", | ||
"if __name__ == .__main__.:", | ||
"if TYPE_CHECKING:", | ||
] | ||
|
||
[tool.mypy] | ||
disallow_untyped_defs = true | ||
|
||
[tool.ruff.lint] | ||
# - ARG: unused arguments | ||
# - B: flake8-bugbear | ||
# - E: pycodestyle errors | ||
# - I: import sorting | ||
# - W: pycodestyle warnings | ||
extend-select = ["ARG", "B", "E", "I", "W"] | ||
# Turn off strict max line length; B950 allows for exceeding the max | ||
# line length in some cases. | ||
extend-ignore = ["E501"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
__version__ = "0.0.1.dev0" |
Oops, something went wrong.