LNXStudio - Verion 2.0 released (April 2016) LNXStudio is a Digital Audio Work Station created in the SuperCollider language. It has a powerful set of tools for creating music, all of which can be networked. Co-location gigs or real-time collaborations don't have to be in the same room. Neil Citron is a long-time studio engineer, guitarist, and all around great guy. Neil Cosgrove Lnx Studio V2.0 Daw For Mac; Neil Cosgrove.
![]()
A programming guide to creating instrument & effects in SCCode & SCCodeFX
You can create your own instruments and effects with SC Code and SC Code FX. This is a guide to programming these modules. If you are new to SuperCollider this is the main help page. I recommend becoming familiar with these related topics.
Here is a list of UGens found in SuperCollider. Browse: UGens
The SynthDef
SCCode builds a synth or an effect out of a valid SynthDef object. The auto-gui system will make Widgets for you from the arguments of that SynthDef's ugenGraphFunc. Widgets can use ControlSpecs defined in your metadata. The modules do not support the .play method or sequencing with patterns. All programming must be done within the scope of the SynthDef supplied.
A typical SynthDef will look like this.
You can call your SynthDef's what you like, for example this one is called 'LNX_Saw1'. The ugenGraphFunc must meet certain criteria else the build will fail (see below).
Arguments
The arguments of the SynthDef are used to automatically create GUI Widgets when you build the synth. Certain arguments are commonly reserved for special use and some are compulsory. For example the gate argument in SC Code is compulsory and is used to release the synths.
Reserved SC Code arguments
Compulsory...
Optional...
Sample support, optional...
Reserved SC Code FX arguments
Compulsory...
Optional...
Currently there is no support for literal arrays.
The main body of the ugenGraphFunc
SCCode requires that you are able to release the synth with the gate argument & an EnvGen. The build will fail without this. The example below could do this for you.
I recommend using LNX_Out for sending the audio out to LNX_Studio. Its an easy way of making sure the signal reaches the correct buses and doesn't overload them.
You can synchronise to the tempo by using the arguments clock, i_clock & bpm. For example...
Rates
You can supply an optional Array of specifications for the ugenGraphFunc's argument rates or use the prefixes a_, i_ or t_ on the argument names. In SCCodeFX if an argument is initial rate, then changing this value will result in a new synth replacing the previous one. This then allows changes to normally static Ugen arguments like fft buffer size.
The specifications can be:
Here we are setting different rates for the arguments of the ugenGraphFunc.
Using samples
In SC Code you can use samples in two ways. Either as bank of samples, like you find in a drum machine or as a collection of samples recorded at regular pitched intervals, like that of a sampled piano. Once you have the samples loaded you need to use slightly different code to play them in your SynthDef.
![]()
Each buffer channel (i.e Left or Right) is loaded as a separate Buffer. You will receive the buffer number for each channel independently. This way you can write 1 SynthDef that works for both Mono & Stereo samples, like below.
Here PlayBuf uses bufL & bufR as buffer numbers for each channel, bufRate tells it how fast to play them back, bufLoop whether to loop the sample and bufStartFrame as the start Frame. bufAmp is used to scale the amplitude of each sample. startPos can be used in UGens where an index between 0-1 is required, like in GrainBuf.
Metadata & specs
Use metadata to associate a ControlSpec with a SynthDef argument and attach it to a GUI Widget. You can also use symbols or lists to define a ControlSpec.
Useful default specs might be:
![]() Polling
If you need to debug your ugenGraphFunc use the .poll(poll,rate) method to send values to the post view.
Keywords
Certain keywords are not allowed in the SynthDef for safety reasons. The post view will inform you if you use any of these words.
Publishing code
I regularly update the Library with my own instruments and effects. One of the reason I designed LNX this way was to encourage users to submit and share their own content. Please contact me at [email protected] if you want to get your own code included in the on-line library.
A computer language like SuperCollider makes it easy to share code with others. Generally, making software public that is written in sclang or software that includes changes to scserver requires the sourcecode to be publicly available. For more information, see http://www.gnu.org/copyleft/gpl.html
Quite often, code written by others is copied, modified and used in pieces or software. If the code was published without any specific licence, it is always good to at least mention the original authors in your work in order to avoid later conflicts.
![]() Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
March 2023
Categories |