Echo effect?

Tue Dec 15, 2020 5:10 am

Hi everyone!

I'm using an iterator to draw an object multiple times across the screen with a translator. Is it possible to impose a time delay on each iteration?

I want the first copy to get drawn 100ms after the first, the second copy to get drawn 100ms after the second, etc.

Thanks!
Matt
mgregory22
 
Posts: 11
Joined: Tue Dec 15, 2020 3:42 am

Re: Echo effect?

Tue Dec 15, 2020 3:47 pm

The Iterations parameter is linkable, so you can increase it over time with a modifier or with MIDI/OSC control.
Eric
Site Admin
 
Posts: 3005
Joined: Wed Apr 09, 2014 9:28 pm

Re: Echo effect?

Tue Dec 15, 2020 5:30 pm

Hi Eric,

Thanks for the reply! The Iterator module draws all the objects at the same time, doesn't it? I want to draw them all at different times.

I found a way to do it by copying the modules needed to display it into a separate scene for every iteration I want, and then put a Delay on the MIDI Note and MIDI Velocity links, increasing the delay for each scene. It works, but there's a problem in that I need more than one second of delay. One second gives me 4 iterations, but I want something like 16.

Thanks!
Matt
mgregory22
 
Posts: 11
Joined: Tue Dec 15, 2020 3:42 am

Re: Echo effect?

Tue Dec 15, 2020 5:33 pm

The Iterator module draws all the objects at the same time, doesn't it?

Not if you start the Iterations parameter from 1 and increase it slowly over time.
Eric
Site Admin
 
Posts: 3005
Joined: Wed Apr 09, 2014 9:28 pm

Re: Echo effect?

Tue Dec 15, 2020 7:13 pm

It still draws the previous ones, though. If iterations happens to be set at 9, it's still going to draw iterations 1 through 8 when it's drawing #9. I don't want that. I'm trying to make it so that the previous one could be gone when the next one appears. In other words the next iteration isn't dependent on the previous one still being present.

I'm trying to represent an echo, or a delay effect. The pulse could be very quick, but it still repeats 15 or however many times. New pulses can appear at any time. Each pulse should repeat 15 times.
mgregory22
 
Posts: 11
Joined: Tue Dec 15, 2020 3:42 am

Re: Echo effect?

Tue Dec 15, 2020 7:51 pm

You can easily make the previous ones disappear by setting their color to black or transparent after a certain amount of time.
Eric
Site Admin
 
Posts: 3005
Joined: Wed Apr 09, 2014 9:28 pm

Re: Echo effect?

Tue Dec 15, 2020 9:43 pm

I don't understand. How would I set that up in this project?
Attachments
Magic Iterator Scene.magic
(3.59 KiB) Downloaded 17 times
Magic Iterator Scene.jpg
Magic Iterator Scene.jpg (236.86 KiB) Viewed 666 times
mgregory22
 
Posts: 11
Joined: Tue Dec 15, 2020 3:42 am

Re: Echo effect?

Tue Dec 15, 2020 9:52 pm

Do you understand how the Ramp and/or Increase modifiers work?

I'd rather help you understand and figure out the solution that works for you, rather than me just giving you an answer that may or may not be the most appropriate for your project based on the limited information I know about what you're trying to achieve.
Eric
Site Admin
 
Posts: 3005
Joined: Wed Apr 09, 2014 9:28 pm

Re: Echo effect?

Tue Dec 15, 2020 9:56 pm

I'm trying to make it so that the previous one could be gone when the next one appears.


After reading this again, I'm not even sure you want to use the Iterator. The Iterator is usually best for doing things that don't disappear when the next iteration appears. I think you're making things overly complicated for yourself. Probably what you want is to just re-trigger the thing that's supposed to get echoed.
Eric
Site Admin
 
Posts: 3005
Joined: Wed Apr 09, 2014 9:28 pm

Re: Echo effect?

Tue Dec 15, 2020 9:57 pm

I don't know. I'm trying to use a ramp but it acts like a sawtooth oscillator. I need each cycle to trigger on a note on message and go through its full cycle. So I need multiple ramps happening at the same time. That's why I'm confused as to how this could possibly work.
mgregory22
 
Posts: 11
Joined: Tue Dec 15, 2020 3:42 am

Re: Echo effect?

Tue Dec 15, 2020 9:59 pm

Then I think you want an Increase modifier, which is like a Ramp but doesn't repeat. It just keeps going forever.
Eric
Site Admin
 
Posts: 3005
Joined: Wed Apr 09, 2014 9:28 pm

Re: Echo effect?

Tue Dec 15, 2020 10:03 pm

Eric wrote:
I'm trying to make it so that the previous one could be gone when the next one appears.


After reading this again, I'm not even sure you want to use the Iterator. The Iterator is usually best for doing things that don't disappear when the next iteration appears. I think you're making things overly complicated for yourself. Probably what you want is to just re-trigger the thing that's supposed to get echoed.


I don't think I can do that because I'm triggering things with midi notes and that information is gone after the first time.

If the Trails module had a time parameter that let you specify how long to wait before drawing the next element of the trail, then that would be pretty much what I want.
mgregory22
 
Posts: 11
Joined: Tue Dec 15, 2020 3:42 am

Re: Echo effect?

Wed Dec 16, 2020 10:30 am

Is this the kind of thing you're looking for?

[media]
Sadler
 
Posts: 780
Joined: Sat Aug 02, 2014 7:10 pm
Location: London, UK

Re: Echo effect?

Wed Dec 16, 2020 12:36 pm

Yeah, I think. I've made a video example of what I'm going for. It's a synth sound with an echo and I want to draw the echoes. But the echoes don't come in through MIDI, they are generated by DSP, so they just exist in the audio. I know Magic can do it because I've done it on a smaller scale, or at least it can almost do it. The delays here were done entirely in DaVinci Resolve. It was a real pain and the timing isn't entirely right.

[media]


Well, I have the Trails module on the original, so that's probably distracting from the main point of repeating, but the Trails is super cool and I couldn't resist :)

But there are two "Trails" effects going on here. The real one trailing to the left and the emulated one trailing up. I'm talking about the one trailing up.
mgregory22
 
Posts: 11
Joined: Tue Dec 15, 2020 3:42 am

Re: Echo effect?

Wed Dec 16, 2020 3:10 pm

OK then. Decide how many echoes you want, and create differentiated versions of each. In my example above, I changed the x-location and the transparency of each echo. Then use an Input selector to display each echo in turn - no need for extra delays. A Trails helps here to give each echo some persistence. In my example video I reset the Input selector in reaction to the audio. This doesn't work so well when there are many triggers close together but the Trails helps.

This is a powerful technique with loads of potential uses and it's not too tricky to set up.
Sadler
 
Posts: 780
Joined: Sat Aug 02, 2014 7:10 pm
Location: London, UK

Re: Echo effect?

Wed Dec 16, 2020 4:14 pm

A video is worth 1,000,000 words ;).

I wouldn't use an InputSelector -- I'd display all the echoes all at the same time (not one at a time) to get the indicated effect. Otherwise you'll lose the first echoes too quickly, even with Trails. For the delay, I'd use the Delay modifier. The problem is that the maximum delay is 1 second, and also you can't increment delays in an Iterator. But you could get 10 delays at .1 second intervals each if you set them all up manually.

Honestly though, if you have access to the MIDI source, then just add MIDI notes to create the delay there. Easiest solution by far. Or, in the same vein, load 10 different MIDI files, each with the same notes but delayed. Or you could even delay each one of them in Magic by editing their start times.
Eric
Site Admin
 
Posts: 3005
Joined: Wed Apr 09, 2014 9:28 pm

Re: Echo effect?

Wed Dec 16, 2020 4:45 pm

Also, just to clarify, there really isn't a good way to do this in the Trails module. In general, for any echo or delay effect, you need to duplicate the entire input (audio and/or video) in memory for a certain amount of time, and it's a huge memory usage and performance hit to record real-time input, obviously much more for video than audio. Maybe in a future update the Delay's maximum could be increased to 10 seconds, but it's not feasible to do that for Trails.
Eric
Site Admin
 
Posts: 3005
Joined: Wed Apr 09, 2014 9:28 pm

Re: Echo effect?

Thu Dec 17, 2020 2:51 am

Yeah, I kind of figured that was the problem. I don't really care about realtime performance, though. I just want to make videos for my music and post them online. Could there be a mode that allows a performance hit so you can do crazy stuff for rendering videos? Then when computers get fast enough, you can easily move those features over to the performance mode. Just think of the possibilities! :D

So you must be one of the developers of Magic? Did you also design it? This program is super, super cool! I played with the demo for like 5 minutes and I was sold. I've been looking for this exact program for years! I love the whole modular system idea. That video above is a piece of a song I wrote 30 years ago and I've been wanting to make a video for it ever since I recorded it. I won't rest until it happens!

I actually think both Trails and the Iterator could use a time parameter. So it's not feasible in Trails? Does Trails keep a bunch of copies of the screen in memory then? What about the Iterator? I can see how it might work by setting up a counter and jumping to the beginning of the scene a few times as it's drawing a single frame. A time parameter parameter seems feasible to me because it would just have a timer within itself that jumps to the beginning with the nth iteration number set whenever the time goes off. I think that would work? This is getting hard to visualize if it would work or not. It might not work for an echo, but it might be close enough to be cool. But wait, that's exactly what you suggested in the beginning, and I tried that and it didn't do what I wanted it to do. The problem is the Iterator module would have to replicate itself for every frame if it had a delay parameter greater than zero. That's because I don't want new stuff to be drawn with iteration number 2. I want the new stuff to start at 1 and move up the older it gets. I think that would be a reasonable amount of memory! That would only be 3 numbers per frame: iteration number, iteration offset and delay time. Of course, I have no idea what other bookkeeping needs to be done.

Anyway, I can get it done with Resolve, but I really want to be able to experiment with the parameters without having to take an hour or two per experiment.
mgregory22
 
Posts: 11
Joined: Tue Dec 15, 2020 3:42 am

Re: Echo effect?

Thu Dec 17, 2020 2:56 am

Sadler wrote:OK then. Decide how many echoes you want, and create differentiated versions of each. In my example above, I changed the x-location and the transparency of each echo. Then use an Input selector to display each echo in turn - no need for extra delays. A Trails helps here to give each echo some persistence. In my example video I reset the Input selector in reaction to the audio. This doesn't work so well when there are many triggers close together but the Trails helps.

This is a powerful technique with loads of potential uses and it's not too tricky to set up.


Yeah, I made a scene and copied it (because all the parameters are different for each scene), but I could only get 4 echoes before I ran out of delay time. The echoes in this song are 300ms. The song is already recorded and done. I mean I do have the MIDI, so I could probably copy the original so each echo is on a different channel. But then I still have to painstakingly create a scene for every echo and adjust the parameters of all of them if I want to change something. I need the ability to experiment easily haha
mgregory22
 
Posts: 11
Joined: Tue Dec 15, 2020 3:42 am

Re: Echo effect?

Thu Dec 17, 2020 3:32 pm

Could there be a mode that allows a performance hit so you can do crazy stuff for rendering videos? Then when computers get fast enough, you can easily move those features over to the performance mode. Just think of the possibilities!

Anything is possible, but Magic's to-do list is many hundreds of lines long.

So you must be one of the developers of Magic? Did you also design it?

Yes. ;)

Does Trails keep a bunch of copies of the screen in memory then?

No, only one copy: the current frame blended with the previous one. But if you want more of an echo or delay effect, then yes, you have to keep many previous frames, which is why it would be very inefficient.

A time parameter parameter seems feasible to me because it would just have a timer within itself that jumps to the beginning with the nth iteration number set whenever the time goes off. I think that would work? This is getting hard to visualize if it would work or not. It might not work for an echo, but it might be close enough to be cool. But wait, that's exactly what you suggested in the beginning, and I tried that and it didn't do what I wanted it to do. The problem is the Iterator module would have to replicate itself for every frame if it had a delay parameter greater than zero. That's because I don't want new stuff to be drawn with iteration number 2. I want the new stuff to start at 1 and move up the older it gets. I think that would be a reasonable amount of memory! That would only be 3 numbers per frame: iteration number, iteration offset and delay time. Of course, I have no idea what other bookkeeping needs to be done.

I think what you really want is a way to successively delay iterations, which is a good idea and I will put it on my list.
Eric
Site Admin
 
Posts: 3005
Joined: Wed Apr 09, 2014 9:28 pm

Re: Echo effect?

Thu Dec 17, 2020 7:26 pm

way to successively delay iterations, which is a good idea and I will put it on my list.


I think artnik already suggested this a while back in the original Iterator feature request thread...

search.php?keywords=transforms+and+delay&t=1795&sf=msgonly

+1 from me
Sadler
 
Posts: 780
Joined: Sat Aug 02, 2014 7:10 pm
Location: London, UK

Re: Echo effect?

Sat Dec 19, 2020 9:28 pm

Eric wrote:Anything is possible, but Magic's to-do list is many hundreds of lines long.

Yeah, I bet!

So you must be one of the developers of Magic? Did you also design it?

Yes. ;)

You did a great job! I feel like it's very intuitive. I'm very excited about this program! I've been looking for a program like this for years now.

Does Trails keep a bunch of copies of the screen in memory then?

No, only one copy: the current frame blended with the previous one. But if you want more of an echo or delay effect, then yes, you have to keep many previous frames, which is why it would be very inefficient.

There's got to be some trick! :)

I think what you really want is a way to successively delay iterations, which is a good idea and I will put it on my list.

I'm not sure what you mean by "successively". I don't know how Magic works, but I think if the Iterator were implemented with a for-loop, then I want to insert a sleep statement just before the end of the loop.

Thanks, though! You've given me plenty of stuff to play with in the meantime!
mgregory22
 
Posts: 11
Joined: Tue Dec 15, 2020 3:42 am

Re: Echo effect?

Sun Dec 20, 2020 12:45 am

Successively means i*d, where i is the iteration #, and d is the delay. So, for some number of iterations, the first iteration would have no delay (d*0), then the second would have d*1 delay, then d*2, and so on. If d is .1 seconds, then the specific delays would be 0, .1, .2, .3... etc. Overall, it would result in exactly what you asked for in your first post, which I didn’t understand at the time ;).
Eric
Site Admin
 
Posts: 3005
Joined: Wed Apr 09, 2014 9:28 pm

Re: Echo effect?

Sun Dec 20, 2020 3:15 pm

Haha sorry about that! I thought it was obvious and I thought for sure Magic could already do it and I was just missing it.

Yes, ok, the mathematical explanation makes more sense to me actually!
mgregory22
 
Posts: 11
Joined: Tue Dec 15, 2020 3:42 am

Return to General Discussion

© 2021 Color & Music, LLC • This web site is mobile-friendly