forked from supercollider/supercollider
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
All the bela changes, in one single commit, rebased on 3.11.x
- Loading branch information
1 parent
392d97d
commit 7e3a993
Showing
33 changed files
with
3,735 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
class:: AnalogIn | ||
summary:: Read data from an analog input of the BELA board | ||
related:: Classes/AnalogOut, Classes/DigitalIn, Classes/DigitalOut, Classes/DigitalIO | ||
categories:: UGens>BELA | ||
|
||
|
||
Description:: | ||
|
||
Reads analog data from an analog input of the BELA board. | ||
|
||
note:: | ||
This UGen only works on BeLa | ||
:: | ||
|
||
classmethods:: | ||
|
||
method::ar | ||
|
||
argument::analogPin | ||
|
||
Analog pin number to read. Pin numbers begin at 0. This value can be modulated at audiorate. | ||
|
||
argument::mul | ||
|
||
argument::add | ||
|
||
method::kr | ||
|
||
argument::analogPin | ||
|
||
Analog pin number to read. Pin numbers begin at 0. | ||
|
||
argument::mul | ||
|
||
argument::add | ||
|
||
Examples:: | ||
|
||
code:: | ||
// modulate frequency of a sine oscillator | ||
|
||
( | ||
SynthDef("help-AnalogIn",{ arg out=0; | ||
Out.ar(out, | ||
SinOsc.ar( AnalogIn.ar( 0 ).exprange( 200, 5000 ), 0, 0.1 ) | ||
) | ||
}).play; | ||
) | ||
:: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
class:: AnalogOut | ||
summary:: Write data to an analog output of the BELA board | ||
related:: Classes/AnalogIn, Classes/DigitalIn, Classes/DigitalOut, Classes/DigitalIO | ||
categories:: UGens>BELA | ||
|
||
|
||
Description:: | ||
|
||
Writes analog data to an analog output of the BELA board. | ||
|
||
note:: | ||
This UGen only works on BeLa | ||
:: | ||
|
||
classmethods:: | ||
|
||
method::ar | ||
|
||
argument::analogPin | ||
|
||
Analog pin number to read. Pin numbers begin at 0. This value can be modulated at audiorate. | ||
|
||
argument::output | ||
|
||
Value to write out to the pin. | ||
|
||
argument::mul | ||
|
||
argument::add | ||
|
||
method::kr | ||
|
||
argument::analogPin | ||
|
||
Analog pin number to read. Pin numbers begin at 0. | ||
|
||
argument::output | ||
|
||
Value to write out to the pin. | ||
|
||
argument::mul | ||
|
||
argument::add | ||
|
||
Examples:: | ||
|
||
code:: | ||
// write a sine oscillator's output to a pin | ||
|
||
( | ||
SynthDef("help-AnalogOut",{ arg out=0; | ||
AnalogOut.ar( 0 , SinOsc.ar( 10 ) ); | ||
}).play; | ||
) | ||
:: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
class:: DigitalIO | ||
summary:: Read or write data to a digital pin of the BELA board | ||
related:: Classes/AnalogIn, Classes/AnalogOut, Classes/DigitalIn, Classes/DigitalOut | ||
categories:: UGens>BELA | ||
|
||
|
||
Description:: | ||
|
||
Read or write digital data from or to a digital pin. The pin number of this UGen can be modulated, as well as its I/O mode. | ||
|
||
note:: | ||
This UGen only works on BeLa. | ||
:: | ||
|
||
note:: | ||
If you do not need to change the pin mode or the pin, you should use the UGen link::Classes/DigitalIn:: or link::Classes/DigitalOut:: | ||
:: | ||
|
||
classmethods:: | ||
|
||
method::ar | ||
|
||
The output of this UGen is always the last value read when the digital pin was an input. | ||
|
||
argument::digitalPin | ||
|
||
Digital pin number to write to. Pin numbers begin at 0. This value can be modulated at audiorate. | ||
|
||
argument::output | ||
|
||
Value to write out to the pin - the value will be 1 when the argument is larger than 0, otherwise 0. This value can be modulated at audio rate. | ||
|
||
argument::pinMode | ||
|
||
Value to write out to the pin - the pin will be an input when the argument is smaller than 0.5, otherwise an output. This value can be modulated at audiorate. | ||
|
||
argument::mul | ||
|
||
argument::add | ||
|
||
method::kr | ||
|
||
The output of this UGen is always the last value read when the digital pin was an input. | ||
|
||
argument::digitalPin | ||
|
||
Digital pin number to write to. Pin numbers begin at 0. | ||
|
||
argument::output | ||
|
||
Value to write out to the pin - the value will be 1 when the argument is larger than 0, otherwise 0. | ||
|
||
argument::pinMode | ||
|
||
Value to write out to the pin - the pin will be an input when the argument is smaller than 0.5, otherwise an output. | ||
|
||
argument::mul | ||
|
||
argument::add | ||
|
||
Examples:: | ||
|
||
code:: | ||
// write a sine oscillator's output to a pin, and read the pin value at other times | ||
|
||
( | ||
SynthDef("help-DigitalIO",{ arg out=0; | ||
DigitalIO.ar( 0, SinOsc.ar( 10 ),LFPulse.kr( 0.1 ) ).poll; | ||
}).play; | ||
) | ||
|
||
:: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
class:: DigitalIn | ||
summary:: Read data from a digital input of the BELA board | ||
related:: Classes/AnalogIn, Classes/AnalogOut, Classes/DigitalOut, Classes/DigitalIO | ||
categories:: UGens>BELA | ||
|
||
|
||
Description:: | ||
|
||
Reads digital data from an digital input of the BELA board. | ||
|
||
note:: | ||
This UGen only works on BeLa. | ||
:: | ||
|
||
note:: | ||
If you want to modulate the pin number, you should use the UGen link::Classes/DigitalIO:: | ||
:: | ||
|
||
classmethods:: | ||
|
||
method::ar | ||
|
||
argument::digitalPin | ||
|
||
Digital pin number to read. Pin numbers begin at 0. This value cannot be modulated. | ||
|
||
argument::mul | ||
|
||
argument::add | ||
|
||
method::kr | ||
|
||
argument::digitalPin | ||
|
||
Digital pin number to read. Pin numbers begin at 0. This value cannot be modulated. | ||
|
||
argument::mul | ||
|
||
argument::add | ||
|
||
|
||
Examples:: | ||
|
||
code:: | ||
// turn on and off a sine oscillator | ||
|
||
( | ||
SynthDef("help-DigitalIn",{ arg out=0; | ||
Out.ar(out, | ||
SinOsc.ar( 500, 0, 0.1 * DigitalIn.ar( 0 ) ) | ||
) | ||
}).play; | ||
) | ||
:: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
class:: DigitalOut | ||
summary:: Write data to a digital input of the BELA board | ||
related:: Classes/AnalogIn, Classes/AnalogOut, Classes/DigitalIn, Classes/DigitalIO | ||
categories:: UGens>BELA | ||
|
||
|
||
Description:: | ||
|
||
Write digital data to a digital output of the BELA board. | ||
|
||
note:: | ||
This UGen only works on BeLa. | ||
:: | ||
|
||
note:: | ||
If you want to modulate the pin number, you should use the UGen link::Classes/DigitalIO:: | ||
:: | ||
|
||
classmethods:: | ||
|
||
method::ar | ||
|
||
argument::digitalPin | ||
|
||
Digital pin number to write to. Pin numbers begin at 0. This value cannot be modulated. | ||
|
||
argument::output | ||
|
||
Value to write out to the pin - the value will be 1 when the argument is larger than 0, otherwise 0. | ||
|
||
argument::writeMode | ||
|
||
Mode of writing to the output, this can be 0 (using Bela's DigitalWrite and only when value changes) or 1 (using Bela's DigitalWriteOnce). This value cannot be modulated. | ||
|
||
argument::mul | ||
|
||
argument::add | ||
|
||
|
||
method::kr | ||
|
||
argument::digitalPin | ||
|
||
Digital pin number to write to. Pin numbers begin at 0. This value cannot be modulated. | ||
|
||
argument::output | ||
|
||
Value to write out to the pin - the value will be 1 when the argument is larger than 0, otherwise 0. | ||
|
||
argument::writeMode | ||
|
||
Mode of writing to the output, this can be 0 (using Bela's DigitalWrite and only when value changes) or 1 (using Bela's DigitalWriteOnce). This value cannot be modulated. | ||
|
||
argument::mul | ||
|
||
argument::add | ||
|
||
|
||
Examples:: | ||
|
||
code:: | ||
// write a sine oscillator's output to a pin | ||
|
||
( | ||
SynthDef("help-DigitalOut",{ arg out=0; | ||
DigitalOut.ar( 0, SinOsc.ar( 10 ) ); | ||
}).play; | ||
) | ||
|
||
:: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
class:: MultiplexAnalogIn | ||
summary:: Read data from an analog input of the BELA board | ||
related:: Classes/AnalogIn, Classes/AnalogOut, Classes/DigitalIn, Classes/DigitalOut, Classes/DigitalIO | ||
categories:: UGens>BELA | ||
|
||
|
||
Description:: | ||
|
||
Reads analog data from a multiplexed analog input of the BELA board, with the additional Multiplexer board. | ||
|
||
note:: | ||
This UGen only works on BeLa | ||
:: | ||
|
||
classmethods:: | ||
|
||
method::ar | ||
|
||
argument::analogPin | ||
|
||
Analog pin number to read. Pin numbers begin at 0. This value can be modulated at audiorate. | ||
|
||
argument::muxChannel | ||
|
||
Multiplex channel to read. Pin numbers begin at 0. This value can be modulated at audiorate. | ||
|
||
argument::mul | ||
|
||
argument::add | ||
|
||
method::kr | ||
|
||
argument::analogPin | ||
|
||
Analog pin number to read. Pin numbers begin at 0. | ||
|
||
argument::muxChannel | ||
|
||
Multiplex channel to read. Pin numbers begin at 0. | ||
|
||
argument::mul | ||
|
||
argument::add | ||
|
||
Examples:: | ||
|
||
code:: | ||
// modulate frequency of a sine oscillator | ||
|
||
( | ||
SynthDef("help-MultiplexAnalogIn",{ arg out=0; | ||
Out.ar(out, | ||
SinOsc.ar( MultiplexAnalogIn.ar( 0, 1 ).exprange( 200, 5000 ), 0, 0.1 ) | ||
) | ||
}).play; | ||
) | ||
:: | ||
|
Oops, something went wrong.