pouët.net

Go to bottom

frequencies and synths WTF?

category: code [glöplog]
 
Yello.

I'm asking this HERE, 'cuz I didn't find it from THERE:

How the hell you generate sound that goes in tune ffs?!
And how that shit even works? =D
I even tried the note frequency list on teh internets but it didn't really help...

Wanting tips and tricks, so tell me already!

Already having: sound generathor for sine, square, saw and noise with basic stuff to generate anything.

And no, I'm not giving up just because you say so, you dirty handsome nerdish human!
added on the 2010-08-05 03:39:10 by Misthema Misthema
freq=440.0*pow(2.0,(note-60.0)/12.0);

input note is midi note
output is frequency in Hz
Also, if you want to modulate the pitch (transpose, vibrato, pitch bend, envelope etc), do that first, THEN apply this formula ("note" may have a fractional part).

That's all.
added on the 2010-08-05 03:44:43 by kb_ kb_
oh, and use 57.0 instead of 60.0. Too drunk. sorry. :D
added on the 2010-08-05 03:45:56 by kb_ kb_
I don't know how that works since I don't use MIDI-in/outputs at all ;E I just write the generated sounds in ram and then load it from there as an audiosample, but it's fast enough and I'm still a beginner.. Sorry! x)

I'm doing tracker-like app atm and I don't have MIDI support for it ( I think? ).
added on the 2010-08-05 03:56:44 by Misthema Misthema
you dont _have_ to be midi compliant, just make sure that your "note" value corresponds to the chromatic scale.
added on the 2010-08-05 06:35:18 by Gargaj Gargaj
it's always good to know at least the basic theory behind the stuff you make. midi/note/frequency diagram can be found here: http://www.phys.unsw.edu.au/jw/notes.html
oh you mathguys, with your silly equal temperaments
added on the 2010-08-05 09:56:03 by the_Ye-Ti the_Ye-Ti
lol yeti.

@rasmus:
i think imma rewrite this synth stuff... ty alot tho
added on the 2010-08-05 11:41:52 by Misthema Misthema
Going up an octave (12 notes) multiplies the pitch by 2.

A3 = 220hz
A4 = 440hz

The octave is subdivided into 12 half steps.

So the formula goes:
pitch = frequency_referrence * pow(2, note/12)
added on the 2010-08-05 16:00:32 by madbrain madbrain
... and now you know that magic frequencies- may they bless you.
added on the 2010-08-05 16:08:00 by sigflup sigflup
for more natural sound
@kb_: drunk already?
added on the 2010-08-05 17:41:44 by trc_wm trc_wm

login

Go to top