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

Method InsertNote

Source/FamiTrackerView.cpp:1732–1746  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1730}
1731
1732void CFamiTrackerView::InsertNote(const stChanNote &Cell) { // // //
1733 // Inserts a note
1734 m_LastNote.Note = Cell.Note; // // //
1735 m_LastNote.Octave = Cell.Octave; // // //
1736
1737 auto pAction = std::make_unique<CPActionEditNote>(Cell); // // //
1738 auto &Action = *pAction; // TODO: remove
1739 if (AddAction(std::move(pAction))) {
1740 const CSettings *pSettings = FTEnv.GetSettings();
1741 if (m_pPatternEditor->GetColumn() == cursor_column_t::NOTE && !FTEnv.GetSoundGenerator()->IsPlaying() && m_iInsertKeyStepping > 0 && !pSettings->Midi.bMidiMasterSync) {
1742 StepDown();
1743 Action.SaveRedoState(static_cast<CMainFrame &>(*GetParentFrame())); // // //
1744 }
1745 }
1746}
1747
1748stChanNote CFamiTrackerView::GetInputNote(note_t Note, int Octave, std::size_t Index, int Velocity) { // // //
1749 stChannelID Channel = TranslateChannel(Index); // // //

Callers

nothing calls this directly

Calls 5

GetSettingsMethod · 0.45
GetColumnMethod · 0.45
IsPlayingMethod · 0.45
GetSoundGeneratorMethod · 0.45
SaveRedoStateMethod · 0.45

Tested by

no test coverage detected