From owner-freebsd-questions@FreeBSD.ORG Sun Sep 21 12:21:42 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A8BD81065672 for ; Sun, 21 Sep 2008 12:21:42 +0000 (UTC) (envelope-from marshc187@gmail.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.159]) by mx1.freebsd.org (Postfix) with ESMTP id 0309A8FC08 for ; Sun, 21 Sep 2008 12:21:41 +0000 (UTC) (envelope-from marshc187@gmail.com) Received: by fg-out-1718.google.com with SMTP id l26so1033104fgb.35 for ; Sun, 21 Sep 2008 05:21:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=whrXXf3dgWn15tJ/Wbo+8QyrUVU386tpgG7363gefGk=; b=VgIjSLWMtpGtN4vL/Pe35jxxR/lP5DcSsNt8tK3s1X6iKKstk57FUNOIn6oYnJOQ/j vEZ3kW7rVr9+cRgQxu0AdDOf+//Gx0AuzhlQEhVu//uOEFMzv4mTCVBTwqjKUTJs72d+ e5huTneC10hwuYSXW5jADn/bew9kQJef9wwRc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; b=py8r+X7/vVWBikG5Y6NrVplajJrfL7QY/nfFTdG+x80jivwBYqHMfSGy8d+TcJmV5S zx9jDsaYOPPuUKre4YKHRWRW/m/Zur2jP2h6iBgQ1x5P9mVqn0qvLEqBBhoOKefogKIF VFn3X/Tn6MA8wm8SjjZFzqPKt8saHpj/oRApI= Received: by 10.86.93.19 with SMTP id q19mr3828085fgb.4.1221999700721; Sun, 21 Sep 2008 05:21:40 -0700 (PDT) Received: from ?192.168.2.100? ([195.158.85.174]) by mx.google.com with ESMTPS id 3sm3720107fge.3.2008.09.21.05.21.38 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 21 Sep 2008 05:21:39 -0700 (PDT) Message-ID: <48D63C45.3080102@gmail.com> Date: Sun, 21 Sep 2008 08:21:25 -0400 From: marshc User-Agent: Thunderbird 2.0.0.16 (X11/20080724) MIME-Version: 1.0 To: freebsd-questions@freebsd.org References: <467.10023.qm@web110506.mail.gq1.yahoo.com> In-Reply-To: <467.10023.qm@web110506.mail.gq1.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: Audio Production X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Sep 2008 12:21:42 -0000 Nash Nipples wrote: > > >>> m cassar schrieb: >>> >>> >>>> Does anyone here use freebsd for serious >>>> >> audio/video production work? or >> >>>> know if there is some kind of community? >>>> >>>> >>> Didn't try it, but http://ardour.org/ looks like >>> >> what you are looking for. >> >>> See http://www.freshports.org/audio/ardour/ >>> >>> -- >>> Timm >>> >>> >> thanks but this wasn't exactly what i was asking about >> in the original post. >> ardour *is* in ports, as with most other good open-source >> audio applications >> ( and propbably the best program out there - though i'm >> new) but what i was >> looking for is related to custom/optimizted kernels either >> known as >> low-latency or real-time kernels in linux; to help reduce >> recording >> latencies, audio dropouts, etc. like studio 64 rt-kernel on >> ubuntu, planet >> ccrma on fedora. >> >> what i was trying to find out is whether there is such >> projects on freebsd, >> or more importantly, if freebsd kernel had the potential to >> be similarly >> optimized. (not that i myself have any expertise, [hence my >> question]) >> >> on the other hand, if you are interested in audio programs, >> ardour is good, >> hydrogen is good and fun. not to mention easy. >> > > i have experienced a delay when i was recording voice and sort of laying it on a track. but removing a few miliseconds off the beginning didnt make a big trouble for me and thats when i have discovered this phenomenom but thought it was rather because my sound card is old. is this any close to something that you mean? > it is related, but what you mentiioned is a slightly different area in computer audio than what i mean with respect to kernels. An old card is likely to produce greater delays under any setup, but that is more a factor of its capabilities and quality of its parts than just purely because it is old. If you were using JACK (linux) or ASIO (windows) the delay could be minimized to some extent, but no miracles there, and that is about the most you can do. i'm only at entry level on audio engineering, but in a nutshell here is an overview to explain your delay, (latency) and my kernel related question. first of all, computers are always prone to latencies, or delays, because of the time it takes the cpu to process the audio data, read/write from disks, convert between audio signals and digital data, etc, etc. All take up cycles and valuable milliseconds. when playing normal music like mp3s in itunes and such, you wouldn't notice any delay because the data is simply read from disk and output thru speackers as they come, though technically there would be a short period between the time the data was read off disk and then heard out the speakers. in audio production that slight delay, or latency, is everything, especially when you have multi-track recording and syncing with external gear. (latencies range from under 10ms to over 100ms) Latency would be more noticeable, say when recording, and would sound like an echo if you were talking into a mic and listening thru headphones or speakers, on an average setup at least. roughly becase of the time needed to process the signal. Also, If you were to use a midi controller/keyboard connected via midi to play a software instrument, you would notice a delay between the time you hit a key on the keyboard and when you actually heard the sound. The key press transmittes midi data to the software instrument, the software triggers the desired sound immediately, but there is that slight delay to create the sound and push it out the speakers. Audio interfaces can have a latency around 5ms, which is very good, yet may still be faintly noticable, and that also depends on the power of the pc and the actual load ( number of tracks, effects, instruments playing), and latency is still a *phenomenon* and something you *have to live with* in computer audio production; as opposed to hardware gear like samplers, drum machines, synths, etc. and short of buying a $10K protools "soundcard". a _hobbyist_ audio interface can be decent with latencies under 20ms. In application, multi-track recording programa like Cubase, Logic, Ardour, Ableton, Cakewalk etc, do fairly well (with a good setup) when all material is confined within the computer and not communicating with the outside world. When you are recording say a vocalist, chances are you're playing back all the other tracks (drums, bass, etc) at the same time for the vocalist to listen and sing to, plus possible playing back the vocalist with added effects likde reverb; a mixture of delays going in, and the same amount going out. Simillarly, if you had one or more audio tracks, (playing back audio recordings or samples off hard disk), and had any midi track there being sent to external hardware like a drum machine ,to play drum parts from there, or a hardware synth playing a bass or pad track, then the practice is to compensate for latency by having the midi track play or transmit with a 5ms delay, to give the computer that little time to process the audio, and so the whole mix would sound in sync (since midi to external gear to sound heard would be instant). 5ms for a sytem with 5ms latency, 20ms would require 20, 100 would require 100, etc. There is a lot more to computer audio production, but basically the efforts are always, or mainly, to reduce that latency as much as possible. Better audio interfaces not only have better components and AD/DA converters, they are also intented to take as much load off the cpu as possible, and handle what they can themselves. Also, the more power a computer has never eliminates latency or delay completely, it just generally means you can play more tracks at once and use low latencies more comfortable without dropouts, glitches, clicks and pops. ( Latency is more or less adjustable by configuring the audio buffer size and the number of said buffers to find the best setting on your system. That is, you stop at the lowest setting that works without glitches and gaps in the music playback or recording. The best way to demonstrate or understand that is by using propellerheads reason or rebirth's settings on windows. Also, when you install kde3 on freebsd, you might notice system sounds play with a delay, especially when they are part of an error message with a dialog box - sometimes the sound comes out even a second after the dialog box is displayed. This is mainly because the default buffer size in kde3 is set way too high using about 10 buffers. from ocntrol centre you can set the number of buffers to 5 or less and still work well)) Further to all that, JACK on linux/unix, Coreaudio on OSX , or ASIO on Windows are technologies developed for low latency audio performance, and basically handle the communication between software and audio hardware. You would definately have to use these for serious audio use ( protools also have DAE, but not the point) With common or old audio hardware, you could still get some benefit using them, but i think you would be lucky if you got anywhere close to 50ms, with ASIO on windows at least, and as opposed to over 100ms with the default windows sound system. something like that. Finally, what i was inquiring about was this. In windows xp, to optimize the system for better performance and squeeze more juice, the most you can do is a few system settings, stopping services you don't need, and similar stuff. in OSX there is no real need , particularly on intel macs,. and in linux there are a few projects that specialize on low-latency/ rt kernels such as planet ccrma on fedora, studio64 on ubuntu, and a couple of others on suse and debian of knoppix that i have heard of. At face value, most would think they are just distributions that come prepackaged with all the best open-source audio/video production software available, but their real strength and claim to fame is their rt kernels. Technically i have no real clue what work goes into these,but have heard something like real-time scheduling ( i could be off) , and just imagine that they are made to dedicate most of their resource and attention to assure an uninterrupted audio *path*. At the mment i have just started to use studio64 and haven't really been working on audio yet (just checking my miail infact). About a week or two ago, on their mailing list, the developers were asking users whether they would prefer to stick to the current rt kernel, or go with the latest and greatest non-rt intrepid kernel as part of ubuntu's next major release. This was because the rt kernel developement took alot of work and rt kernels are not as easy as they sound from what i can make of it. 100% of replies were in favour of current rt kernel. Freebsd has most of the software you would need, that linux has, in ports, but what i was inquiring about was whether anyone knew of a similar project or group working on freebsd, or at least i wanted to know if fbsd kernel had the potential, in which case i would rather have a audio-wise sluggish fbsd and watch it mature, then switch to linux at this point. I hope all this was not that boring and gives a basic idea, and just think that if fbsd had the potential and had a project based on it one day, it would be a winner.