Alternative to ddg.mono (in javascript)

    May 29 2012 | 10:25 pm
    A lot of people have problems with ddg.mono because they are trying to use it with VST instruments or Live devices - instruments which are intrinsically polyphonic, and therefore don't respond well to ddg.mono's lack of note-offs. ddg.mono was meant to provide monophonic behavior to synths that you create in Max, so some compromises had to be made...
    I'm going to provide add some logic to ddg.mono, but I thought I'd share this javascript mock-up; it provides the proper set of note-on and note-off messages to support routing to polyphonic instruments/devices appropriately.
    I hope you find it useful. I've included a simple test patch that allows you to use Max's virtual MIDI ports to route things to and from external systems/packages.

    • May 30 2012 | 12:24 am
      I have an abstraction called cbm.mono that I use for this sort of thing. It can be found here:
    • Sep 27 2013 | 10:20 am
      is ddg.mono updated in max6? (im still on 5)
    • Sep 27 2013 | 1:26 pm
      @flowdesigner: it does work.
    • Dec 13 2015 | 1:44 am
      THANK YOU DARWIN!!!!!!
    • Jun 27 2016 | 2:21 pm
      Brilliant. This indeed handles the noteoffs correctly. Thank you Darwin!
    • Jun 27 2016 | 4:49 pm
      Using this JS in a MFL Device on a MIDI Track in Ableton introduces MIDI lag. I am not sure if this is inherent to Max for Live MIDI Devices, JS, or a bit of both.
      Easy to reproduce by recording the MIDI output into another clip, with or without the MFL Device enabled.
      A quick search reveals this is a common issue with Max for Live MIDI Devices.
      Any magic fix for this by any chance?