• atux

    @oid said:

    pd is very easy to build from source

    I managed to build pd 0.54.0 from sources:

    ./autogen.sh
    ./configure --enable-jack
    make
    sudo make install
    

    As you can see, I solved the missing jack issue by adding: --enable-jack
    Now jack is listed in Media menu, it works fine.

    Bye,
    a.

    posted in technical issues read more
  • atux

    @oid said:

    connect the [loadbang] directly to the [symbol $1/images/*(

    In /home/j/pd24 there is the patch.
    In /home/j/pd24/images I put an image called 60.png

    I connected my MIDI keyboard to pd 0.52.1 and played the C note (which corresponds to MIDI pitch 60), as can be seen from the number box I placed:
    images.png
    Should the 60.png file open?
    Nothing happens and in the pd console it writes:

    bad arguments for message 'open' to object 'pic'
    

    I had already installed the else library and the relative paths had also been inserted correctly in pd. What does that question mark represent in the patch?
    Any tips?

    [pd .52.1 on Linux]
    Thank you,
    a.

    posted in technical issues read more
  • atux

    @oid said:

    0.54,

    I had tried pd 0.54, but it doesn't have the jack option in Media menu (or at least I didn't find it).
    For this reason I use 0.52.1.

    How can I modify the patch for use it in pd 0.52.1?

    Thank you,
    a.

    posted in technical issues read more
  • atux

    @seb-harmonik.ar said:

    testpng.pd

    Hi, a perhaps trivial question:
    in [file patchpath] how should the path be written?
    I've tried various combinations, but it stays dotted.

    The patch and the "Images" folder are in:
    /home/j/pd24

    [pd 0.52.1 on Linux]
    Thank you,
    a.

    posted in technical issues read more
  • atux

    Hi,

    I have a patch where I use 8 audio channels in output. Every time I open it, I have to go to puredata-audio settings and manually change the number of channels (which by default is 2) to 8.
    I would like this setting to be done automatically when I open the patch.
    I tried with this:
    channels.png
    but it doesn't work.

    Some tips?
    [pd 0.52.1 on Linux]

    Thank you,
    a.

    posted in technical issues read more
  • atux

    A real AI should be able to do this:

    I input an audio file (of any musical instrument, noise, etc...), for example a held note from a particular pipe organ inside a particular architecture, or a large stone thrown into the water, and I ask to build me a puredata patch that perfectly simulates that sound.
    Obviously I don't want the AI ​​to go looking for a pre-made patch without modifying it, otherwise I'll find it myself, I want the AI ​​to create it from scratch and perfectly.
    Can we reach these levels?

    a.

    posted in Off topic read more
  • atux

    Hi,

    suppose I have an object that has an audio signal in output. Apart from sending it to a [dac] and listen, what is the easiest and fastest way to understand if it is working? That is, a way to test if it actually sends something in output?

    Thank you,
    a.

    posted in technical issues read more
  • atux

    I solved!
    One of the initial steps was installing opencv-python:

    $ pip install opencv-python==4.5.5.64
    

    I looked for the latest version of opencv-python, which is 4.9.0.80, and tried to install that:

    $ pip install opencv-python==4.9.0.80
    

    Now it works.

    a.

    posted in technical issues read more
  • atux

    @alexandros said:

    Well, this concerns the Python script, that's why I wrote that it's not Pd related. Never mind though. What's output_socket in your code? What does it try to connect to? Did you try to print your HOST "macro"?

    I don't know anything about what you're asking me...:smile:
    ...I don't know Python. Anyway this code should connect the webcam with puredata, to detect movements and translate them into sounds.

    a.

    posted in technical issues read more
  • atux

    @alexandros said:

    This is not Pd related as it concerns Python. Nevertheless, what's on line 32 in your script? The error message concerns this line where a connection you are trying to establish fails.

    line 32:

    output_socket.connect((HOST, OUTPUT_PORT))
    
    

    webcam_synth.py

    @alexandros

    This is not Pd related as it concerns Python.

    If I'm in the wrong section of the forum, I apologize for that.

    posted in technical issues read more
  • atux

    Hi,

    I'm trying to use this Theremin simulation in puredata, with the use of the webcam.
    I have installed everything it requires. But...when I run the python script, it gives me this error:

    $ python ./webcam_synth.py
    Traceback (most recent call last):
      File "/home/me/Download/webcam-theremin-main/./webcam_synth.py", line 32, in <module>
        output_socket.connect((HOST, OUTPUT_PORT))
    ConnectionRefusedError: [Errno 111] Connection refused
    
    

    At the beginning of the script there are these input/output:

    INPUT_PORT = 6000
    OUTPUT_PORT = 6001
    HOST = socket.gethostname()
    

    perhaps they need to be changed?

    With lsusb, my integrated webcam should be this::

    Bus 002 Device 003: ID 04f2:b483 Chicony Electronics Co., Ltd USB2.0 VGA UVC WebCam
    

    Some advice?
    [Pure Data 0.52.1 on Ubuntu 22.04]

    Thank you,
    a.

    posted in technical issues read more
  • atux

    @oid said:

    [...] I use multiple instances of [command].
    Untitled.png

    I tried modifying my patch above by removing the delay and putting the [command] in series, like in your example:
    xdotool_multiple.png
    xdotool_multiple.pd

    ...but it does not work. Instead from the terminal, with &&, it works.

    For your problem, [...] Have you tried having it click twice?

    Regarding my problem, I solved it like this:
    in some GUI, where something happens when you click inside with the mouse (a simple click), for the click to take effect, in puredata you need to replace "click 1" with "mousedown 1":

    [exec xdotool mousedown 1(
    

    Then it's like when I click the mouse (a simple click) inside the window, the event happens. I do not know why, but...it works.

    So my opening question is solved. Now I need to see what happens with more complex patches.

    Thank you,
    a.

    posted in technical issues read more
  • atux

    I think I found the problem.

    This is my test.
    I divide the display into two parts:

    -on the left there is Pencil2D (a simple drawing app)
    -on the right there is the Pure Data patch

    c04.png
    xdotool_test3.pd

    By clicking on the bang in pd, a circle is drawn in Pencil2D, at the point of desired (x,y) coordinates.
    Very nice.
    Note: it also works without the "Windows id" (which isn't there).

    So, this happens:

    in puredata: it works only introducing a delay > 100ms between "mouse move" and "mouse click". With a delay <100ms it doesn't work.

    But...running directly from terminal it also works without delay:

    me:~$ xdotool mousemove 600 400 && xdotool click 1
    

    ...a circle is drawn istantly, without delay.
    How do you explain that in puredata I have to insert a delay > 100ms?

    Now, the problem is that...trying with other windows of other "non-drawing" programs, it doesn't always work: the click doesn't always have an effect. I have to understand why. Yet the arrow moves and the arrival window is highlighted (therefore it is active), but the click has no effect.

    @oid : about your patch "cursor.pd", I wasn't able to use it for my purpose, but it's so cool... I didn't know it could be done, beautiful.

    Bye,
    a.

    posted in technical issues read more
  • atux

    @oid said:

    Using [command] and xdotool [...]

    Yes! It works fine in pd.
    This move the mouse cursor to (120, 70):

    [exec xdotool mousemove 120 70( ---- [command]

    And this make a click:
    c01.png
    A double click:
    c02.png
    But...there is a problem: the "click" has no effect inside the window (of another app).
    As you were saying, the cursor needs to know "which" window needs to be activated.
    The command should be this one that I added in the middle:
    c03.png
    xdotool_test.pd
    Note: 0x4c00006 is the "Window id" I copied from the target window information obtained with xwininfo.
    Any tips?
    I will do further tests.

    Thank you,
    a.

    posted in technical issues read more
  • atux

    Thank you, it seems to work.
    But I have some clarifications to ask: I would expect to see the mouse pointer move.
    In fact my intent was to "take over" the mouse cursor (by pd) to "click" in the GUI of any other application other than pd, for example a drawing program, opened in parallel on the same computer. An example case: in the right half of the display there is the pd patch, in the left half the GUI of the other application (of any kind). The mouse should go to the left half and click.
    It can be done?

    Thank you,
    a.

    posted in technical issues read more
  • atux

    Hi,

    on Linux, how can I create a pd patch where there are 2 number boxes and 1 bang, so I can do this:

    1. Positioning the mouse [using (x,y) coordinates in 2 number boxes]

    2. Mouse's left click [using a bang]

    I use a 1366x768 display.

    Thank you,
    a.

    posted in technical issues read more
  • atux

    @FFW said:

    If you update your Pd to 0.54 [...]

    Thank you.
    I recently installed pd 0.54.1 (from the site, "Ubuntu" section):

    sudo add-apt-repository ppa:pure-data/pure-data
    sudo apt update
    

    and then I installed it with Synaptic on my Ubuntu Jammy 22.04.

    ...but... the jack is missing in the "Media" menu! ...and without jack I don't do anything...
    So I went back to 0.52.1

    a.

    posted in technical issues read more
  • atux

    I would like to separate the audio into n separate channels , with n very large (here I've put only a few to simplify).
    This is the solution for now:
    04.png
    I was wondering if that's the easiest way to do this, or if there is a simpler way using variables.

    a.

    posted in technical issues read more
  • atux

    Hi,

    this situation works well:
    01.png
    But...if I want to avoid all the connections, for example if I have a very large number of audio outputs a1, a2, a2, ..., an, is there a simplified scheme like the one below (which obviously doesn't work)?
    02.png
    Thank you,
    a.

    posted in technical issues read more
  • atux

    @whale-av said:

    @atux You seen to have a problem with paths..... maybe you have had numerous versions of Pd installed in different places.....

    A question: does your patch need mrpeach to work?
    If not, the "Play" command still has no effect on Ardour 8.1 (opened in parallel with puredata).
    Can anyone who uses Ardour on Linux try thas patch and tell me if it works? So I can understand if maybe it's a problem with my system, and it doesn't depend on the patch.

    About mrpeach, however, I haven't solved it yet. I tried to uninstall all the versions of pd I had, purging everything completely, including purr-data and all libraries. I installed 0.54.0 version as explained on the site ("Ubuntu" section), but ...incredibly... the "jack" option is missing in the "Media" menu...!
    So I uninstalled it and I went back to 0.52.1. But the mrpeach problem remains (and I don't understand why...), I tried to do as in the link you gave me. Nothing, for now I haven't solved it.
    Is mrpeach a necessary and fundamental library?

    Thanks,
    a.

    posted in technical issues read more
Internal error.

Oops! Looks like something went wrong!