aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--core/qmpmidimapperrtmidi.cpp5
-rw-r--r--core/qmpmidimappers.hpp1
-rw-r--r--core/qmpmidiplay.cpp10
-rw-r--r--core/qmpmidiplay.hpp1
-rw-r--r--qmidiplayer-desktop/translations/qmp_zh_CN.ts44
6 files changed, 42 insertions, 23 deletions
diff --git a/ChangeLog b/ChangeLog
index 726db06..0c8142c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2016-04-14 0.7.2 beta
+Also reset mapped midi devices.
+Translation work...
+
2016-04-13 0.7.2 beta
Reset channel activity indicators properly.
Windows version now has an icon.
diff --git a/core/qmpmidimapperrtmidi.cpp b/core/qmpmidimapperrtmidi.cpp
index f28bb9d..845f24b 100644
--- a/core/qmpmidimapperrtmidi.cpp
+++ b/core/qmpmidimapperrtmidi.cpp
@@ -91,3 +91,8 @@ void qmpMidiMapperRtMidi::panic(int iid,int ch)
ctrlChange(iid,ch,120,0);
//ctrlChange(iid,ch,123,0);
}
+void qmpMidiMapperRtMidi::reset(int iid,int ch)
+{
+ ctrlChange(iid,ch,120,0);
+ ctrlChange(iid,ch,121,0);
+}
diff --git a/core/qmpmidimappers.hpp b/core/qmpmidimappers.hpp
index 334a2d2..ae4fa3f 100644
--- a/core/qmpmidimappers.hpp
+++ b/core/qmpmidimappers.hpp
@@ -18,6 +18,7 @@ public:
void pitchBend(int iid,int ch,int val);
void sysEx(int iid,int length,const char* data);
void panic(int iid,int ch);
+ void reset(int iid,int ch);
int enumDevices();
std::string deviceName(int id);
};
diff --git a/core/qmpmidiplay.cpp b/core/qmpmidiplay.cpp
index 6af7722..780b8f7 100644
--- a/core/qmpmidiplay.cpp
+++ b/core/qmpmidiplay.cpp
@@ -181,6 +181,12 @@ void w32usleep(uint64_t t)
timeEndPeriod(1);
}
#endif
+void CMidiPlayer::prePlayInit()
+{
+ playerPanic(true);
+ for(int i=0;i<16;++i)if(deviceusage[i])
+ for(int j=0;j<16;++j)mapper->reset(i,j);
+}
void CMidiPlayer::playEvents()
{
for(uint32_t ct=midiFile->getEvent(0)->time;tceptr<midiFile->getEventCount();)
@@ -287,6 +293,7 @@ void CMidiPlayer::playerPanic(bool reset)
fluid_synth_cc(synth,i,7,100);
fluid_synth_cc(synth,i,10,64);
fluid_synth_cc(synth,i,11,127);
+ if(deviceusage[i])for(int j=0;j<16;++j)mapper->reset(i,j);
}
//all sounds off causes the minus polyphone bug...
for(int i=0;i<16;++i)fluid_synth_all_notes_off(synth,i);
@@ -320,6 +327,7 @@ void CMidiPlayer::playerDeinit()
}
void CMidiPlayer::playerThread()
{
+ prePlayInit();
playEvents();
}
@@ -376,7 +384,7 @@ uint32_t CMidiPlayer::getFileNoteCount(){return midiFile?midiFile->getNoteCount(
uint32_t CMidiPlayer::getFileStandard(){return midiFile?midiFile->getStandard():0;}
const char* CMidiPlayer::getTitle(){return midiFile?midiFile->getTitle():"";}
const char* CMidiPlayer::getCopyright(){return midiFile?midiFile->getCopyright():"";}
-double CMidiPlayer::getTempo(){return 60./(ctempo/1e6)/**ctsd/4.*/;}
+double CMidiPlayer::getTempo(){return 60./(ctempo/1e6);}
uint32_t CMidiPlayer::getTCpaused(){return tcpaused;}
void CMidiPlayer::setTCpaused(uint32_t ps){tcpaused=ps;}
uint32_t CMidiPlayer::isFinished(){return finished;}
diff --git a/core/qmpmidiplay.hpp b/core/qmpmidiplay.hpp
index 15fcd89..b0fb387 100644
--- a/core/qmpmidiplay.hpp
+++ b/core/qmpmidiplay.hpp
@@ -86,6 +86,7 @@ class CMidiPlayer
void setBit(uint16_t &n,uint16_t bn,uint16_t b);
void processEvent(const SEvent *e);
void processEventStub(const SEvent *e);
+ void prePlayInit();
void playEvents();
void fileTimer1Pass();
void fileTimer2Pass();
diff --git a/qmidiplayer-desktop/translations/qmp_zh_CN.ts b/qmidiplayer-desktop/translations/qmp_zh_CN.ts
index 4b95192..4810b05 100644
--- a/qmidiplayer-desktop/translations/qmp_zh_CN.ts
+++ b/qmidiplayer-desktop/translations/qmp_zh_CN.ts
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
-<TS version="2.1" language="zh_CN">
+<TS version="2.0" language="zh_CN">
<context>
<name>qmpChannelEditor</name>
<message>
@@ -159,7 +159,7 @@
<message>
<location filename="../qmpchannelswindow.ui" line="92"/>
<source>Preset</source>
- <translation type="unfinished"></translation>
+ <translation type="unfinished">乐器</translation>
</message>
<message>
<location filename="../qmpchannelswindow.ui" line="97"/>
@@ -179,12 +179,12 @@
<message>
<location filename="../qmpchannelswindow.ui" line="134"/>
<source>Unmute All</source>
- <translation type="unfinished"></translation>
+ <translation type="unfinished">取消全部静音</translation>
</message>
<message>
<location filename="../qmpchannelswindow.ui" line="141"/>
<source>Unsolo All</source>
- <translation type="unfinished"></translation>
+ <translation type="unfinished">取消全部独奏</translation>
</message>
</context>
<context>
@@ -248,7 +248,7 @@
<message>
<location filename="../qmpefxwindow.ui" line="437"/>
<source>Sine</source>
- <translation type="unfinished"></translation>
+ <translation type="unfinished">正弦</translation>
</message>
<message>
<location filename="../qmpefxwindow.ui" line="450"/>
@@ -261,7 +261,7 @@
<message>
<location filename="../qmphelpwindow.ui" line="20"/>
<source>Help</source>
- <translation type="unfinished"></translation>
+ <translation type="unfinished">帮助</translation>
</message>
</context>
<context>
@@ -388,24 +388,24 @@
<location filename="../qmpplistwindow.cpp" line="188"/>
<location filename="../qmpplistwindow.cpp" line="296"/>
<source>Repeat Off</source>
- <translation type="unfinished"></translation>
+ <translation type="unfinished">循环关</translation>
</message>
<message>
<location filename="../qmpplistwindow.ui" line="122"/>
<location filename="../qmpplistwindow.cpp" line="213"/>
<location filename="../qmpplistwindow.cpp" line="289"/>
<source>Shuffle Off</source>
- <translation type="unfinished"></translation>
+ <translation type="unfinished">随机关</translation>
</message>
<message>
<location filename="../qmpplistwindow.ui" line="148"/>
<source>Save</source>
- <translation type="unfinished">保存播放列表</translation>
+ <translation type="unfinished">保存列表</translation>
</message>
<message>
<location filename="../qmpplistwindow.ui" line="174"/>
<source>Load</source>
- <translation type="unfinished">打开播放列表</translation>
+ <translation type="unfinished">加载列表</translation>
</message>
<message>
<location filename="../qmpplistwindow.ui" line="200"/>
@@ -421,29 +421,29 @@
<location filename="../qmpplistwindow.cpp" line="192"/>
<location filename="../qmpplistwindow.cpp" line="300"/>
<source>Repeat One</source>
- <translation type="unfinished"></translation>
+ <translation type="unfinished">循环当前</translation>
</message>
<message>
<location filename="../qmpplistwindow.cpp" line="196"/>
<location filename="../qmpplistwindow.cpp" line="304"/>
<source>Repeat All</source>
- <translation type="unfinished"></translation>
+ <translation type="unfinished">循环全部</translation>
</message>
<message>
<location filename="../qmpplistwindow.cpp" line="208"/>
<location filename="../qmpplistwindow.cpp" line="284"/>
<source>Shuffle On</source>
- <translation type="unfinished"></translation>
+ <translation type="unfinished">随机开</translation>
</message>
<message>
<location filename="../qmpplistwindow.cpp" line="259"/>
<source>Save playlist</source>
- <translation type="unfinished"></translation>
+ <translation type="unfinished">保存播放列表</translation>
</message>
<message>
<location filename="../qmpplistwindow.cpp" line="272"/>
<source>Load playlist</source>
- <translation type="unfinished"></translation>
+ <translation type="unfinished">加载播放列表</translation>
</message>
</context>
<context>
@@ -451,27 +451,27 @@
<message>
<location filename="../qmppresetselect.ui" line="26"/>
<source>Preset Selection</source>
- <translation type="unfinished"></translation>
+ <translation type="unfinished">乐器选择</translation>
</message>
<message>
<location filename="../qmppresetselect.ui" line="61"/>
<source>Bank</source>
- <translation type="unfinished"></translation>
+ <translation type="unfinished">乐器库</translation>
</message>
<message>
<location filename="../qmppresetselect.ui" line="74"/>
<source>Preset</source>
- <translation type="unfinished"></translation>
+ <translation type="unfinished">乐器</translation>
</message>
<message>
<location filename="../qmppresetselect.ui" line="87"/>
<source>OK</source>
- <translation type="unfinished"></translation>
+ <translation type="unfinished">确定</translation>
</message>
<message>
<location filename="../qmppresetselect.ui" line="100"/>
<source>Cancel</source>
- <translation type="unfinished"></translation>
+ <translation type="unfinished">取消</translation>
</message>
</context>
<context>
@@ -499,7 +499,7 @@
<message>
<location filename="../qmpsettingswindow.ui" line="74"/>
<source>Disable Midi Mapping</source>
- <translation type="unfinished">禁用MIDI输出分配</translation>
+ <translation type="unfinished">只使用默认输出设备</translation>
</message>
<message>
<location filename="../qmpsettingswindow.ui" line="87"/>
@@ -740,7 +740,7 @@
<message>
<location filename="../qmpsettingswindow.ui" line="441"/>
<source>Soundfonts</source>
- <translation type="unfinished"></translation>
+ <translation type="unfinished">音源</translation>
</message>
<message>
<location filename="../qmpsettingswindow.ui" line="527"/>