Skip to content

Commit

Permalink
Merge pull request #19 from risgk/develop
Browse files Browse the repository at this point in the history
v2.2.5
  • Loading branch information
risgk authored Aug 16, 2023
2 parents 7baefb0 + ff9dde8 commit bf919c9
Show file tree
Hide file tree
Showing 12 changed files with 79 additions and 68 deletions.
16 changes: 8 additions & 8 deletions DigitalSynthVRA8U/constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,14 @@ const uint8_t CHORUS_BYPASS = 111;



const uint8_t SP_PROG_CHG_0 = 112;
const uint8_t SP_PROG_CHG_1 = 113;
const uint8_t SP_PROG_CHG_2 = 114;
const uint8_t SP_PROG_CHG_3 = 115;
const uint8_t SP_PROG_CHG_4 = 116;
const uint8_t SP_PROG_CHG_5 = 117;
const uint8_t SP_PROG_CHG_6 = 118;
const uint8_t SP_PROG_CHG_7 = 119;
const uint8_t SP_PROG_CHG_8 = 112;
const uint8_t SP_PROG_CHG_9 = 113;
const uint8_t SP_PROG_CHG_10 = 114;
const uint8_t SP_PROG_CHG_11 = 115;
const uint8_t SP_PROG_CHG_12 = 116;
const uint8_t SP_PROG_CHG_13 = 117;
const uint8_t SP_PROG_CHG_14 = 118;
const uint8_t SP_PROG_CHG_15 = 119;

const uint8_t ALL_SOUND_OFF = 120;
const uint8_t RESET_ALL_CTRLS = 121;
Expand Down
16 changes: 8 additions & 8 deletions DigitalSynthVRA8U/constants.rb
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,14 @@



SP_PROG_CHG_0 = 112
SP_PROG_CHG_1 = 113
SP_PROG_CHG_2 = 114
SP_PROG_CHG_3 = 115
SP_PROG_CHG_4 = 116
SP_PROG_CHG_5 = 117
SP_PROG_CHG_6 = 118
SP_PROG_CHG_7 = 119
SP_PROG_CHG_8 = 112
SP_PROG_CHG_9 = 113
SP_PROG_CHG_10 = 114
SP_PROG_CHG_11 = 115
SP_PROG_CHG_12 = 116
SP_PROG_CHG_13 = 117
SP_PROG_CHG_14 = 118
SP_PROG_CHG_15 = 119

ALL_SOUND_OFF = 120
RESET_ALL_CTRLS = 121
Expand Down
14 changes: 11 additions & 3 deletions DigitalSynthVRA8U/osc.h
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,16 @@ class Osc {

INLINE static uint16_t get_osc_pitch() {
if (m_mono_mode) {
return m_pitch_current[0] + m_pitch_bend_normalized;
uint16_t shifted_pitch = (64 << 8) + m_pitch_current[0] + m_pitch_bend_normalized;
uint16_t osc_pitch;
if (shifted_pitch > (64 << 8) + (static_cast<uint16_t>(NOTE_NUMBER_MAX) << 8)) {
osc_pitch = (static_cast<uint16_t>(NOTE_NUMBER_MAX) << 8);
} else if (shifted_pitch < (64 << 8) + (static_cast<uint16_t>(NOTE_NUMBER_MIN) << 8)) {
osc_pitch = (static_cast<uint16_t>(NOTE_NUMBER_MIN) << 8);
} else {
osc_pitch = m_pitch_current[0] + m_pitch_bend_normalized;
}
return osc_pitch;
}
return (60 << 8);
}
Expand Down Expand Up @@ -705,8 +714,7 @@ class Osc {
m_osc_gain_effective[3] = 0;

if (m_waveform[0] == WAVEFORM_1_PULSE) {
int8_t temp = high_sbyte(-m_osc_gain_effective[0] * m_osc1_morph_control);
m_osc_gain_effective[3] = temp << 2;
m_osc_gain_effective[3] = (-m_osc_gain_effective[0] * m_osc1_morph_control) >> 6;
}
}
}
Expand Down
24 changes: 12 additions & 12 deletions DigitalSynthVRA8U/voice.h
Original file line number Diff line number Diff line change
Expand Up @@ -588,20 +588,20 @@ class Voice {

#if defined(ENABLE_SPECIAL_PROGRAM_CHANGE)
// Special Program Change
case SP_PROG_CHG_0 :
case SP_PROG_CHG_1 :
case SP_PROG_CHG_2 :
case SP_PROG_CHG_3 :
case SP_PROG_CHG_4 :
case SP_PROG_CHG_5 :
case SP_PROG_CHG_6 :
case SP_PROG_CHG_7 :
case SP_PROG_CHG_8 :
case SP_PROG_CHG_9 :
case SP_PROG_CHG_10 :
case SP_PROG_CHG_11 :
case SP_PROG_CHG_12 :
case SP_PROG_CHG_13 :
case SP_PROG_CHG_14 :
case SP_PROG_CHG_15 :
{
uint8_t program_number = controller_number - SP_PROG_CHG_0;
uint8_t old_value = m_sp_prog_chg_cc_values[program_number];
m_sp_prog_chg_cc_values[program_number] = controller_value;
uint8_t program_index = controller_number - SP_PROG_CHG_8;
uint8_t old_value = m_sp_prog_chg_cc_values[program_index];
m_sp_prog_chg_cc_values[program_index] = controller_value;
if ((old_value <= 63) && (controller_value >= 64)) {
program_change(program_number);
program_change(program_index + 8);
}
}
break;
Expand Down
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Digital Synth VRA8-U v2.2.3
# Digital Synth VRA8-U v2.2.5

- 2023-07-08 ISGK Instruments
- 2023-08-16 ISGK Instruments
- <https://github.com/risgk/digital-synth-vra8-u>

## Concept
Expand All @@ -19,6 +19,11 @@

## Change History

- v2.2.5:
- Fix Pulse Wave (Fix problem with small Saw Wave sound heard)
- v2.2.4:
- Fix Filter Key Track (Fix problem with strange sound when pitch is outside of note number range)
- Change Program Change #0-7 by CC to Program Change #8-15 by CC
- v2.2.3:
- Fix Osc 2 frequency in Monophonic Mode
- v2.2.2:
Expand Down Expand Up @@ -158,11 +163,11 @@ This image was created with Fritzing.

![CC0](http://i.creativecommons.org/p/zero/1.0/88x31.png)

Digital Synth VRA8-U v2.2.3 by ISGK Instruments (Ryo Ishigaki)
Digital Synth VRA8-U v2.2.5 by ISGK Instruments (Ryo Ishigaki)

To the extent possible under law, ISGK Instruments (Ryo Ishigaki)
has waived all copyright and related or neighboring rights
to Digital Synth VRA8-U v2.2.3.
to Digital Synth VRA8-U v2.2.5.

You should have received a copy of the CC0 legalcode along with this
work. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
6 changes: 3 additions & 3 deletions VRA8-U-MIDI-Implementation-Chart.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
```
[United Synthesizer] Date: 2023-07-08
Model: Digital Synth VRA8-U MIDI Implementation Chart Version: 2.2.3
[United Synthesizer] Date: 2023-08-16
Model: Digital Synth VRA8-U MIDI Implementation Chart Version: 2.2.5
+-------------------------------+---------------+---------------+----------------------------------+
| Function... | Transmitted | Recognized | Remarks |
+-------------------------------+---------------+---------------+----------------------------------+
Expand Down Expand Up @@ -74,7 +74,7 @@
| 111 | x | o | Chorus Bypass [Off|On] |
| | | | |
| 35 | x | o | Pitch Bend by CC [-|+] |
| 112-119 | | | Program Change #0-7 by CC |
| 112-119 | | | Program Change #8-15 by CC |
| 90 | x | x | [Reserved] |
+-------------------------------+---------------+---------------+----------------------------------+
| Program | x | o | |
Expand Down
4 changes: 2 additions & 2 deletions VRA8-U-Parameter-Guide.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Digital Synth VRA8-U Parameter Guide v2.2.3
# Digital Synth VRA8-U Parameter Guide v2.2.5

- 2023-07-08 ISGK Instruments
- 2023-08-16 ISGK Instruments
- <https://github.com/risgk/digital-synth-vra8-u>

## Control Change Parameters
Expand Down
4 changes: 2 additions & 2 deletions VRA8-U-type-16-Operation-Guide.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Digital Synth VRA8-U type-16 Operation Guide v2.2.3
# Digital Synth VRA8-U type-16 Operation Guide v2.2.5

- 2023-07-08 ISGK Instruments
- 2023-08-16 ISGK Instruments
- <https://github.com/risgk/digital-synth-vra8-u>

## Concept
Expand Down
23 changes: 11 additions & 12 deletions vra8-u-ctrl.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
}
</style>
<script>
const APP_NAME_VERSION = "VRA8-U CTRL v2.2.3";
const APP_NAME_VERSION = "VRA8-U CTRL v2.2.5";

const MIDI_CH = 0; // Basic Channel 1
const NOTE_OFF = 0x80;
Expand Down Expand Up @@ -113,15 +113,14 @@
const SP_RAND_CTRL = 90;

// Special Program Change (for VRA8-U CTRL)
const SP_PROG_CHG_0 = 112;
const SP_PROG_CHG_1 = 113;
const SP_PROG_CHG_2 = 114;
const SP_PROG_CHG_3 = 115;

const SP_PROG_CHG_4 = 116;
const SP_PROG_CHG_5 = 117;
const SP_PROG_CHG_6 = 118;
const SP_PROG_CHG_7 = 119;
const SP_PROG_CHG_8 = 112;
const SP_PROG_CHG_9 = 113;
const SP_PROG_CHG_10 = 114;
const SP_PROG_CHG_11 = 115;
const SP_PROG_CHG_12 = 116;
const SP_PROG_CHG_13 = 117;
const SP_PROG_CHG_14 = 118;
const SP_PROG_CHG_15 = 119;

var controlNumberToStringMap = new Map([
[ OSC_1_WAVE , "OSC_1_WAVE " ],
Expand Down Expand Up @@ -440,9 +439,9 @@
} else {
document.getElementById("spanPB").innerHTML = pb;
}
} else if (number >= SP_PROG_CHG_0 && number <= SP_PROG_CHG_7) {
} else if (number >= SP_PROG_CHG_8 && number <= SP_PROG_CHG_15) {
// Special Program Change (only for VRA8-U CTRL)
var programIndex = number - SP_PROG_CHG_0;
var programIndex = number - SP_PROG_CHG_8;
var oldValue = specialProgramChangeCCValues[programIndex];
specialProgramChangeCCValues[programIndex] = value;
if (oldValue <= 63 && value >= 64) {
Expand Down
2 changes: 1 addition & 1 deletion vra8-u-prog-preset.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"_version " : "VRA8-U CTRL v2.2.3",
"_version " : "VRA8-U CTRL v2.2.5",
"_comment " : " CURRENT #8 #9 #10 #11 #12 #13 #14 #15 ",
"OSC_1_WAVE " : [ [0 ], [0 , 0 , 0 , 0 , 0 , 96 , 0 , 0 ] ],
"OSC_1_SHAPE " : [ [0 ], [0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ] ],
Expand Down
23 changes: 11 additions & 12 deletions vra8-u-type-16-ctrl.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
}
</style>
<script>
const APP_NAME_VERSION = "VRA8-U type-16 CTRL v2.2.3";
const APP_NAME_VERSION = "VRA8-U type-16 CTRL v2.2.5";

const MIDI_CH = 0; // Basic Channel 1
const NOTE_OFF = 0x80;
Expand Down Expand Up @@ -113,15 +113,14 @@
const SP_RAND_CTRL = 90;

// Special Program Change (for VRA8-U type-16 CTRL)
const SP_PROG_CHG_0 = 112;
const SP_PROG_CHG_1 = 113;
const SP_PROG_CHG_2 = 114;
const SP_PROG_CHG_3 = 115;

const SP_PROG_CHG_4 = 116;
const SP_PROG_CHG_5 = 117;
const SP_PROG_CHG_6 = 118;
const SP_PROG_CHG_7 = 119;
const SP_PROG_CHG_8 = 112;
const SP_PROG_CHG_9 = 113;
const SP_PROG_CHG_10 = 114;
const SP_PROG_CHG_11 = 115;
const SP_PROG_CHG_12 = 116;
const SP_PROG_CHG_13 = 117;
const SP_PROG_CHG_14 = 118;
const SP_PROG_CHG_15 = 119;

var controlNumberToStringMap = new Map([
[ OSC_1_WAVE , "OSC_1_WAVE " ],
Expand Down Expand Up @@ -440,9 +439,9 @@
} else {
document.getElementById("spanPB").innerHTML = pb;
}
} else if (number >= SP_PROG_CHG_0 && number <= SP_PROG_CHG_7) {
} else if (number >= SP_PROG_CHG_8 && number <= SP_PROG_CHG_15) {
// Special Program Change (only for VRA8-U type-16 CTRL)
var programIndex = number - SP_PROG_CHG_0;
var programIndex = number - SP_PROG_CHG_8;
var oldValue = specialProgramChangeCCValues[programIndex];
specialProgramChangeCCValues[programIndex] = value;
if (oldValue <= 63 && value >= 64) {
Expand Down
2 changes: 1 addition & 1 deletion vra8-u-type-16-prog-preset.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"_version " : "VRA8-U type-16 CTRL v2.2.3",
"_version " : "VRA8-U type-16 CTRL v2.2.5",
"_comment " : " CURRENT #8 #9 #10 #11 #12 #13 #14 #15 ",
"OSC_1_WAVE " : [ [0 ], [0 , 0 , 0 , 0 , 0 , 96 , 0 , 0 ] ],
"OSC_1_SHAPE " : [ [0 ], [0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ] ],
Expand Down

0 comments on commit bf919c9

Please sign in to comment.