Mod DUO Max [gen~] MIDI I/O

How can I flag an input/output to read/transmit MIDI connections in [gen~] ?

1 Like

gen only supports audio in and out, no MIDI, so you can’t really transmit MIDI using it

Wellllllllllllll… That is unfortunate BUT:
That is only sort of partially correct.
[gen~] supports whatever signal you throw at it at audio rate.

PLEASE take a look at [Oopsy~] for the Electro-Smith Daisy (Github) (or the Electro-Smith Forum)

It’s a [gen~] code export thing that does EASILY accept MIDI input and output as [gen~] I/O.

The code export framework takes any input named similarly to “in 3 MIDI” and links it to MIDI I/O specified in export patcher handler files.
[GEN~] DAISY_MIDI_io.gendsp google drive link
For the Mod DUO export thing a similar handle could be set.

This could greatly expand the ability to make tempo synced FX, never mind the synthesizer possibilities.

/it has helped that Maxlord Graham Wakefield is personally involved.

1 Like


oopsy/source at main · electro-smith/oopsy · GitHub has some details.

MIDI input can be bursty and sparse. A [param] is not a good match for this, since it can only handle 1 value per block size (even at 1000Hz this might not be enough to capture really bursty midi). Instead we feed the raw midi bytes in via an [in] signal, one byte per sample.

I am not familiar with Max concepts, what is this “[in] signal” referring to? an extra audio port?

Can you do a code export via Max gen~? I will see about making use of the resulting code and try to have it as a synth.

1 Like

I think I can answer you this one:

Everything in MaxMSP that handles audio takes a “~”, so I guess that if this was only referring to audio would be written, “in~”.

I would LOVE to be able to make this work with my beta Dwarf, whenever that arrives. :slight_smile:
I have a guitar with a 1/8 MIDI output and, welllllll, the possibilities here make me giddy.

@jon @falkTX
OK so, I took the Daisy Patch MIDI I/O example from Graham Wakefield and did some disassembly, snippet making, and example-ing. Included is the CPP Code Export from an altered “mod-gen~.empty_gen”, a bunch of texted [gen~] codebox outputs for reference, the original Oopsy Daisy Max Patch, and the Max Patch the MOD Cpp code was exported from.

Somewhere along the way I screwed up the note-off messaging but it shouldn’t matter for THIS exploration. I promise to fix it in the next few days, if you want.

@jon there is a [gen~] object OUTSIDE of the main patcher that is designed to take Max midi-format and turn it into audio-rate signaling by poking a buffer object. It is the object [p midimessages2signal]. I don’t believe that will be a required step along the way for the MOD environment but it is not required for this code to operate on Daisy hardware. HOWEVER, it is the thing that forces the in-line message parser to multiply the signal by 256 before the first data translation occurs in the message parser. So… there may be some message rate and bit depth things to deal with, I’m not certain.
BUT, it’s the thing that makes MIDI messages audio messages so…
Worth braining

On the upside, I am excited that the algorithms I’ve been making for my Daisy translates over to the MOD environment with great ease. BEST PHASER PEDAL I EVER WROTE :slight_smile:
(now… if I can just get my UI chops together, I’ll send up some submissions for the pedal store)


Splitting hairs is what we do!
Everything in Max that operates at a fixed and locked signal rate gets a tilde. Video, Audio, or “Other”
HOWEVER, Referring to [in 1] or [out 2] inside of a [gen~] object these do NOT get a tilde, as they exist inside of [gen~] annnnnd inside of which everything happens explicitly at sample-rate. The goal being the entire calculation happens within a single sample unless you intentionally add delays to the signal for EQs or whatever whatever. The [in 1]/[out 2] are connectors to symbolize the ins and outs of the object-oriented codebox. The labels after the designation (“gate”, “minisynth”) usually mean nothing at all and just provide popup text to the object when you hover over a connection when connecting to it from outside of [gen~]. HOWEVER, what Graham did was add a hook to the Oopsy compile process to recgonize certain bits of text, i.e. “MIDI”, to tell them compiler something special to do with that input/output.
The instruction set for [gen~] is extremely limited compared to Max but it IS code so you can recreate any (almost) Max object inside of it, you just have to do it by hand. -Like making a toggle switch in code as opposed to just using the Max “toggle” object. Those objects do not exist in the [gen~] environment. It is purely math.

Attached is a screenshot of the most simplified [gen~] object included above that accepts 256 byte messages and outputs a cheese monosynth. (with the note off bug I got lazy about)

1 Like

First of all thanks for sharing this :slight_smile:
Second…I’m really curious about the Phaser sound! What about some audio samples of it? :slight_smile:

Gotcha and thanks for the explanation. It makes a lot of sense.
Admittedly my Max knowledge has a bit of a gap on gen related stuff. Something that I’m aware for a while and that I’m feeling that finally got the perfect excuse to catch up on it :wink:
Who knows one of this days we will be creating some plugin for the MOD platform together :wink:


@falkTX @jon
Relatedly, I have not received word about my beta dwarf

1 Like

They are slowly rolling them out. Based on numbers I have seen shared, they have around 50% of the betas out the door.



Thanks, @Randalhicks for the help :slight_smile:

@Manysounds, the Dwarfs are indeed slowly getting out of the office. They are being produced, tested, and sent one by one. A lot of care is being put on each of them.
I just ask you to be a little bit more patient, it will be worth :slight_smile:

1 Like

Hi, Odd question (maybe needs its own thread…): Is it possible to install a local plugin into a Duo of what ever type without using MaxMSP or having that plugin posted to the Plugin Store?

I’ve written something in Max and compiled it from a Gen~ object using the ModDuo patcher in Max. It is in my Duo X and works fine. However, I will also be getting a Dwarf, as will a friend of mine who doesn’t own MaxMSP. Is there a way to give that person the compiled plugin files and have them easily install it into their Dwarf if they aren’t familiar with programing tools? Or is the way to do it post it to the Plugin Store and have them download it from there? I am guessing the latter is the case, but am curious. Thanks, Lloyd

Yes, those steps are described in Max_gen~#Compiling_the_plugin
Though it is a little advanced usage as it requires the command-line.

1 Like

Still waiting on my beta unit :frowning:

Well, not really related with this topic. But as I told you on the other thread we will certainly be shipping it soon.

1 Like

More specifically, have you explored the Electro-Smith [oopsy~] Daisy implementation of MIDI I/O?
It certainly could be possible to do something similar for the MOD family.

I’m not familiar with that, to be honest. But I’m curious to explore even in a personal side.
I saved it on our requests and we will take a look as soon as possible. Right now we are just quite overwhelmed with what you are aware about, so the requests are a bit on hold.