BelaPlatform / supercollider

an environment and programming language for real time audio synthesis and algorithmic composition
GNU General Public License v3.0
14 stars 8 forks source link

DigitalOutput.kr not behaving as expected #45

Closed jreus closed 7 years ago

jreus commented 7 years ago

The following code doesn't behave as expected, when wired up with a LED from pin 6 (the basic digital output example). The LED does blink, but from a 'dim' state to a 'fully lit' state ... with no fully off state. LFPulse.kr is returning a proper 0 and 1 value according to poll.. this works as expected when using .ar calls instead of .kr

s.options.numAnalogInChannels = 8;
s.options.numAnalogOutChannels = 8;
s.options.numDigitalChannels = 16;
s.options.maxLogins = 64;      // set max number of clients

s.options.pgaGainLeft = 4;     // sets the pga gain of the left channel to 4 dB
s.options.pgaGainRight = 5;    // sets the pga gain of the right channel to 5 dB
s.options.headphoneLevel = -8; // sets the headphone level to -8 dB
s.options.speakerMuted = 0;    // the speakers are not muted (so active)
s.options.dacLevel = -5;       // sets the gain of the dac to -5 dB
s.options.adcLevel = -3;       // sets the gain of the adc to -3 dB
s.options.numMultiplexChannels = 0; // do not enable multiplexer channels

s.options.blockSize = 16;
s.options.numInputBusChannels = 2;
s.options.numOutputBusChannels = 2;

s.options.postln;

s.waitForBoot{
    "Server Booted".postln;
    {
        DigitalOut.kr(6, LFPulse.kr(0.5).poll(1), 0);
    }.play;
};
sensestage commented 7 years ago

Fixed via f46b8af699f5bd12d0ca5babaec1720ad179f555