12: Envelopes, C++ Real-Time Audio Programming with Bela

  Рет қаралды 2,936

Bela Platform

Bela Platform

Күн бұрын

Lecture 12 of C++ Real-Time Audio Programming with Bela. This lecture covers linear and exponential envelopes, how to generate them and how to find the envelope of a signal.
We want your feedback on this course! Fill out a short survey to be entered in a prize drawing to win a set of 5 Trill sensors (bela.io/trill): forms.gle/K5cDKKrb2rXCkPVd6
In this lecture:
Section 1: Background 0:00
Section 2: Linear envelopes 4:45
Section 3: Classes and multiple segments 19:39
Section 4: Exponential envelopes 31:41
Section 5: Envelope follower 39:52
Example code and companion materials:
github.com/BelaPlatform/bela-...
This course is a deep dive into how Bela processes data, and how to implement real-time audio and interaction. If you want to learn or improve your skills with C++ and audio programming, this is a great way to start!
Bela is the open-source platform for creating beautiful interaction. If you’d like to get a Bela system to follow along with these lectures, visit shop.bela.io. Use promo code CREATEATHOME for £10 off Bela and Bela Mini Starter Kits.
Music by Vula Viel (vulaviel.com).

Пікірлер: 17
@joaotragtenberg
@joaotragtenberg 4 жыл бұрын
This was one of the deepest lectures, I took the whole day to finish it but it feels really rewarding, thanks for that!
@user-lx4sp1gl4f
@user-lx4sp1gl4f 4 жыл бұрын
Thank you for this great lecture!
@droussel7359
@droussel7359 3 жыл бұрын
The value of those lectures is immense. As a long time programmer interested in getting go to audio stuff; this is invaluable. Thanks and I hope those will continue for a long time. Also ordering a Bela board :)
@michaelliuzzi
@michaelliuzzi 2 жыл бұрын
I also can't quite grok why we have called the tau parameters in the code attack time. It seems to scale the function by some value, but its not true that the attack time, in the way I understand it, to be the tau parameter. I would think attack time would mean the time we take to reach the maximum value,.
@joaotragtenberg
@joaotragtenberg 4 жыл бұрын
Should the line 99 in the Envelope Follower code you showed in 49:38 be "envelopeInput" instead of "in"? Because the "in" value could be also a negative number, and the "gLastEnvelopeSample" is always positive right? It can't understand what it could mean by the comparison of the raw signed input and the last envelope sample.
@oromoiluig
@oromoiluig 4 жыл бұрын
I think you are right. As it is, during the attack phase the envelope detector will alternate between the attack and decay time constants, which is going to make the attack slower than expected.
@apm414
@apm414 4 жыл бұрын
True, it should be envelopeInput. You end up with a sort of half-wave rectifier and, as Giulio says, a slower attack. Thanks for spotting that!
@apm414
@apm414 4 жыл бұрын
At 30:45 you can hear a bug in my example code. See if you can spot it!
@joaotragtenberg
@joaotragtenberg 4 жыл бұрын
it takes the first 2 seconds doing nothing, because you set the ramp to decrease if the gRampIncreasing was true, so since the ramp starts with the lowest value, it decreases from itself to itself...
@apm414
@apm414 4 жыл бұрын
@@joaotragtenberg yep!
@michaelliuzzi
@michaelliuzzi 2 жыл бұрын
Can someone explain how a filter, which I understand to effect the frequency domain of a signal, can be used to smooth the amplitude variation of a signal? Is the amplitude variation, in this case, the "frequency" that we are talking about?
@joaotragtenberg
@joaotragtenberg 4 жыл бұрын
In the exponential decay envelope (around 38:45), I missed the update of the variable gLastButtonValue, you just call it inside the if statement. It should hold the gAmplitude at 1.0 when holding the button and only triggering the decay envelope when you release the button.
@oromoiluig
@oromoiluig 4 жыл бұрын
it would seem that the code as is would keep the amplitude to 1 as long as the button is held down, and start the exponential decay upon release (it acts as a gate signal). Perhaps not quite what was expected, but it should still be usable.
@apm414
@apm414 4 жыл бұрын
Yes you're right, there should be a line updating gLastButtonValue after the if statement. Good catch.
@clausanders2886
@clausanders2886 4 жыл бұрын
elapsed time in seconds is not samples*sample rate, rather is samples/sample rate.
@apm414
@apm414 4 жыл бұрын
Oops, you're right! That's been in a couple videos now and escaped notice. The code examples have it correct, at least.
@lazzarello
@lazzarello 4 жыл бұрын
more like a fabsolute value
13: State Machines, C++ Real-Time Audio Programming with Bela
46:06
Bela Platform
Рет қаралды 2,2 М.
19: Phase Vocoder (part 2), C++ Real-Time Audio Programming with Bela
47:28
Who has won ?? 😀 #shortvideo #lizzyisaeva
00:24
Lizzy Isaeva
Рет қаралды 64 МЛН
Русалка
01:00
История одного вокалиста
Рет қаралды 7 МЛН
Happy 4th of July 😂
00:12
Alyssa's Ways
Рет қаралды 65 МЛН
Does size matter? BEACH EDITION
00:32
Mini Katana
Рет қаралды 20 МЛН
20: Phase Vocoder (part 3), C++ Real-Time Audio Programming with Bela
1:07:54
21: ARM Assembly Language,  C++ Real-Time Audio Programming with Bela
1:00:46
Scientific Concepts You're Taught in School Which are Actually Wrong
14:36
Barker meets Gliss
3:45
Bela Platform
Рет қаралды 1,9 М.
Gliss: Modular Synth Touch Control
2:14
Bela Platform
Рет қаралды 10 М.
Hello from Bela
2:19
Bela Platform
Рет қаралды 3,2 М.
Tristan Arp meets Gliss
4:46
Bela Platform
Рет қаралды 419
Designing Flexible Sensors in KiCad with Flex PCB
22:46
Bela Platform
Рет қаралды 18 М.
Pepper, a DIY Eurorack module for Bela
17:20
Bela Platform
Рет қаралды 4,5 М.
Самые крутые школьные гаджеты
0:49