Skip to content

This repository hosts an in-progress Python application that harnesses the power of OpenAI's ChatGPT to generate music and soundscapes. The application operates by processing user-provided descriptions and guiding ChatGPT to produce suitable parameter values, which are subsequently used to manipulate a Max MSP synth patch. Note that this is a WIP.

Notifications You must be signed in to change notification settings

MarlonKr/Text2Soundscape

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Text2Soundscape

Composer and Sound Designer Assistant

This repository houses an ongoing project - a Composer and Sound Designer Assistant, empowered by OpenAI's ChatGPT. This interactive tool is engineered to aid users in the creation or alteration of music and soundscapes, taking cues from user-provided prompts. The core of this application lies in its interaction with OpenAI's GPT model, which interprets user requirements and generates appropriate parameter values. These parameters are then utilized to control a Max MSP synth patch, crafting unique melodies or sound designs

Table of Contents

  1. Prerequisites
  2. Installation
  3. How It Works
  4. Usage
  5. Examples
  6. License

Prerequisites

  • Python 3.x
  • OpenAI API key with access to the GPT-3.5-turbo endpoint

Installation

  1. Clone the repository:
git clone https://github.com/username/composer-and-sound-designer-assistant.git
  1. Install the required Python packages:
pip install -r requirements.txt
  1. Add your OpenAI API key to the script by replacing <YOUR_API_KEY>:
openai.api_key = "<YOUR_API_KEY>"
  1. Run the script:
python main.py

How It Works

The Composer and Sound Designer Assistant consists of three main components:

  1. Component 1: Determine if the user's prompt should create a new sound, or provide further instructions for an existing sound.
  2. Component 2: Enhance the user's prompt with additional sound-describing adjectives.
  3. Component 3: Identify the best parameters and values to match the user's descriptions (for both melodies and sound design).

The application takes input from the user, processes the prompt, and then interacts with the GPT-3.5-turbo model to provide the desired output.

Usage

  1. Run the script:
python main.py
  1. Input your sound or melody description when prompted:
Describe the music or soundscape you want to hear:
  1. The system will analyze the input, interact with the GPT-3.5-turbo, and provide the relevant output, including:

    • Decision Add Edit
    • Prompt Enhancer Main
    • Prompt Enhancer Melody (if "add" decision selected)
    • Melody output
    • Prompt Enhancer Sound Design (if "add" decision selected)
    • synth patch parameter values output

Examples

Example input:

Describe the music or soundscape you want to hear:

Intense, dark battle music

Example output:

Decision Add Edit: add

Prompt Enhancer Main: Intense, dark battle music with heavy percussive elements, aggressive brass stabs, and dissonant, suspenseful string ostinatos that create tension and chaos.

Prompt Enhancer Melody: The intense, dark battle melody would likely utilize a combination of rapid, low-register ostinatos and soaring, aggressive melodic lines in the higher registers. The use of brass, orchestral strings, and powerful percussion would create a dramatic, chaotic musical backdrop for the imaginary battle.

Melody: [(52, 60, 250), (54, 60, 250), (56, 60, 250), (58, 100, 500), (56, 60, 250), (54, 60, 250), (52, 60, 250), (50, 60, 250), (49, 80, 750)]

Prompt Enhancer Sound Design: Intense, dark battle music with heavy percussive elements, aggressive brass stabs, and dissonant, suspenseful string ostinatos coupled with a booming, distorted bass that creates a chaotic, tension-filled soundscape.

ADSR envelope parameter values:

  "Attack": 10,
  "Decay": 200,
  "Sustain": 0.5,
  "Release": 500

License

This project is licensed under the MIT License.

About

This repository hosts an in-progress Python application that harnesses the power of OpenAI's ChatGPT to generate music and soundscapes. The application operates by processing user-provided descriptions and guiding ChatGPT to produce suitable parameter values, which are subsequently used to manipulate a Max MSP synth patch. Note that this is a WIP.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages