Audacity changes pitch of recorded MIDI file.

Help for Audacity on GNU/Linux.
Forum rules
ImageThis forum is for Audacity on GNU/Linux.
Please state:
  • which version of Linux you are using,
  • the exact three-section version number of Audacity from Help menu > About Audacity,
  • whether you installed your distribution's release, PPA version, or compiled Audacity from source code.

Audacity 1.2.x and 1.3.x are obsolete and no longer supported. If you still have those versions, please upgrade (see https://www.audacityteam.org/download/).
The old forums for those versions are now closed, but you can still read the archives of the 1.2.x and 1.3.x forums.
Post Reply
Glassmenagerie
Posts: 4
Joined: Tue Dec 08, 2015 6:10 am
Operating System: Please select

Audacity changes pitch of recorded MIDI file.

Post by Glassmenagerie » Tue Dec 08, 2015 6:22 am

Greetings, - New member just now. I'm unable to find anything on the Internet about my problem. Nothing in a quick search on this forum. I'm using Ubuntu 14.04 with Audacity 2.0.5 installed with apt-get. The problem: I have a MIDI file that I play back using VLC. (VLC has the fluid synth plugin). Audacity records it ok and converts to mP3 just fine. But, when I play the mP3 file, the pitch is lower by about 1.5 semitones compared with the MIDI file pitch. Why is this happening ? And other than using "Effects/pitch change", to get the pitch back to where it should be, what can be done about this ? -

Regards,
RL

Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: Audacity changes pitch of recorded MIDI file.

Post by Gale Andrews » Tue Dec 08, 2015 10:18 am

Glassmenagerie wrote:Greetings, - New member just now. I'm unable to find anything on the Internet about my problem. Nothing in a quick search on this forum. I'm using Ubuntu 14.04 with Audacity 2.0.5 installed with apt-get. The problem: I have a MIDI file that I play back using VLC. (VLC has the fluid synth plugin). Audacity records it ok and converts to mP3 just fine. But, when I play the mP3 file, the pitch is lower by about 1.5 semitones compared with the MIDI file pitch. Why is this happening ? And other than using "Effects/pitch change", to get the pitch back to where it should be, what can be done about this ?
This is quite common on Linux if you record using pulse, which should handle resampling properly but sometimes doesn't. Please tell us exactly what recording input you are choosing in Audacity to record MIDI playback.

You "may" be able to prevent the problem happening by changing the project rate bottom left of Audacity. If it is set to 48000 Hz, change it to 44100 Hz, or if it is set to 44100 Hz, change it to 48000 Hz.

The better fix is to use Effect > Change Speed..., because I assume your recording is also too long. If the problem is a 44100 Hz/48000 Hz mismatch that you still receive even when changing the project rate, you can simply open the Audio Track Dropdown Menu and use "Set Rate" to change the rate to 48000 Hz.

If you regularly convert MIDI to audio, you could try Timidity:

Code: Select all

sudo apt-get install timidity

Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

steve
Site Admin
Posts: 80752
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Audacity changes pitch of recorded MIDI file.

Post by steve » Tue Dec 08, 2015 4:44 pm

As you have the fluid synth plugin for VLC, you don't need to "record" the MIDI file. VLC can render it directly to a WAV file (or any other supported format). Select "Convert/Save" from the "Media" menu.

Do you also have "fluid-soundfont-gm" installed? It is a high quality "soundfont" that many MIDI players (including VLC) can use. After installing, you would need to configure VLC to use it: "Tools > Preferences" -> Select "All" -> "Input/Codecs > Audio Codecs > Fluidsynth" -> Click the the "Browse" button and locate "FluidR3_GM.sf2". On my machine it is installed at:
/usr/share/sounds/sf2/FluidR3_GM.sf2
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Glassmenagerie
Posts: 4
Joined: Tue Dec 08, 2015 6:10 am
Operating System: Please select

Re: Audacity changes pitch of recorded MIDI file.

Post by Glassmenagerie » Tue Dec 15, 2015 6:32 pm

Just now getting back to this project. Thanks for the help ! Steve, I did what you suggested in VLC; convert/save. Didn't see WAV but the conversion to mP3 worked well. I'll check out what's possible in Audacity later when I can find the time. Yes, I have to use Pulse Audio with this PC. Otherwise I can't get stereo mix. In Linux/Ubuntu it's pavcontrol (like an audio server I guess).

Best Regards,
RL

steve
Site Admin
Posts: 80752
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Audacity changes pitch of recorded MIDI file.

Post by steve » Tue Dec 15, 2015 8:08 pm

Glassmenagerie wrote:Didn't see WAV
They call it "Audio - CD" (yes I think that is a bit confusing ;))
I presume what they mean is "CD quality" (16-bit / 44100 Hz).
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Post Reply