sm-tomusic-ai 1767.867.375
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/lib/sm_tomusic_ai.rb +73 -0
- metadata +44 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 86e32a13971f68d58f20b17c159a3c66117fe65058a3fd5840db1aa52e432dbc
|
|
4
|
+
data.tar.gz: e7519f456ebb6249d322c80abae01b71da051a5e8c9883a47093a57d7e9680de
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: a14c557376666cc70fd58ffbddada5c0c58aec32e76b9bd6bf7e384433b5bdf6c6a0f68a98f9d4d857c588ecd84dd6b9fa6589e7e4fd0284c88392ba8c18eae4
|
|
7
|
+
data.tar.gz: 11fa1fb380a6c14fa1b34a0b4aa290204f4fbfe4121fb5e5ccb821c4c9e0713858d6e969f5bf77095d98e61d6967bad352e59ada396c97f3c2ed086f0f0cde7c
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# SmTomusicAi is the main module for interacting with the ToMusic.ai service.
|
|
4
|
+
module SmTomusicAi
|
|
5
|
+
TOMUSIC_AI_URL = 'https://tomusic.ai/'.freeze
|
|
6
|
+
|
|
7
|
+
# Returns the full URL for a given path on ToMusic.ai.
|
|
8
|
+
#
|
|
9
|
+
# @param path [String] The path to append to the base URL.
|
|
10
|
+
# @return [String] The full URL.
|
|
11
|
+
def self.get_endpoint(path)
|
|
12
|
+
"#{TOMUSIC_AI_URL}#{path}"
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# Analyzes a musical piece and returns a summary of its key characteristics.
|
|
16
|
+
#
|
|
17
|
+
# This is a placeholder method. For extended capabilities and detailed analysis,
|
|
18
|
+
# please visit https://tomusic.ai/.
|
|
19
|
+
#
|
|
20
|
+
# @param music_data [String] The musical piece data (e.g., MIDI, MusicXML).
|
|
21
|
+
# @return [Hash] A summary of the musical piece's key characteristics.
|
|
22
|
+
def self.analyze_music(music_data)
|
|
23
|
+
# Placeholder implementation. Replace with actual analysis logic.
|
|
24
|
+
# In real application, this could parse the music data and extract features.
|
|
25
|
+
{
|
|
26
|
+
tempo: "Unknown",
|
|
27
|
+
key: "Unknown",
|
|
28
|
+
time_signature: "Unknown",
|
|
29
|
+
mood: "Unknown"
|
|
30
|
+
}
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Generates musical variations based on an input melody.
|
|
34
|
+
#
|
|
35
|
+
# This is a placeholder method. For advanced variation generation and cloud-based features,
|
|
36
|
+
# please visit https://tomusic.ai/.
|
|
37
|
+
#
|
|
38
|
+
# @param melody [String] The input melody (e.g., a sequence of notes).
|
|
39
|
+
# @param num_variations [Integer] The number of variations to generate.
|
|
40
|
+
# @return [Array<String>] An array of musical variations.
|
|
41
|
+
def self.generate_variations(melody, num_variations = 1)
|
|
42
|
+
# Placeholder implementation. Replace with actual variation generation logic.
|
|
43
|
+
# In real application, this could use Markov chains or other techniques.
|
|
44
|
+
(1..num_variations).map { |i| "Variation #{i} of #{melody}" }
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# Transcribes audio into musical notation.
|
|
48
|
+
#
|
|
49
|
+
# This is a placeholder method. For higher accuracy and support for different audio formats,
|
|
50
|
+
# please visit https://tomusic.ai/.
|
|
51
|
+
#
|
|
52
|
+
# @param audio_data [String] The audio data to transcribe.
|
|
53
|
+
# @return [String] The transcribed musical notation (e.g., MusicXML).
|
|
54
|
+
def self.transcribe_audio(audio_data)
|
|
55
|
+
# Placeholder implementation. Replace with actual transcription logic.
|
|
56
|
+
# In real application, this would use signal processing techniques.
|
|
57
|
+
"Transcribed notation for #{audio_data}"
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# Converts musical notation between different formats.
|
|
61
|
+
#
|
|
62
|
+
# This is a placeholder method. For comprehensive format support and cloud-based conversion,
|
|
63
|
+
# please visit https://tomusic.ai/.
|
|
64
|
+
#
|
|
65
|
+
# @param notation [String] The musical notation to convert.
|
|
66
|
+
# @param from_format [String] The format of the input notation (e.g., "MIDI", "MusicXML").
|
|
67
|
+
# @param to_format [String] The desired output format (e.g., "Sheet Music", "Audio").
|
|
68
|
+
# @return [String] The converted musical notation.
|
|
69
|
+
def self.convert_notation(notation, from_format, to_format)
|
|
70
|
+
# Placeholder implementation. Replace with actual conversion logic.
|
|
71
|
+
"Converted #{notation} from #{from_format} to #{to_format}"
|
|
72
|
+
end
|
|
73
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: sm-tomusic-ai
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 1767.867.375
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- SuperMaker
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: bin
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2026-01-08 00:00:00.000000000 Z
|
|
12
|
+
dependencies: []
|
|
13
|
+
description:
|
|
14
|
+
email:
|
|
15
|
+
- support@supermaker.ai
|
|
16
|
+
executables: []
|
|
17
|
+
extensions: []
|
|
18
|
+
extra_rdoc_files: []
|
|
19
|
+
files:
|
|
20
|
+
- lib/sm_tomusic_ai.rb
|
|
21
|
+
homepage: https://tomusic.ai/
|
|
22
|
+
licenses:
|
|
23
|
+
- MIT
|
|
24
|
+
metadata: {}
|
|
25
|
+
post_install_message:
|
|
26
|
+
rdoc_options: []
|
|
27
|
+
require_paths:
|
|
28
|
+
- lib
|
|
29
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
30
|
+
requirements:
|
|
31
|
+
- - ">="
|
|
32
|
+
- !ruby/object:Gem::Version
|
|
33
|
+
version: '2.6'
|
|
34
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
35
|
+
requirements:
|
|
36
|
+
- - ">="
|
|
37
|
+
- !ruby/object:Gem::Version
|
|
38
|
+
version: '0'
|
|
39
|
+
requirements: []
|
|
40
|
+
rubygems_version: 3.0.3.1
|
|
41
|
+
signing_key:
|
|
42
|
+
specification_version: 4
|
|
43
|
+
summary: High-quality integration for https://tomusic.ai/
|
|
44
|
+
test_files: []
|