user32169: typedef struct {
  uint8_t  pitch;
}LearnNote;

#define  MAX_NOTE  500

LearnNote  Noteseq[MAX_NOTE]; 

int learnindex=0;
void loop() {
 MIDI.read();
}

void MyHandleNoteOn(byte channel, byte pitch, byte velocity){
Noteseq[learnindex].pitch=pitch;
learnindex++;
}


user10394: Its not very clear what you are asking, but I think you are saying can you do this
uint8_t anArray[MAX_NOTE];
anArray = Noteseq.pitch;

In general the answer is no.  However in this specific case off the top of my head I think you probably can (maybe).  You have a struct which only contains bytes.  The compiler will probably pack the sequentially so you will effectively have a contiguous sequence of bytes which you would be able to copy to the byte array by doing:
memcpy (anArray, Noteseq, MAX_NOTE);  // THIS IS BAD PRACTICE!

You can only do this in this case because the types are both 8bit numbers.  Its not a good idea to do this copy between an array of structs and a POD type array is just asking for trouble.
Instead use a function to do it.
int* CopyPitch (LearnNote* source, int* destination, int count)
{
    for (int i = 0; i < count; ++i)
    {
        destination[i] = source[i].pitch;
    }
}

(You should really check for null pointers and stuff, but its just an example)

32169: <pre><code>typedef struct {
  uint8_t  pitch;
}LearnNote;

#define  MAX_NOTE  500

LearnNote  Noteseq[MAX_NOTE]; 

int learnindex=0;
void loop() {
 MIDI.read();
}

void MyHandleNoteOn(byte channel, byte pitch, byte velocity){
Noteseq[learnindex].pitch=pitch;
learnindex++;
}
</code></pre>
 10394: <p>Its not very clear what you are asking, but I think you are saying can you do this</p>

<pre><code>uint8_t anArray[MAX_NOTE];
anArray = Noteseq.pitch;
</code></pre>

<p>In general the answer is no.  However in this <strong>specific</strong> case off the top of my head I think you probably can (maybe).  You have a struct which only contains bytes.  The compiler will probably pack the sequentially so you will effectively have a contiguous sequence of bytes which you would be able to copy to the byte array by doing:</p>

<pre><code>memcpy (anArray, Noteseq, MAX_NOTE);  // THIS IS BAD PRACTICE!
</code></pre>

<p>You can only do this in this case because the types are both 8bit numbers.  Its not a good idea to do this copy between an array of structs and a POD type array is just asking for trouble.</p>

<p>Instead use a function to do it.</p>

<pre><code>int* CopyPitch (LearnNote* source, int* destination, int count)
{
    for (int i = 0; i &lt; count; ++i)
    {
        destination[i] = source[i].pitch;
    }
}
</code></pre>

<p>(You should really check for null pointers and stuff, but its just an example)</p>
