1--- 2title: Frequently Asked Questions 3layout: ../../layouts/MainLayout.astro 4--- 5 6import { MiniRepl } from '../../docs/MiniRepl'; 7import { JsDoc } from '../../docs/JsDoc'; 8 9# Frequently Asked Questions 10 11This page contains frequently asked questions, with answers. Usually, the topic is explained in more detail in a section which is linked in the answer. 12 13## Is Strudel/Tidal free? 14 15Yes - there is no charge, this is a collective open source project, and the music you make with it is your own. However if you can, please make a one-off or regular donation to our [opencollective fund](https://opencollective.com/tidalcycles), that supports the software and cultural development of Strudel and other Uzu languages. 16 17While there is no charge there are some caveats, e.g.: 18 19- the source code must stay free, i.e. you cannot distribute strudel or tidal as part of projects with incompatible licenses - see the [license](https://www.gnu.org/licenses/agpl-3.0.en.html) for details. 20- the contributed examples and tracks are also separately licensed, and must not e.g. be used to train AI models without permission. 21 22## How do I try out the latest features? 23 24The main, stable strudel website is [strudel.cc](https://strudel.cc/). There is also [warm.strudel.cc](https://warm.strudel.cc), known as "warm strudel", which has the latest development features. You might find warm strudel has bug fixes and features that the main website doesn't, but it will often be less stable and probably not suitable for important performances. 25 26Alternatively, you can run strudel locally to try out the latest features. You can find development-oriented [instructions for that here](https://codeberg.org/uzu/strudel/src/branch/main/CONTRIBUTING.md#project-setup). 27 28You can see the [latest changes here](https://codeberg.org/uzu/strudel/pulls?q=&type=all&sort=recentupdate&state=closed&labels=&milestone=0&project=0&assignee=0&poster=0), as 'pull requests'. 29 30## How to record or export audio? 31 32Strudel is not a digital audio workstation and does not operate following the same principles shared by most traditional audio softwares. However, there are multiple ways to record the audio -- and video -- output of Strudel: 33 34- Use the 'export' tab to render and download as an audio file. 35- capture the raw stereo signal coming out of your web browser. You will need an external audio editor/DAW such as Reaper/Audacity/Ardour, etc. 36- use the alternative SuperDirt audio engine. Read [this page](/learn/input-output/#oscsuperdirtstrudeldirt) to know more about it. 37- capture the audio/video stream using a capture tool such as [OBS](https://obsproject.com/fr), which is designed for live streaming, but also works very well for recording. 38- don't record anything and code it again in front of your friends. 39 40## Can I use strudel with my IDE? 41 42Yes you can. There are experimental modes, made by community members, for several IDEs such as: 43 44- VS Code: [Strudel VS](https://marketplace.visualstudio.com/items?itemName=cmillsdev.strudelvs): an experimental mode for Microsoft VSCode. A revived version of [TidalStrudel](https://marketplace.visualstudio.com/items?itemName=roipoussiere.tidal-strudel), which is defunct. 45- nvim: [strudel.nvim](https://github.com/gruvw/strudel.nvim) 46 47## How can I use my own samples? 48 49There are multiple ways to load your sample collection. Some methods are good for quick experimentation, some others are good to share your audio collection with other musicians: 50 51- Import folders [from the interface](/learn/samples/#from-disk-via-import-sounds-folder). These are stored locally in your web browser, and not uploaded. 52- Serve a folder of samples locally using the [strudel 'sampler' commandline tool](https://strudel.cc/learn/samples/#from-disk-via-strudelsampler). This can be most reliable method, but requires [nodejs](https://nodejs.org) to be installed. 53- Host your sound library online on the web and [load them from an URL](/learn/samples/#loading-custom-samples) 54 55## Can I create a new project based on Strudel? 56 57Strudel is free/open source software, and we are always happy to see people making use of it within the following terms: 58 59- Please don't use 'strudel' in the name of your project (e.g. strudel2000, foo-strudel), so people don't assume it's official strudel project. (If you'd like it to be an official strudel project, please check in with the community, e.g. on the [discord chat](https://discord.com/invite/HGEdXmRkzT).) 60- Please respect our AGPL license, which e.g. requires you to share/link to the source code of strudel, any modifications you've made to it, and the source code for the rest of your project if it integrates with strudel. You are also required to maintain Strudel's copyright notices in the source code, and include Strudel's copyright notice in your user interface. This is an ad-hoc summary - please [refer to the license](https://codeberg.org/uzu/strudel/src/branch/main/LICENSE) for full details. 61 62You are also encouraged to connect with [the community](https://discord.com/invite/HGEdXmRkzT) to understand our aims and values. 63 64## Can I use Strudel with AI/LLM tools? 65 66You are free to do what you like with Strudel, within the terms of the free/open source AGPLv3 license. 67However as a community we are interested in exploring human creativity. AI is _way_ over-hyped right now, 68including by people with very shady motives. Many in the community are very wary of people training models 69on their tunes that they've poured their love into. So please keep discussion and questions around AI and 70LLMs to channels dedicated to the topic and be fully respectful of other people's work. 71 72Furthermore, tools like ChatGPT generally give wrong answers. Please don't ask the community to fix those 73answers for you, as generally they will be timewasting nonsense. 74 75Human questions are always welcome! 76 77## Where can I download loads of patterns to train my LLM? 78 79You cannot, as there is no such place. For details regarding our stance towards AI/LLM, see [above](/learn/faq/#can-i-use-strudel-with-aillm-tools) 80 81## How to run offline? 82 83Strudel works offline just fine! There are multiple techniques for this, see [this explanation](learn/pwa/#using-strudel-offline). 84 85## How to change tempo? How do I translate BPM to cpm? 86 87Strudel works in cycles, rather than beats, but if you assume a certain number of beats per cycle, you can convert between them. 88 89For example, if you have your tempo in beats per minute and use 4 beats per cycle (e.g. if your track is in 4/4ths) then you can do `setcpm(BPM/4)` 90where BPM is your beats per minute. 91 92If you have a different number of beats per bar or are using more or less beats per cycle (e.g. If you want to put only half a bar or 93two bars into one cycle), adjust accordingly. 94 95## Where can I see all the functions? 96 97If you pop open the sidetab of strudel.cc (small white < on the right hand side), there is a tab "reference" which lists all the functions of strudel. 98 99## Where can I see all the samples and synths? 100 101If you pop open the sidetab of strudel.cc (small white < on the right hand side), there is a tab "sounds" which lists all the drum machines, samples and synths currently loaded. 102 103## How do I use this exactly like a DAW? 104 105Strudel has different design aims for a DAW, and so treating it like one will likely be frustrating. DAWs are geared towards 106sequencing notes over time in predictable ways, whereas Strudel and similar Uzu languages are geared towards combining and 107transforming patterns in ways that can be hard to predict. 108 109If you want to emulate the functionality of a DAW in Strudel, you'll have to identify the operations 110executed by the DAW (sequencing, repeating, applying filters and envelopes) and write code that is equivalent to these 111operations. For example in Strudel, the 'arrange' and 'pick' methods are useful for sequencing patterns over time (see question on these later in this document). 112 113You might still find that the typical DAW workflow is not really adapted to live coding because, despite 114both being ways of making music on the computer, they are two very different tools. You could then adapt your way of proceeding 115to the medium of code, which might mean leaving more place to serendipity and writing code that you don't predict the output of. 116 117## Why doesn't everyone just use a DAW? 118 119There is no easy answer to this question. Here are some thoughts: 120 121- Live coding tools such as Strudel are excellent for improvising music and visuals using a computer. DAWs are valuable and robust companions for other activities such as producing, mastering and mixing audio, among other usages. Using a tool does not exclude from using any another tool, just build a toolbox. 122 123- Live coding has developed over decades as a distinct creative practice. For example, live coding artists like to show their screens while playing in front of an audience. It is an essential part of what they do, of the way they share their activity with everybody. 124 125- Code is a human language, it is made for other humans to read it. You can read the code and enjoy the music too. It has meaning, value, and there might even be something poetic/important about it! - Strudel is free and open source, you can inspect the code, reshape it, contribute to it if you can/want. It is not opaque and this matters for many people. There is no black box, no obscure abstractions, no business model, no user tracking or hidden features. We need open tools in the arts! - Live coders don't all shy away from using DAWs. Many use them all of the time, especially when it makes their life easier for... live coding! 126 127- Code is an artistic material like any other. There is something valuable in the process of making music through code. More generally speaking, it is nice to tackle creative problems through the use of a programming language: creative thinking, building up your own solutions, DIY approach to music-making, unexpected outcome of algorithms, funny human errors, etc. 128 129- There are pianos and trumpets in your DAW: why do people continue playing the piano or the trumpet? Think of live coding tools as instruments that you activate through the act of programming. 130 131## How can I interface Strudel with my favorite music software? What can I do with it? 132 133Strudel can send [MIDI and OSC](/learn/input-output/), which are protocols for communicating musical information. 134 135Other music software (or hardware!) can then listen to these messages and process them according to its capabilities. 136 137A simple example would be to send livecoded audio to a DAW like Ardour on different tracks and then use it to mix them. 138 139You could also send the MIDI of a sequenced pattern to Musescore and then have it transcribe your livecoded work as a musical score. 140 141You could also send MIDI to your hardware synths, if you like their sound. 142 143## How do I use this in my closed source webgame or other software? 144 145You don't. You need to license your game to a free/open source license fulfill the [AGPLv3 license](https://codeberg.org/uzu/strudel/src/branch/main/LICENSE) Strudel is distributed under. 146 147## How to play different patterns simultaneously? 148 149Using the $ operator, several patterns can be played at once: 150 151<MiniRepl 152 client:idle 153 tune={`$: s("bd*4").bank("tr707") 154$: s("- sd").bank("tr909")`} 155/> 156 157See also [stack](intro/#combining-patterns) 158 159## Is it possible to mute a pattern? 160 161With an additional underscore, a pattern can be muted. 162 163<MiniRepl 164 client:idle 165 tune={`$: s("bd*4").bank("tr707") 166_$: s("- sd").bank("tr909")`} 167/> 168 169See also [hush](/learn/conditional-modifiers/#hush) 170 171## How can I arrange in Strudel using `mask`? 172 173With mini-notation, using the `<>` and `!` operators, you can try something like 174 175``` 176.mask("<0!24 1!40>") 177``` 178 179It mutes a pattern for 24 cycles and plays it for 40. You would gain 64 cycles total, a multiple of 2/4/8 commonly used in western music. 180 181If each cycle is a bar, as a starting point, you could write a mask like that for any pattern: 182 183``` 184.mask("<0!16 0!16 0!16 0!16 0!16 0!10>") 185``` 186 187It mutes it throughout. 188 189For arranging, you could add the same mask to each part and replace some zeroes with ones in your different masks to make parts play. 190 191If you use `.mask()` on different patterns mess up your counting, then patterns do not align anymore. 192On the other hand, doing that on purpose is one of the things that could be considered a strength of tidalcycles and Strudel. 193You can make things quite lively and more organic with a little (controlled) interference, according to your own taste. 194And you are free to arrange in cycles like 3, 6 or 9 too. 195 196To modify everything at once, you could try all and when, for example: 197 198``` 199all(x=>x.when("<0!7 1>", x=>x.lpf(saw.range(200, 2000)))) 200``` 201 202This would lowpass filter sweep everything every 8 cycles. 203 204## How can I arrange in Strudel using `arrange` or `pick`? 205 206Take [Pachelbel's Canon in D](https://en.wikipedia.org/wiki/Pachelbel%27s_Canon#Analysis) as an example which has 4 voices (one cello and 3 violins) which have repeating patterns, as seen in the link above. 207 208The following snipped defines the patterns as constants which can then be used for the different voices. `arrange` takes multiple arguments, which are each a number of cycles and a pattern which is played for the number of cycles, wrapped in `[]` If the pattern is shorter than the number, it is repeated. 209 210<MiniRepl client:idle tune={`const cello = note( 211 "<[d3 a2 b2 f#2] [g2 d3 g2 a2]>") 212 .color("grey").sound("gm_tremolo_strings:3") 213 const violin_p1 = note( 214 "<[f#5 e5 d5 c#5] [b4 a4 b4 c#5]>") 215 .color("blue") 216 const violin_p2 = note( 217 "<[d5 c#5 b4 a4] [ g4 f#4 g4 f#4]>") 218 .color("green") 219 const violin_p3 = note( 220 "<[d4 f#4 a4 g4 f#4 d4 f#4 e4] [d4 b3 d4 a4 g4 b4 a4 g4]>") 221 .color("purple") 222 const violin_p4 = note( 223 "<[f#4 d4 e4 c#5 d5 f#5 a5 a4] [b4 g4 a4 f#4 d4 d5 [d5@3 c#5]@2]>") 224 .color("red") 225 226cello$: arrange( 227 [2, silence], 228 [18,cello]) 229 violin1$: arrange( 230[4,silence], 231[2,violin_p1], [2,violin_p2], 232[2,violin_p3], [2,violin_p4], 233[2,violin_p1], [2,violin_p2], 234[2,violin_p3], [2,violin_p4] 235).sound("gm_tremolo_strings:0") 236violin2$: arrange( 237 [6,silence], [2,violin_p1], 238 [2,violin_p2], [2,violin_p3], 239 [2,violin_p4], [2,violin_p1], 240 [2,violin_p2], [2,violin_p3] 241 ).sound("gm_tremolo_strings:1") 242 violin3$: arrange( 243[8,silence], 244[2,violin_p1], [2,violin_p2], 245[2,violin_p3], [2,violin_p4], 246[2,violin_p1], [2,violin_p2] 247).sound("gm_tremolo_strings:2") 248 249 all(x => x.release(.2)) 250 251`} /> 252 253Alternatively, you can also put the different patterns for the violins into one single array (`const violins = [violin_p1, violin_p2, violin_p3, violin_p4]`) and use a pattern as an index to `pick` the nth element of that array. This replaces the voices defined above. Here you use `0@2` to specifiy that the first item (i.e. with index `0`) is played for `2` cycles. 254 255`pick` has better highlighting than `arrange`: 256 257<MiniRepl client:idle tune={`const cello = note( 258 "<[d3 a2 b2 f#2] [g2 d3 g2 a2]>") 259 .color("grey").sound("gm_tremolo_strings:3") 260 const violin_p1 = note( 261 "<[f#5 e5 d5 c#5] [b4 a4 b4 c#5]>") 262 .color("blue") 263 const violin_p2 = note( 264 "<[d5 c#5 b4 a4] [ g4 f#4 g4 f#4]>") 265 .color("green") 266 const violin_p3 = note( 267 "<[d4 f#4 a4 g4 f#4 d4 f#4 e4] [d4 b3 d4 a4 g4 b4 a4 g4]>") 268 .color("purple") 269 const violin_p4 = note( 270 "<[f#4 d4 e4 c#5 d5 f#5 a5 a4] [b4 g4 a4 f#4 d4 d5 [d5@3 c#5]@2]>") 271 .color("red") 272 273const violins = [violin_p1, violin_p2, violin_p3, violin_p4] 274 275cello$: "<~@2 0@18>".pick([cello]) 276violin1$: "<~@4 0@2 1@2 2@2 3@2 0@2 1@2 2@2 3@2>".pick(violins) 277.sound("gm_tremolo_strings:0") 278violin2$: "<~@6 0@2 1@2 2@2 3@2 0@2 1@2 2@2>".pick(violins) 279.sound("gm_tremolo_strings:1") 280violin3$: "<~@8 0@2 1@2 2@2 3@2 0@2 1@2 >".pick(violins) 281.sound("gm_tremolo_strings:2") 282all(x => x.release(.2)) 283`} /> 284 285The `pick` method also works with jsons which have named elements, which makes it easier to read, see the [here](/learn/conditional-modifiers/#pick). `pickRestart` restarts the pattern upon picking it which can make a difference if the duration of the pick indexes doesn't line up with the patterns which are picked - which is not the case here. 286 287Try adding `.punchcard()` after the `release(.2)` for a visualization. 288 289## I saw Switch Angel using functions which I cannot find in the reference (e.g. `trancegate`). How do I make it work? 290 291Methods like `trancegate()`, `rlpf()` and `acidenv()` are currently not pattern methods which come natively with strudel. 292 293They are part of a script/prebake for strudel which was written by Switch Angel and published [here](https://github.com/switchangel/strudel-scripts) 294 295You can find the instructions how to use that script in the readme.md there. 296 297## Is there difference between `n` and `note`? 298 299They are not aliases of each other, in contrast to `s` and `sound`. 300 301The method `note` is used to reference a certain note (either as its name, such as `c` or `b2` or the midi number `69`, for example `note("c3 e3 g3")`). 302 303On the other hand, `n` is a way to reference the nth index of something. This something can be a scale (eg `n("0 2 4").scale("C:major")`) , but it can also be a particular note in a chord (see https://strudel.cc/recipes/recipes/#arpeggios for an example) . 304 305The method `n` can also be used for something completely unrelated to notes, in particular the nth sample from a sample map `s("hh*8").bank("RolandTR909").n("0 1 2 3")`. 306 307<MiniRepl 308 client:idle 309 tune={` 310 n("<[0 1 2 3@3 -@2] [3 2 1 0@3 -@2] >") 311 .scale("A:minor:pentatonic") 312 .s("gm_acoustic_guitar_steel").n("<0 1 2 3>/2")`} 313/> 314 315Note that `n` is not the only way that functions use indices, some take numbered patterns instead. 316 317## Is there a cheat sheet for all symbols? 318 319Yes! 320 321``` 322' marks start and end of strings, is different from " 323" marks start and end of single line patterns in mini notation, is different from ' 324` marks start and end of patterns with line breaks in mini notation, is different from ' 325[] used for patterns in mini notation, each item in it has the same length 326<> used for patterns, alternates between items each cycle 327{} historically used for polyrhythmic patterns. {a b c}%4 is the same as <a b c>*4. 328@3 elongates the item by a factor of 3 (other numbers work too, even non-integer, but for numbers between 0 and 1 you need a leading zero like this: @0.5) 329@ after an item: elongates the item once (multiple @ work too c @ @ is the same as c@3) 330_ after an item: also elongates an item once (multiple _ work too c _ _ is the same as c@3), see below for a different usage. 331. this divides equal parts of a pattern and is called a foot. Can be used instead of [] like this: "1 6 7 8 . 2 . 3 . 4" is the same as "[1 6 7 8] 2 3 4" 332- silence 333~ also silence 334x not silence (for the use in struct, any non-silence symbol works there) 335b decrease by one semitone, i.e. flat, works for steps of scales, note names (but not midi numbers) and chord names 336s increase by one semitone, i.e. sharp, works for steps of scales, note names (but not midi numbers) but not chord names 337# increase by one semitone, i.e. sharp works for steps of scales, note names (but not midi numbers) and chord names 338# also used in mondo notation 339*3 play the sample or pattern at thrice the speed, fast(3) 340!3 play the sample or pattern three times 341/2 play the sample or pattern at half speed, slow(2) 342? play the pattern sometimes 343| once per cycle, choose randomly a pattern of those separated by i.e. chooseCycles() 344, play all items separated by it at the same time, i.e. stack() 345: is used to separate multiple parameters, such as adsr(".1:.1:.5:.2"), this is is an operator which creates a list of these objects. 346$: at the start of a line, defines a member of the stack. is the only stack name that should occur multiple names 347_ before a stack name: mutes the stack, i.e. hush(), for example _$: s("bd"), see above for a different usage. 348```