Skip to main content

sm-tomusic-ai

sm-tomusic-ai is an automated Python library designed to simplify interaction with the ToMusic.AI platform, allowing users to easily explore and showcase its powerful music generation and manipulation capabilities. This package provides a streamlined interface for common tasks, enabling developers and musicians to quickly integrate ToMusic.AI functionality into their projects.

Installation

You can install sm-tomusic-ai using pip: bash pip install sm-tomusic-ai

Basic Usage

Here are a few examples demonstrating how to use sm-tomusic-ai:

1. Generating a Simple Melody: python from sm_tomusic_ai import music_generator

Generate a melody with default settings

melody = music_generator.generate_melody() print(melody) # Output will vary based on the generation algorithm

Optionally, you can save the melody to a MIDI file. (Implementation Detail - Assumes a save_midi function exists)

music_generator.save_midi(melody, "my_melody.midi")

2. Harmonizing an Existing Melody: python from sm_tomusic_ai import music_harmonizer

Assume you have a melody (represented as a list of notes, for example)

melody = ["C4", "D4", "E4", "F4", "G4"]

Harmonize the melody

harmony = music_harmonizer.harmonize_melody(melody) print(harmony) # Output will vary based on the harmonization algorithm

Optionally, you can save the harmonized melody to a MIDI file. (Implementation Detail - Assumes a save_midi function exists)

music_harmonizer.save_midi(harmony, "harmonized_melody.midi")

3. Applying a Specific Style to a Piece of Music: python from sm_tomusic_ai import music_styler

Assume you have a piece of music (represented in a suitable format)

music_data = "Your music data here (e.g., a MIDI file path or a symbolic representation)"

Apply a "Jazz" style

styled_music = music_styler.apply_style(music_data, style="Jazz") print(styled_music) # Output will vary based on the style application algorithm

Optionally, you can save the styled music. (Implementation Detail - Assumes a save_music function exists)

music_styler.save_music(styled_music, "jazz_version.midi")

4. Generating Music Based on Text Input: python from sm_tomusic_ai import text_to_music

Generate music based on the provided text description.

music = text_to_music.generate_from_text("A peaceful melody reminiscent of a flowing river.") print(music)

Optionally, you can save the generated music. (Implementation Detail - Assumes a save_music function exists)

text_to_music.save_music(music, "river_melody.midi")

5. Analyzing the Sentimental Value of a Musical Piece: python from sm_tomusic_ai import music_analyzer

Assume you have a piece of music (represented in a suitable format)

music_data = "Your music data here (e.g., a MIDI file path or a symbolic representation)"

Analyze the sentiment of the music

sentiment = music_analyzer.analyze_sentiment(music_data) print(f"The sentiment of the music is: {sentiment}") # Output example: The sentiment of the music is: Positive

Features

  • Melody Generation: Create original melodies with customizable parameters.
  • Harmony Generation: Harmonize existing melodies to create richer musical textures.
  • Style Transfer: Apply different musical styles to existing pieces.
  • Text-to-Music Generation: Generate music based on textual descriptions.
  • Music Analysis: Analyze musical pieces to determine characteristics such as sentiment.
  • Simplified API: Easy-to-use functions for common music generation and manipulation tasks.

License

This project is licensed under the MIT License - see the LICENSE file for details.

This project is a gateway to the sm-tomusic-ai ecosystem. For advanced features and full capabilities, please visit: https://tomusic.ai/

Metadata

Release files for sm-tomusic-ai 1767867.374.989

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sm-tomusic-ai 1767867.374.989
File Size Uploaded
sm_tomusic_ai-1767867.374.989.tar.gz 3.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sm-tomusic-ai 1767867.374.989
File Interpreter ABI Platform
sm_tomusic_ai-1767867.374.989-py3-none-any.whl Python 3 none any Details

Total release size: 7.9 kB

Release files / sm_tomusic_ai-1767867.374.989.tar.gz

Download URL sm_tomusic_ai-1767867.374.989.tar.gz
Size 3.7 kB
Tags Source
SHA-256 checksum
How to use checksums
0ab5af65a219dd216d5be0f1a7db2584d4ae39931d003774fa450ffb76d24541
BLAKE2b-256 checksum
How to use checksums
78610a5f13f04e83a7dba9380159d9176eb07b66365c4c8692426de088a17a1a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release files / sm_tomusic_ai-1767867.374.989-py3-none-any.whl

Download URL sm_tomusic_ai-1767867.374.989-py3-none-any.whl
Size 4.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
682704201319f5f243c7b82011713c9d5ec621e316c2916f87b1d1a6fba84a7d
BLAKE2b-256 checksum
How to use checksums
af0f35f6f3c97a64d6d41b268b6d5daf30039d86f06584546a46c9e1c187ea40
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release history Release notifications | RSS feed

This release

1767867.374.989 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page