diff options
author | Richard <q@1bpm.net> | 2025-04-16 01:04:34 +0100 |
---|---|---|
committer | Richard <q@1bpm.net> | 2025-04-16 01:04:34 +0100 |
commit | bda3a99797df33f8bff48960318b14a0d81c52a3 (patch) | |
tree | ef28024823751abd4cbcb73093bb18b338628161 /site/app/twirl | |
parent | 9fbf91db06a6d4f4b5cd8bb45389a731bb86bf22 (diff) | |
download | apps.csound.1bpm.net-master.tar.gz apps.csound.1bpm.net-master.tar.bz2 apps.csound.1bpm.net-master.zip |
Diffstat (limited to 'site/app/twirl')
-rw-r--r-- | site/app/twirl/appdata.js | 8 | ||||
-rw-r--r-- | site/app/twirl/transform.js | 8 | ||||
-rw-r--r-- | site/app/twirl/twirl.js | 10 | ||||
-rw-r--r-- | site/app/twirl/twirl_compiler.py | 15 |
4 files changed, 27 insertions, 14 deletions
diff --git a/site/app/twirl/appdata.js b/site/app/twirl/appdata.js index b417c3f..b8a7734 100644 --- a/site/app/twirl/appdata.js +++ b/site/app/twirl/appdata.js @@ -271,7 +271,7 @@ twirl.appdata = { parameters: [
{preset: "amp"},
{presetgroup: "notefreq"},
- {name: "Feedback", min: 0.1, max: 10, dfault: 1.1},
+ {name: "Feedback", min: 0.1, max: 10, dfault: 2},
{name: "Filter bandwidth", channel: "bandwidth", min: 10, max: 500, dfault: 125},
{name: "Post gain", channel: "postgain", min: 0.1, max: 2, dfault: 1},
{presetgroup: "applymode"}
@@ -285,10 +285,10 @@ twirl.appdata = { parameters: [
{preset: "amp"},
{presetgroup: "notefreq"},
- {name: "Frequency step multiplier", channel: "multiplier", min: 1.0001, max: 2, dfault: 1.1},
- {name: "Frequency multiplier", channel: "stepmultiplier", min: 0.5, max: 2, dfault: 1},
+ {name: "Frequency step multiplier", channel: "stepmultiplier", min: 1.0001, max: 2, dfault: 1.1},
+ {name: "Frequency multiplier", channel: "multiplier", min: 0.5, max: 2, dfault: 1},
{name: "Amplitude smoothing", channel: "ampprofile", min: 0, max: 1, step: 1, dfault: 1},
- {name: "Harmonics", min: 2, max: 256, dfault: 64, automatable: false},
+ {name: "Harmonics", min: 2, max: 128, step: 1, dfault: 64, automatable: false},
{presetgroup: "applymode"}
]
}
diff --git a/site/app/twirl/transform.js b/site/app/twirl/transform.js index 1feff51..2d89d8c 100644 --- a/site/app/twirl/transform.js +++ b/site/app/twirl/transform.js @@ -1011,11 +1011,11 @@ twirl.transform.Transform = function(options) { }
}
groupParameters = [
- {name: "Apply mode", channel: "applymode", absolutechannel: true, description: "Apply mode", automatable: true, options: ["Replace", "Mix", "Modulate", "Demodulate", "Filter"], dfault: 0, conditions: pdef.conditions},
+ {name: "Apply mode", channel: "applymode", absolutechannel: true, description: "Apply mode", automatable: true, options: ["Replace", "Mix", "Modulate", "Demodulate", "Filter mix"], dfault: 0, conditions: pdef.conditions},
{name: "Dry mix", description: "Original signal amplitude", channel: "applymodedry", absolutechannel: true, conditions: conditionsMix, min: 0, max: 1, dfault: 1},
{name: "Wet mix", description: "Transformed signal amplitude", channel: "applymodewet", absolutechannel: true, conditions: conditionsMix, min: 0, max: 1, dfault: 1},
- {name: "Minimum frequency", description: "Minimum frequency to transform", channel: "applymodedry", absolutechannel: true, conditions: conditionsFilter, min: 20, max: 44100, dfault: 500},
- {name: "Maximum frequency", description: "Maximum frequency to transform", channel: "applymodedry", absolutechannel: true, conditions: conditionsFilter, min: 20, max: 44100, dfault: 2000}
+ {name: "Minimum frequency", description: "Minimum frequency to transform", channel: "applymodehpf", absolutechannel: true, conditions: conditionsFilter, min: 20, max: 22000, dfault: 500},
+ {name: "Maximum frequency", description: "Maximum frequency to transform", channel: "applymodelpf", absolutechannel: true, conditions: conditionsFilter, min: 20, max: 22000, dfault: 2000}
];
} else if (pdef.presetgroup == "pvanal") {
@@ -1195,7 +1195,7 @@ twirl.transform.TreeView = function(options) { var dp = items[k].added.split("-");
var added = new Date(dp[0], dp[1] - 1, dp[2]);
if (Math.round((new Date() - added) / (1000 * 60 * 60 * 24)) <= 14) {
- x.html(name + " <p style=\"display:inline;color:#ff2222;\"> [new]</p>");
+ content = name + " <p style=\"display:inline;color:#ff2222;\"> [new]</p>";
}
}
li.html(content).css("cursor", "pointer").click(function() {
diff --git a/site/app/twirl/twirl.js b/site/app/twirl/twirl.js index 5f201f6..71c3316 100644 --- a/site/app/twirl/twirl.js +++ b/site/app/twirl/twirl.js @@ -31,7 +31,7 @@ twirl.init = function() { var NoteData = function() {
var self = this;
this.data = null;
- fetch("https://apps.csound.1bpm.net/app/twirl/notedata.json").then(function(r) {
+ fetch("../twirl/notedata.json").then(function(r) {
r.json().then(function(j) {
self.data = j;
});
@@ -93,6 +93,12 @@ twirl.random = { }
};
+twirl.getSharedFiles = async function() {
+ var data = await fetch("../sounddb/data.json");
+ var json = await data.json();
+ return json;
+};
+
twirl.createIcon = function(definition) {
var state = true;
var active = true;
@@ -272,7 +278,7 @@ twirl.sendErrorState = async function(errorObj) { if (twirl._remote.sessionID) {
data.session_id = twirl._remote.sessionID;
}
- var resp = await fetch("https:///service/", {
+ var resp = await fetch("https:///apps.csound.1bpm.net/service/", {
method: "POST",
headers: {
"Content-type": "application/json"
diff --git a/site/app/twirl/twirl_compiler.py b/site/app/twirl/twirl_compiler.py index cc2ba3e..5a72e2d 100644 --- a/site/app/twirl/twirl_compiler.py +++ b/site/app/twirl/twirl_compiler.py @@ -64,7 +64,7 @@ def compile(app): with open(os.path.join(target_dir, "{}.css".format(app)), "w") as f:
f.write(css_data)
- links = [
+ dups = [
[twirl_path, "twirl"],
[os.path.join(twirl_path, "font"), "font"],
[os.path.join(top_path, "udo"), "udo"],
@@ -72,11 +72,18 @@ def compile(app): [os.path.join(app_path, "{}.csd".format(app)), "{}.csd".format(app)]
]
- for l in links:
+ for l in dups:
target = os.path.join(target_dir, l[1])
- if os.path.islink(target):
+ if os.path.islink(target) or os.path.isfile(target):
os.unlink(target)
- os.symlink(l[0], target)
+ elif os.path.isdir(target):
+ shutil.rmtree(target)
+
+ if os.path.isfile(l[0]):
+ shutil.copy2(l[0], target)
+ elif os.path.isdir(l[0]):
+ shutil.copytree(l[0], target)
+ #os.symlink(l[0], target)
copies = ["documentation.html", "developer_documentation.html"]
for c in copies:
|