forked from ixchow/freiscale
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNOTES.txt
106 lines (66 loc) · 2.78 KB
/
NOTES.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
Big ideas:
- samples get mixed in 8.24 fixed point (maybe?) @ 48kHz
- samples get arranged in log2hz vs time space
- samples can follow a curve in terms of speed vs time
- frequency
Using OTFFT getting some GPFs -- think it may be memory alignment but was having problems replicating. Trying to match -march flags between fs2 and otfft.o builds might help. (This is going to be a bit tricky on windows.)
time: integer sample offset @ 48000 kHz, float would work
log2hz: integer 8.24 would work, float would be fine
sample: 8.24 would work, float [might] be fine
Apparently convolution reverbs often use FFTs for the tail and not for the head (but maybe this is only a real-time limitation)
Usage:
- samples populate in left pane, click to preview/stop
- drag samples to main grid area, snap to time increments
- select several samples => block
- create reference block and snap to next measure
- CTRL+click / ALT+click to set loop bounds
- SPACE to play
- click to set play position (?)
d/dx c * 2^{ax+b}
= c * a * ln(2) * 2^{ax + b}
d/dx (1/(a*ln(2))) * 2^{ax + b}
= 2^{ax+b}
a^-1
= 2^{log2(1/a)}
= 2^{-log2(a)}
(1/(a*ln(2))) * 2^{ax + b}
= 1/ln(2) * 2^{ax + b - log2(a)}
Explicit integration:
\int_0^y 2^{ax + b} dx
2^{ax + b}
= 2^b * (2^a)^x
= 2^b * e^(log(2^a)x)
2^b * e^(log(2^a)x) / log(2^a) <--- THIS
d / dx ( 2^{ax + b} )
= log(2) (ax + b) 2^{ax + b}
----
Analysis Thoughts:
WANT: log(power) @ log2hz over the usable range in reasonable steps.
Wikipedia: JND is about 10 cents (0.6%) which gives 1,400 steps over 16 to 16000 Hz
1200 cents / octave => 120 JND steps per octave.
(says "1Hz steps below 500Hz", so 120 steps is overkill but okay)
So let's go with that and ask for 128 divisions per octave, from 2^4 Hz (16Hz) to 2^15 Hz (32kHz). That's 1408 values.
NOTE: at 48kHz we actually *can't* estimate 32kHz response. 20kHz would be fine. So call that 2^(14.3).
We could also aim for 2048 log-distributed values from 20Hz to 20kHz... seems good.
How do we get those values easily?
FFT of N samples gives convolutions with waves with periods
(DC "junk"), 1 / N, .., 1 / 2, (negative frequency "junk" which is complex conjugate)
(k / ( N / S)) Hz
k * (S / N) Hz
So to get smaller steps, decrease sampling rate (counter-intuitive?) or increase window size.
48kHz signal, compute a 2048 tap FFT, you get:
48000 / 2048 = 23.4375 Hz steps up to 24kHz
So that's good to about 1750/2048 = 7319Hz
So 24000 / 2048 = 11.718 Hz steps up to 12kHz
That's good to about 1530/2048 = 3485Hz
Or 16000 / 2048 = 7.8125Hz steps up to 8kHz
That's good to about 1410/2048 = 2325Hz
Then 12000 / 2048 = 5.8459Hz up to 6kHz
Then 6000 / 2048 = 2.929Hz up to 3kHz
Then 3000 / 2048 = 1.4648Hz up to 1.5kHz (at ~915)
----
TODOs:
- (analysis)
- export
- better fundamentals
- font characters for folder stuff