Comments (7)
I was getting this same error and was able to correct it with the arguments @ddf mentioned above with a slight modification. The built in Macbook Pro microphone is mono, but only works with a bit depth of 8 or 16.
in = minim.getLineIn(Minim.MONO, 1024, 44100, 16);
worked for me.
With the caveat that I just upgraded to Processing 4 because of P3D issues. So my setup is:
MacBook Pro (16-inch, 2019)
MacOS Monterey
Processing 4.0b5
from minim.
Most likely related to something changing in Big Sur's handling of audio things, might require a Java update, not sure. I can't test Big Sur on my ancient Macbook unfortunately. You could try adding a minim.debugOn()
before calling getLineIn()
and see what's reported in the console.
from minim.
Would also recommend searching the Processing forum to see if other folks have had trouble with audio on Big Sur and if they were able to fix it.
from minim.
The debug line gave me:
==== JavaSound Minim Debug ====
==== TargetDataLine buffer size is 16384
==== TargetDataLine format is PCM_SIGNED 44100.0 Hz, 16 bit, stereo, 4 bytes/frame, little-endian
==== TargetDataLine info is interface TargetDataLine supporting 14 audio formats, and buffers of at least 32 bytes
=== Minim Debug ===
=== byteBufferSize is 4096
==== JavaSound Minim Debug ====
==== SourceDataLine is class com.sun.media.sound.DirectAudioDevice$DirectSDL
==== Buffer size is 16384 bytes.
==== Format is PCM_SIGNED 44100.0 Hz, 16 bit, stereo, 4 bytes/frame, little-endian.
=== Minim Debug ===
=== Likely buffer underrun in AudioOutput.
from minim.
Well, that looks like it's successfully getting an input, but it may not be the one you are expecting. I'd recommend running the setInputMixer
example in the Advanced folder of the Minim examples and see what you get onscreen for buttons. You can click on a button to attempt to open that input.
from minim.
I did as you asked with the example, and got this message when clicking the button for the onboard mic:
==== JavaSound Minim Error ====
==== Error acquiring TargetDataLine: Line unsupported: interface TargetDataLine supporting format PCM_SIGNED 44100.0 Hz, 16 bit, stereo, 4 bytes/frame, little-endian
=== Minim Error ===
=== Minim.getLineIn: attempt failed, could not secure an AudioInput.
from minim.
Ok, so it could be that the onboard mic doesn't support the default format. I'd recommend checking your system settings to see how audio for the mic is configured (ie sample rate, bit-depth) and then modify setInputMIxer
to use the version of getLineIn
that takes format arguments and provide those values. For example minim.getLineIn(Minim.MONO, 1024, 48000, 24)
would try to acquire a mono input with a buffer size of 1024 that has a sample rate of 48kHz and a bit-depth of 24.
from minim.
Related Issues (20)
- Any reason to change bufferSize of audioOutput dynamically? HOT 4
- 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
- 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
- Glitchy sound when playing from URL
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.