New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

mercury-lang

Package Overview
Dependencies
Maintainers
1
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mercury-lang - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

11

package.json
{
"name": "mercury-lang",
"version": "1.1.0",
"version": "1.1.1",
"description": "Parser for the mercury live coding language",
"main": "index.js",
"scripts": {
"test": "node test/mercury.test.js",
"test": "nodemon test/mercury.test.js",
"build": "npm run grammar && npm run graph && npm run clean && npm run bundle && npm run build-es5 && npm run build-min",

@@ -14,4 +14,8 @@ "clean": "rm -rf build",

"build-es5": "babel build/mercury.bundle.js -o build/mercury.es5.js && rm -rf build/mercury.bundle.js",
"build-min": "uglifyjs build/mercury.es5.js -o build/mercury.es5.min.js && rm -rf build/mercury.es5.js"
"build-min": "terser build/mercury.es5.js -o build/mercury.es5.min.js -c -m --comments false && rm -rf build/mercury.es5.js"
},
"nodemonConfig": {
"verbose": false,
"ignore": [ "test/tree/*" ]
},
"keywords": [

@@ -43,4 +47,5 @@ "mercury",

"nodemon": "^2.0.7",
"terser": "^5.6.1",
"uglify-js": "^3.13.0"
}
}

@@ -10,3 +10,4 @@ // Generated automatically by nearley, version 2.20.1

const lexer = moo.compile({
comment: /(?:\/\/|\$).*?$/,
// comment: /(?:\/\/|\$).*?$/,
comment: /(?:\/\/).*?$/,

@@ -20,3 +21,3 @@ //instrument: [/synth/, /sample/, /polySynth/, /loop/, /emitter/],

list: [/ring/, /array/, /list/],
newObject: [/new/, /make/, /add/],
newObject: [/new/, /make/, /add(?: |$)/],
setObject: [/set/, /apply/, /give/, /send/],

@@ -28,3 +29,4 @@ print: [/print/, /post/, /log/],

//seperator: /&/,
seperator: /,/,
//newLine: /[&;]/,

@@ -129,4 +131,8 @@ //note: /[a-gA-G](?:[0-9])?(?:#+|b+|x)?/,

{"name": "array", "symbols": [(lexer.has("lArray") ? {type: "lArray"} : lArray), "_", "array$ebnf$1", "_", "array$ebnf$2"], "postprocess": (d) => { return { "@array" : d[2] }}},
{"name": "params", "symbols": ["paramElement"], "postprocess": (d) => [d[0]]},
{"name": "params", "symbols": ["paramElement", "_", "params"], "postprocess": (d) => [d[0], d[2]].flat(Infinity)},
{"name": "params$ebnf$1", "symbols": [(lexer.has("seperator") ? {type: "seperator"} : seperator)], "postprocess": id},
{"name": "params$ebnf$1", "symbols": [], "postprocess": function(d) {return null;}},
{"name": "params", "symbols": ["paramElement", "_", "params$ebnf$1"], "postprocess": (d) => [d[0]]},
{"name": "params$ebnf$2", "symbols": [(lexer.has("seperator") ? {type: "seperator"} : seperator)], "postprocess": id},
{"name": "params$ebnf$2", "symbols": [], "postprocess": function(d) {return null;}},
{"name": "params", "symbols": ["paramElement", "_", "params$ebnf$2", "_", "params"], "postprocess": (d) => [d[0], d[4]].flat(Infinity)},
{"name": "paramElement", "symbols": [(lexer.has("number") ? {type: "number"} : number)], "postprocess": (d) => { return IR.num(d) }},

@@ -133,0 +139,0 @@ {"name": "paramElement", "symbols": ["name"], "postprocess": (d) => d[0]},

@@ -101,3 +101,4 @@ //====================================================================

'print' : [],
'comments' : []
'comments' : [],
'errors' : []
}

@@ -143,3 +144,3 @@

let p = map[k](ccode, e[k]);
log += (Array.isArray(p)? p.flat(Infinity).join(' ') : p) + ' ';
// log += (Array.isArray(p)? p.flat(Infinity).join(' ') : p) + ' ';
ccode.print.push(p);

@@ -227,3 +228,4 @@ });

} else {
console.error(`Unkown instrument or setting name: ${name}`);
// console.error(`Unkown instrument or setting name: ${name}`);
ccode.errors.push(`Unkown instrument or setting name: ${name}`);
}

@@ -241,3 +243,4 @@ return ccode;

if (!instruments[obj]){
console.error(`Unknown instrument type: ${obj}`);
// console.error(`Unknown instrument type: ${obj}`);
ccode.errors.push(`Unknown instrument type: ${obj}`);
inst = deepCopy(instruments['empty']);

@@ -306,3 +309,4 @@ }

} else if (level === '@list'){
console.error(`Unknown list function: ${func}`);
// console.error(`Unknown list function: ${func}`);
ccode.errors.push(`Unknown list function: ${func}`);
return [0];

@@ -309,0 +313,0 @@ } else if (level === '@object'){

@@ -24,9 +24,9 @@ //====================================================================

for (let l in lines){
let parser = new nearley.Parser(nearley.Grammar.fromCompiled(grammar));
// create a Parser object from our grammar
if (lines[l] !== ''){
// create a Parser object from our grammar
let parser = new nearley.Parser(nearley.Grammar.fromCompiled(grammar));
try {
// parse something!
parser.feed(lines[l]);
// parser.results is an array of possible parsings.

@@ -50,3 +50,4 @@ let results = parser.results.length;

// console.error(e)
let err = `Syntax error at line ${Number(l)+1} col ${e.token.col}: Unexpected ${e.token.type}: ${e.token.value} at ${lines[l].slice(0, e.token.offset)}${e.token.text}<-`;
// column: ${e.token.col}
let err = `Syntax error at line ${Number(l)+1}: Unexpected ${e.token.type}: ${e.token.value} at ${lines[l].slice(0, e.token.offset)}${e.token.text}<-`;
if (DEBUG){

@@ -62,2 +63,4 @@ console.error(err);

errors = parseTree.errors.concat(errors);
delete parseTree.errors;
// return both the parseTree and syntaxTree in one object

@@ -64,0 +67,0 @@ return {

@@ -12,2 +12,3 @@ //====================================================================

let verbose = false;
let entryPoint = "../index.js";

@@ -31,5 +32,8 @@ entryPoint = "../build/mercury.es5.min.js";

// console.log(util.inspect(result.parseTree, { showHidden: false, depth: null, colors: true }));
// console.log(util.inspect(result.syntaxTree, { showHidden: false, depth: null, colors: true }));
// console.log(util.inspect(result, { showHidden: false, depth: null, colors: true }));
if (verbose){
console.log(util.inspect(result.parseTree, { showHidden: false, depth: null, colors: true }));
console.log(util.inspect(result.syntaxTree, { showHidden: false, depth: null, colors: true }));
console.log(util.inspect(result.errors, { showHidden: false, depth: null, colors: true }));
// console.log(util.inspect(result, { showHidden: false, depth: null, colors: true }));
}

@@ -36,0 +40,0 @@ // write to disk for check

@@ -23,5 +23,9 @@

ring beat join( euclid 8 3) euclid(7 6) )
ring beat2 join( euclid 8 3) euclid(7 6) )
array commaArr [ 3,14 6,28 3.14 1.618 ]
print commaArr
ring val [ "the string name" "3.14 with/ ( [ ]) special, ;characters&" ]
ring theSeps [1, 23, 4.15, 6, 789.1011 , ]
// Parse numbers
012
34
-56
+7.89
1.0111213141E5
0.4321
12 34 -56 7.89
print 012
print 34
print -56
print +7.89
print 1.0111213141E5
print 0.4321
print 12 34 -56 7.89
// 1 + 2 / 4
[ 1 2 3.14 5 foo bar 'to_to t1T1' ]
[ ]
print [ 1 2 3.14 5 foo bar 'to_to t1T1' ]
print [ ]
// Parse note names
a A b B c C d D e E f F g G
a# B# C# Dx Gb
a## Bbb C## Dx Gb fbb
a1 A0 b2b B4# c1 C2bb d4## D3 e2 E1 f4# F5 g6 G2
print a A b B c C d D e E f F g G
print a# B# C# Dx Gb
print a## Bbb C## Dx Gb fbb
print a1 A0 b2b B4# c1 C2bb d4## D3 e2 E1 f4# F5 g6 G2
// Parse rhythmic division values
1/4
3/16
7/16 4/5 3/1
7:8 3:2 1:5
print 1/4
print 3/16
print 7/16 4/5 3/1
print 7:8 3:2 1:5
// Parse comments
# not another comment
$ also a type of comment
$ also not a type of comment
not a type of comment
// 1.0111213141E5 < commented
// 1.0111213141E5 < commented number
// valid strings start and end with: "" '' ``
// or a combination of those works as well
"hello world"
'also a string'
`and another! `
'this works?`
` this does as well?"
'1 +2 /3.14* 45.67'
print "hello world"
print 'also a string'
print `and another! `
print 'this works?`
print ` this does as well?"
print '1 +2 /3.14* 45.67'

@@ -44,6 +44,6 @@ // Parse identifier/name

// can have _ - . and numbers [0-9]
Kick_dub
dub_15
foLey-02.wav
-negative
print Kick_dub
print dub_15
print foLey-02.wav
print -negative

@@ -50,0 +50,0 @@ // Parse Signal modulation strings TODO

@@ -1,33 +0,33 @@

// set volume 0.9 5000
// set tempo 143
// set randomSeed 9123
// set scale minor_pentatonic d
// set highPass 800 5000
// set lowPass 5000 100
set volume 0.9 5000
set tempo 143
set randomSeed 9123
set scale minor_pentatonic d
set highPass 800 5000
set lowPass 5000 100
// ring scl scale()
// ring bassLine fill(0 16 -3 16)
// ring notes palin( spread(5 0 12) )
// ring jnd join(random(4 0 24) spread(4 0 24) urn(4 4))
ring bassLine fill(0 16 -3 16)
ring notes palin( spread(5 0 12) )
ring jnd join(random(4 0 24) spread(4 0 24) urn(4 4))
// new synth [ sine saw ] time(1/4 1/8) note(7 1) env(1 300) beat(0.2) group(sn bass) add_fx(reverb 0.9 11) add_fx(lfo 1/4 up)
new synth [ sine saw ] time(1/4 1/8) note(7 1) env(1 300) beat(0.2) group(sn bass) add_fx(reverb 0.9 11) add_fx(lfo 1/4 up)
// new sample [ kick_min snare_dub ] time(1/16) shape(1 1/32 2) beat(0.9)
new sample [ kick_min snare_dub ] time(1/16) shape(1 1/32 2) beat(0.9)
// new synth sine name(aSynth)
// set aSynth note(notes 1) timing(1/16) shape(1000 200) play(0.8) aux(sn ld)
// set bSynth gain(0.5 100)
new synth sine name(aSynth)
set aSynth note(notes 1) timing(1/16) shape(1000 200) play(0.8) aux(sn ld)
set aSynth gain(0.5 100)
// set aSynth osc2(sine 2) withFX(drive 16) addFX(lfo 1/4 sine)
set aSynth osc2(sine 2) withFX(drive 16) addFX(lfo 1/4 sine)
// new synth saw name(bSynth)
// set bSynth note(random(4 0 12) 2) time(1/16) env(300 1000)
// set bSynth pan(random) group(bass intro)
// set bSynth gain(0) beat(0.7)
new synth saw name(bSynth)
set bSynth note(random(4 0 12) 2) time(1/16) env(300 1000)
set bSynth pan(random) group(bass intro)
set bSynth gain(0) beat(0.7)
// new sample kick_min name(kck)
// set kck time(1/4) fx(drive 1.1) fx(filter low 500 0.3)
new sample kick_min name(kck)
set kck time(1/4) fx(drive 1.1) fx(filter low 500 0.3)
// set all fx(reverb 1 20) fx(chip 0.5)
// set sn fx(reverb 0.9 17)
// set bass fx(drive 5)
set all fx(reverb 1 20) fx(chip 0.5)
set sn fx(reverb 0.9 17)
set bass fx(drive 5)

@@ -42,7 +42,18 @@ {

3,
",14",
14,
6,
",28",
28,
3.14,
1.618
],
"val": [
"the string name",
"3.14 with/ ( [ ]) special, ;characters&"
],
"theSeps": [
1,
23,
4.15,
6,
789.1011
]

@@ -73,5 +84,5 @@ },

3,
",14",
14,
6,
",28",
28,
3.14,

@@ -194,3 +205,3 @@ 1.618

{
"@identifier": ",14"
"@number": 14
},

@@ -201,3 +212,3 @@ {

{
"@identifier": ",28"
"@number": 28
},

@@ -222,2 +233,41 @@ {

}
},
{
"@list": {
"@name": "val",
"@params": {
"@array": [
{
"@string": "the string name"
},
{
"@string": "3.14 with/ ( [ ]) special, ;characters&"
}
]
}
}
},
{
"@list": {
"@name": "theSeps",
"@params": {
"@array": [
{
"@number": 1
},
{
"@number": 23
},
{
"@number": 4.15
},
{
"@number": 6
},
{
"@number": 789.1011
}
]
}
}
}

@@ -227,11 +277,11 @@ ]

"errors": [
"Syntax error at line 2 col 1: Unexpected identifier: ne at ne<-",
"Syntax error at line 5 col 1: Unexpected identifier: prnt at prnt<-",
"Syntax error at line 7 col 1: Unexpected identifier: rng at rng<-",
"Syntax error at line 9 col 17: Unexpected lArray: [ at ring this Array [<-",
"Syntax error at line 11 col 25: Unexpected newObject: new at list theArr [ 5 6 7 8 9 new<-",
"Syntax error at line 14 col 4: Unexpected identifier: sample at newsample<-",
"Syntax error at line 16 col 20: Unexpected identifier: spread at ring notes shuffle spread<-",
"Syntax error at line 23 col 29: Unexpected identifier: euclid at ring beat join( euclid 8 3) euclid<-"
"Syntax error at line 2: Unexpected identifier: ne at ne<-",
"Syntax error at line 5: Unexpected identifier: prnt at prnt<-",
"Syntax error at line 7: Unexpected identifier: rng at rng<-",
"Syntax error at line 9: Unexpected lArray: [ at ring this Array [<-",
"Syntax error at line 11: Unexpected newObject: new at list theArr [ 5 6 7 8 9 new<-",
"Syntax error at line 14: Unexpected identifier: sample at newsample<-",
"Syntax error at line 16: Unexpected identifier: spread at ring notes shuffle spread<-",
"Syntax error at line 23: Unexpected identifier: euclid at ring beat2 join( euclid 8 3) euclid<-"
]
}

@@ -70,2 +70,3 @@ {

"grv": [
"hat",
"kick",

@@ -75,6 +76,5 @@ "kick",

"hat",
"kick",
"snare",
"hat",
"hat"
"snare",
"kick"
],

@@ -143,5 +143,5 @@ "arpMel": [

10,
6,
13,
0,
13
6
],

@@ -174,3 +174,3 @@ "bsLine3": [

"objects": {
"CUND99CY": {
"MR27OYSE": {
"object": "synth",

@@ -204,7 +204,7 @@ "type": "saw",

"name": [
"CUND99CY"
"MR27OYSE"
]
}
},
"KDJOL85C": {
"77JK9TMB": {
"object": "sample",

@@ -237,7 +237,7 @@ "type": "hat_min",

"name": [
"KDJOL85C"
"77JK9TMB"
]
}
},
"JXF9JZQR": {
"228WVFTX": {
"object": "sample",

@@ -275,7 +275,7 @@ "type": [

"name": [
"JXF9JZQR"
"228WVFTX"
]
}
},
"6K6V03TL": {
"IZE6P6CO": {
"object": "synth",

@@ -312,3 +312,3 @@ "type": [

"name": [
"6K6V03TL"
"IZE6P6CO"
]

@@ -407,3 +407,81 @@ }

},
"print": [],
"print": [
12,
34,
-56,
7.89,
101112.13141,
0.4321,
12,
34,
-56,
7.89,
[
1,
2,
3.14,
5,
"foo",
"bar",
"to_to t1T1"
],
[],
"a",
"A",
"b",
"B",
"c",
"C",
"d",
"D",
"e",
"E",
"f",
"F",
"g",
"G",
"a#",
"B#",
"C#",
"Dx",
"Gb",
"a##",
"Bbb",
"C##",
"Dx",
"Gb",
"fbb",
"a1",
"A0",
"b2b",
"B4#",
"c1",
"C2bb",
"d4##",
"D3",
"e2",
"E1",
"f4#",
"F5",
"g6",
"G2",
"1/4",
"3/16",
"7/16",
"4/5",
"3/1",
"7/8",
"3/2",
"1/5",
"hello world",
"also a string",
"and another! ",
"this works?",
" this does as well?",
"1 +2 /3.14* 45.67",
"Kick_dub",
"dub_15",
"foLey-02.wav",
"-negative"
],
"comments": [

@@ -415,4 +493,3 @@ "// Parse numbers",

"// Parse comments",
"$ also a type of comment",
"// 1.0111213141E5 < commented",
"// 1.0111213141E5 < commented number",
"// valid strings start and end with: \"\" '' ``",

@@ -469,2 +546,74 @@ "// or a combination of those works as well",

"@global": {
"@print": [
{
"@number": 12
}
]
}
},
{
"@global": {
"@print": [
{
"@number": 34
}
]
}
},
{
"@global": {
"@print": [
{
"@number": -56
}
]
}
},
{
"@global": {
"@print": [
{
"@number": 7.89
}
]
}
},
{
"@global": {
"@print": [
{
"@number": 101112.13141
}
]
}
},
{
"@global": {
"@print": [
{
"@number": 0.4321
}
]
}
},
{
"@global": {
"@print": [
{
"@number": 12
},
{
"@number": 34
},
{
"@number": -56
},
{
"@number": 7.89
}
]
}
},
{
"@global": {
"@comment": "// 1 + 2 / 4"

@@ -475,2 +624,42 @@ }

"@global": {
"@print": [
{
"@array": [
{
"@number": 1
},
{
"@number": 2
},
{
"@number": 3.14
},
{
"@number": 5
},
{
"@identifier": "foo"
},
{
"@identifier": "bar"
},
{
"@string": "to_to t1T1"
}
]
}
]
}
},
{
"@global": {
"@print": [
{
"@array": null
}
]
}
},
{
"@global": {
"@comment": "// Parse note names"

@@ -481,2 +670,143 @@ }

"@global": {
"@print": [
{
"@note": "a"
},
{
"@note": "A"
},
{
"@note": "b"
},
{
"@note": "B"
},
{
"@note": "c"
},
{
"@note": "C"
},
{
"@note": "d"
},
{
"@note": "D"
},
{
"@note": "e"
},
{
"@note": "E"
},
{
"@note": "f"
},
{
"@note": "F"
},
{
"@note": "g"
},
{
"@note": "G"
}
]
}
},
{
"@global": {
"@print": [
{
"@note": "a#"
},
{
"@note": "B#"
},
{
"@note": "C#"
},
{
"@note": "Dx"
},
{
"@note": "Gb"
}
]
}
},
{
"@global": {
"@print": [
{
"@note": "a##"
},
{
"@note": "Bbb"
},
{
"@note": "C##"
},
{
"@note": "Dx"
},
{
"@note": "Gb"
},
{
"@note": "fbb"
}
]
}
},
{
"@global": {
"@print": [
{
"@note": "a1"
},
{
"@note": "A0"
},
{
"@identifier": "b2b"
},
{
"@identifier": "B4#"
},
{
"@note": "c1"
},
{
"@identifier": "C2bb"
},
{
"@identifier": "d4##"
},
{
"@note": "D3"
},
{
"@note": "e2"
},
{
"@note": "E1"
},
{
"@identifier": "f4#"
},
{
"@note": "F5"
},
{
"@note": "g6"
},
{
"@note": "G2"
}
]
}
},
{
"@global": {
"@comment": "// Parse rhythmic division values"

@@ -487,3 +817,7 @@ }

"@global": {
"@comment": "// Parse comments"
"@print": [
{
"@division": "1/4"
}
]
}

@@ -493,3 +827,7 @@ },

"@global": {
"@comment": "$ also a type of comment"
"@print": [
{
"@division": "3/16"
}
]
}

@@ -499,3 +837,13 @@ },

"@global": {
"@comment": "// 1.0111213141E5 < commented"
"@print": [
{
"@division": "7/16"
},
{
"@division": "4/5"
},
{
"@division": "3/1"
}
]
}

@@ -505,2 +853,27 @@ },

"@global": {
"@print": [
{
"@division": "7/8"
},
{
"@division": "3/2"
},
{
"@division": "1/5"
}
]
}
},
{
"@global": {
"@comment": "// Parse comments"
}
},
{
"@global": {
"@comment": "// 1.0111213141E5 < commented number"
}
},
{
"@global": {
"@comment": "// valid strings start and end with: \"\" '' ``"

@@ -516,2 +889,56 @@ }

"@global": {
"@print": [
{
"@string": "hello world"
}
]
}
},
{
"@global": {
"@print": [
{
"@string": "also a string"
}
]
}
},
{
"@global": {
"@print": [
{
"@string": "and another! "
}
]
}
},
{
"@global": {
"@print": [
{
"@string": "this works?"
}
]
}
},
{
"@global": {
"@print": [
{
"@string": " this does as well?"
}
]
}
},
{
"@global": {
"@print": [
{
"@string": "1 +2 /3.14* 45.67"
}
]
}
},
{
"@global": {
"@comment": "// Parse identifier/name"

@@ -532,2 +959,38 @@ }

"@global": {
"@print": [
{
"@identifier": "Kick_dub"
}
]
}
},
{
"@global": {
"@print": [
{
"@identifier": "dub_15"
}
]
}
},
{
"@global": {
"@print": [
{
"@identifier": "foLey-02.wav"
}
]
}
},
{
"@global": {
"@print": [
{
"@identifier": "-negative"
}
]
}
},
{
"@global": {
"@comment": "// Parse Signal modulation strings TODO"

@@ -1241,34 +1704,8 @@ }

"errors": [
"Syntax error at line 3 col 1: Unexpected number: 012 at 012<-",
"Syntax error at line 4 col 1: Unexpected number: 34 at 34<-",
"Syntax error at line 5 col 1: Unexpected number: -56 at -56<-",
"Syntax error at line 6 col 1: Unexpected number: +7.89 at +7.89<-",
"Syntax error at line 7 col 1: Unexpected number: 1.0111213141E5 at 1.0111213141E5<-",
"Syntax error at line 8 col 1: Unexpected number: 0.4321 at 0.4321<-",
"Syntax error at line 9 col 1: Unexpected number: 12 at 12<-",
"Syntax error at line 11 col 1: Unexpected lArray: [ at [<-",
"Syntax error at line 12 col 1: Unexpected lArray: [ at [<-",
"Syntax error at line 15 col 1: Unexpected identifier: a at a<-",
"Syntax error at line 16 col 1: Unexpected identifier: a# at a#<-",
"Syntax error at line 17 col 1: Unexpected identifier: a## at a##<-",
"Syntax error at line 18 col 1: Unexpected identifier: a1 at a1<-",
"Syntax error at line 21 col 1: Unexpected number: 1 at 1<-",
"Syntax error at line 22 col 1: Unexpected number: 3 at 3<-",
"Syntax error at line 23 col 1: Unexpected number: 7 at 7<-",
"Syntax error at line 24 col 1: Unexpected number: 7 at 7<-",
"Syntax error at line 27 col 1: Unexpected identifier: # at #<-",
"Syntax error at line 29 col 1: Unexpected identifier: not at not<-",
"Syntax error at line 34 col 1: Unexpected string: hello world at \"hello world\"<-",
"Syntax error at line 35 col 1: Unexpected string: also a string at 'also a string'<-",
"Syntax error at line 36 col 1: Unexpected string: and another! at `and another! `<-",
"Syntax error at line 37 col 1: Unexpected string: this works? at 'this works?`<-",
"Syntax error at line 38 col 1: Unexpected string: this does as well? at ` this does as well?\"<-",
"Syntax error at line 39 col 1: Unexpected string: 1 +2 /3.14* 45.67 at '1 +2 /3.14* 45.67'<-",
"Syntax error at line 44 col 1: Unexpected identifier: Kick_dub at Kick_dub<-",
"Syntax error at line 45 col 1: Unexpected identifier: dub_15 at dub_15<-",
"Syntax error at line 46 col 1: Unexpected identifier: foLey-02.wav at foLey-02.wav<-",
"Syntax error at line 47 col 1: Unexpected identifier: -negative at -negative<-",
"Syntax error at line 76 col 6: Unexpected list: ring at ring ring<-",
"Syntax error at line 104 col 49: Unexpected newObject: new at apply alice pitch([0 7 12 3] 2) shape(1 200) id(new<-"
"Syntax error at line 27: Unexpected identifier: # at #<-",
"Syntax error at line 28: Unexpected identifier: $ at $<-",
"Syntax error at line 29: Unexpected identifier: not at not<-",
"Syntax error at line 76: Unexpected list: ring at ring ring<-",
"Syntax error at line 104: Unexpected newObject: new at apply alice pitch([0 7 12 3] 2) shape(1 200) id(new<-"
]
}

@@ -34,3 +34,3 @@ {

"objects": {
"IX91FXO1": {
"E9NVNAUE": {
"object": "synth",

@@ -89,3 +89,3 @@ "type": "saw",

"name": [
"IX91FXO1"
"E9NVNAUE"
]

@@ -92,0 +92,0 @@ }

@@ -197,4 +197,4 @@ {

"errors": [
"Syntax error at line 9 col 19: Unexpected number: 16 at list notes random 16<-"
"Syntax error at line 9: Unexpected number: 16 at list notes random 16<-"
]
}

@@ -5,43 +5,373 @@ {

"randomSeed": [
0
9123
],
"highPass": [
20000,
800,
5000
],
"lowPass": [
5000,
100
],
"volume": [
0.9,
5000
],
"tempo": [
143
],
"scale": [
"minor_pentatonic",
"d"
]
},
"variables": {
"bassLine": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
-3,
-3,
-3,
-3,
-3,
-3,
-3,
-3,
-3,
-3,
-3,
-3,
-3,
-3,
-3,
-3
],
"notes": [
0,
2,
4,
7,
9,
9,
7,
4,
2,
0
],
"lowPass": [
"jnd": [
17,
11,
20,
9,
0,
6,
12,
18,
3,
0,
1,
0
2
]
},
"variables": {},
"objects": {},
"groups": {},
"objects": {
"TJD27BEE": {
"object": "synth",
"type": [
"sine",
"saw"
],
"functions": {
"group": [
"sn",
"bass"
],
"time": [
"1/4",
"1/8"
],
"note": [
7,
1
],
"env": [
1,
300
],
"beat": [
0.2
],
"amp": [
0.7
],
"wave2": [
"saw",
0
],
"add_fx": [
[
"reverb",
0.9,
11
],
[
"lfo",
"1/4",
"up"
],
[
"reverb",
1,
20
],
[
"chip",
0.5
]
],
"name": [
"TJD27BEE"
]
}
},
"7PULZX73": {
"object": "sample",
"type": [
"kick_min",
"snare_dub"
],
"functions": {
"group": [],
"time": [
"1/16"
],
"speed": [
1
],
"env": [
1,
"1/32",
2
],
"beat": [
0.9
],
"amp": [
0.9
],
"stretch": [
0,
1,
1
],
"add_fx": [
[
"reverb",
1,
20
],
[
"chip",
0.5
]
],
"name": [
"7PULZX73"
]
}
},
"aSynth": {
"object": "synth",
"type": "sine",
"functions": {
"group": [
"sn",
"ld"
],
"time": [
"1/16"
],
"note": [
[
0,
2,
4,
7,
9,
9,
7,
4,
2,
0
],
1
],
"env": [
1000,
200
],
"beat": [
0.8
],
"amp": [
0.5,
100
],
"wave2": [
"sine",
2
],
"add_fx": [
[
"drive",
16
],
[
"lfo",
"1/4",
"sine"
],
[
"reverb",
1,
20
],
[
"chip",
0.5
]
],
"name": [
"aSynth"
]
}
},
"bSynth": {
"object": "synth",
"type": "saw",
"functions": {
"group": [
"bass",
"intro"
],
"time": [
"1/16"
],
"note": [
[
7,
0,
0,
10
],
2
],
"env": [
300,
1000
],
"beat": [
0.7
],
"amp": [
0
],
"wave2": [
"saw",
0
],
"add_fx": [
[
"reverb",
1,
20
],
[
"chip",
0.5
]
],
"name": [
"bSynth"
],
"pan": [
"random"
]
}
},
"kck": {
"object": "sample",
"type": "kick_min",
"functions": {
"group": [],
"time": [
"1/4"
],
"speed": [
1
],
"env": [
-1
],
"beat": [
1
],
"amp": [
0.9
],
"stretch": [
0,
1,
1
],
"add_fx": [
[
"drive",
1.1
],
[
"filter",
"low",
500,
0.3
],
[
"reverb",
1,
20
],
[
"chip",
0.5
]
],
"name": [
"kck"
]
}
}
},
"groups": {
"all": [
"aSynth",
"bSynth",
"kck"
]
},
"print": [],
"comments": [
"// set volume 0.9 5000",
"// set tempo 143",
"// set randomSeed 9123",
"// set scale minor_pentatonic d",
"// set highPass 800 5000",
"// set lowPass 5000 100",
"// ring scl scale()",
"// ring bassLine fill(0 16 -3 16)",
"// ring notes palin( spread(5 0 12) )",
"// ring jnd join(random(4 0 24) spread(4 0 24) urn(4 4))",
"// new synth [ sine saw ] time(1/4 1/8) note(7 1) env(1 300) beat(0.2) group(sn bass) add_fx(reverb 0.9 11) add_fx(lfo 1/4 up)",
"// new sample [ kick_min snare_dub ] time(1/16) shape(1 1/32 2) beat(0.9)",
"// new synth sine name(aSynth)",
"// \tset aSynth note(notes 1) timing(1/16) shape(1000 200) play(0.8) aux(sn ld)",
"// \tset bSynth gain(0.5 100)",
"// \tset aSynth osc2(sine 2) withFX(drive 16) addFX(lfo 1/4 sine)",
"// new synth saw name(bSynth)",
"// \tset bSynth note(random(4 0 12) 2) time(1/16) env(300 1000) ",
"// \tset bSynth pan(random) group(bass intro)",
"// \tset bSynth gain(0) beat(0.7)",
"// new sample kick_min name(kck)",
"// \tset kck time(1/4) fx(drive 1.1) fx(filter low 500 0.3)",
"// set all fx(reverb 1 20) fx(chip 0.5)",
"// set sn fx(reverb 0.9 17)",
"// set bass fx(drive 5)"
"// ring scl scale()"
]

@@ -52,29 +382,77 @@ },

{
"@global": {
"@comment": "// set volume 0.9 5000"
"@object": {
"@set": {
"@functions": [
{
"@number": 0.9
},
{
"@number": 5000
}
]
}
}
},
{
"@global": {
"@comment": "// set tempo 143"
"@object": {
"@set": {
"@functions": [
{
"@number": 143
}
]
}
}
},
{
"@global": {
"@comment": "// set randomSeed 9123"
"@object": {
"@set": {
"@functions": [
{
"@number": 9123
}
]
}
}
},
{
"@global": {
"@comment": "// set scale minor_pentatonic d"
"@object": {
"@set": {
"@functions": [
{
"@identifier": "minor_pentatonic"
},
{
"@note": "d"
}
]
}
}
},
{
"@global": {
"@comment": "// set highPass 800 5000"
"@object": {
"@set": {
"@functions": [
{
"@number": 800
},
{
"@number": 5000
}
]
}
}
},
{
"@global": {
"@comment": "// set lowPass 5000 100"
"@object": {
"@set": {
"@functions": [
{
"@number": 5000
},
{
"@number": 100
}
]
}
}

@@ -88,89 +466,723 @@ },

{
"@global": {
"@comment": "// ring bassLine fill(0 16 -3 16)"
"@list": {
"@name": "bassLine",
"@params": {
"@function": {
"@name": "fill",
"@args": [
{
"@number": 0
},
{
"@number": 16
},
{
"@number": -3
},
{
"@number": 16
}
]
}
}
}
},
{
"@global": {
"@comment": "// ring notes palin( spread(5 0 12) )"
"@list": {
"@name": "notes",
"@params": {
"@function": {
"@name": "palin",
"@args": [
{
"@function": {
"@name": "spread",
"@args": [
{
"@number": 5
},
{
"@number": 0
},
{
"@number": 12
}
]
}
}
]
}
}
}
},
{
"@global": {
"@comment": "// ring jnd join(random(4 0 24) spread(4 0 24) urn(4 4))"
"@list": {
"@name": "jnd",
"@params": {
"@function": {
"@name": "join",
"@args": [
{
"@function": {
"@name": "random",
"@args": [
{
"@number": 4
},
{
"@number": 0
},
{
"@number": 24
}
]
}
},
{
"@function": {
"@name": "spread",
"@args": [
{
"@number": 4
},
{
"@number": 0
},
{
"@number": 24
}
]
}
},
{
"@function": {
"@name": "urn",
"@args": [
{
"@number": 4
},
{
"@number": 4
}
]
}
}
]
}
}
}
},
{
"@global": {
"@comment": "// new synth [ sine saw ] time(1/4 1/8) note(7 1) env(1 300) beat(0.2) group(sn bass) add_fx(reverb 0.9 11) add_fx(lfo 1/4 up)"
"@object": {
"@new": {
"@type": {
"@array": [
{
"@identifier": "sine"
},
{
"@identifier": "saw"
}
]
},
"@functions": [
{
"@function": {
"@name": "time",
"@args": [
{
"@division": "1/4"
},
{
"@division": "1/8"
}
]
}
},
{
"@function": {
"@name": "note",
"@args": [
{
"@number": 7
},
{
"@number": 1
}
]
}
},
{
"@function": {
"@name": "env",
"@args": [
{
"@number": 1
},
{
"@number": 300
}
]
}
},
{
"@function": {
"@name": "beat",
"@args": [
{
"@number": 0.2
}
]
}
},
{
"@function": {
"@name": "group",
"@args": [
{
"@identifier": "sn"
},
{
"@identifier": "bass"
}
]
}
},
{
"@function": {
"@name": "add_fx",
"@args": [
{
"@identifier": "reverb"
},
{
"@number": 0.9
},
{
"@number": 11
}
]
}
},
{
"@function": {
"@name": "add_fx",
"@args": [
{
"@identifier": "lfo"
},
{
"@division": "1/4"
},
{
"@identifier": "up"
}
]
}
}
]
}
}
},
{
"@global": {
"@comment": "// new sample [ kick_min snare_dub ] time(1/16) shape(1 1/32 2) beat(0.9)"
"@object": {
"@new": {
"@type": {
"@array": [
{
"@identifier": "kick_min"
},
{
"@identifier": "snare_dub"
}
]
},
"@functions": [
{
"@function": {
"@name": "time",
"@args": [
{
"@division": "1/16"
}
]
}
},
{
"@function": {
"@name": "env",
"@args": [
{
"@number": 1
},
{
"@division": "1/32"
},
{
"@number": 2
}
]
}
},
{
"@function": {
"@name": "beat",
"@args": [
{
"@number": 0.9
}
]
}
}
]
}
}
},
{
"@global": {
"@comment": "// new synth sine name(aSynth)"
"@object": {
"@new": {
"@type": {
"@identifier": "sine"
},
"@functions": [
{
"@function": {
"@name": "name",
"@args": [
{
"@identifier": "aSynth"
}
]
}
}
]
}
}
},
{
"@global": {
"@comment": "// \tset aSynth note(notes 1) timing(1/16) shape(1000 200) play(0.8) aux(sn ld)"
"@object": {
"@set": {
"@functions": [
{
"@function": {
"@name": "note",
"@args": [
{
"@identifier": "notes"
},
{
"@number": 1
}
]
}
},
{
"@function": {
"@name": "time",
"@args": [
{
"@division": "1/16"
}
]
}
},
{
"@function": {
"@name": "env",
"@args": [
{
"@number": 1000
},
{
"@number": 200
}
]
}
},
{
"@function": {
"@name": "beat",
"@args": [
{
"@number": 0.8
}
]
}
},
{
"@function": {
"@name": "group",
"@args": [
{
"@identifier": "sn"
},
{
"@identifier": "ld"
}
]
}
}
]
}
}
},
{
"@global": {
"@comment": "// \tset bSynth gain(0.5 100)"
"@object": {
"@set": {
"@functions": [
{
"@function": {
"@name": "amp",
"@args": [
{
"@number": 0.5
},
{
"@number": 100
}
]
}
}
]
}
}
},
{
"@global": {
"@comment": "// \tset aSynth osc2(sine 2) withFX(drive 16) addFX(lfo 1/4 sine)"
"@object": {
"@set": {
"@functions": [
{
"@function": {
"@name": "wave2",
"@args": [
{
"@identifier": "sine"
},
{
"@number": 2
}
]
}
},
{
"@function": {
"@name": "add_fx",
"@args": [
{
"@identifier": "drive"
},
{
"@number": 16
}
]
}
},
{
"@function": {
"@name": "add_fx",
"@args": [
{
"@identifier": "lfo"
},
{
"@division": "1/4"
},
{
"@identifier": "sine"
}
]
}
}
]
}
}
},
{
"@global": {
"@comment": "// new synth saw name(bSynth)"
"@object": {
"@new": {
"@type": {
"@identifier": "saw"
},
"@functions": [
{
"@function": {
"@name": "name",
"@args": [
{
"@identifier": "bSynth"
}
]
}
}
]
}
}
},
{
"@global": {
"@comment": "// \tset bSynth note(random(4 0 12) 2) time(1/16) env(300 1000) "
"@object": {
"@set": {
"@functions": [
{
"@function": {
"@name": "note",
"@args": [
{
"@function": {
"@name": "random",
"@args": [
{
"@number": 4
},
{
"@number": 0
},
{
"@number": 12
}
]
}
},
{
"@number": 2
}
]
}
},
{
"@function": {
"@name": "time",
"@args": [
{
"@division": "1/16"
}
]
}
},
{
"@function": {
"@name": "env",
"@args": [
{
"@number": 300
},
{
"@number": 1000
}
]
}
}
]
}
}
},
{
"@global": {
"@comment": "// \tset bSynth pan(random) group(bass intro)"
"@object": {
"@set": {
"@functions": [
{
"@function": {
"@name": "pan",
"@args": [
{
"@identifier": "random"
}
]
}
},
{
"@function": {
"@name": "group",
"@args": [
{
"@identifier": "bass"
},
{
"@identifier": "intro"
}
]
}
}
]
}
}
},
{
"@global": {
"@comment": "// \tset bSynth gain(0) beat(0.7)"
"@object": {
"@set": {
"@functions": [
{
"@function": {
"@name": "amp",
"@args": [
{
"@number": 0
}
]
}
},
{
"@function": {
"@name": "beat",
"@args": [
{
"@number": 0.7
}
]
}
}
]
}
}
},
{
"@global": {
"@comment": "// new sample kick_min name(kck)"
"@object": {
"@new": {
"@type": {
"@identifier": "kick_min"
},
"@functions": [
{
"@function": {
"@name": "name",
"@args": [
{
"@identifier": "kck"
}
]
}
}
]
}
}
},
{
"@global": {
"@comment": "// \tset kck time(1/4) fx(drive 1.1) fx(filter low 500 0.3)"
"@object": {
"@set": {
"@functions": [
{
"@function": {
"@name": "time",
"@args": [
{
"@division": "1/4"
}
]
}
},
{
"@function": {
"@name": "add_fx",
"@args": [
{
"@identifier": "drive"
},
{
"@number": 1.1
}
]
}
},
{
"@function": {
"@name": "add_fx",
"@args": [
{
"@identifier": "filter"
},
{
"@identifier": "low"
},
{
"@number": 500
},
{
"@number": 0.3
}
]
}
}
]
}
}
},
{
"@global": {
"@comment": "// set all fx(reverb 1 20) fx(chip 0.5)"
"@object": {
"@set": {
"@functions": [
{
"@function": {
"@name": "add_fx",
"@args": [
{
"@identifier": "reverb"
},
{
"@number": 1
},
{
"@number": 20
}
]
}
},
{
"@function": {
"@name": "add_fx",
"@args": [
{
"@identifier": "chip"
},
{
"@number": 0.5
}
]
}
}
]
}
}
},
{
"@global": {
"@comment": "// set sn fx(reverb 0.9 17)"
"@object": {
"@set": {
"@functions": [
{
"@function": {
"@name": "add_fx",
"@args": [
{
"@identifier": "reverb"
},
{
"@number": 0.9
},
{
"@number": 17
}
]
}
}
]
}
}
},
{
"@global": {
"@comment": "// set bass fx(drive 5)"
"@object": {
"@set": {
"@functions": [
{
"@function": {
"@name": "add_fx",
"@args": [
{
"@identifier": "drive"
},
{
"@number": 5
}
]
}
}
]
}
}

@@ -180,3 +1192,6 @@ }

},
"errors": []
"errors": [
"Unkown instrument or setting name: sn",
"Unkown instrument or setting name: bass"
]
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

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