From the original SynthMaker forum (2004–2014), with its members’ names and dates.
trogluddite ·
A little module for generating light trails - like the slow-fading phosphors you see on old radar screens in war movies.
(enable the audio output to see the animation - the movement is driven by some oscillators)
...if you look inside, the module 'phosphors' just slots in between your animated GUI elements and the MGUI. Then just add an animation ticker of your choice, and set the 'persistence' parameter to set the length of the trails.
N.B. will be CPU greedy if you animate a large area or use high frame rates - it has to generate a bitmap for each new frame - no way around that one I'm afraid.
Acrobat ·
trogluddite wrote: A little module for generating light trails - like the slow-fading phosphors you see on old radar screens in war movies.
(enable the audio output to see the animation - the movement is driven by some oscillators)
...if you look inside, the module 'phosphors' just slots in between your animated GUI elements and the MGUI. Then just add an animation ticker of your choice, and set the 'persistence' parameter to set the length of the trails.
N.B. will be CPU greedy if you animate a large area or use high frame rates - it has to generate a bitmap for each new frame - no way around that one I'm afraid.
hi trog, thanks, I feel this can come in hand, I have a WIP plug with some balls moving over an area and I always wanted to make a trail to 'em... 😀
trogluddite ·
Can't take all the credit - it was heavily inspired by mwvdlee's 'Buffered Scroll' - guess I should have said that earlier!
All sorts of wierdness is posiible if you translate/rotate/resize the view from the bimap draw before it gets resampled.
Here's the USS Enterprise travelling backwards for all you Star Trek fans...
..that's just shrinking the previous frame's bitmap each time. you could also maybe use the colour matrix Bitmap Draw to make the colours morph too...
MichaelBenjamin ·
pretty cool - set persistance over 300 and resize for some nice noise.
Andrew J ·
That's pretty cool. I've actually done something equivalent using green code for a simple pixellated meter display. However this method here would let me draw a much more detailed meter without having to add hundreds or thousands more primitives. Would also be pretty neat for a goniometer. Thanks Trog and Mr Van Der Lee!
trogluddite ·
Andrew J wrote: Would also be pretty neat for a goniometer
Oddy enough, that was one of the application I had in mind when making it - thought is might save having to have big arrays of x,y co-ordinates being constantly plotted. I'll stick up an example if I get anywhere.
trogluddite ·
Hmm, goniometer not working so well.
Seems that when using two mono-to-graphs to capture mid and side arrays of points, the two will not always trigger simultaneously. Without being able to guarantee the phase accuracy, the goniometer is kind of pointless.
Shame, I was having endless fun tripping out to the pretty lissajou shapes.
aliasant ·
trogluddite wrote: Hmm, goniometer not working so well.
Seems that when using two mono-to-graphs to capture mid and side arrays of points, the two will not always trigger simultaneously. Without being able to guarantee the phase accuracy, the goniometer is kind of pointless.
Shame, I was having endless fun tripping out to the pretty lissajou shapes.
Yeah.
I have talked o Malc about this a year or 2 ago but never got any results so my goniometer is also a bit glitchy 🙁
trogluddite ·
Think I may have it working now... 🙂
(EDIT: Latest Download in Examples/Goniometer.)
...had to store the audio in a 'circular' mem buffer so that it can use the mem-to-float array min/max - that one keeps the two channels in phase - but takes more CPU 🙁
Then it uses a bit of array manipulation to extraxt the entries in the right order depending on the position of the buffer's pointer. Could possiby optiimise a bit further - there's quite a lot of overlapping points plotted ATM, to allow for jitters in the green triggers.
Tried it as a VST with music playing via some 'stereo image' type plugin, and it all seems to work OK.
aliasant ·
trogluddite wrote: Think I may have it working now... 🙂
...had to store the audio in a 'circular' mem buffer so that it can use the mem-to-float array min/max - that one keeps the two channels in phase - but takes more CPU 🙁
Then it uses a bit of array manipulation to extraxt the entries in the right order depending on the position of the buffer's pointer. Could possiby optiimise a bit further - there's quite a lot of overlapping points plotted ATM, to allow for jitters in the green triggers.
Tried it as a VST with music playing via some 'stereo image' type plugin, and it all seems to work OK.
Wow hat was fast. And it actually works prey well. Trying to understand it better.
Quesion.
Why is the memory size set at 28800 bytes? Is that just a hunch?
Im sure there is basic mah behind it.
I havent really understood he memory parts of SM yet but this serves as an excellent tutor for me.
3600samples / channel = 7200 samples.
28800bytes/7200 = 4
I still don really understand how his works but that 4 seems to be a to nice number to be a coinsident?
If I understand why you used those numbers maybe they can be tweaked for smoother or faster operation?
Probably not but Im trying 😉. This is one of my really weak areas for sure.
Anyways. As long as the window size is kept under the magic threshold cpu usage is quite fast even with a 100 ticker.
trogluddite ·
aliasant wrote: Why is the memory size set at 28800 bytes?
The mem buffer is always in bytes rather than samples - so 3600 samples * 2 (stereo) * 4 - because a float number takes up 4 bytes of memory (32bits).
3600 samples is a bit of a guess - in theory there should be about 1800 samples between each trigger from the tick25 - but I added a load more because late triggers were making gaps in the display. Also it allows extra for the Array Section - the m2f that reads the pointer position doesn't trigger accurately enough to rotate the circular buffer precisely - so the arrays are truncated at each end a little.
In fact, I've noticed that on my little Intel Atom netbook there is stilll enough timing error in the triggers to get weird little 'sparkles' where the display draws the 'flyback' of the buffer - annoying 😠
BTW if you are using a tick100, you should be able to make all the buffers much smaller (about 900 samples) - but be careful changing the size of the mem - it can sometimes crash SM if you change buffer size with the audio running. You'll also need to change a line in the counter code so that it resets at the right number -
'count=(count<your_max_size)&(count+1)'
aliasant ·
Thanx Trog !
4 Bytes / floa makes sense.
I did experiment with changing he memory size (+ the counter and trunc) but it seems 3600 is the best with the least glitches.
I still get the same as you on your atom even though I have an i7 920 with 6gb fast ram....... so a faster machine wont help that 🙁 Still some small glitches/sparks.
I did noice tha if I unplugged and plugged back (perhaps sending a trigger is enough) the conections on the truncate/secion primitives made the glitches go away for a few seconds. Seems maybe the glitches apear when an array or memory is rebuilt or something similar. Dont know anything about this but I repeated the test a couple of times and got about the same result. Maybe this is something Malc can fix with the right guy filing the bug report 😉
trogluddite ·
aliasant wrote: i7 920 with 6gb fast ram
Weird, I don't get any glitches at all on my Q6700 - guess it depends on how nicely Windows timers want to play (my main machine not on the net - so very little background tasks happening, maybe that's it)
Anyway, here's a slightly prettier version - I managed to get rid of most of the 'sparkles' on my little Atom by truncating the arrays a lot more - and skewing the truncation more towards the end of the arrays. Still not quite perfect, but probably good enough with a real-life audio signal (using pure sine test signals is bound to show up the smallest errors), and saves a little re-draw CPU too.
(EDIT: Latest dowmload in Examples/Goniometer)
P.S. Wikipedia gives a good description of a goniometer, if anyone is wondering what the hell you'd ever want one for...
http://en.wikipedia.org/wiki/Goniometer_%28audio%29
trogluddite ·
Just re-uploaded new version to the previous post.
Found big CPU saving just by making the width of the plotted line narrower, and tweaked the array stuff slightly.
Runs much better than before - no more sluggish screen when VST hosted in Cubase.
MichaelBenjamin ·
beautiful thing, makes such nice curves.
aliasant ·
trogluddite wrote: Just re-uploaded new version to the previous post.
Found big CPU saving just by making the width of the plotted line narrower, and tweaked the array stuff slightly.
Runs much better than before - no more sluggish screen when VST hosted in Cubase.
Hmm
What did you weak in he array department? Can find any changes except the small one in the truncate but I guess thats the one you ment 😉 ?
I always use Line thickness that = pixel size like you just did. 1/8 grid. 0.125, 0.25, 0.375 and so on.
I have a version were I resampled the array after he truncation to 128 and it still looks prety good and behaves even faster.
trogluddite ·
aliasant wrote: I resampled the array
Have to try that - I was worried that it might kind of low-pass filter the line, so high frequencies might not be shown so accurately. OTOH it's definitely the Point Array to Line that sucks the CPU, so maybe even just resanpling by 2 or 4 would give a good CPU save. Have you tried feeding it a music track yet? - looks quite hypnotic if you get a good wide stereo track!
Array changes were just the truncate, like you say - slightly less points to plot, and moved the 'window' a bit later to give the triggers more time to work their way through. Does mean that there's a little latency to the image on screen though.
aliasant ·
trogluddite wrote:
aliasant wrote: I resampled the array
Have to try that - I was worried that it might kind of low-pass filter the line, so high frequencies might not be shown so accurately. OTOH it's definitely the Point Array to Line that sucks the CPU, so maybe even just resanpling by 2 or 4 would give a good CPU save. Have you tried feeding it a music track yet? - looks quite hypnotic if you get a good wide stereo track!
Array changes were just the truncate, like you say - slightly less points to plot, and moved the 'window' a bit later to give the triggers more time to work their way through. Does mean that there's a little latency to the image on screen though.
Im not sure about the resampling yet. When I tried it in REaper it didnt use any cpu a all...... so maybe its not necessary.. Gonna try having a button switching it off and on and see if that makes me any wiser...
I have a shadow running as well as the normal goniometer so I am using 2 PALs and it seems to work pretty ok so far.
Im feeding music thru it and it is gorgeous 🙂 Planning to put it in my MS Compressor when Im done with it 🙂
The latency was a bit much so I changed that from 800 to 400. I dont see any glitches right now so I think im ok.
I really love the Phosphors ting. I did try to create tha effect a couple of years back bt I really ad no idea how to do tha. I was bugging poor Malc about it. I wanted a way to control Alpha and Im glad Malc didnt listen to my stupid cravings 🙂
Excellent stuff Trog!!
Oops. Wait a minute.
I did remove my resampling module before I looked at your reported higher latency.... but now when I plugged the resampling back latency is gone. Changed the 400 back to 800 and it still looks good.
I think you need to resample it. Seems to work miracles 🙂
philter5 ·
😍 WOW great work here trogluddite 😉
phil
trogluddite ·
Got something I think is about finished - posted in Examples/Goniometer.
trogluddite ·
Couldn't resist posting this one last 'incredibly useful' light-trails example....
Set the 'speed' knob to suit the 'vibe'.
Isn't that just the coolest screensaver ever made using completely inappropriate software?
..just don't watch it too long, or else you'll end up like me 😉
philter5 ·
😀 VERY VERY PSYCHEDELIC STUFF
great!
aliasant ·
trogluddite wrote: Couldn't resist posting this one last 'incredibly useful' light-trails example....
Set the 'speed' knob to suit the 'vibe'.
Isn't that just the coolest screensaver ever made using completely inappropriate software?
..just don't watch it too long, or else you'll end up like me 😉
That was sweet ! 🙂
I made it a bit more so I think. Changed the Sinus oscillators to green versions so you dont need any audio active.
trogluddite ·
Nice work! never occurred to me that you could make a green sine wave.
sunsynth ·
@aliasant:
Can u please check 4 me why ur 'Psychedelic Green Osc' disappears into nirvana in v2.03
(speed it up so u don't have 2 wait 4 the 'effect' to appear)???
aliasant ·
sunsynth wrote: @aliasant:
Can u please check 4 me why ur 'Psychedelic Green Osc' disappears into nirvana in v2.03
(speed it up so u don't have 2 wait 4 the 'effect' to appear)???
Found it.
I think its realted to a bug reported here: Slow OR *SOLVED*
The True>Trigger does send a trigger but the trigger doesnt reach its reset destination.
I made an ugly fix by using a De-Threader to create a new trigger.
sunsynth ·
Sick 😮
Never thought it was such a reason... Damn - have to be cautious with my project now in v2.03 😈
Cheers,
Walter
trogluddite ·
Malc has responded to our concerns - see HERE
NightmareDream ·
wow.. Nice job! Seems like SM has some great visualisation possibilities 🙂 I used to really like winamp's AVS ... I'm pretty sure SM could do better than it did somehow?
Wrote something here? To have a post removed or your name hidden, write to [email protected].