Transcriptions usually done by rev.com — get $10 off your first order!
- The Blackmagic ATEM Mini is a powerful piece of hardware made even more powerful once you start using macros. Macros are scripted commands. A series or a sequence of events that you pre-program or pre-record, and then play back with a click of a button. Learning to create those macros though, can certainly be a bit daunting. While it's easy enough to simply hit Record, execute a bunch of commands, stop recording and play that back, the real problem lies in when you make mistakes or when you want to modify your existing commands without having to re-record the whole thing. So I'm going to show you how to set up a relatively simple command that's actually a little bit more complex than it would seem like it needs to be, but this is just how it works. And in the process of doing this, you're going to learn a lot about the process of how to figure things out and then how to go in and edit those commands. Specifically, what I want to do is create a command to fade the music that I have coming into Microphone Input One out over time – to fade it down to zero over time. This is so that I can open my show with music playing that have it fade out along with a transition to fade to zero. Now, while it seems like this should be easy, and I got to be honest, there might actually be an easier way to do this than what I'm going to do, but that doesn't actually matter. The whole point of today's exercise is to learn how to learn to learn how to create these macros. And if this is the best way to do this specific thing, great. If not, well, somebody can tell me an easier way to do it, but you're still going to learn something along the way. So let's get started. This is the ATEM Software Control and we're looking at the Audio tab. I have music coming in on Microphone One, it's just an attached iPod playing some music, and we can see the music playing here. Incidentally, this over here is my dialogue; that's me speaking. What I want to have happen is over time, I want this to fade from its current default position of zero, down to minus, well minus infinity; down to pure silence. And then once it gets down to infinity, I'm going to turn that off so that the music can't come back through accidentally and then reset set this back up to its zero position. Which I can also just type in here, so that it's ready to go next time I want to switch to music. So if at some point during the show, I want to jump back to music, I have that ready to go, I can just turn it on and it's playing there. So again, I just want to have this fading down over time. The way that we record a macro is to start by going to the Macros menu or hitting Command-Shift-M, and then creating one by going to the Create tab, clicking the Plus button and calling it whatever you want. Let's just call this “fade” to start. Now that I'm recording, any action that I do on screen is going to be recorded as a macro. And so you might think, well, I'll just drag this down slowly, and it will record that as a macro, right. That's it, let's just start with that. I'll stop recording, go to the Run menu, make sure that Recall and Run is enabled, this allows you to just click on a button to run the script as opposed to having to select it and then click Play. So with Recall and Run selected, I will reset my music. Let's get it back to zero, the music is currently on and if I click on the Fade button, it just drops instantly to minus infinity. It doesn't actually fade out as I wanted it to. Okay, so what this tells me is that when I was clicking and dragging that wasn't actually being recorded, all that was recorded was the final position. So you might think, okay, well, I'll just record a series of steps, getting it down to that lowest point. That might work. To re-record it, I'll go back to the Create tab, select the one that I had previously done and as soon as I hit Record, I'll be able to overwrite that. But don't forget first to reset things where you want them. So let's just go ahead and set this back to zero, make sure that the music is on and we're ready to try again. So with Fade selected, I hit Record, and let's do one step at a time. So do a little bit and then a little bit again, a little bit more, a little bit more, a little bit more, a little bit more, and let's see if that worked. Stop recording, Run, Recall and Run, let's go and set this back up and click the button and it just pops back down. So because we did the same command, changing the volume and did it over and over again, it only really recorded the final state. It doesn't record each step in between. Which is good for a lot of different reasons but in this case, we actually wanted to record every step in between. So then I thought, well, what if I create a pause, if I change the levels, record a pause in there, change the levels and then record another pause. Would that do it? And that's actually what worked. So here's how we do that. Once again, I'll reset this back to zero and then I'll go up to the Create, select that and hit Record, and now after the first drop, you'll notice up here that there is a button that says Add Pause. And here I can add a pause of just a single frame. Click on Add Pause and it records that, and then I'll change this again, and I'll add another pause, add that in, change this again, add another pause, add that in, one more time add the pause and add that in. And that's enough to find out if this is going to work or not. Let's stop recording, reset the audio, go to Run, Recall and Run, and when I click this, watch the volume slider here. Boom, we saw it slide down. So that's the trick, that's what I need to do is have that pause in between there. So at this point, I could make this pretty easy and just record a few pauses, maybe have longer pauses in between, but I want this to be really, really smooth. So I want a series of steps in here that are evenly distributed as it lowers down over time. Well, first of all, let's see how many steps we're talking about. If I go back in here, and I drag this all the way down to the bottom, and you watch the number slider here, you'll see that it very quickly goes from well starting at zero to minus 10, 15, 20, 30 and then suddenly, we're ramping up to 40, minus 50, 70, 80, 90, all the way down to minus infinity. So that's kind of a lot of steps to record in there, I don't really want to record that many steps by hand. But I don't actually have to, 'cause now that I know what is being recorded, I just need to record a level and a pause. I can now go in and manually modify the code to have it do exactly what I wanted to do without having to record it all by hand. So the way you get to the code is to start by saving out the XML file. To do that, go to the File menu and choose Save or Save As and we'll do Save As here. And I've already created a folder on the desktop called ATEM Demo, we're just going to call this “fade” and hit Save. This next window lets you choose what you're going to save into the XML file. I actually don't need anything here except for the macros, so I'm going to click Select None, then re-enable macros and click Save. You can now use any text editor to edit the XML file. I like using BBEdit from the Mac App Store so that's what I'm going to open. There's my file and you can see that the date and time has automatically been appended to that, from when it was saved. This is super convenient because as you save multiple versions of this, you know that each file automatically has the time and date attached to it. Go ahead and click Open, and at first glance, this certainly might be a little bit confusing but since we're just focusing on the macros, it's actually not that complicated to see what's going on. What we're focusing on is this area here called the MacroPool. And here you can see the first macro, index zero, that's the first and only one we made. There's the name, the name that I gave it; “fade”, and then here are the commands. So let's just see exactly what is happening in here. The first step we see happening is the Fairlight-audio-mixer-input-source-fader-gain so that's the one that we're talking about here. input external mic, that's the mic we're doing, source ID, you don't need to worry about that, but then here's the magic, gain is set to minus 0.8. Okay, so that was the first command that lowered the volume minus 0.8. Seems not exactly very accurate, so let's just go in here and change that to minus one, great. Next is the macro sleep, there's the sleep command it slept for one frame. Then what does it do next? Well, it changed the gain to minus something else. So let's just say minus two in here. There's the next sleep, and so on and so on. So at this point, instead of going in and re-recording this with every step in there, I'm just going to copy and paste this text and change the numbers out, great. So we're starting off with the gain to minus two and don't forget to grab your sleep in there, I'll copy that, and let's just get rid of these ones that I had recorded earlier. I'll paste over that and in fact, I'm just going to paste a whole bunch of these. And then I'll go in and start changing these by hand. Let's do minus three, minus four, five, six, seven, eight, nine, 10. Now at this point, I think I can start accelerating things a little bit. I'm going to go ahead and start jumping by tens here to get to the very end. Minus 20, minus 30, minus 40 looks like I need some more, 50, 60, 70, 80, 90 and how far do I actually have to go? You know, I don't really know what the final lowest number is. Let's find out. Let's go back over to here, and if I drag this down, you'll see that the lowest setting is minus infinity. I don't know if I can write minus infinity in there. So just above that is minus 99.2. Is that really the lowest? Unfortunately, if I click in here, and I just up or down arrow, it doesn't really show me. So maybe I want to know exactly what that final command is, what that final lowest level is. Well, how am I going to do that? Well that's easy, I'll just record another macro dragging the slider all the way down to the bottom. Okay, let's do that. Let's go to Create, we're going to create a new one in here, We're going to call this infinity, hit Record, and just drag that slider all the way down to the bottom. That's it, stop recording in there and then let's save this. I'm going to do a Save As to make sure that I know exactly what I'm looking for here, we'll call this infinity, Save that, again, I don't need anything other than the macros, hit Save and we're done. Back over to BBEdit, open up that infinity and there it is infinity and the magic number is minus 120. Interesting, so it's not minus 100, it's minus 120. Okay, I just want to make sure that I get to absolute zero in here. So I'm going to go ahead and use that number. Go back over to here, it looks like I need a couple more in there, I think it's safe to just add in the minus 120 at the very end, so let's go in here and add one more line of code at the bottom, and we're going to type in that minus 120.41. Okay, so that's everything that it should need to work. Let's go and save this and test it out. Now a little tip for saving your macros. I can just hit Command-S right now to save this and load it back up. But what I like to do when I'm working on the complex scripts is to actually do a Save As, and then change the timing on it to match the current time or at least close to the actual current time that I'm saving it. It's just an easier way for me to keep track of what I'm doing. So I'm going to go in here and hit Command-Shift-S to Save As. And if I look at the current time, it is 20:03, so I'm going to go ahead and change that to 20-03 and then make sure you put the .XML at the end, if you've lost that. Hit Save, hide that, back over to the ATEM software control, from the File menu, choose Restore, and there's the file that I just saved. Restore that. If I had saved out everything, it allow me to restore all the different pieces that I need. But macros is all that's in here and that's all that I need. Hit Restore, and while visually you may not see anything happen, it has just overwritten the commands over here in the macros. So fade is what we're testing. Let's go ahead and set our volume up, go to Run, click on Fade and it works. Let's do it again, drag that back up to the top, Recall and Run, hit Fade, and you can see there that it is totally working. The speed of it was a little bit weird, it kind of went at one speed and then it really accelerated. So maybe what I'll do is modify this script so that it goes to minus 20, one step at a time and then gets faster. Let's do that. Back over to BBEdit, the script is still open in here and what I want to do is just fill in the gaps between 10 and 20 here. So easy enough to do, let's just take these lines of code in there, and paste some more in. So that'll be 11, 12, 13, 14, 15, 16, 17, 18, 19 that should do it. And let's just change these, at 11, 12, 13, 14, 15, 16, 17, 18, 19 and then 20, perfect. I'm just going to hit Command-S right now to save over the one that I had made before. Go back to the ATEM Software Control, Command-R to restore, grab that file, hit Restore and let's give it a try. Drag it back up under Run, hit Fade nice, I like that it goes for a consistent speed then accelerates at the end. I think that's pretty good. Okay, I said the next step I wanted to do is have it turned off that audio channel. And then restore it back to its default zero setting. So let's record those as a whole new macro, go and find those commands and copy and paste those into the existing fade command. Under Create, I'll click Plus, we'll just call this “off then zero”. And basically what we're doing is having this go all the way down, then I'm going to turn off the audio, and then I'm going to have this reset back to zero. Let's just go ahead and type in zero here so we know goes back to the exact right spot. And that's it, stop recording that, I'll do File, Save As, I want to use that fade name and let's just delete the date and timestamp so it adds itself, hit Save, select None, hit Macros and Save. And if you're wondering why I'm not using the straight up, just Save command; when you hit Save, it saves everything, all of those other check boxes that I had deselected, will all get saved automatically. Which means you have a lot more data to sift through, so it can be easier to just save exactly the parts that you want. Let's go back to the BBEdit, open up that new XML file, there it is, open that and we're looking for the one called “off then zero”. So here's the two commands, it turns the mixer off, and then sets the gain to zero. So I'll just hit Command C to copy those, go back to the one that I've been working with, and let's put these at the very end of that. Paste that in, and there we go, it gets to minus 120, turns off and then resets to zero. I'm going to do is Save As on this just in case the changes mess something up which is always a good idea. So I'll manually rename this, it is now 20-09, so let's save that. Again, make sure that the .XML is not lost off of there and hit Save. Back over here, I'm ready to restore the script. Command R to restore, there's one that I just saved, restore that and let's see what we've got. Go back to Run, my audio is turned up, let's turn it on as if the music was playing, I hit Fade, it goes down turns off, and the audio resets to zero. And that's it. So it totally works, it's… again, it can be a bit cumbersome at times, but once you understand the fundamentals, record your actions one by one, record new actions as whole new scripts that you can then just delete later. Whole new macros, you can just throw away, but you're doing it just to figure out what those pieces are. I've been using these for years and I still do this all the time. I don't remember how to write any of this code from scratch. I always go in and save a new macro, create a new macro for whatever command that it is I'm trying to find, and then just save the XML and copy and paste that script back in. So now you know how to create a relatively complex macro that fades your audio levels from zero down to minus infinity, turns off the audio channel and then resets back to zero so that you're ready to play that music at any time by just turning that mic channel back on. Writing macros, creating macros, again can be complicated, but it's also incredibly powerful. If you like learning tips like this, let me know in the comments and I can certainly create more videos around the macros that I'm creating for myself for use with the ATEM Mini. I hope you enjoyed that, and I hope you learned something it's definitely a little bit more advanced use of the ATEM mini but it really does go to show just how powerful this device is. Be sure to subscribe, hit the Bell, all that good stuff and we'll see you at the next video.
Comments from YouTube