You are here

MIDI recording problems with Qtractor - SOLVED

(Go to last post to see explanation of the problem)

I have a question about recording with Qtractor. I'm new to midi recording and linux audio so my questions may be a bit naive.

I'd like to record a midi piano track and possibly add additional tracks. I made some attempts which have partially worked, but with some significant problems.

Here is my setup:
AVLinux 4.2 + Qtractor 0.4.8 + Pianoteq 3.5
Jack is running with a latency of 8.71 ms
Midi keyboard to both Pianoteq and Qtractor (alsa midi connection)
Qtractor midi out is connected to Pianoteq (used to play track from Qtractor)

I've recorded into a Qtractor track which partially worked. I get the notes in Qtractor but they have a very short duration so that playback is stunted and distorted. This a major problem - this sort of recording is not usable.

I have also tried recording a midi track directly with Pianoteq (which has a recording feature) and importing to Qtractor. This gives perfect playback from Qtractor - notes are proper length. However this method seems to have some short comings:

o Notes do not seem to line up to Qtractor bars despite picking the same BPM (of course I could have a problem with timing, but I did record with a metronome in Pianoteq and set the BPM the same in Qtractor and Pianoteq). But maybe I can just slide the whole track to line up with the bars. This is a issue if I want to add other tracks.

o Pianoteq produces 2 midi tracks for channels 1 & 2. Its difficult to edit both tracks in parallel, but maybe I do not really need 2 tracks and can just discard the other.

o If I want to add more material I need to record in Pianoteq and then import into Qtractor since I cannot seem to record directly into Qtractor without problems.

I'd prefer to record directly into Qtractor rather than import from Pianoteq. But how do I get it to work properly? Perhaps when recording I should use a plugin rather than an external program (i..e. Pianoteq)? I could still play the recording back through Pianoteq for best results.

Any suggestions would be welcome. Thank you.

Forums: 
rncbc's picture

i'm surely in need of some evidence of those recordings. any midi file you can spare ?

ps. you can attach files if you edit the top post.

Thanks for your help. I've made a tgz file of a Qtractor session with recorded midi file and with several recordings of the midi file, via linuxsynth, linuxsampler, and Pianoteq at this location:
http://www-personal.umich.edu/~diehl/miditest.tgz (too big to upload here)

I've also included the midi file and wave file made directly by Pianoteq of the same recording. That is, I recorded simultaneously with Qtractor and Pianoteq.

The recordings made of the Qtractor midi file with linuxsynth/sampler play back nromally (except each has a few
glitches, which is another story - probably I should record with a higher latency)

The recording made with Qtractor/Pianoteq is stuttered and stacatto-like.

However, the recording made directly with Pianoteq plays correctly.

I've decided that perhaps Pianoteq and Qtractor speak different dialects of midi. You can load/play back a Pianoteq midi file in Qtractor and it works fine. However, playing a Qtractor midi file into Pianoteq (or loading a Qtractor piano file directly into Pianoteq) results in the stuttered play back in Pianoteq.

By the way, you can download a free trial version of Pianoteq which functions normally except for a few missing notes, and a 20 minute timeout.

I'm using a 22 year old Roland RD300s keyboard that sends an "all notes off" message when all notes have been released. (I can monitor the midi stream in Pianoteq). I learned from another post I made on the LinuxMusician forum concerning problems I had with Linuxsampler and sustain pedals, that in current midi practice, that the "all notes off" is an emergency signal and that normally only individual note no/off messages should be sent.

I made a test recording in Qtractor using VMPK as the keyboard (it does not send "all notes off" signals) and the playback to Pianoteq was fine. What does not quite make sense is why Pianoteq plays correctly when playing directly from Roland keyboard but does not when playing from a recorded midi from Qtractor. However, whatever it is the VMPK test suggests that the problem is the "all notes off" messages.

It also turns out that the "all notes off" messages were preventing the sustain pedal from working in linuxsampler which was the subject of my LinuxMusicians post.

... later that same day ...
I did some googling and found a program called mididing (http://das.nasophon.de/mididings/) which does filtering of midi streams. Below is a mididings script to removes the "all notes off" signals from my midi stream so that the sustain pedal now works correctly in Qtractor and linuxsampler. (note: "all notes off" == control signal 123):

#!/usr/bin/python
from mididings import *
run( Filter(CTRL) % ~CtrlFilter(123) )

(mididings creates Alsa midi in/out ports to connect with keyboard)

I actually continued to have recording problems with Qtractor despite what I said above, but now I have finally figured it out. To summarize: I learned (by RTFM) that my keyboard always outputs midi to channel 1 & 2. When I would record in Qtractor the both midi channels would get recorded into a single track resulting in duplicate midi events. The track would not playback properly due to the duplicated events.

Since my keyboard cannot be configured not to output both 1 & 2 I made a filter with mididings to remove channel 2 (and also remove control 123). Now I can record in Qtractor properly. Here is my mididings filter by the way:

#!/usr/bin/python
from mididings import *
run( Filter(NOTE|CTRL) % ~ChannelFilter(2) >> Filter(CTRL) % ~CtrlFilter(123) )

Sorry for all the noise. Qtractor was not a problem though it does have the feature, as far as I can tell, of combining midi input from all channels into the channel being recorded so one must be aware of this.

rncbc's picture

Re. combining midi input from all channels into the channel being recorded
hm... this feature should be in effect only when a MIDI track is set to Omni or it's in Auto-monitor mode and currently selected. Check that out: turn off all Omni tracks and all monitoring, including Auto-monitor. This way you'll be sure that the only events that get captured and recorded are those that match the MIDI track's channel and nothing else.

cheers

Ok, I do see the behavior you mention with Omini and Auto-monitor. No doubt my initial recording attempts had one or both of these activated since I was not aware of what they did. I had not been aware of Auto-monitor up to now - never noticed the menu option for it. Its not obvious to me why Auto-monitor should cause the recording of all midi channels just like Omni. This is not intuitive to me, but now at least I know what to expect. Thanks for the help

Add new comment