Skip to content

A versatile music generation and playback tool that lets you create, compose, and play dynamic and loopable music beats in various genres. Generate beats using AI, customize them, and save or play them in real-time. Perfect for musicians, composers, and music enthusiasts.

Notifications You must be signed in to change notification settings

storbeck/MusicMaker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Music Maker Application

The Music Maker Application is a Node.js and WebSocket-based application that generates and plays modern hip-hop beats. It utilizes OpenAI's GPT-3.5 model for music generation and Tone.js for real-time music playback.

Getting Started

Follow these steps to set up and run the Music Maker Application:

Prerequisites

  • Node.js installed on your machine.

Installation

  1. Clone the repository to your local machine:

    git clone https://github.com/storbeck/MusicMaker.git
  2. Navigate to the project directory:

    cd <project_directory>
  3. Install server dependencies:

    cd server
    npm install
  4. Install client dependencies:

    cd client
    npm install

Configuration

  1. Set your OpenAI API key by creating a .env file in the server directory:

    OPENAI_API_KEY=your_api_key_here
    

Running the Application

You can run the server and client separately or together.

Running the Server

To start the server for generating and playing music, run the following commands from the server directory:

  • Generate music and save to a file:

    npm run generate-music --save songs/sample5.json
  • Generate music and output to stdout:

    npm run generate-music 
  • Play a music file:

    npm run play-music example_song2.json

Running the Client

To start the client for real-time music playback, run the following commands from the client directory:

  • Start the local development server

    npm run dev

Running Both Server and Client Concurrently

To run both the server and client concurrently, use the following command from the project directory:

npm run start:both

This will start both the server and client, allowing you to generate and play music in real-time.

Functionality

  • The server uses OpenAI's GPT-3.5 model to generate hip-hop beats in JSON format.
  • The client connects to the WebSocket server and plays the received music using Tone.js synthesizers.
  • You can customize the instruments and music generation by modifying the server code.

Notes

  • The Music Maker Application requires a WebSocket connection between the server and client.
  • Music generation is based on OpenAI's GPT-3.5 model and may vary in musicality.
  • The client-side script uses Tone.js to synthesize and play music in real-time.

About

A versatile music generation and playback tool that lets you create, compose, and play dynamic and loopable music beats in various genres. Generate beats using AI, customize them, and save or play them in real-time. Perfect for musicians, composers, and music enthusiasts.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published