示例#1
0
    public static void LogScaleNoteNames(int rootNoteIndex, int[] scaleIntervals, int count, int divider)
    {
        int[] fullRangeNotes = GetFullRangeNotes(rootNoteIndex, scaleIntervals);

//		Debug.Log("root is " + QNoteHelper.GetNameForIndex(rootNoteIndex));
//
//		Debug.Log("now root is " + QNoteHelper.GetNameForIndex(rootNoteIndex));
//
//		Debug.Log("root note index " + rootNoteIndex);

        StringBuilder sb = new StringBuilder();

        for (int c = 0; c < count; c++)
        {
            int relativeNoteIndex = GetRelativeNoteIndex(fullRangeNotes, rootNoteIndex, c);

            if (c != 0)
            {
                if (c % divider == 0)
                {
                    sb.Append("|");
                }
                else
                {
                    sb.Append(',');
                }
            }

            sb.Append(QNoteHelper.GetNameForIndex(relativeNoteIndex));
        }
        Debug.Log(sb.ToString());
    }