• 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

Internal error.

Oops! Looks like something went wrong!