integrated c code to generate note rings