Help requested - New to Daisy and Oopsy - I'm not clear on what works with the MAX/MSP integration

Hello,

Sorry, i’m new to the Daisy platform and what I am looking to do is use the Daisy Field to create a sequencer. I wanted to create this in MAX/MSP but it is not clear if I can code outside of the gen~ object.

Is there a sample where I can use the MSP objects such as out [count], lists, lz.lookup and other MSP objects that work outside of the gen~ object? That way I could combine some of the MSP coding with the gen~ portion of MAX/MSP.

Let me give you more of an example:

  1. Using a count object that will take either a pulse (or MIDI clock) to advance the count for 8 steps.
  2. using the 8 step counts to look up information in a few lists/arrays that contain info about pulse width, glide, CV level, etc.
  3. Using the buttons in two ways:
    a) adjust step on/off
    b) press and hold while turning a knob to change a param on the step

Any thoughts, samples, or suggestions here would be helpful.

Thank you for taking the time to read through this and hopefully help me better understand what is possible in MAX/MSP on the Field device.

  • Brett
1 Like

Hey, Welcome!
sorry to say we can’t use objects outside of gen~(the most we can do outside gen~ is create multiple gen~ patchers in the same max patch to flash multiple effects which can be selectable by the encoder)

-for the ‘count’ object, there’s a ‘counter’ in gen~ that can do the same(it can count at sample rate, or you can trigger it to count at a different rate and with multiplication/addition after that, you can create offsets and step-sizes)
-for information to lookup, i’m not entirely sure but i’m thinking of doing something like this(not with CV but more with some kind of general sequencing data), i’d probably setup a ‘data’ op(works same as any array) for the information i’d want to retrieve throughout
-for using buttons in two ways, i did this recently in my oopsy creation(to snoop the gen~ patch, you can check the ‘Projects and Examples’ section for a thread called “Snoopsy”), and i needed to do this by utilizing a timer: you hit the button once within one second, it does one thing, or if you hit the button twice within one second it does another thing(for your purpose, you could probably just use a much shorter timer, like 500ms to tell whether it’s just an on/off or an on/hold)

anyways, that’s as far as Oopsy goes with as much as I’ve found so far, maybe others might have more as i’m also pretty new here. hope it helps :beers:

Hi there,

Yep, everything Raja said is right!

  • only things inside of a gen~ get flashed to Daisy
  • in gen~ most things have to be thought of in terms of signals rather than messages; but there’s plenty of examples with Max and in the C74 forums of how to do max-like things using signals inside gen~. Have a look in the gen examples folder in Max.
  • in gen~, to count based on an incoming pulse, use [counter] or [accum]. Make sure that your pulse is a single sample trigger, not a gate. One way to ensure that is to track rising edges, e.g. route your clock source into [> 0] => [change] => [> 0]. That will ensure whenever the clock signal rises above zero, you’ll get a single-sample spike, and everywhere else it will be zero, which is perfect for counting. (It’s also perfect for sending a reset spike to [counter] or [accum] or even [phasor]).
  • yes, you’ll want to use a [data] to store that information, and use [peek] to read the data out according to the current count. To initialize the [data] you probably need to use a codebox with if (elapsed == 0) { ... } for the initialization code.
  • the key button params will report 1 while the button is held, and 0 otherwise. So you can use that as a condition to enable/disable routing of the knob. As Raja says, to detect a short vs. long press you can use a counter. Again, you could route the key value into a counter or accum, it will count in samples while the button is held. You’ll need to reset that count when any button is released, which means looking for the falling edge ([> 0] => [change] => [< 0]). So, toggling a step would be something you’d want to do on a falling edge when the counter is below a certain threshold.

Hope that helps!

Graham

1 Like

Hello Graham,

Yes, super helpful! Thank you.

As for tutorials and goodness I found this set of tutorials:
Tutorial: gen~ for Beginners, Part 1: A Place to Start | Cycling '74
As a note: Part 3 has samples you can download as well.

I also found a pile of example patches here as well:
Gen - Max 8 Documentation (cycling74.com)

I found the Gen~ Operators but i am new so I can’t add in that link…
If someone needs it I can add it and/or reply and add it in later. :slight_smile:

Good news, I feel i’m slowly getting it figured out. :slight_smile:

I think the only other thing I need to figure out is how to write in a “code box” and I think i’ll be able to get something started! Yeah.

Thank you again for the help as I am really looking forward to getting a little code together and if all goes well my new Daisy Field will arrive soon. :smiley:

May you all have a great rest of your day.
Brett

1 Like

Here is the link to the Gen~ Operators:

gen~ Operators - Max 8 Documentation (cycling74.com)

1 Like

I will check this out!

Thanks for the info!

Overall, super exciting to be working on this - just a very cool system to get working and trying out some projects.

Brett

1 Like

Hi Everyone,

I hope I can get a little guidance on something similar. A lot of the sample based processing examples for Gen use the Buffer object, and I always get "Buffer is not supported for code generation, use Data object.

I tried for instance with the gen~.slicer.maxpat example.

Does anyone know of a patch where these operators were interchanged? it will help me understand better how to go about it.

Thank you.

Hello CoutlassSupreme,

Please note what I am writing below is what I have learned recently. Thus, hopefully if I am incorrect in what I have learned thus far, someone can correct me… so I’ll keep to the high level pieces i’ve understood to date.

There is one very important thing that took me a moment to decipher and that is the gen~ (with a tilde) object and the gen (without the tilde) object. Gen~ (with the tilde) uses max/msp “vectors” and the Gen object (without the tilde) runs at sample rate. The Gen (without the tilde) has a subset of the overall Gen~ options.

Here is a beginner’s guide to GEN:
Tutorial: gen~ for Beginners, Part 1: A Place to Start | Cycling '74

I hope that helps explain a little bit more and maybe we both get to keep learning as we go because I’m really loving what I’ve learned so far… (heck, I actually don’t yet have my Daisy Field yet, but I sure am looking forward to running this code live soon!)

Thanks,
Brett

Hi @BHAudio,

I am very new to Gen (and new to Max in general), but it is my understanding that both “gen” and “gen~” objects operate on single sample processing, while MSP objects (any object with a ~ besides the gen~ object) operate on max/msp vectors. That is what I gathered from the linked Gregory Taylor article, but I also could be wrong.

@coutlasssupreme I am wondering the exact same thing, (In practice, how does one swap out buffer objects for data objects?), so if you find out let me know!

Kind of. [gen] (no tilde) will process incoming Max messages as if they were single samples. It does not run at audio rate, it runs at whatever rate you send messages to it. [gen~] processes MSP audio signals, which are in blocks (vectors) in the MSP world, but processed in single-samples in the gen~ world. It does run at audio rate.

Regarding buffer-not-supported, yes, you need to use [data] instead of buffer for code export. For example, if you had a [buffer foo] in gen~, and that referred to a Max [buffer~ foo] which has 2000 samples long and had 2 channels, then in gen~ you can replace [buffer foo] with [data foo 2000 2].

Note that as of yet, this won’t help in terms of getting WAV data into the Daisy. I’m working on that still, and it will come in an update to Oopsy in the future. I do have a very basic demo working in the dev branch, but it still very much work in progress. It will probably look something like [data drumloop_wav 44100 2] which would search for drumloop.wav on the SDCard and load it into the [data] if it finds it.

1 Like

By the way, for general gen~ usage questions (not Daisy/oopsy specific) I recommend asking around on the forum at cycling74.com – it’s decently active and there’s a lot of shared knowledge there!

Thanks for the clarification, Graham :pray: