Hi, I’m super new to this. So basically I have no idea how to code an entire song. I’ve only seen people changing the code as they go but essentially I’d just like to code up a song and be able to record it as often as I like without making changes during recording it. Is this possible with FoxDot? If not, what are my alternatives?
You can absolutely do this. In the SuperCollider window, type
s.record and press Ctrl+Enter to start recording (it will tell you in the post window about where the file is stored) then
s.stopRecording when you are finished. SuperCollider is doing all of the audio stuff so recording needs to be executed in there.
That being said, live coding is really about being live and making coding part of performance. I’d definitely recommend you try out making changes as you go and ask “what happens if I do this?” and seeing what you can come up with on the spot - it’s a lot of fun! Don’t feel like you have to, of course, everyone approaches it from a different angle. Let me know if you need any help with anything else!
I definitely want to code the part that I’m working on live and repeatedly hear that but I want to also be able to compose different bits of music that I coded earlier. Think something like this but in code. I don’t care so much about the live aspect and giving a performance but more about creating whole songs declaratively and reproducibly.
Go for it - looking forward to hearing some of the finished products!
What I stated above was really more of a question than a statement of action. Basically I need to know how to even approach something like I outlined above using foxdot. Is there some kind of guide or a cookbook for that?
Generally speaking, how do people code up complete songs as opposed to recording a live performance? I’m really new to this whole music coding thing so I’d appreciate some guidance.
Oh I see! Well you can treat each FoxDot player object line as a track in a DAW i.e. drum kit, percussion, bass, synth melody etc and set the
amplify keyword to a TimeVar that has values of 1 and 0 to switch it “on” and “off”, if that makes sense.
I have a repo of mini FoxDot jams written in 10 lines of code or less that might be of interest to you to check out:
I have been thinking about this as well … I know that it sort of bucks the trend of the live-coding but I wanted to be able to have some control over what I am doing so that I can modify and improve and repeat any ideas.
I have only just started looking into it but I think FoxDot gives you the tools to allow you to do this. Some thoughts
Have a look at the temporal recursion section in the documentation
Note: you will need to replace >> with >> to get it to play something
Also worth looking at the Groups demo example within the FoxDot, at the bottom it show how to chain two groups together using two functions to build up a repeated verse chorus refrain. You can also add in the use the var command to setup some elements within the above examples and then modify them on the fly using the update property, again have a look in the Vars demo examples in the FoxDot
Weirdly the syntax formatting on the website doesn’t allow both > and < symbols to be in the same code box so I’ve updated the code examples so they don’t have HTML in them now! The temporal recursion aspect definitely gives you some higher-order control over your music so you can have sections, e.g. verse / chorus and is worth looking at for larger arrangements. In future I’m going to add a “send-note” method to SynthDefs so that you can do something like:
def func(n=0): if n % 4 == 0: pluck.note(4, sus=2, pan=-1) elif n % 4 == 2: pads.note(2, sus=4, pan=1)
So you can create individual note-on events instead of using Players if you wish