I recently purchased a keyboard which only had one output which is a MIDI output, but I do not have an Audio interface that has a USB input, so I was wondering if I can plug my keyboard directly from my keyboard into my computer which will then record on cubase.
You can purchase a MIDI-to-USB interface for around US $40. But understand that this will not send audio to your computer. MIDI is not audio. With this device you can play notes on your keyboard and then have the MIDI data trigger a software virtual instrument in your DAW, such as Cubase, and that will create audio which you can record.
Pretty much any USB MIDI interface will be able to connect your keyboard to the computer.
The only exception is this no-name model:
which can be found everywhere on the internet because it is very cheap. However, it's based on the QinHeng/WinChipHead CH345 chip, which has several horrible bugs: it garbles any incoming SysEx message, and replaces all messages using running status with note-on messages. So this interface would work only with the most basic keyboard that does not have any controllers.
I think Laurence is on the right track. It does sound like the OP has a MIDI keyboard with a USB output connector rather than the 5-pin DIN MIDI.
So, just plug it into any USB port on your computer, then bring up Cubase.
In Cubase open the MIDI Device Manager and click "Install Device." If your keyboard is not identified in the list of pre-configured MIDI devices, try selecting the generic GM or XG device options (your keyboard probably is a generic MIDI device at least even if it is not recognized by name by Cubase).
Cubase has good help files so I won't go further, other than to say it is possible that Cubase might prefer to be running before you plug in the keyboard, so you might try that if it doesn't show up in the above sequence.
looks like it would be exactly what you ask for: a cable with a USB plug at one end and a Midi plug at the other. It actually isn't a hoax but works very well either as Midi input or output (autodetected). I haven't dissected it to figure out which of the two plugs hides the electronics (mostly a USB midi chip by ploytec). The manufacturer is Terrasoniq. I've bought it for use with a Roland FR-1b which has a single Midi socket for either in- and output.
I know this site isn't for gear recommendations but I don't know any product that would be as close to what you asked for, at least in visuals (even if it does quite more). So that's basically the minimum size solution, even if the price tag is more than for a cable without electronics (something like €23). Excepting magic speaker cables and similar, of course.
Note that this is hardware Midi to USB. Your description sounds like your keyboard might offer Midi over USB (namely an actual USB type B plug that delivers the Midi data with the Midi-over-USB protocol). In which case you'll just need a standard USB cable to hook it up to your computer.
As you complain that your computer lacks an audio input with a USB connector, I suspect that your keyboard may not use the old 5-DIN MIDI connectors but rather has a USB output labelled "MIDI".
If this is so, connect it to a USB port on your computer. Cubase will recognise it as a MIDI control input - it will see what keys you are pressing - but will have to use its own resources to actually produce sound.
If I've misunderstood, please tell us WHAT make and model keyboard it is.
You can, but then you need software that can read the MIDI messages from the keyboard and turn them into actual sounds, such as:
To use them with your MIDI keyboard, just set your midi keyboard in the software. There are also websites that support MIDI input and output, such as this one. When the page loads, it throws you into one of the existing rooms, usually filled with people who are playing something, so make sure to click "Play Alone". Some keyboards such as my Ashton AK110 even have a MIDI input in the same USB port. (link)