Normalize Consolidated Clip

max doe's icon

Hello! live 12 here. i'd like to make a patch that normalizes an audio clip after its been consolidated.

in live, after consolidating a clip, it is automatically normalized, but the gain is turned down to match the level it was at before consolidating. i would like to (if possible) find the most recently selected or consolidated clip, get it's gain level, and if gain < 0, set the gain to zero.

looking at the LOM clips have get/set for gain parameters. so the getting/setting gain should be possible. the tricky part might be finding the clip though. i the path for audio clips is "live_set tracks N clip_slots M clip". how could i go about doing this? any suggestions?

thanks