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

Method GetEffectString

Source/ChannelHandler.cpp:219–248  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

217}
218
219std::string CChannelHandler::GetEffectString() const // // //
220{
221 std::string str = GetSlideEffectString();
222
223 if (m_iVibratoSpeed)
224 str += MakeCommandString({effect_t::VIBRATO, static_cast<uint8_t>((m_iVibratoSpeed << 4) | (m_iVibratoDepth >> 4))});
225 if (m_iTremoloSpeed)
226 str += MakeCommandString({effect_t::TREMOLO, static_cast<uint8_t>((m_iTremoloSpeed << 4) | (m_iTremoloDepth >> 4))});
227 if (m_iVolSlide)
228 str += MakeCommandString({effect_t::VOLUME_SLIDE, m_iVolSlide});
229 if (m_iFinePitch != 0x80)
230 str += MakeCommandString({effect_t::PITCH, static_cast<uint8_t>(m_iFinePitch)});
231 if ((m_iDefaultDuty && m_iChannelID.Chip != sound_chip_t::S5B) || (m_iDefaultDuty != 0x40 && m_iChannelID.Chip == sound_chip_t::S5B))
232 str += MakeCommandString({effect_t::DUTY_CYCLE, m_iDefaultDuty});
233
234 // run-time effects
235 if (m_bDelayEnabled)
236 str += MakeCommandString({effect_t::DELAY, m_cDelayCounter + 1u});
237 if (m_iNoteRelease)
238 str += MakeCommandString({effect_t::NOTE_RELEASE, m_iNoteRelease});
239 if (m_iNoteVolume > 0)
240 str += MakeCommandString({effect_t::DELAYED_VOLUME, static_cast<uint8_t>((m_iNoteVolume << 4) | (m_iNewVolume >> VOL_COLUMN_SHIFT))});
241 if (m_iNoteCut)
242 str += MakeCommandString({effect_t::NOTE_CUT, m_iNoteCut});
243 if (m_iTranspose)
244 str += MakeCommandString({effect_t::TRANSPOSE, static_cast<uint8_t>(((m_iTranspose + (m_bTransposeDown ? 8 : 0)) << 4) | m_iTransposeTarget)});
245
246 str += GetCustomEffectString();
247 return str.empty() ? std::string(" None") : str;
248}
249
250std::string CChannelHandler::GetSlideEffectString() const // // //
251{

Callers

nothing calls this directly

Calls 2

MakeCommandStringFunction · 0.85
emptyMethod · 0.80

Tested by

no test coverage detected