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
  20. 20
  21. 21
  22. 22
  23. 23
  24. 24
  25. 25
  26. 26
  27. 27
  28. 28
  29. 29
  30. 30
  31. 31
  32. 32
(include "lib.scm")

(define (music t)
	(apply + (map (lambda (x)
		(apply (lambda (octave pitch start len) ((note (getfreq octave pitch) start len) t)) x))
		'(
			; opening notes
			(2	2	0	.1)
			(2	6	.1	.1)
			(2	9	.2	.1)
			(3	1	.3	1.2)
			(2	0	2	.1)
			(2	4	2.1	.1)
			(2	7	2.2	.1)
			(2	11	2.3	.6)
			(1	10	3	.1)
			(2	2	3.1	.1)
			(2	5	3.2	.1)
			(2	9	3.3	.6)
			(1	7	4	.1)
			(1	11	4.1	.1)
			(2	2	4.2	.1)
			(2	6	4.3	4.2)

			; A melody
			(2	6	9	2.5)
			(2	7	11.5	.5)
			(2	6	12	.5)
			(2	2	12.5	.5)
			(2	9	13	1)

		))))