Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@blibliki/engine

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@blibliki/engine - npm Package Compare versions

Comparing version 0.1.10 to 0.1.11

6

build/Module/Sequencer.d.ts

@@ -11,3 +11,3 @@ import Module, { DummnyInternalModule } from "./Base";

sequences: ISequence[][];
length: number;
steps: number;
bars: number;

@@ -21,4 +21,4 @@ }

constructor(name: string, props: Partial<ISequencer>);
get length(): number;
set length(value: number);
get steps(): number;
set steps(value: number);
get bars(): number;

@@ -25,0 +25,0 @@ set bars(value: number);

@@ -6,3 +6,3 @@ import { Part, Time } from "tone";

sequences: [],
length: 16,
steps: 16,
bars: 1,

@@ -24,7 +24,7 @@ });

}
get length() {
return this._props["length"];
get steps() {
return this._props["steps"];
}
set length(value) {
this._props["length"] = value;
set steps(value) {
this._props = { ...this.props, steps: value };
this.adjustNumberOfSequences();

@@ -37,3 +37,3 @@ this.updateBarParts();

set bars(value) {
this._props["bars"] = value;
this._props = { ...this.props, bars: value };
this.adjustNumberOfBars();

@@ -71,12 +71,20 @@ this.adjustNumberOfSequences();

const num = currentBar - this.bars;
const sequences = [...this.sequences];
if (num === 0)
return;
if (num > 0) {
this.part?.remove(`${currentBar}:0:0`);
this.sequences.pop();
if (this.part) {
this.part.remove(`${currentBar}:0:0`);
this.part.loopEnd = this.loopEnd;
}
sequences.pop();
}
else {
this.part?.add(`${currentBar}:0:0`, currentBar);
this.sequences.push([]);
if (this.part) {
this.part.add(`${currentBar}:0:0`, currentBar);
this.part.loopEnd = this.loopEnd;
}
sequences.push([]);
}
this.sequences = sequences;
this.adjustNumberOfBars();

@@ -87,4 +95,5 @@ }

return;
const sequences = this.sequences[bar];
const num = sequences.length - this.length;
const allSequences = [...this.sequences];
const sequences = [...allSequences[bar]];
const num = sequences.length - this.steps;
if (num === 0) {

@@ -101,8 +110,10 @@ if (bar === this.bars - 1)

const index = sequences.length;
sequences.push({ active: false, time: `${bar}:0:${index}`, notes: [] });
sequences.push({ active: false, time: `0:0:${index}`, notes: [] });
}
allSequences[bar] = sequences;
this.sequences = allSequences;
this.adjustNumberOfSequences(bar);
}
updateBarParts() {
this.barParts = this.sequences.map((barSeqs, bar) => {
this.barParts = this.sequences.map((barSeqs, _) => {
const part = new Part(this.onSequenceEvent, []);

@@ -109,0 +120,0 @@ barSeqs.forEach((seq) => part.add(seq.time, seq));

{
"name": "@blibliki/engine",
"version": "0.1.10",
"version": "0.1.11",
"main": "build/index.js",

@@ -5,0 +5,0 @@ "types": "build/index.d.ts",

# Blibliki Engine
This is an engine for making synth systems.
More info and documentation soon!
Blibliki Engine is a data-driven, non-UI JavaScript library written in TypeScript that serves as a framework for building synthesizers.
Built on top of ToneJS, it aims to provide a streamlined interface for creating custom synthesizers.
## Approach
The engine operates in a data-driven manner, allowing developers to provide changes to the current module configuration rather than directly accessing the modules themselves.
This approach facilitates seamless integration with state management libraries like Redux, making it easy to build applications with centralized state management.
One notable advantage of the data-driven approach is the ability to easily save and recall patches. By representing the synthesizer configuration as data, developers can effortlessly store and load patches, enabling users to save and share their custom presets.
Blibliki Engine offers polyphony support and provides access to essential audio modules such as oscillators, filters, envelopes, and effects. It's important to note that the list of available audio modules will be extended as the development of the engine continues.
## Contributing
As a work-in-progress project, Blibliki Engine actively welcomes contributions and feedback from the community. Whether it's reporting issues, suggesting new features, or submitting code changes, contributors are encouraged to get involved and help shape the future of Blibliki Engine.

@@ -14,3 +14,3 @@ import { Part, Time } from "tone";

sequences: ISequence[][];
length: number;
steps: number;
bars: number;

@@ -21,3 +21,3 @@ }

sequences: [],
length: 16,
steps: 16,
bars: 1,

@@ -46,8 +46,8 @@ });

get length() {
return this._props["length"];
get steps() {
return this._props["steps"];
}
set length(value: number) {
this._props["length"] = value;
set steps(value: number) {
this._props = { ...this.props, steps: value };
this.adjustNumberOfSequences();

@@ -62,3 +62,3 @@ this.updateBarParts();

set bars(value: number) {
this._props["bars"] = value;
this._props = { ...this.props, bars: value };
this.adjustNumberOfBars();

@@ -104,2 +104,3 @@ this.adjustNumberOfSequences();

const num = currentBar - this.bars;
const sequences = [...this.sequences];

@@ -109,9 +110,16 @@ if (num === 0) return;

if (num > 0) {
this.part?.remove(`${currentBar}:0:0`);
this.sequences.pop();
if (this.part) {
this.part.remove(`${currentBar}:0:0`);
this.part.loopEnd = this.loopEnd;
}
sequences.pop();
} else {
this.part?.add(`${currentBar}:0:0`, currentBar);
this.sequences.push([]);
if (this.part) {
this.part.add(`${currentBar}:0:0`, currentBar);
this.part.loopEnd = this.loopEnd;
}
sequences.push([]);
}
this.sequences = sequences;
this.adjustNumberOfBars();

@@ -123,4 +131,5 @@ }

const sequences = this.sequences[bar];
const num = sequences.length - this.length;
const allSequences = [...this.sequences];
const sequences = [...allSequences[bar]];
const num = sequences.length - this.steps;

@@ -138,4 +147,6 @@ if (num === 0) {

const index = sequences.length;
sequences.push({ active: false, time: `${bar}:0:${index}`, notes: [] });
sequences.push({ active: false, time: `0:0:${index}`, notes: [] });
}
allSequences[bar] = sequences;
this.sequences = allSequences;

@@ -146,3 +157,3 @@ this.adjustNumberOfSequences(bar);

private updateBarParts() {
this.barParts = this.sequences.map((barSeqs, bar) => {
this.barParts = this.sequences.map((barSeqs, _) => {
const part = new Part(this.onSequenceEvent, [] as Array<ISequence>);

@@ -149,0 +160,0 @@ barSeqs.forEach((seq) => part.add(seq.time, seq));

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc