Skip to content

Commit

Permalink
Merge pull request #21 from SleepyLGod/dev-midi-generator
Browse files Browse the repository at this point in the history
Dev midi generator
  • Loading branch information
SleepyLGod committed Nov 9, 2022
2 parents ba23d4d + b8e1c6f commit b2e0a57
Show file tree
Hide file tree
Showing 17 changed files with 102,585 additions and 36,978 deletions.
25 changes: 25 additions & 0 deletions OmgPianoPlayer/Untitled-1.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

<html>

<head>
<title>hi</title>
</head>

<body>
<script>
var xhr = new XMLHttpRequest();
xhr.open("POST", "http:https://localhost:8084/transcription/mp3ToMidi", true);
xhr.setRequestHeader('content-type', 'application/json');

var sendData = {
"isAbsolute": "false",
"resourcePath": "\\pianotranscriptioncli\\src\\main\\resources\\",
"outPath": "\\pianotranscriptioncli\\src\\main\\resources\\output",
"songName": "雨的印记"
};
//将用户输入值序列化成字符串
xhr.send(JSON.stringify(sendData));


</script>
</body>
32 changes: 32 additions & 0 deletions OmgPianoPlayer/Untitled-1.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
var a=["1","2","3","4","5"];
var b=["a","b","c","d","e"];
var c={};
var d=new Array();
var g=new Array();
var e=new Array();
for (i=0;i<5;i++){
d.push({"s":a[i],"z":b[i]});
g.push({"z":a[4-i],"m":b[4-i]});
}
c["d"]=d;
c["g"]=g;
e.push(d);
e.push(g);
for (i=0;i<c.d.length;i++){
var f=c.d[i];
console.log(f.s)
}

$.ajax({
url:"addJson",
data:JSON.stringify(c),
contentType :"application/json;charsetset=UTF-8",//必须
dataType:"json",//必须
type:"post",
success:function (data) {
alert(data)
},error:function () {
alert(222)
}

})
337 changes: 332 additions & 5 deletions OmgPianoPlayer/index.html

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions OmgPianoPlayer/vendor/ColladaLoader.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* @author Tim Knip / http:https://www.floorplanner.com/ / tim at floorplanner.com
*/

THREE.ColladaLoader = function () {

var COLLADA = null;
Expand Down
2 changes: 1 addition & 1 deletion OmgPianoPlayer/vendor/MIDI/js/midi/LoadPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ MIDI.loadPlugin = function(conf) {
}
};
///
MIDI.soundfontUrl = conf.soundfontUrl || MIDI.soundfontUrl || "./soundfont/";
MIDI.soundfontUrl = conf.soundfontUrl || MIDI.soundfontUrl || "./vendor/MIDI/soundfont/";
/// Detect the best type of audio to use.
MIDI.audioDetect(function(types) {
var api = "";
Expand Down
11 changes: 10 additions & 1 deletion OmgPianoPlayer/vendor/OrbitAndPanControls.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@

/**
* @author qiao / https://github.com/qiao
* @author mrdoob / http:https://mrdoob.com
* @author alteredq / http:https://alteredqualia.com/
* @author WestLangley / https://github.com/WestLangley
* @author erich666 / http:https://erichaines.com
*
* Not quite correct: sort of assumes a 45 degree field of view.
* Currently uses distance to target for offsetting
*/

THREE.OrbitAndPanControls = function ( object, domElement ) {

Expand Down
32 changes: 22 additions & 10 deletions OmgPianoPlayer/vendor/Stats.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions OmgPianoPlayer/vendor/dat.gui.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
/**
* dat-gui JavaScript Controller Library
* http:https://code.google.com/p/dat-gui
*
* Copyright 2011 Data Arts Team, Google Creative Lab
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http:https://www.apache.org/licenses/LICENSE-2.0
*/

/** @namespace */
var dat = dat || {};
Expand Down
Loading

0 comments on commit b2e0a57

Please sign in to comment.