Save a copy of your Sonar Project in a safe place; the copy will act as a backup and will remain in the standard .cwp format. Open your original project, and click on the "File" menu. Navigate to the "Export" option and click it, opening the dialog box. Click an appropriate disk location to select it, and select the format ".omf"
This format processes all your recorded audio and includes information such as effect settings and panning values.
Click the "File" menu again, and navigate to "Export" again. Choose the same export location, only this time, select "MIDI Format 1" from the drop-down box as the file format. This will export all channels of MIDI information as discrete channels, for import into Cubase. If you select "MIDI Format 0," all the MIDI channels will combine into a single file.
Open Cubase, click on the "File" menu, navigate to the "Import" option and click it to open the dialog. Navigate to the location in which you saved your .omf and MIDI Format 1 files. Highlight each, and click the "Import" button. After the processing has completed, you will have transplanted all your audio and MIDI files into Cubase.
As the MIDI instruments will not copy over with the files, you must associate a new instrument with your MIDI files. Select your first MIDI channel in the arrange view, and look for the "Input" box above the volume fader on the left side of the screen. It should display "No Input" or "None." Click the box; a drop-down menu will appear. Locate the MIDI instrument you were previously using in Sonar, or substitute a similar one if the previous one is not available. Repeat for all MIDI tracks.