Comments (11)
ah, is this #231 (comment) ?
I still don't get it. I put this extra line (loadRelative ...)
) in startup.scd:
(
s.reboot {
...
s.waitForBoot {
~dirt = SuperDirt(2, s); // two output channels, increase if you want to pan across more channels
loadRelative("../../software/music/SuperDirt/hacks/adding-a-compressor.scd");
...
then when starting sclang
, I get
...
loading synthdefs in /home/waldmann/.local/share/SuperCollider/downloaded-quarks/SuperDirt/classes/../synths/zzzzz-core-modules-that-come-last.scd
ERROR: syntax error, unexpected '(', expecting $end
in interpreted text
line 19 char 1:
(
^
SynthDef("dirt_compressor" ++ ~dirt.numChannels, { |dryBus, effectBus, gate = 1|
-----------------------------------
ERROR: Command line parse failed
loading 217 sample banks:
...
from superdirt.
Hi @jwaldmann, it is confusing, yes.
I've added a bit of documentation (#260), please let me know if it is clearer and works for you …
from superdirt.
Thanks! I was still getting the above syntax error. The file I wanted to include https://github.com/musikinformatik/SuperDirt/blob/develop/hacks/adding-a-compressor.scd has this structure
( ~dirt.orbits.do { ... }; )
( SynthDef ... )
( SynthDef ... )
( SynthDef ... )
The error message refers to the beginning of the second block. Are we just missing separators here?
Adding semi-colons makes it work:
( ~dirt.orbits.do { ... }; ) ;
( SynthDef ... ) ;
( SynthDef ... ) ;
( SynthDef ... )
Well, "work" - at least it gives no syntax errors, so we can start thinking about semantics ...
from superdirt.
The main thing is that the file (like all other files in the folder) are not meant to be used that way. It is not like a module system. I decided to use this "extension by example" style to encourage a more active involvement with the code. It is also a common way supercollider is organised: files which have many snippets of code that you can use, but not intended to be used all at once. This allows you to vary it in place, by writing series of minor modifications. It is more tedious out of the box, but more flexible to experiment with.
from superdirt.
If you wanted to have a file you can load, you'd copy the variant you prefer in a file like this:
(
// add a compressor module
(
~dirt.orbits.do { |x|
x.globalEffects = [
GlobalDirtEffect(\dirt_delay, [\delaytime, \delayfeedback, \delaySend, \delayAmp, \lock, \cps]),
GlobalDirtEffect(\dirt_reverb, [\size, \room, \dry]),
GlobalDirtEffect(\dirt_leslie, [\leslie, \lrate, \lsize]),
GlobalDirtEffect(\dirt_rms, [\rmsReplyRate, \rmsPeakLag]).alwaysRun_(true),
GlobalDirtEffect(\dirt_monitor, [\limitertype]).alwaysRun_(true),
]
};
);
// now play with different variants while you listen to tidal:
// a dirty hyperbolic tangens
(
SynthDef("dirt_compressor" ++ ~dirt.numChannels, { |dryBus, effectBus, gate = 1|
var signal = In.ar(dryBus, ~dirt.numChannels);
signal = (signal * 5).tanh;
signal = signal * EnvGen.kr(Env.asr, gate, doneAction:2);
Out.ar(effectBus, signal);
}, [\ir, \ir]).add;
s.freeAll; // restart all synths
)
)
from superdirt.
( ~dirt.orbits.do { ... }; ) ; ( SynthDef ... ) ; ( SynthDef ... ) ; ( SynthDef ... )
the syntax correction is correct, but the SynthDefs override each other (they all have the same name).
from superdirt.
The main thing is that the file (like all other files in the folder) are not meant to be used that way. It is not like a module system. I decided to use this "extension by example" style ...
Yes, I see now. Perhaps make this intended usage more explicit in the README of that directory? Something like:
- you can use synthdefs from these files for SC live coding [this is addressing people who know SC, and probably don't need help]
- or [addressing people who only know Tidal, like me] you can make them available for Tidal live coding by writing a collection of synthdefs to a file, and loading this file from your SC startup file (or from your sclang session?)
- in such a collection of synthdefs (and other declarations? statements?) , each is terminated a by semi-colon, (and the collection is enclosed in a parentheses?).
- see https://github.com/musikinformatik/SuperDirt/blob/develop/hacks/adding-global-effects.scd for accessing parameters of synthdefs.
- In the startup file, write ... [the include command, you already have this text]
from superdirt.
Thanks! Better now? https://github.com/musikinformatik/SuperDirt/pull/260/files
from superdirt.
Yes, fine! - This issue was actually brought up by students (they wanted side chain compression for Tidal). I will point them to these improved instructions, and I'll forward any remaining complaints :-)
from superdirt.
Yes, thanks, that would be good :) It is hard for me to un-understand these things.
from superdirt.
please feel free to reopen this issue with suggestions.
from superdirt.
Related Issues (20)
- SuperDirt WASM?
- `arp` step patterns not working HOT 3
- Start SuperDirt on a server other than default s HOT 1
- startup code works with 1.7.2, fails with 1.7.3 HOT 5
- module arguments default to 0 instead of default value given in SynthDef HOT 6
- NRPN fails to send value 0 for CC 38
- Q: How do default arguments in the SynthDefs SuperDirt use work? HOT 3
- delay stops working sometimes HOT 4
- amp parameter scaling HOT 3
- playing samples in tune using pitch metadata HOT 2
- unit "s" unexpected behavior HOT 1
- How to add a custom DirtEventType for MIDI over OSC HOT 10
- Supercollider 3.13.0-rc1 / SuperDirt 1.7.3 - High Cpu Usage At Idle - macOS HOT 17
- SuperDirt does not recognize SynthDef variants HOT 2
- superchip is way out of tune HOT 2
- cut groups break on simultaneous events HOT 29
- Should we send RPN Null after NRPN? HOT 4
- d3 onwards not sounding HOT 1
- Lazy Sample Loading doesn't find any samples (Windows 11/SuperCollider 3.12.1) HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from superdirt.