nsarrazin / lofi

stochastic lo-fi hip hop generator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Stochastic lo-fi hip-hop generator

Installation

git clone git@github.com:nsarrazin/lofi.git

Development

This starts the server on http://localhost:3000/ with debug mode and it supports auto-reload for both front and backend.

npm run install:dev
npm run start:dev

Docker

This starts the react app on http://localhost:8000/web/ using gunicorn and nginx for deployment purposes.

npm run build:docker
npm run start:docker

Goal for MVP

Back-end

  • Set up a webserver with socket.io support
  • Implement a customizable Instrument class which outputs generated MIDI chunks
  • Implement a Conductor class which holds all the meta information (keys, bpm, instruments, etc.)
  • Implement a Chords class which deals with generating and distributing the chord progression
  • Implement a Rythm class to deal with rythmic phrasing, subdivsion of the measure
  • Implement an API to communicate meta information to the client

Front-end

  • Set up a basic webapp with react and a socket.io client
  • Implement a basic Player class that can play an instrument and receive midi chunks
  • Implement a ToneJS Transport to deal with scheduling notes rythmically even if socket messages are delayed
  • Implement a Master class to deal with master volume, effects like reverb etc.
  • Add display of what's currently being played for each Player (piano roll ? display notes?)
  • Find a way to read the meta information from the API

CI/CD

  • Have a working docker container for flask
  • Have a working docker container for nginx serving react app
  • Setup a docker-compose file to handle easy deployment
  • Have a proper build process with build/deployment artefacts
  • Handle environment variables so that the front-end knows where to find the flask server

Ressources for further reading

About

stochastic lo-fi hip hop generator


Languages

Language:TypeScript 45.3%Language:Python 35.2%Language:Jupyter Notebook 11.8%Language:HTML 4.7%Language:Dockerfile 1.9%Language:CSS 1.1%