Re: GBtracker Alpha 0.0.1
Posted: Fri Jun 17, 2016 3:09 pm
Thanks Rodot.
Yes I plan for instrument support. Tracks are already supported
Yes I plan for instrument support. Tracks are already supported
void Sound::playPattern(const uint16_t* pattern, uint8_t channel) {
#if(NUM_CHANNELS > 0)
if (channel >= NUM_CHANNELS)
return;
stopPattern(channel);
patternData[channel] = (uint16_t*)pattern;
patternCursor[channel] = 0;
patternIsPlaying[channel] = true;
noteVolume[channel] = 9;
//reinit commands
volumeSlideStepDuration[channel] = 0;
arpeggioStepDuration[channel] = 0;
tremoloStepDuration[channel] = 0;
//Serial.print("play pattern\n");
#endif
}
void Sound::playPattern(const uint16_t* pattern, uint8_t channel) {
#if(NUM_CHANNELS > 0)
if (channel >= NUM_CHANNELS)
return;
stopPattern(channel);
patternData[channel] = (uint16_t*)pattern;
patternCursor[channel] = 0;
patternIsPlaying[channel] = true;
if (!trackIsPlaying[channel])
{
noteVolume[channel] = 9;
//reinit commands
volumeSlideStepDuration[channel] = 0;
arpeggioStepDuration[channel] = 0;
tremoloStepDuration[channel] = 0;
}
//Serial.print("play pattern\n");
#endif
}