As usual you find a way to put into clear and precise language a thing I was struggling to gesticulate about (in my head, though public gesticulation is not unknown for me).

1 Like

this is v v much in line w/ my experience in creating my own tools. I actually really hate both max/msp and ableton, but I’ve stuck to both really firmly just bc there’s a bunch of things they can already do. like, uh, recording. and volume.

my dream and goal is to write a tool that I’ve built from the ground up, but for right now I gotta figure out how to go and make some gosh darn music, so I don’t go off and make a tool designed entirely around stuff that I don’t need (which I’ve done, alot,).

so I feel like you really need something extensible to make this system work. wish some of those things were better (& open source >:| ), but we got what we got.

4 Likes

i agree. there’s some slippage (which is fine.) i jumped in the thread on a whim, b/c i saw @csboling’s fun salty beep post and the response, and thought it would be a fun counterpoint exercise to try and implement a major scale of sinewaves in C, concisely and clearly, and see how long it would take with no dependencies (answer, maybe 10-15 minutes. this would be a great interview problem.)

following is a rambly Too Long bunch of thoughts that will probably close out my involvement here for the time being.

as often happens, i think the discussion has uncovered some important points here, one of which is that “programming” or the verb “to program” can encompass a variety of tasks.

to me, “programming” always been a sort of fundamental tool for implementing parts of all kinds of systems. in my own experience those have include audio hardware / firmware / software devices, but also quite a few scientific research projects and some other kinds of HW/SW products.

the more projects i’ve done, the more my concept of “programming” has broadened. it is a craft that encompasses many considerations beyond the algorithmic. projects have a tendency to grow in scope. the more stuff your platform can do, the more true this is.

e.g.:
ok let’s make an interactive sound sculpture…
what if we add a bluetooth chipset to that… and a camera… and a webserver…
and and… and suddenly my architecture has grown from having to process a stream of samples, to a dizzying tapestry of processes, threads, data streams, platforms, protocols, and libraries. that’s where things fall apart without serious attention to craft. (so maybe what i need to know is “how do you learn software architecture” or something.)

maybe a more relevant point: how to learn really depends on what kind of goals you want to be able to achieve. the assumption is that we’re talking about audio synthesis and processing. clearly, there are many tools that do low-level audio manipulation well. the only reason i can see to go to the sample level is to experiment with algorithms. ironically, as @PaulBatchelor has pointed out, probably the best way to experiment with audio algorithms programmatically is with a high-level and possibly domain-specific language. there are some standouts:

  • Faust in particular is kind of a killer app if you are comfortable with the functional paradigm and expressing algos as signal flow. (TBH, i haven’t personally gotten as comfortable with it as i’d like for eperimenting at low levels; usually i have to have a super clear idea of what i want to do first. for building strings of blocks and cross-compiling them, it’s great.)

  • Octave/Matlab is the de facto standard for a lot of academic and engineering work, and comes with many tools for visualization, numerical analysis and optimization, &c. (SciPy is also becoming very popular; i still find python sort of a drag to work with personally). it’s a one-liner to export an Octave matrix to a soundfile. (audiowrite('foo.wav', data, samplerate)). pretty much everything i do algorithmically starts in Octave before becoming C code; i’ll write DSP test cases in Octave and re-use them on the C output.

  • C/C++ get honorable mention from me here because they are the bedrock languages, learning them is good for you, and they can extend all those other environments. there are many, many ways to deploy C in audio programs without dealing with the boilerplate: write a JACK program, VST plug, Audio Unit, JUCE app, csound opcode, PD external, use libsndfile, use soundpipe, alt firmware for your favorite Eurorack computer, &c &c.

(i’ll emphasize again that the hard part here is understanding what operations produce what results, and not actually performing the operations.)

if you don’t want to work at the low level of the DSP (you want to string together building blocks and probably control them with musical logic), then there are the usual suspects, largely to taste:

  • textual (csound, supercollider, chuck, sporth, &c)
  • patching (pd, max, reaktor, bidule, &c)

you absolutelydo not have to know much DSP math to effectively use these things; that is of course their basic reason for existence. the further up you go in terms of abstraction, the less this activity resembles general-purpose programming. (which is fine! i’m all for stepping away from, like, Instruction Set paradigms.)

the core concepts of “programming” for the purpose of processing audio can be absorbed in a day. digital audio is just a stream of numbers. loop over them and perform a handful of arithmetic operations and “that’s it.”

nobody does everything “from scratch.” very few people would ever get anything done. PD uses Tcl/Tk to implement the UI, Max uses JUCE. (Tcl/Tk is a scripting language with a GUI toolkit built in C; JUCE is a C++ framework wrapping native rendering with a lot of helpful abstractions. C and ASM are abstractions. it’s turtles all the way down. i haven’t even seen applications of substantial scope written in ASM since the 80s, and frankly… those people were maniacs. (ok, shlisp is done in ASM, and peter B is also kindof a maniac, but that’s a set of opcodes and much simpler.))

for all my evangelizing about learning C, it’s not because i think doing stuff at the low level is particularly smart or cool. usually it’s not the most efficient way to do some particular thing (because there is a domain language / framework / library / program / device that already does that thing.) i recommend it for pragmatic reasons, because knowing C/C++ (and now, JavaScript) allows you to see into such a large amount of what’s going on in the digital world.

if the context wasn’t specifically about audio, i would say just learn (modern) javascript. syntax is clean, there are tons of resources and tools, computers are fast and it’s not just for websites anymore (e.g. Orca).

in the context of audio, learn C. you need the performance and it will help you customize everything from Max to modular.


“real programmers set the universal constants at the start such that the universe evolves to contain the disk with the data they want.”

20 Likes

just wanted to pop back in say that i’ve appreciated all the responses to my initial question, and i’ve had a lot of fun reading the discourse in this thread that hasn’t been directly related to my question. i really enjoy this community and admire y’alls knowledge and grace. :bouquet:

2 Likes

i need to amend my statement. i’ve tried to learn max i believe three times. third times, you know… :sparkles:

@andrew has been inspiring me w/m4l devices and i’ve been wanting to port old patches in for years. i started learning french in duolingo and have been enjoying that process deeply, and so it reminded me: i can learn a new language.
@Rodrigo is beyond amazing with his ideas, execution and generosity of patch content and time.
last night i had trouble sleeping because i was so excited about a stupid simple idea i had for the port i am working on.

i couldn’t get very far without teachers but this time it is feeling much better. so what i mean to say is that i am learning max right now. @dan_derks recommended a lot of things and continues to help, the kadenze max course has been helpful and a good place to start. my first port to m4l was a @RABID @rajatheresidentalien @CrackaAttacka patch that has been so close to my heart and practical application since well into the old forum years. miss u raja!!!

this place is amazing and it is time to post in the the coffee thread

and @sandy has been such a kind soul egging me on in my king port patch modification dreams of the chocolate grinder FOREVER. it will happen.

9 Likes

@dude forgot i had this account, and that it had notifications on :see_no_evil:
…until you tagged me :laughing:
(sorry i’m not much on forums anymore, sometimes i visit cycling74’s forums, but not frequently, hope no one takes it personally, just got my focus elsewhere these days).
Truly grateful to hear that I helped you in some way, though. It gets easier and easier in an exponential way, but the universe needs you to meet it half-way first,
so keep going forward! :raised_hands: Never look back. :eyes: FOREVER! :muscle::stuck_out_tongue_winking_eye:
And you’ll always find more joy just around the next corner in this crazy world of artsy fartsyness and tech :joy:
Grateful for your continued awesomeness :pray::innocent: Be well, All the best :beers:

5 Likes

dang, kadenze looks awesome. i’ve been wanting to learn max too. i will have to give the kadenze course a shot.

if you have any other pointers or suggestions of helpful resources, give me a shout!

i am the last person to give learning advice on this topic as it has taken me years and years to even get motivated to learn the barest beginnings of max.

what i am doing these days is a mix of max tutorials (there is a d/l for the delicious tutorials from max packages section (which i have not tried (in that format) yet)), dissecting/exploring patches i love, kadenze (very slowly). i control click on objects and explore examples constantly. i try to engage learned friendly folks for thoughts. i’m reading max threads and lightly dipping toe into max forums (mostly finding amazing max4live patches). hoping to collaborate on ideas with others.

but my main thing is trying not to lose fun so i encourage having fun while mixing in some learning so i let abstractions happen naturally otherwise it is so dry. that was what stopped me in learning tracks the first 2 times.

7 Likes

thank you for this. this is actually really helpful and encouraging.

1 Like

This thread moved a bit towards general programming advice, so I feel like this is a good place to ask…

I currently do a lot with Max, primarily processing patches. However I really want a better way to incorporate these into my mobile app AU workflow, since it seems c74 has little interest in native iOS support. Would learning Swift with Audiokit be a good jumping off point? I have no interest in development professionally (I’m a PM and prefer that side of things), so this is mainly about personal projects with the side benefit of being able to share them publicly. I’d like to avoid the deep dive into C if at all possible. Currently, I can get by in Python and Lua and know enough JS to break things, so I’m not totally new to dev, but this would be the first venture into the audio and mobile side of things.

i’ve always had a real desire to learn programming. i find it hard to learn code on my own because when i dont have any guidance on what the fundamentals are, or where a good starting place is, i tend to skip over a lot of basics and making it harder on myself. i did find a 7 hour linux course on youtube that has been very helpful for programming from very beginner, installing linux to a virtual machine, to more advanced coding. there are a few python courses that are pretty helpful in these online coding bootcamps that i’ve tried also.

reading the threads here and seeing how creative people are with building their own production tools is very inspiring. it makes me want to dive into lua/supercollider/pd, etc. I may have mentioned this before somewhere else in the forum, but this course was the first one that i was really able to latch onto and grasp each basic concept and understand how every aspect of max msp works from the ground up. it’s really good. i think i heard about it from a telefon tel aviv interview. its great. i have tried a lot of them, and this was by far the most helpful if anyone else is having trouble finding a resource for learning max:

Programming Max: Structuring Interactive Software for Digital Arts

another good resource:
image

on a related note, i was wondering recently what would be a good way for someone without a degree to get into basic electronics engineering? it seems like it would be really cool to have someone guide you through building pcbs and original diy circuits. even breadboarding from scratch… i find that sort of thing more rewarding and fun than coding software. and making your own instruments would be an extremely useful skill

2 Likes

Would be interested in any suggestions for getting started learning C/C++. Coming from a background writing mostly JS and a smattering of Python, there are elements to C that I haven’t grasped such as compilers - does anyone have a good tutorial to recommend on setting up an environment for this?

Just chiming in here.

Background: After just over 12 years of teaching American history to teenagers, I resigned in October and have been trying to figure out next steps in the awful job market. Thankful to have a nice cushion that I can dip into with my retirement savings until things blow over, though my wife isn’t pleased with that.

Anyway, as I keep my eyes peeled for jobs I’m more qualified for, I figured it would be a good time to dip my toes into new things. I’ve been taking this wonderful Udemy class on Python over the last week after doing some free TeamTreehouse stuff the week before that I get through our local library. I’ve already learned so much that can transfer to things like SuperCollider and Max.

Also, as my 2010 Macbook Pro is gradually dying, I figured I’d get a Raspberry Pi to replace its function as my media server and it has become another learning experience over this past week.

All’s that to say, I’m enjoying the journey even if it doesn’t lead far enough to expand my career possibilities.

(Can’t recommend that Kadenze course on MAX enough, and maybe I did earlier in this recently revived thread.)

7 Likes

I recently picked up Effective C and have been enjoying it.

3 Likes

Ah, if it’s near the quality of the Python book from that publisher, I’m sure it’s great!

1 Like

I’m wondering how this is done.

I can write python but is there a better language for getting into coding that is related to music?

How do you guys do it.

My current setup is just an OP-1 for some ambient // experimental music

But I wrote a script to download the audio from YT videos and have used that in Ableton

Basically what can you do with C as a programming language that is music related?

Quite a bit!

You could make extensions for max or supercollider or Pd. You could write Arduino code to make a custom midi controller. You could learn C++ and Juce and make VSTs.

1 Like

Thanks for that.

I got interested in this topic after seeing the monome norns and I’m wondering how that is programmed. Any ideas on what I need to learn for this?

Lua, mainly. There’s C and Supercollider a bit deeper under the covers.

2 Likes

2 posts were merged into an existing topic: How to listen to music in 2020?