• cfry

    @oid how can I change the save directory of [command]? I would like to have all log recordings in a folder (log-recs).
    I tried with the new [file cwd] object but that doesn't seem to work.

    posted in technical issues read more
  • cfry

    @oid Thank you, I used the third version (which outputs only the last request). Seems to work fine.

    A thought/question: First I tried to have all messages to all motors of the robot to be sent through a single pd [command] object. This did not work that well since messages was blocked/cancelled because [command] was not keeping up. When I used a separate instance of [command] for each channel I was sending on it worked better. This leads me to think that you could send through command at a higher speed if you had several [command] objects that you cycle through. I have no need for this here but I just want to understand how [command] works.

    Another thought- when you do these nice examples/abstractions maybe you could add some comments in the patch too? I can figure out what is happening but I think it would be very beneficial for other ppl browsing and maybe make it more likely that others can take part of what we come up with. If it is not too much extra work for you, hit command+5 and throw in a few words?

    Cheers! Good job with the procrastination! ;)

    posted in technical issues read more
  • cfry

    @oid no we didn't since it was assumed that I would put the project on a raspberrypi and this error seemed to be mac osx specific. It turned out that I used a macmini in the end because my (other) code was bloated and I did not have the time to clean it up and be efficient enough for my raspberrypi. Eventually it will be transferred to a rpi.

    But I am curious about that [loadbang] to [dirty 1( to canvas. Never heard of it, how does it work?

    posted in technical issues read more
  • cfry

    @oid a version of logger-sane.pd above of this ended up in an installation, and it seems to have worked pretty good, I still have not have had time to look at the last data recorded but it seems to be solid. The only bugger is that if you try to quit Pd with logger/[console] still running Pd will freeze. So if you accidentally hit cmd+q you will loose all edits since last save. But that is only a problem when working with it, not when it is installed and running. So thanks a lot for all the input, it has been a great help. When I get the chance I will start to experiment with using the data to dynamically change the synthesis configuration of the system.

    Cheers

    posted in technical issues read more
  • cfry

    It works fine now, thank you for the support!

    Quick proof of concept, triggering individual channels with sound:
    https://www.instagram.com/p/C2z_v_7iZZt/

    I get constant error messages in Pd console from command saying "old process is still running". Probably [console] should be handled a bit different, but it works anyway so all good. Probably [netsend] streaming control data over a socket-channel would be the best solution if it needs to be rock solid.

    Cheers & thanks

    posted in technical issues read more
  • cfry

    @whale-av thank you so much. I have contact with the devs but I try to wait asking for favours until I have a decent understanding... as I do not want to strain you guys too much either... its a balancing act.

    Unfortunately mrpeach is not available through deken, says "no matching packages for your architecture". Im on a Mac M2 with 12.5.1 Monterey that comes with the robot.

    Status at the moment:

    I can trigger from the browser and from terminal/zsh with curl.

    I have not managed to get [netsend] to work. Tried some combinations with list and symbol. If using tcp I lock out terminal and browser triggering on that port/socket(?) (8000) . Using [netsend -u] (UPD) allows me to continue using terminal/zsh or the browser for triggering. My conclusion is that it would work if could format the message in the right way. But I do not know how the message looks when/if it arrives at the Ikaros WebUI. Can I monitor this in some way?


    Now I will try using [command] to see if that works.

    EDIT:
    This works!! thanks @oid for getting me into [command]!

    command-curl.png

    Now the next step will be to try to control parameters.


    My goal is to be able to change the slider parameters of the robot/web ui from Pd by some sound process on the same computer locally. So no plans for connecting over internet at the moment.

    posted in technical issues read more
  • cfry

    @rg.kies thanks, Ill explore this tomorrow when I get my hands on the robot again. However I suspect this seems more complicated than it is since I am not sure of the procedure. Below is the github with instructions. Probably better to read that to understand what I am trying to do. I think what I want to achieve in the end is a socket connection from Pd to the robot (web) control interface.
    Look here plz: https://github.com/birgerjohansson/Epi/wiki/Additional-instructions

    Since I probably have to do this on another computer, the less libraries I have to install the better. Its a hassle with secure Internet connections and so forth.

    Thank you so much.

    posted in technical issues read more
  • cfry

    @FFW thanks. That works sort of but since the browser pops up and create a new tab each time it is not functional in this case. But good to know.

    Is there a way to send HTTP request from Pd in some manner without going throw the browser, even if [netrecieve] is not suitable? I would have guessed that it was just a formatting problem.

    posted in technical issues read more
  • cfry

    @cfry said:

    Thanks for replying.

    if I want to send this command through [netsend]

    
    http://127.0.0.1:8000/command/SR.trig/1/0/0
    
    

    How should it look in Pd/[netsend]?

    I can open the connection with [connect localhost 8000(

    but sending

    [list command/SR.trig/1/0/0(
    or
    [list command SR.trig 1 0 0(

    does not work. I am formatting the ip adress wrong I think.

    posted in technical issues read more
  • cfry

    Hi,

    I am trying to control a robot using HTTP requests. I would like to use [netsend] to send messages from Pd.

    Trigger a recorded motion using HTTP requests
    
    This can be done by making an HTTP request to the ikaros web server.
    
    http://127.0.0.1:8000/command/SR.trig/X/0/0
    
    X is the sequence. 0 Is the first sequence.
    
    The local IP number 127.0.0.1 can be replaced by an assigned network IP.
    

    If I write in the web browser address bar it works fine but I have not managed to get [netsend] working. I do notice that by sending [connect 127.0.0.1 8000( it seems connected but I think I am sending messages that are not formatted correctly. How should they look in pd?

    Thanks!

    posted in technical issues read more
  • cfry

    @oid

    Cool! [route Darwin] worked but I had to put back the [delay 100] from [logger2] in order to have the [set exec...( update before [t b b b b b] hits the rest.

    I noticed that you can actually skip using [netsend] and just go straight into your [list prepend send] ---> [command] part. How would this do performance wise? Is [netsend] more effective than [command] or would it not matter?

    nonetsend.png

    posted in technical issues read more
  • cfry

    @oid said:

    Did you ever try using the full path to pdreceive as mentioned above,

    Sweet, It works with the full path! I thought I tried it several times, hmm. And no error code. The right "error" outlet does send out listening on 3000 but it works anyhow.

    I changed permissions: chmod a+rwx pdreceive but still didn't work without full path.

    then I did this and noticed the com.apple.quarantine flag:

    jnl@nmbp bin % ls -@l pdreceive
    -rwxrwxrwx@ 1 jnl  admin  174048  3 Jul 18:11 pdreceive
        com.apple.lastuseddate#PS       16 
        com.apple.quarantine        57 
    jnl@nmbp bin % xattr -d com.apple.quarantine pdreceive 
    jnl@nmbp bin % ls -@l pdreceive                       
    -rwxrwxrwx@ 1 jnl  admin  174048  3 Jul 18:11 pdreceive
        com.apple.lastuseddate#PS       16 
    jnl@nmbp bin % 
    

    The com.apple.quarantine flag is added on downloaded apps by osx, preventing them to run without confirmation.

    Removed the flag but it still does not work. I have to read up a bit on osx security. Its close though. :)

    @oid said:

    But there could be an Applications directory in root for apps available to all users these days, once again my lack of knowledge regarding modern OSX.

    that's how it is structured nowadays yes.

    posted in technical issues read more
  • cfry

    @whale-av said:

    @cfry When you have the help file open you have a tcp receiver in [netreceive-help] that might be receiving your messages.

    yes, when deleting the receiver in the help file the connection is refused. Using -u allows netsend to stay open. I was thinking that I should use udp in the end but it could be good if tcp also worked.

    @oid
    Testing logger2.pd:
    send symbol through right inlet to make a new file - ok
    use bang before exit - no need to force quit pd
    send data through left inlet - not working, except if pdreceive is started from terminal, then it works

    it seems that [exec pdreceive 3000(-[command] is never executed. I added print objects to the output of the [command] object and still all that is output is exit pdreceive: 2

    I tried to escape space with \ [exec pdreceive\ 3000(, but same issue.

    what does the "2" exit code indicate?

    should I use bash instead of zsh?

    posted in technical issues read more
  • cfry

    @oid these are the error messages. I never seen this dialogue before. B) It happens when I try to quit Pd. I think we should break up this in parts, maybe not do it inside an abstraction. I need to automate creating new logg files in the end anyway so in that case using an abs for naming is not the best solution.

    It may be that something has happened with my system: it seems like I can only use [netsend] when having the help window open. I'll look into this as soon as I can.

    (A little Swedish dictionary: Fel = Error, Programfel = Program Error)

    err-break.png err-breakverbose.png err-kill.png err-kill-verbose.png

    posted in technical issues read more
  • cfry

    @oid with the new logger abs [netsend] does not work: pd log: recv (tcp): Connection refused (61). I can not see the problem because it looks exactly the same as in the help file and there it works. If I keep the help page open it connects (but I still can not write to the text file). I would guess that command has some process still running and is blocking?
    Starting pdreceive 3000 from terminal works too. (now globally, I fixed that).
    I can create a new file, and I can also write to it by for example sending [exec pwd( to [command] inside logger.pd.
    command-testing.png

    posted in technical issues read more
  • cfry

    @seb-harmonik.ar yes I have done that now, pdreceive is in the PATH variable. I got the impression that this was taken care of upon installing pd.

    But I have not gotten the logger abs working. Some process is started and I have to force quit pd. I understand that you have to treat |command] a bit different than other pd objects.

    posted in technical issues read more
  • cfry

    @oid thanks this is great stuff.

    I managed to create a log file and write data to it through your logger.pd abstraction but I had to disable the part that starts pdreceive and start pdreceive from Terminal manually. Obviously pdreceive and many other commands on my system is not working global:

    /Applications/Pd-0.53-2.app/Contents/Resources/bin/pdreceive 3000 >> mylogfile.txt
    

    ...and that is because something is up with my system/shell.

    ~ % pdreceive 3000 >> mynewlogfile.txt
    zsh: command not found: pdreceive
    

    Working on this I use macOS Monterey 12.6.9 and by default zsh(z-shell) is used. I tried to change to using bash but it is the same problem still.

    Before I dive into this and try to fix it I would like to ask you

    1. if your logger.pd abstraction did work on your system
    2. what os do you use?
    3. for advice on how to set up my computer in this senario:

    I see many uses for me with this setup but the goal at the moment:

    is to put this on a raspberry pi and record interaction sessions with an artwork during the day, and optionally process it during the night. It will be open for interaction for a month, not monitored.

    But when coding I use my mac. So ideally I want to set up my mac as similar as possible to the raspberry pi having to make as few changes as possible when switching computer.

    Any idea on how to fix this without messing up my mac? And where is a good starting point to get some better understanding of shell(s)? So I do not bloat this thread/forum with non-pd questions.

    Thank you so much, I really appreciate it.

    posted in technical issues read more
  • cfry

    Thanks, would it be possible to control file naming when using pdreceive from terminal to create a text file? Maybe trigger it from Pd, send a command to terminal? Or have a size or time limit and then auto-create a new file?

    I was able to send text back to [qlist] using cat and have it play back again. I will rely on loading complete text files (into [qlist] or whatever), it is good enough. I will filter out repeated messages in the data stream before recording. This will make the files way lighter.

    I need to read up on using bash/terminal. This is so smooth.


    If I would like to have it streamed back to Pd I think I should write a python script that mimics qlist. But this is not really needed for me at this point.

    Just for the record, the raw serial data (not filtered) is formatted like this :
    (timestamp milliseconds | device | type of data | multiple sensors data):

    10.024 a1 analog 565 565 565 565 565;
    0.332 a1 analog 562 544 565 565 565;
    6.606 a1 analog 565 565 565 565 565;
    0.34 a1 analog 562 544 565 565 565;
    12.482 a1 analog 565 565 565 565 565;
    0.29 a1 analog 562 544 565 565 565;
    

    posted in technical issues read more
  • cfry

    @oid this is sweet! I managed to set this up and save a qlist readable file:
    netsendqlist.png
    No cpu load, pd is stable after 1 hour recording, 18 mb file, all good. Using netsend seems great for recording a session in the background.

    In order to make the transition from my [qlist] recorder smooth I figure I should try to be able to use terminal/pdsend to load the text file to [qlist]. How do I use pdsend in Terminal to send the recording5_pd.txt back to pd [qlist]?

    Doing this...

    jnl@nmbp ~ % /Applications/Pd-0.54-0.app/Contents/Resources/bin/pdsend 3000 >> recording5_pd.txt   
    connected to 127.0.0.1
    

    ...I did not seem to get anything out of [netreceive] in Pd.

    Is there documentation to be found on this somewhere?

    @alexandros I would like to have to option to be able record the raw data so I can redo filtering at a later stage, but in most cases it would be better to filter out repeated messages, yes.
    I am experimenting with having Pd detect silence and no interaction and then do offline non-realtime stuff (like saving, or using your neural network lib) at that point. But using [netsend] to save the sensor data at least eliminates the [qlist] save instability issue.

    @seb-harmonik.ar [binfile] seems interesting, I may try that one down the line. Thanks!

    posted in technical issues read more
  • cfry

    Hi,

    I have made some experiments with making data recording abstractions using [qlist].
    Looks like this:
    c-rec-panel.png
    It works OK but I think there are better ways to do this.

    I use it for

    1. recording and looping on the fly,
    2. background recording of session and
    3. along with more advanced processing (neural network is the plan).

    The data that I record is often sensor data over serial connection using [comport] with arduinos, but the idea is that you can take any data stream inside Pd and record it.

    I use this in my live rig but I also want to include it in installations and have the data being automatically saved to disk, maybe also upload it to cloud on the fly.

    One problem is that there is quite a lot of messages coming in when recording the serial data (I use a high baud rate) and when saving the text file the system can get unstable and PD crash at times. Usually the text file is intact though. The text file gets quite large also, I suspect that there could be more suitable file formats. When saving Pd gets locked up too so it is not a realtime solution as it is.

    Maybe one should write the data to disk right away instead of having it in a buffer like [qlist]?

    Would using [text sequence] be more stable?

    So how would you do this?

    Thankful for input!

    posted in technical issues read more
Internal error.

Oops! Looks like something went wrong!