Programmatically create pad sound

Well, it might be a bit out of the left margin, but I will try anyway.

A pad is a kind of ambient electronic sound, similar to a “hum”. Something like this .

How to do this in code? Using processing, OpenFrameworks, C, Objective-C, or C ++. Keep in mind that I have not programmed for so long.

I will be very impressed if this gives an answer!

Alright ... Go!

+3
source share
4 answers

I have never heard that the term “pad” is used here, but it sounds like a synthesizer sound, playing main chords.

, , sin (, 440 , A Major), (880, 1760, 3520) () . (# E), .

, .

: " () ", , .

F = 440;  // Hz
tone[t] = A * sin(t/F) + B * sin(t/(2*F)) + C * sin(t/(3*F)); // + etc, perhaps

, ,

A = 1.0;
B = 1.0/2.0;
C = 1.0/3.0;

- .

ADSR (, ) , 0 1 , , "" , (, 0,7), 0, "" .

/ , .

D = 4410;  // 10 msec at 44.1 kHz., as an example value
tone[t] += 0.5 * tone[t-D];
+5

, , - FM ( ).

- , FM- ( , , - VST) , , . ( , , , .. .)

+2

, imho java, . , C *, , API .

, , , .; -)

+2
source

Source: https://habr.com/ru/post/1757474/


All Articles