Last active
May 22, 2021 05:25
-
-
Save tstone/83f8b414a01dc0cb7b89ddaae0e907e0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.collidermodular.core; | |
public interface Host { | |
public double getSampleRate(); | |
public double getSamplesPerMs(); | |
public double getMsPerSample(); | |
public double getTempo(); | |
} | |
public interface ValueSource { | |
public double getValue(); | |
} | |
public interface AvailableValueSource extends ValueSource { | |
public boolean isAvailable(); | |
} | |
public interface PolySource { | |
public boolean isAvailable(); | |
public double getValue(int channel); | |
} | |
// ------ | |
private PolySource jackToSource(VoltagePolyJack jack) { | |
return new PolySource() { | |
public boolean isAvailable() { | |
return jack.IsConnected(); | |
} | |
public double getValue(int channel) { | |
return jack.GetPolyValue(channel); | |
} | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment