While looking for the pgmin UDO today, I noticed it wasn't in the repository! This must've not been re-added from a while back when the repository was lost. Anyway, I've restored the UDO and example .csd. Appended to this email will also be the unified .csd for archiving purposes. -David sr = 44100 kr = 441 ksmps = 100 nchnls = 2 massign 1, 1 pgmassign -1, -1 /* change soundfont here */ gi2 sfload "/Library/Audio/Sounds/Banks/synthgms.sf2" gipres init 1 gkpres init 1 sfilist gi2 sfplist gi2 sfpassign 0, gi2 ;// opcode pgmin, kk, 0 kstatus, kchan, kdata1, kdata2 midiin if (kstatus == 192 && kchan == 1) then kpgm = kdata1 else endif xout kpgm, kchan endop ;// /*--- ---*/ instr 1 ifreq cpsmidi iamp ampmidi 2 inum notnum ivel veloc kfreq init 1 kvol ctrl7 1, 7, -2, 8 gipres = i(gkpres) ; printk2 gipres kamp linsegr 1, 1, 1, 0.618, 0 ; adjust the release time to suit the sample set a1,a2 sfplay ivel, inum, kamp*(iamp+kvol), kfreq, gipres, 0 outs a1,a2 endin /*--- ---*/ instr 2 kmodw ctrl7 1, 1, 0, 2 kpgm, kchan pgmin gkpres = kpgm if (kmodw >= 1) then printks "\nPreset index: %i\n\n", 2, kpgm+1 else endif endin /*--- ---*/ i1 0 3600 i2 0 3600 e