2023-02-28T02:13:01
This commit is contained in:
BIN
MIDI_sample.mid
Normal file
BIN
MIDI_sample.mid
Normal file
Binary file not shown.
@@ -15,7 +15,7 @@ description = ""//todo
|
||||
|
||||
repositories {
|
||||
maven {
|
||||
url = uri("https://repository.elex-project.com/repository/maven")
|
||||
url = uri(project.findProperty("repo.url") as String)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,16 +68,16 @@ tasks.javadoc {
|
||||
}
|
||||
dependencies {
|
||||
//implementation(fileTree(mapOf("dir" to "libs", "include" to listOf("*.jar"))))
|
||||
implementation("org.slf4j:slf4j-api:1.7.32")
|
||||
implementation("org.jetbrains:annotations:22.0.0")
|
||||
implementation("org.slf4j:slf4j-api:2.0.6")
|
||||
implementation("org.jetbrains:annotations:24.0.0")
|
||||
|
||||
implementation("com.elex-project:abraxas:4.7.1")
|
||||
implementation("com.elex-project:abraxas:4.11.0")
|
||||
|
||||
compileOnly("org.projectlombok:lombok:1.18.20")
|
||||
annotationProcessor("org.projectlombok:lombok:1.18.20")
|
||||
testAnnotationProcessor("org.projectlombok:lombok:1.18.20")
|
||||
compileOnly("org.projectlombok:lombok:1.18.26")
|
||||
annotationProcessor("org.projectlombok:lombok:1.18.26")
|
||||
testAnnotationProcessor("org.projectlombok:lombok:1.18.26")
|
||||
|
||||
implementation("ch.qos.logback:logback-classic:1.2.3")
|
||||
testImplementation("org.junit.jupiter:junit-jupiter:5.7.2")
|
||||
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.7.2")
|
||||
implementation("ch.qos.logback:logback-classic:1.4.5")
|
||||
testImplementation("org.junit.jupiter:junit-jupiter:5.9.2")
|
||||
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.9.2")
|
||||
}
|
||||
|
||||
@@ -70,8 +70,8 @@ publishing {
|
||||
repositories {
|
||||
maven {
|
||||
name = "mavenElex"
|
||||
val urlRelease = uri("https://repository.elex-project.com/repository/maven-releases")
|
||||
val urlSnapshot = uri("https://repository.elex-project.com/repository/maven-snapshots")
|
||||
val urlRelease = uri(project.findProperty("repo.release.url") as String)
|
||||
val urlSnapshot = uri(project.findProperty("repo.snapshot.url") as String)
|
||||
url = if (version.toString().endsWith("SNAPSHOT")) urlSnapshot else urlRelease
|
||||
// Repository credential, Must be defined in ~/.gradle/gradle.properties
|
||||
credentials {
|
||||
@@ -81,7 +81,7 @@ publishing {
|
||||
}
|
||||
maven { //todo
|
||||
name = "mavenGithub"
|
||||
url = uri("https://maven.pkg.github.com/elex-project/tmpl-java-library")
|
||||
url = uri("https://maven.pkg.git.elex-project.com/elex/tmpl-java-library")
|
||||
credentials {
|
||||
username = project.findProperty("github.username") as String
|
||||
password = project.findProperty("github.token") as String
|
||||
|
||||
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -7,6 +7,6 @@
|
||||
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.1-all.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
@@ -12,7 +12,7 @@ plugins {
|
||||
dependencies {
|
||||
implementation ("org.hibernate:hibernate-core:5.5.5.Final")
|
||||
|
||||
runtimeOnly ("com.h2database:h2:1.4.200")
|
||||
runtimeOnly ("com.h2database:h2:2.1.214")
|
||||
runtimeOnly ("org.apache.derby:derby:10.15.2.0")
|
||||
runtimeOnly ("org.xerial:sqlite-jdbc:3.36.0.1")
|
||||
//implementation("com.zsoltfabok:sqlite-dialect:1.0")
|
||||
|
||||
@@ -10,9 +10,9 @@ plugins {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation ("com.fasterxml.jackson.core:jackson-databind:2.12.4")
|
||||
implementation ("com.fasterxml.jackson.core:jackson-databind:2.14.2")
|
||||
|
||||
implementation ("com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.12.4")
|
||||
implementation ("com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.14.2")
|
||||
implementation("com.fasterxml.jackson.dataformat:jackson-dataformat-csv:2.12.4")
|
||||
implementation("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.12.4")
|
||||
}
|
||||
|
||||
@@ -11,5 +11,5 @@ plugins {
|
||||
|
||||
dependencies {
|
||||
// https://mvnrepository.com/artifact/org.jsoup/jsoup
|
||||
implementation("org.jsoup:jsoup:1.14.1")
|
||||
implementation("org.jsoup:jsoup:1.14.2")
|
||||
}
|
||||
|
||||
14
midi/build.gradle.kts
Normal file
14
midi/build.gradle.kts
Normal file
@@ -0,0 +1,14 @@
|
||||
/*
|
||||
* Examples for Java
|
||||
*
|
||||
* Copyright (c) 2021. Elex. All Rights Reserved.
|
||||
* https://www.elex-project.com/
|
||||
*/
|
||||
|
||||
plugins {
|
||||
id("elex-java")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
}
|
||||
33
midi/src/main/java/kr/pe/elex/examples/Examples.java
Normal file
33
midi/src/main/java/kr/pe/elex/examples/Examples.java
Normal file
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* Examples for Java
|
||||
*
|
||||
* Copyright (c) 2021. Elex. All Rights Reserved.
|
||||
* https://www.elex-project.com/
|
||||
*/
|
||||
|
||||
package kr.pe.elex.examples;
|
||||
|
||||
import com.elex_project.abraxas.Console;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import javax.sound.midi.*;
|
||||
|
||||
@Slf4j
|
||||
public class Examples {
|
||||
public static void main(String... args) throws MidiUnavailableException {
|
||||
|
||||
for (MidiDevice.Info info : MidiSystem.getMidiDeviceInfo()) {
|
||||
Console.writeLine("{} / {} / {}",
|
||||
info.getName(), info.getVendor(), info.getDescription());
|
||||
}
|
||||
|
||||
Sequencer sequencer = MidiSystem.getSequencer();
|
||||
Console.writeLine(sequencer.toString());
|
||||
Synthesizer synthesizer = MidiSystem.getSynthesizer();
|
||||
Console.writeLine(synthesizer.toString());
|
||||
Receiver receiver = MidiSystem.getReceiver();
|
||||
Console.writeLine(receiver.toString());
|
||||
//Transmitter transmitter = MidiSystem.getTransmitter();
|
||||
//Console.writeLine(transmitter.toString());
|
||||
}
|
||||
}
|
||||
33
midi/src/main/java/kr/pe/elex/examples/MidiExample.java
Normal file
33
midi/src/main/java/kr/pe/elex/examples/MidiExample.java
Normal file
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* Examples for Java
|
||||
*
|
||||
* Copyright (c) 2021. Elex. All Rights Reserved.
|
||||
* https://www.elex-project.com/
|
||||
*/
|
||||
|
||||
package kr.pe.elex.examples;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import javax.sound.midi.*;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
@Slf4j
|
||||
public class MidiExample {
|
||||
public static void main(String... args) throws MidiUnavailableException, InvalidMidiDataException, IOException {
|
||||
Sequencer sequencer = MidiSystem.getSequencer();
|
||||
Synthesizer synthesizer = MidiSystem.getSynthesizer();
|
||||
Transmitter seqTransmitter = sequencer.getTransmitter();
|
||||
Receiver synthReceiver = synthesizer.getReceiver();
|
||||
|
||||
sequencer.open();
|
||||
Sequence sequence = MidiSystem.getSequence(new File("MIDI_sample.mid"));
|
||||
sequencer.setSequence(sequence);
|
||||
sequencer.start();
|
||||
|
||||
while (true){
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
8
midi/src/main/java/kr/pe/elex/examples/package-info.java
Normal file
8
midi/src/main/java/kr/pe/elex/examples/package-info.java
Normal file
@@ -0,0 +1,8 @@
|
||||
/*
|
||||
* Examples for Java
|
||||
*
|
||||
* Copyright (c) 2021. Elex. All Rights Reserved.
|
||||
* https://www.elex-project.com/
|
||||
*/
|
||||
|
||||
package kr.pe.elex.examples;
|
||||
@@ -11,5 +11,5 @@ plugins {
|
||||
|
||||
dependencies {
|
||||
// https://mvnrepository.com/artifact/org.mockito/mockito-core
|
||||
testImplementation("org.mockito:mockito-core:3.11.2")
|
||||
testImplementation("org.mockito:mockito-core:4.5.1")
|
||||
}
|
||||
|
||||
@@ -10,5 +10,5 @@ plugins {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation("com.github.spullara.mustache.java:compiler:0.9.7")
|
||||
implementation("com.github.spullara.mustache.java:compiler:0.9.10")
|
||||
}
|
||||
|
||||
@@ -64,9 +64,10 @@ public class WebSocketSample {
|
||||
|
||||
WebSocket webSocket = completableFuture.get();
|
||||
|
||||
while (true) {
|
||||
while (!webSocket.isOutputClosed()) {
|
||||
|
||||
Thread.sleep(1500);
|
||||
|
||||
webSocket.sendText("Hello", false);
|
||||
webSocket.sendText(" World", true);
|
||||
}
|
||||
|
||||
@@ -15,5 +15,5 @@ include(
|
||||
"xml", "jackson", "jsoup", "markdown", "network", "httpd",
|
||||
"properties", "serial-io",
|
||||
"mustache", "thymeleaf", "locale", "quartz", "sysinfo",
|
||||
"imaging", "stream", "sound"
|
||||
"imaging", "stream", "sound", "midi"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user