vecnode's picture
v0.1.18: full profile
7add735 verified
Raw History Blame Contribute Delete
95.2 kB
{"conversations": [{"role": "user", "content": "What is `CutBuf2` in SuperCollider?"}, {"role": "assistant", "content": "CutBuf2 — BBCut2 buffer playback with modulatable grain parameters Playback for a buffer, with individual grains spawned for each cut. Each grain may have associated parameters for playback speed, enveloping and dutycycle (ratio of duration to inter-onset-interval). Category: Libraries > BBCut > Cut synths."}]}
{"conversations": [{"role": "user", "content": "Explain `CutBuf2` in SuperCollider briefly."}, {"role": "assistant", "content": "CutBuf2 — BBCut2 buffer playback with modulatable grain parameters Playback for a buffer, with individual grains spawned for each cut. Each grain may have associated parameters for playback speed, enveloping and dutycycle (ratio of duration to inter-onset-interval). Category: Libraries > BBCut > Cut synths."}]}
{"conversations": [{"role": "user", "content": "What is `MotifCutProc` in SuperCollider?"}, {"role": "assistant", "content": "MotifCutProc — Automatic breakbeat cutting algorithm with a hierarchical structure This cut procedure provides an intermediate level of hierachy between a phrase and a block. A motif is a short rhythmic cell, represented by nested arrays. A block is taken an array of cuts, for example: Category: Libraries > BBCut > Cut procedures."}]}
{"conversations": [{"role": "user", "content": "Explain `MotifCutProc` in SuperCollider briefly."}, {"role": "assistant", "content": "MotifCutProc — Automatic breakbeat cutting algorithm with a hierarchical structure This cut procedure provides an intermediate level of hierachy between a phrase and a block. A motif is a short rhythmic cell, represented by nested arrays. A block is taken an array of cuts, for example: Category: Libraries > BBCut > Cut procedures."}]}
{"conversations": [{"role": "user", "content": "What is `StatBalProc` in SuperCollider?"}, {"role": "assistant", "content": "StatBalProc — Automatic breakbeat cutting algorithm using statistical feedback Extension of ChooseCutProc using Charles Ames' method of statistical feedback to control selection of cut size and repeat states. The essential auxilliary class is StatBalStream. The theoretical basis of the use of statistical feedback is control over a continuum from Lehmer style random number generation to deterministic behaviour via the heterogeneity parameter. The application to automatic cutt Category: Libraries > BBCut > Cut procedures."}]}
{"conversations": [{"role": "user", "content": "Explain `StatBalProc` in SuperCollider briefly."}, {"role": "assistant", "content": "StatBalProc — Automatic breakbeat cutting algorithm using statistical feedback Extension of ChooseCutProc using Charles Ames' method of statistical feedback to control selection of cut size and repeat states. The essential auxilliary class is StatBalStream. The theoretical basis of the use of statistical feedback is control over a continuum from Lehmer style random number generation to deterministic behaviour via the heterogeneity parameter. The application to automatic cutt Category: Libraries > BBCut > Cut procedures."}]}
{"conversations": [{"role": "user", "content": "What is `Canvas3DItem` in SuperCollider?"}, {"role": "assistant", "content": "Canvas3DItem — A 3D vector graphics item Canvas3DItem provides wire-frame 3D vector graphics items for use with Canvas3D Category: GUI > 3D."}]}
{"conversations": [{"role": "user", "content": "Explain `Canvas3DItem` in SuperCollider briefly."}, {"role": "assistant", "content": "Canvas3DItem — A 3D vector graphics item Canvas3DItem provides wire-frame 3D vector graphics items for use with Canvas3D Category: GUI > 3D."}]}
{"conversations": [{"role": "user", "content": "What is `EaseInOutBounce` in SuperCollider?"}, {"role": "assistant", "content": "EaseInOutBounce — Bounce ease-in/out Easing equation for a bounce (exponentially decaying parabolic bounce) ease-in/out, accelerating until halfway, then decelerating. The a parameter controls overshoot, the default producing a 10% overshoot. Category: Ease."}]}
{"conversations": [{"role": "user", "content": "Explain `EaseInOutBounce` in SuperCollider briefly."}, {"role": "assistant", "content": "EaseInOutBounce — Bounce ease-in/out Easing equation for a bounce (exponentially decaying parabolic bounce) ease-in/out, accelerating until halfway, then decelerating. The a parameter controls overshoot, the default producing a 10% overshoot. Category: Ease."}]}
{"conversations": [{"role": "user", "content": "What is `EaseOutSine` in SuperCollider?"}, {"role": "assistant", "content": "EaseOutSine — Sinusoidal ease-out Easing equation for a sinusoidal (sin(t)) ease-out, decelerating from zero velocity. Category: Ease."}]}
{"conversations": [{"role": "user", "content": "Explain `EaseOutSine` in SuperCollider briefly."}, {"role": "assistant", "content": "EaseOutSine — Sinusoidal ease-out Easing equation for a sinusoidal (sin(t)) ease-out, decelerating from zero velocity. Category: Ease."}]}
{"conversations": [{"role": "user", "content": "What is `ProteinBioSynthesis` in SuperCollider?"}, {"role": "assistant", "content": "ProteinBioSynthesis — Pattern class for the sonification of DNA information in terms of the aminoacids it encodes in a living cell. The superclass for a number of pattern classes that are related with mapping DNA data to aminoacid names and numbers. Category: Streams-Patterns-Events, Sonification."}]}
{"conversations": [{"role": "user", "content": "Explain `ProteinBioSynthesis` in SuperCollider briefly."}, {"role": "assistant", "content": "ProteinBioSynthesis — Pattern class for the sonification of DNA information in terms of the aminoacids it encodes in a living cell. The superclass for a number of pattern classes that are related with mapping DNA data to aminoacid names and numbers. Category: Streams-Patterns-Events, Sonification."}]}
{"conversations": [{"role": "user", "content": "What is `CallWindow` in SuperCollider?"}, {"role": "assistant", "content": "CallWindow — A call window Category: Libraries > Radicles."}]}
{"conversations": [{"role": "user", "content": "Explain `CallWindow` in SuperCollider briefly."}, {"role": "assistant", "content": "CallWindow — A call window Category: Libraries > Radicles."}]}
{"conversations": [{"role": "user", "content": "What is `InspManager` in SuperCollider?"}, {"role": "assistant", "content": "InspManager — a global manager for all Insp displaying them in a sidebar navigation and a main display area In debugging code you can call .insp quite often and each call will result in a snapshot being added to the global manager's sidebar. You can navigate through different snapshots using the sidebar. Category: Debugging, Language."}]}
{"conversations": [{"role": "user", "content": "Explain `InspManager` in SuperCollider briefly."}, {"role": "assistant", "content": "InspManager — a global manager for all Insp displaying them in a sidebar navigation and a main display area In debugging code you can call .insp quite often and each call will result in a snapshot being added to the global manager's sidebar. You can navigate through different snapshots using the sidebar. Category: Debugging, Language."}]}
{"conversations": [{"role": "user", "content": "What is `TraerParticle` in SuperCollider?"}, {"role": "assistant", "content": "TraerParticle — move around in 3D space based on forces applied to them Particles can represent objects, corners of 2D or 3D shapes or abstract things that won't even be drawn. Particles have 5 properties: Category: TraerPhysics."}]}
{"conversations": [{"role": "user", "content": "Explain `TraerParticle` in SuperCollider briefly."}, {"role": "assistant", "content": "TraerParticle — move around in 3D space based on forces applied to them Particles can represent objects, corners of 2D or 3D shapes or abstract things that won't even be drawn. Particles have 5 properties: Category: TraerPhysics."}]}
{"conversations": [{"role": "user", "content": "What is `PLastValue` in SuperCollider?"}, {"role": "assistant", "content": "PLastValue — UGenPatterns quark library Based on LastValue Category: Streams-Patterns-Events > UGenPatterns > Modifiers."}]}
{"conversations": [{"role": "user", "content": "Explain `PLastValue` in SuperCollider briefly."}, {"role": "assistant", "content": "PLastValue — UGenPatterns quark library Based on LastValue Category: Streams-Patterns-Events > UGenPatterns > Modifiers."}]}
{"conversations": [{"role": "user", "content": "What is `FoaMagNa` in SuperCollider?"}, {"role": "assistant", "content": "FoaMagNa — First Order Ambisonic (FOA) Magnitude of Soundfield Unit Normalized Active Intensity Vector Return the Magnitude of Unit Normalized Active Intensity Vector, ||Na||, of a first order ambisonic (B-format) signal. Category: Libraries > Ambisonic Toolkit > UGens > FOA > Analyzer, UGens > Multichannel > Ambisonics, UGens > Analysis > Ambisonics."}]}
{"conversations": [{"role": "user", "content": "Explain `FoaMagNa` in SuperCollider briefly."}, {"role": "assistant", "content": "FoaMagNa — First Order Ambisonic (FOA) Magnitude of Soundfield Unit Normalized Active Intensity Vector Return the Magnitude of Unit Normalized Active Intensity Vector, ||Na||, of a first order ambisonic (B-format) signal. Category: Libraries > Ambisonic Toolkit > UGens > FOA > Analyzer, UGens > Multichannel > Ambisonics, UGens > Analysis > Ambisonics."}]}
{"conversations": [{"role": "user", "content": "What is `FoaRotate` in SuperCollider?"}, {"role": "assistant", "content": "FoaRotate — First Order Ambisonic (FOA) rotation transformer Rotate a First Order Ambisonic signal (B-format) around the z-axis. Category: Libraries > Ambisonic Toolkit > UGens > FOA > Transformer, UGens > Multichannel > Ambisonics."}]}
{"conversations": [{"role": "user", "content": "Explain `FoaRotate` in SuperCollider briefly."}, {"role": "assistant", "content": "FoaRotate — First Order Ambisonic (FOA) rotation transformer Rotate a First Order Ambisonic signal (B-format) around the z-axis. Category: Libraries > Ambisonic Toolkit > UGens > FOA > Transformer, UGens > Multichannel > Ambisonics."}]}
{"conversations": [{"role": "user", "content": "What is `AudioSpec` in SuperCollider?"}, {"role": "assistant", "content": "AudioSpec — datatype expressing an 'audio' rate object An audio spec specifies that the input should be an audio signal, or that an output will be an audio signal. Inputs with an AudioSpec are expecting an audio rate player. eg. filters and effects that take an audio input. Category: Spec, Libraries > crucial > Spec."}]}
{"conversations": [{"role": "user", "content": "Explain `AudioSpec` in SuperCollider briefly."}, {"role": "assistant", "content": "AudioSpec — datatype expressing an 'audio' rate object An audio spec specifies that the input should be an audio signal, or that an output will be an audio signal. Inputs with an AudioSpec are expecting an audio rate player. eg. filters and effects that take an audio input. Category: Spec, Libraries > crucial > Spec."}]}
{"conversations": [{"role": "user", "content": "What is `DictionaryEditor` in SuperCollider?"}, {"role": "assistant", "content": "DictionaryEditor — presents an Editor for each value in a dictionary Presents an Editor for each value in a dictionary. Each value has its own natural Editor as derived from Editor.for Category: Libraries > crucial > Editors."}]}
{"conversations": [{"role": "user", "content": "Explain `DictionaryEditor` in SuperCollider briefly."}, {"role": "assistant", "content": "DictionaryEditor — presents an Editor for each value in a dictionary Presents an Editor for each value in a dictionary. Each value has its own natural Editor as derived from Editor.for Category: Libraries > crucial > Editors."}]}
{"conversations": [{"role": "user", "content": "What is `MultiChanRecorder` in SuperCollider?"}, {"role": "assistant", "content": "MultiChanRecorder — a utility for recording multiple Busses to multiple time-aligned files This is a utility for recording an array of supplied Busses to multiple files. Recording can be paused/resumed. The busses can be optionally mixed and monitored through the main outs. Category: Files."}]}
{"conversations": [{"role": "user", "content": "Explain `MultiChanRecorder` in SuperCollider briefly."}, {"role": "assistant", "content": "MultiChanRecorder — a utility for recording multiple Busses to multiple time-aligned files This is a utility for recording an array of supplied Busses to multiple files. Recording can be paused/resumed. The busses can be optionally mixed and monitored through the main outs. Category: Files."}]}
{"conversations": [{"role": "user", "content": "What is `PlayerMixerGui` in SuperCollider?"}, {"role": "assistant", "content": "PlayerMixerGui — gui class Category: Libraries > crucial > GuiClasses."}]}
{"conversations": [{"role": "user", "content": "Explain `PlayerMixerGui` in SuperCollider briefly."}, {"role": "assistant", "content": "PlayerMixerGui — gui class Category: Libraries > crucial > GuiClasses."}]}
{"conversations": [{"role": "user", "content": "What is `DXEnvFan` in SuperCollider?"}, {"role": "assistant", "content": "DXEnvFan — returns crossfade envelopes according to demand-rate control DXEnvFan returns the multichannel envelope signal, which is used by DXMix / DXMixIn / DXFan / DXFanOut implicitely. It can be used as envelope and trigger at the same time, which leads to applications such as crossfading PlayBufs and different kinds of granulation, using a buffer or not. Category: Libraries > miSCellaneous > DX suite."}]}
{"conversations": [{"role": "user", "content": "Explain `DXEnvFan` in SuperCollider briefly."}, {"role": "assistant", "content": "DXEnvFan — returns crossfade envelopes according to demand-rate control DXEnvFan returns the multichannel envelope signal, which is used by DXMix / DXMixIn / DXFan / DXFanOut implicitely. It can be used as envelope and trigger at the same time, which leads to applications such as crossfading PlayBufs and different kinds of granulation, using a buffer or not. Category: Libraries > miSCellaneous > DX suite."}]}
{"conversations": [{"role": "user", "content": "What is `PSVunion_o` in SuperCollider?"}, {"role": "assistant", "content": "PSVunion_o — Sieve pattern for union of integer generators with offsets and point output Pattern for union of integer generators with offsets and point output. Corresponds to Sieve's methods Sieve#*union_o and Sieve#-union_o. For an introduction and more examples see Sieves_and_Psieve_patterns. Category: Libraries > miSCellaneous > Sieves and Psieve Patterns, Streams-Patterns-Events > Sieves and Psieve Patterns."}]}
{"conversations": [{"role": "user", "content": "Explain `PSVunion_o` in SuperCollider briefly."}, {"role": "assistant", "content": "PSVunion_o — Sieve pattern for union of integer generators with offsets and point output Pattern for union of integer generators with offsets and point output. Corresponds to Sieve's methods Sieve#*union_o and Sieve#-union_o. For an introduction and more examples see Sieves_and_Psieve_patterns. Category: Libraries > miSCellaneous > Sieves and Psieve Patterns, Streams-Patterns-Events > Sieves and Psieve Patterns."}]}
{"conversations": [{"role": "user", "content": "What is `RedSampler` in SuperCollider?"}, {"role": "assistant", "content": "RedSampler — playing soundfiles from memory Nothing fancy. This class just loads soundfiles into RAM and then uses PlayBuf to play them back. It uses the same interface as RedDiskInSampler (except for `numFrames` which is is not implemented here). Category: Red > redSampler."}]}
{"conversations": [{"role": "user", "content": "Explain `RedSampler` in SuperCollider briefly."}, {"role": "assistant", "content": "RedSampler — playing soundfiles from memory Nothing fancy. This class just loads soundfiles into RAM and then uses PlayBuf to play them back. It uses the same interface as RedDiskInSampler (except for `numFrames` which is is not implemented here). Category: Red > redSampler."}]}
{"conversations": [{"role": "user", "content": "What is `SDroneAmplitudes` in SuperCollider?"}, {"role": "assistant", "content": "SDroneAmplitudes — control SDrone amplitudes Amplitude control for LINKClasses/SDrone. Category: SInstruments."}]}
{"conversations": [{"role": "user", "content": "Explain `SDroneAmplitudes` in SuperCollider briefly."}, {"role": "assistant", "content": "SDroneAmplitudes — control SDrone amplitudes Amplitude control for LINKClasses/SDrone. Category: SInstruments."}]}
{"conversations": [{"role": "user", "content": "What is `LFBrownNoise1` in SuperCollider?"}, {"role": "assistant", "content": "LFBrownNoise1 — random walk linear interp Random walk with Gendyn distributions. Category: UGens > Generators > Stochastic."}]}
{"conversations": [{"role": "user", "content": "Explain `LFBrownNoise1` in SuperCollider briefly."}, {"role": "assistant", "content": "LFBrownNoise1 — random walk linear interp Random walk with Gendyn distributions. Category: UGens > Generators > Stochastic."}]}
{"conversations": [{"role": "user", "content": "What is `Concat` in SuperCollider?"}, {"role": "assistant", "content": "Concat — Concatenative Cross-Synthesis on Live Streams Implementation of concatenative sound synthesis based on matching four features from a control input to the database generated from a source input. The control determines which frames of the source get played back, and you can change the weighting of features to refine your matching criteria (ie, make rms the most heavily weighted to have amplitude as the most important criteria). You can also mod Category: UGens > GranularSynthesis."}]}
{"conversations": [{"role": "user", "content": "Explain `Concat` in SuperCollider briefly."}, {"role": "assistant", "content": "Concat — Concatenative Cross-Synthesis on Live Streams Implementation of concatenative sound synthesis based on matching four features from a control input to the database generated from a source input. The control determines which frames of the source get played back, and you can change the weighting of features to refine your matching criteria (ie, make rms the most heavily weighted to have amplitude as the most important criteria). You can also mod Category: UGens > GranularSynthesis."}]}
{"conversations": [{"role": "user", "content": "What is `BufMin` in SuperCollider?"}, {"role": "assistant", "content": "BufMin — detect the largest value (and its position) in an array of UGens Finds the smallest value in a Buffer, and outputs the value and the index. Category: UGens > Multichannel, UGens > Analysis."}]}
{"conversations": [{"role": "user", "content": "Explain `BufMin` in SuperCollider briefly."}, {"role": "assistant", "content": "BufMin — detect the largest value (and its position) in an array of UGens Finds the smallest value in a Buffer, and outputs the value and the index. Category: UGens > Multichannel, UGens > Analysis."}]}
{"conversations": [{"role": "user", "content": "What is `Goertzel` in SuperCollider?"}, {"role": "assistant", "content": "Goertzel — Calculate a single DFT bin, to detect presence of a frequency The Goertzel algorithm is a way to calculate the magnitude and phase of a signal's content at a single specified frequency. It's the equivalent of running an FFT, and then only looking at the output corresponding to a single bin. If you're only interested in a small number of bins then it is more efficient; if you're interested in the majority of bins, you typically want to do an FFT instead. Category: UGens > Filters."}]}
{"conversations": [{"role": "user", "content": "Explain `Goertzel` in SuperCollider briefly."}, {"role": "assistant", "content": "Goertzel — Calculate a single DFT bin, to detect presence of a frequency The Goertzel algorithm is a way to calculate the magnitude and phase of a signal's content at a single specified frequency. It's the equivalent of running an FFT, and then only looking at the output corresponding to a single bin. If you're only interested in a small number of bins then it is more efficient; if you're interested in the majority of bins, you typically want to do an FFT instead. Category: UGens > Filters."}]}
{"conversations": [{"role": "user", "content": "What is `Dfsm` in SuperCollider?"}, {"role": "assistant", "content": "Dfsm — demand rate finite state machine Similar to Pfsm, Dfsm implements a markov chain. Each state has a number of next states out of which one is randomly chosen. Category: UGens > Demand."}]}
{"conversations": [{"role": "user", "content": "Explain `Dfsm` in SuperCollider briefly."}, {"role": "assistant", "content": "Dfsm — demand rate finite state machine Similar to Pfsm, Dfsm implements a markov chain. Each state has a number of next states out of which one is randomly chosen. Category: UGens > Demand."}]}
{"conversations": [{"role": "user", "content": "What is `BRZ2` in SuperCollider?"}, {"role": "assistant", "content": "BRZ2 — Two zero fixed midcut. A special case fixed filter. Implements the formula: Category: UGens > Filters > Linear."}]}
{"conversations": [{"role": "user", "content": "Explain `BRZ2` in SuperCollider briefly."}, {"role": "assistant", "content": "BRZ2 — Two zero fixed midcut. A special case fixed filter. Implements the formula: Category: UGens > Filters > Linear."}]}
{"conversations": [{"role": "user", "content": "What is `DragBoth` in SuperCollider?"}, {"role": "assistant", "content": "DragBoth — A simple drag-and-drop source and receiver Category: GUI > Views."}]}
{"conversations": [{"role": "user", "content": "Explain `DragBoth` in SuperCollider briefly."}, {"role": "assistant", "content": "DragBoth — A simple drag-and-drop source and receiver Category: GUI > Views."}]}
{"conversations": [{"role": "user", "content": "What is `InterplXYC` in SuperCollider?"}, {"role": "assistant", "content": "InterplXYC — envelope specification Takes sets of x, y and curve values and returns a new instance of InterplEnv. x values can be negative (for use in indexing with negative values or signals). See InterplEnv Help for more info. Category: Control, Envelopes."}]}
{"conversations": [{"role": "user", "content": "Explain `InterplXYC` in SuperCollider briefly."}, {"role": "assistant", "content": "InterplXYC — envelope specification Takes sets of x, y and curve values and returns a new instance of InterplEnv. x values can be negative (for use in indexing with negative values or signals). See InterplEnv Help for more info. Category: Control, Envelopes."}]}
{"conversations": [{"role": "user", "content": "What is `LagUD` in SuperCollider?"}, {"role": "assistant", "content": "LagUD — Exponential lag This is essentially the same as Lag except that you can supply a different 60 dB time for when the signal goes up, from when the signal goes down. This is useful for smoothing out control signals, where \"fade in\" should be different from \"fade out\". Category: UGens > Filters."}]}
{"conversations": [{"role": "user", "content": "Explain `LagUD` in SuperCollider briefly."}, {"role": "assistant", "content": "LagUD — Exponential lag This is essentially the same as Lag except that you can supply a different 60 dB time for when the signal goes up, from when the signal goes down. This is useful for smoothing out control signals, where \"fade in\" should be different from \"fade out\". Category: UGens > Filters."}]}
{"conversations": [{"role": "user", "content": "What is `MIDIMessageDispatcherNV` in SuperCollider?"}, {"role": "assistant", "content": "MIDIMessageDispatcherNV — The default dispatcher for MIDIFunc's and MIDIdef's set to respond to touch, program, and bend messages. MIDIMessageDispatcherNV is used to dispatch incoming MIDI touch, program, and bend messages to matching functions. Normally users should not have to create or message instances of this class directly. Category: External Control > MIDI > Dispatchers."}]}
{"conversations": [{"role": "user", "content": "Explain `MIDIMessageDispatcherNV` in SuperCollider briefly."}, {"role": "assistant", "content": "MIDIMessageDispatcherNV — The default dispatcher for MIDIFunc's and MIDIdef's set to respond to touch, program, and bend messages. MIDIMessageDispatcherNV is used to dispatch incoming MIDI touch, program, and bend messages to matching functions. Normally users should not have to create or message instances of this class directly. Category: External Control > MIDI > Dispatchers."}]}
{"conversations": [{"role": "user", "content": "What is `NumChannels` in SuperCollider?"}, {"role": "assistant", "content": "NumChannels — Ensures the number of output channels Ensures the output has the stated number of channels, regardless of the number of input channels. Category: UGens > Multichannel."}]}
{"conversations": [{"role": "user", "content": "Explain `NumChannels` in SuperCollider briefly."}, {"role": "assistant", "content": "NumChannels — Ensures the number of output channels Ensures the output has the stated number of channels, regardless of the number of input channels. Category: UGens > Multichannel."}]}
{"conversations": [{"role": "user", "content": "What is `PV_Conj` in SuperCollider?"}, {"role": "assistant", "content": "PV_Conj — Complex conjugate Converts the FFT frames to their complex conjugate (i.e. reverses the sign of their imaginary part). This is not usually a useful audio effect in itself, but may be a component of other analysis or transformation processes... Category: UGens > FFT."}]}
{"conversations": [{"role": "user", "content": "Explain `PV_Conj` in SuperCollider briefly."}, {"role": "assistant", "content": "PV_Conj — Complex conjugate Converts the FFT frames to their complex conjugate (i.e. reverses the sign of their imaginary part). This is not usually a useful audio effect in itself, but may be a component of other analysis or transformation processes... Category: UGens > FFT."}]}
{"conversations": [{"role": "user", "content": "What is `Pmeanrand` in SuperCollider?"}, {"role": "assistant", "content": "Pmeanrand — random values that tend toward ((lo + hi) / 2) Category: Streams-Patterns-Events > Patterns > Random."}]}
{"conversations": [{"role": "user", "content": "Explain `Pmeanrand` in SuperCollider briefly."}, {"role": "assistant", "content": "Pmeanrand — random values that tend toward ((lo + hi) / 2) Category: Streams-Patterns-Events > Patterns > Random."}]}
{"conversations": [{"role": "user", "content": "What is `PriorityQueue` in SuperCollider?"}, {"role": "assistant", "content": "PriorityQueue — Priority queue data structure PriorityQueue implements a priority queue data structure, which is used to build schedulers. It allows you to put in items at some arbitrary time and pop them in time order. Category: Collections > Ordered."}]}
{"conversations": [{"role": "user", "content": "Explain `PriorityQueue` in SuperCollider briefly."}, {"role": "assistant", "content": "PriorityQueue — Priority queue data structure PriorityQueue implements a priority queue data structure, which is used to build schedulers. It allows you to put in items at some arbitrary time and pop them in time order. Category: Collections > Ordered."}]}
{"conversations": [{"role": "user", "content": "What is `Pselect` in SuperCollider?"}, {"role": "assistant", "content": "Pselect — Filters values returned by a source pattern. This pattern will filter the source pattern using the supplied function func. Category: Streams-Patterns-Events > Patterns > Filter."}]}
{"conversations": [{"role": "user", "content": "Explain `Pselect` in SuperCollider briefly."}, {"role": "assistant", "content": "Pselect — Filters values returned by a source pattern. This pattern will filter the source pattern using the supplied function func. Category: Streams-Patterns-Events > Patterns > Filter."}]}
{"conversations": [{"role": "user", "content": "What is `Score` in SuperCollider?"}, {"role": "assistant", "content": "Score — score of timed OSC commands Score encapsulates a list of timed OSC commands and provides some methods for using it, as well as support for the creation of binary OSC files for non-realtime synthesis. See Non-Realtime-Synthesis for more details. Category: Control, Server > NRT, External Control > OSC."}]}
{"conversations": [{"role": "user", "content": "Explain `Score` in SuperCollider briefly."}, {"role": "assistant", "content": "Score — score of timed OSC commands Score encapsulates a list of timed OSC commands and provides some methods for using it, as well as support for the creation of binary OSC files for non-realtime synthesis. See Non-Realtime-Synthesis for more details. Category: Control, Server > NRT, External Control > OSC."}]}
{"conversations": [{"role": "user", "content": "What is `SpecCentroid` in SuperCollider?"}, {"role": "assistant", "content": "SpecCentroid — Spectral centroid Given an FFT chain, this measures the spectral centroid, which is the weighted mean frequency, or the \"centre of mass\" of the spectrum. (DC is ignored.) Category: UGens > FFT."}]}
{"conversations": [{"role": "user", "content": "Explain `SpecCentroid` in SuperCollider briefly."}, {"role": "assistant", "content": "SpecCentroid — Spectral centroid Given an FFT chain, this measures the spectral centroid, which is the weighted mean frequency, or the \"centre of mass\" of the spectrum. (DC is ignored.) Category: UGens > FFT."}]}
{"conversations": [{"role": "user", "content": "What is `TGrains` in SuperCollider?"}, {"role": "assistant", "content": "TGrains — Buffer granulator. Triggers generate grains from a buffer. Each grain has a Hanning envelope `(sin2(x) for x from 0 to π)` and can be panned over multichannel output. Category: UGens > Buffer, UGens > Generators > Granular."}]}
{"conversations": [{"role": "user", "content": "Explain `TGrains` in SuperCollider briefly."}, {"role": "assistant", "content": "TGrains — Buffer granulator. Triggers generate grains from a buffer. Each grain has a Hanning envelope `(sin2(x) for x from 0 to π)` and can be panned over multichannel output. Category: UGens > Buffer, UGens > Generators > Granular."}]}
{"conversations": [{"role": "user", "content": "What is `ZeroCrossing` in SuperCollider?"}, {"role": "assistant", "content": "ZeroCrossing — Zero crossing frequency follower Outputs a frequency based upon the distance between interceptions of the X axis. The X intercepts are determined via linear interpolation so this gives better than just integer wavelength resolution. This is a very crude pitch follower, but can be useful in some situations. Category: UGens > Analysis > Pitch."}]}
{"conversations": [{"role": "user", "content": "Explain `ZeroCrossing` in SuperCollider briefly."}, {"role": "assistant", "content": "ZeroCrossing — Zero crossing frequency follower Outputs a frequency based upon the distance between interceptions of the X axis. The X intercepts are determined via linear interpolation so this gives better than just integer wavelength resolution. This is a very crude pitch follower, but can be useful in some situations. Category: UGens > Analysis > Pitch."}]}
{"conversations": [{"role": "user", "content": "What does `MotifCutProc.new` do?"}, {"role": "assistant", "content": "Create a MotifCutProc object with the given"}]}
{"conversations": [{"role": "user", "content": "What does `MotifCutProc.stringtomotif` do?"}, {"role": "assistant", "content": "Converts a string in a particular form into a Motif. Used for entering Motifs in a StringDialog in live coding. The class method returns a Motif. The form uses integers and the the letter 'r' for repeats, and ignores all else. For example `3r4 = [ 3, 3, 3,3 ]` It would then be converted into beats, by a multiplier like 0.5, 0.25. This method is unnecessary since you can go"}]}
{"conversations": [{"role": "user", "content": "What does `StatBalProc.new` do? What arguments does it take?"}, {"role": "assistant", "content": "Automatic breakbeat cutting algorithm using statistical feedback Arguments: cutsbs — A StatBalStream object that returns a cut size from the next method.; repeatsbs — A StatBalStream object that returns the number of repeats from the next method.; phraselength — Next length of phrase in beats.; rollchance — A probability of a roll near the end of a phrase.; rollallowed — number of beats within sight of the end of the current phrase within which a roll is permissible.; bpsd — beats per sub division. Sets a primitive cut size resolution for choose offset messages.."}]}
{"conversations": [{"role": "user", "content": "What does `Canvas3DItem.cube` do?"}, {"role": "assistant", "content": "Create a 2x2x2 cube centered around [0,0,0]. You can then use #-transform to change it's size, position and Returns: A new instance."}]}
{"conversations": [{"role": "user", "content": "What does `Canvas3DItem.grid` do?"}, {"role": "assistant", "content": "Create a flat NxN grid centered around [0,0,0], spanning [-1,-1,0] to Returns: A new instance."}]}
{"conversations": [{"role": "user", "content": "What does `Canvas3DItem.paths` do?"}, {"role": "assistant", "content": "Get/set the array of paths, where each path is an array of 3D vectors:"}]}
{"conversations": [{"role": "user", "content": "What does `Canvas3DItem.fill` do?"}, {"role": "assistant", "content": "Get/set the Boolean flag for stroking versus filling the item's path. See Pen#*stroke and"}]}
{"conversations": [{"role": "user", "content": "What does `Canvas3DItem.transforms` do?"}, {"role": "assistant", "content": "An array of transformation matrices to be applied when displayed in the canvas. See"}]}
{"conversations": [{"role": "user", "content": "What does `Canvas3DItem.transform` do? What arguments does it take?"}, {"role": "assistant", "content": "Apply a transformation matrix on this items Arguments: matrix — A matrix. See Canvas3D#matrix_transforms.."}]}
{"conversations": [{"role": "user", "content": "What does `EaseInOutBounce.ar` do? What arguments does it take?"}, {"role": "assistant", "content": "Bounce ease-in/out Arguments: t — signal in the range 0.0 to 1.0.; a — overshoot.."}]}
{"conversations": [{"role": "user", "content": "What does `EaseInOutBounce.value` do? What arguments does it take?"}, {"role": "assistant", "content": "Bounce ease-in/out Arguments: t — a Float between 0.0 and 1.0.; a — overshoot. The default is 1.70158."}]}
{"conversations": [{"role": "user", "content": "What does `EaseOutSine.value` do? What arguments does it take?"}, {"role": "assistant", "content": "Sinusoidal ease-out Arguments: t — a Float between 0.0 and 1.0.."}]}
{"conversations": [{"role": "user", "content": "What does `ProteinBioSynthesis.new` do? What arguments does it take?"}, {"role": "assistant", "content": "Return a new pattern from a Arguments: genome — The genome data, a string containing the characters representing the four nucleic acids: guanine (G), adenine (A), thymine (T), or cytosine (C).."}]}
{"conversations": [{"role": "user", "content": "What does `ProteinBioSynthesis.transcriptionDict` do?"}, {"role": "assistant", "content": "The mapping of the 64 tripletIDs to the 21 aminoacids, represented as integer numbers (see below). The genetic code is called 'degenerated', because it is partly redundant. By default, this is the standard translation table for most higher forms of life, the interpretation varies in different"}]}
{"conversations": [{"role": "user", "content": "What does `ProteinBioSynthesis.tripletDict` do?"}, {"role": "assistant", "content": "Internally used to map from triplets (all combinations of the bases) to"}]}
{"conversations": [{"role": "user", "content": "What does `ProteinBioSynthesis.bases` do?"}, {"role": "assistant", "content": "A string of four characters representing the"}]}
{"conversations": [{"role": "user", "content": "What does `ProteinBioSynthesis.aminoacids` do?"}, {"role": "assistant", "content": "An IdentityDictionary mapping aminoacid ids to aminoacid"}]}
{"conversations": [{"role": "user", "content": "What does `ProteinBioSynthesis.startcodon` do?"}, {"role": "assistant", "content": "The triplet that marks the beginning of a valid sequence. This is only used by"}]}
{"conversations": [{"role": "user", "content": "What does `ProteinBioSynthesis.stopcodon` do?"}, {"role": "assistant", "content": "The triplet that marks the end of a valid sequence. This is only used by"}]}
{"conversations": [{"role": "user", "content": "What does `ProteinBioSynthesis.translate` do? What arguments does it take?"}, {"role": "assistant", "content": "Translate nucleic acid triplets to aminoacid id. This is what in protein bio synthesis is called Arguments: triplet — A string of three characters from the nucleic acids. `ProteinBioSynthesis().translate(\"atttggatac\");`."}]}
{"conversations": [{"role": "user", "content": "What does `ProteinBioSynthesis.translateBack` do? What arguments does it take?"}, {"role": "assistant", "content": "Translate from aminoacid id to nucleic acid Arguments: aminoacidIndex — An integer index.."}]}
{"conversations": [{"role": "user", "content": "What does `ProteinBioSynthesis.verbose` do?"}, {"role": "assistant", "content": "If set to true, print information to the post"}]}
{"conversations": [{"role": "user", "content": "What does `ProteinBioSynthesis.transcribe` do?"}, {"role": "assistant", "content": "Transcription is the process that produces the so called codons, the aminoacids from nucleic acid triplets."}]}
{"conversations": [{"role": "user", "content": "What does `ProteinBioSynthesis.loadData` do? What arguments does it take?"}, {"role": "assistant", "content": "Load a genome data file (see example Arguments: path — The file path.; finishFunc — A function to be called when the reading has finished. `x = AminoacidPattern.new.loadData(\"data/escherichia-coli\".re`."}]}
{"conversations": [{"role": "user", "content": "What does `CallWindow.callFunc` do? What arguments does it take?"}, {"role": "assistant", "content": "A call window Arguments: string — String associated with a function to evaluate.; post — Boolean to determine if function gets posted in post window.."}]}
{"conversations": [{"role": "user", "content": "What does `InspManager.global` do?"}, {"role": "assistant", "content": "This will get or create the global Returns: the global InspManager"}]}
{"conversations": [{"role": "user", "content": "What does `InspManager.front` do?"}, {"role": "assistant", "content": "bring the global InspManager to the front if it isn't"}]}
{"conversations": [{"role": "user", "content": "What does `InspManager.window` do?"}, {"role": "assistant", "content": "The window that the InspManager is Returns: a Window"}]}
{"conversations": [{"role": "user", "content": "What does `InspManager.watch` do? What arguments does it take?"}, {"role": "assistant", "content": "called internally to add an Insp to the Arguments: insp — an Insp. Returns: this"}]}
{"conversations": [{"role": "user", "content": "What does `InspManager.showInsp` do? What arguments does it take?"}, {"role": "assistant", "content": "shows this insp in the main viewing area, hiding any Arguments: insp. Returns: this"}]}
{"conversations": [{"role": "user", "content": "What does `InspManager.remove` do?"}, {"role": "assistant", "content": "internal cleanup function for when the window Returns: this"}]}
{"conversations": [{"role": "user", "content": "What does `TraerParticle.position` do?"}, {"role": "assistant", "content": "Move the particle to some 3D location with CODEpositon.set(x, y, z);. Move the particle by some 3D amount with CODEposition.add(x, y, z);. And this is how you get to the dimensions of particle position. CODEposition.x; position.y;"}]}
{"conversations": [{"role": "user", "content": "What does `TraerParticle.velocity` do?"}, {"role": "assistant", "content": "Set the velocity to some 3D quantity, maybe use this to send a particle flying off in a particular direction: CODEvelocity.set(x, y, z);. This adds some 3D quantity to the velocity of the particle. You could maybe use this to speed up or slow down a particle: CODEvelocity.add(x, y, z);. And this is how you get at the dimensions of the particles velocity: CODEvelocity.x; velocity.y;"}]}
{"conversations": [{"role": "user", "content": "What does `TraerParticle.setMass` do?"}, {"role": "assistant", "content": "Set the mass of the particle. Heavier particles will have more inertia and will accelerate slower. Attraction/repulsion forces will also be stronger for heavier particles. If you aren't doing anything special this will probably be the same for all"}]}
{"conversations": [{"role": "user", "content": "What does `TraerParticle.makeFixed` do?"}, {"role": "assistant", "content": "Particles can either be fixed or free. If they are free they move around and are affected by forces, if they are fixed they stay where they"}]}
{"conversations": [{"role": "user", "content": "What does `TraerParticle.age` do?"}, {"role": "assistant", "content": "How long the particle has been around. Every time you advance the simulation by CODEt every particle gets a little older by"}]}
{"conversations": [{"role": "user", "content": "What does `PLastValue.new` do? What arguments does it take?"}, {"role": "assistant", "content": "UGenPatterns quark library Arguments: pattern; diff."}]}
{"conversations": [{"role": "user", "content": "What does `FoaMagNa.ar` do? What arguments does it take?"}, {"role": "assistant", "content": "First Order Ambisonic (FOA) Magnitude of Soundfield Unit Normalized Active Intensity Vector Arguments: in — The B-format signal, an array: [w, x, y, z]; size — Analysis filter kernel size.; method — The Soundfield analysis method:."}]}
{"conversations": [{"role": "user", "content": "What does `FoaRotate.ar` do? What arguments does it take?"}, {"role": "assistant", "content": "First Order Ambisonic (FOA) rotation transformer Arguments: in — The B-format signal, an array: [w, x, y, z]; angle — Rotation angle, in radians.; mul — Output will be multiplied by this value.; add — This value will be added to the output.."}]}
{"conversations": [{"role": "user", "content": "What does `AudioSpec.new` do? What arguments does it take?"}, {"role": "assistant", "content": "datatype expressing an 'audio' rate object Arguments: numChannels — The number of channels your input requires. Default value is 1. This can also be nil which expresses that your Instr will multi-channel expand if given more than one channel. ie. its mono-stereo compatible."}]}
{"conversations": [{"role": "user", "content": "What does `AudioSpec.initClass` do?"}, {"role": "assistant", "content": "datatype expressing an 'audio' rate object"}]}
{"conversations": [{"role": "user", "content": "What does `AudioSpec.numChannels` do?"}, {"role": "assistant", "content": "datatype expressing an 'audio' rate object"}]}
{"conversations": [{"role": "user", "content": "What does `AudioSpec.defaultControl` do?"}, {"role": "assistant", "content": "datatype expressing an 'audio' rate object"}]}
{"conversations": [{"role": "user", "content": "What does `AudioSpec.storeArgs` do?"}, {"role": "assistant", "content": "datatype expressing an 'audio' rate object"}]}
{"conversations": [{"role": "user", "content": "What does `AudioSpec.rate` do?"}, {"role": "assistant", "content": "datatype expressing an 'audio' rate object"}]}
{"conversations": [{"role": "user", "content": "What does `AudioSpec.canAccept` do? What arguments does it take?"}, {"role": "assistant", "content": "datatype expressing an 'audio' rate object Arguments: thing."}]}
{"conversations": [{"role": "user", "content": "What does `AudioSpec.constrain` do? What arguments does it take?"}, {"role": "assistant", "content": "datatype expressing an 'audio' rate object Arguments: ... args."}]}
{"conversations": [{"role": "user", "content": "What does `AudioSpec.color` do?"}, {"role": "assistant", "content": "datatype expressing an 'audio' rate object"}]}
{"conversations": [{"role": "user", "content": "What does `DictionaryEditor.new` do? What arguments does it take?"}, {"role": "assistant", "content": "presents an Editor for each value in a dictionary Arguments: dict."}]}
{"conversations": [{"role": "user", "content": "What does `DictionaryEditor.editing` do?"}, {"role": "assistant", "content": "presents an Editor for each value in a dictionary"}]}
{"conversations": [{"role": "user", "content": "What does `DictionaryEditor.value` do? What arguments does it take?"}, {"role": "assistant", "content": "presents an Editor for each value in a dictionary Arguments: dict."}]}
{"conversations": [{"role": "user", "content": "What does `DictionaryEditor.guiClass` do?"}, {"role": "assistant", "content": "presents an Editor for each value in a dictionary"}]}
{"conversations": [{"role": "user", "content": "What does `MultiChanRecorder.new` do? What arguments does it take?"}, {"role": "assistant", "content": "a utility for recording multiple Busses to multiple time-aligned files Arguments: busses."}]}
{"conversations": [{"role": "user", "content": "What does `MultiChanRecorder.limit` do?"}, {"role": "assistant", "content": "boolean By default it uses a Limiter on each channel. Set limit to false to defeat"}]}
{"conversations": [{"role": "user", "content": "What does `MultiChanRecorder.path` do?"}, {"role": "assistant", "content": "a utility for recording multiple Busses to multiple time-aligned files"}]}
{"conversations": [{"role": "user", "content": "What does `MultiChanRecorder.recHeaderFormat` do?"}, {"role": "assistant", "content": "a utility for recording multiple Busses to multiple time-aligned files"}]}
{"conversations": [{"role": "user", "content": "What does `MultiChanRecorder.recSampleFormat` do?"}, {"role": "assistant", "content": "a utility for recording multiple Busses to multiple time-aligned files"}]}
{"conversations": [{"role": "user", "content": "What does `MultiChanRecorder.init` do? What arguments does it take?"}, {"role": "assistant", "content": "a utility for recording multiple Busses to multiple time-aligned files Arguments: buses."}]}
{"conversations": [{"role": "user", "content": "What does `MultiChanRecorder.prepareForRecord` do? What arguments does it take?"}, {"role": "assistant", "content": "a utility for recording multiple Busses to multiple time-aligned files Arguments: basePath."}]}
{"conversations": [{"role": "user", "content": "What does `MultiChanRecorder.isPrepared` do?"}, {"role": "assistant", "content": "a utility for recording multiple Busses to multiple time-aligned files"}]}
{"conversations": [{"role": "user", "content": "What does `MultiChanRecorder.record` do? What arguments does it take?"}, {"role": "assistant", "content": "a utility for recording multiple Busses to multiple time-aligned files Arguments: atTime — see atTime."}]}
{"conversations": [{"role": "user", "content": "What does `MultiChanRecorder.isRecording` do?"}, {"role": "assistant", "content": "a utility for recording multiple Busses to multiple time-aligned files"}]}
{"conversations": [{"role": "user", "content": "What does `MultiChanRecorder.pauseRecording` do? What arguments does it take?"}, {"role": "assistant", "content": "a utility for recording multiple Busses to multiple time-aligned files Arguments: atTime — see atTime."}]}
{"conversations": [{"role": "user", "content": "What does `MultiChanRecorder.stop` do?"}, {"role": "assistant", "content": "a utility for recording multiple Busses to multiple time-aligned files"}]}
{"conversations": [{"role": "user", "content": "What does `MultiChanRecorder.monitor` do? What arguments does it take?"}, {"role": "assistant", "content": "a utility for recording multiple Busses to multiple time-aligned files Arguments: boo."}]}
{"conversations": [{"role": "user", "content": "What does `MultiChanRecorder.isMonitoring` do?"}, {"role": "assistant", "content": "a utility for recording multiple Busses to multiple time-aligned files"}]}
{"conversations": [{"role": "user", "content": "What does `MultiChanRecorder.cmdPeriod` do?"}, {"role": "assistant", "content": "a utility for recording multiple Busses to multiple time-aligned files"}]}
{"conversations": [{"role": "user", "content": "What does `DXEnvFan.kr` do?"}, {"role": "assistant", "content": "returns crossfade envelopes according to demand-rate control"}]}
{"conversations": [{"role": "user", "content": "What does `PSVunion_o.new` do? What arguments does it take?"}, {"role": "assistant", "content": "Creates a new PSVunion_o Arguments: genList — An array of generators and corresponding offsets. Allowed generators: Integers, Streams or Patterns producing intervals or Sieves itself. Integers and Stream/Pattern output must be strictly positive. Integers as generators produce zero and its positive multiples. Offsets must be integers.; maxLength — Integer. Maximum number of items, which the stream will return. Defaults to inf.; limit — Integer. Limit up to which integers can be returned by the stream. If no limit is passed, returned integers might go up to default limit 65536.."}]}
{"conversations": [{"role": "user", "content": "What does `RedSampler.prepareForPlay` do? What arguments does it take?"}, {"role": "assistant", "content": "Attach a soundfile to a key (number or symbol) and create buffers - one for each overlapping voice. This method is also has the alias `preload` for backward Arguments: key — A number or a symbol.; path — A string to a soundfile.; startFrame — In samples.; numFrames — How much of the file to load in samples. Leave as `nil` to load the complete file.."}]}
{"conversations": [{"role": "user", "content": "What does `SDroneAmplitudes.def` do?"}, {"role": "assistant", "content": "the definition that send out control data on bus Returns: a LINKClasses/SynthDef."}]}
{"conversations": [{"role": "user", "content": "What does `LFBrownNoise1.ar` do? What arguments does it take?"}, {"role": "assistant", "content": "random walk linear interp Arguments: freq — approximate rate at which to generate random values.; dev — scale maximum step (0-1).; dist — Gendyn distribution to use (0-5: see Gendy1 for details).."}]}
{"conversations": [{"role": "user", "content": "What does `Concat.ar` do? What arguments does it take?"}, {"role": "assistant", "content": "Concatenative Cross-Synthesis on Live Streams Arguments: control — audio rate input, acts as control; source — audio rate input, source for cross-synthesis; storesize — size of source store sample buffer in seconds; seektime — Time in seconds into the past to start searching for matches; seekdur — Time in seconds from seektime towards the present to test matches; matchlength — Match length in seconds (this will be rounded to the nearest FFT frame); freezestore — Stop collecting novel source input, keep store (database) fixed; zcr — Weight for zero crossing rate feature."}]}
{"conversations": [{"role": "user", "content": "What does `BufMin.kr` do? What arguments does it take?"}, {"role": "assistant", "content": "detect the largest value (and its position) in an array of UGens Arguments: bufnum; gate — You don't need to make use of the gate control: if you do use it, the calculation is only performed when gate>0.. Returns: # val, index"}]}
{"conversations": [{"role": "user", "content": "What does `Goertzel.kr` do? What arguments does it take?"}, {"role": "assistant", "content": "Calculate a single DFT bin, to detect presence of a frequency Arguments: in; bufsize — used in the same way as an FFT buffer size - the larger this value, the better the frequency resolution, but the worse the time resolution.; freq — target frequency. This can not be modulated.; hop — same meaning as in the FFT UGen. Supply a value between zero and one, for the amount of overlap between Goertzel \"frames\". The default is a hop of 1 (meaning no overlap between frames). If you specify 0.5 then the analysis value will be produced twice as often; 0.25, four times as often.."}]}
{"conversations": [{"role": "user", "content": "What does `Dfsm.new` do? What arguments does it take?"}, {"role": "assistant", "content": "demand rate finite state machine Arguments: rules — array in the format:; n — number of items from each state to embed. If inf, they are embedded completely.; rgen — demand rate random number generator that should ouput values between 0.0 and 1.0. If a deterministic ugen is used, the choice of next states of the finite state machine can be controlled (i.e. 0 will allways choose the first, 1 always the last, else in between).."}]}
{"conversations": [{"role": "user", "content": "What does `BRZ2.ar` do? What arguments does it take?"}, {"role": "assistant", "content": "Two zero fixed midcut. Arguments: in — The input signal.."}]}
{"conversations": [{"role": "user", "content": "What does `DragBoth.defaultGetDrag` do?"}, {"role": "assistant", "content": "A simple drag-and-drop source and receiver Returns: The StaticText#-object#-object."}]}
{"conversations": [{"role": "user", "content": "What does `DragBoth.defaultCanReceiveDrag` do?"}, {"role": "assistant", "content": "A simple drag-and-drop source and receiver Returns: Always True."}]}
{"conversations": [{"role": "user", "content": "What does `DragBoth.defaultReceiveDrag` do?"}, {"role": "assistant", "content": "Sets the StaticText#-object#-object to the current drag"}]}
{"conversations": [{"role": "user", "content": "What does `LagUD.ar` do? What arguments does it take?"}, {"role": "assistant", "content": "Exponential lag Arguments: in — input signal.; lagTimeU — 60 dB lag time in seconds for the upgoing signal.; lagTimeD — 60 dB lag time in seconds for the downgoing signal.; mul; add."}]}
{"conversations": [{"role": "user", "content": "What does `MIDIMessageDispatcherNV.getKeysForFuncProxy` do? What arguments does it take?"}, {"role": "assistant", "content": "Get the keys at which a responder func's functions are stored in this dispatcher's active dictionary. The keys will be MIDI Arguments: funcProxy — The MIDIFunc or MIDIdef whose keys should be returned.. Returns: An Array containing the funcProxy's channel number as an Integer."}]}
{"conversations": [{"role": "user", "content": "What does `MIDIMessageDispatcherNV.value` do? What arguments does it take?"}, {"role": "assistant", "content": "Attempt to match an incoming MIDI message with this dispatcher's responder funcs, and evaluate their functions for all matches Arguments: src — The UID of the source of the MIDI message as an Integer.; chan — The channel number of the MIDI message as an Integer. Note this should be in the range 0-15.; val — The message value (e.g. velocity, etc.) of the MIDI message as an Integer. Note this should be in the range 0-127.."}]}
{"conversations": [{"role": "user", "content": "What does `MIDIMessageDispatcherNV.wrapFunc` do? What arguments does it take?"}, {"role": "assistant", "content": "Called internally to wrap functions in message matcher objects, if Arguments: funcProxy — An instance of MIDIFunc or MIDIdef whose function(s) are to be wrapped.."}]}
{"conversations": [{"role": "user", "content": "What does `NumChannels.ar` do? What arguments does it take?"}, {"role": "assistant", "content": "Ensures the number of output channels Arguments: input — the audio signal; numChannels — an integer; mixdown — true/false, whether you want to mixdown or just use the first channel."}]}
{"conversations": [{"role": "user", "content": "What does `PV_Conj.new` do? What arguments does it take?"}, {"role": "assistant", "content": "Complex conjugate Arguments: buffer — FFT chain.."}]}
{"conversations": [{"role": "user", "content": "What does `Pmeanrand.new` do? What arguments does it take?"}, {"role": "assistant", "content": "random values that tend toward ((lo + hi) / 2) Arguments: lo — lower boundary of values.; hi — upper boundary of values.; length — number of values produced.."}]}
{"conversations": [{"role": "user", "content": "What does `PriorityQueue.topPriority` do?"}, {"role": "assistant", "content": "Returns the time of the earliest item in the"}]}
{"conversations": [{"role": "user", "content": "What does `PriorityQueue.notEmpty` do?"}, {"role": "assistant", "content": "Return a Boolean whether the queue is not"}]}
{"conversations": [{"role": "user", "content": "What does `Pselect.new` do? What arguments does it take?"}, {"role": "assistant", "content": "Filters values returned by a source pattern. Arguments: func — A Function that takes one parameter (the next value from pattern) and returns a boolean.; pattern — The source Pattern.."}]}
{"conversations": [{"role": "user", "content": "What does `Score.new` do? What arguments does it take?"}, {"role": "assistant", "content": "returns a new Score object with the supplied list. The score is automatically sorted by ascending timestamps, so it is not necessary to call #-sort unless you modify the score Arguments: list — can be an Array, a List, or similar object.."}]}
{"conversations": [{"role": "user", "content": "What does `Score.newFromFile` do? What arguments does it take?"}, {"role": "assistant", "content": "as #*new, but reads the list in from a text Arguments: path — a String indicating the path of the file. The file must contain a valid SC expression.."}]}
{"conversations": [{"role": "user", "content": "What does `Score.play` do? What arguments does it take?"}, {"role": "assistant", "content": "as #*new but immediately plays it. (See also the instance method Arguments: list — the list.; server — If no value is supplied it will play on the default Server.."}]}
{"conversations": [{"role": "user", "content": "What does `Score.write` do? What arguments does it take?"}, {"role": "assistant", "content": "a convenience method to create a binary OSC file for NRT synthesis. Does not create an Arguments: list — the list.; oscFilePath — a String containing the desired path of the OSC file.; clock — Use clock as a tempo base. `TempoClock.default` is used if clock is nil.."}]}
{"conversations": [{"role": "user", "content": "What does `Score.writeFromFile` do? What arguments does it take?"}, {"role": "assistant", "content": "as #*write but reads the list from a Arguments: path — a path to a file with a list.; oscFilePath — a String containing the desired path of the OSC file.; clock — Use clock as a tempo base. `TempoClock.default` is used if clock is nil.."}]}
{"conversations": [{"role": "user", "content": "What does `Score.play` do?"}, {"role": "assistant", "content": "play the list on server, use clock as a tempo base and quantize start time to quant. If server is nil, then on the default server. `TempoClock.default` if clock is nil. now if quant is"}]}
{"conversations": [{"role": "user", "content": "What does `Score.write` do?"}, {"role": "assistant", "content": "create a binary OSC file for NRT synthesis from the list. Use clock as a tempo base. `TempoClock.default` if clock is"}]}
{"conversations": [{"role": "user", "content": "What does `Score.addSystemSynthDefs` do?"}, {"role": "assistant", "content": "Some code requires a number of SynthDefs that are assumed to exist on the server (SystemSynthDefs). When booting a server in realtime mode, they are sent automatically. In non-realtime mode, they need to be added to the score explicitly: `x ="}]}
{"conversations": [{"role": "user", "content": "What does `Score.sort` do?"}, {"role": "assistant", "content": "sort the score by ascending timestamps. The relative order of bundles with the same timestamp is preserved! The initial list passed to the #*new method is sorted automatically. If you modify the score afterwards, it is recommended to sort it before recordNRT or write when you are not sure about the bundle"}]}
{"conversations": [{"role": "user", "content": "What does `Score.recordNRT` do?"}, {"role": "assistant", "content": "synthesize the score in non-realtime. For details of the arguments see #*recordNRT"}]}
{"conversations": [{"role": "user", "content": "What does `SpecCentroid.kr` do? What arguments does it take?"}, {"role": "assistant", "content": "Spectral centroid Arguments: buffer — an FFT chain.."}]}
{"conversations": [{"role": "user", "content": "What does `TGrains.ar` do? What arguments does it take?"}, {"role": "assistant", "content": "Buffer granulator. Arguments: numChannels — The number of output channels. Must be a nonzero, positive integer. This is fixed when the SynthDef is compiled so cannot be assigned to a SynthDef argument.; trigger — At each trigger, the following arguments are sampled and used as the arguments of a new grain. A trigger occurs when a signal changes from non-positive to a positive value. If the trigger is audio rate then the grains will start with sample accuracy.; bufnum — The index of the buffer to use. It must be a one channel (mono) buffer.; rate — 1.0 is normal, 2.0 is one octave up, 0.5 is one octave down -1.0 is backward normal rate… etc.; centerPos — The position in the buffer in seconds at which the grain envelope will reach maximum amplitude.; dur — Duration of the grain in seconds.; pan — determines where to pan the output.; amp — Amplitude of the grain.."}]}
{"conversations": [{"role": "user", "content": "What does `ZeroCrossing.ar` do? What arguments does it take?"}, {"role": "assistant", "content": "Zero crossing frequency follower Arguments: in — Input signal.."}]}
{"conversations": [{"role": "user", "content": "What does this SuperCollider code do?\n```supercollider\ns.boot;\n\nb = Buffer.alloc(s, 100);\nb.zero;\nb.set(33, -1.034);\n// This should detect the 33rd value as the highest...\nx = {BufMin.kr(b).poll}.play;\n\n// ...until we set a new winner...\nb.set(74, -1.038);\n```"}, {"role": "assistant", "content": "This should detect the 33rd value as the highest... ...until we set a new winner... (BufMin: detect the largest value (and its position) in an array of UGens)"}]}
{"conversations": [{"role": "user", "content": "What does this SuperCollider code do?\n```supercollider\ns.boot;\n\n(\nb = Buffer.alloc(s, 2048, 1);\nc = Buffer.read(s, ExampleFiles.child);\nd = Buffer.alloc(s, 2048, 1);\n);\n\n(\nSynthDef(\\help_pvconj, { |out = 0, bufnum = 0, soundBufnum = 2|\n var in, chain;\n in = PlayBuf.ar(1, soundBufnum, BufRateScale.kr(soundBufnum), loop: 1);\n chain = FFT(bufnum, in);\n chain = PV_Conj(chain);\n // Original is left, conj is right\n Out.ar(out, 0.3 * [in, IFFT(chain)]);\n}).play(s, [\\out, 0, \\\n// …\n```"}, {"role": "assistant", "content": "Original is left, conj is right Now we have the original and conjugate, what happens if we add them? (PV_Conj: Complex conjugate)"}]}
{"conversations": [{"role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n// A sample synthDef\n// Here we use store instead of add to store the compiled synthdef in Platform.defaultTempDir +/+ \"synthdefs/\"\n// and make it available to the NRT server\n(\nSynthDef(\"helpscore\", { |out, freq = 440|\n Out.ar(out,\n SinOsc.ar(freq, 0, 0.2) * Line.kr(1, 0, 0.5, doneAction: Done.freeSelf)\n )\n}).store;\n);\n\n// write a sample file for testing\n(\nvar f, g;\nTempoClock.default.tempo = 1;\ng = [\n [0.1, [\\s_new, \\helpscore, 1000, 0, 0, \\freq, 440]],\n [0.2, [\\s_\n// …\n```"}, {"role": "assistant", "content": "Here we use store instead of add to store the compiled synthdef in Platform.defaultTempDir +/+ \"synthdefs/\" and make it available to the NRT server (Score: score of timed OSC commands)"}]}
{"conversations": [{"role": "user", "content": "Explain this SuperCollider code.\n```supercollider\n(\nSynthDef(\"helpscore\", { |out, freq = 440|\n Out.ar(out,\n SinOsc.ar(freq, 0, 0.2) * Line.kr(1, 0, 0.5, doneAction: Done.freeSelf)\n )\n}).store;\n);\n\n// new pattern\n(\np = Pbind(\n \\instrument, \\helpscore,\n \\dur, Prand([0.3, 0.5], inf),\n \\freq, Prand([200, 300, 500], inf)\n);\n);\n\n// make a score from the pattern, 4 beats long\nz = p.asScore(4.0);\nz.score.postcs;\nz.play;\n\n// rendering a pattern to sound file directly:\n// render the pattern to wav (4 beats)\np.render(Platform\n// …\n```"}, {"role": "assistant", "content": "make a score from the pattern, 4 beats long rendering a pattern to sound file directly: (Score: score of timed OSC commands)"}]}
{"conversations": [{"role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\nSynthDef(\"help-LFNoise1\", { arg out=0;\n Out.ar(out,\n LFBrownNoise1.ar(1000, 1, MouseX.kr(0, 5), 0.25)\n )\n}).play;\n);\n\n//use as frequency control\n(\nSynthDef(\"help-LFNoise1\", { arg out=0;\n Out.ar(out,\n SinOsc.ar(\n LFBrownNoise1.ar(8.dup, 0.2, 2, 400, 450),\n 0, 0.2\n )\n )\n}).play;\n```"}, {"role": "assistant", "content": "A closing bracket is missing: the parenthesis opened earlier is never closed, so the expression cannot be parsed.\n\n```supercollider\n(\nSynthDef(\"help-LFNoise1\", { arg out=0;\n Out.ar(out,\n LFBrownNoise1.ar(1000, 1, MouseX.kr(0, 5), 0.25)\n )\n}).play;\n);\n\n//use as frequency control\n(\nSynthDef(\"help-LFNoise1\", { arg out=0;\n Out.ar(out,\n SinOsc.ar(\n LFBrownNoise1.ar(8.dup, 0.2, 2, 400, 450),\n 0, 0.2\n )\n )\n}).play;\n)\n```"}]}
{"conversations": [{"role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\ns.boot;\n\nb = Buffer.alloc(s, 100);\nb.zero;\nb.set(33, -1.034);\n// This should detect the 33rd value as the highest...\nx = {BufMin.kr(b).poll}.play;\n\n// ...until we set a new winner...\nb.set(74, -1.038;\n```"}, {"role": "assistant", "content": "A closing bracket is missing: the parenthesis opened earlier is never closed, so the expression cannot be parsed.\n\n```supercollider\ns.boot;\n\nb = Buffer.alloc(s, 100);\nb.zero;\nb.set(33, -1.034);\n// This should detect the 33rd value as the highest...\nx = {BufMin.kr(b).poll}.play;\n\n// ...until we set a new winner...\nb.set(74, -1.038);\n```"}]}
{"conversations": [{"role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// Compare:\n\n{ WhiteNoise.ar(0.25) }.play;\n\n{ BRZ2.ar(WhiteNoise.ar(0.25) }.play;\n```"}, {"role": "assistant", "content": "A closing bracket is missing: the parenthesis opened earlier is never closed, so the expression cannot be parsed.\n\n```supercollider\n// Compare:\n\n{ WhiteNoise.ar(0.25) }.play;\n\n{ BRZ2.ar(WhiteNoise.ar(0.25)) }.play;\n```"}]}
{"conversations": [{"role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\n{\n NumChannels.ar(\n SinOsc.ar(100, 0, 0.2), // 1 becomes 2\n 2)\n}.play\n);\n\n(\n{\n NumChannels.ar(\n SinOsc.ar([100, 200, 300], 0, 0.2), // 3 becomes 2\n 2)\n}.play\n);\n\n(\n{\n NumChannels.ar(\n SinOsc.ar([100, 200, 300, 100], 0, 0.2), // 4 becomes 2\n\n 2)\n}.play\n```"}, {"role": "assistant", "content": "A closing bracket is missing: the parenthesis opened earlier is never closed, so the expression cannot be parsed.\n\n```supercollider\n(\n{\n NumChannels.ar(\n SinOsc.ar(100, 0, 0.2), // 1 becomes 2\n 2)\n}.play\n);\n\n(\n{\n NumChannels.ar(\n SinOsc.ar([100, 200, 300], 0, 0.2), // 3 becomes 2\n 2)\n}.play\n);\n\n(\n{\n NumChannels.ar(\n SinOsc.ar([100, 200, 300, 100], 0, 0.2), // 4 becomes 2\n\n 2)\n}.play\n)\n```"}]}
{"conversations": [{"role": "user", "content": "Write a minimal SuperCollider example that uses `BRZ2`."}, {"role": "assistant", "content": "```supercollider\n// Compare:\n\n{ WhiteNoise.ar(0.25) }.play;\n\n{ BRZ2.ar(WhiteNoise.ar(0.25)) }.play;\n```"}]}
{"conversations": [{"role": "user", "content": "Write a minimal SuperCollider example that uses `NumChannels`."}, {"role": "assistant", "content": "```supercollider\n(\n{\n NumChannels.ar(\n SinOsc.ar(100, 0, 0.2), // 1 becomes 2\n 2)\n}.play\n);\n\n(\n{\n NumChannels.ar(\n SinOsc.ar([100, 200, 300], 0, 0.2), // 3 becomes 2\n 2)\n}.play\n);\n\n(\n{\n NumChannels.ar(\n SinOsc.ar([100, 200, 300, 100], 0, 0.2), // 4 becomes 2\n\n 2)\n}.play\n)\n```"}]}
{"conversations": [{"role": "user", "content": "Write a minimal SuperCollider example that uses `SpecCentroid`."}, {"role": "assistant", "content": "```supercollider\ns.boot;\nb = Buffer.alloc(s, 2048, 1);\n(\nx = {\n var in, chain, freq, rq, centroid;\n\n // freq = LFPar.kr(0.3).exprange(100, 1000);\n freq = MouseY.kr(1000, 100, 1);\n in = Blip.ar(freq, MouseX.kr(1, 100, 1));\n chain = FFT(LocalBuf(2048), in);\n centroid = SpecCentroid.kr(chain);\n centroid.poll(10);\n in.dup * 0.1\n\n}.play\n);\n\nx.free;\n```"}]}
{"conversations": [{"role": "user", "content": "How is `ZeroCrossing` typically used in SuperCollider?"}, {"role": "assistant", "content": "```supercollider\ns.boot;\n(\n{\n var a;\n a = SinOsc.ar(SinOsc.kr(1, 0, 600, 700), 0, 0.1);\n [a, ZeroCrossing.ar(a) * 0.0005]\n}.scope;\n)\n```"}]}
{"conversations": [{"role": "user", "content": "Write a self-contained SuperCollider patch that uses `SpecCentroid`. Define every value it uses."}, {"role": "assistant", "content": "```supercollider\ns.boot;\nb = Buffer.alloc(s, 2048, 1);\n(\nx = {\n var in, chain, freq, rq, centroid;\n\n // freq = LFPar.kr(0.3).exprange(100, 1000);\n freq = MouseY.kr(1000, 100, 1);\n in = Blip.ar(freq, MouseX.kr(1, 100, 1));\n chain = FFT(LocalBuf(2048), in);\n centroid = SpecCentroid.kr(chain);\n centroid.poll(10);\n in.dup * 0.1\n\n}.play\n);\n\nx.free;\n```"}]}
{"conversations": [{"role": "user", "content": "Write a SuperCollider patch for shepard tones alberto de campo that runs as it is, with nothing assumed about the session."}, {"role": "assistant", "content": "```supercollider\n// shepard tones\n// alberto de campo\n(\nvar ampTable, freqTable, b1, b2;\n\nampTable = Signal.hanningWindow(1024).squared;\nfreqTable = Signal.newClear(1024).waveFill({ arg i; 0.5 ** i * 20000 }, 0, 10);\n\nb1 = Buffer.loadCollection(s, freqTable);\nb2 = Buffer.loadCollection(s, ampTable);\n\n{\n var freqs, amps, phasor, ratescale, rate, phases;\n ratescale = 1024 / 44100 / 10;\n rate = 0.1; // once per 10 sec\n phasor = Phasor.ar(0, rate * ratescale, 0, 1024);\n phases = (0..9) * 0.1 * 1024 + phasor;\n\n freqs = BufRd.ar(1, b1.bufnum, phases);\n amps = BufRd.ar(1, b2.bufnum, phases);\n\n Mix.ar(SinOsc.ar(freqs) * amps) * 0.1;\n}.play;\n\n)\n```"}]}
{"conversations": [{"role": "user", "content": "How do I granulate a sample with 0.07 s grains? (rate 16, dur 0.07, interp 4, mode noise, rev 1)"}, {"role": "assistant", "content": "`GrainBuf` needs a buffer, a trigger and a grain duration:\n\n```supercollider\n// granular synth with GrainBuf\n(\ns.waitForBoot {\n var buf = Buffer.read(s, Platform.resourceDir +/+ \"sounds/a11wlk01.wav\");\n var synth;\n SynthDef(\\grainbuf_synth, { |out = 0, amp = 0.3|\n var trig = Impulse.kr(16);\n var pan = LFNoise2.kr(0.3);\n var pos = WhiteNoise.kr(0.3) + 0.5;\n var sig = GrainBuf.ar(2, trig, 0.07, buf, 1, pos, 4, pan);\n sig = FreeVerb.ar(sig, 0.3, 0.8, 0.5);\n Out.ar(out, sig * amp);\n }).add;\n s.sync;\n synth = Synth(\\grainbuf_synth);\n fork { 6.wait; synth.free };\n};\n)\n```"}]}
{"conversations": [{"role": "user", "content": "How do I granulate a sample with 0.15 s grains? (rate 20, dur 0.15, interp 4, mode noise1, rev 0)"}, {"role": "assistant", "content": "Granulation is `GrainBuf` plus a trigger rate; the position can move:\n\n```supercollider\n// granular synth with GrainBuf\n(\ns.waitForBoot {\n var buf = Buffer.read(s, Platform.resourceDir +/+ \"sounds/a11wlk01.wav\");\n var synth;\n SynthDef(\\grainbuf_synth, { |out = 0, amp = 0.3|\n var trig = Impulse.kr(20);\n var pan = LFNoise2.kr(0.3);\n var pos = LFNoise1.kr(0.4).range(0.05, 0.95);\n var sig = GrainBuf.ar(2, trig, 0.15, buf, 1, pos, 4, pan);\n Out.ar(out, sig * amp);\n }).add;\n s.sync;\n synth = Synth(\\grainbuf_synth);\n fork { 6.wait; synth.free };\n};\n)\n```"}]}
{"conversations": [{"role": "user", "content": "Write a granular texture, through a reverb. (rate 28, dur 0.07, interp 2, mode noise1, rev 1)"}, {"role": "assistant", "content": "A working granular patch, with the buffer loaded before the synth starts:\n\n```supercollider\n// granular synth with GrainBuf\n(\ns.waitForBoot {\n var buf = Buffer.read(s, Platform.resourceDir +/+ \"sounds/a11wlk01.wav\");\n var synth;\n SynthDef(\\grainbuf_synth, { |out = 0, amp = 0.3|\n var trig = Impulse.kr(28);\n var pan = LFNoise2.kr(0.3);\n var pos = LFNoise1.kr(0.4).range(0.05, 0.95);\n var sig = GrainBuf.ar(2, trig, 0.07, buf, 1, pos, 2, pan);\n sig = FreeVerb.ar(sig, 0.3, 0.8, 0.5);\n Out.ar(out, sig * amp);\n }).add;\n s.sync;\n synth = Synth(\\grainbuf_synth);\n fork { 6.wait; synth.free };\n};\n)\n```"}]}
{"conversations": [{"role": "user", "content": "How do I granulate a sample with 0.2 s grains? (rate 28, dur 0.2, interp 4, mode noise, rev 0)"}, {"role": "assistant", "content": "`GrainBuf` needs a buffer, a trigger and a grain duration:\n\n```supercollider\n// granular synth with GrainBuf\n(\ns.waitForBoot {\n var buf = Buffer.read(s, Platform.resourceDir +/+ \"sounds/a11wlk01.wav\");\n var synth;\n SynthDef(\\grainbuf_synth, { |out = 0, amp = 0.3|\n var trig = Impulse.kr(28);\n var pan = LFNoise2.kr(0.3);\n var pos = WhiteNoise.kr(0.3) + 0.5;\n var sig = GrainBuf.ar(2, trig, 0.2, buf, 1, pos, 4, pan);\n Out.ar(out, sig * amp);\n }).add;\n s.sync;\n synth = Synth(\\grainbuf_synth);\n fork { 6.wait; synth.free };\n};\n)\n```"}]}
{"conversations": [{"role": "user", "content": "How do I granulate a sample with 0.1 s grains? (rate 6, dur 0.1, interp 4, mode noise, rev 0)"}, {"role": "assistant", "content": "Granulation is `GrainBuf` plus a trigger rate; the position can move:\n\n```supercollider\n// granular synth with GrainBuf\n(\ns.waitForBoot {\n var buf = Buffer.read(s, Platform.resourceDir +/+ \"sounds/a11wlk01.wav\");\n var synth;\n SynthDef(\\grainbuf_synth, { |out = 0, amp = 0.3|\n var trig = Impulse.kr(6);\n var pan = LFNoise2.kr(0.3);\n var pos = WhiteNoise.kr(0.3) + 0.5;\n var sig = GrainBuf.ar(2, trig, 0.1, buf, 1, pos, 4, pan);\n Out.ar(out, sig * amp);\n }).add;\n s.sync;\n synth = Synth(\\grainbuf_synth);\n fork { 6.wait; synth.free };\n};\n)\n```"}]}
{"conversations": [{"role": "user", "content": "How do I granulate a sample with 0.1 s grains? (rate 28, dur 0.1, interp 4, mode noise1, rev 0)"}, {"role": "assistant", "content": "Granulation is `GrainBuf` plus a trigger rate; the position can move:\n\n```supercollider\n// granular synth with GrainBuf\n(\ns.waitForBoot {\n var buf = Buffer.read(s, Platform.resourceDir +/+ \"sounds/a11wlk01.wav\");\n var synth;\n SynthDef(\\grainbuf_synth, { |out = 0, amp = 0.3|\n var trig = Impulse.kr(28);\n var pan = LFNoise2.kr(0.3);\n var pos = LFNoise1.kr(0.4).range(0.05, 0.95);\n var sig = GrainBuf.ar(2, trig, 0.1, buf, 1, pos, 4, pan);\n Out.ar(out, sig * amp);\n }).add;\n s.sync;\n synth = Synth(\\grainbuf_synth);\n fork { 6.wait; synth.free };\n};\n)\n```"}]}
{"conversations": [{"role": "user", "content": "Write a GrainBuf synth at 6 grains per second. (rate 6, dur 0.15, interp 2, mode noise1, rev 1)"}, {"role": "assistant", "content": "Granulation is `GrainBuf` plus a trigger rate; the position can move:\n\n```supercollider\n// granular synth with GrainBuf\n(\ns.waitForBoot {\n var buf = Buffer.read(s, Platform.resourceDir +/+ \"sounds/a11wlk01.wav\");\n var synth;\n SynthDef(\\grainbuf_synth, { |out = 0, amp = 0.3|\n var trig = Impulse.kr(6);\n var pan = LFNoise2.kr(0.3);\n var pos = LFNoise1.kr(0.4).range(0.05, 0.95);\n var sig = GrainBuf.ar(2, trig, 0.15, buf, 1, pos, 2, pan);\n sig = FreeVerb.ar(sig, 0.3, 0.8, 0.5);\n Out.ar(out, sig * amp);\n }).add;\n s.sync;\n synth = Synth(\\grainbuf_synth);\n fork { 6.wait; synth.free };\n};\n)\n```"}]}
{"conversations": [{"role": "user", "content": "How do I granulate a sample with 0.07 s grains? (rate 16, dur 0.07, interp 2, mode sweep, rev 1)"}, {"role": "assistant", "content": "A working granular patch, with the buffer loaded before the synth starts:\n\n```supercollider\n// granular synth with GrainBuf\n(\ns.waitForBoot {\n var buf = Buffer.read(s, Platform.resourceDir +/+ \"sounds/a11wlk01.wav\");\n var synth;\n SynthDef(\\grainbuf_synth, { |out = 0, amp = 0.3|\n var trig = Impulse.kr(16);\n var pan = LFNoise2.kr(0.3);\n var pos = Line.kr(0.05, 0.95, 6);\n var sig = GrainBuf.ar(2, trig, 0.07, buf, 1, pos, 2, pan);\n sig = FreeVerb.ar(sig, 0.3, 0.8, 0.5);\n Out.ar(out, sig * amp);\n }).add;\n s.sync;\n synth = Synth(\\grainbuf_synth);\n fork { 6.wait; synth.free };\n};\n)\n```"}]}
{"conversations": [{"role": "user", "content": "Give me a granular patch with noise1 grain position and interp 2. (rate 16, dur 0.07, interp 2, mode noise1, rev 0)"}, {"role": "assistant", "content": "`GrainBuf` needs a buffer, a trigger and a grain duration:\n\n```supercollider\n// granular synth with GrainBuf\n(\ns.waitForBoot {\n var buf = Buffer.read(s, Platform.resourceDir +/+ \"sounds/a11wlk01.wav\");\n var synth;\n SynthDef(\\grainbuf_synth, { |out = 0, amp = 0.3|\n var trig = Impulse.kr(16);\n var pan = LFNoise2.kr(0.3);\n var pos = LFNoise1.kr(0.4).range(0.05, 0.95);\n var sig = GrainBuf.ar(2, trig, 0.07, buf, 1, pos, 2, pan);\n Out.ar(out, sig * amp);\n }).add;\n s.sync;\n synth = Synth(\\grainbuf_synth);\n fork { 6.wait; synth.free };\n};\n)\n```"}]}
{"conversations": [{"role": "user", "content": "Write a GrainBuf synth at 14 grains per second. (rate 14, dur 0.1, interp 4, mode sweep, rev 0)"}, {"role": "assistant", "content": "`GrainBuf` needs a buffer, a trigger and a grain duration:\n\n```supercollider\n// granular synth with GrainBuf\n(\ns.waitForBoot {\n var buf = Buffer.read(s, Platform.resourceDir +/+ \"sounds/a11wlk01.wav\");\n var synth;\n SynthDef(\\grainbuf_synth, { |out = 0, amp = 0.3|\n var trig = Impulse.kr(14);\n var pan = LFNoise2.kr(0.3);\n var pos = Line.kr(0.05, 0.95, 6);\n var sig = GrainBuf.ar(2, trig, 0.1, buf, 1, pos, 4, pan);\n Out.ar(out, sig * amp);\n }).add;\n s.sync;\n synth = Synth(\\grainbuf_synth);\n fork { 6.wait; synth.free };\n};\n)\n```"}]}
{"conversations": [{"role": "user", "content": "Write a kick at amp 0.6 with a click."}, {"role": "assistant", "content": "A kick is a sine with a fast pitch drop and a short amplitude envelope:\n\n```supercollider\n// kick drum: sine oscillator, 0.06 s pitch sweep\n(\nSynthDef(\\kick_synth, { |out = 0, amp = 0.6|\n var pitch = EnvGen.kr(Env([220, 55], [0.06], [-6]));\n var sig = SinOsc.ar(pitch);\n var env = EnvGen.kr(Env.perc(0.001, 0.5, 1, -4), doneAction: 2);\n var click = HPF.ar(WhiteNoise.ar(0.4) * EnvGen.kr(Env.perc(0.0005, 0.012)), 3000);\n Out.ar(out, ((sig * env * amp) + click * amp * 0.3).dup);\n}).add;\ns.waitForBoot { Synth(\\kick_synth) };\n)\n```"}]}
{"conversations": [{"role": "user", "content": "Give me a saw kick with a 0.06 s pitch sweep. (osc saw, sweep 0.06, decay 0.25, f0 220, f1 55, amp 0.8, rev 1)"}, {"role": "assistant", "content": "The pitch envelope is what makes it read as a drum, not the oscillator:\n\n```supercollider\n// kick drum: saw oscillator, 0.06 s pitch sweep\n(\nSynthDef(\\kick_synth, { |out = 0, amp = 0.8|\n var pitch = EnvGen.kr(Env([220, 55], [0.06], [-6]));\n var sig = LFTri.ar(pitch);\n var env = EnvGen.kr(Env.perc(0.001, 0.25, 1, -4), doneAction: 2);\n var click = HPF.ar(WhiteNoise.ar(0.4) * EnvGen.kr(Env.perc(0.0005, 0.012)), 3000);\n Out.ar(out, ((sig * env * amp) + click * amp * 0.3).dup);\n}).add;\ns.waitForBoot { Synth(\\kick_synth) };\n)\n```"}]}
{"conversations": [{"role": "user", "content": "Give me a saw kick with a 0.06 s pitch sweep. (osc saw, sweep 0.06, decay 0.5, f0 180, f1 48, amp 0.8, rev 0)"}, {"role": "assistant", "content": "The pitch envelope is what makes it read as a drum, not the oscillator:\n\n```supercollider\n// kick drum: saw oscillator, 0.06 s pitch sweep\n(\nSynthDef(\\kick_synth, { |out = 0, amp = 0.8|\n var pitch = EnvGen.kr(Env([180, 48], [0.06], [-6]));\n var sig = LFTri.ar(pitch);\n var env = EnvGen.kr(Env.perc(0.001, 0.5, 1, -4), doneAction: 2);\n Out.ar(out, ((sig * env * amp) + 0).dup);\n}).add;\ns.waitForBoot { Synth(\\kick_synth) };\n)\n```"}]}
{"conversations": [{"role": "user", "content": "Give me an Ndef with an LFO at 0.3 Hz. (ugens saw, cutoff 400, lfo 0.3, freq 82.5, amp 0.12)"}, {"role": "assistant", "content": "`Ndef` is a named proxy you can redefine while it is playing:\n\n```supercollider\n// Ndef drone: saw source through a 400 Hz low-pass\n(\nNdef(\\nd_saw_82_400, { |freq = 82.5, amp = 0.12|\n var sig = Saw.ar([freq, freq * 1.007]);\n var lfo = SinOsc.kr(0.3).range(0.4, 1);\n sig = RLPF.ar(sig, 400 * lfo, 0.4);\n sig = sig + (DelayN.ar(sig, 0.25, 0.25) * 0.2);\n sig * amp;\n}).play;\n)\n```"}]}
{"conversations": [{"role": "user", "content": "Write an Ndef with a sine source and a 1400 Hz low-pass."}, {"role": "assistant", "content": "`Ndef` is a named proxy you can redefine while it is playing:\n\n```supercollider\n// Ndef drone: sine source through a 1400 Hz low-pass\n(\nNdef(\\nd_sine_55_1400, { |freq = 55, amp = 0.12|\n var sig = SinOsc.ar([freq, freq * 1.005], [0, pi]);\n var lfo = SinOsc.kr(0.8).range(0.4, 1);\n sig = RLPF.ar(sig, 1400 * lfo, 0.4);\n sig = sig + (DelayN.ar(sig, 0.25, 0.25) * 0.2);\n sig * amp;\n}).play;\n)\n```"}]}
{"conversations": [{"role": "user", "content": "Write an Ndef at 220 Hz I can retune while it plays. (ugens sine, cutoff 400, lfo 0.3, freq 220, amp 0.12)"}, {"role": "assistant", "content": "Use `Ndef` when the patch has to change without stopping:\n\n```supercollider\n// Ndef drone: sine source through a 400 Hz low-pass\n(\nNdef(\\nd_sine_220_400, { |freq = 220, amp = 0.12|\n var sig = SinOsc.ar([freq, freq * 1.005], [0, pi]);\n var lfo = SinOsc.kr(0.3).range(0.4, 1);\n sig = RLPF.ar(sig, 400 * lfo, 0.4);\n sig = sig + (DelayN.ar(sig, 0.25, 0.25) * 0.2);\n sig * amp;\n}).play;\n)\n```"}]}
{"conversations": [{"role": "user", "content": "How do I build a live drone with Ndef at 55 Hz? (ugens sine, cutoff 800, lfo 0.3, freq 55, amp 0.12)"}, {"role": "assistant", "content": "`Ndef` is a named proxy you can redefine while it is playing:\n\n```supercollider\n// Ndef drone: sine source through a 800 Hz low-pass\n(\nNdef(\\nd_sine_55_800, { |freq = 55, amp = 0.12|\n var sig = SinOsc.ar([freq, freq * 1.005], [0, pi]);\n var lfo = SinOsc.kr(0.3).range(0.4, 1);\n sig = RLPF.ar(sig, 800 * lfo, 0.4);\n sig = sig + (DelayN.ar(sig, 0.25, 0.25) * 0.2);\n sig * amp;\n}).play;\n)\n```"}]}
{"conversations": [{"role": "user", "content": "Give me an Ndef with an LFO at 0.1 Hz. (ugens tri, cutoff 200, lfo 0.1, freq 82.5, amp 0.12)"}, {"role": "assistant", "content": "Use `Ndef` when the patch has to change without stopping:\n\n```supercollider\n// Ndef drone: tri source through a 200 Hz low-pass\n(\nNdef(\\nd_tri_82_200, { |freq = 82.5, amp = 0.12|\n var sig = LFTri.ar([freq, freq * 0.997]);\n var lfo = SinOsc.kr(0.1).range(0.4, 1);\n sig = RLPF.ar(sig, 200 * lfo, 0.4);\n sig = sig + (DelayN.ar(sig, 0.25, 0.25) * 0.2);\n sig * amp;\n}).play;\n)\n```"}]}
{"conversations": [{"role": "user", "content": "How do I build a live drone with Ndef at 220 Hz? (ugens sine, cutoff 400, lfo 0.8, freq 220, amp 0.12)"}, {"role": "assistant", "content": "`Ndef` is a named proxy you can redefine while it is playing:\n\n```supercollider\n// Ndef drone: sine source through a 400 Hz low-pass\n(\nNdef(\\nd_sine_220_400, { |freq = 220, amp = 0.12|\n var sig = SinOsc.ar([freq, freq * 1.005], [0, pi]);\n var lfo = SinOsc.kr(0.8).range(0.4, 1);\n sig = RLPF.ar(sig, 400 * lfo, 0.4);\n sig = sig + (DelayN.ar(sig, 0.25, 0.25) * 0.2);\n sig * amp;\n}).play;\n)\n```"}]}
{"conversations": [{"role": "user", "content": "Give me a Pbind with sine voices and a 0.3 rhythm. (scale majorPentatonic, seq Prand, dur 0.3, octave 6, instr sine, root 0)"}, {"role": "assistant", "content": "`Pbind` sequences an Event per beat, and `\\degree` + `\\scale` does the pitch:\n\n```supercollider\n(\nSynthDef(\\sine_pad, { |out = 0, freq = 440, amp = 0.2|\n var env = EnvGen.kr(Env.perc(0.01, 0.5, 1, -2), doneAction: 2);\n var sig = SinOsc.ar(freq) * env;\n Out.ar(out, (sig * amp).dup);\n}).add;\n);\n// Pbind over majorPentatonic, Prand degrees, 0.3 s\n(\nPbind(\n \\instrument, \\sine_pad,\n \\scale, Scale.majorPentatonic,\n \\root, 0,\n \\degree, Prand([0, 2, 4, 7, 9], inf),\n \\octave, 6,\n \\dur, Prand([0.2, 0.3], inf),\n \\amp, 0.2,\n \\strum, 0.02\n).play;\n)\n```"}]}
{"conversations": [{"role": "user", "content": "Write a Pbind in majorPentatonic using Prand for the degrees. (scale majorPentatonic, seq Prand, dur 0.2, octave 4, instr pluck, root 0)"}, {"role": "assistant", "content": "`Pbind` sequences an Event per beat, and `\\degree` + `\\scale` does the pitch:\n\n```supercollider\n(\nSynthDef(\\pluck, { |out = 0, freq = 440, amp = 0.2|\n var env = EnvGen.kr(Env.perc(0.004, 0.35, 1, -3), doneAction: 2);\n var sig = Saw.ar(freq) * env;\n Out.ar(out, (sig * amp).dup);\n}).add;\n);\n// Pbind over majorPentatonic, Prand degrees, 0.2 s\n(\nPbind(\n \\instrument, \\pluck,\n \\scale, Scale.majorPentatonic,\n \\root, 0,\n \\degree, Prand([0, 2, 4, 7, 9], inf),\n \\octave, 4,\n \\dur, Pseq([0.2, 0.2, 0.4], inf),\n \\amp, 0.2,\n \\strum, 0.02\n).play;\n)\n```"}]}
{"conversations": [{"role": "user", "content": "Write a Pbind in minorPentatonic using Pseq for the degrees. (scale minorPentatonic, seq Pseq, dur 0.25, octave 5, instr sine, root 0)"}, {"role": "assistant", "content": "`Pbind` sequences an Event per beat, and `\\degree` + `\\scale` does the pitch:\n\n```supercollider\n(\nSynthDef(\\sine_pad, { |out = 0, freq = 440, amp = 0.2|\n var env = EnvGen.kr(Env.perc(0.01, 0.5, 1, -2), doneAction: 2);\n var sig = SinOsc.ar(freq) * env;\n Out.ar(out, (sig * amp).dup);\n}).add;\n);\n// Pbind over minorPentatonic, Pseq degrees, 0.25 s\n(\nPbind(\n \\instrument, \\sine_pad,\n \\scale, Scale.minorPentatonic,\n \\root, 0,\n \\degree, Pseq([0, 2, 4, 7, 9], inf),\n \\octave, 5,\n \\dur, 0.25,\n \\amp, 0.2,\n \\strum, 0.02\n).play;\n)\n```"}]}
{"conversations": [{"role": "user", "content": "Give me a Pbind with pluck voices and a 0.3 rhythm. (scale majorPentatonic, seq Pwalk, dur 0.3, octave 4, instr pluck, root 0)"}, {"role": "assistant", "content": "Put the scale and the degree pattern in the `Pbind` and it will pick notes for you:\n\n```supercollider\n(\nSynthDef(\\pluck, { |out = 0, freq = 440, amp = 0.2|\n var env = EnvGen.kr(Env.perc(0.004, 0.35, 1, -3), doneAction: 2);\n var sig = Saw.ar(freq) * env;\n Out.ar(out, (sig * amp).dup);\n}).add;\n);\n// Pbind over majorPentatonic, Pwalk degrees, 0.3 s\n(\nPbind(\n \\instrument, \\pluck,\n \\scale, Scale.majorPentatonic,\n \\root, 0,\n \\degree, Pwalk([0, 2, 4, 7, 9], Prand([-2, -1, 1, 2], inf), 0),\n \\octave, 4,\n \\dur, Prand([0.2, 0.3], inf),\n \\amp, 0.2,\n \\strum, 0.02\n).play;\n)\n```"}]}
{"conversations": [{"role": "user", "content": "Write a Pbind in majorPentatonic using Prand for the degrees. (scale majorPentatonic, seq Prand, dur 0.2, octave 5, instr fm, root 0)"}, {"role": "assistant", "content": "Put the scale and the degree pattern in the `Pbind` and it will pick notes for you:\n\n```supercollider\n(\nSynthDef(\\fm_voice, { |out = 0, freq = 440, amp = 0.2|\n var env = EnvGen.kr(Env.perc(0.005, 0.4, 1, -3), doneAction: 2);\n var sig = SinOsc.ar(freq + (SinOsc.ar(freq * 2) * freq * 0.5)) * env;\n Out.ar(out, (sig * amp).dup);\n}).add;\n);\n// Pbind over majorPentatonic, Prand degrees, 0.2 s\n(\nPbind(\n \\instrument, \\fm_voice,\n \\scale, Scale.majorPentatonic,\n \\root, 0,\n \\degree, Prand([0, 2, 4, 7, 9], inf),\n \\octave, 5,\n \\dur, Pseq([0.2, 0.2, 0.4], inf),\n \\amp, 0.2,\n \\strum, 0.02\n).play;\n)\n```"}]}
{"conversations": [{"role": "user", "content": "Write a Pbind in minorPentatonic using Pseq for the degrees. (scale minorPentatonic, seq Pseq, dur 0.25, octave 4, instr pluck, root 0)"}, {"role": "assistant", "content": "`Pbind` sequences an Event per beat, and `\\degree` + `\\scale` does the pitch:\n\n```supercollider\n(\nSynthDef(\\pluck, { |out = 0, freq = 440, amp = 0.2|\n var env = EnvGen.kr(Env.perc(0.004, 0.35, 1, -3), doneAction: 2);\n var sig = Saw.ar(freq) * env;\n Out.ar(out, (sig * amp).dup);\n}).add;\n);\n// Pbind over minorPentatonic, Pseq degrees, 0.25 s\n(\nPbind(\n \\instrument, \\pluck,\n \\scale, Scale.minorPentatonic,\n \\root, 0,\n \\degree, Pseq([0, 2, 4, 7, 9], inf),\n \\octave, 4,\n \\dur, 0.25,\n \\amp, 0.2,\n \\strum, 0.02\n).play;\n)\n```"}]}
{"conversations": [{"role": "user", "content": "Write a Pbind whose degrees repeat every Pseq cycle. (scale majorPentatonic, seq Pseq, dur 0.4, octave 6, instr fm, root 0)"}, {"role": "assistant", "content": "Put the scale and the degree pattern in the `Pbind` and it will pick notes for you:\n\n```supercollider\n(\nSynthDef(\\fm_voice, { |out = 0, freq = 440, amp = 0.2|\n var env = EnvGen.kr(Env.perc(0.005, 0.4, 1, -3), doneAction: 2);\n var sig = SinOsc.ar(freq + (SinOsc.ar(freq * 2) * freq * 0.5)) * env;\n Out.ar(out, (sig * amp).dup);\n}).add;\n);\n// Pbind over majorPentatonic, Pseq degrees, 0.4 s\n(\nPbind(\n \\instrument, \\fm_voice,\n \\scale, Scale.majorPentatonic,\n \\root, 0,\n \\degree, Pseq([0, 2, 4, 7, 9], inf),\n \\octave, 6,\n \\dur, Pseq([0.4, 0.2], inf),\n \\amp, 0.2,\n \\strum, 0.02\n).play;\n)\n```"}]}
{"conversations": [{"role": "user", "content": "Write a Pbind whose degrees repeat every Pshuf cycle. (scale minorPentatonic, seq Pshuf, dur 0.25, octave 4, instr fm, root 0)"}, {"role": "assistant", "content": "`Pbind` sequences an Event per beat, and `\\degree` + `\\scale` does the pitch:\n\n```supercollider\n(\nSynthDef(\\fm_voice, { |out = 0, freq = 440, amp = 0.2|\n var env = EnvGen.kr(Env.perc(0.005, 0.4, 1, -3), doneAction: 2);\n var sig = SinOsc.ar(freq + (SinOsc.ar(freq * 2) * freq * 0.5)) * env;\n Out.ar(out, (sig * amp).dup);\n}).add;\n);\n// Pbind over minorPentatonic, Pshuf degrees, 0.25 s\n(\nPbind(\n \\instrument, \\fm_voice,\n \\scale, Scale.minorPentatonic,\n \\root, 0,\n \\degree, Pshuf([0, 2, 4, 7, 9], inf),\n \\octave, 4,\n \\dur, 0.25,\n \\amp, 0.2,\n \\strum, 0.02\n).play;\n)\n```"}]}
{"conversations": [{"role": "user", "content": "How do I play a random majorPentatonic scale at octave 4? (scale majorPentatonic, seq Pseq, dur 0.4, octave 4, instr sine, root 0)"}, {"role": "assistant", "content": "`Pbind` sequences an Event per beat, and `\\degree` + `\\scale` does the pitch:\n\n```supercollider\n(\nSynthDef(\\sine_pad, { |out = 0, freq = 440, amp = 0.2|\n var env = EnvGen.kr(Env.perc(0.01, 0.5, 1, -2), doneAction: 2);\n var sig = SinOsc.ar(freq) * env;\n Out.ar(out, (sig * amp).dup);\n}).add;\n);\n// Pbind over majorPentatonic, Pseq degrees, 0.4 s\n(\nPbind(\n \\instrument, \\sine_pad,\n \\scale, Scale.majorPentatonic,\n \\root, 0,\n \\degree, Pseq([0, 2, 4, 7, 9], inf),\n \\octave, 4,\n \\dur, Pseq([0.4, 0.2], inf),\n \\amp, 0.2,\n \\strum, 0.02\n).play;\n)\n```"}]}
{"conversations": [{"role": "user", "content": "Write a Pbind whose degrees repeat every Pshuf cycle. (scale majorPentatonic, seq Pshuf, dur 0.4, octave 5, instr pluck, root 0)"}, {"role": "assistant", "content": "`Pbind` sequences an Event per beat, and `\\degree` + `\\scale` does the pitch:\n\n```supercollider\n(\nSynthDef(\\pluck, { |out = 0, freq = 440, amp = 0.2|\n var env = EnvGen.kr(Env.perc(0.004, 0.35, 1, -3), doneAction: 2);\n var sig = Saw.ar(freq) * env;\n Out.ar(out, (sig * amp).dup);\n}).add;\n);\n// Pbind over majorPentatonic, Pshuf degrees, 0.4 s\n(\nPbind(\n \\instrument, \\pluck,\n \\scale, Scale.majorPentatonic,\n \\root, 0,\n \\degree, Pshuf([0, 2, 4, 7, 9], inf),\n \\octave, 5,\n \\dur, Pseq([0.4, 0.2], inf),\n \\amp, 0.2,\n \\strum, 0.02\n).play;\n)\n```"}]}
{"conversations": [{"role": "user", "content": "Why does everyone wrap code in s.waitForBoot?"}, {"role": "assistant", "content": "Because the server boots asynchronously, and a SynthDef added before it is up never reaches it. `s.waitForBoot { ... }` runs the block once the server has finished booting; inside a Routine you can also use `s.boot; s.sync;` for the same effect. If you see 'SynthDef not found' on code that clearly looks right, this is usually why."}]}
{"conversations": [{"role": "user", "content": "How do I set up a delay send in SuperCollider?"}, {"role": "assistant", "content": "One synth writes dry to the master and also to a private bus; a second synth reads that bus, delays\nit, and writes the wet signal to the master.\n\n```supercollider\n(\n~delayBus = Bus.audio(s, 2);\nSynthDef(\\src, { |out = 0, send = 0, freq = 440|\n var sig = SinOsc.ar(freq) * 0.15;\n Out.ar(out, sig);\n Out.ar(send, sig);\n}).add;\nSynthDef(\\dly, { |in = 0, out = 0, time = 0.3|\n var dry = In.ar(in, 2);\n var wet = CombN.ar(dry, 0.6, time, 3);\n Out.ar(out, wet * 0.6);\n}).add;\n);\nSynth(\\dly, [\\in, ~delayBus, \\time, 0.375]);\nSynth(\\src, [\\send, ~delayBus]);\n```"}]}
{"conversations": [{"role": "user", "content": "I have a kick SynthDef called \\kick. How do I get a four-on-the-floor?"}, {"role": "assistant", "content": "One kick per beat on the default tempo clock:\n\n```supercollider\nTdef(\\four, { loop { Synth(\\kick); 1.wait } }).play;\n```\n\n`1.wait` is one beat, so `TempoClock.default.tempo = 2` makes it 120 BPM."}, {"role": "user", "content": "Now add hats on the offbeats."}, {"role": "assistant", "content": "A second layer, offset by half a beat:\n\n```supercollider\nTdef(\\hats, {\n loop {\n (1/2).wait;\n Synth(\\hat, [\\amp, 0.12]);\n (1/2).wait;\n }\n}).play;\n```\n\nStarting with the wait puts the hat half a beat after the kick. `Tdef(\\hats).stop` removes just that layer."}]}