-
Notifications
You must be signed in to change notification settings - Fork 0
/
notes.txt
181 lines (140 loc) · 6.33 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
note that some shift-combos don't work due to ghosting
maybe better to start with Spacebar on rh side?
"b" will start a held tone but not stop it ("n" both starts and stops)
weird thing: in press mode, go to lowest notes and octave-down, note will sustain indefinitely as if it were hold mode
TODO DEV
press for params
press mode for params - apply vibrato & bend on press & remove on release
params (10):
volume, glide
vibrato depth, vibrato rate
delay time, delay repeat
attack, release
2 more...?
OK:
choose param with: zxcvb & asdfg
apply value with: qwert & 23456
SET the value with SHIFT & zxcvb asdfg
Major Features
non-traveling mode
persist
for which you'll need a good refactor
REFACTOR
left/right-up into one function?
how with params press affect this?
HMMM...
sharp/flat display...?
TODO DEV Other
+/- and 1/2 raise/lower volume for a synth!
Tuning (needs UI)
shift-space resets base to C3 (later can be adjustable)
ctrl-z (or something) to go back to last note you played
add wave option for params
in Hold mode, set holding to false when switching synth (or set false on old synth and start other)
DEV QUESTIONS
render efficiency
'piece by piece' approach (updatePitches1View) vs rerendering in whole chunks ('initView')
latter approach is easier but where does performance become an issue?
how to best organize/manage in areas where there are a lot of targeted rendering calls
or maybe just use Vue, dude.
managing lots of conditional logic here...
referencing things eg: model.state[synth] where synth is received from argument
synth1, param1, multiple usages confusing. eg: uses in the view
OR state[synthNum].params[state[synthNum].editingParam] = value
OR } else if ( (state.synth1.editingParam==='Portamento' && pressed in constants.portamento_keys) ||
somehow seems fishy
*OR* perfect example, Model.changeSustainMode receives 'leftHand' or 'rightHand',
which is used directly to refer to state.leftHand / rightHand
which seems fine here, but in a big app it seems like...
can you keep everything that well organized so that you know what's going where?
naming of model.setLeft/RightHand - it's calling the View, not just setting
general naming strategies/conventions
? https://www.refactoring.com/catalog/replaceConditionalWithPolymorphism.html
? https://medium.com/edge-coders/coding-tip-try-to-code-without-if-statements-d06799eed231
sustain mode (pluck, press, hold)
it's a little strange to publish 'synth1HoldingToggled' things when otherwise play() is called from main
could there be some problem with shift-keys calling setPitchAndPressed (ie: interference with 'pressed'?)
FORK
Keypress shifted keys: thinks shift-, is shift-<, likewise with period (.)
KeyDown vs Up...
so just add an on_keyup to listeners with a zone for that
probs won't change interpretKeypress much.
you'll need a .stop method on Audio
audio will do conditionally depending on mode
is it a problem to call .stop in interpretKeypress? (to triggerRelease on a triggerAttackReleased synth?)
if so you can either send .stop conditionally or just block it in Audio
TWO SYNTHS:
with interpretKeypress it seems we could make a more general case
to accommodate more diverse options like two synths.
ie: left -> doWhatLeftHandDoes, right -> doWhatRightHandDoes
UI
(ctrl: q: start/stop recording)
ctrl... a: toggle lh synth, s: toggle lh params, d: toggle rh synth, f: toggle rh params
ctrl... z: swap hands, x: lh s1 rh p1, c: lh s2 rh p2, v: lh p1 rh s1, b: lh p2 rh s2
ctrl l: link/unlink synths,
ctrl space: switch spacebar hand
LINK SYNTHS/PARAMS
you should be able to play both synths (simultaneously) with just one hand!
So can you do both params with one hand?
trickier - not all params will work for both...
but maybe that's ok. like you can still edit a fmsynth param on a regular synth, it just doesn't do anything
but reading them, hmmm. then each hand needs two displays.
but it doesn't. each hand displays itself, and when synth/params are linked, the active hand controls the other as it's able.
JUST DO one 'thing' for each hand'
AND have a 'play both' or 'link synths' option so both are played (by either hand)
TODO
- add synth options
- add gain options
seems like there was some thought that the whole left/right hand listeners might be refactored...
how to:
keyup & keydown
will need a "down" handler as usual
expressive split qwerty
!yes! - think ("vim-style") where a current pitch is moved around by interval, rather than playing a specific note :
(Enter) option to trigger & hold note
(Tab) toggles Mode where the base pitch stays fixed (on spacebar)
off-hand controls
can port a mento be adjusted while a note is held?
https://noisehack.com/how-to-build-supersaw-synth-web-audio-api/
mode shifting:
trigger modes:
triggerAttackRelease
triggerAttack/triggerRelease
note sustain - space to turn on/off
pitch selection:
moving root
fixed root (in note sustain mode: space returns to root note, any same pitch toggles on/off on second press)
do you want to have note sustain mode in fixed root mode at all...
"shift" modifier - moves root pitch without triggering note (in any mode)
sculpt hand hmm: param editing vs key-responsive sound manipulation?
tab/enter/etc. to toggle 'boards'
Board 1:
Port | Vibrato | Gain | Synthtype
Board 2:
Attack | Decay | Sustain | Release
PARAM TREE:
basic
gain portamento detune
synth type
saw sin tri etc...
envelope
adsr
effects
vibrato
filter
tremolo
chorus
phaser
delay
delay on/off delay time delay feed
presets
1 2 3 4 5
pitch bend with .detune and linearRampToValueAtTime : https://github.com/Tonejs/Tone.js/wiki/Signals
hmm:
may want a modifiable "reset" quick fix in case you get lost.
(eg: ctrl-x sets note to C3)
parking lot:
FEATURE make-your own presets
polysynth - possible issue with which-note-is-released? or maybe not. I think triggerRelease accepts a note.
FEATURE wherein base note of one hand (with fixed base) tracks to other hand,
enabling ez-harmonies.