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

DigitalOut ugens have problems #68

Open
giuliomoro opened this issue Jun 20, 2018 · 4 comments

Comments

giuliomoro added a commit to giuliomoro/supercollider that referenced this issue Oct 3, 2018
@TheTechnobear

This comment has been minimized.

Copy link

commented Nov 6, 2018

DigitalIn.kr(20) will "crash" server...

perhaps could check limits

s.options.numDigitalChannels = 16;

also as far as I could tell, the issues with DigitalOut remain the same :(
So, Ive stuck with DigitalIO as a workaround (as details in above topic of bela.io forum)

(testing latest master branch on Salt)

@giuliomoro

This comment has been minimized.

Copy link
Author

commented Nov 6, 2018

the issues with DigitalOut remain the same :(

yes, I did spend some time looking at it, and fixed a minor issue, but I could not reproduce the problem I think (also I did not have a scope at hand when I did that). I tried again now with as cope and I cannot find it. Could you please guide me through reproducing the error? Thanks

@sensestage

This comment has been minimized.

Copy link
Collaborator

commented Nov 26, 2018

Both DigitalIn and DigitalOut do perform a check at construction (the _Ctor functions of the Ugen) of the pin number, print out a warning, calculate the first (dummy) sample and then set the next_calculation to a dummy function.

Or they should... I see indeed that there is an error in DigitalIn.kr, as I did do a calculation of the first sample, but not do a SETCALC.

In /server/plugins/BelaPlugins.cpp lines 580 to 585 should be:

          // initiate first sample
          DigitalIn_next_dummy_k( unit, 1);  
          if (unit->mCalcRate == calc_FullRate) { // ugen running at audio rate;
            SETCALC(DigitalIn_next_dummy_a);
          } else {
            SETCALC(DigitalIn_next_dummy_k);
          }
@sensestage

This comment has been minimized.

Copy link
Collaborator

commented Nov 26, 2018

this way the DigitalIn will print out a warning and then just output 0.

giuliomoro added a commit to giuliomoro/supercollider that referenced this issue Jan 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.