Changeset 497
- Timestamp:
- 08/18/07 11:45:04 (1 year ago)
- Files:
-
- ocaml-remix/trunk/instrument_test.ml (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
ocaml-remix/trunk/instrument_test.ml
r496 r497 6 6 (Time.Seconds 0.01);; 7 7 8 let sf amp tone = Envelope.apply env (Wave.triamp tone);;8 let sf wave amp tone = Envelope.apply env (wave amp tone);; 9 9 10 10 11 let instrument = Instrument.from_sound_function sf;; 11 let instrument1 = Instrument.from_sound_function (sf Wave.tri);; 12 let instrument2 = Instrument.from_sound_function ~start:6. (sf Wave.square);; 12 13 13 14 let noteify (t,r,l) = (note t r, l);; 14 15 15 16 let layer = Layer.empty ();; 16 Instrument.add_notes instrument layer 30000. (List.map noteify17 Instrument.add_notes instrument1 layer 30000. (List.map noteify 17 18 [(c, 0, 0.5); (d, 0, 0.5); (e, 0, 0.5); (f, 0, 0.5); 18 (g, 0, 0.5); (a, 0, 0.5); (b, 0, 0.5); (c, 1, 2.5); 19 (g, -1, 0.5); (a, -1, 0.5); (b flat, -1, 0.5); (c, 0, 0.5); 19 (g, 0, 0.5); (a, 0, 0.5); (b, 0, 0.5); (c, 1, 2.5)]);; 20 21 Instrument.add_notes instrument2 layer 30000. (List.map noteify 22 [(g, -1, 0.5); (a, -1, 0.5); (b flat, -1, 0.5); (c, 0, 0.5); 20 23 (d, 0, 0.5); (e flat, 0, 0.5); (f sharp, 0, 0.5); (g, 0, 2.5)]);; 21 24
