npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

supermaker-ai-make-music

v1767667.326.381

Published

Professional integration for https://supermaker.ai/music/ai-make-music/

Readme

ai-make-music

A JavaScript library for programmatically generating and manipulating music using AI. Seamlessly integrate AI-powered music creation into your applications.

Installation

bash npm install ai-make-music

Usage Examples

Here are several examples demonstrating how to use the ai-make-music library in your JavaScript/Node.js projects:

1. Generating a Simple Melody: javascript const aiMakeMusic = require('ai-make-music');

async function generateMelody() { try { const melody = await aiMakeMusic.generateMelody({ style: 'classical', tempo: 120, length: 30, // Length in seconds });

console.log('Generated Melody:', melody);
// You can then save the melody to a file or stream it.

} catch (error) { console.error('Error generating melody:', error); } }

generateMelody();

2. Creating a Background Music Track for a Game: javascript const aiMakeMusic = require('ai-make-music');

async function createGameMusic() { try { const backgroundMusic = await aiMakeMusic.generateTrack({ genre: 'chiptune', mood: 'upbeat', duration: 60, // Duration in seconds instrumentation: ['synth', '8bit'], });

console.log('Generated Game Music:', backgroundMusic);
// Integrate the music into your game engine.

} catch (error) { console.error('Error generating game music:', error); } }

createGameMusic();

3. Adding Harmonies to an Existing Melody: javascript const aiMakeMusic = require('ai-make-music');

async function addHarmony() { const existingMelody = 'C4 D4 E4 F4 G4 A4 B4 C5'; // Example melody (replace with your actual melody)

try { const harmony = await aiMakeMusic.addHarmony({ melody: existingMelody, harmonyType: 'parallel', key: 'C Major', });

console.log('Melody with Harmony:', harmony);
// Combine the original melody with the generated harmony.

} catch (error) { console.error('Error adding harmony:', error); } }

addHarmony();

4. Generating a Drum Beat: javascript const aiMakeMusic = require('ai-make-music');

async function generateDrumBeat() { try { const drumBeat = await aiMakeMusic.generateDrumBeat({ style: 'rock', tempo: 140, complexity: 'medium' });

    console.log('Generated Drum Beat:', drumBeat);
    // Use the drum beat in your music composition.
} catch (error) {
    console.error('Error generating drum beat:', error);
}

}

generateDrumBeat();

5. Generating a short Lo-Fi beat: javascript const aiMakeMusic = require('ai-make-music');

async function generateLoFiBeat() { try { const lofiBeat = await aiMakeMusic.generateTrack({ genre: 'lofi', mood: 'chill', duration: 30, instrumentation: ['piano', 'bass', 'drums'] });

    console.log('Generated Lo-Fi Beat:', lofiBeat);
    // Use the beat in your project
} catch (error) {
    console.error('Error generating Lo-Fi beat:', error);
}

}

generateLoFiBeat();

API Summary

  • generateMelody(options): Generates a melody based on the provided options.
    • options: An object containing parameters like style, tempo, and length.
  • generateTrack(options): Generates a complete music track with specified genre, mood, duration, and instrumentation.
    • options: An object containing parameters like genre, mood, duration, and instrumentation.
  • addHarmony(options): Adds a harmony to an existing melody.
    • options: An object containing parameters like melody, harmonyType, and key.
  • generateDrumBeat(options): Generates a drum beat.
    • options: An object containing parameters like style, tempo, and complexity.

License

MIT

This package is part of the ai-make-music ecosystem. For advanced features and enterprise-grade tools, visit: https://supermaker.ai/music/ai-make-music/