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

Scripts without engines cannot use polls until a script with an engine has been run #615

Closed
markwheeler opened this issue Oct 23, 2018 · 4 comments
Assignees
Labels
bug

Comments

@markwheeler
Copy link
Collaborator

@markwheeler markwheeler commented Oct 23, 2018

If a script wants to poll one of the norns system polls (eg, pitch_in_l) but doesn't use an audio engine (engine.name is not specified) and it's the first script run after startup, it will fail at init.
However, if another script which has an audio engine is run previously, the above described will work as expected.

Niche use case I know but I did run into it :D

@catfact
Copy link
Collaborator

@catfact catfact commented Oct 23, 2018

it's silly and the reasons are convoluted, but i think it's most straightforward to just load a fallback engine.

(there is a /report/polls OSC command, but there's a specific sequence to the reports that ends with polls being populated at script init time... bla bla)

fallback could be an engine that does nothing, or has some generic useful functions like additional analysis or something.

@markwheeler
Copy link
Collaborator Author

@markwheeler markwheeler commented Oct 23, 2018

Cool will close this one, thanks for the quick response!

@catfact
Copy link
Collaborator

@catfact catfact commented Apr 4, 2019

eh, i think this is definitely a problem that needs addressing in some way: we don't say you can't have a script with no engine (we may even encourage it somewhere?) but if you do that it breaks things in an unexpected way by destroying the analysis polls.

the simplest solution right now is to have an empty engine that script.lua uses as a fallback.

the next, better solution i think is to not rely on SC for these anlaysis polls at all. the amp poll is simple, the pitch poll would be part of a somewhat larger effort to add freq-domain analysis/processing to crone.
(best implementation i'm aware of right now, using SNAC: http://www.katjaas.nl/helmholtz/helmholtz.html)

@tehn
Copy link
Member

@tehn tehn commented Apr 21, 2019

fixed by #809

@tehn tehn closed this Apr 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants