p0 = output start time (seconds) p1 = duration (seconds) p2 = amplitude (absolute, for 16-bit soundfiles: 0-32768) p3 = # of X points (2-12) p4 = # of Y points (2-12) p5 = xpos (0.0-1.0) p6 = ypos (0.0-1.0) p7 = decay value (0.0-1.0) p8 = strike energy (0.0-1.0) p9 = pan (0-1 stereo; 0.5 is middle) [optional; default is 0.5] p2 (amplitude) and p9 (pan) can receive dynamic updates from a table or real-time control source Author: Brad Garton, based on code from the Synthesis ToolKit
Here's what was written in the original source code:
Sometimes the amplitude is very small and has to be boosted.
MMESH2D can produce other mono or stereo output.
Sample Scores
very basic:
rtsetparams(44100, 2) load("MMESH2D") MMESH2D(0, 4.5, 3*30000, 12, 11, 0.8, 0.9, 1.0, 1.0, 0.5) amp = 30000 ampenv = maketable("line", 1000, 0,0, 4,1, 5,0) pan = makeLFO("tri", 0.5, 0.0, 1.0) MMESH2D(5, 4.5, amp*ampenv*100, 10, 11, 0.7, 0.1, 1.0, 1.0, pan)
rtsetparams(44100, 2) load("MMESH2D") srand() st = 0 for (i = 0; i < 150; i = i+1) { nx = irand(2, 12) ny = irand(2, 12) MMESH2D(st, 0.5, 17000, nx, ny, random(), random(), random(), random(), random()) st = st + 0.1 }