Heavy D [PHOTOS] The Final Recording Session

11/11/2011 4:30 AM PST

Heavy D -- The Final Recording Session [PHOTOS]

Just months before Heavy D died, the rap legend stepped into a recording studio for the last time ... to lay tracks for his new album -- and TMZ has obtained pics of the historic moment.

The photos were snapped in late July at Daddy's House Recording Studio in NYC -- showing D and his producers from CertiFYD Production Group finalizing songs for "Love Opus," which he released in September.

As we first reported, Heavy D passed away on Tuesday after collapsing outside his Beverly Hills home. He was 44.