aboutsummaryrefslogtreecommitdiffstats
path: root/examples/src
diff options
context:
space:
mode:
Diffstat (limited to 'examples/src')
-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
5 files changed, 17 insertions, 13 deletions
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>