Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Max for Live, reading the settings
#1
[ NOTE: this thread has changed from a question about reading settings into a working Max for Live MIDI Effect which will request all the current CC settings. Jump to post #9 for that juicy goodness, and then you'll also skip my silly floundering before Jesse put me on the right track ]

Hi there. Just started work on a NDLR CC control widget for Max for Live. Basically just wrapping Appendix A in a load of control knobs that send the appropriate CCs.

All good so far, sending CC's like a good 'un and messing with the automation that allows. But there's a bit of setup I'm struggling with - I want to get the initial values of the settings and pre-load them into the knobs so that there's no "jump to zero" when you connect to the NDLR (or the first time you turn a particular knob).

So, can I read the existing settings? If I'm being an idiot, feel free to set response to "Burn". I need to learn!

Thanks.
Reply
#2
(11-26-2020, 04:16 AM)robrain Wrote: Hi there. Just started work on a NDLR CC control widget for Max for Live. Basically just wrapping Appendix A in a load of control knobs that send the appropriate CCs.

All good so far, sending CC's like a good 'un and messing with the automation that allows. But there's a bit of setup I'm struggling with - I want to get the initial values of the settings and pre-load them into the knobs so that there's no "jump to zero" when you connect to the NDLR (or the first time you turn a particular knob).

So, can I read the existing settings? If I'm being an idiot, feel free to set response to "Burn". I need to learn!

Thanks.


To answer my own question, it looks like firmware 1.1.067 added that capability.
Reply
#3
Yes, you are correct that 1.1.067 added this functionality. There was some issue we ran into testing it with Scotty's I pad control surface that I can't quite remember, I believe it may have been that it is important to send the midi request on the NDLR Ctrl channel. Anyway let me know if you run into trouble and we can set aside a time to chat and try to sort it out.
Jesse
Reply
#4
(11-26-2020, 08:47 PM)Jesse Johannesen Wrote: Yes, you are correct that 1.1.067 added this functionality. There was some issue we ran into testing it with Scotty's I pad control surface that I can't quite remember, I believe it may have been that it is important to send the midi request on the NDLR Ctrl channel. Anyway let me know if you run into trouble and we can set aside a time to chat and try to sort it out.
Jesse

Hi Jesse, thanks for that.

A bit of work with MIDI monitor shows that the return messages only work with Port set to 4. So you can send the CCs to the NDLR Ctrl Channel on any port (I was using Port 1, Channel 15) but the results are only returned if you make the request to Port 4. So:

1. Set NDLR Ctrl channel as you wish (I use 15, as mentioned)
2. Send CC15 4
3. Send CC16 15 (or whichever you set in step 1)
4. Send CC17 99
5. Profit (sort of, Ableton doesn't see the returning CCs for some reason, but other monitors do).

Is my analysis correct, or is the problem actually typing this right now?

EDIT:

So Ableton and the Mac app MIDI Monitor (by SNOIZE) see the traffic on what they call "NDLR Port 2" - that's two rather than four. Whereas another Mac app, MIDI Loupe (by Gerald Flossman), sees the return traffic on what it calls NDLR Port 4. This is a mess. Here's a trace from MIDI Monitor (set to spy on other applications) showing the complete transaction:

15:31:54.095 To Port 1 Control 15 15 4
15:31:54.722 To Port 1 Control 15 16 15
15:31:55.395 To Port 1 Control 15 17 99
15:31:55.574 From Port 2 Control 15 26 0
15:31:55.574 From Port 2 Control 15 27 0
15:31:55.574 From Port 2 Control 15 57 1
15:31:55.574 From Port 2 Control 15 89 0
15:31:55.574 From Port 2 Control 15 69 1
15:31:55.574 From Port 2 Control 15 73 1
15:31:55.574 From Port 2 Control 15 74 1
15:31:55.574 From Port 2 Control 15 72 104
15:31:55.574 From Port 2 Control 15 68 0
15:31:55.574 From Port 2 Control 15 61 0
15:31:55.574 From Port 2 Control 15 62 0
15:31:55.574 From Port 2 Control 15 58 1
15:31:55.574 From Port 2 Control 15 59 0
15:31:55.574 From Port 2 Control 15 56 16
15:31:55.574 From Port 2 Control 15 41 0
15:31:55.574 From Port 2 Control 15 19 1
15:31:55.574 From Port 2 Control 15 18 3
15:31:55.574 From Port 2 Control 15 28 50
15:31:55.574 From Port 2 Control 15 29 1
15:31:55.574 From Port 2 Control 15 30 10
15:31:55.574 From Port 2 Control 15 31 2
15:31:55.574 From Port 2 Control 15 63 127
15:31:55.574 From Port 2 Control 15 67 1
15:31:55.574 From Port 2 Control 15 70 1
15:31:55.574 From Port 2 Control 15 85 0
15:31:55.574 From Port 2 Control 15 21 1
15:31:55.574 From Port 2 Control 15 20 2
15:31:55.574 From Port 2 Control 15 32 4
15:31:55.574 From Port 2 Control 15 33 1
15:31:55.574 From Port 2 Control 15 34 10
15:31:55.574 From Port 2 Control 15 86 0
15:31:55.574 From Port 2 Control 15 23 1
15:31:55.574 From Port 2 Control 15 22 0
15:31:55.574 From Port 2 Control 15 35 6
15:31:55.574 From Port 2 Control 15 36 8
15:31:55.574 From Port 2 Control 15 37 1
15:31:55.574 From Port 2 Control 15 38 1
15:31:55.574 From Port 2 Control 15 39 3
15:31:55.574 From Port 2 Control 15 40 8
15:31:55.574 From Port 2 Control 15 41 0
15:31:55.574 From Port 2 Control 15 42 1
15:31:55.574 From Port 2 Control 15 80 127
15:31:55.574 From Port 2 Control 15 66 75
15:31:55.574 From Port 2 Control 15 87 0
15:31:55.574 From Port 2 Control 15 25 1
15:31:55.574 From Port 2 Control 15 24 1
15:31:55.574 From Port 2 Control 15 43 6
15:31:55.574 From Port 2 Control 15 44 8
15:31:55.575 From Port 2 Control 15 45 2
15:31:55.575 From Port 2 Control 15 46 2
15:31:55.575 From Port 2 Control 15 47 3
15:31:55.575 From Port 2 Control 15 48 8
15:31:55.575 From Port 2 Control 15 49 0
15:31:55.575 From Port 2 Control 15 50 14
15:31:55.575 From Port 2 Control 15 65 127
15:31:55.575 From Port 2 Control 15 88 0

And the start of a similar trace on MIDI Loupe:

03:33:09:714: NDLR, Port 4, s: Port 4, d: Port 4, c: 15, Control message: 26, 0
03:33:09:716: NDLR, Port 4, s: Port 4, d: Port 4, c: 15, Control message: 27, 0
03:33:09:717: NDLR, Port 4, s: Port 4, d: Port 4, c: 15, Control message: 57, 1
03:33:09:717: NDLR, Port 4, s: Port 4, d: Port 4, c: 15, Control message: 89, 0
03:33:09:718: NDLR, Port 4, s: Port 4, d: Port 4, c: 15, Control message: 69, 1
03:33:09:718: NDLR, Port 4, s: Port 4, d: Port 4, c: 15, Control message: 73, 1

So which is right? Or which one gets the name right at least? MIDI Loupe says Port 4, which is cool, but Ableton (which for a Max for Live app writer is really the one true application) says Port 2.
Reply
#5
Jesse, you mentioned in the firmware forum that I might have only been monitoring port 4. Good theory Smile but sadly I was connected to all four ports. And the same is true for my experience with Port 2 in the message above. I'll do a completely detailed work through over the weekend, but I only had success in my previous experiments with CC15, 4, and I only got Ableton/MIDI Monitor to "see" anything on their "Port 2", which in NDLR's terms is "Port 4" (and which MIDI Loupe also describes as NDLR Port 4).
Reply
#6
TL;DR: on my NDLR, running 1.1.071, CCs15, 16 and 17 are not working as documented in the Beta firmware forum. Setting CC15 to 1 or 2 results in no output on any Port when CC17,99 is sent. Sending CC15,3 results in output, but on Port 1. CC15, 4 results in output on Port 2.

CC15 is documented as using 1-6 to represent the Port (which perplexes me a little, given the 4 Ports the NDLR is equipped with). :


Quote:Added:
      Three new CCs...
            CC 15 = set status Port (1-6) - MIDI port used to "send all" CC statuses 
            CC 16 = set status Channel (1-16) - MIDI channel used to "send all" CC statuses
            CC 17 = get status (99) - request for NDLR to "send all" CC statuses
            Note: CC 15 & 16 must be correctly set before CC 17 (99) will work

So then I tried CC 15 5. It results in output on Port 3. I was having so much fun at this point, I tried CC15 6 and it gave results on Port 4. In summary of the summary:

CC 15 1 -> NO OUTPUT
CC 15 2 -> NO OUTPUT
CC 15 3 -> OUTPUT ON PORT 1
CC 15 4 -> OUTPUT ON PORT 2
CC 15 5 -> OUTPUT ON PORT 3
CC 15 6 -> OUTPUT ON PORT 4

Is this the behaviour others see, or do I need to "fix" my NDLR/Ableton setup?

If this is the behaviour, should it be? It seems counterintuitive.

If it is the desired behaviour, should the docs be tweaked?


So here's my extremely noddy Max for Live device that sends the CCs. I use channel 15 for my NDLR Cntl (hence the CC16 15 call). You just press the buttons (one of the 15 set, then 16, then 17) and watch MIDI monitor (watching All Ins, All Channels). Ignore the midiparse/print path - it's for processing the CCs when I finally get a firm handle on how the CC15 works/is supposed to work. The destination for all my outgoing CCs (ie Ableton's MIDI To, in the track settings) was "NDLR (Port 1)", "Ch. 15". Changing the outgoing Port number had no effect on the results. Button 0, sending 15 0, was just for giggles. It returned results on Port 3, because 2020, I guess.

[Image: test_cc.png]

I can generate MIDI logs if wished. For 15,1 and 15,2 you just see the outgoing CCs15, 16, 17. For 3,4,5,6 you see returning CCs on Channel 15 of Ports 1,2,3,4 respectively.

I've attached the Max for Live MIDI Effect device. NOTE: I renamed it to a .txt file to fool the forum's upload rules, so sue me. More usefully, remove the ".txt" association and change the "_" underscore to a period ".". You should have a file called "NDLR CC Reader copy.amxd" at the end of that, which you can open in Max for Live. I make no warranties about the file, and take no responsibilities etc. etc. etc. etc.

EDIT: don't download this version, download v2 later in this thread. It's much better, honest


Attached Files
.txt   NDLR CC Reader copy_amxd.txt (Size: 15.92 KB / Downloads: 2)
Reply
#7
I figured out what the deal is: CC15 selects the Port, 1-6 where Port 1 and 2 are the 5 pin Din Ports A and B, so the numbers of the Ports are off by 2 versus the names. So if you want to send to USB Port 1, you need to send CC15 = 3. It does seem counter intuitive except that in every menu that is the order the Ports are listed, which makes it sort of intuitive sort of annoying. I think that solves this mystery for the moment.
I'll take a look at that Max plugin, it seems like it could be pretty handy. I think I have Max for live (I just bought Suite and I think it's included).
Thanks so much for sharing!
Best Regards,
Jesse
Reply
#8
(11-28-2020, 09:04 PM)Jesse Johannesen Wrote: I figured out what the deal is: CC15 selects the Port, 1-6 where Port 1 and 2 are the 5 pin Din Ports A and B, so the numbers of the Ports are off by 2 versus the names. So if you want to send to USB Port 1, you need to send CC15 = 3.  It does seem counter intuitive except that in every menu that is the order the Ports are listed, which makes it sort of intuitive sort of annoying. I think that solves this mystery for the moment.
I'll take a look at that Max plugin, it seems like it could be pretty handy. I think I have Max for live (I just bought Suite and I think it's included).
Thanks so much for sharing!
Best Regards,
Jesse

I am applying palm to face right now. I’m so USB-focused it never occurred to me to think of the DIN ports. Thanks for administering the clue stick Smile.

Have fun with the device. Note that that's not the "right" way to send multiple CCs, but it is the quick and dirty way and appropriate for test/debug stuff like this. And yes, M4L is part of Suite - that's how I've got it.
Reply
#9
Attached to this message is an improved version of the CC15,16,17 sender. It's slightly more idiomatic Max, plus it allows you to configure the Channel as well as the port (DIN or USB Smile ), via a dial-based UI:

[Image: NDLR_CC_Reader_v2.png]

You must be running firmware 1.1.067 or greater for this to work.

First save the attachment, rename it to end in .amxd, drag it to your User Library or somewhere Ableton can see it. Then:


  1. Add the device to a MIDI track of your choosing in Ableton
  2. Set the MIDI track's "MIDI To" to point to your NDLR Cntrl channel on a port of your choosing. 
  3. Setup a MIDI monitor somewhere to look at the returning data (I use, on a Mac, https://www.snoize.com/MIDIMonitor/)
  4. Twiddle the Port and Channel knobs to your heart's content
  5. Make sure your monitor is watching the Port and Channel you've selected
  6. Then click the three buttons in order from top-to-bottom.
  7. When you've done step 6 once, you just need to click "Send CC 17 99" to receive all the data again.
If you've done everything right, and for the sake of argument used the same settings as I did in the screen grab, you'll get something like this in your monitor:



Code:
19:23:35.708 To Port 1 Control 15 15 4
19:23:36.625 To Port 1 Control 15 16 9
19:23:38.448 To Port 1 Control 15 17 99
19:23:38.655 From Port 2 Control 9 26 0
19:23:38.655 From Port 2 Control 9 27 0
19:23:38.655 From Port 2 Control 9 57 1
...

Now go and lookup CC 26 in Appendix A, then CC 27, then CC 57. They seem to emerge broadly in the order that they're listed in the Appendix. You sometime have to do some difficult maths (eg adding 1) to get the "real" value. For example, my NDLR after a factory reset is set to Chord Degree 1 (26 0), Triad Type (27 0). You quite often have to look in the Beta Firmware thread and the latest released version of the manual to get the correct settings. CC 57 is a good example since there are more than the two choices that manual version 1.7 describes and the values given are incorrect.

This is going to be the basis of my NDLR Control modules, coming soon. I'll use the output of this to pre-load my interface so it reflects reality on your NDLR at the time of loading. The modules will then let you automate (or just twiddle with Ableton knobs) pretty much any of the CCs listed in Appendix A of the manual. And thereby mean that you don't need to do the boring looking up in the manual that I just described. There's some preliminary discussion of the modules in this post: https://conductivelabs.com/forum/showthr...89#pid3089


Attached Files
.txt   NDLR CC Reader v2_amxd.txt (Size: 9.13 KB / Downloads: 4)
Reply


Forum Jump:


Users browsing this thread:
4 Guest(s)