To store all note on messages in a list and delete them when a note off message is received, use the bag object.