Skip to content

Commit 74101d3

Browse files
MainMain
authored andcommitted
Various bugfixes
- Fixed a bug where Noise channels have incorrect labels in Mod channels - Fixed a bug where pasting mod channels would result in an invalid instrument type - Fixed a bug where drumset spectrums wouldn't get marked as dirty, resulting in strange behavior - Made the document.title changes consistent - Updated the "Instrument Type" tip prompt and manifest.webmanifest - Removed unnecessary and incorrect ,operatorRow code in Layout.ts - Removed scrollbars from the instrument settings
1 parent 9df59e6 commit 74101d3

File tree

7 files changed

+18
-18
lines changed

7 files changed

+18
-18
lines changed

editor/Layout.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,6 @@ export class Layout {
6666
.beepboxEditor.selectRow {
6767
height: 2em;
6868
}
69-
.beepboxEditor .operatorRow {
70-
heiht: 2em;
71-
}
7269
.beepboxEditor .trackAndMuteContainer {
7370
max-height: 446px;
7471
}

editor/Piano.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -435,15 +435,15 @@ export class Piano {
435435
}
436436
break;
437437
case 2:
438-
channelVal = instrument.modChannels[Config.modCount - j - 1] + 1 - this._doc.song.pitchChannelCount;
439-
instrumentsLength = this._doc.song.channels[channelVal - 1].instruments.length;
438+
const absoluteChannelVal: number = instrument.modChannels[Config.modCount - j - 1];
439+
const relativeChannelVal: number = absoluteChannelVal - this._doc.song.pitchChannelCount;
440440

441-
if (this._doc.song.channels[channelVal - 1].name == "") {
441+
if (this._doc.song.channels[absoluteChannelVal].name == "") {
442442

443443
if (instrumentsLength > 1) {
444444

445-
if (channelVal >= 10 || instrumentVal >= 10) {
446-
firstRow = "N" + channelVal;
445+
if ((relativeChannelVal + 1) >= 10 || instrumentVal >= 10) {
446+
firstRow = "N" + (relativeChannelVal + 1);
447447
if (instrumentVal - 1 == instrumentsLength) {
448448
firstRow += " All";
449449
}
@@ -455,7 +455,7 @@ export class Piano {
455455
}
456456
}
457457
else {
458-
firstRow = "Noise" + channelVal;
458+
firstRow = "Noise" + (relativeChannelVal + 1);
459459
if (instrumentVal - 1 == instrumentsLength) {
460460
firstRow += " All";
461461
}
@@ -468,7 +468,7 @@ export class Piano {
468468
}
469469
}
470470
else {
471-
firstRow = "Noise " + channelVal;
471+
firstRow = "Noise " + (relativeChannelVal + 1);
472472
}
473473
} else {
474474

@@ -482,10 +482,10 @@ export class Piano {
482482
} else {
483483
insText = " I" + instrumentVal;
484484
}
485-
firstRow = "N" + channelVal + " " + this._doc.song.channels[channelVal - 1].name + insText;
485+
firstRow = "N" + (relativeChannelVal + 1) + " " + this._doc.song.channels[absoluteChannelVal].name + insText;
486486
}
487487
else {
488-
firstRow = "N" + channelVal + " " + this._doc.song.channels[channelVal - 1].name;
488+
firstRow = "N" + (relativeChannelVal + 1) + " " + this._doc.song.channels[absoluteChannelVal].name;
489489
}
490490

491491
}

editor/SongEditor.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3681,6 +3681,7 @@ export class SongEditor {
36813681
const instrument: Instrument = channel.instruments[this._doc.getCurrentInstrument()];
36823682
const instrumentCopy: any = instrument.toJsonObject();
36833683
instrumentCopy["isDrum"] = this._doc.song.getChannelIsNoise(this._doc.channel);
3684+
instrumentCopy["isMod"] = this._doc.song.getChannelIsMod(this._doc.channel);
36843685
window.localStorage.setItem("instrumentCopy", JSON.stringify(instrumentCopy));
36853686
this.refocusStage();
36863687
}
@@ -3689,7 +3690,7 @@ export class SongEditor {
36893690
const channel: Channel = this._doc.song.channels[this._doc.channel];
36903691
const instrument: Instrument = channel.instruments[this._doc.getCurrentInstrument()];
36913692
const instrumentCopy: any = JSON.parse(String(window.localStorage.getItem("instrumentCopy")));
3692-
if (instrumentCopy != null && instrumentCopy["isDrum"] == this._doc.song.getChannelIsNoise(this._doc.channel)) {
3693+
if (instrumentCopy != null && instrumentCopy["isDrum"] == this._doc.song.getChannelIsNoise(this._doc.channel) && instrumentCopy["isMod"] == this._doc.song.getChannelIsMod(this._doc.channel)) {
36933694
this._doc.record(new ChangePasteInstrument(this._doc, instrument, instrumentCopy));
36943695
}
36953696
this.refocusStage();

editor/TipPrompt.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ export class TipPrompt implements Prompt {
109109
message = div(
110110
h2("Instrument Type"),
111111
p("JummBox comes with many instrument presets, try them out! You can also create your own custom instruments!"),
112-
p("There are also options for copying and pasting instrument settings and for generating random instruments at the top of the instrument type menu."),
112+
p("There are also buttons for copying and pasting instruments at the bottom of the instrument settings tab, and for generating random instruments in the \"Randomize\" category in the instrument type menu."),
113113
);
114114
} break;
115115
case "eqFilter": {

editor/style.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@ document.head.appendChild(HTML.style({ type: "text/css" }, `
220220
-ms-transition: opacity 0.5s ease-in;
221221
transition: opacity 0.5s ease-in;
222222
transition-delay: 0.45s;
223+
scrollbar-width: none;
223224
}
224225
225226
.trackAndMuteContainer {

synth/synth.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2011,6 +2011,7 @@ export class Instrument {
20112011
this.drumsetSpectrumWaves[j].spectrum[i] = Math.max(0, Math.min(Config.spectrumMax, Math.round(Config.spectrumMax * (+drum["spectrum"][i]) / 100)));
20122012
}
20132013
}
2014+
this.drumsetSpectrumWaves[j].markCustomWaveDirty();
20142015
}
20152016
}
20162017
}
@@ -2510,7 +2511,7 @@ export class Song {
25102511
this.patternInstruments = false;
25112512

25122513
this.title = "Unnamed";
2513-
document.title = EditorConfig.versionDisplayName;
2514+
document.title = this.title + " - " + EditorConfig.versionDisplayName;
25142515

25152516
if (andResetChannels) {
25162517
this.pitchChannelCount = 3;

website/manifest.webmanifest

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"name": "BeepBox",
3-
"short_name": "BeepBox",
4-
"description": "BeepBox is a tool for sketching and sharing instrumental melodies.",
2+
"name": "JummBox",
3+
"short_name": "JummBox",
4+
"description": "JummBox is a tool for sketching and sharing instrumental melodies.",
55
"scope": "/",
66
"start_url": ".",
77
"display": "browser",

0 commit comments

Comments
 (0)