aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2020-06-09 09:23:28 +0800
committerGravatar Chris Xiong <chirs241097@gmail.com> 2020-06-09 09:23:28 +0800
commit63fb9a66ed871f367467c7d8b707f4c4a7273a6b (patch)
treeceec593200f9ed61c3f5bf59a6562d92674ac420
parentd8322e561c25b24504fc5787b10cfcdf525f1442 (diff)
downloadoddities-63fb9a66ed871f367467c7d8b707f4c4a7273a6b.tar.xz
More fix for portamento in it2midi.HEADmaster
-rw-r--r--music/it2midi.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/music/it2midi.cpp b/music/it2midi.cpp
index 2fe3b26..ca00515 100644
--- a/music/it2midi.cpp
+++ b/music/it2midi.cpp
@@ -668,7 +668,7 @@ class ITConverter
if(par->chvelm[ch]>127)
par->chvelm[ch]=127;
}
- if((mask>>0&1)&&note<120)//reset for pitch slides (E/F/G)
+ if((mask>>0&1)&&note<120&&!((mask>>3&1)&&efx==7))//reset for pitch slides (E/F, but not G)
{
if(fabs(par->chpitchm[ch])>1e-6)
{
@@ -750,6 +750,11 @@ class ITConverter
par->chefxmem[ch][efx]=fxp;
//if(!(mask>>0&1)||note>=120)
// puts("no note to slide to?");
+ if(par->chnote[ch]>=120)//Gxx without a prior note doesn't seem to have any effect?
+ {
+ efx=par->chefxmem[ch][efx]=0;
+ break;
+ }
par->chportasrcnote[ch]=par->chnote[ch];
par->chportadstnote[ch]=note;
}
@@ -926,6 +931,10 @@ class ITConverter
par->f.tracks[par->minstch[std::make_pair(ch,par->chinst[ch])]].
eventList.push_back(MidiEvent::noteOn(par->curmiditk+notedelay,0,note,par->chvelm[ch]));
}
+ else
+ {
+ par->chportadstnote[ch]=note;
+ }
}
}
}
@@ -968,7 +977,7 @@ class ITConverter
if(chnote[i]!=255)
f.tracks[minstch[std::make_pair(i,chinst[i])]].
eventList.push_back(MidiEvent::noteOff(curmiditk,0,chnote[i]));
- f.dumpFile();
+ //f.dumpFile();
for(auto i=f.tracks.begin()+1;i!=f.tracks.end();)
{
bool df=false;