yzhang05 / soundflower

Automatically exported from code.google.com/p/soundflower
GNU General Public License v2.0
0 stars 0 forks source link

Weird Sound Artefacts #24

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

1. Install Soundflower 1.4.3 with Soundflowerbed
2. Use (2ch) as Main Output, so I can use the Volume controls on my Audio DJ 8
3. In Audio Setup, I use 96kHz and 32 Bit (well actually the Soundcard does
only 24 bits, but there is only this choice) It does not seem to matter
which channel is used on the Audio Hardware.

What is the expected output? What do you see instead?

After a while, the Sound is completely muted or I can hear some strange
humming distorted nois which sound like a Buffer Overrun. In fact, with a
smaller Buffer, the Artifacts can be heard sooner and generally with a
higher pitch. For example, with a Buffer Size of "2048" it takes about one
hour before the Artefacts appear (seems to be a fixed amount of time), with
a buffer size of "64" its only a matter of minutes.

All in all, this Bug reminds me of "Issue 21" - so this might not be
related to my Audio Hardware

I can "fix" the Bug by just selecting any Buffer Size when the error
appears, but of course it will reappear a certain amount of time (depending
again on Buffersize).

What version of the product are you using? On what operating system?

I use Soundflower 1.4.3 in Mac OS X 10.5 

Please provide any additional information below.

Audio Hardware: Audio DJ 8 from Native Instruments

Original issue reported on code.google.com by kuderm...@alphanull.de on 18 May 2009 at 4:27

GoogleCodeExporter commented 8 years ago
Add me to the list of people that are willing to pay someone to actually fix
this. "Don't have huge amounts of cash tos pare, but something."

Original comment by ryanrhe...@gmail.com on 19 Dec 2010 at 9:41

GoogleCodeExporter commented 8 years ago
I don't have lots of money, but I'm willing to pay for this also! Right now I 
could pay $ 100.

Please, SoundFlower developers, charge any amount for soundflower, but make 
something decent that really works!

Original comment by felip...@gmail.com on 19 Dec 2010 at 2:30

GoogleCodeExporter commented 8 years ago
/sign

I would also be paying for a fix ....

Original comment by kuderm...@alphanull.de on 19 Dec 2010 at 2:55

GoogleCodeExporter commented 8 years ago
I believe fixing this issue involves the use of the kAudioUnitSubType_Varispeed 
AudioUnit, in case anyone is interested in pursuing it...

Original comment by 74obje...@gmail.com on 14 Jan 2011 at 2:58

GoogleCodeExporter commented 8 years ago
I have the same problem when a play a flac 6 channels 24 bits 96Khz.
But when a play another flac : 2 channels i haven't artefact

Original comment by chooha...@gmail.com on 12 Feb 2011 at 5:04

GoogleCodeExporter commented 8 years ago
Wow, I was really on the edge of my seat reading through the comments hoping 
that someone was going to come up with a patch for this. Not sure I could 
provide the detail necessary to satisfy a project member with my situation but 
I will say:

TONS OF MUSICIANS ARE TRYING TO FIGURE OUT HOW TO GET AI (ie MOTU) CLEAN SIGNAL 
ONTO QT VIDEO THAT INCLUDES AN AUDIO ACCOMPANIMENT (ie, backing tracks) RUNNING 
ON THE DESKTOP.

I am playing my bass guitar along with Band-In-A-Box and shooting iSight video 
into Quicktime X (the new dumbed down release...lol).

- MacBk Pro 2.4Ghz, Snow Leopard 6.2
- Aggregate Device Soundflower (1.5.2) + MOTU Mk3 Hybrid (USB for now)
- Bass ( and sometimes lav mic) ===> MOTU w/48k sample rate
- Quicktime X  iSight vid window w/Aggregate device selected for sound
- Band-In-A-Box runs on the desktop (BIAB)
- Sound Prefs ===> input and output set to Soundflower

Problem 1) I have been having the same problem with the static that turns into 
a high pitched hum after some minutes of operation. (HOLY sheiss, 
Update......see below).

Problem 2) Took me a while to realize this, but since I was only soloing on the 
accompaniment, I did not realize that the bass signal had a slight delay on it, 
maybe 200ms or so. When I cut a groove track the other day, I thought: "does my 
groove suck that bad?...answer: no). I suppose that sending the MOTU through 
Soundflower puts in the delay..not sure.

UPDATE: Problem "1" solved by selecting "Soundflower" as Clock Source for the 
MOTU in Aggregate Device setup window.

SECOND UPDATE: Problem "2" Bass sound delay solved by lowering buffer size in 
SFB menu to "64".....I am going to do further research on this to the best of 
my ability. But the delay is gone and the groove is now back to smokin'.

The object has been to get the accompaniment from the BIAB to appear in the 
MOTU through the USB so I can shoot various video projects, such as 
instructional or gear reviews, etc, but to also include some high-quality 
accompaniment from the BIAB running on the desktop.

So Soundflower should be a great thing for this. I basically have figured this 
out for the most part, but like others after a few minutes the static would pop 
in and then I would have to reset (re-sync clocks?) from the SFB menu to get 
rolling again. In fact, as I am typing, I tried something different and IT"S 
WORKING!!!!!!!! ...........I have the BIAB rolling, a QT vid window open, and 
some setup windows open to try some adjustments stuff. I went into the Audio 
Device setup and on the MOTU, decided to select "Soundflower" as the Clock 
Source instead of "Internal" and UNREAL, the sucker isn't tweaking out on me 
now. When the MOTU has "Internal" set as clock source, the sound flakes in 4 
minutes flat (with a buffer of 64 (to solve delay issue, but WAS 512 before)). 
It has been rolling with "Soundflower" as Clock Source for 24 minutes with no 
flaking.....UNREAL, I have reached the promised land after months of tech 
torture.

Here is a Soundflower/MOTU/QT/BIAB video I shot between static blowouts the 
other day after problem 2 was "solved" (temporarily...? don't know yet for 
sure):

http://www.youtube.com/watch?v=OeBP7ek9hwg

Original comment by kwg...@yahoo.com on 16 Feb 2011 at 7:55

GoogleCodeExporter commented 8 years ago
Solved the problem this morning "accidentally" by setting the source clock in 
"MOTU Audio Setup" to Soundflower. Since then (11 hours) no soundbreak or 
distortions or anything else.

Deleted Soundflower completely from the System (10.6.6) and reinstalled 
Soundflower 1.5.2.

Original comment by RAID.feh...@gmail.com on 16 Feb 2011 at 6:55

GoogleCodeExporter commented 8 years ago
huh… will have to test this! Never thought to do it that way.

People with different audio interfaces that don't have the ability to run off 
of another interface's clock, or people trying to use the built-in sound, may 
not be so lucky with this workaround. I'm curious what the clock jitter is like 
when the MOTU is synced to a "software only" audio interface such as 
SoundFlower…

Your solution to "problem 2" of course makes sense - I do all my performance 
stuff at 128 samples I/O buffer - a good trade off i find between latency and 
processing power. The smaller you set the buffer the less latency, but the 
computer has to work harder to do the audio processing because it has to 
process more smaller chunks instead of fewer bigger ones, and one of the things 
that actually takes the CPU a lot of time is the context switching between 
doing one process to the audio and doing another and jumping around in the 
memory (as opposed to stepping straight through). So fewer bigger chunks = more 
efficient, but because the beginning of the chunk cannot go out of the computer 
until the end has come in and the processing has been done, it results in more 
delay from input to output. Of course there is double or quadruple buffering 
thrown in there too to make it all work smoothly…

Original comment by arvi...@gmail.com on 16 Feb 2011 at 7:34

GoogleCodeExporter commented 8 years ago
.
.
@Comment 95 by arvi...@gmail.com, Oct 08, 2010

Yes, I had high hopes for JackOSX, but I couldn't get past the setup process. I 
just don't understand all of the setup issues to be able to think it out 
correctly. If it does eat CPU time maybe it would not have worked out anyway. 
But on the other hand, once BIAB has crunched out the accompaniment I don't 
think simply playing it uses much CPU. It's the QT that is eating CPU as far as 
I know.

@ Comment 107 by goo...@ueleu.de, 

Looks like great minds think alike....!!

Original comment by kwg...@yahoo.com on 16 Feb 2011 at 9:59

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
@kwg...@yahoo.com

Ooops, I think You got it first! I didn't read the latest comments as I changed 
the settings.

As I can say for now, no problems since I changed the source clock to 
Soundflower. I ran various audio apps at different channels, iTunes plays at 
channel 1+2 continously. Not only one dropout or distortion.

I forgot to mention: I own a MOTU UltraLite (first version) and use the lastest 
drivers.

Original comment by RAID.feh...@gmail.com on 17 Feb 2011 at 1:00

GoogleCodeExporter commented 8 years ago
I tried this yesterday and it ran fine for 4 hours. Heard a few crackles once, 
but they could have been some other piece of gear - not sure. The MOTU 
Ultralite I use at work has a lot of unshielded, in development audio gear 
connected to it. I used it to send some audio between MaxMSP and Logic over a 
soundflower/MOTU UL aggregate device for about 15 minutes and it worked. I left 
it alone and at the end of 4 hours i listened to a sine wave going from MaxMSP 
to logic and it was fine!

Original comment by arvi...@gmail.com on 18 Feb 2011 at 9:45

GoogleCodeExporter commented 8 years ago
.
.
Glad to hear that the Clock Source toggle seems to be working for some of you. 
I do occasionally THINK that I hear a pop here or there. Nothing serious with 
that though. BUT...

For me, a couple of interesting things have popped up. You know how sometimes 
when you power on your gear and something will fail to be recognized by the 
mac? This has something to do with the order of how things power up and do 
their handshaking or whatever. I have not thought that much about it. If I have 
a problem with that I just restart or turn stuff off and back on and it seems 
to do the trick...

1) But since I have gotten my stuff going in the last few days, EVERY SINGLE 
TIME that I power up and get things rolling - NO SOUND. I have to go into Sound 
Prefs and re set the input/output back to MOTU, then I re-do the Audio Midi 
setup back to MOTU with INTERNAL Clock Source selected and then just get sound 
on a random QT video WITHOUT Soundflower. THEN I toggle the whole damn thing 
back to the Soundflower setup in Sound Prefs and then with the Audio Midi 
device window w/MOTU set to Soundflower for the Clock Source and then somehow, 
someway the thing starts working with my Soundflower/Quicktime setup and I get 
sound....wtf?

2) Another odd thing is that when I check my youtibe videos with the 
Soundflower setup now, the video screen pops up for a second and then goes 
completely WHITE as the sound plays. But if I re-set my sound back to the 
original NON-Soundflower setup and play the video then the screen comes 
back...again: wtf?

Any suggestions would be of great help.

Cheers.

Original comment by kwg...@yahoo.com on 18 Feb 2011 at 10:55

GoogleCodeExporter commented 8 years ago
@ arvi

did you set the buffer size in Sounflower to 2048?

Original comment by RAID.feh...@gmail.com on 20 Feb 2011 at 12:50

GoogleCodeExporter commented 8 years ago
no - 128 like everything else. 2048 would be ridiculous latency and defeat the 
purpose of using soundflower for me :)

Original comment by arvi...@gmail.com on 20 Feb 2011 at 12:54

GoogleCodeExporter commented 8 years ago
I'm unable to use a buffer below 256 without instant jitter. At 256 and above I 
get drop out and distortion after only a few minutes.

Running a six core 3.33gHz mac pro, 16gb ram, RME FF400. Trying to monitor 
Logic Audio and route it to SpectraFoo. All software and drivers are up to 
date. Dont think I can do the slave clock workaround.

Hulp!

Original comment by j...@hungryjoe.tv on 31 Jan 2012 at 1:56

GoogleCodeExporter commented 8 years ago
I use Soundflower to route my computer's audio through Ableton Live and out my 
soundcard. This way I can use my room correction software if I'm using my 
monitors, or TB Isone with my headphones. I like this setup as it normalizes 
the way I listen to audio and has really helped me advance my mixing and 
mastering skills. Alas I too suffer from the buffer problems. 

I know how to set up an aggregate device. But I'm unsure of how to replicate my 
current Soundflower setup using it. 

MacOS Audio Output (Soundflower 2ch) --> Ableton Input (Soundflower 2ch) --> 
[Processing through Ableton] --> Ableton Output (Presonus FireStudio Mobile) 
--> Out My speakers or Headphones.

Does anyone know why Cycling abandoned Soundflower? I think it's their most 
used/top product. I own Max for Live but I couldn't live without Soundflower. 

Original comment by mod.and...@gmail.com on 2 Mar 2012 at 1:45

GoogleCodeExporter commented 8 years ago
You can't replicate that setup with aggregate devices and no soundflower. 

I'd suggest you try JackOSX ( jackosx.com )  because it doesn't look like 
soundflower is ever going to be fixed :( If you're on 10.7 let me know and I'll 
send you a link to the latest JackOSX beta (or join their mailing list). While 
it takes more effort to set up, jack is more flexible and has a more robust 
clocking paradigm than soundflower (ie all software connected to jack get their 
audio clock from jack, which gets it from whichever audio hardware you slave it 
to) rather than the soundflower paradigm where different softwares can get 
audio clock from various different sources and soundflower or the OS tries to 
reconcile them. JackOSX does create some CPU overhead though.

Original comment by arvi...@gmail.com on 2 Mar 2012 at 2:03

GoogleCodeExporter commented 8 years ago
I have the same exact trouble when trying to route my Maschine audio to Reason. 
After a determinate and fixed amount of time, the audio "slowly" disappears 
through crackling. This is such a shame since I was loving soundflower for this 
setup.

Original comment by andrea.m...@gmail.com on 17 May 2012 at 7:44

GoogleCodeExporter commented 8 years ago
Just to add some info about my setup, I created an aggregated device with an 
Apogee Duet 2 USB and (sometimes) an Alesis IO 14. Changing the clock source 
doesn't solve the issue.

Original comment by andrea.m...@gmail.com on 17 May 2012 at 7:46

GoogleCodeExporter commented 8 years ago
Echoing Comment 118, to me this definitely behaves like a clocking problem in 
which some parts of the system are clocked by one source and some by another. 
The clocks are nominally at the same frequency but one is not truly slaved to 
the other, and as a result they slowly drift: something tries to keep them 
locked together but eventually it fails and drops a cycle over a period of 
several seconds. AFAIK, the situation is not unique to SoundFlower, but in 
other cases you can usually solve it by careful analysis of clocking sources 
throughout the system.

Original comment by ElrikMer...@gmail.com on 17 May 2012 at 9:45

GoogleCodeExporter commented 8 years ago
@Elrik 

could you please explain better what do you mean? I'm really interested in 
finding a solution. Does that involve the midi clock sync between two DAWs? or 
however, how/where could you set this clocks aside from Audio Midi setup?

Thanks

Original comment by andrea.m...@gmail.com on 17 May 2012 at 9:48

GoogleCodeExporter commented 8 years ago
no - not MIDI sync clock - that is too coarse probably, but actually digital 
audio click at eg 44100 cycles/second. The inherent problem is that soundflower 
seems to generate its own clock and not get it from a physical audio device. if 
soundflower just had a setting to get its clock from somewhere, like Jack OS X 
does, it might work. I don't know who designed it thinking that it would nor 
need a clock input option. in any digital audio system there  must be one 
master clock only. otherwise you're asking for trouble or a lot of effort in 
conforming one clock to another that may or may not always work.

The reason the trick with the MOTU hardware works is that MOTU's drivers allow 
you to select any audio interface connected to the system as the clock source 
for their hardware, something that few consumer or pro-sumer audio interfaces 
allow. If you select soundflower, then it works because the MOTU hardware 
slaves to soundflower.

Digital audio reall needs clocking, because its just a bitstream - in a 
simplified case, if you get off by one bit as to where one piece of equipment 
or software thinks your samples start and end vs another piece of 
gear/software, then everything goes to hell in a handbasket. Worst case 
suddenly it could be that all samples lose some precision and some are randomly 
very loud, as the least significant bit becomes most significant… basically 
you need one clock otherwise they drift. And drift compensation, while 
possible, is nowhere near as robust in my experience.

Original comment by arvi...@gmail.com on 17 May 2012 at 1:43

GoogleCodeExporter commented 8 years ago
I'm not 100% positive, but after some test, it seems that setting in the 
aggregate device the clock to Soundflower and resample in the duet create a 
stable environment. 

However I must say while I had the problem syncing two audio daws (Maschine and 
Reason) I rarely exceed the 5-6 minutes recording duration. 

@Elrik, @ arvidtp does that make sense to you?

Original comment by andrea.m...@gmail.com on 18 May 2012 at 9:53

GoogleCodeExporter commented 8 years ago
to add some extra info, Duet USB drivers doesn't allow to sync to an external 
clock, so if it works it is thanks to the resampling in the aggregate device, I 
guess

Original comment by andrea.m...@gmail.com on 18 May 2012 at 9:54

GoogleCodeExporter commented 8 years ago
after long tryouts I can say the most stable configuration is Apogee Duet 
master clock, soundflower resample (drift correction). But sometimes I need to 
reset sample frequency, unfortunately

Original comment by andrea.m...@gmail.com on 18 Jun 2012 at 8:46

GoogleCodeExporter commented 8 years ago
I had terrible problems using Soundflowerbed to control volume via DisplayPort 
audio device in my Dell U2713HM, with the sound going to distorted after short 
time due to clock drift.

I came up with this solution for now:
Create an aggregate device in audio midi setup containing soundflower and your 
real audio device. Then set main device to soundflower and enable drift 
correction on the real device. Now choose the aggregate device as the output 
device in Soundflowerbed.

So far I'm running stable with a buffer size of 128.

I think this works, because now OS X correct the clock drift between 
soundflower and the actual audio device.

Original comment by Felix.Bu...@gmail.com on 6 Oct 2012 at 5:19

GoogleCodeExporter commented 8 years ago
Oh forgot to add, that I set both channel on the soundflower device to roughly 
75% volume, otherwise the signal distorts, not sure why.

Original comment by Felix.Bu...@gmail.com on 6 Oct 2012 at 5:25

GoogleCodeExporter commented 8 years ago
The cause for the echo/feedback is commit 
274948728ff7dbe164d8a53b5043d719e6fbcbf6.

Here is why:

The "clone" feature cannot be disabled due to a number of bugs in the coding as 
well as conceptual errors in the cloning as such. Because of that, the signal 
from the soundflower conduit is attenuated according to the volume control, 
then fed into the aggregate device. The attenuated signal is cloned into all 
channels of this device, which includes the soundflower input. As the feedback 
portion has already been attenuated, feedback diminishes rapidly as a function 
of volume and block size.

Near 100% volume, attenuation it reduced to the point where it becomes clearly 
audible and at 100% unchecked feedback results.

Reverting the above commit made the audio map (it was rendered unusable by this 
commit) work so the signal can be routed to the physical card only, while being 
properly resampled.

That commit needs to be backed out and redone properly.

Original comment by mela...@t-data.com on 16 Oct 2012 at 12:28

GoogleCodeExporter commented 8 years ago
As an additional item of information, output devices having more channels than 
the input are not properly zeroed out. This causes random bytes in the buffer 
which become subject to the same feedback loop, causing noise when switching to 
the aggregate device, which lasts for a few seconds and then diminishes through 
the above illustrated feedback mechanism.

Original comment by mela...@t-data.com on 16 Oct 2012 at 12:30

GoogleCodeExporter commented 8 years ago
I submitted a pull request for the fix to this issue.

Original comment by mela...@t-data.com on 16 Oct 2012 at 3:29

GoogleCodeExporter commented 8 years ago
I searched for hours trying to find a solution to this issue.  A friend 
suggested an idea that he had been shown.  Setup soundflower as a midi 
simultaneously with your regular output.  Therefore instead of routing through 
soundflower for your output (which seems to cause the issue), it routes each as 
their own output.  So far seems to be working on my recording meters without 
the overdrive static. Here is the how to on this.

http://apple.stackexchange.com/questions/50904/if-we-use-soundflower-to-record-t
he-systems-audio-output-then-we-cant-hear-it

If you also are looking for more control I found software from Prosoft that 
allows for audio adjustment using hear or individual app control through hear 
or soundbunny.

http://www.prosofteng.com/products/

Hope this helps everyone!

~Epoch Dream Productions

Original comment by epochdr...@gmail.com on 10 Mar 2013 at 7:04

GoogleCodeExporter commented 8 years ago
Just tried the aggregate device fix. It's working for me so far. Haven't had 
any issues for 15min or so. 

*fingers crossed*

I'm running the Audio 4 DJ.

If this doesn't work, I guess I'll run my audio out of the front 1/4" channel B 
headphones out. At least it has a physical volume knob.

Original comment by Mario8...@gmail.com on 12 Apr 2013 at 5:05

GoogleCodeExporter commented 8 years ago
^^^
Update:

Well, this definitely did not work (I even set the clock to soundflower and 
made sure all sample rates were the same). After about 5 mins now, the sound 
will start crackling then fully crack down into distorted audio.

Original comment by Mario8...@gmail.com on 13 Apr 2013 at 2:53

GoogleCodeExporter commented 8 years ago
Too bad this app is not actively developed anymore, I haven't found any other 
that does what soundflower does. I'm using it to control the volume of my 
monitor, which has HDMI input but no volume control. The solution from Felix in 
post #127 works for me as well, but I also have to lower the output or input of 
soundflower2ch, otherwise I get the wierd echo/feedback. I guess better than 
nothing, cheers!

Original comment by guidovar...@gmail.com on 25 Jul 2013 at 7:49

GoogleCodeExporter commented 8 years ago
http://www.jackosx.com can be an alternative way.

Original comment by julien.bayle on 24 Jan 2014 at 10:57

GoogleCodeExporter commented 8 years ago
Hi Julien, I spent a while trying to achieve this with jackosx, but it doesn't 
give me volume control through the keys. Would you care to explain how to 
achieve this? Thank you...

Original comment by guidovar...@gmail.com on 16 Feb 2014 at 9:45

GoogleCodeExporter commented 8 years ago
Hi Julien, I spent a while trying to achieve this with jackosx, but it doesn't 
give me volume control through the keys. Would you care to explain how to 
achieve this? Thank you...

Original comment by guidovar...@gmail.com on 16 Feb 2014 at 9:45

GoogleCodeExporter commented 8 years ago
I stumbled across this after spending a few years just not using this 
soundcard. I went through extensive troubleshooting on this issue and worked 
with Native Instruments. They identify the problem and stated "it may be fixed 
in a future update" years ago. This problem is not specific to Soundflower. The 
Native Instruments DACs are incompatible with any other external or virtual 
soundcards on any platform (ex. WIN, MAC, Linux, ASIO, Jack, etc). From what I 
can tell it has to do with some kind of drift compensation for bitrate. 
Creating an aggregate device of the NI device and your virtual/external card 
and enabling drift compensation does not fix it. Again, native instruments 
knows of the problem, and has chosen to do nothing about it.

Original comment by prototyp...@gmail.com on 11 Mar 2014 at 1:36

GoogleCodeExporter commented 8 years ago
Confirming issue with 10.8.5 / SF 1.6.6 / NI Kore 1 and NI Audio 4, not 
confirmed with internal MacbookPro2,1 soundcard though.

Original comment by feedyour...@googlemail.com on 17 Jul 2014 at 12:34

GoogleCodeExporter commented 8 years ago
I have this same issue.  It presents itself like this:

Macbook Pro ~2012
OSX Lion (Not Mountain Lion)
Soundcard is external Mbox Pro 2, but this also happens on the built in card

Routing Reaktor into Reason via Soundflowerbed

Issue that occurs:  trying to record out a 45 second song, the clicks and pops 
occur randomly but throughout.  

I have not found ANYTHING that helps the clicks, be it buffer sizes, sample 
rates, or restarting.  very sad, because I know of no other way to use my 
Native Instruments within Reason and this is simply unusable.

Original comment by framing....@gmail.com on 29 Nov 2014 at 11:10

GoogleCodeExporter commented 8 years ago
Have you tried JackOSX (http://www.macupdate.com/app/mac/16162/jackosx) ?
Can you reproduce the problem with it ?

Original comment by mantoine...@gmail.com on 4 Dec 2014 at 2:34