Giter Site home page Giter Site logo

scott-park / lofi Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jacbz/lofi

0.0 0.0 0.0 13.86 MB

ML-supported lo-fi music generator

Home Page: http://lofi.jacobzhang.de

License: Apache License 2.0

JavaScript 0.95% Python 39.10% TypeScript 43.78% HTML 3.93% Dockerfile 0.13% SCSS 12.11%

lofi's Introduction

Build Stargazers Forks Issues Contributors Apache License


Lofi

A ML-supported lo-fi music generator.
Explore »

About

We trained a VAE model in PyTorch to represent a lo-fi track as a vector of 100 features. A lo-fi track consists of chords, melodies, and other musical parameters. The web client uses Tone.js to make a dusty lo-fi track out of these parameters.

Architecture

  • Client: The client is written in TypeScript and built with Webpack. It uses Tone.js to generate music.
  • Model: The model is implemented in PyTorch. We synthesized various datasets, including Hooktheory and Spotify.
  • Server: The server is a basic Flask instance that deploys the trained model checkpoint. The client communicates with the server using a REST API.

Setup

If you only want to tinker around with the client, you will only need the client folder. This will use the project's server as the backend.

If you want to deploy your own model, you can either train your own model (see the instructions in the model) or download the pre-trained checkpoint from here. Once you have deployed the server, change the server address inside client\src\api.ts.

Set up the client

  1. Install node.js LTS.
  2. Navigate to the client folder and run npm install to install the dependencies.
  3. Run npm run serve to develop or npm run build to build a distributable.

By default, this uses the project's server as the backend. You can also train your own model and deploy your own server.

Train your own model

See the model folder for details. Once you have trained your model, put the checkpoint in the checkpoints folder.

Deploy your own server

See the server folder for details. You can use the provided Dockerfile. Don't forget to change the API url in the client.

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Acknowledgments

Big thanks to ZOOPRA UG for hosting the server!

lofi's People

Contributors

elliotwutingfeng avatar jacbz avatar marcelkollovieh avatar pashme avatar raresportan 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.