mirror of
https://github.com/AxioDL/amuse.git
synced 2025-12-08 21:17:49 +00:00
Merge branch 'master' of https://github.com/AxioDL/amuse
This commit is contained in:
@@ -71,7 +71,7 @@ Sequencer::Sequencer(Engine& engine, const AudioGroup& group, int groupId,
|
||||
m_midiSetup = it->second->data();
|
||||
|
||||
m_submix = m_engine.addSubmix(smx);
|
||||
m_submix->makeReverbHi(0.2f, 1.f, 1.f, 0.5f, 0.f, 0.f);
|
||||
m_submix->makeReverbHi(0.2f, 0.65f, 1.f, 0.5f, 0.f, 0.f);
|
||||
}
|
||||
|
||||
Sequencer::ChannelState::~ChannelState()
|
||||
@@ -79,27 +79,53 @@ Sequencer::ChannelState::~ChannelState()
|
||||
}
|
||||
|
||||
Sequencer::ChannelState::ChannelState(Sequencer& parent, uint8_t chanId)
|
||||
: m_parent(parent), m_chanId(chanId), m_setup(m_parent.m_midiSetup[chanId])
|
||||
: m_parent(parent), m_chanId(chanId)
|
||||
{
|
||||
if (chanId == 9)
|
||||
if (m_parent.m_midiSetup)
|
||||
{
|
||||
auto it = m_parent.m_songGroup.m_drumPages.find(m_setup.programNo);
|
||||
if (it != m_parent.m_songGroup.m_drumPages.cend())
|
||||
m_page = it->second;
|
||||
m_setup = &m_parent.m_midiSetup[chanId];
|
||||
|
||||
if (chanId == 9)
|
||||
{
|
||||
auto it = m_parent.m_songGroup.m_drumPages.find(m_setup->programNo);
|
||||
if (it != m_parent.m_songGroup.m_drumPages.cend())
|
||||
m_page = it->second;
|
||||
}
|
||||
else
|
||||
{
|
||||
auto it = m_parent.m_songGroup.m_normPages.find(m_setup->programNo);
|
||||
if (it != m_parent.m_songGroup.m_normPages.cend())
|
||||
m_page = it->second;
|
||||
}
|
||||
|
||||
m_curVol = m_setup->volume / 127.f;
|
||||
m_curPan = m_setup->panning / 64.f - 1.f;
|
||||
m_ctrlVals[0x5b] = m_setup->reverb;
|
||||
m_ctrlVals[0x5d] = m_setup->chorus;
|
||||
}
|
||||
else
|
||||
{
|
||||
auto it = m_parent.m_songGroup.m_normPages.find(m_setup.programNo);
|
||||
if (it != m_parent.m_songGroup.m_normPages.cend())
|
||||
m_page = it->second;
|
||||
if (chanId == 9)
|
||||
{
|
||||
auto it = m_parent.m_songGroup.m_drumPages.find(0);
|
||||
if (it != m_parent.m_songGroup.m_drumPages.cend())
|
||||
m_page = it->second;
|
||||
}
|
||||
else
|
||||
{
|
||||
auto it = m_parent.m_songGroup.m_normPages.find(0);
|
||||
if (it != m_parent.m_songGroup.m_normPages.cend())
|
||||
m_page = it->second;
|
||||
}
|
||||
|
||||
m_curVol = 1.f;
|
||||
m_curPan = 0.f;
|
||||
m_ctrlVals[0x5b] = 0;
|
||||
m_ctrlVals[0x5d] = 0;
|
||||
}
|
||||
|
||||
m_curVol = m_setup.volume / 127.f;
|
||||
m_curPan = m_setup.panning / 64.f - 1.f;
|
||||
m_ctrlVals[7] = 127;
|
||||
m_ctrlVals[10] = 64;
|
||||
m_ctrlVals[0x5b] = m_setup.reverb;
|
||||
m_ctrlVals[0x5d] = m_setup.chorus;
|
||||
}
|
||||
|
||||
void Sequencer::advance(double dt)
|
||||
|
||||
Reference in New Issue
Block a user