Skip to content

Commit e13b321

Browse files
committed
Added a second orchestra hit preset and some slight color variation to the pattern editor pitch background rectangles.
1 parent 9581b68 commit e13b321

File tree

5 files changed

+27
-9
lines changed

5 files changed

+27
-9
lines changed

editor/ColorConfig.ts

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,39 @@ namespace beepbox {
99
}
1010

1111
export class ColorConfig {
12-
public static readonly pitchColors: DictionaryArray<ChannelColors> = toNameMap([
12+
public static readonly pitchChannelColors: DictionaryArray<ChannelColors> = toNameMap([
1313
{name: "cyan", channelDim: "#0099a1", channelBright: "#25f3ff", noteDim: "#00bdc7", noteBright: "#92f9ff"},
1414
{name: "yellow", channelDim: "#a1a100", channelBright: "#ffff25", noteDim: "#c7c700", noteBright: "#ffff92"},
1515
{name: "orange", channelDim: "#c75000", channelBright: "#ff9752", noteDim: "#ff771c", noteBright: "#ffcdab"},
1616
{name: "green", channelDim: "#00a100", channelBright: "#50ff50", noteDim: "#00c700", noteBright: "#a0ffa0"},
1717
{name: "purple", channelDim: "#d020d0", channelBright: "#ff90ff", noteDim: "#e040e0", noteBright: "#ffc0ff"},
1818
{name: "blue", channelDim: "#7777b0", channelBright: "#a0a0ff", noteDim: "#8888d0", noteBright: "#d0d0ff"},
1919
]);
20-
public static readonly noiseColors: DictionaryArray<ChannelColors> = toNameMap([
20+
public static readonly noiseChannelColors: DictionaryArray<ChannelColors> = toNameMap([
2121
{name: "gray", channelDim: "#6f6f6f", channelBright: "#aaaaaa", noteDim: "#a7a7a7", noteBright: "#e0e0e0"},
2222
{name: "brown", channelDim: "#996633", channelBright: "#ddaa77", noteDim: "#cc9966", noteBright: "#f0d0bb"},
2323
{name: "azure", channelDim: "#4a6d8f", channelBright: "#77aadd", noteDim: "#6f9fcf", noteBright: "#bbd7ff"},
2424
]);
2525

26+
public static readonly pitchBackgroundColors: string[] = [
27+
"#886644",
28+
"#3E444E",
29+
"#4A443A",
30+
"#3E444E",
31+
"#4A443A",
32+
"#3E444E",
33+
"#4A443A",
34+
"#446688",
35+
"#4A443A",
36+
"#3E444E",
37+
"#4A443A",
38+
"#3E444E",
39+
];
40+
2641
public static getChannelColor(song: Song, channel: number): ChannelColors {
2742
return channel < song.pitchChannelCount
28-
? ColorConfig.pitchColors[channel % ColorConfig.pitchColors.length]
29-
: ColorConfig.noiseColors[(channel - song.pitchChannelCount) % ColorConfig.noiseColors.length];
43+
? ColorConfig.pitchChannelColors[channel % ColorConfig.pitchChannelColors.length]
44+
: ColorConfig.noiseChannelColors[(channel - song.pitchChannelCount) % ColorConfig.noiseChannelColors.length];
3045
}
3146
}
3247
}

editor/EditorConfig.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,8 @@ namespace beepbox {
128128
{name: "slow strings", midiProgram: 49, generalMidi: true, settings: {"type":"FM","effects":"chorus & reverb","transition":"soft fade","chord":"harmony","filterCutoffHz":1414,"filterResonance":0,"filterEnvelope":"swell 2","vibrato":"none","algorithm":"(1 2)←(3 4)","feedbackType":"4⟲","feedbackAmplitude":6,"feedbackEnvelope":"flare 3","operators":[{"frequency":"4×","amplitude":10,"envelope":"custom"},{"frequency":"3×","amplitude":10,"envelope":"custom"},{"frequency":"2×","amplitude":7,"envelope":"steady"},{"frequency":"7×","amplitude":4,"envelope":"swell 1"}]}},
129129
{name: "strings synth 1", midiProgram: 50, generalMidi: true, settings: {"type":"chip","volume":60,"transition":"soft fade","effects":"chorus & reverb","chord":"harmony","filterCutoffHz":1414,"filterResonance":43,"filterEnvelope":"steady","wave":"sawtooth","interval":"hum","vibrato":"delayed"}},
130130
{name: "strings synth 2", midiProgram: 51, generalMidi: true, settings: {"type":"FM","effects":"chorus & reverb","transition":"soft fade","chord":"harmony","filterCutoffHz":2000,"filterResonance":43,"filterEnvelope":"steady","vibrato":"none","algorithm":"1 2 3 4","feedbackType":"1⟲ 2⟲ 3⟲ 4⟲","feedbackAmplitude":12,"feedbackEnvelope":"swell 1","operators":[{"frequency":"3×","amplitude":6,"envelope":"custom"},{"frequency":"2×","amplitude":7,"envelope":"custom"},{"frequency":"1×","amplitude":8,"envelope":"custom"},{"frequency":"1×","amplitude":9,"envelope":"custom"}]}},
131-
{name: "orchestra hit", midiProgram: 55, generalMidi: true, midiSubharmonicOctaves: 1, settings: {"type":"FM","effects":"chorus & reverb","transition":"medium fade","chord":"harmony","filterCutoffHz":8000,"filterResonance":0,"filterEnvelope":"decay 1","vibrato":"delayed","algorithm":"1 2 3 4","feedbackType":"1⟲ 2⟲ 3⟲ 4⟲","feedbackAmplitude":14,"feedbackEnvelope":"steady","operators":[{"frequency":"1×","amplitude":12,"envelope":"custom"},{"frequency":"2×","amplitude":14,"envelope":"custom"},{"frequency":"3×","amplitude":12,"envelope":"custom"},{"frequency":"4×","amplitude":14,"envelope":"custom"}]}},
131+
{name: "orchestra hit 1", midiProgram: 55, generalMidi: true, midiSubharmonicOctaves: 1, settings: {"type":"FM","effects":"chorus & reverb","transition":"hard fade","chord":"harmony","filterCutoffHz":8000,"filterResonance":14,"filterEnvelope":"custom","vibrato":"none","algorithm":"1 2 3 4","feedbackType":"1⟲ 2⟲ 3⟲ 4⟲","feedbackAmplitude":14,"feedbackEnvelope":"twang 3","operators":[{"frequency":"1×","amplitude":15,"envelope":"twang 3"},{"frequency":"2×","amplitude":15,"envelope":"flare 3"},{"frequency":"4×","amplitude":15,"envelope":"flare 2"},{"frequency":"8×","amplitude":15,"envelope":"flare 1"}]}},
132+
{name: "orchestra hit 2", midiProgram: 55, midiSubharmonicOctaves: 1, settings: {"type":"FM","effects":"chorus & reverb","transition":"medium fade","chord":"harmony","filterCutoffHz":8000,"filterResonance":0,"filterEnvelope":"decay 1","vibrato":"delayed","algorithm":"1 2 3 4","feedbackType":"1⟲ 2⟲ 3⟲ 4⟲","feedbackAmplitude":14,"feedbackEnvelope":"steady","operators":[{"frequency":"1×","amplitude":12,"envelope":"custom"},{"frequency":"2×","amplitude":14,"envelope":"custom"},{"frequency":"3×","amplitude":12,"envelope":"custom"},{"frequency":"4×","amplitude":14,"envelope":"custom"}]}},
132133
])},
133134
{name: "Vocal Presets", presets: <DictionaryArray<Preset>> toNameMap([
134135
{name: "choir soprano", midiProgram: 94, generalMidi: true, settings: {"type":"harmonics","effects":"chorus & reverb","transition":"soft fade","chord":"harmony","filterCutoffHz":2828,"filterResonance":57,"filterEnvelope":"steady","interval":"union","vibrato":"shaky","harmonics":[86,100,86,43,14,14,57,71,57,14,14,14,14,14,43,57,43,14,14,14,14,14,14,14,0,0,0,0]}},

editor/PatternEditor.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -831,7 +831,9 @@ namespace beepbox {
831831

832832
if (this._renderedFifths != this._doc.showFifth) {
833833
this._renderedFifths = this._doc.showFifth;
834-
this._backgroundPitchRows[7].setAttribute("fill", this._doc.showFifth ? "#446688" : "#444444");
834+
for (let i: number = 1; i < ColorConfig.pitchBackgroundColors.length; i++) {
835+
this._backgroundPitchRows[i].setAttribute("fill", this._doc.showFifth ? ColorConfig.pitchBackgroundColors[i] : "#444444");
836+
}
835837
}
836838

837839
for (let j: number = 0; j < 12; j++) {

editor/TipPrompt.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ namespace beepbox {
155155
h2("FM Algorithm"),
156156
p('FM Synthesis is a mysterious but powerful technique for crafting sounds, popularized by Yamaha keyboards and the Sega Genesis/Mega Drive. It may seem confusing, but try playing around with the options until you get a feel for it, or check out some of the preset examples!'),
157157
p('This FM synthesizer uses up to four waves, numbered 1, 2, 3, and 4. Each wave may have its own frequency, volume, and volume envelope to control its effect over time.'),
158-
p('There are two kinds of waves: "carrier" waves play a tone out loud, but "modulator" waves distort other waves instead. Wave 1 is always a carrier and plays a tone, but other waves may distort it. The "Algorithm" setting determines which waves are modulators, and which other waves those modulators distort. For example, "1←2" means that wave 2 is modulating wave 1, and wave 1 is played out loud.'),
158+
p('There are two kinds of waves: "carrier" waves play a tone out loud, but "modulator" waves distort other waves instead. Wave 1 is always a carrier and plays a tone, but other waves may distort it. The "Algorithm" setting determines which waves are modulators, and which other waves those modulators distort. For example, "1←2" means that wave 2 modulates wave 1, and wave 1 plays out loud.'),
159159
);
160160
} break;
161161
case "feedbackType": {

website/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ <h1>
106106
When you make changes to the song, the URL is updated to reflect your changes.
107107
When you are satisfied with your song, just copy and paste the URL to save and share your song!
108108
</p>
109-
<div class="donation">
109+
<div class="donation">
110110
BeepBox is a passion project, and will always be free to use. If you find it valuable and have the means, any gratuity via
111111
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank">
112112
<input type="hidden" name="cmd" value="_donations" />
@@ -115,7 +115,7 @@ <h1>
115115
<input type="submit" name="submit" value="Paypal"/>
116116
</form>
117117
would be appreciated!
118-
</div>
118+
</div>
119119

120120
<div class="column-container">
121121
<div class="instructions-column">

0 commit comments

Comments
 (0)