Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
benmangold committed Nov 8, 2021
0 parents commit f11e7ad
Show file tree
Hide file tree
Showing 11 changed files with 944 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
lib/**/*
lib.bak
11 changes: 11 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM python:3.8.5

RUN apt-get update; apt-get install make jq --yes; useradd python; mkdir -p /home/python/app; chown -R python /home/python;

WORKDIR /home/python/app

USER python

RUN pip install black

ENTRYPOINT [ "/bin/bash" ]
16 changes: 16 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
docker-build:
docker build -t sample-library .

docker-run-it: docker-build
docker run -it --rm -v $$PWD:/home/python/app sample-library

it: docker-run-it

main:
python src/main.py

clean:
rm -rf lib; mkdir lib; make main

fmt:
python -m black .
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# sample-library

Scripts for generating a structured sample library with Python

Requires Docker

## about

Samples are written to wave files in `lib/`.

Different collections are written in folders `lib/foo_collection/*.wav`.

Currently generates collections of basic waveforms for a list of notes `data/notes.json`.

## how-to

Run `make it` to build the Dockerized environment and open an interactive shell, then run `make main` to generate samples in `lib/`.

## requirements

Generate samples of audio

Write audio as a wav file in `$PWD/lib/foo.wav`

## resources

https://pythonaudio.blogspot.com/2014/04/4-writing-wav-file-1.html
Loading

0 comments on commit f11e7ad

Please sign in to comment.