Skip to content

Commit

Permalink
Scorovnik notes tune fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomek Sosnowski committed Apr 30, 2018
1 parent f074262 commit 4775be2
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
SLUG = Koralfx-Modules

# Must follow the format in the Versioning section of https://vcvrack.com/manual/PluginDevelopmentTutorial.html
VERSION = 0.6.8
VERSION = 0.6.9

# FLAGS will be passed to both the C and C++ compiler
FLAGS +=
Expand Down
44 changes: 22 additions & 22 deletions src/Scorovnik/Scorovnik.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -391,8 +391,8 @@ void Scorovnik::step() {
//A+B+C+D group
case 0:
if (groupPlay[0] == 1) {
notePitch = (params[SLIDER_NOTE_PITCH_PARAM + mode1Seq].value)*(10/122.0) ;
outputs[PITCH_OUTPUT + 0].value = notePitch + globalTranspose * (10/122.0) + uniOut;
notePitch = (params[SLIDER_NOTE_PITCH_PARAM + mode1Seq].value)*(10/120.0) ;
outputs[PITCH_OUTPUT + 0].value = notePitch + globalTranspose * (10/120.0) + uniOut;

noteStaccato = params[SWITCH_NOTE_STACCATO_PARAM + mode1Seq].value ;
noteGate = params[SWITCH_NOTE_PAUSE_ACC_PARAM + mode1Seq].value ;
Expand Down Expand Up @@ -424,8 +424,8 @@ void Scorovnik::step() {
case 1:
//A
if (groupPlay[0] == 1) {
notePitch = (params[SLIDER_NOTE_PITCH_PARAM + mode2SeqA].value)*(10/122.0) ;
outputs[PITCH_OUTPUT + 0].value = notePitch + globalTranspose * (10/122.0) + uniOut;
notePitch = (params[SLIDER_NOTE_PITCH_PARAM + mode2SeqA].value)*(10/120.0) ;
outputs[PITCH_OUTPUT + 0].value = notePitch + globalTranspose * (10/120.0) + uniOut;

noteStaccato = params[SWITCH_NOTE_STACCATO_PARAM + mode2SeqA].value ;
noteGate = params[SWITCH_NOTE_PAUSE_ACC_PARAM + mode2SeqA].value ;
Expand All @@ -451,8 +451,8 @@ void Scorovnik::step() {

//C
if (groupPlay[2] == 1) {
notePitch = (params[SLIDER_NOTE_PITCH_PARAM + mode2SeqC].value)*(10/122.0) ;
outputs[PITCH_OUTPUT + 2].value = notePitch + globalTranspose * (10/122.0) + uniOut;
notePitch = (params[SLIDER_NOTE_PITCH_PARAM + mode2SeqC].value)*(10/120.0) ;
outputs[PITCH_OUTPUT + 2].value = notePitch + globalTranspose * (10/120.0) + uniOut;

noteStaccato = params[SWITCH_NOTE_STACCATO_PARAM + mode2SeqC].value ;
noteGate = params[SWITCH_NOTE_PAUSE_ACC_PARAM + mode2SeqC].value ;
Expand Down Expand Up @@ -484,8 +484,8 @@ void Scorovnik::step() {
case 2:
//A
if (groupPlay[0] == 1) {
notePitch = (params[SLIDER_NOTE_PITCH_PARAM + mode3SeqA].value)*(10/122.0) ;
outputs[PITCH_OUTPUT + 0].value = notePitch + globalTranspose * (10/122.0) + uniOut;
notePitch = (params[SLIDER_NOTE_PITCH_PARAM + mode3SeqA].value)*(10/120.0) ;
outputs[PITCH_OUTPUT + 0].value = notePitch + globalTranspose * (10/120.0) + uniOut;

noteStaccato = params[SWITCH_NOTE_STACCATO_PARAM + mode3SeqA].value ;
noteGate = params[SWITCH_NOTE_PAUSE_ACC_PARAM + mode3SeqA].value ;
Expand All @@ -511,8 +511,8 @@ void Scorovnik::step() {

//B
if (groupPlay[1] == 1) {
notePitch = (params[SLIDER_NOTE_PITCH_PARAM + mode3SeqB].value)*(10/122.0) ;
outputs[PITCH_OUTPUT + 1].value = notePitch + globalTranspose * (10/122.0) + uniOut;
notePitch = (params[SLIDER_NOTE_PITCH_PARAM + mode3SeqB].value)*(10/120.0) ;
outputs[PITCH_OUTPUT + 1].value = notePitch + globalTranspose * (10/120.0) + uniOut;

noteStaccato = params[SWITCH_NOTE_STACCATO_PARAM + mode3SeqB].value ;
noteGate = params[SWITCH_NOTE_PAUSE_ACC_PARAM + mode3SeqB].value ;
Expand All @@ -539,8 +539,8 @@ void Scorovnik::step() {

//C
if (groupPlay[2] == 1) {
notePitch = (params[SLIDER_NOTE_PITCH_PARAM + mode3SeqC].value)*(10/122.0) ;
outputs[PITCH_OUTPUT + 2].value = notePitch + globalTranspose * (10/122.0) + uniOut;
notePitch = (params[SLIDER_NOTE_PITCH_PARAM + mode3SeqC].value)*(10/120.0) ;
outputs[PITCH_OUTPUT + 2].value = notePitch + globalTranspose * (10/120.0) + uniOut;

noteStaccato = params[SWITCH_NOTE_STACCATO_PARAM + mode3SeqC].value ;
noteGate = params[SWITCH_NOTE_PAUSE_ACC_PARAM + mode3SeqC].value ;
Expand All @@ -567,8 +567,8 @@ void Scorovnik::step() {

//D
if (groupPlay[3] == 1) {
notePitch = (params[SLIDER_NOTE_PITCH_PARAM + mode3SeqD].value)*(10/122.0) ;
outputs[PITCH_OUTPUT + 3].value = notePitch + globalTranspose * (10/122.0) + uniOut;
notePitch = (params[SLIDER_NOTE_PITCH_PARAM + mode3SeqD].value)*(10/120.0) ;
outputs[PITCH_OUTPUT + 3].value = notePitch + globalTranspose * (10/120.0) + uniOut;

noteStaccato = params[SWITCH_NOTE_STACCATO_PARAM + mode3SeqD].value ;
noteGate = params[SWITCH_NOTE_PAUSE_ACC_PARAM + mode3SeqD].value ;
Expand Down Expand Up @@ -714,19 +714,19 @@ void Scorovnik::step() {
case 0:
notePulseGeneratorA.trigger(gateMonitorTime);
outputs[GATE_OUTPUT + 0].value = 10;
outputs[PITCH_OUTPUT + 0].value = note * (10/122.0) + globalTranspose * (10/122.0) + uniOut;
outputs[PITCH_OUTPUT + 0].value = note * (10/120.0) + globalTranspose * (10/120.0) + uniOut;

break;

case 1:
if (sliderTouch<16) {
notePulseGeneratorA.trigger(gateMonitorTime);
outputs[GATE_OUTPUT + 0].value = 10;
outputs[PITCH_OUTPUT +0].value = note * (10/122.0) + globalTranspose * (10/122.0) + uniOut;
outputs[PITCH_OUTPUT +0].value = note * (10/120.0) + globalTranspose * (10/120.0) + uniOut;
} else {
notePulseGeneratorC.trigger(gateMonitorTime);
outputs[GATE_OUTPUT + 2].value = 10;
outputs[PITCH_OUTPUT +2].value = note * (10/122.0) + globalTranspose * (10/122.0) + uniOut;
outputs[PITCH_OUTPUT +2].value = note * (10/120.0) + globalTranspose * (10/120.0) + uniOut;
}

break;
Expand All @@ -735,24 +735,24 @@ void Scorovnik::step() {
if (sliderTouch<8) {
notePulseGeneratorA.trigger(gateMonitorTime);
outputs[GATE_OUTPUT + 0].value = 10;
outputs[PITCH_OUTPUT +0].value = note * (10/122.0) + globalTranspose * (10/122.0) + uniOut;
outputs[PITCH_OUTPUT +0].value = note * (10/120.0) + globalTranspose * (10/120.0) + uniOut;
}
if (sliderTouch >=8 && sliderTouch <24) {
if (sliderTouch<16) {
notePulseGeneratorB.trigger(gateMonitorTime);
outputs[GATE_OUTPUT +1].value = 10;
outputs[PITCH_OUTPUT +1].value = note * (10/122.0) + globalTranspose * (10/122.0) + uniOut;
outputs[PITCH_OUTPUT +1].value = note * (10/120.0) + globalTranspose * (10/120.0) + uniOut;
} else {
notePulseGeneratorC.trigger(gateMonitorTime);
outputs[GATE_OUTPUT +2].value = 10;
outputs[PITCH_OUTPUT +2].value = note * (10/122.0) + globalTranspose * (10/122.0) + uniOut;
outputs[PITCH_OUTPUT +2].value = note * (10/120.0) + globalTranspose * (10/120.0) + uniOut;
}
}

if (sliderTouch>=24) {
notePulseGeneratorD.trigger(gateMonitorTime);
outputs[GATE_OUTPUT + 3].value = 10;
outputs[PITCH_OUTPUT +3].value = note * (10/122.0) + globalTranspose * (10/122.0) + uniOut;
outputs[PITCH_OUTPUT +3].value = note * (10/120.0) + globalTranspose * (10/120.0) + uniOut;
}
break;
} // End of Switch
Expand Down Expand Up @@ -808,7 +808,7 @@ void Scorovnik::fromJson(json_t *rootJ) {



printf("%d\n", groupPlay[0]);



json_t *j_mode1SeqEnd = json_object_get(rootJ, "mode1SeqEnd");
Expand Down

0 comments on commit 4775be2

Please sign in to comment.