TempleOSCDV5.00.ISO

This commit is contained in:
Terry A. Davis authored and minexew committed 2018-09-08 21:48:09 +02:00
1 parent 122df6338e
commit f6eacf7744
374 files changed
+11078 -11204

No files matched your search

+21 -3
View File
@@ -77,9 +77,27 @@ public F64 FullTri(F64 t,F64 period)
}
#help_index "Snd/Math"
public F64 Note2Freq(I64 note,I64 octave=3)
{//Note number in octave to freq.
return 440.0*2.0`(octave-3+note/12.0);
public I8 Note2Ona(I64 note,I64 octave=4)
{//Note to ona. Mid C is ona=51, note=3 and octave=4.
if (note<3)
return (octave+1)*12+note;
else
return octave*12+note;
}
public I8 Ona2Note(I8 ona)
{//Ona to note in octave. Mid C is ona=51, note=3 and octave=4.
return ona%12;
}
public I8 Ona2Octave(I8 ona)
{//Ona to octave. Mid C is ona=51, note=3 and octave=4.
I64 note=ona%12,octave=ona/12;
if (note<3)
return octave-1;
else
return octave;
}
F64 SinPhaseCont(F64 last_y,F64 last_dydt,