Fixed retrigger bug in envelope.
Added mono logic and legato helper.
Added and changed things for legato and portamento.