Pipes Units JavaSound

Pipes Units API support using JavaSound.

License

License

GroupId

GroupId

org.jaudiolibs
ArtifactId

ArtifactId

pipes-units-javasound
Last Version

Last Version

2.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

Pipes Units JavaSound
Pipes Units API support using JavaSound.
Source Code Management

Source Code Management

https://github.com/jaudiolibs/pipes/tree/master/pipes-units-javasound

Download pipes-units-javasound

How to add to project

<!-- https://jarcasting.com/artifacts/org.jaudiolibs/pipes-units-javasound/ -->
<dependency>
    <groupId>org.jaudiolibs</groupId>
    <artifactId>pipes-units-javasound</artifactId>
    <version>2.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.jaudiolibs/pipes-units-javasound/
implementation 'org.jaudiolibs:pipes-units-javasound:2.0.0'
// https://jarcasting.com/artifacts/org.jaudiolibs/pipes-units-javasound/
implementation ("org.jaudiolibs:pipes-units-javasound:2.0.0")
'org.jaudiolibs:pipes-units-javasound:jar:2.0.0'
<dependency org="org.jaudiolibs" name="pipes-units-javasound" rev="2.0.0">
  <artifact name="pipes-units-javasound" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.jaudiolibs', module='pipes-units-javasound', version='2.0.0')
)
libraryDependencies += "org.jaudiolibs" % "pipes-units-javasound" % "2.0.0"
[org.jaudiolibs/pipes-units-javasound "2.0.0"]

Dependencies

compile (4)

Group / Artifact Type Version
org.jaudiolibs : audioops-api jar 1.0.0
org.jaudiolibs : audioops-impl jar 1.0.0
org.jaudiolibs : pipes-core jar 2.0.0
org.jaudiolibs : pipes-units jar 2.0.0

Project Modules

There are no modules declared in this project.

Pipes

Pipes is an audio routing and unit generator library linking together the various other JAudioLibs libraries. Pipes consists of code that was originally written for or included in PraxisLIVE, but is now provided separately for re-use by other Java audio or DSP projects.

It currently consists of four modules -

  • Pipes Core : the base routing and unit generator API
  • Pipes Units : a range of useful audio units, including oscillators, sample players / loopers, audio effects, etc.
  • Pipes Units JavaSound : audio file loading support for Pipes Units based on JavaSound APIs.
  • Pipes Graph : support for creating and playing Graph subclasses, providing many useful additions from the custom audio API inside PraxisLIVE, including a simplified API for linking units, easy wrapping of lambda functions, audio rate based animators and ScheduledExecutorService, and optional support for annotation based field injection (allowing easy transfer of code from PraxisCORE).

All modules are licensed under LGPLv3, except for Pipes Units JavaSound which is licensed under GPLv2+CPE.

Getting Started

Pipes Graphs makes it easy to get started with building Java audio DSP graphs in Java, making full use of Java 8+ features.

eg. A simple graph example showing monophonic synth, custom lambda function to generate noise, and animated filter frequency -

public class SimpleGraph extends Graph {

    @UGen IIRFilter filter;
    @UGen Osc osc;
    @UGen Chorus chorus;

    @Inject Property sweep, env;
    @Inject Clock clock;

    @Override
    protected void init() {
        Pipe noise = link(
                fn(d -> Math.random() * 2 - 1),
                filter.frequency(110).resonance(15),
                chorus.depth(1.4).feedback(0.4).rate(8),
                tee());
        Pipe syn = link(
                osc.waveform(Waveform.Square).gain(0.),
                tee());
        
        link(add(noise, syn), out(0));
        link(add(noise, syn), out(1));

        sweep.animator().whenDone(p -> p.to(8000, 65).in(4, 0.2).easeInOut());
        sweep.link(filter::frequency);

        String[] notes = {"a2", "g2", "d2", "a3", "c#3", "e3"};

        clock.bpm(120).on()
                .filter(i -> i % 8 < 7)
                .mapTo(i -> notes[i % notes.length])
                .link(n -> {
                    env.set(0.8).to(0).in(1);
                    osc.frequency(noteToFrequency(n));
                });

        env.link(d -> osc.gain(d * d * d * d));

    }

    public static void main(String[] args) {
        GraphPlayer.create(new SimpleGraph())
//                .library("JACK")
//                .ext(new ClientID("Simple Graph"))
//                .ext(Connections.ALL)
                .build()
                .start();
    }

}

The Pipes Graph library mirrors much of the audio coding API inside PraxisLIVE, so much of the documentation on coding audio components is directly transferable. Also see the JavaDoc and the examples repository for more, or experiment inside PraxisLIVE itself.

org.jaudiolibs

JAudioLibs

Versions

Version
2.0.0
2.0.0-beta-1