% !TEX TS-program = LuaLaTeX+se

\documentclass[12pt, a4paper]{article}

\usepackage{fontspec}
\usepackage{fullpage}
\pagestyle{empty}

\usepackage{libertine}
\usepackage[autocompile]{gregoriotex}

\begin{document}

\grechangedim{commentaryraise}{0.5cm}{scalable}
\grechangestyle{commentary}{\fontsize{12}{12}\selectfont\begin{itshape}}%
[\end{itshape}]
\gresetheadercapture{commentary}{grecommentary}{string}

\grechangestaffsize{17}
\grechangestafflinethickness{10}
\grechangedim{spaceabovelines}{7mm}{scalable}

\newlength{\annotwidth}
\newlength{\spacewidth}
\setlength{\spacewidth}{0.2\annotwidth}
\newlength{\initwidth}
\settowidth{\initwidth}{\LARGE I}
\addtolength{\spacewidth}{-0.3\initwidth}
\grechangedim{afterinitialshift}{\spacewidth}{scalable}
\grechangedim{beforeinitialshift}{\spacewidth}{scalable}

\fontsize{12}{12}\selectfont {\gregorioscore{test}}

\end{document}
