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

Yes it comes with vanilla sclang (version 3.9 something iirc) and also sc3-plugins

1 Like

Having built myself DIY Norns Shield and Fates , I’m just taking tentative steps into the world of Norns scripting by working through some Supercollider tutorial material.

Some random questions on Supercollider engines:

  • If I was to attempt to implement a sequencer module, would I do this in a Lua script, or make the sequencer part of the SC engine?
  • Is it only possibly for a Norns script to use a single Supercollider engine?
  • Can SC engines be swapped by a script?
  • Can an SC engine use Supercollider extensions or Quarks?
  • Does an SC engine have direct access to WiFi networks the Norns/Fates box is connected to (interested in this one because there’s a Supercollider extension for Ableton Link, it seems)?
  • Does the SC engine have access to the filesystem, via the Lua script to load or save files?
2 Likes

up to you.

here’s a dumb random sequence in SC

Engine_Boink : CroneEngine {
	var <sequence;

	*new { arg context, doneCallback;
		^super.new(context, doneCallback);
	}

	alloc { 
              sequence = Routine { inf.do { 
                      { SinOsc.ar((10 + 50.rand).midicps) * 0.25 * EnvGen.ar(Env.perc, doneAction:2) }.play;
                      (0.1 + 0.5.rand).wait;
              } }.play;
         }

      free { 
           sequence.stop;
      }
}

but my 2c is that unless you are specifically interested in doing stuff mostly in SC, or are adapting existing SC code, it is a more natural fit to do sequencing / control stuff on the lua side for norns. that way your sequencing logic module can be more reusable and more easily integrated with controllers and stuff.

yes

yes. (i’d consider this an “advanced technique” though.)

it depends. sc3-plugins are installed already. quarks/extensions that need qt3 or another graphics layer will not work. quarks/extensions that need compiled UGen extensions will not work unless they provide arm64 binaries or you compile them. simple extension classes are fine. (norns engines are extension classes.)

in general i guess i am wary of the Quarks system, but i do love extension classes.

yes you should be able to access The Interweb from SC on norns. (send OSC with NetAddr, use String.systemCmd to curl or whatever, &c.) things like WebView will not work because nope, no graphix again. dunno about Link support; i think that is a compiled UGen so you may have to build it for arm64.

sounds like two questions. yes SC can acccess the filesystem directly with File or whatever. yes SC can talk to scripts, via polls and commands. (polls do not have to be periodic, it is just our word for the mechanism by which engines can generate events to be handled in lua.)

3 Likes

Thanks very much for your detailed reply, @zebra!

Re. Link support:

There’s an old fork of SuperCollider that incorporated Link support. I don’t think it was ever merged, though.

There’s also a UGen for it too, as you say.

No pre-compiled binary for ARM, and no examples of how it’s used, unfortunately. Maybe someone with a bit more experience of SC/Norns would be able to tell if it would be useable in Norns.

I know Link support has been suggested before. I do think it would be a great feature, whether build into Norns native tempo/clock system, somehow, or via an SC UGen that can be used in Engines.

1 Like

I was hoping we could use something like https://github.com/rncbc/jack_link
But I don’t know if/how SC ties in to JACK transport so this might or not might not work with SC currently.

i believe @Dewb was poking at integrating Link support into the norns clock system, which i do think would be a natural way to do it (though i have no skin in the game there)

see this (old) GH thread


and oh hey, it looks like that upstream PR for adding LinkClock (sclang side) was indeed merged to the main dev branch, after some work, here. which means its on the supercollider 3.11 milestone. no idea when that release will be ready or whether LinkClock is already in a good/usable state in the dev branch. (again i have zero personal investment in this feature.)

which reminds me we should probably update the norns supercollider build to bring it in sync with 3.10.4 (some good bugfixes in there)

3 Likes

Would be nice to be able to use Link to sync multiple Norns wirelessly, too, as well as sync to/from iOS apps etc.

looks very good! just a little hint while skimming over it: it might e a good idea to add a computational way to generate the synthdef name(s) from the class file to prevent accidental synthdef overloading…

1 Like

Is this the place for all Norns/SuperCollider-related questions?

I have some, but not sure if I should make another thread (or several), or post here.

feel free to use the Questions category

Cool, thank you.++++

Does this mean Link support for Norns is more possible? I always thought it’d be more something for the Lua side, but maybe i’m getting the wrong end of the stick?

2 Likes

It’s being implemented right now! There a branch on git if you wanna see the code

5 Likes