A mathematical utomatic midi generator