Would it be enough if the aspect ratio is automatically determined if or if not you are compiling your notes?
I replaced the deprecated option notes=only
with \setbeameroption{show only notes}
\documentclass{beamer}
% Comment and uncomment here to switch between notes and frames
%\setbeameroption{show only notes}
\makeatletter
\ifbeamer@notesnormals%
\beamer@paperwidth 16.00cm%
\beamer@paperheight 9.00cm%
\geometry{papersize={\beamer@paperwidth,\beamer@paperheight}}
\fi%
\makeatother
\begin{document}
\begin{frame}{Testtitle}
This is a test slide.
\end{frame}
\note[itemize]{\item A note}
\end{document}
To deal with the aspect ration, one maybe could take advantage of the fact that you are compiling your slides and the notes separately. My idea is to first compile the slides, let's call the resulting pdf slides.pdf
. Now assuming that every slide has a corresponding notes page, one can replace the preview by a page from the previously compiled slides.
\documentclass{beamer}
% Comment and uncomment here to switch between notes and frames
\setbeameroption{show only notes}
\makeatletter
\ifbeamer@notesnormals%
\beamer@paperwidth 16.00cm%
\beamer@paperheight 9.00cm%
\geometry{papersize={\beamer@paperwidth,\beamer@paperheight}}
\fi%
\setbeamertemplate{note page}{%
{%
\scriptsize
\usebeamerfont{note title}\usebeamercolor[fg]{note title}%
\ifbeamercolorempty[bg]{note title}{}{%
\insertvrule{.25\paperheight}{note title.bg}%
\vskip-.25\paperheight%
\nointerlineskip%
}%
\vbox{
\hfill\includegraphics[height=0.25\paperheight, page=\thepage]{slides}\hskip-\Gm@rmargin\hskip0pt%
\vskip-0.25\paperheight%
\nointerlineskip
\begin{pgfpicture}{0cm}{0cm}{0cm}{0cm}
\begin{pgflowlevelscope}{\pgftransformrotate{90}}
{\pgftransformshift{\pgfpoint{-2cm}{0.2cm}}%
\pgftext[base,left]{\usebeamerfont{note date}\usebeamercolor[fg]{note date}\the\year-\ifnum\month<10\relax0\fi\the\month-\ifnum\day<10\relax0\fi\the\day}}
\end{pgflowlevelscope}
\end{pgfpicture}}
\nointerlineskip
\vbox to .25\paperheight{\vskip0.5em
\hbox{\insertshorttitle[width=8cm]}%
\setbox\beamer@tempbox=\hbox{\insertsection}%
\hbox{\ifdim\wd\beamer@tempbox>1pt{\hskip4pt\raise3pt\hbox{\vrule
width0.4pt height7pt\vrule width 9pt
height0.4pt}}\hskip1pt\hbox{\begin{minipage}[t]{7.5cm}\def\breakhere{}\insertsection\end{minipage}}\fi%
}%
\setbox\beamer@tempbox=\hbox{\insertsubsection}%
\hbox{\ifdim\wd\beamer@tempbox>1pt{\hskip17.4pt\raise3pt\hbox{\vrule
width0.4pt height7pt\vrule width 9pt
height0.4pt}}\hskip1pt\hbox{\begin{minipage}[t]{7.5cm}\def\breakhere{}\insertsubsection\end{minipage}}\fi%
}%
\setbox\beamer@tempbox=\hbox{\insertshortframetitle}%
\hbox{\ifdim\wd\beamer@tempbox>1pt{\hskip30.8pt\raise3pt\hbox{\vrule
width0.4pt height7pt\vrule width 9pt
height0.4pt}}\hskip1pt\hbox{\insertshortframetitle[width=7cm]}\fi%
}%
\vfil}%
}%
\ifbeamercolorempty[bg]{note page}{}{%
\nointerlineskip%
\insertvrule{.75\paperheight}{note page.bg}%
\vskip-.75\paperheight%
}%
\vskip.25em
\nointerlineskip
\insertnote
}
\makeatother
\begin{document}
\begin{frame}{Testtitle}
This is a test slide.
\end{frame}
\note[itemize]{\item A note}
\begin{frame}{Testtitle}
This is a test slide.
\end{frame}
\note[itemize]{\item A note}
\end{document}

To automatically compile everything, you could use a script or an automation tool like arara to automatically compile the following sequence of commands:
pdflatex -jobname=slides test
pdflatex "\PassOptionsToClass{notes=only}{beamer}\input{test}"
(assuming your file is called test.tex
)