From: Chris C. <ca...@al...> - 2003-04-18 12:30:15
|
OK, I've worked out why this one happens. It's both a stupid=20 oversight and a tricky design problem. Remember that devices are stored at the sequencer side, and that when=20 you load a .rg file with more devices in it than exist at the=20 sequencer, the excess ones are created for you (without connections). Now, each document has its own Studio, i.e. its own GUI-side list of=20 devices. The bank editor exploits this: to import the banks from a=20 =2Ergd file, it creates a new document and loads the .rgd file into it=20 using the normal .rg file load code. That sets up the new document's=20 Studio such that the bank editor can then pick the new banks out of=20 it as it likes. You may be able to see where this is heading. The problem is that even though the bank editor has created a new=20 document, the file-load code still creates any excess devices inside=20 the same set of devices stored at the sequencer side. The GUI has=20 multiple documents; the sequencer doesn't. In order to determine=20 whether to create a new device or not, the file-load code just checks=20 whether a device of the same direction already exists with the same=20 device ID. And in this particular case, one of the devices in the=20 =2Ergd file has the same ID as one that exists in the sequencer, but a=20 different direction: it's matching up with the record device for your=20 first ALSA port. So off the file-load code goes, to create a new=20 device. And even though the document is discarded as soon as the=20 banks have been picked out of it, the new device persists. So this is a stupid oversight because we shouldn't be creating devices=20 in the sequencer's global device list when we aren't really trying to=20 load a document permanently at all. And it's a tricky design problem=20 because the fact that we can have multiple Studios at the GUI side=20 but we only ever have one set of devices at the sequencer side shows=20 a fundamental mismatch. Anyway, I'll put in a fairly untidy fix for the stupid-oversight part=20 of it for the moment. Chris |