From 6c495486cdd3c3c8f5c3c945e79233128a7479f9 Mon Sep 17 00:00:00 2001 From: JP Cimalando Date: Tue, 28 Aug 2018 04:28:20 +0200 Subject: XMI: fix the VLQ reading procedure --- src/cvt_xmi2mid.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/cvt_xmi2mid.hpp b/src/cvt_xmi2mid.hpp index decb25c..e8d9dbf 100644 --- a/src/cvt_xmi2mid.hpp +++ b/src/cvt_xmi2mid.hpp @@ -640,7 +640,7 @@ static int xmi2mid_GetVLQ2(struct xmi2mid_xmi_ctx *ctx, uint32_t *quant) { int32_t data; *quant = 0; - for (i = 0; i < 4; i++) { + for (i = 0; xmi2mid_getsrcpos(ctx) != xmi2mid_getsrcsize(ctx); ++i) { data = xmi2mid_read1(ctx); if (data & 0x80) { xmi2mid_skipsrc(ctx, -1); -- cgit v1.2.3 From 66d2b296616663603a64d4196bfd00f9c5f039da Mon Sep 17 00:00:00 2001 From: JP Cimalando Date: Tue, 28 Aug 2018 10:26:21 +0200 Subject: sequencer: enable end silence skipping --- src/midi_sequencer_impl.hpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src') diff --git a/src/midi_sequencer_impl.hpp b/src/midi_sequencer_impl.hpp index 0fe6192..e54c7ee 100644 --- a/src/midi_sequencer_impl.hpp +++ b/src/midi_sequencer_impl.hpp @@ -614,6 +614,19 @@ bool BW_MidiSequencer::buildSmfTrackData(const std::vector } } +#ifdef ENABLE_END_SILENCE_SKIPPING + //Have track end on its own row? Clear any delay on the row before + if(event.subtype == MidiEvent::ST_ENDTRACK && evtPos.events.size() == 1) + { + if (!m_trackData[tk].empty()) + { + MidiTrackRow &previous = m_trackData[tk].back(); + previous.delay = 0; + previous.timeDelay = 0; + } + } +#endif + if((evtPos.delay > 0) || (event.subtype == MidiEvent::ST_ENDTRACK)) { evtPos.absPos = abs_position; -- cgit v1.2.3 From 57ef547b460843c0864e14ae4ce0fcf1f901a9d7 Mon Sep 17 00:00:00 2001 From: Wohlstand Date: Tue, 28 Aug 2018 13:20:16 +0300 Subject: Small warning fix --- src/adlmidi_opl3.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/adlmidi_opl3.cpp b/src/adlmidi_opl3.cpp index e127568..c98469f 100644 --- a/src/adlmidi_opl3.cpp +++ b/src/adlmidi_opl3.cpp @@ -481,7 +481,7 @@ void OPL3::updateChannelCategories() for(size_t b = 0; b < 23; ++b) { m_channelCategory[a * 23 + b] = - (b >= 18) ? static_cast(ChanCat_Rhythm_Bass + (b - 18)) : + (b >= 18) ? static_cast(ChanCat_Rhythm_Bass + (b - 18)) : (b >= 6 && b < 9) ? ChanCat_Rhythm_Slave : ChanCat_Regular; } } -- cgit v1.2.3 From 33fefba831f691f0448db49599f9798a04bcb06f Mon Sep 17 00:00:00 2001 From: JP Cimalando Date: Wed, 29 Aug 2018 04:18:21 +0200 Subject: fix the miswritten name of Jamie O'Connell --- src/adldata.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/adldata.cpp b/src/adldata.cpp index 6606e1f..0e5b43f 100644 --- a/src/adldata.cpp +++ b/src/adldata.cpp @@ -9449,7 +9449,7 @@ const char* const banknames[76] = "TMB (Shadow Warrior)", "DMX (Raptor)", "OP3 (Modded GMOPL by Wohlstand)", - "SB (Jammey O'Connel's bank)", + "SB (Jamie O'Connell's bank)", "TMB (Default bank of Apgee Sound System)", "WOPL (4op bank by James Alan Nguyen and Wohlstand)", "TMB (Blood)", @@ -10882,7 +10882,7 @@ const AdlBankSetup adlbanksetup[75] = {3, 0, 0, 0, 0}, //Bank 63, TMB (Shadow Warrior) {2, 0, 0, 0, 0}, //Bank 64, DMX (Raptor) {3, 0, 0, 0, 0}, //Bank 65, OP3 (Modded GMOPL by Wohlstand) - {3, 0, 0, 0, 0}, //Bank 66, SB (Jammey O'Connel's bank) + {3, 0, 0, 0, 0}, //Bank 66, SB (Jamie O'Connell's bank) {3, 0, 0, 0, 0}, //Bank 67, TMB (Default bank of Apgee Sound System) {0, 1, 1, 0, 0}, //Bank 68, WOPL (4op bank by James Alan Nguyen and Wohlstand) {3, 0, 0, 0, 0}, //Bank 69, TMB (Blood) -- cgit v1.2.3 From 7ccbb3a40a80637a130f499bb914bbafbcd71646 Mon Sep 17 00:00:00 2001 From: JP Cimalando Date: Wed, 29 Aug 2018 04:20:29 +0200 Subject: fix a typo about Apogee Sound System --- src/adldata.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/adldata.cpp b/src/adldata.cpp index 0e5b43f..b7fd3a1 100644 --- a/src/adldata.cpp +++ b/src/adldata.cpp @@ -9450,7 +9450,7 @@ const char* const banknames[76] = "DMX (Raptor)", "OP3 (Modded GMOPL by Wohlstand)", "SB (Jamie O'Connell's bank)", - "TMB (Default bank of Apgee Sound System)", + "TMB (Default bank of Apogee Sound System)", "WOPL (4op bank by James Alan Nguyen and Wohlstand)", "TMB (Blood)", "TMB (Lee)", @@ -10883,7 +10883,7 @@ const AdlBankSetup adlbanksetup[75] = {2, 0, 0, 0, 0}, //Bank 64, DMX (Raptor) {3, 0, 0, 0, 0}, //Bank 65, OP3 (Modded GMOPL by Wohlstand) {3, 0, 0, 0, 0}, //Bank 66, SB (Jamie O'Connell's bank) - {3, 0, 0, 0, 0}, //Bank 67, TMB (Default bank of Apgee Sound System) + {3, 0, 0, 0, 0}, //Bank 67, TMB (Default bank of Apogee Sound System) {0, 1, 1, 0, 0}, //Bank 68, WOPL (4op bank by James Alan Nguyen and Wohlstand) {3, 0, 0, 0, 0}, //Bank 69, TMB (Blood) {3, 0, 0, 0, 0}, //Bank 70, TMB (Lee) -- cgit v1.2.3 From 0d9bc6794e57526af28ce45a57d91ec78e39b354 Mon Sep 17 00:00:00 2001 From: JP Cimalando Date: Thu, 30 Aug 2018 07:49:14 +0200 Subject: API to return 4op channels to the original count --- src/adlmidi.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/adlmidi.cpp b/src/adlmidi.cpp index c7c5cf3..26a21e4 100644 --- a/src/adlmidi.cpp +++ b/src/adlmidi.cpp @@ -351,6 +351,10 @@ ADLMIDI_EXPORT int adl_setNumFourOpsChn(ADL_MIDIPlayer *device, int ops4) { if(!device) return -1; + + if(ops4 == -1) + return adlRefreshNumCards(device); + MidiPlayer *play = GET_MIDI_PLAYER(device); if((unsigned int)ops4 > 6 * play->m_setup.numChips) { @@ -364,7 +368,7 @@ ADLMIDI_EXPORT int adl_setNumFourOpsChn(ADL_MIDIPlayer *device, int ops4) play->m_synth.m_numFourOps = play->m_setup.numFourOps; play->m_synth.updateChannelCategories(); - return 0; //adlRefreshNumCards(device); + return 0; } ADLMIDI_EXPORT int adl_getNumFourOpsChn(struct ADL_MIDIPlayer *device) -- cgit v1.2.3 From 13e4cb1528f36d3514fa6d7f26eb4028194c5b07 Mon Sep 17 00:00:00 2001 From: JP Cimalando Date: Thu, 30 Aug 2018 11:01:42 +0200 Subject: fix a case of miscalculation and infinite loop --- src/adlmidi_midiplay.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/adlmidi_midiplay.cpp b/src/adlmidi_midiplay.cpp index 49aa119..f405489 100644 --- a/src/adlmidi_midiplay.cpp +++ b/src/adlmidi_midiplay.cpp @@ -1599,7 +1599,7 @@ void MIDIplay::setRPN(size_t midCh, unsigned value, bool MSB) case 0x0109 + 1*0x10000 + 1*0x20000: if((m_synthMode & Mode_XG) != 0) // Vibrato depth { - m_midiChannels[midCh].vibdepth = ((value - 64) * 0.15) * 0.01; + m_midiChannels[midCh].vibdepth = (((int)value - 64) * 0.15) * 0.01; } break; case 0x010A + 1*0x10000 + 1*0x20000: -- cgit v1.2.3