Skip to content

Commit b1290db

Browse files
- State: Added Roland HyperCanvas mode.
- Cambiare: Added Roland HyperCanvas definitions.
1 parent 6cf949c commit b1290db

5 files changed

Lines changed: 51 additions & 11 deletions

File tree

src/cambiare/cambiare.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,13 @@ div.cambiare-canvas div.part-channel.part-mode-cs1x {
7171
}
7272
div.cambiare-canvas.cambiare-mode-gm,
7373
div.cambiare-canvas.cambiare-mode-g2,
74+
div.cambiare-canvas.cambiare-mode-rhc,
7475
div.cambiare-canvas.cambiare-mode-pa,
7576
div.cambiare-canvas.cambiare-mode-krs,
7677
div.cambiare-canvas.cambiare-mode-gus,
7778
div.cambiare-canvas div.part-channel.part-mode-gm,
7879
div.cambiare-canvas div.part-channel.part-mode-g2,
80+
div.cambiare-canvas div.part-channel.part-mode-rhc,
7981
div.cambiare-canvas div.part-channel.part-mode-pa,
8082
div.cambiare-canvas div.part-channel.part-mode-krs,
8183
div.cambiare-canvas div.part-channel.part-mode-gus {
@@ -127,11 +129,13 @@ div.cambiare-canvas.cambiare-scheme-light div.part-channel.part-mode-cs1x {
127129
}
128130
div.cambiare-canvas.cambiare-scheme-light.cambiare-mode-gm,
129131
div.cambiare-canvas.cambiare-scheme-light.cambiare-mode-g2,
132+
div.cambiare-canvas.cambiare-scheme-light.cambiare-mode-rhc,
130133
div.cambiare-canvas.cambiare-scheme-light.cambiare-mode-pa,
131134
div.cambiare-canvas.cambiare-scheme-light.cambiare-mode-krs,
132135
div.cambiare-canvas.cambiare-scheme-light.cambiare-mode-gus,
133136
div.cambiare-canvas.cambiare-scheme-light div.part-channel.part-mode-gm,
134137
div.cambiare-canvas.cambiare-scheme-light div.part-channel.part-mode-g2,
138+
div.cambiare-canvas.cambiare-scheme-light div.part-channel.part-mode-rhc,
135139
div.cambiare-canvas.cambiare-scheme-light div.part-channel.part-mode-pa,
136140
div.cambiare-canvas.cambiare-scheme-light div.part-channel.part-mode-krs,
137141
div.cambiare-canvas.cambiare-scheme-light div.part-channel.part-mode-gus {

src/cambiare/index.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ const modeNames = {
2727
"qy20": "Yamaha QY20",
2828
"gus": "Gravis UltraSound",
2929
"sd": "Roland SD",
30+
"rhc": "Roland HyperCanvas",
3031
"x5d": "Korg X5D",
3132
"05rw": "Korg 05R/W",
3233
"ns5r": "Korg NS5R",
@@ -136,6 +137,7 @@ const modeColourPool = {
136137
"cs1x": ["9efaa0", "007f00"],
137138
"gm": ["a1f3ff", "006dc4"],
138139
"g2": ["a1f3ff", "006dc4"],
140+
"rhc": ["a1f3ff", "006dc4"],
139141
"pa": ["a1f3ff", "006dc4"],
140142
"krs": ["a1f3ff", "006dc4"],
141143
"gus": ["a1f3ff", "006dc4"],

src/state/bankReader.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,8 @@ let VoiceBank = class {
214214
};
215215
break;
216216
};
217-
case "g2": {
217+
case "g2":
218+
case "rhc": {
218219
// Should only be present under SD mode
219220
// However before non-resetting mode switches are available
220221
// This is the only way
@@ -1041,7 +1042,8 @@ let VoiceBank = class {
10411042
ending = "?";
10421043
break;
10431044
};
1044-
case "g2": {
1045+
case "g2":
1046+
case "rhc": {
10451047
bankName = "GM2 Ext?";
10461048
ending = "?";
10471049
break;

src/state/index.mjs

Lines changed: 40 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ const modeIdx = [
5858
"gm", "gs", "sc", "xg", "g2", "gus",
5959
"mt32", "doc", "qy10", "qy20",
6060
"ns5r", "x5d", "05rw",
61-
"k11", "sg", "sd", "pa",
61+
"k11", "sg", "sd", "pa", "rhc",
6262
"krs", "s90es", "motif", "cs6x", "trin",
6363
"an1x", "cs1x"
6464
],
@@ -90,6 +90,7 @@ let modeDetailsData = { // subMsb, subLsb, drumMsb, defaultMsb, defaultLsb
9090
"sc": [0, 0, 128, 0, 0],
9191
"xg": [0, 0, 127, 0, 0],
9292
"g2": [0, 0, 120, 0, 0],
93+
"rhc": [0, 0, 120, 0, 0],
9394
"mt32": [0, 127, 128, 0, 127],
9495
"doc": [57, 112, 127, 57, 112],
9596
"qy10": [57, 113, 127, 57, 113],
@@ -1155,7 +1156,8 @@ let OctaviaDevice = class OctaviaDevice extends CustomEventSource {
11551156
};
11561157
break;
11571158
};
1158-
case modeMap.g2: {
1159+
case modeMap.g2:
1160+
case modeMap.rhc: {
11591161
if (det.data[1] === 120) {
11601162
if (upThis.#chType[part] === 0) {
11611163
upThis.setChType(part, upThis.CH_DRUMS);
@@ -1204,6 +1206,34 @@ let OctaviaDevice = class OctaviaDevice extends CustomEventSource {
12041206
case 0x4100: {
12051207
break;
12061208
};
1209+
case 0x587f: {
1210+
upThis.switchMode("rhc", 2);
1211+
upThis.setPortModeId(part >> 4, 1, modeMap.rhc);
1212+
console.info(`MIDI reset: Roland HyperCanvas (NRPN)`);
1213+
return;
1214+
break;
1215+
};
1216+
default: {
1217+
if (msb === 88) {
1218+
console.warn(`NRPN 0x${combined.toString(16).padStart(4, "0")} is specific of Roland HyperCanvas. Please reset into respective mode by committing NRPN 0x587f first.`);
1219+
} else {
1220+
warnNRPN = true;
1221+
};
1222+
};
1223+
};
1224+
break;
1225+
};
1226+
case modeMap.rhc: {
1227+
switch (combined) {
1228+
/*case 0x5870: {
1229+
upThis.#master.volume = (det.data[1] * 129) / 163.83;
1230+
return;
1231+
break;
1232+
};*/
1233+
case 0x587f: {
1234+
return;
1235+
break;
1236+
};
12071237
default: {
12081238
warnNRPN = true;
12091239
};
@@ -1215,7 +1245,7 @@ let OctaviaDevice = class OctaviaDevice extends CustomEventSource {
12151245
};
12161246
};
12171247
if (warnNRPN) {
1218-
console.warn(`NRPN (0x${combined.toString(16).padStart(4, "0")}) commits are not available under "${modeIdx[upThis.getChModeId(part)]}" mode, even when they are supported in Octavia. Please consider using non-NRPN CC or SysEx instead if available.`);
1248+
console.warn(`NRPN (0x${combined.toString(16).padStart(4, "0")}) commits are not available under "${modeIdx[upThis.getChModeId(part)]}" mode, even when they may be supported in Octavia. Please consider using non-NRPN CC or SysEx instead if available.`);
12191249
};
12201250
if (msb === 1) {
12211251
let toCc = nrpnCcMap.indexOf(lsb);
@@ -1232,13 +1262,14 @@ let OctaviaDevice = class OctaviaDevice extends CustomEventSource {
12321262
if (nrpnIdx > -1) {
12331263
upThis.#nrpn[part * 10 + nrpnIdx] = det.data[1] - 64;
12341264
} else {
1235-
console.warn(`NRPN 0x01${lsb.toString(16).padStart(2, "0")} is not supported.`);
1265+
console.warn(`NRPN 0x01${lsb.toString(16).padStart(2, "0")} has no global support implemented. Please check if the selected parameter actually exists.`);
12361266
};
12371267
getDebugState() && console.debug(`CH${part + 1} voice NRPN ${lsb} commit`);
12381268
};
12391269
} else {
12401270
switch (upThis.getChModeId(part)) {
1241-
case modeMap.g2: {
1271+
case modeMap.g2:
1272+
case modeMap.rhc: {
12421273
if (combined === 0x4100) {
12431274
let dPref = `CH${part + 1} Roland SD GM2 NRPN voice set:`;
12441275
if (det.data[1] >= 0 && det.data[1] < 4) {
@@ -1256,13 +1287,13 @@ let OctaviaDevice = class OctaviaDevice extends CustomEventSource {
12561287
};
12571288
default: {
12581289
let nrpnIdx = useDrumNrpn.indexOf(msb);
1259-
console.debug(nrpnIdx);
1290+
//console.debug(nrpnIdx);
12601291
if (nrpnIdx < 0) {
12611292
let dPref = `NRPN 0x${msb.toString(16).padStart(2, "0")}${lsb.toString(16).padStart(2, "0")} `;
12621293
if (msb === 127) {
12631294
console.warn(`${dPref}is not necessary. Consider removing it.`);
12641295
} else {
1265-
console.warn(`${dPref}is not supported.`);
1296+
console.warn(`${dPref}has global no support implemented. Please check if the selected parameter actually exists.`);
12661297
};
12671298
} else {
12681299
let targetSlot = upThis.#chType[part] - 2;
@@ -2678,7 +2709,8 @@ let OctaviaDevice = class OctaviaDevice extends CustomEventSource {
26782709
let efxDefault, efxBlank;
26792710
switch (idx) {
26802711
case modeMap["?"]:
2681-
case modeMap.g2: {
2712+
case modeMap.g2:
2713+
case modeMap.rhc: {
26822714
efxDefault = [52, 4, 52, 18, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255];
26832715
break;
26842716
};

test/cambiare.htm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<script defer src="./js/cambiare_demo.js"></script>
2323
</head>
2424
<body>
25-
<div class="container" x-data="{modes:{'?':['Auto Detect',255],'gm':['General MIDI',1],'gus':['Gravis UltraSound', 1],'xg':['Yamaha XG',1],'gs':['Roland GS',1],'sc':['Roland SC',1],'ns5r':['KORG NS5R',1],'05rw':['KORG 05R/W',1],'x5d':['KORG X5D',1],'k11':['Kawai GMega',1],'sg':['Akai SG',1],'g2':['General MIDI 2',2],'sd':['Roland SD',2],'pa':['KORG PA',2],'krs':['KORG KROSS 2',2],'cs1x':['Yamaha CS1x',1],'cs6x':['Yamaha CS6x',1],'s90es':['Yamaha S90 ES',1],'motif':['Yamaha Motif ES',1],'trin':['KORG Trinity',1],'mt32':['Roland MT-32',0],'doc':['Yamaha DOC',0],'qy10':['Yamaha QY10',0],'qy20':['Yamaha QY20',0]}}">
25+
<div class="container" x-data="{modes:{'?':['Auto Detect',255],'gm':['General MIDI',1],'gus':['Gravis UltraSound', 1],'xg':['Yamaha XG',1],'gs':['Roland GS',1],'sc':['Roland SC',1],'ns5r':['KORG NS5R',1],'05rw':['KORG 05R/W',1],'x5d':['KORG X5D',1],'k11':['Kawai GMega',1],'sg':['Akai SG',1],'g2':['General MIDI 2',2],'sd':['Roland SD',2],'rhc':['Roland HyperCanvas',2],'pa':['KORG PA',2],'krs':['KORG KROSS 2',2],'cs1x':['Yamaha CS1x',1],'cs6x':['Yamaha CS6x',1],'s90es':['Yamaha S90 ES',1],'motif':['Yamaha Motif ES',1],'trin':['KORG Trinity',1],'mt32':['Roland MT-32',0],'doc':['Yamaha DOC',0],'qy10':['Yamaha QY10',0],'qy20':['Yamaha QY20',0]}}">
2626
<div class="columns is-multiline is-mobile is-vcentered" x-data="{active:[],profiles:{'none':'None','chromium':'Chrome','macos':'macOS'},dumps:[[0,'All','Place no restrictions on dumps.'],[2,'Mode','Only dumps with the same mode as the channel are allowed.']]}">
2727
<div class="column column-option"><b>Open from</b></div>
2828
<div class="column column-option column-button" @click="gOpenSmf()" :active="$store.play=='smf'?'true':'false'" title="Open MIDI files, SysEx blobs or bank files.">MIDI</div>

0 commit comments

Comments
 (0)