Lab 10
Here’s a simplified version of the data definition we developed in class:
; a note is (make-note number number) |
(define-struct note (pitch dur)) |
; a song is either |
; - a note, or |
; - (make-song-pair song song) |
(define-struct song-pair (s1 s2)) |
Write down the template for this function, using the name a-song-fun.
Develop the song->rsound function, that turns a song into an rsound by using make-tone and rsound-append*.
Develop the invert-note function, that accepts a note and returns another note with the same duration and the midi note number "mirrored" around 60. So a midi note number of 72, for instance, would turn into a midi note number of 48.
Develop the invert-song function, that alters a song by applying invert-note to each of its notes.