00:00:00  * ircretaryquit (Remote host closed the connection)
00:00:08  * ircretaryjoined
00:05:42  <jjjohnny_>uh
00:05:51  <jjjohnny_>ws or websocket-stream
00:06:45  <jjjohnny_>the latter
00:07:52  * tilgovijoined
00:13:45  <substack>I don't remember
00:24:14  * DTrejoquit (Remote host closed the connection)
00:32:45  * thlorenzjoined
00:37:40  * thlorenzquit (Ping timeout: 244 seconds)
00:46:37  * shamajoined
00:51:32  * shamaquit (Ping timeout: 265 seconds)
01:33:40  * toddself_zzchanged nick to toddself
01:34:54  * toddselfquit
01:35:04  * jxson_joined
01:38:38  * jxsonquit (Ping timeout: 256 seconds)
01:39:46  * jxson_quit (Ping timeout: 256 seconds)
01:47:03  * shama_joined
01:50:38  * pfrazequit (Remote host closed the connection)
01:59:43  * thlorenzjoined
02:02:02  * thlorenzquit (Remote host closed the connection)
02:02:22  * tilgoviquit (Remote host closed the connection)
02:08:16  * thlorenzjoined
02:10:54  * tixzquit (Remote host closed the connection)
02:12:46  * reqsharkjoined
02:13:48  * sz0quit (Quit: Bye.)
02:13:55  * anandthakkerquit (Quit: anandthakker)
02:14:32  * anandthakkerjoined
02:24:02  * anandthakkerquit (Quit: anandthakker)
02:24:36  * anandthakkerjoined
02:31:39  * thlorenzquit (Remote host closed the connection)
02:32:31  * shama_quit (Remote host closed the connection)
02:44:29  * phatedquit (Remote host closed the connection)
02:51:33  * fotoveritequit (Quit: fotoverite)
02:59:06  * anvakajoined
02:59:18  * sz0joined
03:17:26  * anandthakkerquit (Quit: anandthakker)
03:21:01  * fotoveritejoined
03:32:26  * thlorenzjoined
03:37:15  * thlorenzquit (Ping timeout: 252 seconds)
03:50:24  * dguttmanquit (Quit: dguttman)
04:13:20  * fotoveritequit (Quit: fotoverite)
04:33:30  * thlorenzjoined
04:38:44  * thlorenzquit (Ping timeout: 264 seconds)
04:58:13  * anvaka_joined
04:58:13  * anvakaquit (Read error: Connection reset by peer)
05:11:31  * knownasilyaquit (Quit: Connection closed for inactivity)
05:35:06  * DamonOehlmanjoined
06:15:13  * contrahaxquit (Quit: Sleeping)
06:22:24  * thlorenzjoined
06:27:13  * thlorenzquit (Ping timeout: 256 seconds)
06:58:34  * DamonOehlmanquit (Ping timeout: 245 seconds)
08:10:26  * gozalaquit (Quit: Connection closed for inactivity)
08:11:14  * thlorenzjoined
08:13:54  * anvaka_quit (Remote host closed the connection)
08:15:57  * thlorenzquit (Ping timeout: 244 seconds)
08:18:47  * therealkoopajoined
08:26:51  * therealkoopaquit (Remote host closed the connection)
09:03:47  * Bsonyjoined
09:12:07  * thlorenzjoined
09:12:53  * yoshuawuytsjoined
09:17:08  * thlorenzquit (Ping timeout: 264 seconds)
09:26:32  * freealljoined
09:31:36  <jjjohnny_>somebody explain audio here pls https://www.shadertoy.com/view/ltj3zR
09:33:12  <jjjohnny_>webgl has its own audio shiz?
09:42:14  <jjjohnny_>is glsl converted to js?
09:44:04  <substack>it runs on the graphics card
10:13:10  * thlorenzjoined
10:15:31  * sz0quit (Quit: My computer has gone to sleep. ZZZzzz…)
10:18:00  * thlorenzquit (Ping timeout: 265 seconds)
10:32:43  * tixzjoined
10:40:02  * tixzquit (Remote host closed the connection)
10:40:22  * tixzjoined
10:47:40  * tixzquit (Remote host closed the connection)
10:48:38  * tixzjoined
10:51:09  * tixzquit (Client Quit)
11:01:54  * freeallquit (Remote host closed the connection)
11:36:51  * freealljoined
11:54:30  * yoshuawuytsquit (Ping timeout: 244 seconds)
11:58:57  * thlorenzjoined
12:04:10  * thlorenzquit (Ping timeout: 272 seconds)
12:10:56  * yoshuawuytsjoined
12:11:40  * freeallquit (Remote host closed the connection)
12:19:32  * freealljoined
12:26:23  * freeallquit (Remote host closed the connection)
12:30:45  * freealljoined
12:59:44  * thlorenzjoined
13:00:25  * fotoveritejoined
13:04:23  * thlorenzquit (Ping timeout: 246 seconds)
13:38:53  * suAjoined
13:39:18  * suApart
13:39:21  * suAjoined
13:39:40  * suAquit (Client Quit)
13:39:46  * tixzjoined
13:49:22  * anandthakkerjoined
13:54:39  * tixzquit (Remote host closed the connection)
14:01:17  * tixzjoined
14:45:31  * thlorenzjoined
14:49:14  * freeallquit (Remote host closed the connection)
14:50:10  * thlorenzquit (Ping timeout: 244 seconds)
14:51:35  <mikolalysenko>jjjohnny_: the shader generates a time varying signal, which gets copied to a buffer and pushed out the speaker via web audio
14:54:38  * pfrazejoined
15:21:15  * pfrazequit (Remote host closed the connection)
15:34:11  * domanicjoined
15:50:07  * freealljoined
15:51:45  * thealphanerdjoined
15:54:37  * freeallquit (Ping timeout: 252 seconds)
16:02:26  <mikolalysenko>basically on the gpu you write some function float signal(floa t) { ... } and then the shader toy hooks up the rest of the plumbing to get it out to webaudio
16:12:22  * sz0joined
16:16:21  * thlorenzjoined
16:21:02  * thlorenzquit (Ping timeout: 246 seconds)
16:22:04  * pfrazejoined
16:37:11  * thlorenzjoined
16:40:13  * thealphanerdquit (Quit: thealphanerd)
16:40:32  * domanicquit (Read error: Connection reset by peer)
16:41:41  * anandthakkerquit (Quit: anandthakker)
16:41:54  * thlorenzquit (Ping timeout: 245 seconds)
16:47:34  * yoshuawuytsquit (Ping timeout: 265 seconds)
17:10:17  <jjjohnny_>mikolalysenko: so glsl audio code runs on the GPU, and webGL handles the web audio buffering?
17:10:47  <jjjohnny_>and this is all separate from the js thread
17:12:28  * pfraze_joined
17:15:36  * pfrazequit (Ping timeout: 265 seconds)
17:15:40  <jjjohnny_>what do I have to do?
17:16:29  <jjjohnny_>write a vec2 mainSound function?
17:19:41  <mikolalysenko>jjjohnny_: no, webgl just renders triangles
17:19:50  * Bsonyquit (Ping timeout: 252 seconds)
17:19:56  <mikolalysenko>what shader toy does is draw a big triangle to an offscreen frame buffer
17:20:04  <mikolalysenko>then it reads the pixels out of that and copies it to a sound buffer
17:20:13  <mikolalysenko>so you render a pcm audio signal into a big texture
17:20:33  <mikolalysenko>and then shader toy copies the pixels from that and feeds it to webaudio, where it gets interpreted as sound
17:20:35  <jjjohnny_>hm
17:20:46  <jjjohnny_>is the processing faster than js
17:20:50  <jjjohnny_>?
17:20:52  <mikolalysenko>depends
17:20:59  <mikolalysenko>it might be way faster, but moving pixels around is slow
17:21:08  <mikolalysenko>if the synthesis is sufficiently complex then it will be faster on the gpu
17:21:21  <mikolalysenko>but copying data from the gpu to the sound card via js introduces a lot of delay
17:21:21  <jjjohnny_>but the buffer must be copied
17:21:25  <mikolalysenko>yeah it is true
17:21:35  <jjjohnny_>copied into the main js thread no less
17:21:40  <mikolalysenko>yep
17:21:45  <mikolalysenko>there isn't any way to do it without copying
17:21:52  <mikolalysenko>however the data does come to you in a big typed array
17:22:03  <mikolalysenko>so if you are a bit smart about how you do it, it might not be a big deal
17:22:15  <mikolalysenko>really though this only makes sense if your synthesis and processing are all done on the gpu
17:22:25  <mikolalysenko>you don't want to be copying data back and forth all the time, it will be slow
17:22:45  <mikolalysenko>but you can make some awesome effects in a shader and the actual compute time is pretty close to free if you are running it on the gpu
17:22:45  <jjjohnny_>who made shadertoy?
17:22:51  <mikolalysenko>inigo quilez
17:23:02  <mikolalysenko>he is a pretty famous guy in the demoscene
17:23:14  <mikolalysenko>there are other audio shader toy things though
17:23:22  <mikolalysenko>greweb has something that he made before shader toy
17:23:48  <jjjohnny_>im so confuse
17:24:03  <jjjohnny_>how would i implement this myself?
17:24:34  <mikolalysenko>shouldn't be too hard
17:24:36  <jjjohnny_>i see you can script glsl, does the browser handle all that go between with the GPU?
17:24:51  <jjjohnny_>and render to a canvas
17:24:58  <mikolalysenko>you can look at this demo: https://github.com/stackgl/gl-fbo
17:25:08  <mikolalysenko>that shows how to set up fbos for basic ping pong rendering
17:25:29  <mikolalysenko>but it is probably possible to create a more minimal example
17:25:37  <greweb>hi guys :-)
17:26:51  <mikolalysenko>jjjohnny_: I think this is the demo he made https://github.com/gre/wavegl
17:27:44  <greweb>the idea of audio in GLSL was apparently not new, and shadertoy guys claim to have privately working on it a few months even if I released it before^^. that doesn't really matter anyway
17:28:37  <greweb>the audio demos they released was incredible
17:28:45  <greweb>ours was just bootstrapped in a day
17:32:50  <greweb>btw little anecdote, what's funny is this dsp(double t) function (t is in second) is progressively losing precision because of the nature of floating type
17:33:22  <greweb>so after a few minutes the sound quality decrease (slowly moving to 8-bit sound quality^^)
17:37:27  * tixzquit (Remote host closed the connection)
17:38:02  * thlorenzjoined
17:38:29  <greweb>web audio api have 44100Hz sample rate, and in t in [0, 1], the floating is enough precise to have distinct time samples, which is not the case when you increment t (per second you can represent less and less numbers. that's half each ^2)
17:39:25  <greweb>that's where you can see this is a huge hack and I would recommend to use this hack for serious use-case ;-D
17:41:52  * tixzjoined
17:42:35  * thlorenzquit (Ping timeout: 250 seconds)
17:42:40  <greweb>I wouldn't*
17:57:16  * thlorenzjoined
17:58:54  <jjjohnny_>greweb: but is that true of all glsl audio hacks?
17:59:35  <greweb>the precision issue?
17:59:38  <jjjohnny_>yeah
17:59:46  <greweb>I guess it is
18:00:07  <greweb>even if you mod() the value, you already have the imprecision
18:00:27  <jjjohnny_>hm
18:00:32  <jjjohnny_>oh well
18:00:41  <greweb>the only solution would be to explode your "time" into multiple doubles. but you can't really easily to dsp then..
18:00:43  <greweb>do *
18:02:38  * thlorenzquit (Ping timeout: 272 seconds)
18:03:49  <greweb>the idea is quite beautiful but I don't think it is very exploitable to make a serious audio application
18:04:15  <greweb>for at least that reason
18:06:23  * thlorenzjoined
18:06:26  <greweb>another reason is that you can't have any "states" or "memory" in a shader. which means you can't implement audio effects like delay, filters, reverb, ... unless you re-call dsp with all previous time, which will be very intensive
18:07:51  <greweb>audio signal processing with a pure function
18:18:40  <mikolalysenko>greweb: what you could do is just split buffers in two parts
18:18:53  <mikolalysenko>like use two floats to get the time value
18:20:32  <greweb>split buffers into 2 parts? for solving the memory thing?
18:26:50  <greweb>other subject. I'm considering using WeakMap on one of my lib to hide private properties instead of the '_' prefix function? I don't know if that is an anti-pattern or not. what annoying me a bit is that I want my library to have a better experience when playing with Web Console autocomplete. all the '_'-prefixed come first^^
18:28:01  <greweb>I'm a bit afraid by the code-complexity and the one-more-indirection it brings
18:28:13  <greweb>but at least it hides things^^
18:29:04  <greweb>( related: https://curiosity-driven.org/private-properties-in-javascript )
18:46:04  * pilijoined
18:46:58  * thealphanerdjoined
18:47:48  * freealljoined
18:48:04  * freeallquit (Read error: Connection reset by peer)
18:48:30  * freealljoined
19:00:31  * Guest94221changed nick to ELLIOTTCABLE
19:01:02  * ELLIOTTCABLEchanged nick to Guest92206
19:07:19  * fotoveritequit (Quit: fotoverite)
19:07:55  * Guest92206changed nick to \ELLIOTTCABLE
19:36:52  * pelletierquit (Ping timeout: 255 seconds)
19:38:47  * thlorenzquit (Remote host closed the connection)
19:43:22  <mikolalysenko>greweb: I think weakmap is a good solution, though support is still not 100%
19:51:43  * sorensen_joined
19:52:14  * sorensen_quit (Client Quit)
20:15:41  <greweb>mikolalysenko: ok :-)
20:24:49  * piliquit (Read error: Connection reset by peer)
20:25:17  * pilijoined
20:31:46  * posequit (Remote host closed the connection)
20:32:03  * Bsonyjoined
20:42:33  * anvakajoined
20:49:03  * domanicjoined
21:00:32  * phatedjoined
21:01:44  * domanicquit (Ping timeout: 246 seconds)
21:08:51  * anvakaquit (Ping timeout: 250 seconds)
21:11:11  * anvakajoined
21:27:25  * fotoveritejoined
21:34:02  * posejoined
21:35:39  * thlorenzjoined
21:39:55  * thlorenz_joined
21:40:10  * thlorenzquit (Ping timeout: 255 seconds)
21:44:32  * thlorenz_quit (Ping timeout: 244 seconds)
21:57:01  * rhiaroquit (Quit: Better things to be doing)
22:02:45  * Bsonyquit (Ping timeout: 252 seconds)
22:05:46  * anvakaquit (Remote host closed the connection)
22:06:22  * anvakajoined
22:06:55  * freeallquit (Remote host closed the connection)
22:07:48  * piliquit (Read error: Connection reset by peer)
22:08:26  * pilijoined
22:10:49  * anvakaquit (Ping timeout: 250 seconds)
22:12:49  * tixzquit (Remote host closed the connection)
22:14:14  * domanicjoined
22:26:50  * rhiarojoined
22:38:41  * Bsonyjoined
22:51:09  * Bsonyquit (Ping timeout: 252 seconds)
22:51:18  * posequit (Remote host closed the connection)
22:54:00  * freealljoined
22:55:43  * posejoined
22:59:53  * posequit (Client Quit)
23:11:05  * DamonOehlmanjoined
23:17:13  * phatedquit (Remote host closed the connection)
23:22:01  * domanicquit (Ping timeout: 264 seconds)
23:26:53  * phatedjoined
23:27:57  * darvonquit (Ping timeout: 250 seconds)
23:28:41  * thlorenzjoined
23:29:02  * darvonjoined
23:30:05  * Bsonyjoined
23:30:46  * anandthakkerjoined
23:33:06  * thlorenzquit (Ping timeout: 252 seconds)
23:40:17  * Bsonyquit (Ping timeout: 252 seconds)
23:40:34  * tixzjoined
23:52:01  * DamonOehlmanquit (Ping timeout: 252 seconds)
23:57:48  * thlorenzjoined