M4L programming help - my newbie questions

Learn about building and using Max for Live devices.
Post Reply
neuronaut
Posts: 174
Joined: Mon Feb 25, 2002 1:16 am
Location: San Francisco

M4L programming help - my newbie questions

Post by neuronaut » Mon Jan 27, 2014 9:32 pm

Hi folks!

I hope this is the right place for these Qs. Please let me know if I should post this elsewhere - thanks!

Below are some of the things I need to figure out, does anyone know of examples of any/all of these?

Also, I know Javascript, should I look into ways of doing this all in the built-in JS? Does anyone think that might be faster for someone with an expert understanding of JS and a basic understanding of M4L?


Get the playhead starting event, call bang on an object when playback starts
One of my plugs is a very simple meter, I want to clear the peak values every time I hit play. I want to add a toggle for this feature too, but I think I can figure that part out.


Detect overs and make alert sound on that track, set background color of the plugin red
I want to make an audible warning plugin that beeps, or even better, speaks the user-specified text, when the channel it's watching goes over a user-set db max. The parts I need the most help with are detecting overs and making the alert sound IF it is over the set value.


Show/hide and enable/disable parts of the UI with toggles
For switching views in a UI. For example, I want to toggle between types of level-meters to display. ALSO, I want to make sure disabled parts of the UI stop to keep the CPU usage as low as possible.


Find other M4L instances of a certain kind, and get and set values of those instances
For example, when I click reset in one plugin meter, I would like it to reset all similar meters on all tracks.
Another example would be to grab the settings from all the instances of an M4L plugin and then save or display them.


CRUD support for a shared DB
Can I access an external DB, and save to it? Is there a good example of Create, Read, Update, and Delete? I'm hoping to have a single flat file that is a DB that I can move between computers, etc, that my plugins can get and set data in.


Resize the panel/device width
I would like a button that makes the M4L device width toggle between wide/narrow settings


Scroll bars
Can I add a scroll bar to a user-editable text field when it's too long?


Thanks so much for any help! I hope to release my set of tools for free once they are useful enough!
The world is sound.

doubleUG
Posts: 249
Joined: Sun Apr 24, 2011 7:19 am

Re: M4L programming help - my newbie questions

Post by doubleUG » Wed Jan 29, 2014 4:54 pm

<pre><code>
----------begin_max5_patcher----------
1876.3oc2as0aaaCE94Tf9efvO63RRceXX.6BPw.Zw.1km5FBnjYrYqrjgHs
S5JV9sOdQRV1QVlIVRws.o9hHk4m9Ne7vy4P1u75Wc0j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ScRuGYfoN49Vn6CGef4ZEv7GefYkoz4EvTBsBXd6O08xAX
iu2Brche73CLea.Vv3iK2KT+qGtTyyccxUr4qyk4HxqRK2bXTgl3fZ7sFC0K
xixKAGisAXnweoBL7BEXHq7ufF+4wnvKUfYkiuC40w.XVEYIZ7CGAYk6Bz36
t.AuLynxpv2vuHvBYCrPWdvBcdVwxz2IqWqNwQk+zFHMYE4ilxZ3O07cVl46
lZWLoftkUcKkcgTjrjoNASaJL0y4de2IxVzCn7k+GPluuwC
-----------end_max5_patcher-----------
</code></pre>
copy the text, open Live > drag in empty M4L device > open Max editor > paste > save M4L device
https://docs.cycling74.com/max8/vignett ... ng_patches

https://doubleUG.bandcamp.com/releases

Post Reply