improve chanosc note text and chan volume feedback
This commit is contained in:
parent
f93dd893c8
commit
14fd246edb
2 changed files with 14 additions and 7 deletions
|
|
@ -928,9 +928,16 @@ void FurnaceGUI::drawChanOsc() {
|
|||
}
|
||||
case 'n': {
|
||||
DivChannelState* chanState=e->getChanState(ch);
|
||||
if (chanState==NULL || !(chanState->keyOn)) break;
|
||||
// no more conversion necessary after the note/octave unification :>
|
||||
text+=fmt::sprintf("%s",noteName(chanState->note+60));
|
||||
// ik its pretty hacky but it works
|
||||
// the templated stuff is after the member we need to access so it shouldnt matter
|
||||
// and no segfaults should occur
|
||||
SharedChannel<char>* chan=(SharedChannel<char>*)e->getDispatchChanState(ch);
|
||||
if (chanState==NULL || chan==NULL || !chan->active) {
|
||||
text+="---";
|
||||
} else {
|
||||
// no more conversion necessary after the note/octave unification :>
|
||||
text+=fmt::sprintf("%s",noteName(chanState->note+60));
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 'l':
|
||||
|
|
|
|||
|
|
@ -675,9 +675,9 @@ void FurnaceGUI::drawPattern() {
|
|||
}
|
||||
if (settings.channelFeedbackStyle==2 && e->isRunning()) {
|
||||
float amount=((float)(e->getChanState(i)->volume>>8)/(float)e->getMaxVolumeChan(i));
|
||||
if (!e->getChanState(i)->keyOn) amount=0.0f;
|
||||
if (e->getChanState(i)->keyOff) amount=0.0f;
|
||||
keyHit[i]=amount*0.2f;
|
||||
if (!muted) {
|
||||
if (!muted && e->getChanState(i)->keyOn) {
|
||||
int note=e->getChanState(i)->note+60;
|
||||
if (note>=0 && note<180) {
|
||||
pianoKeyHit[note].value=amount;
|
||||
|
|
@ -696,9 +696,9 @@ void FurnaceGUI::drawPattern() {
|
|||
}
|
||||
} else if (settings.channelFeedbackStyle==4 && e->isRunning()) {
|
||||
float amount=powf(chanOscVol[i],settings.channelFeedbackGamma);
|
||||
if (!e->getChanState(i)->keyOn) amount=0.0f;
|
||||
if (e->getChanState(i)->keyOff) amount=0.0f;
|
||||
keyHit[i]=amount*0.2f;
|
||||
if (!muted) {
|
||||
if (!muted && e->getChanState(i)->keyOn) {
|
||||
int note=e->getChanState(i)->note+60;
|
||||
if (note>=0 && note<180) {
|
||||
pianoKeyHit[note].value=amount;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue