hydra-synth / atom-hydra

78 stars 29 forks source link

osc-loader.js close and exit on port assign #41

Closed domha91 closed 2 years ago

domha91 commented 3 years ago

If i try to assign any port, including the default 57101, to msg then I get these errors. image "OSC server exited with code null"

alvarobyrne commented 2 years ago

@domha91 Hi. The message you refer to is not an error: it's just a message that tells us that the currently running port is being closed/exited so that a new one can start running.

image

Things happen like this (numbers in the list refer to red numbers I added to your image)

  1. When atom-hydra is toggled on an OSC server starts listening on port 57101.
  2. Then when you run the code msg.setPort(3333) this new port is created.
  3. then the usual logging of the evalFlash is printed. this happens every time we execute any code (so not relevant to this case)
  4. then a message is printed telling us that the port 57101 has exited in order to start running port 3333
  5. I wouldn't know why this message is printed. Is it you executing some code in order to print messages from port 3333? Something of the sorts :
    msg.on('/messageName', (args) => {
    // log osc results to console
    log(args)
    })

    If that's the case messages should be being printed to the hydra console. At last, my question is: have you actually tried executing some code as the previous one in order to see if messages are arriving to hydra?, if messages are been listened by the hydra OSC server?

Look it works for me:

image

Hope I'm not wrong, hope this helps

ojack commented 2 years ago

Thanks @alvarobyrne for the great explanation. Possibly the exited syntax is confusing as it makes it seem like something isn't working..closing this issue but feel free to keep asking questions in the thread.

domha91 commented 2 years ago

@alvarobyrne Hello, thank you for your explanation. However, I still can't get anything to happen in Hydra. Here is everything that I'm doing:

  1. I'm sending OSC ( "d1 $ s "bd sd" in TidalCycles) from my laptop over ethernet to SuperDirt which is running on my desktop machine
  2. SuperDirt is listening on port 57120
  3. I run the code in 'tidal-forward.scd'
  4. I run the code in '8-osc-tidal-supercollider.js'

And nothing happens. What am i doing wrong?

@ojack Yeah, it's even more confusing when something actually isn't working ha