Re: [PD] Patch change via midi

2021-01-22 Thread Andrew Lyons
Ah. Ok. Thank you gentlemen. I will explore switch~.

Cheers

On Fri, Jan 22, 2021, 5:37 PM Alexandre Torres Porres 
wrote:

> Em sex., 22 de jan. de 2021 às 20:20, Andrew Lyons 
> escreveu:
>
>> Alternatively, I was wondering if it was possible to load a different
>> patch upon input of a certain midi program change?
>>
>
> you can use special pd messages to open patches and stuff, but what you'd
> rather do is have them all  opened and activate the one you want (with
> [swicth~]) via a program change setting
>
___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list


Re: [PD] Patch change via midi

2021-01-22 Thread Alexandre Torres Porres
Em sex., 22 de jan. de 2021 às 20:20, Andrew Lyons 
escreveu:

> Alternatively, I was wondering if it was possible to load a different
> patch upon input of a certain midi program change?
>

you can use special pd messages to open patches and stuff, but what you'd
rather do is have them all  opened and activate the one you want (with
[swicth~]) via a program change setting
___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list


Re: [PD] Patch change via midi

2021-01-22 Thread Dan Wilcox
Try [switch~] to turn off dsp in the subpatch(es) ala:

[ 0 (
|
[switch~]

You might need to add a small delay and ramp to avoid clicking.

> On Jan 23, 2021, at 12:19 AM, pd-list-requ...@lists.iem.at wrote:
> 
> Message: 4
> Date: Fri, 22 Jan 2021 15:11:22 -0800
> From: Andrew Lyons mailto:tstext...@gmail.com>>
> To: Pd-List mailto:pd-list@lists.iem.at>>
> Subject: [PD] Patch change via midi
> Message-ID:
>>
> Content-Type: text/plain; charset="utf-8"
> 
> Hi,
> 
> I have a headless raspberry pi that boots into a PD patch I created. (I
> control it with a midi wind controller and an FCB 1010 midi foot
> controller.) I have observed that bypassing certain sections of the patch
> with MIDI signals generated by the foot pedal board does not actually stop
> those sections of the patch from processing, and using CPU bandwidth.
> 
> I was wondering if it was possible to cease processing sections of a patch
> somehow? Maybe by stopping a sub-process or something? Alternatively, I was
> wondering if it was possible to load a different patch upon input of a
> certain midi program change?
> 
> Thanks!


Dan Wilcox
@danomatika 
danomatika.com 
robotcowboy.com 



___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list


Re: [PD] Patch change via midi

2021-01-22 Thread Christof Ressi
I was wondering if it was possible to cease processing sections of a 
patch somehow?

Have a look at the [switch~] object ;-)

On 23.01.2021 00:11, Andrew Lyons wrote:

Hi,

I have a headless raspberry pi that boots into a PD patch I created. 
(I control it with a midi wind controller and an FCB 1010 midi foot 
controller.) I have observed that bypassing certain sections of the 
patch with MIDI signals generated by the foot pedal board does not 
actually stop those sections of the patch from processing, and using 
CPU bandwidth.


I was wondering if it was possible to cease processing sections of a 
patch somehow? Maybe by stopping a sub-process or something? 
Alternatively, I was wondering if it was possible to load a different 
patch upon input of a certain midi program change?


Thanks!

___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list
___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list


[PD] Patch change via midi

2021-01-22 Thread Andrew Lyons
Hi,

I have a headless raspberry pi that boots into a PD patch I created. (I
control it with a midi wind controller and an FCB 1010 midi foot
controller.) I have observed that bypassing certain sections of the patch
with MIDI signals generated by the foot pedal board does not actually stop
those sections of the patch from processing, and using CPU bandwidth.

I was wondering if it was possible to cease processing sections of a patch
somehow? Maybe by stopping a sub-process or something? Alternatively, I was
wondering if it was possible to load a different patch upon input of a
certain midi program change?

Thanks!
___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list


Re: [PD] Get IP from Pd + network broadcast

2021-01-22 Thread Roman Haefeli
On Fri, 2021-01-22 at 23:14 +0100, Christof Ressi wrote:
> > [netreceive] reports the source address for received data only
> > for TCP connections, but not for UDP
>  [netreceive -u -f] works just fine for me on Pd 0.51 ;-)

Ah, the -f flag. Thanks for correcting me!

Roman


signature.asc
Description: This is a digitally signed message part
___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list


Re: [PD] Get IP from Pd + network broadcast

2021-01-22 Thread Christof Ressi

[netreceive] reports the source address for received data only
for TCP connections, but not for UDP

[netreceive -u -f] works just fine for me on Pd 0.51 ;-)

Christof

On 22.01.2021 22:52, Roman Haefeli wrote:

Hi João


On Fri, 2021-01-22 at 19:41 +0100, João Pais wrote:

I wanted to check if there are any new methods to get one's own ip
from Pd - that is, so that a user doesn't go check the system
settings.

I need that, too, and I can't wrap my head around figuring out how to
do it. Using a [shell]-like solution would require different scripts
for each platform. Also, "knowing" the IP address is not that trivial:
A computer might have many physical network interfaces (ethernet and
wlan) and a localhost interface and even has more when hosting virtual
machines and VPN is configured, etc. I count 10 addresses on my laptop.
So, which is the one you're interested in?

Usually, it's the other party (that you're connecting to) that knows.
For a specific connection, the other party knows the address that is
interesting in the context of that particular connection. In Pd
vanilla, [netreceive] reports the source address for received data only
for TCP connections, but not for UDP. iemnet's [udpreceive] will tell
you the sender, though.

There is no deterministic way to define your own address. Depending on
the destination, packets might be routed differently and thus the
source address will be different. If you know the destination address,
you could parse the routing table and deduce the (your) source address
from it.



It would be necessary for all windows, macos and linux. Older
messages talk
about using [shell] in unix systems, and some hack with a batch file
in
windows. If this is still the current method, how would one activate
a
batch file in windows from inside pd?


As my knowledge of network isn't that good, just to check: to send a
broadcast message for all peers in the same network, is the correct
IP
e.g. xxx.xxx.xxx.255?

Depends on the kind of subnet. If your netmask is 255.255.255.0, then
yes. But networks can be of any size and depending on the size, the
broadcast address of that network might be a different one. The IP-
Address in a local network is divided in a network-prefix and host
part. You see often addresses specified in CIDR notation, for example:
192.168.50.244/24. The '24' means that the first 24 bits of the address
are the network prefix, and the remaining 8 bits is the host part. For
getting the broadcast address of a given subnet, you set all bits of
the host part to 1, which results in x.x.x.255 for a /24 network.


  I read somewhere that 255.255.255.255 was also for
broadcast, but since it's not working I imagine I read wrong.

It's the broadcast address of the 0.0.0.0/0 subnet, a.k.a the whole
IPv4 internet. However, routers do not pass broadcast message from
local network to the internet. But at my home, I can send messages to
all my devices using this address.

Note: it works only with shoot-and-forget protocols like UDP, but not
with connection-aware protocols like TCP.

Also, I'm not sure if all routers pass on such messages.

Resuming: to send a broadcast message in the network, it's necessary
to
know the first 3 parts of one's IP?

In my experience not. Just use 255.255.255.255

Roman

___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list
___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list


Re: [PD] Get IP from Pd + network broadcast

2021-01-22 Thread Roman Haefeli
On Fri, 2021-01-22 at 22:52 +0100, Roman Haefeli wrote:
> Hi João
> 
> 
> On Fri, 2021-01-22 at 19:41 +0100, João Pais wrote:
> > I wanted to check if there are any new methods to get one's own ip
> > from Pd - that is, so that a user doesn't go check the system
> > settings.
> 
> I need that, too, and I can't wrap my head around figuring out how to
> do it. 

Oh, my... João just pointed me to an old thread [1] about the same
topic. The thread ended into iemnet adding support for reporting local
address for [tcpclient] and [udpclient]. That is exactly what I need.

About the long sermon from my previous mail: It's only hard to know
_before_ you connect. When connected, it's quite clear.

@João, if you're using iemnet's [udpclient] or [tcpclient], use the
fourth outlet and [route local_address].

Roman

[1]
https://lists.puredata.info/pipermail/pd-list/2017-12/121209.html


signature.asc
Description: This is a digitally signed message part
___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list


Re: [PD] Get IP from Pd + network broadcast

2021-01-22 Thread Roman Haefeli
Hi João


On Fri, 2021-01-22 at 19:41 +0100, João Pais wrote:
> I wanted to check if there are any new methods to get one's own ip
> from Pd - that is, so that a user doesn't go check the system
> settings.

I need that, too, and I can't wrap my head around figuring out how to
do it. Using a [shell]-like solution would require different scripts
for each platform. Also, "knowing" the IP address is not that trivial:
A computer might have many physical network interfaces (ethernet and
wlan) and a localhost interface and even has more when hosting virtual
machines and VPN is configured, etc. I count 10 addresses on my laptop.
So, which is the one you're interested in?

Usually, it's the other party (that you're connecting to) that knows.
For a specific connection, the other party knows the address that is
interesting in the context of that particular connection. In Pd
vanilla, [netreceive] reports the source address for received data only
for TCP connections, but not for UDP. iemnet's [udpreceive] will tell
you the sender, though.

There is no deterministic way to define your own address. Depending on
the destination, packets might be routed differently and thus the
source address will be different. If you know the destination address,
you could parse the routing table and deduce the (your) source address
from it.


> It would be necessary for all windows, macos and linux. Older
> messages talk 
> about using [shell] in unix systems, and some hack with a batch file
> in 
> windows. If this is still the current method, how would one activate
> a 
> batch file in windows from inside pd?
> 
> 
> As my knowledge of network isn't that good, just to check: to send a 
> broadcast message for all peers in the same network, is the correct
> IP 
> e.g. xxx.xxx.xxx.255?

Depends on the kind of subnet. If your netmask is 255.255.255.0, then
yes. But networks can be of any size and depending on the size, the
broadcast address of that network might be a different one. The IP-
Address in a local network is divided in a network-prefix and host
part. You see often addresses specified in CIDR notation, for example:
192.168.50.244/24. The '24' means that the first 24 bits of the address
are the network prefix, and the remaining 8 bits is the host part. For
getting the broadcast address of a given subnet, you set all bits of
the host part to 1, which results in x.x.x.255 for a /24 network.

>  I read somewhere that 255.255.255.255 was also for 
> broadcast, but since it's not working I imagine I read wrong.

It's the broadcast address of the 0.0.0.0/0 subnet, a.k.a the whole
IPv4 internet. However, routers do not pass broadcast message from
local network to the internet. But at my home, I can send messages to
all my devices using this address.

Note: it works only with shoot-and-forget protocols like UDP, but not
with connection-aware protocols like TCP.

Also, I'm not sure if all routers pass on such messages.
> 
> Resuming: to send a broadcast message in the network, it's necessary
> to 
> know the first 3 parts of one's IP?

In my experience not. Just use 255.255.255.255

Roman


signature.asc
Description: This is a digitally signed message part
___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list


Re: [PD] Get IP from Pd + network broadcast

2021-01-22 Thread Christof Ressi

Hi,

I wanted to check if there are any new methods to get one's own ip 
from Pd 

Are you talking about the local IP address or your public IP address?

I read somewhere that 255.255.255.255 was also for broadcast, but 
since it's not working I imagine I read wrong. 
255.255.255.255 is indeed the broadcast address. What is not working? 
Which Pd version? Which network objects? Broadcast works just fine for 
me with [netsend -u] in Pd 0.51 on Windows 7.


Note that broadcast/multicast can only be used for local networks. Also, 
for p2p communication over the internet you need 
https://en.wikipedia.org/wiki/UDP_hole_punching.


And final question: besides netpd, are there any known public patches 
where users from several networks can connect to and send/receive data? 

Are talking about local networks or the internet?

Shameless plug: The next (pre)release of "aoo" will allow sending 
arbitrary OSC messages over the internet. It has methods for sending 
messages to individual peers and also "broadcast" messages to all 
connected peers. Hopefully I manage to release it soon... It's way 
overdue :-/


Christof

On 22.01.2021 19:41, João Pais wrote:

Hi list,


I wanted to check if there are any new methods to get one's own ip 
from Pd - that is, so that a user doesn't go check the system 
settings. It would be necessary for all windows, macos and linux. 
Older messages talk about using [shell] in unix systems, and some hack 
with a batch file in windows. If this is still the current method, how 
would one activate a batch file in windows from inside pd?



As my knowledge of network isn't that good, just to check: to send a 
broadcast message for all peers in the same network, is the correct IP 
e.g. xxx.xxx.xxx.255? I read somewhere that 255.255.255.255 was also 
for broadcast, but since it's not working I imagine I read wrong.


Resuming: to send a broadcast message in the network, it's necessary 
to know the first 3 parts of one's IP?



And final question: besides netpd, are there any known public patches 
where users from several networks can connect to and send/receive data?



Best,

jmmmp




___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list




___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list


[PD] Get IP from Pd + network broadcast

2021-01-22 Thread João Pais

Hi list,


I wanted to check if there are any new methods to get one's own ip from 
Pd - that is, so that a user doesn't go check the system settings. It 
would be necessary for all windows, macos and linux. Older messages talk 
about using [shell] in unix systems, and some hack with a batch file in 
windows. If this is still the current method, how would one activate a 
batch file in windows from inside pd?



As my knowledge of network isn't that good, just to check: to send a 
broadcast message for all peers in the same network, is the correct IP 
e.g. xxx.xxx.xxx.255? I read somewhere that 255.255.255.255 was also for 
broadcast, but since it's not working I imagine I read wrong.


Resuming: to send a broadcast message in the network, it's necessary to 
know the first 3 parts of one's IP?



And final question: besides netpd, are there any known public patches 
where users from several networks can connect to and send/receive data?



Best,

jmmmp




___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list


Re: [PD] Preset management for Pd Vanilla

2021-01-22 Thread Alexandre Torres Porres
Em sex., 22 de jan. de 2021 às 01:35, Alexandre Torres Porres <
por...@gmail.com> escreveu:

> There's the "morphing" or "interpolation" thing that I may be
> still neglecting and thinking that using things "line" objects is just as
> fine, but let's see. I'll also look into how max does interpolation,
> someone already told me that, I think I have an idea for that too.
>

I neglected the fact that [line] doesn't work with lists :) so I created an
object that does it called [morph]. Hence, this takes care of preset
transitions. I don't think it's necessary to put this feature inside the
preset object as it makes it more complicated and in the end it's good this
is a separate object as it's also useful outside the preset system and can
be used on its own to morph into different arrays and stuff.

I'm doing something similar for interpolation, with another object to allow
one to manually interpolate between values and lists of values, also
incorporating that feature from Max. This should all be up in my repository
this weeked.

cheers

>
___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list