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

Method HaltNote

Source/FamiTrackerView.cpp:1868–1894  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1866}
1867
1868void CFamiTrackerView::HaltNote(std::size_t Index, int MidiNote) const {
1869 if (MidiNote < 0 || MidiNote >= NOTE_COUNT)
1870 return;
1871
1872 // Halts a channel
1873 stChanNote NoteData; // // //
1874
1875 NoteData.Note = note_t::halt;
1876 NoteData.Instrument = GetInstrument();
1877
1878 stChannelID Channel = SplitAdjustChannel(TranslateChannel(Index), NoteData);
1879 const CChannelOrder &order = GetSongView()->GetChannelOrder();
1880 if (order.HasChannel(Channel)) {
1881 stChannelID ch = m_pNoteQueue->Cut(MidiNote, Channel);
1882 if (order.HasChannel(ch))
1883 FTEnv.GetSoundGenerator()->QueueNote(ch, NoteData, NOTE_PRIO_2);
1884
1885 if (FTEnv.GetSettings()->General.bPreviewFullRow) {
1886 NoteData.Instrument = MAX_INSTRUMENTS;
1887
1888 order.ForeachChannel([&] (stChannelID i) {
1889 if (i != ch)
1890 FTEnv.GetSoundGenerator()->QueueNote(i, NoteData, NOTE_PRIO_1);
1891 });
1892 }
1893 }
1894}
1895
1896void CFamiTrackerView::HaltNoteSingle(std::size_t Index) const
1897{

Callers

nothing calls this directly

Calls 6

HasChannelMethod · 0.80
CutMethod · 0.80
ForeachChannelMethod · 0.80
QueueNoteMethod · 0.45
GetSoundGeneratorMethod · 0.45
GetSettingsMethod · 0.45

Tested by

no test coverage detected