Tone library music mode/key explorer...

I'll post a video if you'd like. I can't say that it works correctly though, but it does seem to follow the key signatures and note widths.

I'm trying to work in ADSR figures now,I think this FOR loop (nested within the loop that handles the values for each tone channel) should handle the generation of the ADSR values, now for the hard part...

    for (currentADSRfunction = 0; currentADSRfunction <=1; currentADSRfunction++)
    {
    ADSRtotal[currentADSRfunction] = 
    (
    attack[currentADSRfunction]+
    decay[currentADSRfunction]+
    sustain[currentADSRfunction]+
    release[currentADSRfunction]
    );
    
    attackLength[currentADSRfunction] = 
    ((NoteLength [CurrentVoice] * attack[currentADSRfunction])/ADSRtotal[currentADSRfunction]);
    decayLength[currentADSRfunction] =
     ((NoteLength [CurrentVoice] * decay[currentADSRfunction])/ADSRtotal[currentADSRfunction]);
    sustainLength[currentADSRfunction] =
    ((NoteLength [CurrentVoice] * sustain[currentADSRfunction])/ADSRtotal[currentADSRfunction]);
    releaseLength[currentADSRfunction] =
    ((NoteLength [CurrentVoice] * release[currentADSRfunction])/ADSRtotal[currentADSRfunction]);