Sequitur -- MIDI sequencing for Haiku

Just want to plug here the fact that I’ve been occupied bringing Sequitur (the good old BeOS MIDI Sequencer) fully into the Haiku fold. (It has always worked there, but had some annoying crashes and things.)

The original authors – mainly Eric and Dianne Hackborn – generously put the source into public domain a while back, but it’s been languishing on the Haiku Archives in a not-really-working state for a year or so. So I decided to finally sit down and iron out the problems.

I seem to have reached a stable version, so I’ve made it available at http://goodeveca.net/Sequitur. I hope it’s something some of you can use.

4 Likes

this is wonderful

As a guide to how long it might take to fix up old apps for Haiku, how long did it take you to get to a stable version? How many hours altogether do you think?

Oh, sheesh… I don’t really know. I started on it just about a month ago, but then switched back to thinking about BeShare for a week or so. And I wasn’t the first to hammer on the original code – there was a GSoC student (I think) who got it to at least compile in early 2014.

The problem is that debugging is pretty much an unbounded random function (:-)) Some things – like missing code – were pretty obvious, and just needed straightforward coding. Then there were the bugs that I’d stare blankly at for days, or flail wildly at with the Debugger. [A fairly magnificent piece of work BTW. Absolutely vital a few times.]

I think there were maybe three BeOS->Haiku incompatibilities that caused trouble. Static destructors behave differently, causing a crash on exit. Haiku has a bug [IMO] in archiving BBitmaps that needs a flag to be set to save the data. ARP used a custom PNG translation because the BeOS translator “didn’t work”; now theirs doesn’t, the translator does!

In all, I think it would depend completely on the app. Sequitur is a pretty massive one, but I was impressed that all that code mostly works.

1 Like

This is a great win for Haiku as a fledgling media OS. Sequitur would seem to be the best native MIDI sequencer for Haiku. LMMS depends on Qt and has a few showstopping bugs that mean its not really usable under Haiku yet and Sequitur seems to have more features than MeV.

I’m very happy to see a capable open source sequencer for Haiku but I won’t have any use for it until it supports audio too which makes me wonder. What could be the least difficult way to turn this into a DAW:

  • Borrow the audio backend of Ardour, qtractor, muse or non-timeline

  • Add Haiku support to ecasound and integrate a UI for ecasound into Sequitur (or a fork of Sequitur)

  • Write it from scratch

Are there any other shortcuts to creating a Haiku-native DAW I’ve missed?

Is anyone crazy enough to attempt this?

Dan, you’ll have seen my mail to the list, but just to taste the widest waters, I’ll cut&paste it here…

Y’know, I wonder if there’s another way to look at this…?

For about as long as I’ve been using computers [a while… (:-)], I’ve
dreamed of compact, cooperating apps, rather than single do-everything
bloatware. I once thought BeOS and then Haiku would be good at this,
with the built-in messaging and so on, but it never really happened.
I do think we’re better at connecting data-flows, though, with the MidiKit
and the MediaKit, and their at least basic user interfaces PatchBay and
Cortex. I guess I’m doing a bit of that when I drive Musicweaver from
Sequitur, and vice versa (usually both directions in one setup).

So how about if we could get ecasound or something fully ported to
Haiku, but with communication hooks – similarly added to Sequitur –
so that the two apps could sync operations? For instance, Start and
Stop could be initiated from either app.

Seems to me only a few messages would be needed: “Start”, “Stop”,
and “Position to x”. With I guess “OK” and “No-can-do” responses.
Also one would want to sync the saving and loading of files.

Combo audio-MIDI files would be a problem, but maybe the “Haiku
Way” would be not to use them. Keep the modes separate:
“mysong.mid” and “mysong.wav” for example.

Anyway, just something to maybe think about. It’d doubtless be
easier than trying to merge code.

i remember seeing, also, that haiku can natively host vst/ladspa/dssi/lv2 plugins. even if not yet true, making it true would be a thing that’d lend immediately to just such a modular ecosystem. anything with a voice that can take a midi input can be sent through whatever patches, filters, recorders, translators etc, not much different from kxstudio except better because, unlike any linux ecosystem beos and its descendants extend the same modularity to video.

Hi Pete

Yes, I’ve just seen and replied to your last HML posting. For the benefit of those not on the ML I’ll post my reply here too but we should prob not continue this discussion on both. I’d prefer keeping it here as I think more people will read it and contribute on the forums.

My reply:

That sounds like the easiest way forward to get a Haiku audio multitracker and to have it co-operate with Sequitur and it would of course be infinitely preferable to not being able to multritrack and mix audio under Haiku, no doubt. Taking that route would also keep the faithful of the UNIX philosophy happy. I understand all this but its not what I want personally.

I’m a big UNIX fan and I love lean and mean apps too but after having spent some time a number of years back playing with the various session managers for JACK I can’t stand the thought of stringing together one app for MIDI, another for audio and a third as a plugin host etc. I want one app that does all that (ie a DAW) which makes it easier to create sessions, back them up and share them if you just have the one project file / folder that is opened by one app. Qtractor does all this. It’s lean and mean, free and open yet still packs quite a lot of features. It’s also the classic Linux-only app and Rui never has any plans for it to support any other platform but there’s nothing stopping it being forked or otherwise pillaged for its best reusable bits. Ardour has fancier features buts its def. not lean and mean which is what we expect in Haiku land.

I think it’d be great if you could patch up ecasound like you described. I understand some people do want just a standalone sequencer so I’m happy for them but rather than have someone try and write a Haiku native DAW from scratch I think they should first seriously look into forking Sequitur and taking advantage of the existing open source DAWs to see what can be re-used seeing as writing a DAW takes forever.

this is entirely possible through scripting. your media graphs can be saved through cortex, for example, and a script can be used to initialize your apps and plugins and to load your graph, then you’re back up and running. i don’t know how possible that is with jack, but it’s also standard practice in the similarly modular puredata environment. further, anything with a replicant can be added to a haiku shelf that loads the graph after startup, for something that more closely resembles that one app that does it all.

There is even a “Console” for the mediakit (from BeOS) … it even works with Haiku http://f3c.com/software/mc/ with this you can even make .sh scripts for the media kit.
I think stargater was able to get the source… would be really great to have it in HaikuArchives.

Personally I use a heck of a lot of scripts. (I just counted 28 xicon scripts on my Desktop!) I get the impression, though, that scripts, like the command line, are anathema to many people. You have to think like a programmer to be comfortable with them.

Which is a pity, because they enable so many things. Just for one (slightly involved) example, I use the Csound audio synthesis system a lot, and one of my “orchestra” files is a Hammond emulator. Csound is command-line driven, so I have one script that invokes it with the right command to start the Hammond. Then I have a MusicWeaver configuration set up to provide all the controls needed by the Hammond. I could start them each in turn, but as I (nearly) always use them together, I have another script “LaunchHammond” that checks if either is already running, and starts them if not. Sweet, but it does need using bash-shell logic, which even I detest!

There are other ways to get apps to cooperate, though. In the particular case of Sequitur and ecasound, you could add a menu item “Start ecasound” to Sequitur that would set everything up. Further, as Sequitur saves complete state as an attribute of the saved file, that could be extended to record that ecasound was started. The same could be done for ecasound, saving relevant info in attributes.

Dan’s desire for a single “everything” file would not be easy, though.

if you use a shelf and replicants, you don’t need a script, apparently shelves are persistent (though the media graph wouldn’t load automatically, i don’t think – but that can be saved and loaded through cortex).

also, scripts can be packaged and distributed. if done through haiku depot, each module used can be listed as a dependency and someone who doesn’t want to “think like a programmer” doesn’t have to, though no modularity would be lost.

[quote=spinach]if you use a shelf and replicants, you don’t need a script
[/quote]
Confession: in all of my time as a user/fan of BeOS and Haiku, I have never, never ever, used a Replicant! Well, at some time I would have dragged the Clock to the Desktop, said “Huh…”, and removed it again. It was one of the very few features of BeOS that never sparked me at all; never perceived what it might really be useful for.

However, your suggestion is something different. Have you ever used Shelf and Replicant in that way, or know of anything similar? I can see possibilities. I dug out the old “Container” BeOS Sample Code and played a bit. It does indeed seem to run the app(s) on its shelf.

It doesn’t seem to save anything except the visual layout and the app-signatures involved, though, so to have cooperating apps on the shelf would take some (considerable?) extra work. And I took a quick look to see if I might easily add a BDragger to Sequitur, but its construction logic is so damned convoluted I couldn’t see how.

Something to think on, anyway.

nice! this is the first thing i’d thought of when learning about replicants – i’ve never been much for widgets (even in all the time i spent using kde) but love the idea of a modular workspace. i’m learning to code, specifically for this sort of thing, but between moving and life stuff haven’t had time to experiment with a shelf of my own yet. another thing that can be done is to save your media node graph in cortex. cortex doesn’t initialize anything – that’s what the shelf is for – but it can save and load graphs once all the modules are initialized. i don’t know if this includes any MIDI connections or how one might include them if not since i haven’t seen much info yet on the MIDI kit or any apps other than sequitur that work with it, really. a sort of messy thing that can be done is to save the nodegraph in cortex and then write a script to launch the shelf and then the graph. a better thing would be to save and load the graph through the shelf itself. a best thing would be if cortex could incorporate a shelf. ah, this is exciting!

The desktop replicants are not very useful, however the general idea of replicants is. We use it in the deskbar for all the “systray icons” (volume control, network status, etc). The BeHappy application used to embed a web browser to show the Be Book and integrate with Pe to allow you to easily search for help on some class or method.

Cortex won't deal with MIDI, for that you can use its companion app PatchBay. Saving and restoring connections there isn't implemented yet, but I think it could be added.

Hi, is there a port for haiku 64 bit planned? Can’t find it in haikudepot.

1 Like

I Love Sequitur! It was my favorite midi sequencer in BeOS! Solid and very usable. Able to make very nice multitracked compositions…
I always wished Audio recording could be integrated into it, if it had been I would have dumped windows Cakewalk/Sonar completely.

I played a bit with Sequitur code and made it to compile on 64 bit. Doesn’t work yet though as it crashes while loading devices and filters. I might take a closer look and try to make it work when I have time. The quick and dirty patch to make it compile is here if someone else wants to take a shot at making it work in the meanwhile.
Sequitur 64 bit

8 Likes

wow thanks so much Pete !!!

the code tascam used in it’s beos based consoles would have been awesome to have.

Consider creating a PR, so the patch doesn’t get lost.