Giter VIP home page Giter VIP logo

octatrack-banks's Introduction

๐Ÿ—ƒ Octatrack Bank Manager

โš™๏ธ Setup | ๐Ÿ’ป Usage | ๐Ÿ“‚ Example | ๐Ÿฅฝ Development | ๐Ÿ“ Architecture

  • Copies and renames Octatrack banks from a specified project folder to a new project folder
  • This independently developed software has no affiliation with Elektron Music Machines

โš ๏ธ Disclaimer: Use this tool only on copies of your project folders. Do not use this directly with your Octatrack. Always keep backups!

โš™๏ธ Setup

Requirements: Octatrack projects and Java.

  1. Copy some Octatrack project folder(s) to your computer.
  2. Install Java if you don't have it.
  3. Download Octatrack Bank Manager here!

๐Ÿ’ป Usage

Run this tool with two inputs (see example below):

  1. The name or path of the source project folder you want to copy banks from specified with the command-line argument --source or -s. This folder should contain 16 bank files.

  2. A config file which contains pairs of source and target banks. Each source bank file in the source project folder will be copied and renamed to its target bank number in the new, target project folder. See the configuration section below.

Configuration

  • By default, the config file is expected to be named <your-project-folder-path>.config. You can provide your own config file path using the command-line argument --config or -c.

  • Each target and assigned source bank are specified using this syntax: <target-bank-number>=<source-bank-number>. To assign an empty bank, use 0.

    • For example, 1=4 means bank 1 in the new, target project will be copied from bank 4 from the old, source project. 1=0 means bank 1 will be empty.
  • Optional: Banks can also be specified with --banks or -b instead of using a config file.

Command-line Options

Usage: java -jar ot-banks.jar -s <my-project-folder-name> [options]

Inputs:
  -s, --source <arg>              Required: Source project folder path
  -t, --target <arg>  <computed>  Optional: Target project folder path
  -c, --config <arg>              Optional: Config file path
  -b, --banks <args>              Optional: Bank pairs
  -h, --help

๐Ÿ“‚ Example

If your project folder path is "/projects/my-project", then create a config file at "/projects/my-project.config".

To assign bank 4 to bank 1 in the new project, write 1=4 in the config file. This will copy the source bank 4 from the "my_project" folder to target bank 1 in "my_project_new" folder. The name of the new, target project folder can also be specified with --target.

Example config file: "my_project.config"

1=4
2=5
3=6
4=0
5=0
6=0

Example command-line usage

java -jar otbanks.jar -s "projects/my_project"

==>  O C T A T R A C K
==>  Using project folder: "projects/my_project"
==>  Copying "projects/my_project" to "projects/my_project_new"
==>  "1=4" ===> Copied bank04 to bank01
==>  "2=5" ===> Copied bank05 to bank02
==>  "3=6" ===> Copied bank06 to bank03
==>  "4=0" ===> Empty bank set as bank04
==>  "5=0" ===> Empty bank set as bank05
==>  "6=0" ===> Empty bank set as bank06
==>  Other project files copied
==>  (!!!) 9 missing banks: [7 8 9 10 11 13 14 15 16]

๐Ÿฅฝ Development

Requirements: Clojure and optionally Babashka for fast startup using GraalVM.

I use this tool often with my Octatrack. But the code in this project also serves to demonstrate a few features and quirks of Clojure, such as spec and transducers.

Dev command-line usage

# Build (functions defined in build.clj)
clj -T:build clean
clj -T:build uber

# Test
clj -M:test

# Run
clj -M -m octatrack.application.console -s my_project
clj -M:dev my_project -s my_project

# Optional: override config file and use `--banks` instead
clj -M:dev -s my_project --banks 1=4 2=5 3=6 4=0 5=0 6=0

# Optional: run with Babashka
bb -m octatrack.application.console -s my_project

# Optional: List everything inside the built uberjar
jar -tvf ./target/uberjar/otbanks.jar

๐Ÿ“ Architecture

  • Domain layer
    • Contains logic related to Octatrack Banks
    • Cross-platform implementation using .cljc (JVM & JavaScript)
  • Infrastructure layer
    • Persists data changes as file & folder changes
  • Application layer
    • Provides a way to interact with the domain models and corresponding files
    • Data is validated with domain specifications, defined with clojure spec's s/def
  • Testing
    • The implementation of some functions is verified using s/fdef. These specifications are verified only during testing & development with stest/instrument.
    • Continuous testing is automated via Github Actions
flowchart

subgraph Testing
	Tests[Unit Tests]
	%%SpecTests[Spec Tests]
end
Tests --> Console
%%SpecTests --> Validation

subgraph Application
	%%AppSpec[Application Spec]
	API
	Validation
	Console
end

%%AppSpec --> Banks
%%AppSpec --> Validation
API --> Validation
API --> ProjectFolders
API --> BankFiles
API --> Logger
Validation --> Banks
Validation --> ProjectFolders
Console --> API
Console --> Logger


subgraph DomainModel[Domain Model]
	Banks[Banks]
end

subgraph Infrastructure
	BankFiles[Bank Files]
	ProjectFolders[Project Folders]
	Utils
	Logger
end

BankFiles --> Banks
BankFiles --> Logger
BankFiles --> Utils
ProjectFolders --> Utils


Loading

octatrack-banks's People

Contributors

tmprd avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.