[PD] Pd complete listing of internal Pd messages? - sending to the Pd window

Ingo ingo at miamiwave.com
Sat Apr 15 18:24:32 CEST 2023


Hi Roman,

after getting the [netpd-mutex] abstaction in place everything is working 
fine.
Cool!

I'll have to make a few changes for my usage though.

-  I need to have numbers and not symbols coming from the menu output.
   (menus like MIDI program banks will change when banks change or when 
presets are reprogrammed, changed or moved.
   It's complicated enough to get the menus updated reliably after bank 
changes or changes of the MIDI channel.)

-  the dropdown menus need to be local since I have quite a few of them in a 
single patch. So an outlet instead of a $0-send will most likely be required.
   Unless I come up with a simple strategy to let the menu-triggering part 
know the $0 value of each connected dropdown menu.
   Seems more complicated than adding an outlet - especially since my code is 
written for [pmenu] which does have an inlet and outlet.

-  I need multiple definable columns since displaying 128 MIDI programs needs 
4-5 columns to fit on the screen.
   I didn't see anything so far . . . (I might have missed a number of things 
so far, though.)

-  I'll probably have to synchronize the hight and width with the font size to 
have only a single number change instead of three.
   Since there is no font change option it looks like it should be 
predictable. The names are limited to 14 characters.

I'm not sure if placing large dropdown menus always on the screen to be fully 
visible has been taken care of.
On [pmenu] this seems to work on AMD machines it but does not work on Intel or 
Arm units.
On large menues the part on the right or bottom is often outside of the 
screen. The AMD machines always move the menu inside of the screen.
Unfortunately I'm using mostly Intel and Arm.


Since the [netpd-gui-dropdown] is an abstraction it shouldn't be a big issue 
unless I'll run into problems with the "data structures" part.
I have never used data structures so far. I guess this will be the time to 
start getting going with it . . .
I'm suspecting that implementing multiple settable columns could require 
messing with data structures.


It would have been nice to simply find out the name of the Pd console for 
sending internal Pd messages until I get done with all of it.
Until then the software is probably not going to be usable with small screens 
for a while. Oh well . . .
(My users don't have access to the regular Pd gui - it's a hardware box with a 
dedicated user interface for non-programmers.)

Ingo



-----Original Message-----
From: Pd-list [mailto:pd-list-bounces at lists.iem.at] On Behalf Of Roman Haefeli
Sent: Friday, April 14, 2023 8:43 PM
To: pd-list at lists.iem.at
Subject: Re: [PD] Pd complete listing of internal Pd messages? - sending to 
the Pd window

On Fri, 2023-04-14 at 17:39 +0200, Ingo wrote:

> I tried  the netpd-gui-dropdown . . .
> I installed netpd and the latest Pd vanilla.

Actually, you don't need a full netpd installation for [netpd-gui- dropdown] 
to work. I thought it is a standalone abstraction and forgot
about:

> except for [netpd-mutex MXDROPDOWN].

that is just another abstraction to make sure that at most one instance of 
[netpd-gui-dropdown] is active. [netpd-gui-dropdown] still works without it, 
but user experience can get messy if many overlapping dropdown are active.


> This has probably to do with the fact that I just created the help
> patch on the Desktop of my Windows machine where no externals are
> registered.

Of course - like with any other abstraction - you need to put it somewhere 
where your patch finds it. Or tell your patch where to find it with 
[declare -path <path-to-folder-containing-abstraction>]

>
> Looks pretty good and configurable.
> However, I did not see how to get a value from clicking on a menu
> item.

There is no outlet, the communication works through a send/receive symbol 
specified by first argument.


[netpd-gui-dropdown $0.mydropdown]

[r $0.mydropdown]
|
[route selected]
|
[print] <- print what you selected with [netpd-gui-dropdown]


> Maybe it has to do with the missin [netpd-mutex MXDROPDOWN].

No.

> I could also not get any colors to change so far - only grey and black
> atm.

Send a message like 'select_box_color 800' to it. Please note that color 
values use data structures color encoding:
  800 = red
   80 = green
    8 = blue


> I'll have to keep checking it out a bit further.

Also note, that when you increase the font size, you might need to increase 
the height as well, like

[fontsize 16, height 20(
|
[s $0.mydropdown]


Roman







More information about the Pd-list mailing list