I have guitar connected to computer via Scarlett 2i2 audio interface. I was wondering if is possible to write notes directly to piano roll on FL Studio 12 while playing guitar. I would like to try that if is possible, instead of buying MIDI keyboard.
Converting digital audio to Midi notes requires a conversion tool. Some DAW's will have this built in, but otherwise a plugin can be sourced to do a similar job. This will allow musical notes played on an acoustic instrument to be converted into MIDI notes which can then be rendered by a synthesiser or other electronic instrument.
Examples of this technology are "WIDI Recognition System" (https://www.widisoft.com/english/mp3-midi-products.html)
When i knew nothing about anything i used an mp3-to-midi converter, and its output terrified me, because it makes every single sine harmonic into a midi note if it matches a note's frequency. Many harmonics don't align with any of the pitches in our 12-tone scale, so the program doesn't put them in, but a lot still make it through, resulting in a mess.
If you don't want to buy a specialized pedal you can try software audio-to-midi conversion, but only if you're willing to spend a while cleaning up both the recording and the output midi file. Noise cancellation in the original recording should do quite a bit, but it still won't reduce the guitar's timbre to a perfect sine.