Button not working when triggered internally (ClyphXPro involved)

    May 16 2020 | 10:52 am
    im trying to trigger the ClyphXPro script when a devices is unmuted and i plan on monitoring the mute button of the track to do so. For this ive taken the observer part of the multimap observer (left part of the code) and tried to connect it to the ClyphXPro demo module (right part). when i trigger the button (red circle) with my mouse its working, when the button is triggered because the observed value changes, nothing happens. what the hell am i doing wrong?
    thanks Jo

    • May 19 2020 | 8:41 pm
      Hi Jo, is there a [defer] or [deferlow] between the live.observer and the bang? Do you have any errors/warnings in your console? Cheers, Tyler
    • May 20 2020 | 11:54 am
      Hi Tyler, 1. I did a rework of my patch because the console said it couldnt find the clyphx_pro_interface.js, so that is solved now. the console still states an js error: js: can't find file stringFormat.js js: js: no function text [stringFormat.js] js: js: no function text [stringFormat.js] but these errors occur with the unmodified clyphxpro interface demo that is provided with clyphx-pro and its working fine 2. in my patch is neither a live.observer nor a defer/deferlow object, here is my new patch: https://imgur.com/SJIKm3U 3. i recorded a quick video of the problem : https://streamable.com/zqs6k0 thanks for your help! Jo
    • May 20 2020 | 8:11 pm
      Jo, you should attach your patch as text rather than show pictures -- it's much easier/more efficient to debug. The stringFormat.js error is related to the 'mapButton' code you copied. Do a "find" (ctrl-f) in your patch for the words "stringFormat"...
      Do you have anything to confirm that your parameter mapping is actually working correctly? From the video it's not that obvious.
      If you "plan on monitoring the mute button" you will need to have a [live.observer]. Basically, a [live.object] mapped to a button allows you to (a) set the value of the button, (b) ask for the value of the button (c) lots of other things. [live.observer] is what you use when you want your code to _react_ to changes of the button status.
    • May 21 2020 | 8:55 am
      Hi Tyler, i was able to fix the stringFormat thing, it was hidden in a subpatch (didnt know there was such a thing, its the "p Mapping"), there are no errors left now, yay :D in the video i was trying to show that by pressing the round button next to the "trigger button" (which do the same thing) the metro will turn on/off (thats what the "metro" in the textbox is supposed to do, ive comformed that any other clyphx commands work as well) so far so good then when pressing the mute button of the track the round button will light up as if it was pressed but the clyphx command doesnt fire here is my patch, took a while to figure out that id have to mark all and click copy compressed, i was always looking for export options and such when trying to post this kind of code im only used to importing :)
      thanks a lot for your help :) Jo
    • May 21 2020 | 2:48 pm
      Sorry to be "that guy", but your patch does have [live.observer] (HINT: like the stringFormat.js you got them when you copied/pasted the "Mapping" code). And if you really just now learned what a subpatcher is perhaps your time would be better spent actually learning how to use Max before asking other people to debug your projects for you, or expecting their answers to be meaningful to you.
      I suspect if you study the [p Mapping] code a little more closely to try to understand how/why it works and you keep my first response in mind you'll be able to get your project working. It's a bummer the usual warning message doesn't get printed in the Max console in your case... its probably due to ClyphX not using the normal 'Max' channels to work its magic.
      Good luck.
    • May 22 2020 | 7:26 am
      Mh, i hoped this would be a "yea just put this there and it'll work" kind of problem since the button is lighting up but doesnt forward the signal, can you recommand some compact max tutorials?
    • May 22 2020 | 4:13 pm
      Take full advantage of all the built-in documentation. The Tutorials were how I learned ages ago. Find them in the Max app Reference window so that you can open the tutorial patches more easily, but they're also available on this site.
      Also, right-click on any object you're curious about and you can open either the 'Reference' page or its 'Help' file. The 'Help' files have lots of examples of how to use the objects and how they handle different messages/inputs. When something doesn't work and I don't understand why, I generally look back up the signal path and make sure I understand what every object in the chain is doing. With Max for Live in particular, Max includes a bunch of "abstractions" that are little pre-built patches for working with the LiveAPI. For instance [M4L.api.DeviceParameter]. You can both use these as building blocks and as lessons for learning how to code in Max by example... they have helpful comments in them, too. Learning how to use the critical [live.path] and [live.object] objects can be intimidating / confusing for a while, so I made this tool that tries to make it a little easier: https://maxforlive.com/library/device.php?id=4925
      ClyphX is really cool, but ClyphX is not helping your problem because it's hiding what's wrong. Here's a version of your patch which uses the Max way to toggle the metronome rather than ClyphX.
    • May 22 2020 | 4:22 pm
      Ok, ill start there and ill take a look at your m4l devices, thanks!
      the real idea wasnt to start the metronom, thanks for your patch anyway, im actually trying to map parameters to midi dynamicly and clyphx seemed to be the best option to do that
    • May 22 2020 | 5:00 pm
      Johannes, the point wasn't that it starts your metronome. I built and ran your pasted code so I hope you build and run what I pasted back.
    • May 22 2020 | 8:06 pm
      yea i did test your code now, and its the same problem again, when pressing the button with my mouse its working when trying to do this with the mute observer its not, am i dumb?
      EDIT: and even if it would work i kinda need cylphx to fire, but that doesnt seem to be the problem EDIT2: ah now there are some new error messages, ill check them first