@mcp.tool() def generate_with_human_feel(ctx: Context, genre: str, bpm: float = 0, key: str = "", humanize: bool = True, groove_style: str = "shuffle", structure: str = "standard") -> str: """ T040-T050: Genera un track con human feel aplicado. Args: genre: Genero musical bpm: BPM (0 = auto) key: Tonalidad humanize: Aplicar humanizacion de timing/velocity groove_style: Estilo de groove (straight, shuffle, triplet, latin) structure: Estructura de la cancion """ try: logger.info(f"Generando {genre} con human feel (groove={groove_style})") # Get generator generator = get_song_generator() # Select palette anchors first palette = _select_anchor_folders(genre, key, bpm) # Generate config with palette config = generator.generate_config(genre, style="", bpm=bpm, key=key, structure=structure, palette=palette) # Initialize human feel engine human_engine = HumanFeelEngine(seed=config.get('variant_seed', 42)) return json.dumps({ "status": "success", "action": "generate_with_human_feel", "config": config, "palette": palette, "humanize": humanize, "groove_style": groove_style, "timestamp": time.strftime("%Y-%m-%d %H:%M:%S") }, indent=2) except Exception as e: return json.dumps({"error": str(e)}, indent=2)