Hi, I'd have though this was a common situation and there'd be a good solution, but a look around didn't show anything. After a lot of trial and error, I got a solution that seems to work, but am I missing something obvious? When you play a real instrument, or a normal synth, repeating a note with the sustain pedal held down just replaces the original sounding instance with the new one. Csound is different, though, in that each MIDI Note On starts a new instance, and if the sustain is on, it remains sounding until the pedal is released. With my sometimes-heavy pedal (:-/), this quickly takes me into out-of-range territory, with typically nasty results. I would think there should be a way of ensuring a given note number only has a single instance, but I couldn't find one. I eventually hacked a scheme that uses a 128-slot table to record sounding notes, and any instrument initialization that finds the same note sounding kills itself. It seems to work, but is not at all elegant! Also I was not helped by the fact that the behaviour of 'tablew' has changed (at some point before 6.12) and *it does not match the manual*!! The manual (even the latest) clearly states that tablew *always* only runs at performance time, even with i-time parameters. this was true in Csound 5 where I originally created a working scheme, but it s *not* so in 6.12! Experimentally, using i-parameters only, tablew writes at i-time (only)! In addition, I'm not sure that 'turnoff' is doing what I expected. I found I have to explicitly skip the performance code once the instrument is 'turned off', or the release phase seems to happen anyway -- when the sustain is released. -- Pete -- Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here