In this article, we will introduce the musical element, as well as look into Blender’s Jack integration and the use of the scene with Blender’s Video Sequence Editor to make your final credits roll. In here will be tips on automating the gain of a track using Ardour while using Blender to outline the points to start and stop animation.
In this article, we will not be making any changes to the Blender scene (although I will be adding to the credits article; I do want to make sure the music is also attributed).
The music we will use for this project is “Sunshine,” by Kevin McLeod. You can check out his music at www.incompetech.com; all the music there is licensed under the Creative Commons license, so they can safely be used on your own projects.
This article assumes you’ve read all the previous Blender, Jack, Ardour, and Ladish articles on this site, as we’ll be using all these tools and processes in order to accomplish this tutorial. If you need a roadmap, here are the articles you’ll probably need to read through to get to this point:
- Recording with Ardour (covers the Ardour 2.8 Interface)
- The Ladi Session Handler (Explains the use of Ladish)
- Simple Video Editing (Introduces the Video Sequence Editor)
- Creating a Title Sequence (Introduces Blender interface and 3D animation)
- Creating Rolling Credits Series
- Part 1: Credits Page Creation (Using Inkscape to create a scrollable region)
- Part 2: “Filming” the Credits Page (Using Blender’s 3D scene to “film” the scrollable region)
- Part 3: Adding a Video Backdrop (Turning the scrolling region transparent to allow a video backdrop)
- Part 4: Fading to Black (Using animation controls to affect settings as well as movement)
It’s important that you take the time to look these over; they all contain the details we will be glossing over in this article in order to finish the project. Once you are familiar with the other articles, go ahead and resume reading this one.
Starting the Programs
The first thing we need to do in this situation is start the Jack server. In order to connect Blender to Jack (or to run Ardour at all), we need to make sure that the server is operational, since it will be managing the central timeline. We will do so by first starting up a Ladish session management program, be it gladish or claudia, and create a new studio with a project room.
Next, we want to create a project; we’ll put it into the same folder that we’ve been using so far. In my case, I’ll just use the folder I’ve been using for article projects, but you can use one specific to the project you’re working on.
For Ardour, you can use the desired program in the application list…
… or you can try a more custom route (which you will need to do anyway if you are using gladish instead of claudia).
Now, I do have Ardour 3 on my system, but this works just as well for 2.8, and since that’s the current stable version, we’ll stick with that for the purposes of this tutorial.
Now, we want to start Blender. To do this, we will have to start it manually. Typing “blender” followed by the name of the saved project should work just fine. Remember, the project is stored in the same directory that we saved the Blender project, so just the filename is fine, we don’t need a path.
At this point, the Blender project we created in the last article should be on the screen.
Setting Up the Timelines
Now that the programs are active, we can make the desired connections. However, before we do, both programs need to be told that they need to work together with Jack.
The first thing you will see is that Blender does not have an entry in Jack. This is because under normal circumstances, Blender is not set to use Jack. This is fine, because the last thing we want is to have to start Jack to do visual work in Blender; we only want to use it when there is actual audio work to be done.
Since this is the case this time, we’ll go ahead and turn on Jack Support in Blender’s preferences (File->User Preferences->System).
Now, Jack is enabled, its connections should be enabled in the connection graph. However, there is one more step to perform. Close the User Preferences window (do not click “save as default”), and change the synchronization settings in the timeline to “AV-sync”.
With this setting, Blender is now timeline-synchronized with all other Jack-native applications.
Ardour, by default, will use its own internal synchronization source. We don’t want this; we want Ardour to base its time synchronization system to Jack’s transport. To do this, we need to change the positional sync source setting from “Internal”…
Additionally, we want to turn off the “Time Master” feature, because this will prevent us from changing the timeline in Blender. The reason for this is that when “time master” is turned on, Ardour assumes it has complete control over the Jack timeline, and any attempt to change the timeline from another program will be reverted by Ardour to match its own timeline. By disabling “time master,” any change in the timeline will tell Ardour to update its timeline, rather than allow Ardour to reset the Jack timeline.
Now, move the timeline in both programs a moment to calibrate, and what you should see is both Ardour’s and Blender’s timeline update in sync. We are now ready to begin.
Adding the Music Track in Ardour
The first step is to create tracks for the music to be inserted into. To do this, right-click on the grey area to the left of the timeline, and a box should appear.
We want the track to be the same type as the music we intend to import. Since the music we intend to import is a stereo file, we’ll set this track to stereo. Once the settings are satisfactory, click “Add,” and the new track will now be on the timeline.
It is important to note that if you intend to make multiple tracks, whether it’s for more advanced projects, or projects where sound effects and speech tracks will be used for multiple sounds or actors, you will probably want to create a track for each, and give it an identifying name. For this article, we will name this “Music” to indicate this is a track for the music we will use.
Making Jack Connections
Now that both Blender and Ardour have been set up to use Jack as an audio output, let’s go ahead and set up the connections. For this project, the room itself will simply have outputs going to the speakers/headphones.
As for inside the room, we don’t need anything too fancy; simply output the Music tracks in Ardour to the master bus, and output it to the playback, and connect Blender’s outs also to the playback. This will be slightly modified when we’re ready to make the final track and the final video, but for now, this will allow us to hear our progress as we work.
NOTE: If you are using headphones, adjust the master volume control down. The music will be at its loudest setting by default, and you do NOT want to damage your eardrums while working with this project. Once the music can play with you comfortably listening, then continue with the project. This is standard operating procedure for mixing and mastering professionals the world over.
Now, the music I’m going to use originated in an MP3 file. However, Ardour can only import lossless files, be they uncompressed, like WAV, or compressed, like FLAC. This is because when you are working on a project, the last thing you ever want to do is use a lossy working copy; this can cause the file to lose quality with every save.
So, to make our working copy, we need to convert the file from MP3 to Wav or FLAC format. I prefer FLAC, since it is compressed. Now, this should be trivial; if you have Audacity, you have all you need to convert the file.
In this case, we’ll open the original file in Audacity, and then export it (File -> Export…) to FLAC.
Importing the Music Into Ardour
Once exported, the resulting FLAC file can then be imported into Ardour (File -> Import…).
Note the selection on the bottom-left: “Add files: to region list”. This is important, because if you are importing multiple songs to use in your film project, you can usually use them one at a time, and eve if they run into one another, you might want to crossfade them. It’s much better to add the music into the project, but leave them off the track, and add them later as you progress through the project. This way, all that music will be added to the track in the exact order, and at the exact times as you wish without having to constantly move them around.
NOTE: In Ardour, audio clips are known as “regions,” so be aware of this when working in this program.
Now, when you click OK, note that the song will be added to the region list (on the right).
Inserting the Music Into its Track
Now, the song is converted and imported, so it’s time that it is inserted.
Go ahead and click on the left of it to make sure it is selected.
NOTE: Clicking on the region name itself will allow you to rename it; only clicking on the left of it will select it.
Now, we want to move the playhead to wherever we want the sound inserted, because when we insert the audio, it will be inserted at the exact position of the playhead. In this case, we simply want the playhead to be at the beginning of the project.
With the song selected and the playhead positioned, we will right click anywhere on the track’s timeline and select “”Insert Selected Region” to add the music to the track.
Once the music is inserted into Ardour, we’ll see the waveform appear for the entire song.
Notice that the song is much longer than the 28 seconds that is the length of the video. For an example, I’ve set the playhead to mark the last frame in the video, and placed the mouse to highlight the spot. You might want to click on the following image to get a closer view.
Because of this length difference, we will use the Blender keyframes along with Ardour in order to synchronize the fade of the music and the text’s emit value, so it looks like the clip is fading altogether, despite the fact that the music and video are in two different programs.
First Fading Keyframe
The first step is to use Blender’s timeline to jump to the keyframe marking the beginning of the text fade.
Once we’re there, you’ll notice that Ardour’s timeline also jumped to the same point, specifically, 00:00:26:22 (indicating that it jumped to 26 seconds, and 22/30 of a second). This is exactly where we want to start the animation.
At this point, we’ll zoom in to get a clearer view of the two seconds starting from the playhead.
Now, on the mouse mode selection at the top, you want to change the mouse to “Draw Gain Automation.”
Now, click on the track where the playhead is at and let the mouse button go. This will create an automation point on that track. When you do, a yellow gain reading will appear, as will a green line with a red square where you’re pointing. Dragging will move this square to the point where you want it to be; in this case, we want the point to be at -0.0dB as close to the playhead as possible. The best way to ensure this is at the proper location is to use the zoom feature, move the point, zoom in, move the point, and keep repeating the process until you can no longer zoom in.
The green line will indicate where the gain will be at that moment in time. Since we haven’t set an endpoint, it is currently a straight line, indicating that the gain is, was, and will continue to be -0.0dB, or it will remain at its default volume.
Final Fading Keyframe
Now, in Blender, jump to the final keyframe, which should be the end of the video.
Now you are at the final frame in both Blender and Ardour. We can now set the gain automation so it ends at “-inf” (in other words, silent). Simply click (and let go) at some point after the first point we made, then drag it down to the bottom edge of the track, and move the point to where you have the updated playback point. Once again, use zoom liberally to make sure the point is as exact as possible.
Now, you’ll notice that the green line will bend at the first keyframe point, and then bend again at the last keyframe point, going diagonal between the two. During this period, the audio gain is decreasing, which will reduce the volume during the transition between the two keypoints.
Getting Rid of the Rest
Now that the animation is complete, you’ll notice, after zooming out, that the green line will much more slowly return to the original volume following the second point.
We don’t want this. However, instead of playing with any more automation, we can just remove the rest of the music. To do so, we just need to return the mouse to “Select/Move Objects” mode (the default)…
…move the mouse to the final edge of the region, making sure it’s over the colored bottom edge…
…and drag it towards our ending keyframe point. This will essentially reduce the clip to just the part we want to use. Once again, use zoom for best results.
Now, to test the clip, move the playback point to the beginning and press “Play.” You should hear the music play while watching the Blender scene animate accordingly. If the music isn’t aligned, doesn’t play, or doesn’t fade, check to make sure you’ve followed all the steps.
If it works, then congratulations, you have the music track ready to be added to the video project!
Rendering the Music Track
Blender cannot import audio directly from Jack, so the first thing we will need to do is render the audio in Ardour, and then export it, so we can import it directly into Blender later.
Making a Final Track
The first thing we need to do is create a final track to mixdown the audio, meaning that the entire project will be channeled to that track and recorded, so that they are all combined into a single audio clip. This is just one clip, but the automation needs to be recorded, so this is what we’ll do.
To make the final track, just repeat the process of making the Music track, and give it a different name. In this case, we’ll use “Final.” (Sorry, I’m still not any more creative.) We also want to make sure this track is armed for recording, so make sure the “Record” button (the one with the red dot) is lit.
Creating a Monitoring Bus to Listen In With
Now, we want to change the master bus’s gain back to -0.0; we do not want the final recording’s gain to be affected in any way, and we don’t need to listen to the music render; we’ve already tested it. If you want to listen to the audio while it’s being rendered, you can create a separate monitoring bus and connect your audio to it. In fact, let’s do that now.
Making the Connections
Now, we will need to “re-wire” Ardour a little bit to get the rendering started.
We will remove all previous wiring by right-clicking the Ardour box and selecting “Disconnect” in order to clean out the old wiring. Then we’ll wire up the channels as follows (making sure we line up the two channels each: 1->1 and 2->2):
- Music/out -> master/in
- master/out -> Final/in
- master/out-> monitor/in
- monitor/out -> Playback (left/right)
The final layout should look something like this:
Now, we will change the volume of the monitoring track in Ardour to, once again, prevent damage to our hearing. In my case, I usually drop the volume by about 30 decibels, but the correct value depends on the maximum volume of your own equipment, and just how careful you are about preserving your hearing.
At this point, we’ve done everything we needed to, now we just get to rendering the audio.
Beginning the Final Render
To begin the final render, the first thing we need to do is move the playhead to the beginning of the project. This ensures that everything will be aligned to the video, from start to finish.
Then you want to arm the recording system in Ardour to actually have the armed tracks begin recording. Clicking on the master record button will cause it to flash while awaiting the playback button.
Then, press the playback button, and let the recording progress. Once Blender reaches the last frame of its session, it will stop the playback, reset the playback position, and restart the playback. This will cause Ardour to turn off the recording. In the end, you will have an audio track exactly as long as needed for your video project.
Adding the Final Render to the Video
Blender cannot automatically use the audio from Ardour as it is; it needs a finished audio file to import. So, the first thing we need to do is export the final render from Ardour.
Exporting the Final Render
Now that your audio is rendered, it’s time to export the track. Simply right-click on the region in the Final track, select the region name (Final-2.1 in this case), and select “Export.” At this point, an export dialog will appear asking for the final settings for your file.
At this point, choose where you want it exported (be default, it will export to the “export” subdirectory of the Ardour project folder inside the Ladish project folder), what you want it to be names (export.??? by default, depending on the filetype) and the file type details. For standards compliance, 16-bit, 44.1KHz Wav is fine for our needs.
Once everything’s set, just click “export.” The file will then be saved and ready for Blender.
At this point, we can go ahead and close Ardour. We don’t need to use the program any further for this project. We can also turn off AV-Sync in Blender and disable Jack support; they are no longer needed.
Setting Up the Video Sequence Editor
Now, in Blender, we want to move over to the Video Sequence Editor. To do this, we simply select “Video Editing” in the “Screen Layout” drop-down at the top of the window.
And now, we should be in the Blender Video Sequence Editor. Yours may look a little different; I changed my sections around a little to be more comfortable for my needs.
Adding the Animated Scene
Now, we want to add the 3D scene to this project, so let’s add the “Scene” scene strip now.
Then, we want to make sure the scene strip starts with the beginning frame.
Keep in mind this is for the strip. This does not affect the animation of the scene itself, just the view for the video sequence editor to look in on the scene, so you want to make sure that the frames for the scene strip matches the frames for the scene display and animation. In our case, the first frame is 0, and the length of the scene is 690 frames.
Adding the Music
And now we come to the part we’ve been waiting for; importing the music into the scene for the final production. Since the file has been saved already, we should be able to import it into Blender normally without problems.
Since we rendered the music to begin at the start of the project, it should be placed identical to the scene strip.
Rendering the Video
Project Render Settings
At this point, there is only one step left: the rendering of the video file. Before we do so, however, we want to make sure that all the video settings have been set, from resolution and framerate (which should already be correct) to the file encoding options.
The resolution and framerate have already been set properly, and the video encoding has already been set, so we will focus on audio encoding.
At the bottom of the “Encoding” section of the render properties, you can see the “Audio Codec” options. The options are pretty simple, just the format, bitrate, and volume are available. We’ll just use MP3 for the codec, and leave the other options alone.
Now, we’ll do the render, and the process is complete!
In this article, we’ve covered the process of creating a soundtrack for a video project using Blender and Ardour together, with Jack as the synchronization tool. Once the soundtrack was completed, we mixed it down, exported it to a single file, and then imported the soundtrack into Blender to result in a backing music track for the credit roll. We also automated the gain so that the music would fade away at the same time the credit text faded to black.