12-28-2020, 01:43 PM | #1 |
Human being with feelings
Join Date: Dec 2012
Posts: 7,294
|
Ash O Scope
This is kind of weird and mostly just a proof of concept, but it can be fun to play with. It's literally nothing more than the Decorative Oscilloscope except I blit the next video track into the place the dot would go. It seems to bog down with largish dot counts, but generally you will want to use larger dot sizes. I've included a new parameter to choose the merge mode between default normal replace and (absolute) difference modes. Feel free to try others(1,2,3,17,18), but I didn't (generally don't) care for any of them.
Code:
//Decorative Video Oscilloscope with Blitter (requires JSFX video sample peeker) //hacked by ashcat_lt //@gmem=jsfx_to_video //@param 1:mode "mode" 0 0 2 0 1 //@param 2:dotcount "point count" 1200 1 5000 400 1 //@param 3:dotsize "point size" 4 2 1000 500 1 //@param 4:gain_db "gain (dB)" -6 -80 12 -12 1 //@param 5:zoom_amt "blitter zoom" .27 -.5 1 .1 0.01 //@param 6:fadespeed "blitter persist" .8 0 1 .1 0.01 //@param 7:filter "blitter filter" 1 0 1 0 1 //@param 8:fg_r "foreground R" 1 0 1 .5 .02 //@param 9:fg_g "foreground G" 1 0 1 .5 .02 //@param 10:fg_b "foreground B" 1 0 1 .5 .02 //@param 11:bg_r "background R" 0 0 1 .5 .02 //@param 12:bg_g "background G" 0 0 1 .5 .02 //@param 13:bg_b "background B" 0 0 1 .5 .02 //@param 14:cx "center X" .5 0 1 .5 .01 //@param 15:cy "center Y" .5 0 1 .5 .01 //@param 16:merge "merge mode" 0 0 19 10 19 last_frame && fadespeed > 0 ? ( xo = project_w*zoom_amt*.25; yo = project_h*zoom_amt*.25; gfx_mode=filter>0?0x100:0; xo < 0 ? gfx_blit(last_frame,0); gfx_blit(last_frame,0,0,0,project_w,project_h,xo,yo,project_w-xo*2,project_h-yo*2); ); gfx_set(bg_r,bg_g,bg_b,last_frame ? (1-fadespeed) : 1); gfx_a>.001 ? gfx_fillrect(0,0,project_w,project_h); halfsize = dotsize * 0.5; bufplaypos = gmem[0]; bufwritecursor = gmem[1]; bufsrate = gmem[2]; bufstart = gmem[3]; bufend = gmem[4]; nch = gmem[5]; gain = 10^(gain_db*(1/20)); dt=max(bufplaypos - project_time,0); dt*bufsrate < dotcount ? underrun_cnt+=1; rdpos = bufwritecursor - ((dt*bufsrate - dotcount)|0)*nch; rdpos < bufstart ? rdpos += bufend-bufstart; gfx_set(fg_r,fg_g,fg_b,1); function getpt() ( l = gmem[rdpos]; r = gmem[rdpos+1]; (rdpos += nch)>=bufend ? rdpos=bufstart; ); i=0; gfx_mode = merge; mode==2 ? ( loop(dotcount, getpt(); ang = atan2(l,r); dist = sqrt(sqr(l)+sqr(r)); xp = cx*project_w + ((cos(ang)*dist*gain)*project_h-dotsize)*.5; yp = ((cy*2+sin(ang)*dist*gain)*project_h-dotsize)*.5; gfx_blit (input_track(0),0,xp,yp,dotsize,dotsize); // gfx_fillrect(xp,yp, dotsize,dotsize); ); ) : mode == 1 ? ( loop(dotcount, getpt(); yp = project_h * (cy - .5 + i / dotcount); xp = project_w * (cx + (l+r)*.25*gain); gfx_blit (input_track(0),0,xp,yp,dotsize,dotsize); // gfx_fillrect(xp-dotsize*.5,yp-dotsize*.5, dotsize,dotsize); i+=1; ); ) : ( loop(dotcount, getpt(); xp = project_w * (cx - 0.5 + i / dotcount); yp = project_h * (cy + (l+r)*.25*gain); gfx_blit (input_track(0),0,xp,yp,dotsize,dotsize); // gfx_fillrect(xp-dotsize*.5,yp-dotsize*.5, dotsize,dotsize); i+=1; ); ); gfx_img_free(last_frame); last_frame=gfx_img_hold(-1);
__________________
Lorenzo's Tractor is Everywhere --- Ash's Tube --- Join the Partnership for a Drum Free Amerika |
01-07-2021, 01:52 AM | #2 |
Human being with feelings
Join Date: Mar 2018
Location: Cologne
Posts: 1,362
|
Oh ashcat_lt, you should really sell your stuff with more passion.
No video example? Most people have no idea what you mean with your description. But I tested your preset and its really fun to play with. Replacing the dots with any form from an image or even a animated sequence offers a lot of new possibilities. Thanks for sharing.
__________________
☆.。.:*・°☆.。.:*・°☆.。.:*・°☆REAPER//✿◔‿◔)°☆.。.:*・°☆.。.:*・°☆
|
01-08-2021, 02:54 AM | #3 | |
Human being with feelings
Join Date: Nov 2014
Location: Can Tho - Viet Nam
Posts: 305
|
Quote:
__________________
NK Recording Studio Email: lachinhan@gmail.com or admin@thuamninhkieu.com Website:nkpro.top and ntmusicpro.com |
|
01-08-2021, 10:18 AM | #4 |
Human being with feelings
Join Date: Dec 2012
Posts: 7,294
|
I guess I’m just kind of a hack at this, and I’m really not sure this particular thing would be actually useful for any but a very few weirdos.
I did find a thing that I kind of missed in this one. I had a project where I was playing around with this and my feedback preset just twiddling controls until it did something cool. Every time I found something I liked, I would save to create a backup project file so I could go back later. Well, when I went back later the backups just didn’t work. Something was stopping the o scope from doing anything. Was frustrated and confused for about 24 hours til last night I noticed that it is not explicitly setting its color space. Merge mode 19 only works in YUV color space, but in project settings, that was set to “automatic”, and I guess they were all choosing RGB for whatever reason. Changed that to one of the YUV modes, and now everything is good. It’s fairly simple to account for that in this preset, but I haven’t gotten around it. Also, I’ve never really been happy with the way it distributes the dots. I’m not sure what’s wrong, but it doesn’t seem right to me, like I somehow managed to break that calculation even though I literally didn’t touch that part of the original code. Anyway, thanks for checking it out. If you’re enough of a weirdo that you can find a use for it, that’s great. If it inspires you to make other weird things, please share. People occasionally ask for audio visualizations, and this was sort of a small step toward seeing what we could do for that.
__________________
Lorenzo's Tractor is Everywhere --- Ash's Tube --- Join the Partnership for a Drum Free Amerika |
04-06-2021, 11:28 AM | #5 |
Human being with feelings
Join Date: Dec 2012
Posts: 7,294
|
Does this help at all? The video peeker is driven from a simple sine wave. The image source is just a static image, but moving videos do actually more. I set up envelopes on point count and point size ramping in opposite directions. The other parameters are pretty neutral, but they do the same thing the original preset does. I rendered it to .gif and then rendered that to .mov, so it got a bit weird. Looks a bit better IRL.
https://www.youtube.com/watch?v=pW6bmw5T9NA
__________________
Lorenzo's Tractor is Everywhere --- Ash's Tube --- Join the Partnership for a Drum Free Amerika |
Thread Tools | |
Display Modes | |
|
|