qtractor icon indicating copy to clipboard operation
qtractor copied to clipboard

Bug: Qtractor not sending recorded MIDI cc accurately

Open cyrusadkisson opened this issue 6 years ago • 8 comments

qtractor_not_sending_midi_cc_correctly

I was able to get qtractor to record some CC bank selections (LSB 32) on different banks, but when played back, Qtractor does not send the correct bank number. Rather, it sends bank 0 instead always.

cyrusadkisson avatar Jun 11 '18 20:06 cyrusadkisson

Which version?

And, what's set on MIDI Track Properties as for Bank Select Method, Bank and Program?

In the Qtractor canon, one MIDI track represents one MIDI channel which in turn maps to one MIDI instrument. Bank_select and Program_change are fixed properties to the MIDI track and are not quite appropriate to have those control messages interleaved on any time or part of the MIDI sequence but only once at the very beginning.

IOW, having bank_select and/or program_change in any other place than the beginning, leads to undefined behavior. So please don't try that because most probably it won't work if at all. In qtractor's convention, you shall not change the current bank and/or program while playback is rolling, ever.

So that this is not quite a bug.

hth. cheers

rncbc avatar Jun 11 '18 22:06 rncbc

Thanks for the fast response.

Latest version from git. Pulled and built today.

Re bank_select and program_change, program_change seems to work just fine within a given bank. I can switch presets back and forth, no problem.

As far as not being able to switch banks, I've read that you've said something like this before in another forum. Seems to me that the relationship should be 1-1 for channels and devices where a device might have multiple instruments, banks and programs, but I'm definitely not a midi or sound production expert.

I may have to resort to playing a midi track (producing sound) simultaneously with a midi "track" meant to send raw cc messages at specific timers like so:

./sendmidi dev "Midi Through Port-0" hex raw b0 20 02 c0 00 On channel 1 (b0), change bank (20) to 3 (02) with program change (c0) to 1 (00)

But I'd much much much rather be able to point and click GUI edit/insert these MIDI instructions right inside qtractor. Would make my life a whole lot easier. Donation time? :)

cyrusadkisson avatar Jun 11 '18 23:06 cyrusadkisson

Just to be clear, I'm very serious about a donation to get this functionality added/allowed. Qtractor is the most intuitive DAW I've yet used and is 99% perfect for my use case.

cyrusadkisson avatar Jun 12 '18 14:06 cyrusadkisson

Thanks for considering a donation. However the restriction to not have bank_select/program_changes interleaved in a sequence is not a option here. You set your fixed bank and program at the MIDI track properties and that's it. You cannot, or better said you should not override this convention without getting the issues you reported (read undefined behavior). Sad but fundamentally true.

May I suggest you to make each instrument patch (bank+prog) into separated MIDI channels (and thus also into different MIDI tracks, if you get the the 1 track : 1 channel : 1 instrument-patch rule in reverse ?;).

Cheers

rncbc avatar Jun 12 '18 17:06 rncbc

So I scaled this back to not change banks at all and am dealing with program changes only. In this case, Qtractor is not sending the correct values. The midi clip window says

00:00:46.82 Pgm Change -- 2 --

But when the song plays, in my midi monitor I see:

Channel 1: Program change 1 (Bright Acoustic Piano)

In other words, Qtractor sends PC 1, regardless of the "value" in the clip window. (Confirmed against several different values.) I understand that changing banks mid song is outside of scope. But shouldn't basic PCs work?

cyrusadkisson avatar Jun 12 '18 23:06 cyrusadkisson

Nope. Instrument patch (bank_select and/or program_change) should not change mid song, ever. That's what I've been telling you all the time. You should use yet another MIDI track and channel for each and different instrument patch (bank, prog).

rncbc avatar Jun 13 '18 06:06 rncbc

Again, I'm not a MIDI or sound production expert, but that seems like an incorrect design decision. One should be able to send a PC to a channel-specific device mid-song to change its sound, add an effect, or whatever, right?

I'm working around the issue by setting my device to listen to "Omni" and having two MIDI tracks send PCs on channels 11 and 12 to switch back and forth between effects.

Anyway, I'd love this feature addition and for extra credit, I'd love to be able to point/click/edit such PCs right in the clip editing window. Having to "teach" the track by sending MIDI as it records is suboptimal.

cyrusadkisson avatar Jun 13 '18 14:06 cyrusadkisson

You don't need to be an expert :) probably you only need to understand that qtractor MIDI canon is what it is and that is kind a dogma too, ever since day 0 (it's not a bug, nor a feature, it's just like that if you prefer).

You can obviously send and record whatever bank/program_change you wish and they will get indeed recorded on SMF; however, most of the time, only the first (or the last, i can't remember) bank_select/program_change will get honored when reloading that very SMF you recorded earlier.

But again, bank_select/program_change's are actually parsed in and overridden on MIDI file import or input; MIDI track properties are set then appropriately; however, mid song patch changes, if they exist, might give you not the intended results when playing back under qtractor--it only does one instrument patch per MIDI track/channel and that is a rule you cannot escape.

Remember the rule : 1 track, 1 channel, 1 patch (=1 bank, 1 program); don't try to break it: you'll get different results otherwise, most often when you (re)start playback or relocate the play-head and what not, whatever. Please always observe the rule aforementioned ;)

Thanks && cheers

rncbc avatar Jun 13 '18 15:06 rncbc