forked from andrewcsmith/pippi
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathREFACTOR
76 lines (58 loc) · 1.28 KB
/
REFACTOR
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
Just some refactoring notes...
# SoundBuffer
## addition or concatination
- [X] in-place add
- [X] add and copy
- [X] concatinate
## subtraction
- [X] in-place subtract
- [X] subtract and copy
## multiplication
- [X] in-place multiplication
- [X] mult and copy
## division
- [x] in-place division
- [x] divide and copy
## mix operator
- [x] in-place mix
- [x] mix into copy
- [x] right-aligned / left-aligned mixes
## built-in methods
- [x] blocks -- iterate over buffer in blocksize blocks
- [x] clear -- fill with zeros
- [x] clip -- hard clip to minval/maxval
- [x] convolve -- fft.conv
- [x] copy
- [x] cut
- [x] fcut -- frames
- [x] rcut
- [x] dub
- [x] fdub -- frames
- [x] env
- [x] fill -- truncate or loop to desired length
- [x] grains -- iterate over buffer in variable-sized grains
- [x] graph -- plot the waveform
- [x] mix -- mix in place with sound or list of sounds
- [x] pad -- pad with silence at start or end
- [x] pan
- [x] repeat
- [x] reverse
- [x] reversed
- [x] remix
- [x] softclip -- fx.softclip
- [x] speed
- [x] vspeed
- [x] taper
- [x] toenv
- [x] towavetable
- [x] trim
- [x] write
## computed properties
- [x] max
- [x] mag -- absolute value max
- [x] min
- [x] dur -- framelength / samplerate
## misc
- [ ] cloud -- graincloud
- [ ] stretch
- [ ] transpose