Skip to content

Commit

Permalink
Added plugin name to sigma2aurora.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Raphael Knoop committed Nov 4, 2020
1 parent 10d50f0 commit aa548dd
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 8 deletions.
Binary file modified SOURCES/WEBAPP/ESP32/aurora/aurora.ino.esp32.bin
Binary file not shown.
Binary file modified SOURCES/WEBAPP/ESP32/aurora/data/aurora.jgz
Binary file not shown.
1 change: 1 addition & 0 deletions SOURCES/WEBAPP/ESP32/aurora/data/plugin.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"name":"4FIRs",
"nlp": 0,
"xohp": [],
"nhp": 0,
Expand Down
3 changes: 0 additions & 3 deletions SOURCES/WEBAPP/ESP32/aurora/web.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1130,9 +1130,6 @@ void handlePostGainJson( AsyncWebServerRequest* request, uint8_t* data )
softMuteDAC();

JsonObject root = jsonDoc.as<JsonObject>();
Serial.println( root["idx"].as<String>() );
Serial.println( root["gain"].as<String>() );
Serial.println( root["mute"].as<String>() );

uint32_t idx = static_cast<uint32_t>(root["idx"].as<String>().toInt());
paramGain[idx].gain = root["gain"].as<String>().toFloat();
Expand Down
Binary file modified SOURCES/WEBAPP/js/aurora.jgz
Binary file not shown.
2 changes: 1 addition & 1 deletion SOURCES/WEBAPP/js/aurora.js
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,6 @@ function postJson(btp){
var bypass=document.getElementById("fir_bypass").dataset.bypass;
var taps = new Float32Array(4096);
for(var k=0;k<4096;k++) taps[k]=0;
taps[0]=1;
document.getElementById("msg").innerHTML="Updating FIRs, please wait...";
document.getElementById("plzw").style.display="block";
if(document.getElementById("irfile").files.length>0){
Expand All @@ -638,6 +637,7 @@ function postJson(btp){
else
{
return new Promise((resolve, reject) => {
taps[0]=1;
var fir = new Blob([taps], {type:'application/octet-binary'});
return fetch("/fir?idx="+idx+"&bypass="+bypass,{method:'POST',headers:{},body:fir});
}).then(function(response){
Expand Down
1 change: 1 addition & 0 deletions SOURCES/sigma2aurora/plugin.ini
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@
],
"phase": [],
"ngain": 4,
"name": "4FIRs",
"nfir": 4,
"exp": [
44854,
Expand Down
13 changes: 9 additions & 4 deletions SOURCES/sigma2aurora/sigma2aurora.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,24 @@ def __setitem__(self, index, value):
numchn = 8

parser = argparse.ArgumentParser()
parser.add_argument("--input", "-i", help="Parameter XML file in SigmaStudio project folder")
parser.add_argument("--numchains", "-n", help="set number of dsp chains")
parser.add_argument("input", help="Parameter XML file in SigmaStudio project folder")
parser.add_argument("numchains", help="Set number of dsp chains")
parser.add_argument("plugin", help="Name of plugin")

# Read arguments from the command line
args = parser.parse_args()

# Check for --input
if args.input:
tree = ET.parse(args.input)
print(args.input)
tree = ET.parse(args.input)
# Check for --numchains
if args.numchains:
print("Number of DSP chains: %s" % args.numchains)
numchn = int(args.numchains)
if args.plugin:
print("Name of plugin: %s" % args.plugin)
nameplugin = args.plugin

#tree = ET.parse(str(sys.argv[1]))
root = tree.getroot()
Expand Down Expand Up @@ -414,7 +418,8 @@ def __setitem__(self, index, value):
ngain = len(gain_t)
nfir = len(fir_t)

data = {"nchn":numchn,
data = {"name":nameplugin,
"nchn":numchn,
"nhp":nhp,
"nlshelv":nlshelv,
"npeq":npeq,
Expand Down

0 comments on commit aa548dd

Please sign in to comment.