Hey, I'm working on automation recording, but I need some help figuring out LMMS's internals.

I see that when you click add new automation track in the song editor, it runs this code in song.cpp:

(void) track::create( track::AutomationTrack, this );

This adds a new automation track to the song.

But what happens when you click inside the new automation track? In the program it adds a TCO or something, which you can then drag+drop an automatableModel into. Where is the code that adds this TCO? I can't find it for the life of me.