Crazy idea of the day: Sound styles

So, In proffieOS, we generally have this rather simple flow of events:

inputs → prop → saberbase → outputs

I was thinking about how to implement multiple displays when I realized a I need some sort of a controller that translates events, like “saber turned on” into what to do, like “show out.bmp”. For blades, we already have this, and it’s called “styles”. In fact, I have also started implementing something like this for displays, although it’s not really all that useful yet. There is one output device that doesn’t have a something like a “style” though, which is sound.

If it did, than the event path would look like this:

inputs → prop → saberbase → styles → outputs

I’m not sure if we need that for sound, but sure would be nice if all events followed the same pattern, and it would open the door to customize sound in ways which would require us to rewrite hybrid_font.h otherwise.

I guess it also begs the question: What other output devices exist? IR? Serial?

???

What’s the dream idea/goal? Tunable sounds where you can adjust anything and everything (within a set limit so you don’t blow a speaker or the amp chip)?

@NoSloppy I’m disappointed you didn’t post a Memorex gif with couch guy holding a lightsaber. Please remedy that. :smiley:

Well the idea would be to pull out all the saber-sound stuff into one file (the controller) and have all the sound-playing logic in another file. Having it separated that way has some interesting advantages if we want to implement something that is not a saber. It also opens the possibility to have more than one audio output, although I’m not sure why we would want that unless it’s just “stereo”.

Like a Aliens motion tracker?

Multiple speakers: Maybe have a saber with a droid intelligence built in, with the droid communicating through a smaller speaker near the emitter instead of in the pommel. I think I remember droidified weapons being a thing in the Saga Edition tabletop rpg. Or just a com link for that matter. Another possibility might be to have separate bass and mid-high frequency speakers, rather than using one speaker for everything.

Edit: another use for multiple speakers might be to have instability effects, like an electric crackle, coming from the emitter.

Well, I’m thinking about vibrating motors (like a speaker but at a much different wavelength) and OLED’s are “blades”. Thus, I would assume that from a conceptual pov, if you implemente the speaker as a “blade”, everything would be conceptually the same. In other words, you would could have “input” sources (say, buttons, accelerometers, magnetometers, IR, BT RX, blade present pins, etc.) and output points (blades, OLED, speaker, BT TX, rotating chambers, vibration motors, DMX wireless interfaces, etc).
Input Matrix->prop->saberbase->style->OutputMatrix
So, may be the abstraction should be a bit higher? Just making a very generalized point. Or my be I’m repeating on what you are thinking and I’m just a bit slow with this.

Could this be used to do something really fancy like make a crystal chamber motor turn on when a panel is removed, or to make a sparking circuit like that in a stun gun that would make sparks on clash? For the sparks I’m thinking for a cal Kentish or maul style double bladed saber where it has been broken in half, with wires sticking out the end, sparking occasionally, and sparking a lot when dueling. Maybe a little flash paper launcher to make a tiny fireball.

The chamber rotor could easily be done if we had an option of generalizing the Blade detect, to have a few more pins (say, for a panel open) or even another input (like a hall sensor or battery charging). But I’m pretty sure Frederick understands this a lot better than us.

Generally, the way to do this stuff is to:

  1. add a button that detect the panel opening
  2. add a few lines in the prop file that sends a EFFECT when the button is pressed and relased.
  3. Create a style that reacts to the effect in the way you want.