feat(Agente 1): Implement FX Creator MCP Tools (T031-T035)
- Add 5 new MCP tools to server.py: * create_riser (T031) - Pre-drop buildup effect * create_downlifter (T032) - Post-drop energy release * create_impact (T033) - Hit, crash, sub_drop, noise impacts * create_silence (T034) - Break/silence effects * create_fx_section (T035) - Complete FX sections - Add 5 handlers to __init__.py for Remote Script execution - Update skill_produccion_audio.md with FX tools documentation All tools exposed and ready for professional FX generation. Closes Agente 1 of 20 - FX Creator implementation
This commit is contained in:
Binary file not shown.
@@ -2565,6 +2565,188 @@ def automate_filter(ctx: Context, track_index: int, start_bar: float = 0.0,
|
||||
)
|
||||
|
||||
|
||||
# ==================================================================
|
||||
# FASE 2.5: FX CREATOR TOOLS (T031-T035) - Exposición de arrangement_engine
|
||||
# ==================================================================
|
||||
|
||||
@mcp.tool()
|
||||
def create_riser(ctx: Context, track_index: int, start_bar: int,
|
||||
duration: int = 8, intensity: float = 0.8,
|
||||
pitch_min: int = 36, pitch_max: int = 84) -> str:
|
||||
"""Create a riser/buildup effect (T031).
|
||||
|
||||
Generates a pre-drop riser with ascending pitch and tension.
|
||||
Perfect for build-ups before choruses or drops.
|
||||
|
||||
Args:
|
||||
track_index: Index of the target track
|
||||
start_bar: Start bar for the riser
|
||||
duration: Duration in bars (default 8)
|
||||
intensity: Intensity 0.0-1.0 (default 0.8)
|
||||
pitch_min: Minimum MIDI pitch (default 36 = C2)
|
||||
pitch_max: Maximum MIDI pitch (default 84 = C6)
|
||||
|
||||
Returns:
|
||||
JSON with riser creation status and clip info.
|
||||
"""
|
||||
return _proxy_ableton_command(
|
||||
"create_riser",
|
||||
{
|
||||
"track_index": track_index,
|
||||
"start_bar": start_bar,
|
||||
"duration": duration,
|
||||
"intensity": intensity,
|
||||
"pitch_range": [pitch_min, pitch_max],
|
||||
},
|
||||
timeout=30.0,
|
||||
defaults={
|
||||
"track_index": track_index,
|
||||
"start_bar": start_bar,
|
||||
"duration": duration,
|
||||
"intensity": intensity,
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
@mcp.tool()
|
||||
def create_downlifter(ctx: Context, track_index: int, start_bar: int,
|
||||
duration: int = 4, intensity: float = 0.7,
|
||||
pitch_start: int = 72, pitch_end: int = 36) -> str:
|
||||
"""Create a downlifter effect (T032).
|
||||
|
||||
Generates a post-drop downlifter with descending pitch.
|
||||
Perfect for energy release after drops or impacts.
|
||||
|
||||
Args:
|
||||
track_index: Index of the target track
|
||||
start_bar: Start bar for the downlifter
|
||||
duration: Duration in bars (default 4)
|
||||
intensity: Intensity 0.0-1.0 (default 0.7)
|
||||
pitch_start: Starting MIDI pitch (default 72 = C5)
|
||||
pitch_end: Ending MIDI pitch (default 36 = C2)
|
||||
|
||||
Returns:
|
||||
JSON with downlifter creation status and clip info.
|
||||
"""
|
||||
return _proxy_ableton_command(
|
||||
"create_downlifter",
|
||||
{
|
||||
"track_index": track_index,
|
||||
"start_bar": start_bar,
|
||||
"duration": duration,
|
||||
"intensity": intensity,
|
||||
"pitch_range": [pitch_start, pitch_end],
|
||||
},
|
||||
timeout=30.0,
|
||||
defaults={
|
||||
"track_index": track_index,
|
||||
"start_bar": start_bar,
|
||||
"duration": duration,
|
||||
"intensity": intensity,
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
@mcp.tool()
|
||||
def create_impact(ctx: Context, track_index: int, position: float,
|
||||
intensity: float = 1.0, impact_type: str = "hit") -> str:
|
||||
"""Create an impact FX (T033).
|
||||
|
||||
Generates impact effects (hit, crash, sub drop, noise).
|
||||
Perfect for emphasizing drops, transitions, or beats.
|
||||
|
||||
Args:
|
||||
track_index: Index of the target track
|
||||
position: Position in bars (int) or beats (float)
|
||||
intensity: Intensity 0.0-1.0 (default 1.0)
|
||||
impact_type: Type of impact - "hit", "crash", "sub_drop", "noise"
|
||||
|
||||
Returns:
|
||||
JSON with impact creation status and clip info.
|
||||
"""
|
||||
return _proxy_ableton_command(
|
||||
"create_impact",
|
||||
{
|
||||
"track_index": track_index,
|
||||
"position": position,
|
||||
"intensity": intensity,
|
||||
"impact_type": impact_type,
|
||||
},
|
||||
timeout=30.0,
|
||||
defaults={
|
||||
"track_index": track_index,
|
||||
"position": position,
|
||||
"intensity": intensity,
|
||||
"impact_type": impact_type,
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
@mcp.tool()
|
||||
def create_silence(ctx: Context, track_index: int, start_bar: int,
|
||||
duration: int = 1) -> str:
|
||||
"""Create silence/break effect (T034).
|
||||
|
||||
Generates a moment of silence for dramatic effect.
|
||||
Perfect for creating tension before drops.
|
||||
|
||||
Args:
|
||||
track_index: Index of the target track (for context)
|
||||
start_bar: Start bar for the silence
|
||||
duration: Duration in bars (default 1)
|
||||
|
||||
Returns:
|
||||
JSON with silence creation status.
|
||||
"""
|
||||
return _proxy_ableton_command(
|
||||
"create_silence",
|
||||
{
|
||||
"track_index": track_index,
|
||||
"start_bar": start_bar,
|
||||
"duration": duration,
|
||||
},
|
||||
timeout=30.0,
|
||||
defaults={
|
||||
"track_index": track_index,
|
||||
"start_bar": start_bar,
|
||||
"duration": duration,
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
@mcp.tool()
|
||||
def create_fx_section(ctx: Context, section_type: str, start_bar: int,
|
||||
duration: int = 8, track_indices: list = None) -> str:
|
||||
"""Create complete FX section (T035).
|
||||
|
||||
Generates a complete FX section with risers, impacts, and transitions.
|
||||
|
||||
Args:
|
||||
section_type: Type - "pre_drop", "post_drop", "transition", "build"
|
||||
start_bar: Start bar for the section
|
||||
duration: Duration in bars (default 8)
|
||||
track_indices: List of track indices to apply FX (optional)
|
||||
|
||||
Returns:
|
||||
JSON with FX section creation status.
|
||||
"""
|
||||
return _proxy_ableton_command(
|
||||
"create_fx_section",
|
||||
{
|
||||
"section_type": section_type,
|
||||
"start_bar": start_bar,
|
||||
"duration": duration,
|
||||
"track_indices": track_indices or [],
|
||||
},
|
||||
timeout=30.0,
|
||||
defaults={
|
||||
"section_type": section_type,
|
||||
"start_bar": start_bar,
|
||||
"duration": duration,
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
# ==================================================================
|
||||
# FASE 3: INTELIGENCIA MUSICAL (T041-T060)
|
||||
# ==================================================================
|
||||
|
||||
Reference in New Issue
Block a user