You are here

MIDI programs aren't saved when (re)opening a project or exporting MIDI tracks

Hi! I think you know me rncbc...lol. Yeah, I'm that Hoff guy from Linuxmusicians.com and yeah, here I am complaining about a issue that no one in the world seems to have experienced. Even though I have had the exact same problem on multiple Linux distros(KXStudio, Xubuntu, OpenSUSE) using 2 different Qtractor versions(0.5.7, 0.5.8), and there seems to be nothing I can do.

Basically the problem is that I create some tracks, I assign an instrument, a bank, and a program(or patch) to each track and I connect Qtractor to Qsynth. No plugins or anything(though I have tried using Fluidsynth-DSSI and it's the same thing). And when I restart my computer(or log out/log in) and I start Qtractor and Qsynth(and whatever I need) all the tracks except the drum track(channel 10) plays the wrong programs/patches. It looks like they are set up right, but they sure don't play the right programs/patches. It seems they play the same program that has the same number as the channel the track is on. Like the track on channel 4 plays the 4th GM program/patch. BUT this is not completely true, because the first track(on channel 1) plays something completely random(lol)... Btw, I can set them up every single time I (re)open the project, but with many tracks it kind of is a PITA.

And my other problem(as I'm sure you know from Linuxmusicians.com lol) is that when I export a MIDI song using Export MIDI Tracks, it doesn't save the programs. YES, opening the exported file in QTRACTOR works, but NOT in other programs or operating systems. For example opening it in Rosegarden(also using Qsynth/Fluidsynth) causes it to play the tracks like I said above. Basically, completely wrong programs/patches. But I can assign them new one and export in Rosegarden without a problem...

How come NO ONE else has mentioned this? Does my computer just suck? Am I just weird or something(lol)?

Forums: 
rncbc's picture

i'm not completely sure about this, but can you check which fuidsynth version are you running? yes, it's about libfluidsynth, not qsynth.

also, as said on the linuxmusicians.com thread, i've been trying to reproduce the problem but to no avail. i am no dissing anything yet, but i am probably missing something which is not that obvious now. i'll try to investigate this further on, trying with plain scratch setups and see if i can at least find the root cause of your griefs.

cheers

Yeah, so it seems there is something weird going on with Qsynth(and I guess Fluidsynth). So I clicked on "Channels" in Qsynth and edited all the channels' programs to different drum programs from bank 128. and then saved it as a new preset(default2). Now no matter if I play something in Qtractor, Rosegarden or whatever it only plays those drums... Even downloaded MIDI files(from VGMusic etc). Huh? I'm still relatively new at this stuff so maybe I missed a tutorial somewhere? Or what's going on here? Either way, playing them in Windows still is the same(unless I have edited and exported them from Rosegarden or Anvil Studio).

I'm just so god damn tired of this stuff and it's giving me a headache lol... I tried Rosegarden but I just don't like it as much as Qtractor :).

Qsynth is version 0.3.7-1, and libfluidsynth1(I guess that is the right one) is version 1.1.6-1. Qtractor is version 0.5.8.

Sorry to bother you again, but I now see where the problem is. I noticed that when using QSampler it worked. Everything worked without any problems :). So, I now tested a few things to see if Fluidsynth was the problem... but I'm not sure... Basically, as soon as I change something about the banks and patches and instrument(s), and then export it, the MIDI file gets completely messed up(like I've mentioned before). Even changing the drums caused the same problem(the drums have always worked because I never touched the banks or patches :)). Now obviously, this won't work because now they all play piano(except the drums)...

I'm happy QSampler(LinuxSampler) works(because I don't change the banks or patches or instruments at all), but I really want Fluidsynth and General MIDI to work too... :(

Here is a ZIP file with one file that is messed up(export1) and another one that works as it should(export3), but all the tracks(except the drums) play the same patch: http://www.mediafire.com/download/inki5uv9jw1n9oq/qtractor_export_test.zip

rncbc's picture

thanks to keeping this alive. i still hadn't the time to go deep into this--in part because i failed to reproduce the trouble anyhow, my stump probably---but thanks to you i'll have another flyby soon, this weekend i hope.

[UPDATE:] i do now see something fishy on the test-export-1.mid indeed. being a smf format 1 file, all bank-select/program-change messages always refer to channel 1 instead of their proper track/channel 1, 2 and 3 respectively where i guess they should go. however, i also see that track/channel 10 is ok. as you always said. we're definitely getting somewhere... ;)

but again, by reading test-export-3.mid (also smf 1) i see that it has no bank-select/program-change messages whatsoever. this is probably due to the fact that you never assigned an instrument definition to either track while in qtractor--so this is somewhat expected behavior.

cheers

Well, I didn't set any banks/patches to export 3 so that's to be expected haha. That was because I was thinking of the names of the tracks. When assigning banks/patches to the tracks and then exporting it as one midi file, and then opening it in Rosegarden, the names would always be wrong. But if I just skipped it completely(not setting the tracks to any patch or bank) the names would actually be right in Rosegarden :).

Anyway, good if after a long time we're actually maknig some progress :). I just can't stand Rosegardens interface hehe...

EDIT Oh, you actually said "you" - as in ME - lol. I somehow missread it and thought it said you as in YOU haha.

rncbc's picture

in an immediate followup to the latest discoveries, something has been fixed and committed on svn trunk rev.3344 (aka. qtractor 0.5.8.21) which obviously relates to the topic at hand

of course the fix only applies to newer midi exports, it cannot repair what was already ill-produced or broken before :)

please test && tell.

cheers

Nice :). I've tried compiling Qtractor from svn before, and I had some problems with it... Either way, it's nice to know this problem may be solved now :).

EDIT OK I guess I'll need to compile it somehow(since you also wanted to find out) :). I'll do it later...lol

rncbc's picture

just in case, maybe you can try one of readily available snapshot packages from opensuse build service.

follow the "show other versions" and "unstable packages" links; look for qtractor-0.5.8.21svn3344+ snapshots; there's some for opensuse and ubuntu, 32 and 64bit flavors ;)

hth.

OK, I'll check that. Actually I have both KXStudio, Xubuntu, OpenSUSE, AND Windows 7 installed on my HDD haha. Quad boot?

There were some missing dependencies for me... I'll try again tomorrow, because it's really late now(in Sweden).

OK, so I did what you said and went to the OpenSUSE build service and downloaded and installed the latest SVN of Qtractor. I couldn't install it in KXStudio for whatever reason, but I could in OpenSUSE after installing some other dependencies(also by you on the build service :)), and this is the result:

OK, so exporting ACTUALLY works now :). That's really awesome. Importing an exported MIDI file to another program(like Rosegarden) shows the right names and show/play the right patches for all the tracks. So that's really awesome :).

But there is one other problem... I still have that other issue, which is that when I reopen a Qtractor project after restarting the computer it plays the wrong patches... :(
http://www.mediafire.com/download/kwux2pj8qen179q/Qtractor_SVN_Test.zip

OK, so I got really happy when I saw that exporting worked, but then of course everything didn't work... Anyway, good job. It's really cool to be able to speak directly to the developer of a program like this :).

rncbc's picture

hen I reopen a Qtractor project after restarting the computer it plays the wrong patches...
you say this only happens after you restart the computer? and only then? is there any close relation between the patches that are actually played and the ones that should be played somehow? like the proverbial off-by-one difference in program numbers?

seeya

It's like I've mentioned before. Let's say I have 16 tracks each on a different channel(so 16 channels), then track 1 plays Acoustic Grand Piano, track 2 plays Bright Acoustic Piano, track 3 plays Electric Grand Piano ... track 16 plays Dulcimer: http://en.wikipedia.org/wiki/General_MIDI

Also, it may have something to do with Fluidsynth, because I remember connecting Qtractor to Qsynth with another QSynth preset(16 other patches then the first 16 in GM), and then it played those instead. But why? Maybe I should also try Timidity++ but I have never tried that at all. Is there even a GUI for it?...

rncbc's picture

... track 1 plays Acoustic Grand Piano, track 2 plays Bright Acoustic Piano, track 3 plays Electric Grand Piano ... track 16 plays Dulcimer:
and when these tracks play it or sound wrong, what patch, track or channel does it really play?

hint: one way to get this much evident is about opening the qsynth channels window and look at watch for channel led/lights and respective soundfont preset/patch names. are them consistent with qtractor's session track layout?

seeya

Anyway, so Timidity was a pita to get working but after a while I (short of) got it working. But it doesn't really matter because I still have the same problem... Btw, it seems it actually is the svn version of Qtractor in KXStudio and after a couple of hours it got updated :).

"hint: one way to get this much evident is about opening the qsynth channels window and look at watch for channel led/lights and respective soundfont preset/patch names. are them consistent with qtractor's session track layout?"

Wait a minute. Are they supposed to be that? They have never ever been the same... I now tried changing the patches in Qsynth(the channels window) and it worked. OK, so now what? I'm definitely no pro at this stuff, so I'm feeling a little lost here...

UPDATE: And now I see that changing the patches of the tracks in Qtractor also changes the patches in the channels window in Qsynth. But everytime after restarting my computer Qsynth sets to the last used preset(now it was a test preset I made, instead of the default preset).

rncbc's picture

quite funny, and who is [a pro], anyway?

B-)

ps. aside with comedy now. what exactly is your experiencing after all (re. qsynth) , that is the question.

pss. note that qsynth (fluidsynth for that matter, actually) responds to bank-select+program-change messages by switching the respective channel preset or instrument voicing accordingly--that's all working as designed, i say.

also note that qtractor only sends out the bank/program messages at session start-up or when (midi) connections do change later. tell me: after you reboot, which is the sequence you start those programs exactly: qtractor then qsynth or is the other way around?

well, it shouldn't matter anyway, at least in principle. but we're here to catch the hideous roach. that's why i'm asking you for a step after another to catch the culprit

cheers

Nope. It doesn't matter. It's the same no matter if I start Qsynth or Qtractor first.

EDIT Btw, Qtractor is fully supported with NSM(Non Session Manager) now, isn't it? I noticed that it's green(instead of yellow) in NSM, and it actually remembered what project I used last time :). Nice.

Add new comment