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!
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!
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.
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.
oh, and use 57.0 instead of 60.0. Too drunk. sorry. :D
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? ).
I'm doing tracker-like app atm and I don't have MIDI support for it ( I think? ).
you dont _have_ to be midi compliant, just make sure that your "note" value corresponds to the chromatic scale.
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
lol yeti.
@rasmus:
i think imma rewrite this synth stuff... ty alot tho
@rasmus:
i think imma rewrite this synth stuff... ty alot tho
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)
A3 = 220hz
A4 = 440hz
The octave is subdivided into 12 half steps.
So the formula goes:
pitch = frequency_referrence * pow(2, note/12)
... and now you know that magic frequencies- may they bless you.
DETUNE IT!
for more natural sound
@kb_: drunk already?