High-quality integration for https://tomusic.ai/
Project description
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/
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sm_tomusic_ai-1767867.374.989.tar.gz.
File metadata
- Download URL: sm_tomusic_ai-1767867.374.989.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0ab5af65a219dd216d5be0f1a7db2584d4ae39931d003774fa450ffb76d24541
|
|
| MD5 |
b5eabaef40be7f00433ddca6bad3a3f2
|
|
| BLAKE2b-256 |
78610a5f13f04e83a7dba9380159d9176eb07b66365c4c8692426de088a17a1a
|
File details
Details for the file sm_tomusic_ai-1767867.374.989-py3-none-any.whl.
File metadata
- Download URL: sm_tomusic_ai-1767867.374.989-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
682704201319f5f243c7b82011713c9d5ec621e316c2916f87b1d1a6fba84a7d
|
|
| MD5 |
097b7ca3e12b9b74e038abee286fc011
|
|
| BLAKE2b-256 |
af0f35f6f3c97a64d6d41b268b6d5daf30039d86f06584546a46c9e1c187ea40
|