yue

Programmatic music library

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17
  18. 18
  19. 19
(include "lib.scm")

(define (melody t) (
	apply + (map
		(lambda (octave pitch start len) ((note (getfreq octave pitch) start len) t))
		;'(3)
		;(cons (* 3 (sin t)) '())
		;'(0)
		;'(6.28)
		'(3 3 3 3 3 3 3 3 3 3)
		'(4 8 4 11 4 2 8 4 11 4)
		'(0 1/4 3/4 1 5/4 3/2 7/4 9/4 5/2 11/4)
		'(1/4 1/4 1/4 1/4 1/4 1/4 1/4 1/4 1/4 1/4)
	)
))

(define (music t) (
	melody (floor-remainder t 6.28)
))