Im really new to all the midi stuff but i created my first (midi) song
and i cant find a way to export it as wav or mp3 file.
Im using Sonar and i listen the midi with my Casio ctk-800 keyboard.
So i have several midi tracks using keyboard output (MK USB OUT).

I wonder how can i record that so it becomes midi or mp3. Im using Realtek AC97 soundcard and i didnt find a way to hear the music with my stereo speakers
So i hope that there are experts here who can explain to me how do i conver my song to mp3

Re: midi - audio

Tutorial Number 8 at the beginning of the manual or on line help files explains it all.

Tutorial 8—Using Soft SynthsA software synthesizer is a software program that produces various sounds through your audiointerface when the soft synth program receives MIDI data from a MIDI controller or sequencerprogram. SONAR supports all major varieties of software synthesizers, including DXi, ReWire, and VSTInstruments (you can use VST instruments by running SONAR’s included VST Configuration Wizard toconfigure the VST instruments). SONAR has a Synth Rack view to make inserting a soft synth a onestepprocess.Cakewalk TTS-1 is a great example of a soft synth, so let’s use it for our tutorial. Because this soft synthsupports the mult-output format, it has multiple outputs (4), and you can record the movement of someof its controls as automation. You probably installed Cakewalk TTS-1 when you installed SONAR. Tomake sure, open a project that has at least one audio track, right-click the FX field of an audio track toopen the plug-in popup menu, and look under Soft Synths. You should see Cakewalk TTS-1 listed. Ifyou don’t, insert your SONAR CD into your CD drive, install the software synthesizers includingCakewalk TTS-1 to your hard drive, and restart SONAR.This tutorial covers the following:• Inserting Cakewalk TTS-1 into a project• Playing MIDI tracks through a soft synth• Converting soft synth tracks to audioInserting Cakewalk TTS-1 into a ProjectInserting a soft synth into a project means that the name of the soft synth appears in the dropdownmenus of MIDI track Output fields and audio track Input fields.To Insert Cakewalk TTS-1 into a Project1. Open a MIDI project—for this tutorial use TUTORIAL8.CWP.2. Use the Insert-Soft Synths command and click Cakewalk TTS-1 on the popup menu.The Insert Soft Synth Options dialog appears.3. In the Create These Tracks fields, deselect MIDI Source, because we want to patch some preexistingtracks into Cakewalk TTS-1.4. Select All Synth Audio Outputs because we’re going to use a different synth track for each ofCakewalk TTS-1’s 4 outputs. The new synth tracks have Cakewalk TTS-1 already patched to themas audio inputs.5. In the Open These Windows fields, select both Synth Property Page and Synth Rack view. Thesetwo options open Cakewalk TTS-1’s property page (interface), and the Synth Rack view,respectively.6. Click OK.SONAR inserts 4 synth tracks that each have one of Cakewalk TTS-1’s outputs as an input (notice thatthese tracks have the soft synth label next to their track numbers), opens the Synth Rack view withCakewalk TTS-1 displayed in the first row, and opens Cakewalk TTS-1’s property page.Notice that the Output field of the MIDI track is labeled Cakewalk TTS-1 1. The “1” means that this isthe first instance of Cakewalk TTS-1 that you have inserted into this project. If you use the Insert-SoftSynths command to insert another instance or copy of Cakewalk TTS-1 into this project, its label willbe Cakewalk TTS-1 2, and it will function as a totally separate synth. MIDI data in tracks that useCakewalk TTS-1 1 as an output will have no effect on MIDI tracks that have Cakewalk TTS-1 2 as anoutput.Playing MIDI Tracks through a Soft SynthNow that you have verified that Cakewalk TTS-1 is installed, let’s try some of its sounds on some prerecordedMIDI data.To Play MIDI Tracks through Cakewalk TTS-11. Drag the Cakewalk TTS-1 property page out of the way for now, and in the first MIDI track (Guitar1), click the dropdown arrow in the track’s Output field, and choose Cakewalk TTS-1 as an output.Notice that when you choose Cakewalk TTS-1 as a track’s output, the patch for that track’s MIDIchannel in Cakewalk TTS-1 interface changes to the same one that the track displays.2. Set the Output fields in all the other MIDI tracks to Cakewalk TTS-1. Note: When the cursor is inthe Output field of one track, pressing the Up or Down arrow key moves the cursor to the samefield in the next track.3. Let’s insert a patch change in track 1: click the track number of the Guitar 1 track to select it, andmove the Now time to the Verse 1 marker by clicking the Next Marker button once (the NextMarker button is in the Markers toolbar; if you don’t see it, use the View-Toolbars command andcheck Markers).4. Use the Insert-Patch/Bank Change command to open the Bank/Patch Change dialog box.5. In the Bank field, select 15488-Preset Normal 0, and in the Patch field, select Overdrive Gt, andclick OK.Now you’ve routed your MIDI tracks through Cakewalk TTS-1, and inserted a patch change. Rewindthe project and play it to hear the project through Cakewalk TTS-1.Converting Your Soft Synth Tracks to AudioOnce your project sounds the way you want it, it’s extremely easy to convert your soft synth MIDI tracksto either new audio tracks, or Wave, MP3, or other exportable files.To Convert Your Soft Synth Tracks to New Audio Tracks1. Mute all tracks that you don’t want to convert; make sure you don’t mute the synth track(s) thatthe soft synth is patched into, or the MIDI track(s) that you are using as a source.2. Let’s set our MIDI tracks to use different outputs on the TTS-1: in the TTS-1 interface, click theSystem button to open the System Settings panel, and click the Option button in System Settingsto open the Options dialog.3. On the Output Assign tab look in the Tone Name column, and click one of the four Output buttonsnext to each name in the Tone Name column. This assigns your individual MIDI instruments todifferent audio outputs from the TTS-1. Click the Close button.4. Use the Edit-Bounce to Track(s) command.The Bounce to Track(s) dialog box appears.5. In the Source Category field, choose Tracks.6. In the Channel Format field, choose mono if you want mono tracks, and stereo if you want stereotracks.7. In the Source/Buses field, make sure all 4 outputs are selected. This will create a separate audiotrack for each selected output. If you wanted to combine your MIDI tracks into just one audiotracks, send all the MIDI tracks through just one output (Step 3), and select only that output in theSource/Buses field.8. In the Mix Enables field, make sure all choices are selected.9. Click OK.SONAR creates new audio tracks from the outputs you selected. When you’re through converting, don’tforget to mute your MIDI tracks so you won’t hear them and the new audio track(s) at the same time.To Export Your Soft Synth Tracks as Wave, MP3, or Other Type Files1. Mute all tracks that you don’t want to export; make sure you don’t mute the synth track(s) that thesoft synth is patched into, or the MIDI track(s) that you are using as a source.2. Use the File-Export-Audio command.The Export Audio dialog box appears.3. In the Look in field, choose the location where you want the exported file to be.4. Type a file name in the File name field.5. In the Files of Type field, choose the kind or file you want to create.6. In the Source Category field, choose Tracks if you want to create separate files for each MIDI track,or choose Entire Mix if you want to create one file.7. Choose a channel format, sample rate, and bit depth that are appropriate for the new file(s) youare creating. Don’t choose Split Mono in the Channel Format field if you want to export a singlefile.8. In the Source/Buses field, select all outputs if you chose Tracks in Step 6, or accept the default ifyou chose Entire Mix.9. In the Mix Enables field, make sure all choices are selected.10. Click OK.SONAR creates a new audio file or files of the type you specified. Find the file(s) in the folder youspecified, and double-click each file to listen to it.

You will have to make a connection between the line out of the keyboard and the line in of your soundcard.

Then it is simply a matter of inserting an audio track, ensure the input is set to the line in of your soundcard, arm the track and press record. The midi tracks should play and the audio track should record.

If you want to have seperate audio tracks for each midi track then you will need to repeat the process but with each midi track being solo'd and recorded to a different audio track.