Readit News logoReadit News
cerol commented on Synthesis Methods Explained: What Is FM Synthesis?   perfectcircuit.com/signal... · Posted by u/peter_d_sherman
cerol · 2 years ago
A couple of years ago, I took a "Music and Computers" course at my undergraduate computer science program. I had known the professor for a while, and he had some incredible projects under his belt. He had built a full fledged Hammond-like MIDI synth using an Arduino Due, all the way from writing the code, and building the stainless steel casing. I took that as an inspiration for my final project, and tried to build a FM synth using ESP32.

I based my project on the Yamaha DX7, which is an amazing feat of musical engineering. I had to write the code, wire together a MIDI Input, and an audio output (using a DAC). It was one of the coolest projects I've ever made, although I did not get too far.

At the core, all you're doing is generating sine waves. Digital Synths in the 80s would not have the computation power to actually compute sine waves, so what you have to do is precompute the values of a sine wave, and store it in memory [0]. Also, you don't get floats, so it's all fixed point arithmetic [1]. FM Synthesis is essentially a carrier wave and a modulator wave [2]. The DX7 goes beyond that with the concept of Operators, which can be mixed and matched in an Algorithm [3].

I managed to make it produce notes, which were in tune. I started making the envelope (attack, decay, sustain and release), but that's where I got stuck and eventually abandoned it.

[0] https://github.com/fercgomes/churrosfm/blob/master/src/Table...

[1] https://github.com/fercgomes/churrosfm/blob/master/src/Oscil...

[2] https://github.com/fercgomes/churrosfm/blob/master/include/A...

[3] https://djjondent.blogspot.com/2019/10/yamaha-dx7-algorithms...

cerol commented on South America is living one of the climate extreme events   twitter.com/extremetemps/... · Posted by u/wslh
rodrigodlu · 3 years ago
Well, it's definitely weird this year.

I'm in Rio, but I'm from south Brazil, my entire family is using more meds to counter allergies due to temps and humidity changing a lot.

I'm changing from using winter clothes (long sleeves) to use air conditioner to feel less a change from 14oC to 30oC that is usually associated to autumns in south, not winters in Rio, that are usually stable around 22oC without a high amplitude that I'm feeling now.

The city my dad lives near Porto Alegre already suffered twice due to extra tropical cyclones. Something that I heard only few times in my childhood.

Uruguay facing water challenges is new - droughts in the south plains of Rio Grande do Sul (south state bordering UY) and UY is not new - but the severity is.

cerol · 3 years ago
> The city my dad lives near Porto Alegre already suffered twice due to extra tropical cyclones. Something that I heard only few times in my childhood.

One thing I noticed is that local governments (and their respective climate departments) are being much more vigilant and proactive with climate events. And we are in a way paying much more attention to the frequency of climate events. Trying to correlate your own experience of "frequency of events" is a very tricky thing, since we can pretty much condition ourselves to rememeber pretty much anything we want.

Back in the day there were tropical storms and cyclones, and we just moved on. But now local governments will proactively cancel school days if there is a even a hint of a heavier storm. Which is great, but it does mess with our ability to actually estimate frequency of events.

cerol commented on Pix surpasses credit and debit card transactions in Brazil   philaverse.substack.com/p... · Posted by u/finphil
kattagarian · 3 years ago
It's shocking how fast Pix got inside of Brazillian culture, everyone have it. It's easy to set (you need a bank account), it's easy to use (believe me, even the banks who are known for having terrible UX did a good job with the interface) e just takes a second complete a transaction! With no charges!
cerol · 3 years ago
It's a great service but honestly I think they just got lucky with how they named it. It's short, easy to pronounce and very memorable. Were it to be called anything else, I'm not sure it would've caught on.
cerol commented on Fly.io Postgres cluster down for 3 days, no word from them about it   webcache.googleuserconten... · Posted by u/burnerbob
cerol · 3 years ago
Most people in this thread are either in North America or Europe, so options for managed services like Fly exist, and they are plenty. But for people in South America, what options are there for a Heroku-like service? I don't want users shooting off requests halfway across the globe and back when there are many datacenters a couple of miles from our users. I just don't have the time and resources to manage VMs and scaling issues. I need a zero friction "./serviceX deploy" experience.

Fly seems unreliable, but they offer a deploy region close to me. Does anyone have know of any alternatives?

cerol commented on Pixar was never a masterpiece factory   freddiedeboer.substack.co... · Posted by u/paulpauper
cerol · 3 years ago
I'll just come out and say it. I absolutely loved Toy Story 4.

I watched TS1 and 2 as a kid, and I remeber loving it and rewatching dozens of time. Then TS3 came out, with Andy going to college, around the same time I was going to college.

Toy Story 4 was an absolutely stunning movie, both in terms of photography, and underlying message. In my opinion, it is about growing up, finding out who you are, and letting go. They ended the franchise in the best way possible.

cerol commented on GPT-4: A Copilot for the Mind   every.to/chain-of-thought... · Posted by u/dshipper
cerol · 3 years ago
Am I the only one who thinks this is a really bad idea?

By offloading your cognitive tasks to an AI, even though you now look smarter, you're becoming dumber in the long run, because you're never really challeging and exercising your intelect. This book[1] goes into a lot of detail about how rote memorization and recall is essential to critical thinking (you have a limited working memory, and the way by which you're able to critically think about complex subjects is by chunking, which only works with concepts you've previously memorized). If you just stop exercising your recall and critical thinking, they'll get weaker and weaker.

I feel that already with ChatGPT. Before, whenever I needed to learn some programming concept, I'd have to search vast amounts of resources to learn it. By being exposed to many different points of view, I always felt that what I had learned stuck with me for much longer. If I just ask ChatGPT, I get the answer faster, but I also forget faster. It's not learning.

Learning, with capital L, is not supposed to be easy. It's supposed to be hard. Education is about making what is hard a worthwhile pursuit. The people who get lured into thinking they'll be smarter if they plug themselves to the matrix will be shooting themselves in the foot.

For me, relying on OpenAI to function cognitively is like relying on Google to turn my lightbulb on. It looks cool, but it doesn't make any sense.

[1] https://www.goodreads.com/book/show/4959061-why-don-t-studen...

cerol commented on Alpaca: A strong open-source instruction-following model   crfm.stanford.edu/2023/03... · Posted by u/jcklie
cerol · 3 years ago
Can someone provide a guide on how run LLaMA on a fairly average CPU/Nvidia GPU?
cerol commented on Ask HN: I hate gym. How to stay in shape?    · Posted by u/throwaway_43793
tgv · 3 years ago
In shape or fit is several levels below what you describe. Personally, I find running a marathon near lunacy. You may like it, but it's not healthy in the long run.
cerol · 3 years ago
> You may like it, but it's not healthy in the long run.

I disagree. Not all marathon runners are made equal. Talking about the long run means an extreme training routine that is consistent through a long period of time.

The vast majority of marathon runners are casual runners, rarely logging more than 40km a week. And after a while most simply stop or reduce significantly their training to casual (in terms of intensity) but consistent training.

AFAIK, most research about negative effects of marathon running is related to professional athletes, who have a career in running. Endurance athletes usually start from a very young age, and peak at around 30-40. That's 20 to 30 years of extreme training. And the key aspect here is oxidative stress, which means they are aging faster. There's also a risk that your heart will change in shape to respond to a greater demand, and that may lead to conditions such as arrythmia.

I think I can speak for most of the amateur athletes I know. We're all well aware of the risks. There's just no point in not taking them.

cerol commented on Ask HN: I hate gym. How to stay in shape?    · Posted by u/throwaway_43793
cerol · 3 years ago
Just to give some context, I've been a marathon runner for 7 years. I have a PB of 3:24, and I'm training for a sub 3 hour marathon right now (logging around 70 - 120km per week). I run 6 times a week, and work out at the gym 3 times a week. I consider myself to be in my all-time peak athletic shape right now.

I don't mean to be rude, but this comes from years of people picking fights with me about exercising and easy ways to get fit.

You're looking for an easy way out. There isn't any. Or there shouldn't be. If you want to really stick to an exercising habit, you have to either do something you really love doing, or just pick something and stick to it. If there isn't some sort of physical activity you love doing and could potentially do effortlessly, you have to start from scratch.

That means putting in the work and becoming disciplined. Building a habit. Which means you have to work against yourself so you can, in the future, be in a position where exercising is at least neutral and effortless. Only then will you know whether or not you'll enjoy it. Never before that. If you have an open mind and patience, you probably will.

You could also just keep trying several other options, until you find sometimes that you seem to enjoy. But chances are you'll probably get tired of it soon.

I'd honestly advise you to work on habit building skills rather than trying to find something you'll be able to do effortlessly, just like that. If you pick something, stick to it, be patient, study it and put your mind to it, I promise you, you'll eventually start enjoying it.

u/cerol

KarmaCake day243November 14, 2021View Original