This is the eighth of a series of posts about SQA, my pet audio project. I’m rebuilding it from the ground up, for reasons explained here.

Commit log

  • 7802b09 on 2017-05-06: backend: respect volume values, allow live updating
  • 4b827d7 on 2017-05-06: ui: make properties expand
  • 94c7ae6 on 2017-05-06: ui: add sidebar window for editing, preserve selections
  • 898781f on 2017-05-06: ui, backend: add defs as default audio chans, fix window hiding & labels
  • 626df70 on 2017-05-06: ui: add drag & drop support for files
  • e8f095e on 2017-05-06: ui, core: update all deps, add statusbar
  • 27fcc8e on 2017-05-06: ui: use menubars to make things nicer
  • 785c69a on 2017-05-06: backend, ui: factor out UI boilerplate, add mixer widget!
  • 35fa52e on 2017-04-29: backend: remove obsolete parser code
  • ed09850 on 2017-04-29: backend, ui: implement rudimentary action editing, make API more typed
  • 1d73e2b on 2017-04-28: backend, ui: switch to OpaqueAction type, rudimentary action list
  • ebdfb97 on 2017-04-28: backend, custom-derive: start preparing for actions
  • f5f6718 on 2017-04-23: backend: add oscpath for /pong, whoops
  • edc2076 on 2017-04-23: backend: use new OscSerde stuff, handle more errors
  • 16e3c3d on 2017-04-22: osc-custom-derive: add Default impl for non-annotated fields
  • a26e929 on 2017-04-22: backend, osc-custom-derive: introduce new custom derive system
  • 2dfde20 on 2017-04-15: ui: add FallibleEntry and PropertyWindow widgets, allow sending to UI
  • 917fbf7 on 2017-04-14: ui: let’s add some UI to this project
  • cd7a8f5 on 2017-04-12: core: add sqa-ui crate
  • 9f1ba71 on 2017-04-12: backend: add reset, duration, pause methods for actions
  • ef305ba on 2017-04-11: engine: allow fading the volume linearly

Changes in detail

Yes, I haven’t made a post about this project in quiiiite a long time. My bad. (To be honest, I told you last time that I was bad at this.) However, I do have some pretty exciting improvements & news to make up for that with:

SQA now has a user interface! (again).

shiny photo

So yeah, that’s pretty useful and something we sort of need to make this whole thing work. It uses GTK+ (just like SQAv1), because I couldn’t find anything better, but this time, it’s actually user-friendly:

  • we take advantage of normal UI features like menus (gasp) and keyboard shortcuts (scream)
  • we have a cool sidebar thing, rather like QLab, where you can edit stuff with pretty sliders and text boxes (instead of a weird command line)
  • if they so desire, users can edit multiple actions at once by using the ‘edit separately’ function (wow, an improvement over QLab!)

The code has been kept in a relatively reasonable state this time - last time in SQAv1, we used lots of Rc<RefCell<T>>s to share state around, which ended up being ugly and error prone. Now, we just pass messages around! Yay for message-passing! There isn’t a single RefCell in sight (there is one Cell, for the mixer widget, but that’s it).

It’s important to note, however, that not everything is message-passed - we do employ shared state for things like widgets, where it’s easier to do that than to pass a message. (This sets SQA’s design apart from libraries like relm, which are message-passing-only.)

The addition of a UI to edit stuff (as opposed to, err, sending OSC commands in a terminal) meant that we had to write a whole bunch of parser code to serialise and deserialise commands & replies into/from OSC messages. About halfway through that effort, I gave up and automated it using Rust’s new custom derive stuff: basically, you now pepper your message struct with a whole bunch of #[oscpath="/path/here"] and similar annotations, and it’s done.

That’s it for this week; tune in in a few weeks’ time for the next edition!