^^ recipes: max / m4l snippets for crow

in the spirit of Chris Dobrian’s Max Cookbook, this is a community collection of crow recipes for Max / Max for Live.

to use a recipe, copy the code and in Max go to File > New From Clipboard.

if you have questions about specific patchers or want to see a recipe for something, just ask! the top post a wiki post, so it can be freely edited with new recipes from the community! :revolving_hearts:

when adding, please:

  • contain everything in a summary (while posting, click the gear icon then Hide Details)
  • give the summary a functional description
  • include “added by: @[your handle]” under the title
  • include a screenshot of the patcher (no segmented patch cables, please!)
  • include a description of what’s going on in the patcher
  • include a Copy Compressed patcher

I’m hoping that this will help not only folks who are new to crow, but also those who are new to patching in Max.

additional resources:


^^ recipes

MIDI notes to v/8

added by: @dan_derks

This example uses [sprintf] with a symout argument to format a message to crow, which is typically how I like to construct crow messages. The two occurrences of %i are placeholders for two integers – one to define the output and one to define the argument for crow’s built-in n2v translator.

I like having a MIDI offset number box present to help make the entire 0-127 note value range useful, but have found that a 48 semitone offset is good for my needs.

An important note is that once you have more than one argument in your [sprintf] messages, a [t b i] / trigger becomes necessary because of [sprintf]'s cold inlets – in this patcher, it helps ensure that note value changes are sent to the specified crow outlet.


----------begin_max5_patcher----------
2475.3oc6bs0aiiaE94jeEBBXAZAxDvKhRjKv9vLc5ltnIsKlIECVL6f.Ya5
LLQVxPWxktXme6khTRVxVVWbnc711.L1zxj7b+iGdH87amdh8jnm3I1Veu0m
sN4je6zSNQ8n7GbRwmOwdg+SSC7STcydZzhE7vT6yzeWJ+oT8y+ZTTB25pe5
8+jUz74I7ptrLlmHGgepHJ7l.QHeZTVnZPnhdHlolhnI28FLrbXgYKDgA7TE
Ygkyke5zuJBu8lX9zTMa6fImCNyBhnp2.p2PfyAVeY0LEkkVNUf7G96mdZ9K
mYFg1OzRRfkYUcnt.AFq.gPXkHfwZABtGDH4LLgGWxY5IK84kbMGXaelk8D+
vasqHYMIBQqrr9w9K3o73a3g9SBTiFrilOBH+M8qHzVEVztHr7Gk78FFu2X4
P2pFPj6g1lv61p4D0g.hbNmHEPlRNQr7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AbYZK5KPx
6hhtuuBquJ3biFlq3rCSV9e.vy6VJBuervm4.JzJTBbwIgX.nyMVMd.jp0BC
0+v1z+d0gTp5Ntdq9qn1PH4H6+1hONqwqF3LKFNOc.S.4nBY9dc0E9T9E080
Ns+f7jh6eyfqWkO.yo3J4wXXpWQKOJa.gSUovRp.IKs7lStz+zSdWPFu7mDx
vOgYnWw8gXEqx1WLXbzigilCOjpv+xy9imAAHFQekO77vXj9dFgfRPQyyfWD
y46.GpzdU0NB5luph4YtOvmMZVyqB7CVkOA.gIHl44uegGDD83nYQJhnudQd
THUgXCHRKNouqDGgA.z8g.f9in.nJA9ExseMdWjpxPPXHHQe4sputmQXvkYw
K6tTaarrfC.wz0o.3xT9vHJwEQG3cbzq5Z64nt9KJbi7HShIkqX9Tt3gtO8m
17Ypx1bEyApuSeyvb5jCtnmqZ8ZZ9dcHZMqQGWWcw4jXydE2FTYP.ynnzI7v
YIGanyIoSVsu3c4pf2SYT1O2V7T+k8wx03qK8SirtLO+NaiQ+jT97rffzdKB
+52wTJg.0UvzE6g02mZWYzSWGJRukexnB0nkIjbSm5KnGtxSEiXXF0.IA+Jp
O3IGW+FIdr19jdYSxyCWtvt8tIcPt0PsIHbgQPhCWbRACZ0tAV430BqeuHN8
Yq+5s8doRgLFvkVrJkSww95B.5eOGrcw5n+cppNpnbNJYYgwV8+C.m96m9eP
3y+Hr
-----------end_max5_patcher-----------
polyphonic MIDI-to-v/8 with switchable pulse/gate signal

added by: @dan_derks, inspired by conversations with @Therm0ptic

This example routes three MIDI notes to the first three outputs of crow, with the option for either a pulse or gate signal from crow’s fourth output, which can be patched to an envelope generator module in your system. If only one voice is played, the note routes to all three outputs. If a second voice is played, it’s sent to the second output – third, third.

There are a few “staples” in this one.

note = 0V

Allows the user to set which MIDI note should correspond to 0V. I’ve placed it ahead of each of the three crow outputs, so that the user can offset the voltage dynamically – very useful for monophonic situations where a single note is sent to all three outputs. Also, helps keep small chord shapes if you are using polyphony.

pulse | gate

There are two sets of messages being sent to crow, which create the pulse or gate events depending on this setting.

If the UI tab is set to pulse, the [gate 2] object will send the velocity through its first outlet and the value is tested against 0. If greater than 0 (note-on), then the "output[4]( pulse (0.01) )" message is triggered with a bang. You’ll notice that there’s a UI dial (pulse length) for the user to specify their preferred pulse length (10ms -> 1 sec). To change the selectable range, open Max’s Inspector, select the dial, and search for the Range Parameter.

If the UI tab is set to gate, the [gate 2] object will send the velocity through it’s second outlet and the value is tested against 0. If greater than 0 (note-on), then the "output[4].volts = 10" message is triggered with a bang. Since we don’t want note-off values from the other two voices to turn off our gate signal, we check to see if the voice number is 1 – if it is, then we allow a received note-off message to trigger the "output[4].volts = 10" message with a bang.

challenge

Try adding a way for the user to specify the peak gate voltage!


----------begin_max5_patcher----------
4024.3oc6cs1iaabE8y1+JFHzflftVcdxGEHEHtowMn1sEwtMnvNXAE0HszK
Eo.I09nAw+167fjhRhhZnzPsp0wePKWJRN26Yt2y8wLb8O+7mMZR5C77Qf+.
38fm8re94O6YpSIOwyJ+8mMZQvCgwA4pKaTX5hE7jhQWo+tB9CE5yeSZZNGb
+MQg2.dy2+seOHIsfC9Z.7eAlklAtKMJjCHU2WbTBOLcUh5lwkmbYFOW7rCJ
hRStt0qXVZRQRvBtZH+lrnf3pGXzT04Rm7wW3gpNYxpEQIw7BkniVexzUEUm
EVM1AEg2DkL+5LdXgFPbnvwNM9mKEeEfRQiYWAPX1X3U.BYLD7Sxmvu77mK+
3JCgw3n63im1P9uKHqVwpQtq1F1LS+wipUpLwEWvytlmDLIluELbHroB00mp
3wkbMvLZzUfQyhSCD.0Ose7i440B9QnR7iofOpqD9JeB4A2wmdcPQQVzjUE7
0GkWhik.oDqhWwSmUc5py2TeiRhJjnidhrdPZ6Z1Ea13pD1g2Jg778dAoIyO
7T2F2R9MoYE6dOscoUndai7JgBjW7nV1g5uWYGV8idZTlvuWX+riq8KD.X+L
.gs5.ha0HCsOirnjCXd4xZw7xmp7KwxOw3iz67zH4vmCRNWO6PxQ7XWHjb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UmO
ADSX3AvA4eyiiSuu2hnGlo24PtdHOEiMjIlwYGZerw7gPugPAv+unBnZA9qD
EO1eSj51Pv7wHlduU0LtmUDvkqxV1cq11gZmBw959T.c7U1vXOlC1yvcJta8
txip1lKJdComIyl5UFOjGcW2q9Sa1L0oMtV3fMKi2NBmN4fWcfsZ8VH+AMHZ
MqQpiit4bBtY2xcCpvIv2przx+CeM+RicNuXx55hO1N8b12s3EAK6gH+5fhT
vqk42MxZiedAe1p33hC1D9s2BndLFR2ASGhKQuIncDdONmR6mrpRUbTKrvQl
DLVT4odS7QpsxIXehu2SOdvyurdGItuQcRm1C4wd387sQYEOB9yyarSSauVc
nbRQUOCobtPPGWtfA6OYBhiIwCMrwwsWaOx2G53UFkhVtruNPn9843n17n52
SU0REo9S9+xR6.0ex0d9u77+KGG3DpC
-----------end_max5_patcher-----------
18 Likes

Started the Max class about a week ago. Really helpful in getting me on boarded. Can’t wait to be able to add here!

1 Like

gentle bump: polyphonic MIDI-to-v/8 with switchable pulse/gate signal has been added up top, thanks to @Therm0ptic’s questions/challenge in the ^^ crow: max for live + max v2.0 thread.

2 Likes