-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdev_notes.txt
1038 lines (845 loc) · 49.5 KB
/
dev_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
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
---------- 2016-02-04 ----------------
some notes on osc.
* ZirkOSC only has a sending connection, to the local ip address 127.0.0.1, port 18032
* Octogris, for the ipad connection, has a sending connection to the address/port specified in the
relevant text boxes, and a receiving connection from the "default" local adress (obtained with
getLocalIPAddress())
--------- 2016-02-10 -----------------
WHAT IS NEXT?
* review juce compiler warnings
* version windows
* en mode internal routing, désactiver les components inutiles(dans studio)
* utiliser mode HRTF avec zirkonium
* GUI
* avoir une texture en background
* try different fonts
--------- 2016-02-17 -------------
ok. so 2 problems
1- compared to octogris, spatgris surface (free volume) and span (pan span) are reversed.
2- only for source 1, setting volume (or pan) and reading it is reversed
-------- 2016-03-02 ------------
ok. so problem in reaper with number of inputs and outputs.
what is critical, is that in processblock, we don't use more inputs/outputs than given by getTotal.
so currently, getTotal for AU and VST3 is able to read the I/O number of inputs and outputs. NOT vst2.
Check if we can fix this using setPreferredBusArrangement. but if we do that, we need to remove Plugin Channel Configurations from introjucer
ok, there is an example surround plugin which looks at this very problem. With vst2, reaper seems to make a ton of random calls to setPrefferedBusArrangement, so not sure how to deal with that. Could recommend using vst3 with reaper, but need to ensure vst2 is working with DP.
DP
Spatgris is crashing dp at the moment. Need to test surround. So apparently:
* dp uses AU by default...
* i cannot load the surround plugin, even though it is in the plugin manager... BECAUSE IT IS A SYNTH. it works really well, and there are several calls to getPreferred, but it ends on createFront7point1.
LOGIC
seems to also work, but needs to be tested more.
CHECKING OCTOGRIS3
DP: OK
reaper: vst2:OK, vst3: NAN, AU: ok
logic: (probably ok)
ok. so if octogris3 is working... could we not use the same code in SpatGRIS? well wait, vst3 was not working for octogris. but who gives a shit?
so current git version of octogris is the same source code as 3.0.1, but a different version of JUCE, which may be critical. let's try it.
it doesn't work. so the juce version is probably to blame!
testing juce versions
LATEST PULL:
* introjucer plygin channel config NOT deprecated
* spatgris
* au: load 2x2, 8x8 avail
* vst3: same
* vst2: load 2x2, 2x2 max avail
v4.0.1:
* introjucer plugin channel config deprecated
* octogris vst2 ok, vst3 not
* spatgris: vst2 8x16, vst3 8x8, au 2x2 selected, 8x16 avail
* SO EVERYTHING WORKS. problem is with bleeding edge juce version. need to be careful with this for next JUCE release.
------------- 2016-03-09 ----------------------
src and speaker positions need to be reset when prepare to play changes their numbers.
alright, that's fixed.
NOW #27
DP seems fine, other than lagging on trajectories...
Logic is quite troublesome. Having saved a project, on reopening no sound. Need to deactivate and reactivate main audio track. Then outputs 5 and 7 do not work, output 8 goes on 8 and 7, output 6 goes on 6 and 5. then if you stop playing and start it again, you start to lose some outputs, until only 4 is working. deactivating and reactivating spatgris on main track resets the behaviour.
ok, one way to fix the outputs 8 and 6 being doubles on 7 and 5 is to use surround busses (hold the logo on the right of the input name on aux tracks to select surround bus input).
but we still have the problem of the plugin needing to be re-initialized after stopping playback.
------------- 2016-03-23 -------------------
#47: Clicks audio au centre.
Ces clicks semblent être causés par des shorts bursts d'activité dans tous les haut-parleurs. Au centre, c'est normal que tous les haut-parleurs soient solicités, j'imagine? Ce qu'il faut s'assurer est de ne pas avoir de transient super rapide. Est-ce qu'il y a déjà un algorithme qui regarde le delta inter-sample?
playing with param smoothing slider has an effect, mais ne rêgle pas complètement le problème de click audios.
searching for ksmooth, I see that param smoothing is used in all process modes, in processor::ProcessData.
------------ 2016-03-24 ---------------
#51: osc spat thread leak
I think this can be fixed at the same time as #52 (source update thread not running when editor is
closed).
Both threads need to run in the processor, and be deleted using an owned array.
----------- 2016-04-06 -----------
cur: 1e8e158a97fc260366d6d9505e0f38526750d940
ok. probleme bizarre ici, issue #59. Quel est le path de vie du mover?
* unique_ptr dans processor.h
* instancié fin du constructor processor
* passé au constructor de l'editor dans createEditor(), en tant que pointer normal (seems to be ok if nothing is messing with pointer ownership...).
* passé au constructor de FieldComponent dans editor constructor
* passe au constructor de trajectories dans buttonClicked()
* editor::getMover() sends the mover to HIDDelegate, OctoLeap, OscComponent
Alright, i don't see any obvious problems with the mover pointer, so looking into when sourceUpdateThread is run and stopped.
It should run when
* we have more than 1 source
* we're not recording automation
* we're in a dependent mode
--- #47 ---
audio clicks. they don't seem to be due to a sudden big transient, although only tested difference between 2 samples, could be something more complicated...
What if it is due to having all speakers activated at once? Or something similar, like the angle problem in the center? Looking at ProcessDataPanVolumeMode().
--------------------- 2016-04-13 ------------------
OK. problèmes en lien avec les performances:
* Octogris #114: lag automation manuelles
* Spatgris # 60: CPU prends trop de jus
Robert s'inquiète beaucoup de #114.
* DP (AU):
* dernier octogris (301) plus lent que spatgris
* octogris 213 également a chier
* octogris 225 > 226 (où arrive la trace) > 228 (trace est blanche)
* Logic(AU): spatgris aussi bad que octogris 301
* Reaper: vst all good...!
Donc, on a:
* AU vs VST
* test this in reaper
* 301: aucun problème
* les CPU de Octogris VST, AU et grm spaces sont comparables.
* repos, sans interface: 9-10%
* repos, interface: 9-11%
* lecture automation, interface: 46%
* ecriture automation manuelle: 57-58%
* 225 vs 228
* test this in DP
* Octogris en general vs Spatgris
* test this in logic
* CPU
* spatgris 011
* repos, interface ou pas : 3-4%
* ecriture automation manuelle: 80-85%
* lecture automation, interface: 51-60%
* octogris 301
* repos, interface ou pas, 4-5%
* écriture automation manuelle: 58-68%, augmentation avec le temps, probablement a cause de la trace
* octogris 301 is cout-ing stuff!!!!
* removed them in 302, doesn't change performance...
* what about removing the trace?
* ecriture: peak 77%, lecture 56%, mieux mais pas parfait.
* looking at juce demo for ideas to optimise trace and other GUI things, I found the chain demo
in box2d, which is someone else's tests in opengl or something. Probably worth checking out
at some point...
* DP
* CPU with trace, octogris 3.0.2
* repos, interface ou pas 15%
* ecriture manuelle 78-88%
* lecture 68-70%
*sans trace
* repos, interface ou pas, 16-18%
* ecriture 75-80%
* quand meme laggy a fond.
* spatgris
* repos 23-24
* ecriture manuelle 86-87%, increasing with trace, better than octogris for sure
* lecture 63%
* lecture 60-70
TIMING AND TRYING THINGS
I added a vector in which i push times from editor::timerCallBack. NEED TO TURN TIMING_THINGS MACRO OFF. Here are the various things I tried turning off:
* trace
helps a bit, try to print only last X subpaths
* speaker levels
* Turns out displaying speaker levels takes a lot of CPU, and not displaying them removes any visual lag from DP...!
* so far this makes the biggest difference on gui and automation
* disabled this when writing automation
*these 2 calls take most of the time in repaint and are not useful at al during automation: updateSourceLocationTextEditor() and updateSpeakerLocationTextEditor().
* but removing them make no difference on gui/automation lag
* still deactivated them, because spending this much time on this is ludicrous!
--------------------- 2016-05-16 ------------------
#47
clicks when
* recording manual automation
* reading manual automation
* reading trajectory
* recording trajectory that is fast enough, like .3s return pendulum
looking at older versions
* v2.1.3. before joystick, internal routing, source unique
* clicks everywhere, but recording pendulum at .3s no clicks (.1 sec yes)
* there's clicks in every single version. This is a problem rooted deep in the algorithm
------------------- 2016-05-30 ---------------------
Looking into spatialization algorithm
The thing with goddamn arrays is that you don't know their sizes.
* parameters **inputs and **outputs are inputs[numInputChannels][p_iTotalSamples].
*
------------------- 2016-06-02 ---------------------
looking into #56, the 0.0.0.0 issue. I'm now questioning what is going on here. Reason is that xcode also shows that touch osc messages are sent to 0.0.0.0, but when I put a wrong adress, ie not the ipad adress, then messages don't get to the ipad. Meaning that perhaps we are not sending on 0.0.0.0.
However, now it seems that osc spat is just not working at all. Zirkonium is not responding to messages, and my OF oscreceiver is not displaying osc messages (it does display touch osc messages).
So. I need to make sure osc spat messages are sent. Turns out I had changed the ip adress. now seeing stuff.
-------------------- 2016-06-06 ------------------
#47.
So. Here's how the algorithm should go:
* is delta theta more than a quarter circle
* yes:
* need to ramp between prev and next theta, using locked thetas
* no:
we need to not store mLockedThetas when r < kThetaLockRadius
continuing this on 2016-06-13. I created a reaper file with a crazy sharp automation on x position. I get clicks when the source oscillates over the center, but not when it oscillates over a non-center mid point.
so I did a bunch of excel plots, and my algorithm doesn't work at all! Need to find a way to make it smoother when transitioning. .
06-16. I added Antoine's algo to my excel plot and it is weird! Je pense que son algo n'est peut-[etre pas tant pour gerer les clicks que pour empecher les delta thetas trop grands au centre du cercle. Right. Si je bypass le truc au complet, j'ai une belle progression sinusoidale. Il y a peut-etre quelque chose d'autre qui se passe directement au centre... genre avec le code qui suit?
J<Ai ajouté du code qui print les speakers qui jouent du son, et c'est toujours les mêmes. Les speakers et les delta speakers sont toujours les memes, donc il y a quelque chose que je ne comprends pas ici.
I can't debug this at home because it says I only have 2 speakers... unless I use jack? nope, doesn't work.
06-20. après avoir observé plusieurs graphes, j'en vient aux conclusions suivantes:
* mon hypothèse était qu'une transition instantanée de l'automation allait produire une transition instantanée de theta, et donc une transition instantanée entre 4 sets de haut-parleurs différents. C'est faux
* Une automation instantané produit une sinusoide de theta
* plein de changements produisent des transitions instantanées de HP, je ne pense pas que ça soit directement le problème
* je ne comprends pas bien ce qu'Antoine essayait de faire. Il semble y avoir une coupure pas rapport dans la transition d'Angle.
* je pense que le problème est peut-être qu'on a plusieurs transition rapides entre des paires de haut-parleurs quand on passe d'un coté à l'autre. Ce que je pourrais faire est de complètement bloquer theta quand on arrive au centre, et de repartir directement avec le nouveau theta quand r > threshold.
Idid this, and still the fucking clicks. I cannot figure out where the clicks come from! One clue is that there's no clicks if slightly off center...
--- 2016-06-27. new graphs to really compare clicks vs non clicks
* antoine center: changement entre 248 et 308 = 60 samples
* antoine off-center: changement entre 138 et 467 = 329 samples
It is simply the lenght of the transition that is causing a click? Probably. Could force staying with 1 speaker for at least, e.g., 50 samples.
i made a new excel sheet, cause the first one crashed. J'ai refais les automations dans reaper pour avoir une transition entre 2 pointes collèes, une transition entre 2 pointes opposées sans passer par le center et genre 6 transitions en passant par le centre. Que je prenne l'algo d'antoine ou lockedNew, j'ai des clicks sur tous les passages par le centre. Comme les graphiques sont pas mal pareil, pas certain que ça vaille la peine de les comparer, il faut plus essayer de comprendre pkoi seulement les passages par le centre cliquent.
====
2016-06-29
algorithme pour ne pas changer de speakers trop vite.
On veut empêcher le changement de speaker si
* on a un changement de speaker depuis moins que total_samples
ugh. je capote. mon nouvel algorithme marche quand je regarde dans excel, mais en écoutant dans reaper, on a plus de clicks qu'avant, genre on a des clicks même off-center.
En plus je viens de faire des nouveau projets de tests reaper avec octogris, et là c'Est l'inverse! Clicks seulement off center, pas quand on est centered. WWTTFFFFFF
----------------- 2016-06-15 -------------------
Looking into future general directions.
Robert sent a new version of the zirkonium, alpha 12. Il n'est pas compatible avec jack, mais il est compatible avec soundflower. J'ai cloné le code de soundflower, et ça compile sur nicolai. J'ai aussi le code PD de vbap.
GENERAL TO DO HERE:
* understand vbap algorithm (read paper(s))
* wait for David
* understand vbap PD code (zirkonium version or original)
* wait for David
* understand what is required to have software being seen as audio cards, essentially what soundflower and jack do.
* understand how to deal with audio outputs, ie what zirkonium does.
----------------- 2016-06-24 ------------------
Trajectories. So I cleaned the trajectories that represent shapes, which are:
* circle
* ellipse
* spiral
* pendulum
and not those
* random
* random target
* sym X and sym Y target
* closest speaker target
But in fact, the only two that don't make sense to accelerate are the randoms:
* random
* random target
------------------ 2016-07-14 --------------------
#56, investigating juce source.
* the deepest I got is in juce_socket.cpp, line 705 ::sendto, which apparently I cannot debut into
* in this DatagramSocket object, member lastServerHost is correctly 127.0.0.1
this ::sendto business is a call to the core osc libraries. i think it sends the adress as
info->ai_addr. for some reason I cannot read this, because it's in hexa decimal or some shit.
well actually the osc library says it's in binary
now trying to see how liblo does it. Tried with Zirkosc, and apparently i am getting the 0.0.0.0
thing from liblo. So I am questioning where I got the results I posted on the juce forum, showing
that liblo sends to 127.0.0.1 and juceosc to 0.0.0.0. Probably with Octogris. Last release using
liblo is octogris 2.2.8
apparently, on school mac pro, octogris 228 sends to 0.0.0.0, just like juce osc. so i need to learn
how to use a packet sniffer. ok.
ludo me disait de prendre tcpdump. Wireshark est une autre option plus high-level.
sudo tcpdump dst 192.168.1.100
* gives me messages when sending touch osc to that address, with spatgris, so with juce osc
sudo tcpdump port 9000
* gives me same thing wit touch osc.
i think the problem is just xcode on crack. using tcpdump, i see that touch osc messages are sent on
en2 to 192.x.x.x, which is correct, and spatosc messages are sent on lo0, port 18032, and nothing is
sent on the network.
-------------------- 2016-07-18 --------------------
Moving on.
l'idée de prendre spatgris est qu'on aurait quelque chose qui se connecte directement au server.
Quelque chose exactement comme spatium. Mais mieux. C'est exactement ce qu'on a avec soundflower par
contre. Donc je vais devoir avoir une conversation avec Robert sur ça.
Je dois trouver une mauditte façon de faire la spirale, ça pas de bon sens! J,ai 2h.
algorithmes possibles
* pendule avec r, cercle avec t: Ne marche pas, parce que t doit tourner autour du point d'arrivée,
et non du point de départ. par le passé, implémenter cet algoritme me donnait un tire-bouchon.
* spirale cartésienne avec translation cartésienne
currently
* calculate deltatheta, which will go [0, turns*2*pi]
* curTheta = startTheta + deltaTheta
* if going in
* curR = startR * cos (deltaTheta), so curR will do startR -> 0 during whole trajectory
* else
* curR will do startR -> maxR during trajectory
*progressive cartesian translation to endpoint
so what are the problems here?
* outgoing goes too big before reaching final point because it is aiming at max R.
* final delta theta should probably depend on diff between initial and final theta. Meh, i don't think
this is necessarily a problem. reaper sometime makes a jump at the start, but not DP, so i think this is a reaper problem.
---------------------- 2016-08-02 --------------------
ok. spatgris is using 4.2.3
octogris is using 4.1.0, DO NOT MESS WITH THE JUCE VERSION. creates lots of problems.
* o12
so 3 problems:
* new reaper project cannot do multiphonics. Old project can...!
* DP thinks the o12 modes are in fact o2 modes. This seems like a real problem.
* in DP, for spatgris, speaker 4 is outputing in speaker 5, the LFE (or whatever) is reversed.
TODO TODAY
* new spatgris version
* new octogris version
-------------------- 2016-08-03 -----------------
spatgris logic
output 3 = 5
4 = 3
5 = 4
Alright, this bullshit was due to juce version 4.2.0 and up. Fixed.
Now. what to do? What kinds of things to test in hexa?
* how to use 12 speakers and those kinds of things, in DP, etc, #72
* So I tried using vsts instead of AU, and i got something similar (although vsts work a lot worse than AUs). All output bundles work except for o12.
* reaper only outputs on 1+2, #74
* spatium
--------------- 2016-08-04 ----------------
Robert posted some issues.
* leap deactivated in octogris
* easily fixed
* trace not disappearing in zirkosc
*ignore for now, why not use spatgris
* jaggy joystick trace everywhere
* probably cannot fix this, but need to look into that more at school because my joystick is acting real weird!
-------------- 2016-08-23 ----------------------
so as of today, it appears the windows version of spatgris is working. I had some issues finding totalmix (it's in system32) and with audio glitches (changed asio buffer from 256 to 512 samples and fine), and the issue that new reaper projects do not seem to work at all.
DP on windows: only mono and stereo seem to work, see #86
Reaper on windows: new projects can only spatialise in stereo, probably configuration problem, see #74
------------- 2016-09-15 -------------------
current priorities from Robert:
À court terme:
• nouveau mode de trajectoire avec sliders, différentes vitesses de début et de fin, etc
• le mode x12 dans DP et les problèmes de VU-mètre
• améliorer le mode internal routing
• intégrer les trajectoires dans SpatGRIS directement pour remplacer les automations des séquenceurs.
À moyen terme:
• faire un spatgris server pour remplacer Jack et Soundflower
• faire notre propre logiciel de spatialisation pour remplacer le Zirkonium avec les fonctions VBAP, DBAP et Ambisonique (qui peut très bien être
une copie de la version actuelle pour commencer, puisqu’elle roule sous PureData, donc en logiciel libre).
So it seems i will work on trajectories.
-------------- 2016-09-22 ------------------
#91
currently, when m_bAllowInputOutputModeSelection, we setNumberOfSpeakers to getTotalNumOutputChannels(). This works in ableton live, but not in DP,
in reaper vst3 and/or au, etc, etc. We need to setNumberOfSpeakers to 16, and send extra outputs to the internal buffer.
TESTING INTERNAL ROUTINGS
DP
* the number of outputs for spatgris on client track is limited by the number of outputs on the track.
* So cannot have more than ix12 since this is the max mode (and it doesn't work well so in effect only ix8 is available)
* we don't have audio on server tracks if we don't listen on the corresponding bus
* can we have 2 output busses?
LIVE
* server track do not need to listen on corresponding bus
* cannot seem to have audio on tracks > 8
LOGIC
* like DP, client spatgris limited by number of output tracks (probably an AU thing)
* upon opening project, need to deactivate and reactivate plugin to get any audio.
ALL
* we don't seem to be writing audio on tracks 8-16. Thse internal read 910, 1112, 1314, 1516 do not get any audio. This is now fixed with ad3621242ec7c3a59c41d8577310cd8fdb99a839
--------------------- 2016-09-23 ------------------------
#93. seems like the problem is that we're reading garbage when first reading into the internal buffer.
possible problems:
* mOutputBuffers contains garbage upon instantiation, and we're reading that. doesn't seem to be the case, clearing it doesn't change anything
* we're initially writing some garbage in it
* we should be ramping whatever we put in it
------------- 2016-10-17 ----------------
ok. #95. 2 problems
1 - azimuth slider changes elevation and vice-versa
2 - the span wedge is drawn at a different elevation than the source
------------ 2016-10-19 -----------------
ok.
FAST
- couleurs max
- trajectoires
SLOW: comment faire de la spatialization x par x
- INTERNAL ROUTING
* plugins clients (write) sur les pistes, plugins server sur d'autres pistes (read)
* why do we need to send audio to server (read) tracks? In DP and Logic it is merely to activate the plugin
* logic:
* sometimes write plugin needs to be bypassed and re-activated again. This is actuall really unstable
and usuable. major problem here.
* similar to DP, we need to have audio routed for plugins to work, even though that audio is ignored.
* DP:
* for the write plugin to be activated, it needs to have an output. The actual output doesn't matter,
as long as ANOTHER TRACK IS LISTENING to that output. For instance, you can have a write track on bus 3-4,
another random audio track on bus 1-2, one read on 3-4 (to activate the write track), and the other reads
all on bus 1-2 (listening to random, non spatgris audio track), and all reads are going to work because they
are not actually listening on the inputs/outputs.
E.g., spatgris 2x8 with an output to bus 1-2. For the read plugins to work, they need to have an input (any)
and the correct analog output pair. For the input, it doesnt' matter which one, e.g., they can all use bus 1-2.
* DP doesn't seem to glitch that much
* tester pre vs post fader in DP
- ca fonctionne. mettre spatgris en post fader, en mode internal write, fait qu'on peut utiliser le fader pour le gain
- other DAWs will only allow post fader sends, not plugins, and that will not work because we're not using the audio we send
* reaper:
* write track doesn't need any special outputs. Read tracks must have a hardware output to the
correct outputs
* reaper is crackling and popping AF during playback, and always cliping on first playback
* live:
* works really well. no need for outputs on the write track or inputs on the read tracks. no clicks or pops.
* apparently release mode uses a lot less power than debug mode. Actually able to run it in 2x16
* with spatgris release, resting is 22%, full spatialization is 70%
* tester internal routing post fader octogris
* investigate what is wrong with spatgris
* octogris is very similar to spatgris. In live spatgris takes less power.
* mix when several clients write to internal write?
* seems fine. at least with 2 tracks writing.
CONCLUSIONS FROM ALL THIS
* internal routing is quite stable with DP and live, but terrible with reaper(glitches) and logic (deactivates)
* DP can use spatgris in post-fader mode, for the other ones we'd need to use sends
* a way to use faders would be to send into the write track, and use the fader from the sending track(s).
would have to check with robert to see if this is acceptable.
SOUNDFLOWER
- how to change buffer size in code: i believe this is right at the top of soundflowerengine.cpp! BLOCK_SIZE
- this page https://github.com/RogueAmoeba/Soundflower-Original/tree/master/Installer says that soundflower allows each
client to use its own buffer size
TO READ
- Gary candel, audio spatialization different from visual
--------------------- 2016-10-20 -------------------
TODO
-read on vbap and find how to implement
-fix glitches with internal routing in reaper and logic
-find out more about side chaining in juce
* the idea would be to use sends to do internal routing. that way, the write-track fader will still work.
* what is the difference between sends and side chaining?
REAPER
* FX sidechaining is using one audio signal (the source signal) to trigger an effect that is applied to another audio signal (the target
signal). This can be accomplished by creating a send from the source track, to ***higher-numbered channels on the target track***. For
example, to use the stereo output of track A as a sidechain input for an FX on track B, create a send from track A channels 1+2 to
track B channels 3+4. Sends can be created using the Routing Matrix, or the track routing dialog on either the source or target tracks,
or by simply dragging the source track I/O routing button to the target track.
* So for this to work, we'd have the source track, with like 8 channels,
CURRENT INTERNAL ROUTING:
* source track
* does spatialisation
* write all audio to the router buffer (up to 16 speakers),
* read tracks
* read audio from 2 specific buffer channels
* output that audio onto the hardware outputs
PROBLEMS WITH THIS
* limited to 16 speakers
* could add more, but would it scale?
* would need to look into special multi-threading algorithms, essentially remaking jack/soundflower
* we need to configure for a specific number of speakers.
* At home I have 4 speakers. So my write plugin is in 2x4, and I have 2 tracks that read channels 12 and 34. In concert, I have
32 speakers. So i need to have my write track in 2x32, with 16 tracks that read channels 12, 34, .. 3132.
* by contrast, with the zirkonium, my write track only cares about the source position, and doesn't know anything about the speakers.
So I only need to load a different jack/zirkonium configuration. No need to touch the project.
*
------
#30
avant de commencer à changer le mode de trajectoires, je pensais changer l'interface. ouain.
------------ 2016-10-24 --------------
TODO
* see how to get glitches with soundflower in studio
* be able to build and use soundflower
On the other hand, maybe I should just go with jack. So maybe try to understant jack's code. and license to see if I can use it or not. yeah. use jack.
JACK
* jack 2 is compatible with windows, but not jack 1
* jack uses the LGPL so I can do what I want
BUILDING JACK
* had to change one line, will commit
* had to change target from osx 10.4 to 10.9
* cannot find opus.h
* now some stuff is building, some stuff isn't, but I can't seem to run anything.
Furthermore it seems like there are many many different parts to jack. Like I
need to make a list
ALL JACK THINGS
* jackdmp is main command line program, ie the server
* the gui on mac is called jackPilot
* there are 2 scripts in macos/, install_jackdmp and remove_jackdmp. install doesn't
work because it's not seeing whatever it has to copy. Copying the script to
macos/build/Development, where a bunch of the stuff is, doesn't work either.
READING JACK DOCUMENTATION (in applications/jack/)
* jack is a low-latency audio server, originally written for linux
* jack osx includes:
* jack server: core stuff (this must be jackdmp)
* jack router: the driver that allows any core audio osx app to become a
jack client
* jack plugins: jack-aware (?) au and vst
* right now, these plugins are only visible in reaper, and on macpro only
logic sees jack...
* jack pilot: gui that controls jack server and its connections
* netjack: jack over a network, doc says it is not installed
* SYSTEM ARCHITECTURE
* jack server is the core, allowing audio communication between jack-enabled
applications and audio devices.
* 3 types of jack-enabled applications
* native jack applications
* built-in support for interacting with a jack server. Examples are PD
and Ardour. Apparently Native instruments allows this too.
* jack-enabled core audio apps
* use the jack router driver (when selected as audio device) to
communicate with jack server.
--------------- 2016-10-25 ------------------------
Alright, So i forgot to push my stuff. i was reading the jack doc. there are multiple parts.
BUILDING PRODUCTS
* started with those:
jackmp server 64 bits
jackmp.framework 64 bits
* then got to build most of the targets, one by one manually. For universal bundles that wont build, building the 64 bits
version often works, and subsequently building the universal can work.
* jacknet won't build because it requires libsamplerate.a. I don't care about either.
* what I need is to have jackdmp working. I know it can build.
so. got to build most of the targets, one by one manually. For universal bundles that wont build, building the 64 bits
version often works, and subsequently building the universal can work.
jacknet won't build because it requires libsamplerate.a. I don't care about either.
what I need is to have jackdmp working. I know it can build.
============
NEED TO
* uninstall current jack
* figure how to install jackdmp
* figure out how to use jackdmp, without the gui
* can i build a gui? where is the code for that?
* see if I can use my built thing with hexa
===========
UNINSTALLING CURRENT JACK
* i think both the macpro and nicolai have the same version of jack. looking at about jack, it says
* jackdmp 1.9.11
* jackrouter 0.9.7
* jackPilot 1.7.4
INSTALLING MY VERSION OF JACK
* now that I uninstalled jack, my jack server control no longer works. it says:
* dyld: Library not loaded: /Library/Frameworks/Jackmp.framework/Versions/A/Jackmp
* i pasted that stuff in there and that error went away
* now I get this: exec of JACK server (command = "/usr/local/bin/jackd") failed: No such file or directory.
* No idea where this comes from. Re-installing jack 0.92_b3 from dropbox to see if file gets there.
* installers says it will install
* jack server
* jack router
* jack audio plugins
* jack pilot
* need to restart after installation...
* this worked. after installation, I can run my jack_server_control.
* turns out that jackd is a symbolic link to jackdmp. I think jackd is jack1 and jackdmp is jack2.
* this is all the stuff that the installed copied to /usr/local/bin
jack_connect
jack_disconnect
jack_load
jack_lsp
jack_metro
jack_netsource
jack_unload
jackd
jackdmp
* i have all of those in macosx/build/development
* alright, so my jack_control_server works because it connects to the jack that is installed. I need to NOT do that,
and use my jackdmp. For that, I need to get the install script to work. so uninstall jack again.
* goddammit jackdmp_install script wasn't running because not chmoded to 777
* there are a lot less files copied in /usr/local/bin
jack_load
jack_unload
jackd
jackdmp
* but now jack_server_control works!
HOW TO USE JACKDMP
* http://jackaudio.github.io/api/
* to use jack, your program provides a callback function that is executed at the right time.
* all audio is represented as 32 bit floats (double is 64 bits)
* Using JACK within your program is very simple, and typically consists of just:
* calling jack_client_open() to connect to the JACK server.
* registering "ports" to enable data to be moved to and from your application.
* registering a "process callback" which will be called at the right time by the JACK server.
* telling JACK that your application is ready to start processing data.
* The simple_client.c example demonstrates a complete (simple!) JACK application that just copies
the signal arriving at its input port to its output port
HERE IS THE DOC FOR JACKD
* https://github.com/jackaudio/jackaudio.github.com/wiki/jackd(1)
RANDOM NOTES
* reaper cannot use the router, but DP, logic and live can
* a bunch of the libraries I had to add the headers for (in jack/) are right in macosx/, e.g., libopus.a,
libaften*.a
* this is code for a juce plugin using jack: https://forum.juce.com/t/example-of-using-jack-with-juce/1385/2
------------ 2016-10-26 ------------
attempting to build in hexa. created new scheme by duplicating a 64 bit scheme and adding all the other products.
needed to be removed because they woudn't build:
* net_adapter
* audio adapter
* jack net
alright, so this is obviously not working well at all, there are a lot of packages that were building on nicolai
that are not building here. not sure what this is about. But also not sure that I should be spending time on this
in hexa. what are the pressing spatialization issues?
TESTING SPATGRIS+JACK+ZIRK
* Reaper
* some speakers are reversed
* Logic
* same weird speaker problem (even with zirkosc)
* apparently I cannot use sources numbers > 2 ???
* DP
*same
other than this weird stuff, it seems to work well.
---------- 2016-10-31 ----------
So the plan is to find how to interact with jackdmp. In order to do that, there
are a bunch of examples, including simple_client.c. But I don't know how to build
that file. There is a build thing-y included with the project, waf, but it gives
me the same kind of errors that i got with xcode, it can't find
Jack::JackDriver::Initialize() et al.
alright, I don't get this waf stuff.
Looking at the xcode project, I see that there are a bunch of clients in there.
They don't have the simple_client.c, but latent_client.c claims to do something
very similar. and it so happens that xcode creates a product for that .c, which
is jack_latent_client.
the latent client is a client that handles latency, we don't need this. I pasted
into it the code from simple_client.c, and now we can run that code, which
produces 2 sines, one on the left and one on the right.
--------- 2016-11-02 ------------
in hexa today. what to do?
* retest zirkonium pipeline
* speaker 3?
* there definitely seems to be something up
* order of speakers in top?
* they replaced the audio interface, and did the wiring differently, so
we had to change our speaker and server setup
* IDs higher than 2?
* in DAW, need to select different jack outputs for the different tracks
otherwise we're just overwriting what we're sending to the zirkonium
through jack
* test trajectories?
* #72 x12 in DP
* there seems to be something wrong with the audio unit format, like it's
not able to use 12 inputs or outputs...
* alright, so my understanding is that juce doesn't allow any bus to have more than 8
(or 9) actually channels. This is seen at juce_pluginBustUtilities.h line 239.
* a bit lower, line 252, we call layoutListCompatibleWithChannelCount() which calls
constructors for AudioChannelSets, like AudioChannelSet::create7point1(). There is
none for 10.2, or 12 , or anything above 7.1
* this somehow doesn't stop reaper from using 8x16. It just flies through the failed
asserts and somehow make it work... (for both AU and vsts) this is not the case for
DP or logic
* this page list the speakers in 10.2 format (https://en.wikipedia.org/wiki/10.2_surround_sound):
Seven front channels: Left Wide, Left Height, Left, Center, Right, Right Height, Right Wide
Three surround channels: Left Surround, Back Surround, Right Surround
Two LFE channels: LFE Left and LFE Right
* so that's
Left Wide
Left Height
Left
Center
Right
Right Height
Right Wide
Left Surround
Back Surround
Right Surround
LFE Left
LFE Right
* and the available channels in juce are (enum ChannelType)
left = 1,
right = 2,
centre = 3,
subbass = 4,
surroundLeft = 5,
surroundRight = 6,
centreLeft = 7,
centreRight = 8,
surround = 9,
sideLeft = 10,
sideRight = 11,
topMiddle = 12,
topFrontLeft = 13,
topFrontCentre = 14,
topFrontRight = 15,
topRearLeft = 16,
topRearCentre = 17,
topRearRight = 18,
wideLeft = 19,
wideRight = 20,
subbass2 = 21,
* I am in the middle of implementing this!
------------------ 2016-11-09 --------------
#101 and #104
Apparently it is possible to have steps (getParameterNumSteps()) and potentially to
get different names for different steps with getParameterText()?
also getParameterLabel() returns the units for a specific parameter
------------------ 2016-11-14---------------
#97: vst3s crash reaper
it seems that the problem is that with vst3s, preparetoplay is called
over and over again, setting the number of ixo to 8x16, 2x2, then 1x1.
Commenting the part in preparetoplay that does that makes the plugin
load, but then we're in 12x12 instead of 8x16. so why don't we forget
about the vst3s for now...!
#103
what is the difference between a property and a parameter?
properties are presets
parameters are also presets
* only loading presets triggers a refresh for properties
* these trigger a refresh for parameters
* setParameters
* setNumberOfSources
* setNumberOfSpeakers
* loading a preset
-----------------2016-11-15-----------------
ok, so my edits to editor::timercallback created a bunch of issues
X-field will not refresh when changing processmode
X- surface, azimspan, elevspan slider not refreshing field
X- moving a source doesn't cause refresh to source location editor
- clicking on source does refresh it, but dragging it doesn;t
- clicking on source calls mover->begin, which calls
processor->setSrcSelected, which increases mHostChangedParameterProcessor
- dragging a source causes an internal field refresh
- calls mover::move
X-when we stop, we want the db meters to go black
X-mute buttons can be automatted, and when reading automation, they do change from
unmuted to muted, but not from muted to unmuted...!
----------------2016-11-16--------------------
#105
see onenote
--------------- 2016-11-22-------------------
the down positions in the mover are initialized with JucePlugin_MaxNumInputChannels, which is 2
the preset function uses getTotalNumInputChannels, which is 8
--------------- 2016-12-05--------------------
return si en mode non-independent et on tente de setter une source non selectionne
#108
* editor::1728, need to call setParameterNotifyingHost instead of setLinkSurfaceOrPan.
The processor needs to NOT have a specific variable for link (mLinkSurfaceOrPan), but
rahter use a continuous value like the movement mode.
--------------- 2016-12-08--------------------
TODO
* remove problematic code in process thread
X new and delete
X thread start/stop
X starting thread
* #116: cpu problems
* so using the time profiler in instruments, i see that most of the cpu is used by
setSpeakerVolume and addToOutputs
X some minor improvement by using reference parameters
* setSpeaker volume is called 2 times per sample when source is outside main
spatgris circle, and 4 times when it is inside. keeping sources outside i can play
8x8 on gris, but inside I can't.
* processor line 1610, we do an extra round of setspeaker volume. commenting this
doesn't seem to do much, what is it for?
* TRYING TO BUFFER THE SPATIALIZATION
* what is kChunkSize used for?. Ok, going to onenote for this.
--------------- 2016-12-14 ------------------
#116 still. In hexa.
* release is faster than debug
* octogris is faster than spatgris
* reaper can use several parallel threads to do its stuff, that's why instruments shows different
worker threads calling processBlock(). At least I think!
* QUESTIONS OR THINGS TO TRY
* my buffered version
* less CPU, but spatialization is super slow
* is the less CPU caused by commenting filtering and sliders?
* using std arrays instead of juce arrays
* size of chunk size
* doesn't do much
* have some other implementation of the mute button. certainly doesn't need to be sample accurate!
* maybe I should be working on the octogris project instead of spatgris...
* look at other instruments and tutorials on instruments
* turning off db meters?
--------------- 2017-01-04 ------------------
getting back to this. All branches are:
0.1.0: before #47 fix
0.1.1: right after #47 fix
auv3: auv3 version, with new xcode. could probably delete
buffer: buffered spatialization. terrible delay in spatialization but much more efficient
down: something about storing locations in mover... i think this was merged, but would need to check
master: master
o12: attempt at fix #72
so only down branch is kinda unknown.
------------- 2017-01-12 -------------------
#112: ok. when fix #116 is deactivated, and the sources are right on the speakers,
we have no sound. What is special about the combination of this fix and the
location of the speaker, in spatgris specifically?
ADD TO OUTPUT
* WITH THE FIX, source 0 directly on speaker 0, mSpeakerVolumes[0][0] is around .5.
* WITHOUT THE FIX, it is around 0!
SET SPEAKER VOLUME
* with fix: around .5
* without: oscillates between 0 and 1!
* that's probably because r < 1 so setVolume called 2 times (front + back)
------------------
in setSpeakeVolume, target volume oscillates between 1 and 0
this happens whether or not fix_116 is activated
and doesn't happen in octogris. so there is the problem.
in spatgris, having sources on the speakers makes the ray slighly under 1,
while with octogris it is spot on ==1. Constantly?
i think the problem may be that when sources are right on speaker, the
weird oscillation that i'm observing is making the algorithm change between
inner and outer circle algorithms, thus constantly changing speaker sets
and this is why we don't hear anything.
goddammit, the oscillation was my performance fix in ramp. removing it doesn't fix the volume problem.
With fix_116 deactivated, we still have no sound if sources are right on speakerrrs.
------------------ 2017-01-16 ----------------
#112: without fix_116, no sound when sources on speakers. only for spatgris
* without fix_116 AND with fix_116 sources on speakers, r < 1
* on octogris it is == 1
* but i guess it doesn't matter because with or without fix_116, thus with or
without sound, r is < 1 on spatgris. so this is not the problem per se.
* the problem is that when r is just < 1, volume is set to close to 0. This doesn't
just happen when source in right on speaker, but in the whole area right under r ==1.
THIS IS THE PROBLEM.
* with fix_116, setSpeakerVolume outputs .5 and an alternance of 0 and 1
* without, it does the same, but there's no average between the 2 extremes
* octogris does the exact same thing! the alternance comes from speaker 0 being either
the front or the back speaker... and ALSO doesn't work when r < 1. OKKKK
RECAPPING THE PROBLEM
Both spatgris and octogris, without the fix_116, don't output any sound when r is just < 1. My
understanding is that this is because when we only have 2 speakers, the front and back speakers
are reversed and cancel each other out, if we don't average the volume (ie, fix_116). This was
hard to track because when sources are right on speakers, r is == 1 in octogris, and < 1 in
spatgris. The problem should not happen without fix_116, but with more than 2 speakers, and it
doesn't. Preventing the use of 4 speakers when we only have 2 fixes the problem!
* so potentially the fix is to bypass this
#124: small position wobble when not ramping when parameters are "equal".
* turned that off
----------------- 2017-01-18 ----------------
done with reformatting whole process data algorithm. also printing detailed timing tests
in octogris. need to compare the two more closely, but it seems everything is slower in
spatgris, potentially because something else (like Gui?) is taking cpu time... very unclear.
----------------- 2017-01-23 --------------------
in processBlock
inputs[numSources], outputs[numSpeakers] and inputsCopy[numSources] are vector<float*>
mParameterRamps[] and mInputsCopy[] are vector<vector<float>>
----------------- 2017-01-26 --------------------
Hexa.
no vector + no chunk: 10-17: NO SPATIAL, NEED TO FIX
vector + no chunk: 13-18.
Needs Fix 116 to not click.
we don't appear to need vSpeakersCurrentlyInUse
AND IN FACT WE DON'T NEED FIX_116 AT ALL BECAUSE
INCREASING SMOOTHING LIMIT TO 500 SEEMS TO HAVE FIXED THE PROBLEM
vector + chunk: weird problems. DELETE CHUNK CASE
----------------- 2017-01-31 --------------------
NO VECTOR
pas de spatalisation
VECTOR
pas de son.outputs[o][f] is always 0. volumes[o] is not 0.
sample is 0
THE PROBLEM IS that we're not copying data from input buffer to
inputs member variable. rather we're relying on crazy inputsCopy
bullshit.
---------------- 2017-02-01 ---------------------
X-active speakers: enlever push_back
enlever mSpeakerVolumes pour revenir à comment c'était avec octogris
avant fix_116
---------------- 2017-02-03 ---------------------
MEETING
vb: faire version performante plus vite possible
testeurs: tester à fond
david: video avec script
sourcefogrge spatgris (download simple + download bundle avec soundflower/jack/zirkonium)