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

Access atoms using SDK v. 8.0.3 #19

Open
inspiralpatterns opened this issue Jan 3, 2021 · 0 comments
Open

Access atoms using SDK v. 8.0.3 #19

inspiralpatterns opened this issue Jan 3, 2021 · 0 comments

Comments

@inspiralpatterns
Copy link

I am experiencing troubles in re-using the code I wrote 6 years ago with the new SDK.
Particularly, I am not able to retrieve the value from the atom I pass in to the object at instantiation type.
The code looks like

DLShift(t_symbol * sym, long ac, t_atom * av) {
    setupIO(1, 1);
    /*init conditions*/
        if (ac < 1) post ("syntax error: ratio required");
        else {
            if (av->a_type == A_LONG) m_ratio = atom_getlong(av);
            else if (av->a_type == A_FLOAT) m_ratio = atom_getfloat(av);
            else if (av->a_type == A_SYM) post ("not a number");
        }

but every time I get something like ratio: 0.00.
I tried to switch using something like:

if (av->a_type == A_LONG) m_ratio = av->a_w.w_long;
else if (av->a_type == A_FLOAT) m_ratio = a_w.w_float;

but nothing, same response as above.

Has anyone experienced any troubles in this?

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

1 participant