How do I create sine wave sounds?
I need to create sine waves for all notes (440 to 880 Hz) --- and have 110, 220, 330, 440, 550, 660, 770, and 880 Hz. Flute is close, but does have harmonics.
With sine wave tones, it is possible to demo pure tones vs. equal temperament tones
=> Pure Tone 550 Hz, Equal Temperament 554.37 Hz
=> Pure Tone 660 Hz, Equal Temperament 659.26 Hz
With sine wave sounds, it is also possible to demo overtones / undertones. It's simple math.
Below are replies from another post https://musescore.org/en/node/311541
Reply: Ziya Mete Demircan • Oct 12, 2020 - 01:49
I attached the sine-wave tones (in wav format) you wanted. I hope it works.
=> Attachment - Size
=> sine-waves.zip - 948.43 KB
Reply: bhs67 • Oct 12, 2020 - 01:58
Wow! That was fast! How do I load them into MuseScore?
Reply: Ziya Mete Demircan • Oct 12, 2020 - 02:40
If I create a soundfont: temperament patch is easy, but where do I put 110, 220, 330, etc (natural harmonics)?
When I place these frequencies in their respective octaves only, the remaining notes should not sound. because all the remaining notes will be in the wrong tuning.
Nevertheless, a soundfont can be made that contains a 12TET patch and one patch with only the harmonic frequencies at the relevant note locations.
But you mentioned a "math". How did you intend to use these natural harmonics?
Reply: bhs67 • Oct 12, 2020 - 14:54
I think it would be easier to create an instrument named "sine wave". And another instrument named "pure tone sine wave".
The source code is written in what language?
For the math:
sin(α) * sin(β) = ½ cos(α - β) - ½ cos(α + β)
sin(550) * sin(330) = ½ cos(550 - 330) - ½ cos(550 + 330)
sin(550) * sin(330) = ½ cos(220) - ½ cos(880)
In this example, playing a C# and an E results in a 220 Hz A undertone and an 880 Hz A overtone at half the amplitude as the C# and E. Playing two sounds results in four sounds.
Reply: Marc Sabatella • Oct 12, 2020 - 16:35
The source code is in C++, but nothing about creating a new instrument requires programming. First you need to add the sound, that's done using a soundfont editor, not programming. Then you would need to add the instrument definition to the instruments.xml file. But since sine waves are sounds, not instruments, that's not anything I'd recommend. Instead, simply use one of the existing "synthesizer" instruments, and use the Mixer to select the sound from the soundfont.