generate sound by formula

can you tell me how can I do this?

I understand that :wink:

But you appear to understand a lot more about the maths behind generating sine waves than I do :slight_smile:

As it stands, you have to drag out 7 instances of the extension

1 Like

Once you uploaded the extension drag and drop it to mockup phone 7 times. Then you will have KIO4_Tone1,KIO4_Tone2,....KIO4_Tone7

1 Like

TIMAI2, You are perfect :upside_down_face:

Oh my GOD, sorry for this question :face_with_hand_over_mouth:

Thank you dora_paz

1 Like

Do you have any suggestion for this reason?

1 Like

I would have to do some rewriting of code, and testing

thanks a lot sir

1 Like

Don't seem to be able to apply an amplitude to the formula :frowning:
Trying another method...

Try this extension (replace the KIO4_Tone extension) (4.9 KB)

Set the volume between 0 and 1, e.g 0.5 will give half the volume, 0 = silence, 1 = maxVolume.
Values over 1 will be set to the maxVolume of 1


1 Like

I have also found a way to combine several frequencies together in one output, but it is not possible to set the volume for each frequency, therefore you are probably better off using multiple instances of above.

I think in the formula , if you add a variable such as AMP, it works
AMP*(Math.sin(2 * Math.PI * i / (44100.0 / freqHz)) * 0x7FFF)`

can you check it?

very good. I check it now for multi extension with variable volume

I did, it didn't work.

Thank you for your attention. :disappointed_relieved: