| ot-tools-cli | cli tool for octatrack projects

see the individual “Download ot-tools-cli” links

ot-tools-cli is a command line utility with multiple commands to make changes to octatrack projects. being a cli tool it means you can script this to run against multiple projects etc.

very much an “alpha” release. there will be bugs. any bugs you find mention here. i’ll see about fixing them as and when i can. i’ve got some life stuff to go away and focus on so i’ll likely be quiet for a while.

but, i figured i’d release this in the state it’s in before i disappear.

as ever with this type software — please take backups of your projects before using in case this borks your projects (this software has not been battle tested/thoroughly QAd).


Available Commands

bank-slots-fix-dangling

Fix dangling slot references in a given bank – a “dangling” slot reference is a slot assignment within a bank that points to an empty slot, usually slots 1-8 and is “fixed” by reassigning to the highest possible free slot id

bank-slots-samples-copy-to-project

Copy a bank between one project and another via the CLI – updates active sample slot assignments and copies samples files with the bank

bank-slots-samples-chainer

Minimize slot usage for a bank by combining un-sliced sample slots referenced by the bank into sample chains, then reassigning all bank references to use the newly created sample chain slots

sample-create-slice-grid

Create a new settings file with a custom slice grid for the given audio file

sample-splitter-slices

Split an audio file based on the slice data in a given settings file

sample-splitter-linear

Split an audio file linearly, i.e. equidistant splits

sample-splitter-random

Split an audio file randomly

samples-create-chains-sequential

Create a sample chain by concatenating audio files together in a sequence. Audio files are chunked together in batches of 64

slots-deduplicate

Deduplicate sample slots in a project

slots-purge

Purge unused sample slots in a project. Does not remove underlying sample files

slots-samples-chainer

Chains together samples for slots in a project

slots-samples-check

Check the validity of slots and their sample files in a project

slots-samples-copy-to-project

Copy all slots of a specific type from one project to another

slots-samples-write-settings

Write new settings files for all slots of a specific type

slots-sort

Reorganize the project’s sample slots in the sample slots list


Example Usage

$ ot-tools-cli slots-deduplicate ./tmp/aaa/ static
[INFO ] Loading project: "./tmp/aaa/"
[DEBUG] Loaded project: "./tmp/aaa/"
[DEBUG] Validated project: "./tmp/aaa/"
[INFO ] -
[INFO ] Deduplicating project slots
[INFO ] -
[INFO ] Project: "./tmp/aaa/"
[INFO ] Slot type: Static
[INFO ] -
[DEBUG] Reading project data ...
[DEBUG] Discovering unique slots ...
[DEBUG] 32 unique Static slots found out of 32 total slots
[DEBUG] All slots are unique, nothing to deduplicate
[DEBUG] No deduplication, not making changes.
$ ot-tools-cli slots-sort ./tmp/aaa/ static back slot-id
INFO ] Loading project: "./tmp/romant/"
[DEBUG] Loaded project: "./tmp/romant/"
[DEBUG] Validated project: "./tmp/romant/"
[INFO ] -
[INFO ] Sorting project slots in-place
[INFO ] -
[INFO ] Project: "./tmp/romant/"
[INFO ] Slot type: Static
[INFO ] Sort Order: Path
[INFO ] Load Order: Ascending
[INFO ] -
[INFO ] Re-ordering STATIC sample slots in project.
[DEBUG] 73 Static slots found for sorting
[DEBUG] Cleared existing slot locations
[DEBUG] Moved Static slot: 1 -> 1
[DEBUG] Moved Static slot: 2 -> 2
...
[DEBUG] Moved Static slot: 73 -> 73
[INFO ] Applied new Static sample slots ordering for project.
[DEBUG] Updating Static slot bank references
[INFO ] Updated Static slot bank references
[DEBUG] Preparing file system changes ...
[DEBUG] Applied file system changes
[INFO ] -
[INFO ] All done! Command ran successfully.
[INFO ] -

More Details

If you want to learn more about how the operations work / write your own CLI / combine the operations together to make your own processing pipeline – this CLI is basically just a wrapper over the ot-tools-operations library crate. Read through the docs / code if you’d like to learn more.

i’m might eventually make a python library which wraps it again via pyo3 to make it easier for people to script this stuff.

been trying to make since i started on the ot-tools-io library.

known stuff that doesn’t work / things to know about

  • samples-create-chains-sequential – the slice-directions option currently does nothing (i forgot to take it out for this).
  • bank-slots-samples-copy-to-project – see this thread for a detailed set of notes about exactly how this works, and what it does / does not do Bank+Slots+Samples transfer to other project - CLI tool (demo)
  • slots-sort – for some damn reason i can’t get this to skip sorting when no effective changes will happen.
  • both bank-slots-samples-chainer and slots-samples-chainer will pick up slots that have no slices, but be aware that pretty much all slot attribute settings except for trim/loop points are ignored as you can’t store them in a slice.
4 Likes

Just a heads-up

I don’t think anyone will want to or should download a random .exe from someone in a forum.

If the CLI is just a wrapper around that crate you could also post the CLI code and let people build it themselves.

Apologies if you’ve posted that already I just couldn’t see it in your post.

4 Likes

yeah gimme a minute bro, i’m finishing up the release before i park things for a bit.

I don’t think anyone will want to or should download a random .exe from someone in a forum

most free/open source software you download from the internet comes with similar risks.

alternative (free, simple and easy) suggestions are welcome if you’ve got any.

best i can think of are gitlab releases generated within CI builds. but then you’re still downloading a “random” binary from a website.

updated with link to CI published release. you can track through the CI process / various gitlab links to audit it.

i will publish future release updates in the newly renamed ot-tools topic to minimise topic clutter.