Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improviz doesn't accept OSC lists #58

Open
hellocatfood opened this issue Mar 28, 2021 · 1 comment
Open

Improviz doesn't accept OSC lists #58

hellocatfood opened this issue Mar 28, 2021 · 1 comment

Comments

@hellocatfood
Copy link
Contributor

I'm attempting to send random fill values from Pure Data to Improviz via OSC but I'm finding that it's not working.

This is the improviz code that I'm using

color = ext(:color, 0)
fill(color)
strokeSize(8)
rotate(time)
cube(4)

And the Pure Data patch I'm using is attached, and screenshot below:
Screenshot from 2021-03-28 19-40-01

pd_improviz.zip

If I click on the toggle to generate random values or click on the message box Improviz returns this error: ERROR: invalid OSC address

If I send just one number it works but it only changes the fill to shades of grey

@rumblesan
Copy link
Owner

Ok, so!

In theory this is an easy-ish change to make, and I prototyped it yesterday to see how feasible it is. But it raises a bit of a problem.

The way that Improviz handles errors in the programs that get sent, is it keeps track of the "last known working" program, so when an error occurs in a program, it blows up, and Improviz just falls back to the previous good state. The problem with allowing the OSC input (and this is actually an issue now that it allows strings, but I think it's become more obvious with arrays) is that a program can be good with one OSC input, get saved as good, and then when the OSC input changes it now crashes, and the last known good state that improviz has will also crash with that input.

Just to be really verbose and explain :D

color = ext(:color, 0)
fill(color)
strokeSize(8)
rotate(time)
cube(4)

as long as you send a number to /vars/color over OSC this will be fine, but if you send an array, then the fill function will complain that it can't use an array, and will crash, but this program has already been saved as good, and it will enter a crash loop.

I'm not really sure what the best course of action is, and it really depends on peoples expectations as users.

Things I'm definitely sure of:

  • Improviz should not enter a crash loop
  • It should be reasonably easy to figure out what the problem is
  • It shouldn't be something that is going to impede a live performance in too major a fashion

Things that could be solutions, but I'm unsure about:

  • functions that get unexpected values (array or string instead of number) throw a warning in the logs and just do the best they can. (maybe default to 0 value for example)
  • Improviz warns if the type of an OSC variable changes ("color was originally a number but now it's an array. I'm not changing it")
  • Improviz keeps a history of the OSC variables that were last working with the program, though this could definitely lead to unexpected behaviour

None of those feel especially difficult to implement, but I'm aiming for minimum level of surprise for people who use it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants