Here’s one i think would make a nice Norns

(
~trig = { |dens=10| Impulse.kr(dens) };
~freq = { MouseX.kr(100, 2000, 1) * LFNoise1.kr(1).range(0.25, 1.75) };
~moddepth = { LFNoise1.kr(20).range(1, 10) };
~modfreq = 200;
~graindur = 0.1;

~grain = { arg envbuf = -1;
GrainFM.ar(2, ~trig.kr, ~graindur.kr,
~freq.kr, ~modfreq.kr, ~moddepth.kr,
pan: WhiteNoise.kr, envbuf: envbuf) * 0.2
};
~grain.play;
)
// change control ugens:
~modfreq = { ~freq.kr * LFNoise2.kr(1).range(0.5, 2.0) }; // modfreq roughly follows freq
~trig = { |dens=10| Dust.kr(dens)}; // random triggering, same density
~freq = { LFNoise0.kr(0.3).range(200, 800) };
~moddepth = 3; // fixed depth
~graindur = { LFNoise0.kr.range(0.01, 0.1) };

// bonus: blend dust and impulse triggers

~trig = { |dens=20, bal=0.2| Dust.kr(dens * (1-bal)) + Impulse.kr(dens * bal) };
~trig.set(\bal, 0.1);
~trig.set(\bal, 0.5);
~trig.set(\bal, 0.9);

ProxyMixer§;

3 Likes

i am just having some fun running some old supercollider code
Does the Norns SC have Quarks capacity? I would love a BBcut Norns

(
var sf, clock1, clock2;

clock1= ExternalClock(TempoClock(0.6));
clock2= ExternalClock(TempoClock(0.7));

Routine.run({

sf=BBCutBuffer.array([Platform.resourceDir +/+ “sounds/breaks.wav”,Platform.resourceDir +/+ “sounds/breaks2.wav”],[8,4]);

s.sync; //this forces a wait for the Buffer to load

BBCut2([CutBuf1(sf[0]),CutMixer(0,0.5,1.0,-1.0)], ChooseCutProc(0.25,{[4,2].choose})).play(clock1);
BBCut2([CutBuf1(sf[1]),CutMixer(0,0.5,1.0,1.0)], ChooseCutProc(0.25,{[4,2].choose})).play(clock2);
});

clock1.play;
clock2.play;
)

(
var sf, clock;

clock= ExternalClock(TempoClock(0.5));

clock.play;

Routine.run({

sf= BBCutBuffer(Platform.resourceDir +/+ “sounds/breaks2.wav”,8);

s.sync; //this forces a wait for the Buffer to load

g=CutGroup(CutBuf1(sf));

a=BBCut2(g, BBCutProc11.new).play(clock);
});

)

The quarks syaytem works on norna, sans gui.

But I’m not sure how well it does with installing plugins on arm64

BBcut is the only “quark” i usually use/install
There’s always something to learn :slight_smile:
Those redfred tweets look awesome
i have the schemawounds n stuff too. Back in 2004/5 we successfully [with cylobs help] got SC working on ipad and they were so much fun to layer

//snakefinger bass

(
SynthDef(“bass”,{arg bus= 2, note=60, dur=0.2, pan=0.0, chorus=0.02,filtfreq=4000, filtq=0.1;
var v;
v=Mix.ar(LFSaw.ar([note-chorus,note+chorus].midicps,[pi.rand,pi.rand], 0.25)); //(([Rand(0.25,0.4),Rand(0.25,0.4)]));
v= v*EnvGen.ar(Env.perc(Rand(0.01,0.02),dur,0.5), doneAction:2);
//v=Resonz.ar(v, filtfreq, filtq);
Out.ar(0,Pan2.ar(v,pan));
}).load(s);

SynthDef(“sweepy”,
{ arg busNumber=0, busInNumber=0, rate=0.5;
var in, proc;
in = In.ar(busInNumber, 2);
proc=Limiter.ar(Resonz.ar(in*8, SinOsc.kr(LFNoise0.kr(rate,0.25,0.3), 2.0.rand, 2000, 2200), 0.4), 0.999, 0.1);

	ReplaceOut.ar(busNumber,proc);

}).load(s);

SynthDef(“delay”,
{ arg busNumber=0, busInNumber=0;
var in, proc;
in = In.ar(busInNumber, 2);
proc=CombN.ar(in,0.25,0.125,1.0);
ReplaceOut.ar(busNumber,proc);
}).load(s);
)

(
var func, fxsynth, fxsynth2;

fxsynth=Synth(\sweepy);
fxsynth2=Synth.after(fxsynth,\delay);

func= {
arg basefreq=36, rate=0.125;
var p, r, durs, pan, ff, fq, chor;

durs= exprand(0.1,0.8);
pan= 1.0.rand2;
ff= rrand(1000,4000);
fq= exprand(0.1,0.5);
chor= exprand(0.01,0.2);

p= Pseq([Pn(basefreq, rrand(9,19)), Plazy({Pseries(basefreq, [-0.25,-0.5,-0.75].choose, rrand(3,18))})],inf).asStream;

r=Routine({

rrand(50,100).do(
{
Synth.before(fxsynth,\bass,[\note, p.next, \dur, durs, \pan, pan, \chorus, chor, \filtfreq, ff, \filtq, fq]);
rate.wait;
});

});

r.play;
};

Routine(
{

10.do({func.value(([0,12,24].choose)+([36,36.1,36.2,36.4,36.75].choose), [0.125,0.15,0.175].choose);

fxsynth.run(if(0.4.coin,true,false));
if(0.3.coin,{fxsynth2.run(fxsynth2.isRunning.not);});

[0.75,2.0,4.0,5.0].choose.wait
});

}).play;

)

dropping these old nuggets here. any other pointers for first time engine-ers ?

here’s the manual

also: I already like sc a lot

6 Likes

Is there an existing engine that would be a good template to use for adapting an “audio processing” supercollider script to norns?

Looking for the basic framework needed to deal with the incoming audio.

would this work?

2 Likes

This is one I put together, using the decimator ugen.

3 Likes

i really want to make a Gnedyn Norns application but with sound coming from norns but with selectable distrubutions of stochastic LFOs going to crow
Is there a tutorial for Nornsing a SC patch? i guess i can adapt one i just dont know how to get started

2 Likes

away from norns but just attempted to wrap Convolution2L ugen into an engine

it’s my first time trying so i’m curious…
does anybody spot obvious errors? i expect this will be a learning experience


inspiration is taken from a supercollider based effect built for 2018 rbma participants

from public info and emails with a member of the design team this is what i can gather about how it works:

  • user records a sound snippet to one of 20 slots (max length 20s per slot)
  • the sampled audio from current slot is fed into a granular engine
  • select a grain (ranging from 7-700ms in size) which is then convolved with the real-time audio input
  • the spectral overlap of the two sounds is output (think…grain timbre w/ input envelope)

additional details from the devs:

  • the convolution is done using Convolution2L since it allows for seamless transition between grains (convolution kernels)

  • it doesn’t support proper time-partitioned convolution so to keep the input-output delay small they manually delayed the input signal and fed it to several Convolution2L that all ran at a small framesize (& got a different part of the grain as convolution kernel)

two challenges they faced [1] each grain needs to have an envelope applied [2] the energy of the output needs to be controlled…

  • they used a short single sided hand window to fade in/out

  • they ended up normalizing with the RMS of the grain (capped at some higher / lower limit)

Any time a new grain was selected (either by shifting the position of grain window or by changing its length), it was prepared (applied window, calculated gain, loaded into all convolves) and then a trigger signal was sent to all convolvers to switch to the new grain


@andrew I’m trying to work out whether all of that is possible with just one Convolution2L in a norns engine (my guess is no) or whether i’ll need to hack an existing granular engine like Glut to handle some of the features

6 Likes

i can probably help a little this weekend. Sounds like they did stuff that isn’t directly possible with built-in grain UGens.

I’m still not totally clear in the spec. Every time a grain fires, instead of being played back directly, it should be used as real-time convo kernel on live input? Or both? Or some kinda crossfade? (Feel free to dm or email)

3 Likes

Typo on the first alloc: convulution2L ?

1 Like

Hi friends,

Can I ask for some assistance with an engine?

I’ve thrown together a basic tonewheel organ engine based on Mark Wheeler’s CroneEngine_PolyTemplate and the Tonewheel1 example from SynthDEFaults.

The engine is sounding like it should, but I’m not able to change the tone of a voice while it is being played.

Any new voices triggered after a “drawbar” parameter is changed (even while the initial voice is being held) will have a new tone. I’ve exposed the nine drawbar parameters to be controlled from lua like in the example below.

Example

params:add{id="fundamental", name="fundamental", type="control", controlspec=controlspec.new(0,1,'lin',0,1,""), action=engine.fundamental}

Is there something I’m missing or doing wrong in my sc code (gist is below)? I’ve looked through a few polysynth examples in the norns library, but I’m still an absolute beginner and I’m not making much progress on this issue. Any help would be really appreciated!

Looks like you’re trying to modulate a ugen that can’t be modulated after init? http://doc.sccode.org/Classes/DC.html

1 Like

Btw thanks for spotting that…I found some other mistakes myself and updated it

What mark said, but also look at the syntax for updating array arguments for DynKlang. (Spoiler, it’s weird and I would probably just opt for Mix plus an array of SinOsc for clarity)

1 Like

Thanks @markeats and @zebra, very useful info! I’ll be sure to post any finished product to the library for others to use :slight_smile:

I’m correct in assuming that Norns comes with all the stock SC Ugens, yes? Just checking bc dependencies…

I’m not sure this is the best way to tell but here is a dump of all the UGen subclasses that are defined on my device…

UGen.allSubclasses.collect({|c| c.name }).sort().do({|n| Post << n << "\n"});

Click to expand list

A2B
A2K
APF
AY
AbstractIn
AbstractOut
Allpass1
Allpass2
AllpassC
AllpassL
AllpassN
AmpComp
AmpCompA
Amplitude
AmplitudeMod
AnalyseEvents2
ArneodoCoulletTresser
ArrayMax
ArrayMin
AtsAmp
AtsBand
AtsFreq
AtsNoiSynth
AtsNoise
AtsParInfo
AtsPartial
AtsSynth
AtsUGen
AttackSlope
AudioControl
AudioMSG
AverageOutput
B2A
B2Ster
B2UHJ
BAllPass
BBandPass
BBandStop
BBlockerBuf
BEQSuite
BFDecode1
BFDecoder
BFEncode1
BFEncode2
BFEncodeSter
BFGrainPanner
BFManipulate
BFPanner
BHiPass
BHiShelf
BLBufRd
BLowPass
BLowShelf
BMoog
BPF
BPZ2
BPeakEQ
BRF
BRZ2
Balance
Balance2
Ball
BasicOpUGen
BeatStatistics
BeatTrack
BeatTrack2
BiPanB2
BinData
BinaryOpUGen
Blip
BlitB3
BlitB3D
BlitB3Saw
BlitB3Square
BlitB3Tri
BlockSize
Breakcore
BrownNoise
Brusselator
BufAllpassC
BufAllpassL
BufAllpassN
BufChannels
BufCombC
BufCombL
BufCombN
BufDelayC
BufDelayL
BufDelayN
BufDur
BufFrames
BufGrain
BufGrainB
BufGrainBBF
BufGrainBF
BufGrainI
BufGrainIBF
BufInfoUGenBase
BufMax
BufMin
BufRateScale
BufRd
BufSampleRate
BufSamples
BufWr
COsc
CQ_Diff
Cepstrum
Changed
ChaosGen
CheckBadValues
Chromagram
CircleRamp
ClearBuf
Clip
ClipNoise
Clipper32
Clipper4
Clipper8
Clockmus
CoinGate
CombC
CombL
CombLP
CombN
Compander
CompanderD
ComplexRes
Concat
Concat2
Control
ControlDur
ControlRate
Convolution
Convolution2
Convolution2L
Convolution3
Coyote
Crackle
Crest
CrossoverDistortion
CuspL
CuspN
DC
DFM1
DNoiseRing
DPW3Tri
DPW4Saw
DUGen
DWGBowed
DWGBowedSimple
DWGBowedTor
DWGPlucked
DWGPlucked2
DWGPluckedStiff
DWGSoundBoard
Dbrown
Dbrown2
DbufTag
Dbufrd
Dbufwr
Dconst
Decay
Decay2
Decimator
DecodeB2
DegreeToKey
DelTapRd
DelTapWr
Delay1
Delay2
DelayC
DelayL
DelayN
Demand
DemandEnvGen
DetaBlockerBuf
DetectIndex
DetectSilence
Dfsm
Dgauss
Dgeom
Dibrown
DiodeRingMod
Disintegrator
DiskIn
DiskOut
Diwhite
Dneuromodule
Done
DoubleNestedAllpassC
DoubleNestedAllpassL
DoubleNestedAllpassN
DoubleWell
DoubleWell2
DoubleWell3
Dpoll
Drand
Dreset
DriveNoise
DrumTrack
Dseq
Dser
Dseries
Dshuf
Dstutter
Dswitch
Dswitch1
Dtag
Dunique
Dust
Dust2
Duty
Dwhite
Dwrand
Dxrand
DynKlang
DynKlank
EnvDetect
EnvFollow
EnvGen
ExpRand
FBSineC
FBSineL
FBSineN
FFT
FFTCentroid
FFTComplexDev
FFTCrest
FFTDiffMags
FFTFlux
FFTFluxPos
FFTMKL
FFTPeak
FFTPhaseDev
FFTPower
FFTSlope
FFTSpread
FFTSubbandFlatness
FFTSubbandFlux
FFTSubbandPower
FFTTrigger
FM7
FMGrain
FMGrainB
FMGrainBBF
FMGrainBF
FMGrainI
FMGrainIBF
FMHDecode1
FMHEncode0
FMHEncode1
FMHEncode2
FOS
FSinOsc
FeatureSave
Fhn2DC
Fhn2DL
Fhn2DN
FhnTrig
Filter
FincoSprottL
FincoSprottM
FincoSprottS
FitzHughNagumo
Fold
Formant
Formlet
FrameCompare
Free
FreeSelf
FreeSelfWhenDone
FreeVerb
FreeVerb2
FreqShift
Friction
GVerb
Gammatone
Gate
GaussClass
GaussTrig
Gbman2DC
Gbman2DL
Gbman2DN
GbmanL
GbmanN
GbmanTrig
Gendy1
Gendy2
Gendy3
Gendy4
Gendy5
Getenv
GlitchBPF
GlitchBRF
GlitchHPF
GlitchRHPF
Goertzel
GrainBuf
GrainBufJ
GrainFM
GrainFMJ
GrainIn
GrainInJ
GrainSin
GrainSinJ
GravityGrid
GravityGrid2
GrayNoise
GreyholeRaw
HPF
HPZ1
HPZ2
HairCell
Hasher
Henon2DC
Henon2DL
Henon2DN
HenonC
HenonL
HenonN
HenonTrig
Hilbert
HilbertFIR
ICepstrum
IEnvGen
IFFT
IIRFilter
IRand
Impulse
In
InBus
InFeedback
InGrain
InGrainB
InGrainBBF
InGrainBF
InGrainI
InGrainIBF
InRange
InRect
InTrig
Index
IndexInBetween
IndexL
InfoUGenBase
InsideOut
Instruction
Integrator
JPverbRaw
JoshGrain
JoshMultiChannelGrain
JoshMultiOutGrain
K2A
KMeansRT
KeyClarity
KeyMode
KeyState
KeyTrack
Klang
Klank
KmeansToBPSet1
LADSPA
LFBrownNoise0
LFBrownNoise1
LFBrownNoise2
LFClipNoise
LFCub
LFDClipNoise
LFDNoise0
LFDNoise1
LFDNoise3
LFGauss
LFNoise0
LFNoise1
LFNoise2
LFPar
LFPulse
LFSaw
LFTri
LPCAnalyzer
LPCError
LPCSynth
LPCVals
LPF
LPF1
LPF18
LPFVS6
LPZ1
LPZ2
LTI
Lag
Lag2
Lag2UD
Lag3
Lag3UD
LagControl
LagIn
LagUD
LastValue
Latch
Latoocarfian2DC
Latoocarfian2DL
Latoocarfian2DN
LatoocarfianC
LatoocarfianL
LatoocarfianN
LatoocarfianTrig
LeakDC
LeastChange
Limiter
LinCongC
LinCongL
LinCongN
LinExp
LinPan2
LinRand
LinXFade2
Line
Linen
ListDUGen
ListTrig
ListTrig2
LocalBuf
LocalIn
LocalOut
Logger
Logistic
LoopBuf
Lorenz2DC
Lorenz2DL
Lorenz2DN
LorenzL
LorenzTrig
LotkaVolterra
Loudness
MCLDChaosGen
MFCC
MantissaMask
MarkovSynth
MatchingP
MatchingPResynth
Max
MaxLocalBufs
Maxamp
MdaPiano
MeanTriggered
Meddis
Median
MedianSeparation
MedianTriggered
MembraneCircle
MembraneHexagon
Metro
MidEQ
ModDif
MonoGrain
MonoGrainBF
MoogFF
MoogLadder
MoogVCF
MostChange
MouseButton
MouseX
MouseY
MulAdd
MultiOutDemandUGen
MultiOutUGen
NL
NL2
NLFiltC
NLFiltL
NLFiltN
NRand
NTube
NearestN
NeedleRect
NestedAllpassC
NestedAllpassL
NestedAllpassN
NodeID
Normalizer
NumAudioBuses
NumBuffers
NumControlBuses
NumInputBuses
NumOutputBuses
NumRunningSynths
OSFold4
OSFold8
OSTrunc4
OSTrunc8
OSWrap4
OSWrap8
OffsetOut
OnePole
OneZero
OnsetStatistics
Onsets
OnsetsDS
Oregonator
Osc
OscN
OteyPiano
OteyPianoStrings
OteySoundBoard
Out
OutputProxy
PSinGrain
PVInfo
PVSynth
PV_Add
PV_BinBufRd
PV_BinDelay
PV_BinFilter
PV_BinPlayBuf
PV_BinScramble
PV_BinShift
PV_BinWipe
PV_BrickWall
PV_BufRd
PV_ChainUGen
PV_CommonMag
PV_CommonMul
PV_Compander
PV_ConformalMap
PV_Conj
PV_Copy
PV_CopyPhase
PV_Cutoff
PV_DiffMags
PV_Diffuser
PV_Div
PV_EvenBin
PV_ExtractRepeat
PV_Freeze
PV_FreqBuffer
PV_HainsworthFoote
PV_Invert
PV_JensenAndersen
PV_LocalMax
PV_MagAbove
PV_MagBelow
PV_MagBuffer
PV_MagClip
PV_MagDiv
PV_MagExp
PV_MagFreeze
PV_MagGate
PV_MagLog
PV_MagMap
PV_MagMinus
PV_MagMul
PV_MagMulAdd
PV_MagNoise
PV_MagScale
PV_MagShift
PV_MagSmear
PV_MagSmooth
PV_MagSquared
PV_MagSubtract
PV_Max
PV_MaxMagN
PV_Min
PV_MinMagN
PV_Morph
PV_Mul
PV_NoiseSynthF
PV_NoiseSynthP
PV_OddBin
PV_PartialSynthF
PV_PartialSynthP
PV_PhaseShift
PV_PhaseShift270
PV_PhaseShift90
PV_PitchShift
PV_PlayBuf
PV_RandComb
PV_RandWipe
PV_RecordBuf
PV_RectComb
PV_RectComb2
PV_SoftWipe
PV_SpectralEnhance
PV_SpectralMap
PV_Whiten
PV_XFade
PackFFT
Pan2
Pan4
PanAz
PanB
PanB2
PanX
PanX2D
PartConv
Pause
PauseSelf
PauseSelfWhenDone
Peak
PeakEQ2
PeakEQ4
PeakFollower
Perlin3
PermMod
PermModArray
PermModT
Phasor
PinkNoise
Pitch
PitchShift
PlaneTree
PlayBuf
Pluck
Poll
PosRatio
PrintVal
Pulse
PulseCount
PulseDivider
PureMultiOutUGen
PureUGen
Qitch
QuadC
QuadL
QuadN
RHPF
RLPF
RLPFD
RMAFoodChainL
RMEQ
RMEQSuite
RMS
RMShelf
RMShelf2
RadiansPerSample
Ramp
Rand
RandID
RandSeed
RecordBuf
RegaliaMitraEQ
ReplaceOut
Resonz
Ringz
RosslerL
RosslerResL
Rotate
Rotate2
RunningMax
RunningMin
RunningSum
SLOnset
SMS
SOMAreaWr
SOMRd
SOMTrain
SOS
SVF
SampleDur
SampleRate
Sanitize
Saw
SawDPW
Schmidt
ScopeOut
ScopeOut2
Select
SendPeakRMS
SendReply
SendTrig
SensoryDissonance
SetBuf
SetResetFF
Shaper
SharedIn
SharedOut
Sieve1
SinGrain
SinGrainB
SinGrainBBF
SinGrainBF
SinGrainI
SinGrainIBF
SinOsc
SinOscFB
SinTone
SineShaper
SkipNeedle
Slew
Slope
SmoothDecimator
SoftClipAmp
SoftClipAmp4
SoftClipAmp8
SoftClipper4
SoftClipper8
SortBuf
SpecCentroid
SpecFlatness
SpecPcile
SpectralEntropy
Splay
SplayAz
Spreader
Spring
SpruceBudworm
Squiz
Standard2DC
Standard2DL
Standard2DN
StandardL
StandardN
StandardTrig
Stepper
StereoConvolution2L
StkBandedWG
StkBeeThree
StkBlowHole
StkBowed
StkClarinet
StkFlute
StkGlobals
StkInst
StkMandolin
StkModalBar
StkMoog
StkPluck
StkSaxofony
StkShakers
StkVoicForm
Streson
SubsampleOffset
Sum3
Sum4
Summer
Sweep
SwitchDelay
SyncSaw
T2A
T2K
TBall
TBetaRand
TBrownRand
TDelay
TDuty
TExpRand
TGaussRand
TGrains
TGrains2
TGrains3
TIRand
TPV
TRand
TTendency
TWindex
Tap
Tartini
TermanWang
TextVU
Tilt
Timer
ToggleFF
Trig
Trig1
TrigAvg
TrigControl
TrigPhasor
Tumble
TwoPole
TwoTube
TwoZero
UHJ2B
UnaryOpUGen
Unpack1FFT
UnpackFFT
VBAP
VDiskIn
VMScan2D
VOSIM
VOsc
VOsc3
VarLag
VarSaw
Vibrato
WAmp
WalshHadamard
Warp1
WarpZ
WaveLoss
WaveTerrain
WaveletDaub
WeaklyNonlinear
WeaklyNonlinear2
WhiteNoise
WidthFirstUGen
Wrap
WrapIndex
WrapSummer
XFade2
XLine
XOut
ZeroCrossing