|
From: Christian S. <chr...@ep...> - 2004-06-27 19:32:02
|
Es geschah am Sonntag, 27. Juni 2004 20:11 als Mark Knecht schrieb: > Vladimir Senkov wrote: > > Hi All, > > > > I'm almost there with the MIDI. > > <SNIP> > > > I think this makes more sense especially if we ever want to have > > multiple midi inputs connected to the same sampler channel. > > For now i'll assume that only a single input can be connected to a given > > channel, > > <SNIP> > > I agree. If I wanted two devices to both drive a piano Gig file, then > I'd load the same gig file on two ports and drive them separately. I've > mentioned this a couple of time, but I don't remember ever getting a > response - If a single gig is loaded on two or more ports it should NOT > require any extra samples be loaded into memory. Hopefully it will just > point both channels to the same samples and the same files on disk. > There should be little overhead for doing this. As far as I can remember we agreed already months ago to do it that way; means only one MIDI input per sampler channel. That's how it's defined in the network protocol. And sure, if one instrument is selected multiple times on different sampler channels, there's of course only one copy of the instrument data / samples in memory. That's what the 'InstrumentResourceManager' class is for: http://www.linuxsampler.org/doc/InstrumentResourceManager.pdf It loads a file into memory when it's demanded for the first time by an engine and automatically frees it from memory if no sampler channel needs the instrument anymore. The 'InstrumenResourceManager' even notifies the engines, when an instrument file needs to be reloaded (for what reason ever), waits till all engines have signaled back to be ready for the reload, then reloads the respective file and notifies the engines when the reload is done, so they can safely continue to render audio. That's how it's already implemented. CU Christian |