Skip to content

Commit

Permalink
tone down reverb a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
spessasus committed Jun 22, 2024
1 parent 43d4769 commit 398febb
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
8 changes: 5 additions & 3 deletions src/spessasynth_lib/soundfont/chunk/generators.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ShiftableByteArray } from '../../utils/shiftable_array.js'
import { RiffChunk } from './riff_chunk.js'
import { readByte, signedInt16 } from '../../utils/byte_functions.js'
import { signedInt16 } from '../../utils/byte_functions.js'

/**
* generators.js
Expand Down Expand Up @@ -177,8 +177,10 @@ export class Generator{
*/
constructor(dataArray) {
// 4 bytes:
// type, value, type, value
let bytes = [readByte(dataArray), readByte(dataArray), readByte(dataArray), readByte(dataArray)];
// type, type, type, value
const i = dataArray.currentIndex;
let bytes = [dataArray[i], dataArray[i + 1], dataArray[i + 2], dataArray[i + 3]];
dataArray.currentIndex += 4;

/**
* @type {number}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const WORKLET_SYSTEM_REVERB_DIVIDER = 200;
export const WORKLET_SYSTEM_REVERB_DIVIDER = 500;
export const WORKLET_SYSTEM_CHORUS_DIVIDER = 500;
/**
* stereo_panner.js
Expand Down
6 changes: 5 additions & 1 deletion src/spessasynth_lib/utils/byte_functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,11 @@ export function readBytesAsString(dataArray, bytes, encoding=undefined, trimEnd=
let string = "";
for (let i = 0; i < bytes; i++) {
let byte = readByte(dataArray);
if(byte < 32 || byte > 127 || finished)
if(finished)
{
continue;
}
if(byte < 32 || byte > 127)
{
if(trimEnd) {
finished = true;
Expand Down

0 comments on commit 398febb

Please sign in to comment.