Hi everybody! I just added support for multiple MIDI input ports per sampler channel.
SVN revision: 2500 LinuxSampler version: 1.0.0.svn25 LSCP version: 1.6 (new) Until now one could only use exactly one MIDI input port per sampler channel. Under certain conditions it makes sense however to be able to connect more than MIDI input port on the same sampler channel (without being forced to create new sampler channels just for that). Here is the full SVN diff: http://svn.linuxsampler.org/cgi-bin/viewvc.cgi?view=revision&revision=2500 Since this is a design change, I had to modify major parts of the sampler. New C++ API methods were added, old ones marked as being deprecated. However full API and behavior backward compatibility *should* be provided. So your graphical frontend(s) and/or LSCP scripts *should* still work as usual. If something is not working anymore, then please tell me! I added the following new LSCP commands (LSCP v1.6): ADD CHANNEL MIDI_INPUT <sampler-channel> <midi-device-id> [<midi-input-port>] http://www.linuxsampler.org/api/draft-linuxsampler-protocol.html#ADD%20CHANNEL%20MIDI_INPUT REMOVE CHANNEL MIDI_INPUT <sampler-channel> [<midi-device-id> [<midi-input-port>]] http://www.linuxsampler.org/api/draft-linuxsampler-protocol.html#REMOVE%20CHANNEL%20MIDI_INPUT LIST CHANNEL MIDI_INPUT <sampler-channel> http://www.linuxsampler.org/api/draft-linuxsampler-protocol.html#LIST%20CHANNEL%20MIDI_INPUTS As with the C++ API changes, the old LSCP commands (and old response fields of "GET CHANNEL INFO") are marked as deprecated, but still there and should provide full behavior backward compatibility. If not, then it is a bug and please tell me! I also thought about making the MIDI channel setting individual for each MIDI port connected. However I found that its use case would be too exotic and would introduce a usability nightmare for users. So I decided to leave only one single MIDI channel setting for all MIDI input ports connected to one sampler channel. Implementation detail: if more than one MIDI input port is connected to one SamplerChannel/EngineChannel, then a mutex.lock() is used for each MIDI event coming in to protect the input MIDI RingBuffer against concurrent input. If there is only one MIDI input port, then no mutex.lock() is used. The Mutex lock is a bit undesired, it could be avoided by changing the design a bit more. But for now it should probably be OK. CU Christian ------------------------------------------------------------------------------ CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments & Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk _______________________________________________ Linuxsampler-devel mailing list Linuxsampler-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxsampler-devel