Пример #1
0
void SynthGroupElement::NoteEnded(SynthNote *inNote, UInt32 inFrame)
{
#if DEBUG_PRINT
    printf("SynthGroupElement::NoteEnded %d %d\n", inNote->mNoteID, inNote->mState);
#endif
    SynthNoteList *list = mNoteList + inNote->mState;
    list->RemoveNote(inNote);

    GetAUInstrument()->AddFreeNote(inNote);
}
Пример #2
0
void SynthGroupElement::NoteEnded(SynthNote *inNote, UInt32 inFrame)
{
#if DEBUG_PRINT_NOTE
	printf("SynthGroupElement::NoteEnded: id %d state %d\n", inNote->mNoteID, inNote->mState);
#endif
	if (inNote->IsSounding()) {
		SynthNoteList *list = &mNoteList[inNote->GetState()];
		list->RemoveNote(inNote);
	}
	
	GetAUInstrument()->AddFreeNote(inNote);
}
Пример #3
0
void SynthGroupElement::NoteFastReleased(SynthNote *inNote)
{
#if DEBUG_PRINT_NOTE
	printf("SynthGroupElement::NoteFastReleased id %d state %d\n", inNote->mNoteID, inNote->mState);
#endif
	if (inNote->IsActive()) {
		mNoteList[inNote->GetState()].RemoveNote(inNote);
		GetAUInstrument()->DecNumActiveNotes();
		mNoteList[kNoteState_FastReleased].AddNote(inNote);
	}
	else {
		Assert(true, "ASSERT FAILED:  Attempting to fast-release non-active note");
	}
}
Пример #4
0
void SynthGroupElement::AllSoundOff(UInt32 inFrame)
{
#if DEBUG_PRINT
	printf("SynthGroupElement::AllSoundOff\n");
#endif
	SynthNote *note;
	
	for (UInt32 i=0 ; i<kNumberOfActiveNoteStates; ++i)
	{
		note = mNoteList[i].mHead;
		while (note)
		{
			SynthNote *nextNote = note->mNext;
			
			mNoteList[i].RemoveNote(note);
			note->FastRelease(inFrame);
			mNoteList[kNoteState_FastReleased].AddNote(note);
			GetAUInstrument()->DecNumActiveNotes();
			note = nextNote;
		}
	}	
}