aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build.gradle4
-rw-r--r--examples/src/main/java/com/jsyn/examples/AudioPassThrough.java3
-rw-r--r--examples/src/main/java/com/jsyn/examples/PlayFunction.java7
-rw-r--r--examples/src/main/java/com/jsyn/examples/PlayNotes.java7
-rw-r--r--examples/src/main/java/com/jsyn/examples/PlayTone.java7
-rw-r--r--examples/src/main/resources/log4j.xml6
-rw-r--r--src/test/java/com/jsyn/engine/TestWaveFileReadWrite.java2
-rw-r--r--src/test/java/com/jsyn/ports/TestSequentialData.java4
-rw-r--r--src/test/java/com/jsyn/unitgen/TestEnvelopeAttackDecay.java8
-rw-r--r--src/test/resources/log4j.xml (renamed from src/main/resources/log4j.xml)6
10 files changed, 29 insertions, 25 deletions
diff --git a/build.gradle b/build.gradle
index 047aba8..863f7ce 100644
--- a/build.gradle
+++ b/build.gradle
@@ -7,7 +7,7 @@ plugins {
group = 'com.jsyn'
version = '17.0.0-SNAPSHOT'
-sourceCompatibility = '11'
+sourceCompatibility = '1.8'
mainClassName = 'com.jsyn.apps.AboutJSyn'
repositories {
@@ -17,9 +17,9 @@ repositories {
dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter:5.4.2'
+ testImplementation 'org.slf4j:slf4j-log4j12:1.7.25'
implementation 'org.slf4j:slf4j-api:1.7.25'
- implementation 'org.slf4j:slf4j-log4j12:1.7.25'
implementation fileTree(dir: 'libs', include: '*.jar')
}
diff --git a/examples/src/main/java/com/jsyn/examples/AudioPassThrough.java b/examples/src/main/java/com/jsyn/examples/AudioPassThrough.java
index 383dba4..ad0133d 100644
--- a/examples/src/main/java/com/jsyn/examples/AudioPassThrough.java
+++ b/examples/src/main/java/com/jsyn/examples/AudioPassThrough.java
@@ -17,6 +17,7 @@
package com.jsyn.examples;
import com.jsyn.JSyn;
+import com.jsyn.Synthesizer;
import com.jsyn.devices.AudioDeviceManager;
import com.jsyn.unitgen.LineIn;
import com.jsyn.unitgen.LineOut;
@@ -37,7 +38,7 @@ public class AudioPassThrough {
LineOut lineOut;
// Create a context for the synthesizer.
- var synth = JSyn.createSynthesizer();
+ Synthesizer synth = JSyn.createSynthesizer();
// Add an audio input.
synth.add(lineIn = new LineIn());
// Add an audio output.
diff --git a/examples/src/main/java/com/jsyn/examples/PlayFunction.java b/examples/src/main/java/com/jsyn/examples/PlayFunction.java
index 9c389c9..6051454 100644
--- a/examples/src/main/java/com/jsyn/examples/PlayFunction.java
+++ b/examples/src/main/java/com/jsyn/examples/PlayFunction.java
@@ -17,6 +17,7 @@
package com.jsyn.examples;
import com.jsyn.JSyn;
+import com.jsyn.Synthesizer;
import com.jsyn.data.Function;
import com.jsyn.unitgen.FunctionOscillator;
import com.jsyn.unitgen.LineOut;
@@ -34,13 +35,13 @@ public class PlayFunction {
private void test() {
// Create a context for the synthesizer.
- var synth = JSyn.createSynthesizer();
+ Synthesizer synth = JSyn.createSynthesizer();
// Start synthesizer using default stereo output at 44100 Hz.
synth.start();
// Add a FunctionOscillator
- var oscillator = new FunctionOscillator();
+ FunctionOscillator oscillator = new FunctionOscillator();
synth.add(oscillator);
// Define a function that gives the shape of the waveform.
@@ -53,7 +54,7 @@ public class PlayFunction {
oscillator.function.set(func);
// Add a stereo audio output unit.
- var lineOut = new LineOut();
+ LineOut lineOut = new LineOut();
synth.add(lineOut);
// Connect the oscillator to both channels of the output.
diff --git a/examples/src/main/java/com/jsyn/examples/PlayNotes.java b/examples/src/main/java/com/jsyn/examples/PlayNotes.java
index 636dc1b..d920f41 100644
--- a/examples/src/main/java/com/jsyn/examples/PlayNotes.java
+++ b/examples/src/main/java/com/jsyn/examples/PlayNotes.java
@@ -17,6 +17,7 @@
package com.jsyn.examples;
import com.jsyn.JSyn;
+import com.jsyn.Synthesizer;
import com.jsyn.unitgen.LineOut;
import com.jsyn.unitgen.SawtoothOscillator;
import com.softsynth.shared.time.TimeStamp;
@@ -35,17 +36,17 @@ public class PlayNotes {
private void test() {
// Create a context for the synthesizer.
- var synth = JSyn.createSynthesizer();
+ Synthesizer synth = JSyn.createSynthesizer();
// Set output latency to 123 msec because this is not an interactive app.
synth.getAudioDeviceManager().setSuggestedOutputLatency(0.123);
// Add a tone generator.
- var voice = new SawtoothOscillator();
+ SawtoothOscillator voice = new SawtoothOscillator();
synth.add(voice);
// synth.add( ugen = new SineOscillator() );
// synth.add( ugen = new SubtractiveSynthVoice() );
// Add an output mixer.
- var lineOut = new LineOut();
+ LineOut lineOut = new LineOut();
synth.add(lineOut);
// Connect the oscillator to the left and right audio output.
diff --git a/examples/src/main/java/com/jsyn/examples/PlayTone.java b/examples/src/main/java/com/jsyn/examples/PlayTone.java
index e514dba..94d1240 100644
--- a/examples/src/main/java/com/jsyn/examples/PlayTone.java
+++ b/examples/src/main/java/com/jsyn/examples/PlayTone.java
@@ -17,6 +17,7 @@
package com.jsyn.examples;
import com.jsyn.JSyn;
+import com.jsyn.Synthesizer;
import com.jsyn.unitgen.LineOut;
import com.jsyn.unitgen.SineOscillator;
import org.slf4j.Logger;
@@ -34,16 +35,16 @@ public class PlayTone {
private void test() {
// Create a context for the synthesizer.
- var synth = JSyn.createSynthesizer();
+ Synthesizer synth = JSyn.createSynthesizer();
// Start synthesizer using default stereo output at 44100 Hz.
synth.start();
// Add a tone generator.
- var oscillator = new SineOscillator();
+ SineOscillator oscillator = new SineOscillator();
synth.add(oscillator);
// Add a stereo audio output unit.
- var lineOut = new LineOut();
+ LineOut lineOut = new LineOut();
synth.add(lineOut);
// Connect the oscillator to both channels of the output.
diff --git a/examples/src/main/resources/log4j.xml b/examples/src/main/resources/log4j.xml
index cc107b1..43fb2e0 100644
--- a/examples/src/main/resources/log4j.xml
+++ b/examples/src/main/resources/log4j.xml
@@ -1,5 +1,5 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd" >
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration debug="false">
<appender name="default.console" class="org.apache.log4j.ConsoleAppender">
<param name="target" value="System.out"/>
@@ -9,7 +9,7 @@
</appender>
<root>
- <priority value="INFO" />
+ <priority value="DEBUG" />
<appender-ref ref="default.console"/>
</root>
</log4j:configuration>
diff --git a/src/test/java/com/jsyn/engine/TestWaveFileReadWrite.java b/src/test/java/com/jsyn/engine/TestWaveFileReadWrite.java
index b5051e6..a027d0b 100644
--- a/src/test/java/com/jsyn/engine/TestWaveFileReadWrite.java
+++ b/src/test/java/com/jsyn/engine/TestWaveFileReadWrite.java
@@ -43,7 +43,7 @@ public class TestWaveFileReadWrite {
writer.setSamplesPerFrame(numChannels);
writer.setBitsPerSample(16);
- for (var datum : data) {
+ for (float datum : data) {
writer.write(datum);
}
writer.close();
diff --git a/src/test/java/com/jsyn/ports/TestSequentialData.java b/src/test/java/com/jsyn/ports/TestSequentialData.java
index 2f27ec2..f95ebcb 100644
--- a/src/test/java/com/jsyn/ports/TestSequentialData.java
+++ b/src/test/java/com/jsyn/ports/TestSequentialData.java
@@ -37,8 +37,8 @@ public class TestSequentialData {
@Test
public void testCrossfade() {
- var sample1 = new FloatSample(data1);
- var sample2 = new FloatSample(data2);
+ FloatSample sample1 = new FloatSample(data1);
+ FloatSample sample2 = new FloatSample(data2);
SequentialDataCrossfade xfade = new SequentialDataCrossfade();
xfade.setup(sample1, 4, 3, sample2, 1, 6);
diff --git a/src/test/java/com/jsyn/unitgen/TestEnvelopeAttackDecay.java b/src/test/java/com/jsyn/unitgen/TestEnvelopeAttackDecay.java
index 8328bb7..b30d9f1 100644
--- a/src/test/java/com/jsyn/unitgen/TestEnvelopeAttackDecay.java
+++ b/src/test/java/com/jsyn/unitgen/TestEnvelopeAttackDecay.java
@@ -43,7 +43,7 @@ public class TestEnvelopeAttackDecay extends TestUnitGate {
@Test
public void testOnOff() throws InterruptedException {
- var envelope = new EnvelopeAttackDecay();
+ EnvelopeAttackDecay envelope = new EnvelopeAttackDecay();
synthesisEngine.add(envelope);
envelope.attack.set(0.1);
@@ -81,7 +81,7 @@ public class TestEnvelopeAttackDecay extends TestUnitGate {
@Test
public void testRetrigger() throws InterruptedException {
- var envelope = new EnvelopeAttackDecay();
+ EnvelopeAttackDecay envelope = new EnvelopeAttackDecay();
synthesisEngine.add(envelope);
envelope.attack.set(0.1);
@@ -117,9 +117,9 @@ public class TestEnvelopeAttackDecay extends TestUnitGate {
@Test
public void testAutoDisable() throws InterruptedException {
- var ramp = new LinearRamp();
+ LinearRamp ramp = new LinearRamp();
synthesisEngine.add(ramp);
- var envelope = new EnvelopeAttackDecay();
+ EnvelopeAttackDecay envelope = new EnvelopeAttackDecay();
envelope.attack.set(0.1);
envelope.decay.set(0.1);
synthesisEngine.add(envelope);
diff --git a/src/main/resources/log4j.xml b/src/test/resources/log4j.xml
index cc107b1..43fb2e0 100644
--- a/src/main/resources/log4j.xml
+++ b/src/test/resources/log4j.xml
@@ -1,5 +1,5 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd" >
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration debug="false">
<appender name="default.console" class="org.apache.log4j.ConsoleAppender">
<param name="target" value="System.out"/>
@@ -9,7 +9,7 @@
</appender>
<root>
- <priority value="INFO" />
+ <priority value="DEBUG" />
<appender-ref ref="default.console"/>
</root>
</log4j:configuration>