Syncing MIDI file recorded on external instrument to audio file in Cubase

Hi. Can anyone help, please?
I am trying to sync an imported externally-recorded MIDI file with an audio file in Cubase Pro 12 (running on Windows 11).
In order:

  1. I have imported an audio track and tempo-corrected it to 110 bpm. All fine so far.
  2. I then played it back in monitors, while recording a MIDI part on my Yamaha SX900 keyboard (because I wanted the electric piano sound I can only get on the SX900). It was obviously played in time with the audio track. I set the SX900 tempo to 110, just in case that would help, even though I was playing free-form with no rhythm tracks; so I guess it hardly influenced where the notes were.
  3. I then imported the MIDI file from the SX900 into Cubase and aligned the start point of the recording with a known and pre-planned point in the audio file. BUT the MIDI file is constantly out of time with the steady 110 bpm of the audio file and seems to be getting more out-of-time as the recording goes on.

If I increase or decrease the tempo in the transport bar, both the audio and MIDI files speed up or slow down as expected, but they remain out of sync with each other.

I’m certainly no Rick Wakeman, but there’s no way I can go through the MIDI file shifting the position of each note to try to reproduce what I played! I can only get the subtleties of the rhythms by actually playing it - mind you you, it will still need a lot correcting because of my low skill level (hence the need to keep it in MIDI), but the essence of the MIDI recording is right; and I really would like to use the Yamaha voice.

I can’t believe syncing audio and MIDI files isn’t an easy thing to do in Cubase - once you know what to do. Many thanks if you can help.

I’ll start with the elephant in the room: Why do you record your midi performance in the SX900 and then transfer it as a file to Cubase instead of directly recording the midi data in Cubase while playing?

To troubleshoot your setup would mean to go through the SX900 settings in order to make sure the midi file was indeed recorded in 110bpm. Personally I don’t want to do that.

Can you try to record midi directly in Cubase?

1 Like

Can you do it by hooking up a midi cable and activating external synchronization in Cubase? This will synchronise your keyboard to Cubase.

I think by default if you ‘import’ a MIDI file into an existing project it will ignore the tempo track of the imported file, and stick with whatever tempo track already exists in the project.

There might be various settings in Cubase to configure what Cubase does with tempo and time signature tracks when importing MIDI files.

So give this a try…

Import the midi file into a fresh NEW Cubase project. Check the tempo track. Compare it with the tempo track of your main project that has audio tracks.

Are the two tempo tracks identical?

If the tempo maps are identical (a single BPM setting and both are the same), you can put the MIDI only version away. Go back to your main project. Be sure there are not any quantization inserts active on the MIDI track(s). Disable your snap to grid/cursor options. Change your MIDI track(s) time base to linear. At that point you should be able to ‘jog/slide’ the part(s) back/forward on the timeline to get it to match up to the sound you heard when you were playing along in real time and making the sequence (assuming your SX900 didn’t quantize anything along the way while producing the midi file).

If the two tempo tracks are different (the Main project vs importing the midi file to a FRESH/EMPTY project)…

First I’d try this: In the MIDI ONLY project that you’ve imported change the MIDI track(s) time base to linear. Copy and paste the tracks into the main project with audio. Make sure the tracks are still in linear time base mode and nudge the part(s) on the MIDI track(s) so the first note’s start time is where you want it. Use time-stretch/shrink on the MIDI part(s) so the last note ends where it should. Hopefully that’d get the rest of the sequence matching up nicely as well.

Are you able to match it up now? If so, once it’s in place, you could experiment with going back to the music mode time base for the MIDI tracks and do any minor shifts/edits/quantization/groove templates/whatever.

If the pasted MIDI/Instrument track(s) are obviously too long or short right after importing or copy/pasting, then you might try duplicating the tempo track from the main project in the MIDI only version first while the tracks are still in tempo mode, then swap to linear mode, copy from MIDI only project, and paste to main-full project. With luck a little ‘nudging’ while the track(s) are in time mode is enough to align the sequence with your audio. If the sequence turns out longer or shorter than your audio, again try some time stretching/shrinking.

Still not there?
Experiment some more. There should be a way!

The point of the exercises above is to get a feel for the differences in time-base tracks vs music or tempo-base tracks, and to practice placing parts, and using the various Object sizing features (Normal, Sizing moves contents, and Sizing applies time stretch).

In some cases it might also be helpful to brush up on the process of freezing MIDI modifiers, and Merge MIDI in loop. Merging to a new track is a brute force way of ‘freezing’ the actual output of a given MIDI track to a new track [or over-writing the current one]. In other words…you get a hard write of whatever stuff you might have track inserts doing to MIDI events, as well as any channel/routing information).

This is something different and will not help Rowland.

Johnny_Moneto, Dunk79, Brian_Roland,

Thanks, guys. I really appreciate the suggestions - and the detail of the replies. I will work through these.

Just to explain, Johnny_Moneto, why I don’t record my MIDI performance in the SX900 directly into Cubase while playing - I don’t know how to do that. In fact, Yamaha technical support told me the only way to carry an SX900 voice across from the keyboard to Cubase is by using a USB memory stick - or, at least you can transfer the MIDI details that contain the voice code so the MIDI track will “play” the keyboard and, importantly, allow editing of the MIDI data within Cubase. It’s cumbersome, but it works.

If I didn’t make mistakes when playing, I could just do the whole thing in audio and life would be so much simpler!

I had thought of playing the track straight into Cubase using any voice on, say, Halion 6; but I would then need to substitute the Halion voice with the Yamaha SX900 voice (which I could, in theory, do using the MIDI List Editor). But I wasn’t sure it would work and then thought, surely, there must be an easier way!

Yamaha said they purposely wanted to keep the SX900 voices within the keyboard (which is primarily aimed at live, not studio, performance use) and that is why they don’t offer the voices as a VST plug-in. So, I realise that I am trying to buck the trend here!

Thanks again for your help.


Recording external synthesizers is what Cubase was originally designed to do back in the 80’s.

The procedure is dead simple.

  1. Create a new MIDI track.
  2. In the Inspector to the left of your track list in the Project Window, set both MIDI input and output to your SX900 (if it’s connected via USB) or the MIDI interface it is connected to (if it’s connected using a 5pin DIN cable).
  3. Activate Record Enable image on the newly created MIDI track
  4. Start recording!

If you have any issues, let us know and we should be able to quickly guide you.

There might be some nifty things built into the PSR that won’t be transmitted but basic midi like playing the keyboard and using modulation and pitch bend are surely transmitted via the MIDI connection.

In your Data List manual you can find the MIDI implementation chart on page 122:

Try to use @mlib 's guide to get you going.

EDIT: After having read the previous pages of the Data List manual it seems that also the nifty things can be transmitted via MIDI - albeit in form of SysEx data.

1 Like

Thanks Johnny_Moneto. That’s super-helpful!

Funnily enough, when I transfer data across from the SX900 to Cubase via USB stick- and that be a multi-part recording with rhythm and arranger tracks, the imported SysEx Data track is always empty (as is the imported Chord data track), which surprised me.

I think I am going to be able to record MIDI data into a new MIDI track in Cubase straight from the SX900 and then play with/allocate SX900 voices, etc. using the List Editor. That will remove any file tempo timing problems in the future. And the MIDI implementation chart you attached will give useful pointers for that.

Thanks again,


That sounds cumbersome. I’m confident there’s a much more user friendly way of doing that than to use the List Editor.
What exactly do you mean by “allocate SX900 voices”? If each “voice” has its own MIDI channel, then I would just create one MIDI Track for each of them. But maybe there’s something I’m missing.

You can enter the initial bank and program events that call up sounds remotely in the track inspector (close to where you assign the MIDI port and channel for a track). Banks are combined in 14bits. If your SX900 manual has it in cc0, cc30 format the formula to convert that to work in the Cubase track inspector is: MSB * 128 + LSB

Example: Calling up a general MIDI Grand Piano in many instruments would be: MSB (cc0) 121, LSB (cc30) 0. This sets the bank.

Then program change 0 calls up the first instrument in the bank.

14bit variant: 121 * 128 + 0 = 15488

So enter 15488 in the bank field, and 0 on the program field.

Oh…if it wont take zero as a program number then simply add one to program changes if your manual lists them starting at 0. Yamaha and Steinberg likes to number 1 - 128 instead of 0 - 127. Technically it transmits minus 1.

Hi, mlindeb.

I just meant that when I start recording the MIDI track using the SX900, that MIDI track needs to know which SX900 voice to play. As long as there’s time after starting to record, before you need to start playing, you can just select the voice on the SX900 (you have to actually select it once Cubase is in record - not before - or it doesn’t register the voice bank data.

Failing that, you can just go into the List Editor and add the MSB, LSB, etc. controller data when the MIDI note data has been recorded. And, by the same token, you can easily change the voice after the event as long as you know the bank code for each voice (which the SX900 helpfully displays).

I should say that I have only just mastered how to record one SX900 track at a time; I will now experiment with trying to record several at once with, as you say, each on its own track. But the same problem will presumably apply - you have to somehow get Cubase to know, for each track, which voice on the SX900 it is supposed to be playing.


Thank you, Brian, but I’m afraid you’ve rather lost me there! But I do see what you’re saying about setting instrument voices in the bank. I think I’ve got the hang of that.

Thanks again,