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

OpenSoundControl -> downcast? #125

Open
mzed opened this issue Apr 21, 2020 · 8 comments
Open

OpenSoundControl -> downcast? #125

mzed opened this issue Apr 21, 2020 · 8 comments

Comments

@mzed
Copy link
Member

mzed commented Apr 21, 2020

I've twice now run into problems where old school users, and old patches, had troubles using OpenSoundControl to parse newer OSC data from o.dot into max messages. Doubles get output as zeros. (see patch below)

It might be nice if OpenSoundControl had downcast functions built in? Or, at least it could throw a warning in the Max window saying that it didn't know what to do with the data it got.


----------begin_max5_patcher----------
603.3oc0V0ziaBCD8LQJ+GP9LkhMekzqqTutUZ2aUUQNvrorErQFytoZU+uW
+ArIJMrghXiZODhX7L9Mu2LdLurbgCZKeOzfb+j6WccbdQYwwXSawo2fCpht
Oqj1XbDUAMMzc.xqaQIrWZV3i471skfaf+qqUVvfLdKy3.o2Zs.Z.ljJK3rM
m2EVaEuUVBRCl3WijJy9dAa2FAjIsoMIMzO1yMbcfefmaLV+LLwOv8a8AY2H
4OqAaDHzg0JxMoNe6iefDfNB8BVO3Diwesbg9e0edymRg8IwWPqFuPDtFaEh
HiPDLYg.udtEhssRImgl.mRr0SawkD0+7M3zVJa2Q7plJnUfDDa.FUo4ZuBN
GoSOOowSlzL3Y0F+mE+aqA1cp5b9MblTvKGPVBGgrDZDDL17Fg710ZO6uau6
l6Kpf6o6Fn5mbsDBteN+YVFsQNoNiDCoiMRPx5Qn.etsr7Kzre.xAXd7+L88
jHaANc06deez+Q88DaC+6Re+rqCOTxU6z.rjbYVhiiOLHeDj7jFfG3hJpYGS
9a6IBudS.pUmGc6tNbJmSrREIvbNYU5bLEXbj2Fq4R6S+9ISdpW3DIog2Jx5
SitVNW7gjHGZjELyWEcjS5OKQ60vh+nwSOZ+x.pu9eNAL3h.lZ8ZN.LdT.lL
e.NJ7NIq3hbPXN7csxfnAR.7Lj.QiRBhlMIObT3cV35NzRqqeBDMcQXQRMv5
QtQSV4YeufYe2N+AIfmJ5CIxZhJTyijpgQsBSBh1mzcKBphqTXVaQuHq4pFZ
yLQlZJbiZxmMH8rykKTN7a.DKfPB
-----------end_max5_patcher-----------
@equilet
Copy link
Member

equilet commented Apr 22, 2020

We usually use [o.downcast] as well for this particular use case.
Sorry, that's the best we have at the moment.

@equilet equilet closed this as completed Apr 22, 2020
@equilet
Copy link
Member

equilet commented Apr 22, 2020

I'm leaving myself a note to include this in the forthcoming odot tutorial. ;)

@mzed
Copy link
Member Author

mzed commented Apr 23, 2020

I do tell people to use o.downcast, but that solution isn't obvious -- especially to users who haven't downloaded o.dot. It would be helpful if there was some pointer to a solution that was contained in the CNMAT-externs package.

@equilet
Copy link
Member

equilet commented Apr 23, 2020

would something in the opensoundcontrol help file suffice ?

@equilet equilet reopened this Apr 23, 2020
@mzed
Copy link
Member Author

mzed commented Apr 23, 2020

There is a link to o.dot in the OpenSoundControl help. Atau asked me if that meant that OpenSoundControl is deprecated. It seems like it sort of is? (At least, WRT o.dot compatibility?)

I was looking at the source, and the decision to output zeros is happening on lines 963-975. There's actually a comment there suggesting the behavior could be different. I would suggest that silently setting longs and doubles to zero is a bad user interaction. A one line error in the Max window (Received double, setting to zero.) would be better.

What is the maintenance status of these legacy objects?

@equilet
Copy link
Member

equilet commented Apr 23, 2020

I can take a look at it - more soon...

@equilet
Copy link
Member

equilet commented Apr 23, 2020

for now I post a msg about the dirty deed (f289b21) but will also look into a proper downcast function internal to the object.

@mzed
Copy link
Member Author

mzed commented Apr 28, 2020

Actually, case 'h' is a long int (that also gets converted to 0.) case 'd', a couple of lines below, is the double. It would probably be good to make these messages set a flag so they only output once. Otherwise they could flood the Max window.

I can do a pull request later this week.

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

No branches or pull requests

2 participants