Stock Posted January 12, 2016 Report Share Posted January 12, 2016 On 1/12/2016 at 3:17 AM, chim said: I made a compressor with some GUI features, very fun! Woah, didn't even knew one could do such things in Pd... Been wanting to learn Pd for years, but then I thought I'd better learn Max - maybe I'm totally wrong! Also, was thinking about learning Ruby for a while, and try to do some sound with it, just for the fun. I don't even know if that's possible or not, yet it seems far less complicated than doing it in C++, and when it comes down to programming I'm kind of a lazy as anyway so... Thanks Haha Confused Sad Facepalm Burger Farnsworth Big Brain Like × Quote Hide Stock's signature Hide all signatures Weekly Beats 2020 let's goooooo Link to comment https://forum.watmm.com/topic/79152-programming/page/14/#findComment-2409584 Share on other sites More sharing options...
Guest Posted January 12, 2016 Report Share Posted January 12, 2016 (edited) ^ you'll have performance issues real quick, unless you just do offline rendering to wav files or something. and even this will be slow AF. audio = C/C++. with audio code, essentially you'll just be filling arrays (your audio channels) with numbers (your audio samples) - it doesn't really matter what language you're doing it with, this part isn't easier in Ruby than it is in C++, so better go with a language which can push more samples quicker. which is C or C++. I've developed some sequential-numbers algorithmic thing in Objective C recently, and for shits'n'giggles I put it in a realtime audio thread to use it as a synth. The result was that it couldn't keep up, 100% CPU and glitchy. So I rewrote that thing in C++ and it's like 50 times as fast and can produce 8 channels of realtime audio (@48kHz, 64bit) no problemo. Objective-C is not exactly slow either, it's way faster than any of these interpreted or VM languages which are made for clueless web developers. conclusion: definitely not do audio with Ruby, it's a dead end. Edited January 12, 2016 by Guest Quote Link to comment https://forum.watmm.com/topic/79152-programming/page/14/#findComment-2409649 Share on other sites More sharing options...
Guest Posted January 12, 2016 Report Share Posted January 12, 2016 however, if you're new to programming, pick a language which you think is fun to use. just.... avoid frustration, don't expect it to be the right tool for realtime DSP. Quote Link to comment https://forum.watmm.com/topic/79152-programming/page/14/#findComment-2409650 Share on other sites More sharing options...
chim Posted January 12, 2016 Report Share Posted January 12, 2016 On 1/12/2016 at 8:47 AM, StocKo said: Woah, didn't even knew one could do such things in Pd... Been wanting to learn Pd for years, but then I thought I'd better learn Max - maybe I'm totally wrong! Also, was thinking about learning Ruby for a while, and try to do some sound with it, just for the fun. I don't even know if that's possible or not, yet it seems far less complicated than doing it in C++, and when it comes down to programming I'm kind of a lazy as anyway so... You can do pretty much anything if you're smart enough. It's low-level enough that you can insert the mathematical equations for various DSP processes and have an effect come out the other end. I'm not exceedingly familiar with Max/Msp, although the two are closely related I'm fairly sure Max 7 has some advantages at this stage. However, this one is free, open source and Linux friendly... Thanks Haha Confused Sad Facepalm Burger Farnsworth Big Brain Like × Quote Link to comment https://forum.watmm.com/topic/79152-programming/page/14/#findComment-2409694 Share on other sites More sharing options...
Braintree Posted January 13, 2016 Report Share Posted January 13, 2016 On 1/12/2016 at 3:53 PM, phling said: ^ you'll have performance issues real quick, unless you just do offline rendering to wav files or something. and even this will be slow AF. audio = C/C++. with audio code, essentially you'll just be filling arrays (your audio channels) with numbers (your audio samples) - it doesn't really matter what language you're doing it with, this part isn't easier in Ruby than it is in C++, so better go with a language which can push more samples quicker. which is C or C++. I've developed some sequential-numbers algorithmic thing in Objective C recently, and for shits'n'giggles I put it in a realtime audio thread to use it as a synth. The result was that it couldn't keep up, 100% CPU and glitchy. So I rewrote that thing in C++ and it's like 50 times as fast and can produce 8 channels of realtime audio (@48kHz, 64bit) no problemo. Objective-C is not exactly slow either, it's way faster than any of these interpreted or VM languages which are made for clueless web developers. conclusion: definitely not do audio with Ruby, it's a dead end. Is Obj C more useful for Core Audio, or does it not matter? I'm probably going to be developing for Mac since I use Logic. If you can still make plugins in C++ on a Mac, then I would rather just start there since I've learned some of the basics of C++ already. Thanks Haha Confused Sad Facepalm Burger Farnsworth Big Brain Like × Quote Hide Braintree's signature Hide all signatures colindyer.bandcamp.com williamsbraintree.bandcamp.com Link to comment https://forum.watmm.com/topic/79152-programming/page/14/#findComment-2409835 Share on other sites More sharing options...
sweepstakes Posted January 13, 2016 Report Share Posted January 13, 2016 On 1/12/2016 at 3:53 PM, phling said: ^ you'll have performance issues real quick, unless you just do offline rendering to wav files or something. and even this will be slow AF. audio = C/C++. with audio code, essentially you'll just be filling arrays (your audio channels) with numbers (your audio samples) - it doesn't really matter what language you're doing it with, this part isn't easier in Ruby than it is in C++, so better go with a language which can push more samples quicker. which is C or C++. Do you know why there are so many more audio projects in C++ than C? Is it just because there's higher level constructs and OO built in? I'm learning C right now and I feel like I should wrap that up before I move onto C++ but it's interesting that there's so much more C++ DSP code than C. I've seen some DSP code in Lisp too (lol) so I guess it doesn't matter that much what you use, it's just easier to grab C++ code off the shelf than anything else for DSP. Thanks Haha Confused Sad Facepalm Burger Farnsworth Big Brain Like × Quote Link to comment https://forum.watmm.com/topic/79152-programming/page/14/#findComment-2409838 Share on other sites More sharing options...
sweepstakes Posted January 13, 2016 Report Share Posted January 13, 2016 I've been playing with Atom a little at work (although I mostly just use VS there) and it seems really cool, looking forward to farting around with the configuration and shit and hopefully making or at least modifying some extensions. I usually stick to Vim in the command line at home though because I'm a neanderthal/neckbeard. Thanks Haha Confused Sad Facepalm Burger Farnsworth Big Brain Like × Quote Link to comment https://forum.watmm.com/topic/79152-programming/page/14/#findComment-2409843 Share on other sites More sharing options...
Guest Posted January 13, 2016 Report Share Posted January 13, 2016 (edited) On 1/13/2016 at 5:38 AM, Braintree said: On 1/12/2016 at 3:53 PM, phling said: [....] Is Obj C more useful for Core Audio, or does it not matter? I'm probably going to be developing for Mac since I use Logic. If you can still make plugins in C++ on a Mac, then I would rather just start there since I've learned some of the basics of C++ already. that's good - I stayed clear of C++ for far too long just because the syntax looked super awkward, and wished I'd had started earlier..... definitely stick with C++. CoreAudio itself is entirely C. Actually Apple strongly advises against using ObjC in the audio thread for performance reasons. not sure if you know this, but you can "mostly" just mix C and C++ code. Or C and ObjC code. or C++ and ObjC code. (ObjC is mostly useful if you want to use higher-level Apple libraries (e.g. UI stuff). Personally I'm trying to migrate away from it to get out of Apple land. You'll only need it if you plan on developing iOS/Mac apps using Apple-only libraries.) Haven't developed an AU or VST plugin yet (though I guess what makes it a plugin (vs standalone app) is just a bunch of boilerplate setup code?). Sure you can do the whole thing in C++ from scratch, including UI, with OpenGL graphics for example... Lot of people use the JUCE libraries for plugins (when they don't want to write everything from scratch): http://www.juce.com (haven't tried it because commercial license costs money && dunno if worth the investment for me etc.) for Core Audio, you'll want this book: http://www.amazon.com/Learning-Core-Audio-Hands-On-Programming/dp/0321636848 CoreAudio = just a lot of C boilerplate code to setup your audio context, this book explains it quite well (does not go as far as plugins though!) Edited January 13, 2016 by Guest Quote Link to comment https://forum.watmm.com/topic/79152-programming/page/14/#findComment-2409885 Share on other sites More sharing options...
Guest Posted January 13, 2016 Report Share Posted January 13, 2016 (edited) On 1/13/2016 at 5:55 AM, sweepstakes said: On 1/12/2016 at 3:53 PM, phling said: [...] Do you know why there are so many more audio projects in C++ than C? Is it just because there's higher level constructs and OO built in? I'm learning C right now and I feel like I should wrap that up before I move onto C++ but it's interesting that there's so much more C++ DSP code than C. I've seen some DSP code in Lisp too (lol) so I guess it doesn't matter that much what you use, it's just easier to grab C++ code off the shelf than anything else for DSP. yeah this, the OOP features and tons of existing libraries combined with performance must be the reason, because C++ is definitely not known for its elegance or ease of use. as mentioned above, I stayed clear of C++ for a long time, just because it looks exactly like this overly complex mess of tons and tons of features grafted onto C since the 80s that it actually is. :) I really like the simplicity of C... everything you learn in C will be directly useful knowledge in C++. Edited January 13, 2016 by Guest Quote Link to comment https://forum.watmm.com/topic/79152-programming/page/14/#findComment-2409890 Share on other sites More sharing options...
may be rude Posted January 13, 2016 Report Share Posted January 13, 2016 started teaching myself programming a year ago. did C, then Java, then some other stuff, now C++. i think that was a good path, i think someone in this thread recommended starting with C. it's easy and fundamental and the syntax is what a lot of languages are based on. then java was good from there because it's the object oriented stuff but it's a pretty easy language. definitely glad i did those before c++. people say c++ is powerful, that's because it's a pain in the ass. you can do any freaking thing in c++, but you control everything. anyway this book is good Thanks Haha Confused Sad Facepalm Burger Farnsworth Big Brain Like × Quote Link to comment https://forum.watmm.com/topic/79152-programming/page/14/#findComment-2409947 Share on other sites More sharing options...
chim Posted January 13, 2016 Report Share Posted January 13, 2016 Updated my compressor, GUI and internals are pretty renewed. I took a bit of a crash course in some heavy math (for me) like complex numbers, logarithms & fourier transform in order to understand some stuff better and be more comfortable making use of expressions rather than ham-fisted object connections. The bulk of the transfer function is now handled by a single expression object doing the simple and classic audio compressor equation y=((x - t) / r) + t. The most important part was having good attack and release behavior, and gain controls for each stage. The REF or reference point fader is an experimental setting that changes how the threshold relates to the actual processing. It's all starting to sound pretty good to me, but I'm just scratching the surface of the ways you can make a compressor work. Thanks Haha Confused Sad Facepalm Burger Farnsworth Big Brain Like × Quote Link to comment https://forum.watmm.com/topic/79152-programming/page/14/#findComment-2409966 Share on other sites More sharing options...
Braintree Posted January 13, 2016 Report Share Posted January 13, 2016 (edited) On 1/13/2016 at 11:10 AM, phling said: On 1/13/2016 at 5:38 AM, Braintree said: On 1/12/2016 at 3:53 PM, phling said: [....] Is Obj C more useful for Core Audio, or does it not matter? I'm probably going to be developing for Mac since I use Logic. If you can still make plugins in C++ on a Mac, then I would rather just start there since I've learned some of the basics of C++ already. that's good - I stayed clear of C++ for far too long just because the syntax looked super awkward, and wished I'd had started earlier..... definitely stick with C++. CoreAudio itself is entirely C. Actually Apple strongly advises against using ObjC in the audio thread for performance reasons. not sure if you know this, but you can "mostly" just mix C and C++ code. Or C and ObjC code. or C++ and ObjC code. (ObjC is mostly useful if you want to use higher-level Apple libraries (e.g. UI stuff). Personally I'm trying to migrate away from it to get out of Apple land. You'll only need it if you plan on developing iOS/Mac apps using Apple-only libraries.) Haven't developed an AU or VST plugin yet (though I guess what makes it a plugin (vs standalone app) is just a bunch of boilerplate setup code?). Sure you can do the whole thing in C++ from scratch, including UI, with OpenGL graphics for example... Lot of people use the JUCE libraries for plugins (when they don't want to write everything from scratch): http://www.juce.com (haven't tried it because commercial license costs money && dunno if worth the investment for me etc.) for Core Audio, you'll want this book: http://www.amazon.com/Learning-Core-Audio-Hands-On-Programming/dp/0321636848 CoreAudio = just a lot of C boilerplate code to setup your audio context, this book explains it quite well (does not go as far as plugins though!) Thanks for the info! I had actually read a book on C before jumping into C++, so it didn't look too intimidating. I've actually been eyeing that Core Audio book for a few months, and I had bought Designing Audio Effect Plug-ins in C++ but it primarily uses Visual Studio as a software companion. Good to know I'm on the right track! Edited January 13, 2016 by Braintree Thanks Haha Confused Sad Facepalm Burger Farnsworth Big Brain Like × Quote Hide Braintree's signature Hide all signatures colindyer.bandcamp.com williamsbraintree.bandcamp.com Link to comment https://forum.watmm.com/topic/79152-programming/page/14/#findComment-2409982 Share on other sites More sharing options...
Guest Posted January 25, 2016 Report Share Posted January 25, 2016 Fuck the JNI. fuck it Quote Link to comment https://forum.watmm.com/topic/79152-programming/page/14/#findComment-2413592 Share on other sites More sharing options...
Guest Posted January 25, 2016 Report Share Posted January 25, 2016 this is the worst fucking shit. exhibit a) android studio - c++ for native opengl interface --> c++ without a debugger exhibit b) JNI is the worst shit ever. fickle as fuck, and when there's something wrong, it generates errors from hell. Quote Link to comment https://forum.watmm.com/topic/79152-programming/page/14/#findComment-2413594 Share on other sites More sharing options...
Ragnar Posted January 25, 2016 Report Share Posted January 25, 2016 (edited) i am soo bad at like actual programming/the stuff you compile, even though I'm a boss with ReaJS imo. It's just sometimes I'd like to try some things ReaJS can't, or would be a great speed improvement I also want to make a VST IRC client for the lulz for the record I made some rudimentary stuff in NES assembly too, but that compiles or whatever very fast because assembly? I do wish ReaJS had fucking RECURSION why would they not include recursion Edited January 25, 2016 by Ragnar Thanks Haha Confused Sad Facepalm Burger Farnsworth Big Brain Like × Quote Hide Ragnar's signature Hide all signatures http://djsaint-hubert.bandcamp.com/ Link to comment https://forum.watmm.com/topic/79152-programming/page/14/#findComment-2413598 Share on other sites More sharing options...
KovalainenFanBoy Posted January 25, 2016 Report Share Posted January 25, 2016 In an effort to find some joy in programming again I've been learning how to "play" CoreWars. The game takes place on a finite, circular, initially empty array of instructions. The "players" are 2 programs, who are loaded randomly into the array, with no way of knowing where your opponent is located. These programs are written in a very simple, assembly-like language called Redcode. The programs are executed in turns: 1 cycle for player 1, 1 cycle for player 2. The goal is to make the other player's program execute a DAT instruction, which kills the process. It's quite fun if you're into that kind of stuff. The language was really simple when the game was first formulated, with 10 or so instructions, but it's since been expanded in such a way that lets you do really complex stuff This is an excelent primer: http://vyznev.net/corewar/guide.html Thanks Haha Confused Sad Facepalm Burger Farnsworth Big Brain Like × Quote Hide KovalainenFanBoy's signature Hide all signatures Link to comment https://forum.watmm.com/topic/79152-programming/page/14/#findComment-2413601 Share on other sites More sharing options...
Ragnar Posted January 25, 2016 Report Share Posted January 25, 2016 (edited) quick question: does recursion come into play when figuring out the routing/signal path of a modular synth, or could I do it with push/pulls from a stack edit: also when patching something in, doing a check to see if there would be feedback Edited January 25, 2016 by Ragnar Thanks Haha Confused Sad Facepalm Burger Farnsworth Big Brain Like × Quote Hide Ragnar's signature Hide all signatures http://djsaint-hubert.bandcamp.com/ Link to comment https://forum.watmm.com/topic/79152-programming/page/14/#findComment-2413602 Share on other sites More sharing options...
caze Posted January 25, 2016 Report Share Posted January 25, 2016 On 1/25/2016 at 7:32 PM, Ragnar said: quick question: does recursion come into play when figuring out the routing/signal path of a modular synth, or could I do it with push/pulls from a stack edit: also when patching something in, doing a check to see if there would be feedback I wouldn't have thought so, if you're programming any kind of complicated audio processing interface you should be dealing with classes, not recursive procedural code. You can have a kind of recursion with a class pointing to itself to create feedbacks, etc. but that's not what is usually meant by recursion. If you're just creating a simple delay effect or something it might make sense, but if you want a general purpose modular-like setup then no. You could do it, but it would end up conceptually very complicated and thus prone to bugs and such. I have little experience coding audio stuff though, so I could be talking out of my ass. Thanks Haha Confused Sad Facepalm Burger Farnsworth Big Brain Like × Quote Link to comment https://forum.watmm.com/topic/79152-programming/page/14/#findComment-2413610 Share on other sites More sharing options...
Guest Posted January 25, 2016 Report Share Posted January 25, 2016 yea.. audio or not, this is like a flat graph with a tangible amount of nodes where each node has some state, not some abstract math hocuspocus. so you'll have nodes with state and references to other nodes and can navigate iteratively. but doing this purely functional might be fun too I guess but wouldn't know how tbh :D Quote Link to comment https://forum.watmm.com/topic/79152-programming/page/14/#findComment-2413647 Share on other sites More sharing options...
Guest Posted January 25, 2016 Report Share Posted January 25, 2016 On 1/25/2016 at 7:32 PM, ThatSpanishGuy said: In an effort to find some joy in programming again I've been learning how to "play" CoreWars. The game takes place on a finite, circular, initially empty array of instructions. The "players" are 2 programs, who are loaded randomly into the array, with no way of knowing where your opponent is located. These programs are written in a very simple, assembly-like language called Redcode. The programs are executed in turns: 1 cycle for player 1, 1 cycle for player 2. The goal is to make the other player's program execute a DAT instruction, which kills the process. It's quite fun if you're into that kind of stuff. The language was really simple when the game was first formulated, with 10 or so instructions, but it's since been expanded in such a way that lets you do really complex stuff This is an excelent primer: http://vyznev.net/corewar/guide.html I really want to play this - no time now, fighting the JNI for the good cause >:|| Quote Link to comment https://forum.watmm.com/topic/79152-programming/page/14/#findComment-2413650 Share on other sites More sharing options...
Stock Posted January 26, 2016 Report Share Posted January 26, 2016 On 1/25/2016 at 7:27 PM, Ragnar said: i am soo bad at like actual programming/the stuff you compile, even though I'm a boss with ReaJS imo. It's just sometimes I'd like to try some things ReaJS can't, or would be a great speed improvement I also want to make a VST IRC client for the lulz for the record I made some rudimentary stuff in NES assembly too, but that compiles or whatever very fast because assembly? I do wish ReaJS had fucking RECURSION why would they not include recursion A CHATMM-VST would be the best thing ever, like "yo dawg I've heard you like IDM so we put some IDM in your IDM so you can IDM while you IDM !" Thanks Haha Confused Sad Facepalm Burger Farnsworth Big Brain Like × Quote Hide Stock's signature Hide all signatures Weekly Beats 2020 let's goooooo Link to comment https://forum.watmm.com/topic/79152-programming/page/14/#findComment-2413741 Share on other sites More sharing options...
xox Posted January 26, 2016 Report Share Posted January 26, 2016 ^ with only one knob. Thanks Haha Confused Sad Facepalm Burger Farnsworth Big Brain Like × Quote Link to comment https://forum.watmm.com/topic/79152-programming/page/14/#findComment-2413773 Share on other sites More sharing options...
fenton Posted January 26, 2016 Report Share Posted January 26, 2016 i'll be the knob Thanks Haha Confused Sad Facepalm Burger Farnsworth Big Brain Like × Quote Hide fenton's signature Hide all signatures Reveal hidden contents https://www.youtube.com/watch?v=XkWwIShuoX4 Link to comment https://forum.watmm.com/topic/79152-programming/page/14/#findComment-2413943 Share on other sites More sharing options...
chim Posted January 27, 2016 Report Share Posted January 27, 2016 Is tanh the closest we'll get to a mathematical soundgoodizer? Thanks Haha Confused Sad Facepalm Burger Farnsworth Big Brain Like × Quote Link to comment https://forum.watmm.com/topic/79152-programming/page/14/#findComment-2414086 Share on other sites More sharing options...
mcbpete Posted January 27, 2016 Report Share Posted January 27, 2016 On 1/25/2016 at 7:32 PM, ThatSpanishGuy said: In an effort to find some joy in programming again I've been learning how to "play" CoreWars.Have you heard of TIS-100, it's from the makers of Spacechem and involves trying to make simple programmes in the cells you have given so the input bits match the expected output bits. Not erm the most beautiful game but here's a level I managed to do after a bit of brain huring - Thanks Haha Confused Sad Facepalm Burger Farnsworth Big Brain Like × Quote Hide all signatures I haven't eaten a Wagon Wheel since 07/11/07... ilovecubus.co.uk - 25ml of mp3 taken twice daily. Link to comment https://forum.watmm.com/topic/79152-programming/page/14/#findComment-2414092 Share on other sites More sharing options...
Recommended Posts