Create Deep House Tracks Effortlessly with the illscience/deephouse-maker Cognitive Actions

24 Apr 2025
Create Deep House Tracks Effortlessly with the illscience/deephouse-maker Cognitive Actions

In the realm of music generation, the illscience/deephouse-maker offers a powerful API that allows developers to create deep house music tailored to specific prompts. With a variety of customizable parameters, this suite of Cognitive Actions enhances creativity, enabling users to generate unique soundscapes and melodies. Whether you're looking to extend existing tracks or generate entirely new tunes, these pre-built actions simplify the process and save time.

Prerequisites

Before diving into the integration of the Cognitive Actions, ensure you have the following:

  • An API key for the Cognitive Actions platform.
  • Basic knowledge of JSON and making HTTP requests.
  • Familiarity with Python (or your preferred programming language) for executing API calls.

Authentication typically involves passing your API key in the request headers.

Cognitive Actions Overview

Generate Deep House Music

The Generate Deep House Music action provides developers with the ability to create deep house tracks based on user-defined text prompts. It allows customization of various music characteristics such as genre, style, and duration. This action can continue from existing audio or mimic melodies based on input.

Input

The input schema for this action is as follows:

{
  "seed": 12345,
  "topK": 250,
  "topP": 0,
  "prompt": "deep house chicago soul 125bpm dj mark farina dj heather jackin house groovy bassline+ smooth synth pads+ 4/4 kick drum pattern+ atmospheric effects+ 120-130 BPM+ 8-bar chord progression+ percussive hi-hats+ muted stabs+ vocal chops+ filtered sweeps+ late-night vibe",
  "duration": 16,
  "inputAudio": "http://example.com/audio/input.mp3",
  "temperature": 1,
  "continuation": false,
  "modelWeights": "",
  "inputInfluence": 12,
  "continuationEnd": -1,
  "audioOutputFormat": "wav",
  "continuationStart": 0,
  "useMultiBandDiffusion": true,
  "audioNormalizationStrategy": "loudness"
}
  • Required Fields:
    • prompt: Describes the desired characteristics or style of the music.
    • duration: Specifies how long the generated audio should be.
    • audioOutputFormat: Defines the output format of the generated audio.
  • Optional Fields:
    • seed: Specifies the random number generator seed.
    • inputAudio: URI of an audio file to influence the generated music.
    • continuation: Indicates whether to continue from existing audio.
    • Other parameters for further customization.

Example Input

Here is an example of a JSON payload that could be used to invoke this action:

{
  "topK": 250,
  "topP": 0,
  "prompt": "deep house chicago soul 125bpm dj mark farina dj heather jackin house groovy bassline+ smooth synth pads+ 4/4 kick drum pattern+ atmospheric effects+ 120-130 BPM+ 8-bar chord progression+ percussive hi-hats+ muted stabs+ vocal chops+ filtered sweeps+ late-night vibe",
  "duration": 16,
  "temperature": 1,
  "continuation": false,
  "inputInfluence": 12,
  "audioOutputFormat": "wav",
  "continuationStart": 0,
  "useMultiBandDiffusion": true,
  "audioNormalizationStrategy": "loudness"
}

Output

Upon successful execution, the action typically returns a URL to the generated music file. For example:

https://assets.cognitiveactions.com/invocations/dbd4cad9-7e84-4865-bf8d-5a90c4676c00/eb995d46-783c-4d45-b26d-c3966326e745.wav

Conceptual Usage Example (Python)

Below is a conceptual Python code snippet illustrating how to call the Generate Deep House Music action:

import requests
import json

# Replace with your Cognitive Actions API key and endpoint
COGNITIVE_ACTIONS_API_KEY = "YOUR_COGNITIVE_ACTIONS_API_KEY"
COGNITIVE_ACTIONS_EXECUTE_URL = "https://api.cognitiveactions.com/actions/execute" # Hypothetical endpoint

action_id = "1c0927db-91aa-40df-b600-0470bdfe3f23" # Action ID for Generate Deep House Music

# Construct the input payload based on the action's requirements
payload = {
    "topK": 250,
    "topP": 0,
    "prompt": "deep house chicago soul 125bpm dj mark farina dj heather jackin house groovy bassline+ smooth synth pads+ 4/4 kick drum pattern+ atmospheric effects+ 120-130 BPM+ 8-bar chord progression+ percussive hi-hats+ muted stabs+ vocal chops+ filtered sweeps+ late-night vibe",
    "duration": 16,
    "temperature": 1,
    "continuation": false,
    "inputInfluence": 12,
    "audioOutputFormat": "wav",
    "continuationStart": 0,
    "useMultiBandDiffusion": true,
    "audioNormalizationStrategy": "loudness"
}

headers = {
    "Authorization": f"Bearer {COGNITIVE_ACTIONS_API_KEY}",
    "Content-Type": "application/json"
}

try:
    response = requests.post(
        COGNITIVE_ACTIONS_EXECUTE_URL,
        headers=headers,
        json={"action_id": action_id, "inputs": payload} # Hypothetical structure
    )
    response.raise_for_status() # Raise an exception for bad status codes (4xx or 5xx)

    result = response.json()
    print("Action executed successfully:")
    print(json.dumps(result, indent=2))

except requests.exceptions.RequestException as e:
    print(f"Error executing action {action_id}: {e}")
    if e.response is not None:
        print(f"Response status: {e.response.status_code}")
        try:
            print(f"Response body: {e.response.json()}")
        except json.JSONDecodeError:
            print(f"Response body: {e.response.text}")

In this code snippet, the action ID and input payload are structured to match the requirements of the Generate Deep House Music action. The endpoint URL and exact request structure are for illustration purposes.

Conclusion

The illscience/deephouse-maker Cognitive Actions empower developers to seamlessly generate deep house music tailored to their specifications. With robust customization options and straightforward integration, these actions not only enhance creativity but also streamline the music production process. Consider exploring different prompts and parameters to discover the full potential of this remarkable tool!