MCPcopy Create free account
hub / github.com/OpenFodder/openfodder / setupNote

Method setupNote

Source/Amiga/rjp1.cpp:336–353  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

334}
335
336void Rjp1::setupNote(Rjp1Channel *channel, int16 period) {
337 const uint8 *note = channel->noteData;
338 if (note) {
339 channel->modulatePeriodInit = channel->modulatePeriodNext = period;
340 channel->freqInit = 0;
341 const int8 *e = (const int8 *)_vars.songData[1] + readBEWord(note + 12);
342 channel->envelopeData = e;
343 channel->envelopeStart = e[1];
344 channel->envelopeScale = e[1] - e[0];
345 channel->envelopeEnd2 = e[2];
346 channel->envelopeEnd1 = e[2];
347 channel->envelopeMode = 4;
348 channel->data = channel->waveData;
349 channel->pos = readBEWord(note + 16);
350 channel->len = channel->pos + readBEWord(note + 18);
351 channel->setupNewNote = true;
352 }
353}
354
355void Rjp1::setupInstrument(Rjp1Channel *channel, uint8 num) {
356 if (channel->currentInstrument != num) {

Callers

nothing calls this directly

Calls 1

readBEWordFunction · 0.85

Tested by

no test coverage detected