Move code from midi namespace to core namespace, because there was nothing in the core namespace and the code in the midi namespace fit there.