MCPcopy Create free account
hub / github.com/HertzDevil/0CC-FamiTracker / UpdateInstrument

Method UpdateInstrument

Source/SeqInstHandler.cpp:90–123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

88}
89
90void CSeqInstHandler::UpdateInstrument()
91{
92 if (!m_pInterface->IsActive())
93 return;
94 for (auto &[_, info] : m_SequenceInfo) {
95 (void)_;
96 const auto &pSeq = info.m_pSequence;
97 if (!pSeq || pSeq->GetItemCount() == 0)
98 continue;
99 switch (info.m_iSeqState) {
100 case seq_state_t::Running:
101 ProcessSequence(*pSeq, info.m_iSeqPointer);
102 info.Step(m_pInterface->IsReleasing());
103 break;
104
105 case seq_state_t::End:
106 switch (pSeq->GetSequenceType()) {
107 case sequence_t::Arpeggio:
108 if (pSeq->GetSetting() == SETTING_ARP_FIXED)
109 m_pInterface->SetPeriod(m_pInterface->TriggerNote(m_pInterface->GetNote()));
110 break;
111 }
112 info.m_iSeqState = seq_state_t::Halt;
113#ifndef FT0CC_EXT_BUILD
114 FTEnv.GetSoundGenerator()->SetSequencePlayPos(pSeq, -1);
115#endif
116 break;
117
118 case seq_state_t::Halt:
119 case seq_state_t::Disabled:
120 break;
121 }
122 }
123}
124
125bool CSeqInstHandler::ProcessSequence(const CSequence &Seq, int Pos)
126{

Callers 1

ProcessChannelMethod · 0.45

Calls 11

IsActiveMethod · 0.80
IsReleasingMethod · 0.80
GetSequenceTypeMethod · 0.80
GetSettingMethod · 0.80
SetPeriodMethod · 0.80
SetSequencePlayPosMethod · 0.80
GetItemCountMethod · 0.45
StepMethod · 0.45
TriggerNoteMethod · 0.45
GetNoteMethod · 0.45
GetSoundGeneratorMethod · 0.45

Tested by

no test coverage detected