Slashdot Mirror


Music Sequencing Software for Unix?

caluml asks: "I am looking at getting more into music making, and buying some decent-ish synthesizers. Most sequencing software out there is for Mac or Windows, neither of which I have. I have looked at Audigy and Audacity, but wonder if there are any others that others find worthwile. Can anyone give me their recommendations for sequencers, audio editors, and multi-track recording software?"

37 of 141 comments (clear)

  1. Rosegarden and Ardour by SocialEngineer · · Score: 5, Informative

    Ardour is a pretty good multitrack recording program, with a rich feature set. For sequencing, I'd recommend Rosegarden.

    --
    "Better to be vulgar than non-existent" -Bev Henson
    1. Re:Rosegarden and Ardour by Anonymous Coward · · Score: 5, Informative

      Also, don't forget to install the JACK Audio Connection Kit first, optionally with a GUI front end.

      JACK will generally give you much lower latency, and it will handle synching between multiple audio apps.

    2. Re:Rosegarden and Ardour by Eideewt · · Score: 5, Informative

      Parent has given you about the best answer you could get. Seq24 is a neat little program if you're just looking to set up some MIDI loops to play with. Csound and CLM (Common Lisp Music) are worth a look if you'd like to do things programmatically. Also Pure Data, which does much the same thing graphically.

    3. Re:Rosegarden and Ardour by Eideewt · · Score: 3, Informative

      Yes! Jack is the way to go if you're looking to do any audio work in Linux. As a bonus, it's an amazing system by any measure. It will let you pipe audio between programs however you like with a "virtual patch bay".

    4. Re:Rosegarden and Ardour by Short+Circuit · · Score: 5, Informative

      If you're sequencing, you're going to want a decent sound font. I highly recommend Musica Theoria 2 (scroll down to just above mid-page), for personal use. (I've seen it listed as having a non-commercial license attached to it..) You can use Wine to unpack the SfArk file.

      You'll want to grab the Timidity configuration file, so Timidity will know how to use the sound font. A quick Google search isn't turning up the link, so here's the copy I use.

      Finally look at Timidity's MAN page. You're going to want to look at setting up the ALSA MIDI loopback, so that your MIDI software's output gets redirected to Timidity.

      I've never done much with MIDI sequencing, but I love my video game MIDI music. :-)

    5. Re:Rosegarden and Ardour by MrHanky · · Score: 4, Informative

      And for everything else, there's the Dyne:bolic distro. It's not slick or anything, but has lots of powerful multi-media tools that you can use without wasting resources on drop shadows and anti-aliased text. It's designed to run on an Xbox (64 MB RAM, etc.).

    6. Re:Rosegarden and Ardour by Studiocat · · Score: 2, Insightful

      I'm impressed. I was just about to write a flamebait post about how the Ardour source code is a mess and lacks the GUI/engine separation and how these thing are hard to add afterwards etc. But then I actually took a look at it and, indeed, according to their website it doesn't lack these things any more. The guys have been doing some progress there.

      It's nice to notice OS X is supported better now. After all, OS X completely avoids the two most prevalent problems that makes Linux unsuitable for real music production:
          a) Hardware support. Most of the pro level RME Hammerfall cards aren't manufactured anymore or there isn't pci express versions and the rest like M-audio stuff is not so accepted quality wise. Freebob firewire driver can change some of that, as at least Apogee X-FW seems to be supported by it. The hardware side is almost a minor problem, however.

          b) The plugin situation is a completely different story. Unlike some Linux folks seem to acknowledge, the DAW cost and the amount of code is actually far less than the cost and amount of code for the plugins. Waves $7,500 Mercury native bundle is just the extreme example, but you get the picture. Even the average studio has loads of expensive plugins. Modern music production just don't happen without the quality plugins and software instruments, that's just the way it is.

      Don't get me wrong. I hate working with commercial DAW software. I know all the major flavors, and they all suck. They're buggy and the speed of development is unbelievably slow. (eg. how many years have we been waiting to get flexible routing in Cubase. Similar examples are to be found everywhere. Most user forums seem have a top 'feature request' fix the fucking bugs.) It's almost like there is no real competition on the market regardless of the number of competitors and the eyecandy 'features' they print on the advertising.

      Just add a native Aqua GUI to Ardour and it's getting closer to be a real competitor on the market.

  2. There really aren't any... by Thalagyrt · · Score: 5, Interesting

    There's nothing that's truly professional quality, which is sad, but that's the state of things. Cubase, Logic, Sonar, and Pro Tools are the four standards.

    However, there IS one fairly good program for UNIX type systems, though it's nowhere near the quality of the four I mentioned above. Have a look at Rosegarden.

    --
    Buffalo buffalo Buffalo buffalo buffalo buffalo Buffalo buffalo!
    1. Re:There really aren't any... by Thalagyrt · · Score: 5, Informative

      Have you ever worked in a professional audio environment or even seen a studio? I have. You probably haven't. I've recorded over 10 tracks simultaneously in "Windoze" as you put it, with 1 millisecond audio latency. Absolutely no problem. I've also done the same on OSX, but that's besides the point.

      There is NOTHING for Linux or BSD or whatever you want to use that comes close to the quality of the four programs I mentioned. Period. Go use a few of them, then come back to me and tell me to use [insert Linux DAW here]. You won't get any proper AU or VST support in Linux, which pretty much couns you out for using any mastering software. As for hardware support? Good luck getting any of the professional audio devices (Read: Echo, Mackie, MOTU, Digidesign) to work to their full capacity. You'll be lucky if you get 200 millisecond audio latency.

      You seem to get off on simply insulting people instead of posting anything relevant. Do me a favor, go to a real studio, then come back after you've had some practical experience. Thanks.

      As a side note, pretty much anyone who spells Windows "Windoze" or Microsoft "Micro$oft" or whatever the hell else have you loses all credibility right away. Look, ha ha, he tried to make a funny. Isn't that so clever?

      --
      Buffalo buffalo Buffalo buffalo buffalo buffalo Buffalo buffalo!
    2. Re:There really aren't any... by Jeff+DeMaagd · · Score: 2, Insightful

      I think the disparity stems from the different audiences. For a long time, getting into Linux required a fair amount of technical savviness, and the software for Windows and Macintosh have had a lot of time to mature. Also, the person that needs that type of software often isn't the type that can program. That sort of software also has a narrow user base. I'm trying to learn how to do some programming for a hardware device of my own and I'm finding that making a truly nice end-user program takes an incredible amount of work, so I can understand how a person or group that knows how the software should work wouldn't want to take on such a project.

    3. Re:There really aren't any... by Thalagyrt · · Score: 3, Informative

      There are a lot of other great manufacturers, I was just naming a few of them. However, I must say RME isn't a brand that I've ever heard of until now, but looking at the specs and such they look like good hardware.

      This still doesn't really affect the main argument though, which is that in the current state of things there isn't any software out for Linux that can do a great job competing with the main players. Hopefully some day there will be, but it'll take some time... Either that or one of them will get a Linux port made. The thing is, working in the music industry, if you aren't using Pro Tools, you really might as well not be in the music industry. It's sad but it's true.

      --
      Buffalo buffalo Buffalo buffalo buffalo buffalo Buffalo buffalo!
    4. Re:There really aren't any... by littlerubberfeet · · Score: 5, Informative

      Yeah, unfortunately, the parent has a point. Having used Audacity, Ardor, and a few others, they are hobby toys. They are GOOD hobby toys, but they are hobby toys. A pro studio would not risk a client's project on any of the current open source options. They just aren't rock solid.

      I have recorded major parts of a commercially released CD on a Digital Performer/Tascam 1884 system. That was a few years ago, and about as low-end as I was willing for a commercial project. That system was maxing out at 32 audio+8 MIDI tracks (with effects). I much prefer Digital Performer or Pro Tools on Digidesign TDM cards in some decent Mac.

      If the recording/sequencing software like Ardor had some major support behind it, and the hardware companies released linux drivers, then I might give them a serious try in a pro environment. Until then, I might play with OSS at home, but at work, I will be sitting in front of a Control24 desk enjoying Pro Tools. I don't have a choice, if I want to keep clients.

      --
      Sig (appended to the end of comments you post, 120 chars)
    5. Re:There really aren't any... by Anonymous Coward · · Score: 2, Insightful

      ditch the term "windoze" and maybe someone will take you seriously.

      You're confusing the operating system with the applications. Yes, there are many professional applications that run on Windows, but that doesn't make Windows a professional O/S. It's basically an unreliable pile of junk with a glossy coat. That contrasts with Linux and the various Unixes, which are professional operating systems but unfortunately wearing a somewhat shabby coat (professionals don't need eye candy).

      The term "Windoze" embodies some of the disdain that is rightly thrown at a rather poor quality consumer O/S. It doesn't imply that there aren't any professional applications running on it.

    6. Re:There really aren't any... by paulbd · · Score: 2, Insightful

      Its a little wierd that if its a hobby toy, major mixing desk manufacturers like Solid State Logic, Harrison and others would support the development of the application. Even wierder that Harrison would demo Ardour on one of their latest high digital consoles at the National Association of Broadcasters last year.

      As the author of Ardour, I tend to think that its an unreliable, cumbersome, hard to use and flaky piece of crap. And then I either actually get a chance to play with one of the proprietary DAWs in a high end studio or I get email from someone who has used both, and I'm struck by how much that description applies to them all. ProTools took nearly 8 years to add drag-n-drop! The flexible routing that Ardour has had from its inception still doesn't exist in ProTools or Nuendo, and has been retro-actively added to Sonar and a couple of others as part of a major re-engineering effort.

      The main reason to not use Ardour in a pro-audio situation right now has more do with session interchange than anything else, and this is caused by the dominant format (OMF) being controlled by ProTools/Digidesign in a way that makes it very hard for an open source application to offer it. We hope to change that in the next several months. As far as plugin formats go, we'd love to support more than just VST from the commercial world, but you'd have to talk the owners of the plugin APIs about that, since you cannot get docs for RTAS or others for an open source application. For some reason, the audio software world thinks that it is immune to the influence open source has had on operating systems, web servers and services and office software suites. Its a little short-sighted, but then I would say that, wouldn't I?

  3. ChucK by TheUser0x58 · · Score: 3, Interesting

    If you don't mind getting your feet wet with some programming, ChucK is a Java-like audio programming language that can interact with MIDI devices, and is a nice alternative to Csound and Pd for people who want to do sequencing programmatically.

    --
    -- listen to interesting music, support independent radio... WPRB
  4. Linux MultiMedia Studio by Disharmony2012 · · Score: 5, Informative

    LMMS. Aims to be an alternative to FL. Documentation is in the form of skimp wiki. But if you know how to use FL I heard it's not too hard to get a hang of lMMS.

    1. Re:Linux MultiMedia Studio by bky1701 · · Score: 2, Informative

      I use LMMS (going to maybe become a maintainer for the Fedora RPM once I get my act together) and I generally know how to use it, I made one of those docs on the wiki (and plan to make more). Some of the limitations of LMMS are:

      *It's hard to get VST. I haven't gotten it working yet, but it may work if you know more about compiling than me or use another distro.

      *It doesn't (seem to?) have effects, HOWEVER, it controls filters (low pass, high pass, etc) at the sample level. Using the tools it does have, you can simulate a lot of common effects, it just takes a bit more work. There are plans to add effects as well (perhaps some of it already exists, try it yourself...).

      * It can be somewhat unstable. Save a lot. Also, for some odd reason, it seems to not crash when run from the terminal, but it does when run from a menu (KDE and Gnome). I don't know about desktop links.

      Some things it does better than FL are:

      * It has said filters in a more easy to use location.

      * The triple osc makes more sense (IMO) (there's a "hidden" moduatlion- expland the control window for the tri-osc to the right and you will see it. I don't know why it's hidden, it seems to work fine).

      * It's only really beta, so a lot will be added.

      * The string synth is very useful.

  5. Real men.. by Jah-Wren+Ryel · · Score: 2, Funny

    Real men use cat and a directory with one file for each possible note.

    --
    When information is power, privacy is freedom.
  6. LMMS by bebing · · Score: 2, Informative

    Not sure if it fits the bill, but when I was looking for something to play around with, I ended up using this.

  7. Re:Slight digression - checked out VSTs? by RoscBottle · · Score: 2, Informative

    May I suggest you visit http://kvraudio.com/ ? :)

  8. Re:Hardware compatibility is once again a problem. by RoscBottle · · Score: 2, Informative

    Pro Tools is only compatible with Pro Tools hardware, they have a lite version for M-Audio hardware (because they bought them). Not all manufacturers are hostile and some of those who are get to see their hardware running fine on *nix anyway. Most PCI-based soundcards run fine, there isn't a hell of a lot PCIe cards to worry about yet, USB (yuck) works if it's class compliant. Check the freebob project for Linux firewire compability, class compliance applies. ADAT is a digital connection used to connect to outside gear, the other end is PCI or firewire (I have yet to see an USB card with ADAT, not that I'm trying), you might as well say that linux can't use XLR-cables... Pleeeeeease get your facts straight before you hit submit.

  9. an audio workstation distro: PlanetCCRMA w/ FC5 by ffflala · · Score: 2, Informative

    PlanetCCRMA http://ccrma.stanford.edu/planetccrma/software/ is a collection of RPMs intended for audio workstation use that can be added to a Fedora Core 5 install (or 1-4, or RedHat9.) It includes a low-latency kernel, and apps for audio work.

    Your hardware matters. RME's Hammerfall soundcards are very high quality, and designed with Linux compatibility in mind (kudos.)

    For multi-track recording and work requiring low-latency, I believe you're stuck with Linux; AFAIK the BSDs will not provide real-time kernel access for non-root users.

  10. A good starting place. . . by munpfazy · · Score: 3, Informative

    A good starting place is to nose around the sites hosted at http://portal.linuxaudio.org/

    The linux audio users and linux audio developers lists are vibrant (perhaps overwhelming) and their archives and associated documents and HOWTOs contain more information than you could possibly want.

    Personally, I've had very good experiences with:

    ecasound (multitrack recording, processing, general all-around fiddling)

    ardour (recording and mixing)

    rosegarder (midi sequencing and scoring)

    JACK (patchbay and tool interfacing)

  11. Re:ZynAddSubFX by mabinogi · · Score: 2, Funny

    Gah.
    Why do I get a sudden urge to download it and write some death metal with satanic themes after seeing that page?

    --
    Advanced users are users too!
  12. It depends on you by Schraegstrichpunkt · · Score: 3, Insightful

    My understanding, based partly on what others have said here and partly on my experience with Linux, is that there just aren't that many people using Linux for professional audio, so there's no works-perfectly-out-of-the-box solution. However, a good amount of the groundwork has been laid (ALSA, JACK, Rosegarden, etc.), so if you are a programmer (or know one who would be interested in playing with some fancy hardware) and you're not under major time constraints, you could probably get a very nice workflow going on Linux.

    You will be one of the pioneers in this area, though, so if you need to get something done NOW, you'll probably disappointed. On the other hand, if you're looking to set something up that you'll be using for a few years, and you have the knowledge and patience to play around with it to get exactly what you want, then it might be worth looking into.

  13. big list by mossmann · · Score: 5, Informative

    Everything Linux audio/music is listed here:

    http://linux-sound.org/one-page.html

  14. Jokosher by Seetee · · Score: 2, Informative

    http://jokosher.org/

    Jokosher is described as "Audio production made simple".

    Based on gstreamer and an attempt to make something that is much easier than Ardour to get in to (not as complex, and never will be). A music editing and mixing software targeted for garage bands and hobby podcasters and the like. 0.2 are more or less 1.0, which will be released any week now (when the gstreamer multi input soundcard bugs are taken care of). Will support Jack and such...

    --
    I've learned all I know about politics from /. and I still do not care one bit (or byte).
  15. 64 Studio by Kombinat · · Score: 2, Informative

    A nice distro is http://64studio.com/ for 64 bit cpus but also available for 32 bit. I get at least as low as 2ms latency which I never got either on Windows nor OS 9/ OSX, maybe less is possible but I didnt dare so far.
    Further sequencing: Muse
    http://www.muse-sequencer.org/

    wired looks promising but seems a bit hard to get it running
    http://wired.epitech.net/

    Linux can do professional grade audio and is often used by academic musicians. The Jack audiosystem adds an flexibility which is missing on other platforms (except its now available for OSX and soon Windows).

    For mastering Jamin do incredible things:
    http://jamin.sourceforge.net/en/about.html

    Cheers, Malte

  16. Trackers by Storlek · · Score: 2, Interesting

    If you're willing to take the time to learn how to use it, a tracker can be amazingly flexible, and you can do quite a lot with one.

    For Linux, there's (among plenty others, these are just the most prominent ones) MilkyTracker, ChibiTracker (which is the successor to Cheese Tracker), and -- don't mind if I spam my own program :) -- Schism Tracker.

    --
    Bears don't normally eat things that talk and move backwards.
  17. Jack is poor, based on a flawed timing design by Anonymous Coward · · Score: 2, Interesting

    Jack is as good as audio gets in Linux and BSD, but unfortunately it's quite severely broken by its design model.

    The problem is simply that its delay model is buffersize-based, which means that you can't assign a fixed latency without using a buffer size of a corresponding length. But this in turn means that during this amount of time, the system has to process the *entire* buffer for each Jack client in the stream, which means that even the tiniest system delay causes big trouble. If the design were intended for professional use, it would process only quite small blocks (corresponding to a fraction of the requested latency), but would maintain a constant specified in-out latency simply as a means of defence against small system delays.

    Jack has no such defence against small system delays, and so it requires *HARD* realtime to work, which simply isn't what the standard realtime module in 2.6 and special patches give you. When it works, it's working on a prayer. To fix this, the buffer size and the configured in-out sample latency need to be decoupled to provide vastly more timing slack ... but it's far too late to do that now, as the current buffer model is engrained in a million Jack clients.

    You *can* still get Jack to work perfectly with 2ms latency (and hundreds of people do), but only with extreme care about what applications you're running and with the use of fast top-end audio hardware, no Internet access, and no random commands invoked from xterms. In contrast, the thousands of other people running Jack with realtime-lsm on their general-purpose Linux box still get the occasional XRUN at the best of times despite running with a load average of 0.01, and for professional work, even 1 XRUN per week is 1 XRUN too many.

    That musician may have been flown in for 2 hours from the other side of the globe at huge cost. A brief audio glitch is simply not an option.

    1. Re:Jack is poor, based on a flawed timing design by Agram · · Score: 2, Informative

      You sir, are either ignorant fool, a troll general, or a total idiot. As other reply clearly suggests, JACK offers -nperiods or simply -n flag which allows exactly what you are looking for. Currently, JACK technologically speaking is ahead of anything else out there in terms of sample-accurate sync, audio I/O resource sharing, and low latency.

      "delay model is buffersize-based"

      In audio, is there any other model *if* you wish to maintain sample-accurate sync which is criticial for pro-audio work?

      "and so it requires *HARD* realtime to work"

      No it doesn't. You can run JACK with or without -rt flag.

      "which simply isn't what the standard realtime module in 2.6 and special patches give you"

      History teaches us that there is no such thing as the ultimate solution that meets all needs and is fit for all purposes. There is no such vehicle which can be a sports car, a family van, an all-terrain vehicle, a bus, a truck, limo, and a bulldozer. Each car has its purpose and thus its disadvantages. The same is with kernels. This becomes especially the case when you go into extreme scenarios, i.e. ~2ms latency in the audio world. For instance, OSX is a well-rounded OS which offers (apart from other benefits) a relatively good audio latency. However, attemtps at getting extremely low audio latency is pretty much a lesson in futility.

      "You *can* still get Jack to work perfectly with 2ms latency (and hundreds of people do), but only with extreme care about what applications you're running and with the use of fast top-end audio hardware,"

      Another troll. JACK can run real-time on a crummy laptop soundcard as well as pro-audio hardware with the same results. If a card is especially crummy sometimes extremely low buffer size will not work due to hardware limitations. Also unreasonably large buffers will usually not work on many soundcards, but trying to do so would be stupid anyhow. If you want big buffers and no sample-accurate sync, why not use the enchant ESD instead?

      "to provide vastly more timing slack"

      Why would you want that? Are you interested in having your apps' audio output drift from each other? How about Propellerhead's Rewire? Does it allow this? Again, if you are looking for a crappy solution, use a crappy solution. Don't bitch how something not geared towards your needs does not meet your needs.

      I will give you a credit for saying that achieving XRUN-free and low latency situation is not easy. However, this is not due to flawed design in JACK but rather a flaw in how other concurrently running software is abusing kernel spinlocks, especially proprietary drivers (i.e. ATI and NVIDIA) which we have no ability to alter other than not use them (something that in most situations means disabling of 3D acceleration). But again, this is not because JACK is flawed, rather because the offending software makers are doing things they shouldn't.

    2. Re:Jack is poor, based on a flawed timing design by paulbd · · Score: 4, Informative

      They say that a little knowledge can be dangerous. You either suffer from this, or you're a genius with an insight that many systems other than JACK should benefit from.

      Your comment about what is effectively variable size buffers is either a superb insight, or you just totally missing the point. Every M msecs, the audio interface expects to get N audio frames delivered to it, and makes available the same number of incoming audio frames. There is no way around this limitation. So the question becomes: is there way to process the N frames to meet the deadline that is more reliable than what JACK currently does?

      If there is, it seems remarkable that no other system has implemented it. The overhead of calling the graph associated with the data flow for the frames is not insignificant, even on contemporary processors. Therefore, calling the graph the minimum number of times is of some significance, significance that only grows as the latency is reduced. Because of this, all existing designs, including ASIO and CoreAudio (with the proviso that CoreAudio is *not* driven by the interrupt from the audio interface) call the graph only once for every hardware buffer segment/period/whatever.

      You are correctly identifying the major issue with JACK being occasional code paths in the kernel that prevent the graph from executing in time to meet the deadlines. However, I cannot see how adding overhead to processing N frames by executing the graph several times instead of once can possibly help. What we have been doing instead is encouraging and supporting the work of people like Ingo Molnar that get the kernel (and/or a patched kernel) closer and closer to actually being able to offer soft realtime that is close enough to what we need. On most hardware, Ingo's kernels now work phenomenally well, and only errant device drivers are capable of preventing the amazing good guarantee of service the kernel offers SCHED_FIFO tasks.

      Paul Davis, Principal architect and author of JACK

    3. Re:Jack is poor, based on a flawed timing design by Anonymous Coward · · Score: 2, Informative

      "It's sad that for years now, the Linux kernel devs seem to have done their utmost to ignore Ingo. Well, that's life I guess, but until they do, your good experiences have almost no relevance to the far poorer performance seen by mainstream users of Jack who have to rely on realtime-lsm."

      Most of Ingo's realtime/preempt work is already merged into the mainstream kernel. Full merge by 2.6.21 or thereabouts.

      Also, most jack users are using a realtime kernel, so it is a relevant point.

    4. Re:Jack is poor, based on a flawed timing design by paulbd · · Score: 2, Informative

      "configured for realtime-lsm operation, lacking only Ingo's patches that aren't available in the standard kernel"

      (1) realtime-lsm doesn't do anything performance related at all. It is an old solution to a permissions problem, namely allowing non-root users to run threads in the SCHED_FIFO scheduling class and allowing them to use mlock() to pin memory in physical RAM. how well a SCHED_FIFO thread performs is 100% orthogonal to the existence of realtime-lsm. it is also now a deprecated solution for 2.6 kernels, which support a LKML approved mechanism for granting these permissions that has finally made it up into user space for most distributions.

      (2) nobody has ever claimed that a non-patched kernel can be used to get xrun-free behaviour. what is true is that recent 2.6 kernels have becomes good enough (mostly through including parts of Ingo's work) that with larger latencies most users will get acceptable behaviour whereas they used to get terrible behaviour. If you want to either go lower or get guaranteed behaviour or both, you *must* have Ingo's patches installed. We are not going to redesign JACK for a kernel that is acknowledged by its authors to be incorrectly implemented for JACK's purpose. Ingo's patches solve 99% of the mis-design and thus represent a kernel suitable for low latency, critical audio work. the standard kernel is not likely to ever do this, although we can always dream.

  18. Re:Nope, --nperiods is not a (working) solution by paulbd · · Score: 4, Informative

    You apparently don't understand that realtime audio software has to be ... well, realtime. The simplest definition of what that means for audio processing is:

    T(nframes) = A(nframes) + B

    that is: the time it takes to process nframes of audio is a linear function of nframes plus a constant.

    As a result "applying more CPU muscle" is irrelevant because the time per nframes is essentially fixed. If you missed the deadline the first time (but had "breathing room") there are only two reasons why: either you code is badly written and doesn't meet the condition stated above, or the kernel interrupt you, took processor time away from you, and you were unable to get the job done.

    Trying to fix the second situation by dividing the processing of nframes into even smaller chunks just increases processor overhead, and doesn't stand much chance of improving the situation.

  19. Re:Nope, --nperiods is not a (working) solution by paulbd · · Score: 2, Informative

    This is all wrong. It takes A(nframes) + B cycles to process nframes of audio. This is an invariant, unrelated to period size or count (although period size may affect B). The only things that can really change A(nframes) + B are:

    • branch performance. an issue, but not a big one.
    • CPU cycle stealing by the kernel scheduling the task off the processor and back on, thus making the wallclock time to process nframes longer than the number of cycles used to do it.

    If you were slow on one of the blocks, perhaps you could make up for it in a later block by applying CPU muscle. But this just a band-aid over the problem. You should never have been slow in the first place.

    Its not the job of application design to come up with band-aids around OS deficiencies, most of the time. The basic model of what is happening with audio i/o has already been made perfectly clear in this thread: every M msecs, you have to process N frames of audio. If the kernel is butting in and making that hard to do reliably, then its the kernel that need fixing. Your proposal that JACK subdivides the period so that if the kernel messed with us on sub-period 1, we somehow make it up while processing sub-periods 2-n is really just saying "use more CPU cycles in the hope that it might just work out". Its a false hope, IMHO.

    The reality is that the app code has to be RT-safe, and the kernel has to get the hell out of the way. A deficiency in either one can't be solved by the other.

  20. Re:Nope, --nperiods is not a (working) solution by paulbd · · Score: 2, Informative

    Objective measurements exist as part of Ingo's patches. The reason that using them cannot really solve this issue is that what is being measured is reflection of the system hardware, kernel build and occasionally user-space configuration. People have built systems that *never* fail to meet Ingo's goal. Contrarily, there are many systems that almost never fail to meet them, and many systems where even with his patches, kernel time delays occur too often. So what is one to make of this? I certainly do not conclude that the solution is to modify the design of JACK to incur more CPU overhead in the common case.

    Most people do not understand what Ingo's patches actually do. They actually transform "Unix" into a hard-RT-like OS by effectively threading all interrupt handlers. Modulo errors in the scheduler, *nothing* except the lowest level IRQ ack to the APIC, can interrupt code that should be executing. It doesn't matter what other activity is happening on the machine - if the highest priority interrupts (e.g. audio and the system timer) are raised, then *that* code path executes no matter what and cannot be interrupted by other things. Coupled with correct handling of the related SCHED_FIFO tasks from user space and you basically have a system that isn't remotely "Unix" like at all, even though the regular Unix-like system is running next to it. Effectively Ingo has implemented the design of several hard-realtime operating systems.

    Its a real question whether a system that was targetted at pro-audio, not consumer use, should be designed to work a wide range of machinery at all. Your comment: "I see only small-block time faults, and not failures to meet the hard realtime constraint at the end of the latency period" makes no sense to me at all. You cannot "see" small-block time faults. There are deadlines, and the required code either executes within the deadline, or not.

    I'm not going to continue to discuss this here because its an inconvenient medium. If you want to talk about it more, use the JACK mailing list or find me on IRC. I suspect I know your nick already, and you can find me in #ardour most of the time.