573 |
// return if engine disabled |
// return if engine disabled |
574 |
if (EngineDisabled.Pop()) { |
if (EngineDisabled.Pop()) { |
575 |
dmsg(5,("gig::Engine: engine disabled (val=%d)\n",EngineDisabled.GetUnsafe())); |
dmsg(5,("gig::Engine: engine disabled (val=%d)\n",EngineDisabled.GetUnsafe())); |
576 |
|
EngineDisabled.RttDone(); |
577 |
return 0; |
return 0; |
578 |
} |
} |
579 |
|
|
699 |
} |
} |
700 |
FrameTime += Samples; |
FrameTime += Samples; |
701 |
|
|
702 |
|
EngineDisabled.RttDone(); |
703 |
return 0; |
return 0; |
704 |
} |
} |
705 |
|
|
1906 |
switch (sub_id1) { |
switch (sub_id1) { |
1907 |
case 0x04: // Device Control |
case 0x04: // Device Control |
1908 |
switch (sub_id2) { |
switch (sub_id2) { |
1909 |
case 0x01: // Master Volume |
case 0x01: { // Master Volume |
1910 |
GLOBAL_VOLUME = |
const double volume = |
1911 |
double((uint(val_msb)<<7) | uint(val_lsb)) / 16383.0; |
double((uint(val_msb)<<7) | uint(val_lsb)) / 16383.0; |
1912 |
|
#if CONFIG_MASTER_VOLUME_SYSEX_BY_PORT |
1913 |
|
// apply volume to all sampler channels that |
1914 |
|
// are connected to the same MIDI input port |
1915 |
|
// this sysex message arrived on |
1916 |
|
for (int i = 0; i < engineChannels.size(); ++i) { |
1917 |
|
EngineChannel* pEngineChannel = engineChannels[i]; |
1918 |
|
if (pEngineChannel->GetMidiInputPort() == |
1919 |
|
itSysexEvent->pMidiInputPort) |
1920 |
|
{ |
1921 |
|
pEngineChannel->Volume(volume); |
1922 |
|
} |
1923 |
|
} |
1924 |
|
#else |
1925 |
|
// apply volume globally to the whole sampler |
1926 |
|
GLOBAL_VOLUME = volume; |
1927 |
|
#endif // CONFIG_MASTER_VOLUME_SYSEX_BY_PORT |
1928 |
break; |
break; |
1929 |
|
} |
1930 |
} |
} |
1931 |
break; |
break; |
1932 |
} |
} |
1978 |
if ( |
if ( |
1979 |
(pEngineChannel->midiChannel == part || |
(pEngineChannel->midiChannel == part || |
1980 |
pEngineChannel->midiChannel == midi_chan_all) && |
pEngineChannel->midiChannel == midi_chan_all) && |
1981 |
pEngineChannel->GetMidiInputPort() == itSysexEvent->pMidiInputPort |
pEngineChannel->GetMidiInputPort() == itSysexEvent->pMidiInputPort |
1982 |
) { |
) { |
1983 |
try { |
try { |
1984 |
pEngineChannel->SetMidiInstrumentMap(map); |
pEngineChannel->SetMidiInstrumentMap(map); |
2136 |
} |
} |
2137 |
|
|
2138 |
String Engine::Version() { |
String Engine::Version() { |
2139 |
String s = "$Revision: 1.95 $"; |
String s = "$Revision: 1.97 $"; |
2140 |
return s.substr(11, s.size() - 13); // cut dollar signs, spaces and CVS macro keyword |
return s.substr(11, s.size() - 13); // cut dollar signs, spaces and CVS macro keyword |
2141 |
} |
} |
2142 |
|
|