Comments (4)
Sorry - this was dumb.. just realized one can re-initialize the getLineOut()
function and overwrite it with a new bufferSize(). However, can this be dynamically done without issues? Or do the oscil
/pan()
/summer()
etc all need to be un-patched then re-patched to the audioOutput?
I suppose the bufferSize + sampleRate are all dependent on the hardware and DAC one is using, so probably hard to give any suggestions. Would be very interested if Minim has a technique for testing this out to find the optimal one for a given setup.
from minim.
Yeah the Line Out is comparable to the audio output settings in your DAW. Usually you set and forget those and use the highest sample rate and lowest buffer size (ie latency) your particular machine / audio interface can handle. Generally you wouldn't make more than one AudioOutput or change buffer size / sample rate later. As for choosing the best values based on platform, it should be the case the getLineOut()
without arguments will do this, but you can always test with arguments on your target platform to find the highest sample rate and smallest buffer size that don't generate clicks and breaks in audio due to not being able to generate fast enough. But that will also depend on how large of synthesis network you have patched to the output.
The AudioOutput buffer size absolutely does not have to be the same size as the wavetable used by Oscils patched to it. Even though the output presents a buffer of samples at a time, it generates that buffer one sample at a time. And as for the Oscil, how quickly it steps through its wavetable depends on the frequency it is oscillating at, so it's basically never the case that there is a 1:1 mapping between samples in the wavetable and samples generated by the AudioOutput.
from minim.
Aha, good to know regarding set-it-and-forget-it.. but technically there shouldn't be an issue (with oscil, etc patched in) when overriding the getLineOut()
by calling it a 2nd/3rd time (if changing these settings, say in the setup()
of Processing) after it's already been initialized?
Just did a test, changing my output device (both using SoundFlower + MBP Speakers) from 44100 to 96000 samplerate in Audio + Midi Setup, however using default getLineOut()
didn't seem to adjust to that hardware sample rate when checking the out.sampleRate()
. I saw the defaults are 1024/44100, but technically this should change? Or only when actual hardware DAC is being used? I do feel like I've seen it automatically use 96000 on a MOTU device.
import ddf.minim.*;
Minim minim;
AudioOutput out;
void setup() {
size(500, 500);
minim = new Minim(this);
out = minim.getLineOut(Minim.STEREO);
println(out.sampleRate()); // 44100 (hardware set to 96000)
println(out.bufferSize()); // 1024
}
from minim.
Ah, you're right and I misremembered, calling getLineOut()
defaults to 1024/44100. If for some reason that's not available on the default output mixer in Javasound, I think it will hand back something different, which might be why you've seen it automatically use 96000 on a MOTU device.
from minim.
Related Issues (20)
- recorder.save() breaks after 6 files HOT 3
- How to normalize input? HOT 1
- getLineIn doesn't work HOT 1
- How to get the artwork of a mp3 file? HOT 1
- Using Minim in processing, how do I get the tempo of an audio file?
- Using minims beatdetect with line in or whatever output sound. HOT 1
- Deleting recorder files on exit HOT 4
- getLineIn() not working on Big Sur with Processing 3 and Minim 2.2.2 HOT 7
- Error when starting some examples HOT 1
- Unable to install minim through processing contribution manager HOT 1
- ClassNotFoundException: ddf.minim.Minim HOT 1
- Way to calculate instantaneous AudioPlayer position? HOT 5
- Support for Processing 4 (getLineIn doesn't work) HOT 4
- The microphone cannot be called in my macbookpro HOT 3
- How can I force a waveform to be updated only when it has finished playing HOT 3
- No Sound Output HOT 4
- recording internal audio HOT 1
- The clock widget is showing the incorrect time when set to the 24-hour clock format. HOT 1
- [Solution] Multiple Audio Devices?! HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from minim.