The major seventh chord consists of four notes taken from the major scale of the same letter name. These notes are the first (1), third (3), fifth (5) and seventh (7) notes of the major scale, so the chord formula for the major seventh chord is :
Notice that the major seventh chord is simply a major chord with the seventh note added. The Cmaj7 arpeggio with inversions is shown here.
Here is a bass line that makes use of the Cmaj7 arpeggio.