mirror of https://github.com/AxioDL/amuse.git
Work on MIDI-to-SNG conversion
This commit is contained in:
parent
a0bb35433a
commit
bd10015024
|
@ -49,7 +49,7 @@ void RegisterAudioUnit();
|
|||
- (nullable id)initWithComponentDescription:(AudioComponentDescription)componentDescription
|
||||
error:(NSError * __nullable * __nonnull)outError
|
||||
viewController:(AudioUnitViewController* __nonnull)vc;
|
||||
- (void)requestAudioGroup:(AudioGroupToken*)group;
|
||||
- (void)requestAudioGroup:(AudioGroupToken* _Nonnull)group;
|
||||
@end
|
||||
|
||||
#endif
|
||||
|
|
|
@ -17,7 +17,7 @@ public:
|
|||
PC
|
||||
};
|
||||
static std::vector<uint8_t> SongToMIDI(const unsigned char* data, Target& targetOut);
|
||||
static std::vector<uint8_t> MIDIToSong(const unsigned char* data, Target target);
|
||||
static std::vector<uint8_t> MIDIToSong(const std::vector<uint8_t>& data, Target target);
|
||||
};
|
||||
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -302,7 +302,7 @@ bool SongState::Track::advance(Sequencer& seq, int32_t ticks)
|
|||
m_data = nullptr;
|
||||
return !m_nextRegion->indexValid();
|
||||
}
|
||||
else if (m_data[0] & 0x80)
|
||||
else if (m_data[0] & 0x80 && m_data[1] & 0x80)
|
||||
{
|
||||
/* Control change */
|
||||
uint8_t val = m_data[0] & 0x7f;
|
||||
|
@ -310,6 +310,13 @@ bool SongState::Track::advance(Sequencer& seq, int32_t ticks)
|
|||
seq.setCtrlValue(m_midiChan, ctrl, val);
|
||||
m_data += 2;
|
||||
}
|
||||
else if (m_data[0] & 0x80)
|
||||
{
|
||||
/* Program change */
|
||||
uint8_t prog = m_data[0] & 0x7f;
|
||||
seq.setChanProgram(m_midiChan, prog);
|
||||
m_data += 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Note */
|
||||
|
@ -347,7 +354,7 @@ bool SongState::Track::advance(Sequencer& seq, int32_t ticks)
|
|||
m_data = nullptr;
|
||||
return !m_nextRegion->indexValid();
|
||||
}
|
||||
else if (m_data[0] & 0x80)
|
||||
else if (m_data[0] & 0x80 && m_data[1] & 0x80)
|
||||
{
|
||||
/* Control change */
|
||||
uint8_t val = m_data[0] & 0x7f;
|
||||
|
@ -355,6 +362,13 @@ bool SongState::Track::advance(Sequencer& seq, int32_t ticks)
|
|||
seq.setCtrlValue(m_midiChan, ctrl, val);
|
||||
m_data += 2;
|
||||
}
|
||||
else if (m_data[0] & 0x80)
|
||||
{
|
||||
/* Program change */
|
||||
uint8_t prog = m_data[0] & 0x7f;
|
||||
seq.setChanProgram(m_midiChan, prog);
|
||||
m_data += 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((m_data[2] & 0x80) != 0x80)
|
||||
|
|
Loading…
Reference in New Issue