Some more refactoring to extract the transformation from canvas to audio