Are there options for controlling swingh/swingl files based on threshold, rotation or otherwise?

HI all,

From what I’ve read in documentation I understand that two swingh/l files are picked randomly as pairs and are then blended with hum in a certain way. I believe the swingh/l files are also not always played from the start of the file and can continue from the last point it got to, really great stuff for immersion and keeping the swing sounds fresh and interesting.

I wondered if there was an option or method for playing a certain swingh/l file based on speed, acceleration, rotation etc.
I think I’m right in saying swng files work in this fashion, swinging on the lower side of the threshold could play swng1.wav for example, whereas swinging harder/faster results in progressive files being played, swng2, swng3 etc.

What I’d like to achieve is having a smoothswing that has a pitch relative to the travel speed of the saber, is that possible to do?

I’m just using swingh and swingl for the basis as that’s the folder where the smoothswing files reside.
If for example swingh1 was always blended with swingl1, it’d be easy to have a low frequency sound in swingh1.wav and swingl1.wav, a slightly higher frequency sound in swingh2.wav and swingl2.wav and a high frequency sound in swingh3.wav and swingl3.wav.
A slow swing blends swingh1.wav and swingl1.wav, medium swing swingh2.wav and swingl2.wav and a fast swing blends swingh3.wav and swingl3.wav.

I guess if you wanted to add fluidity to it you’d need to blend between swingh/l1,2 and 3.
On a “real lightsaber” starting a swing slowly and then speeding it up mid-swing would sound like a lower note transitioning to a higher note, so swingh/l1.wav would need to be blended with swingh/l2.wav.
I’m guessing this would be complex though as it seems the algorithm is currently designed to only switch swingh/l files when it thinks it’s safe to do so, something that would prevent a new swingh/l file being loaded mid-swing.

I might be making this far more complex than is necessary but I couldn’t see a way to achieve this currently, hypothetically would it be possible something for this kind of feature? If it doesn’t already exist in some capacity?

Really I’m thinking of ways that we can make sure the saber pitch is realistic under movement without having to carefully craft audio files that ascend and descend in pitch, because I don’t thin we can control which pairs are played so there’s no way to assign an ascending swing pair with a slow to fast saber swing and a descending swing pair to a faster swing that is slowing down.

So, this might be interesting to do, but I want to clear something up first:

This is actually not how lightsaber works in the movies.
The sabers never change pitch based on speed. They do transition from high/low to make it sound sort of like a doppler effect, but if you listen carefully, it doesn’t actually sound like a doppler effect, because the sound engineers simply faded from a high to a low sound and vice versa instead of changing the speed of a single sound.

Smoothswing transitions between high and low based on how many degrees of rotation you have done so far, and adjusts the volume based on the speed, and this is pretty close to how lightsaber work in the movies.

A very long time ago, I actually did some tests with changing the playback speed based on the swing speed, but it never sounds like a saber when you do that, it sounds like an engine revving instead.

Now, accent swings/slashes actually have the ability to play different sounds based on the “strength” of the swing (which is based on the swing acceleration at the time the swing threshold is reached.) You need to set the ProffieOSMinSwingAcceleration and ProffieOSMaxSwingAcceleration variables in your font config file to activate this though.

Oh wow I didn’t know that, thanks for correcting me!

I was reading through thexter’s description of smoothswing and although I can’t find it now for reference, I’m sure I read that swingl gets played first and then it plays the corresponding/paired swingh after the transition point:

I’m just trying to see what creative things we can do with these files to build new fonts with interesting dynamics, one of the first thoughts that comes to mind is having swingh/l pairs that are designed to work together so that you could say, I want swingh1 and swingl1 to always be played together. Then you could create two sound files with the intention of those two sounds blending together.

The intention is that we have a sound for swingh1 that sounds like a saber hum variation, then another sound for swingl1 that sounds like maracas being shaken.
Using Transition1Degrees and Transition2Degrees we can change how much of each sound is played before the transition, so we could have the hum for 180 degrees and then it tail off into a sort of shk shk shk sound like a maracas or the eerie sound from Halloween the movie, Michaels theme.

The other issue with this idea currently is that the files do seem to be picked at random, I’ve just done some testing and as I thought, sometimes swingh will play first whereas for this idea you’d always want to start the swing with the same file > Always starting with swingl1 and blending to swingh1 (you know, with the hum in the middle, as I think technically the swingh/l and hum are blended and not the swingh/l’s together directly).

As you pointed out, it’s possible to control this behavior with other swing types, accents and slashes, but having the depth, control and fluidity of the smoothswing algorithm really brings this to life

This is exactly how it works currently.
1 and 1, 2 and 2 etc…

This is how it works today.

You do know that it switches back to the other sound again after 180 degrees right?

(In the latest code on github, this 180 degrees is controllable by using the Low2HighSeparationDegrees and High2LowSeparationDegrees.)

This is done for greater variety, and it happens here if you want to change it:

swingl, swingh and hum each have their own player.
There is a cross-fade between swingl and swingh which determines which is playing, then there is another crossfade between hum and swing(l/h) based on swing speed.

My question is really what the goal is here. It’s actually quite difficult to make things “better” without having some sort of idea of what you’re trying to do. Is there a specific example of a sound that you would like to achieve?

Hey, sorry for the late response.

Yes but I thought this was controllable with Transition1Degrees and Transition2Degrees.

After some testing I think what I’m really trying to achieve here is separating swingh/l from the spin.
I’m still finding that entering spins is taking a while and on some fonts I’m using the swingh/l is being played for far too long before the spin starts, or once a spin is triggered it plays spin.wav once and then returns to swing/l.

From feel alone, without having dived as deeply into the configs as I would like, yet, it feels like an acceleration/speed issue.
If I spin the saber as fast as I can it’ll trigger the spin, but any lapse in momentum and it’ll revert to swingh/l.
This is running into the other post really so perhaps I should update that thread instead.

But for the sake of addressing the topic here, they are related.

In relation to this thread, I have two sounds in mind that I want to blend, thanks for clarifying swingl1 and swingh1 are paired, knowing that I realise i can pair sounds.
Unless I’m mistaken Transition1Degrees and Transition2Degrees can be used to dictate how much of each sound from swingh/l1 gets played before it transitions.

Easy scenario:

I pick up the saber, swing it around a little for the swingh/l sounds, then I slowly start a spin
swingh/l sounds are still played
I pick up lots of momentum and a spin is trigger on the second pass of an obi-ani

I’m certain that although the spin speed does vary in places, I’m not dropping below the swing threshold, so I would have thought that should mean another spin.wav is played.

In an effort to combat this with the config files I’ve reduced the ProffieOSSpinDegrees to 180, this definitely helps but not enough, when I get some time today I’ll reduce this even further.
I know this sounds counter intuitive, really I’d want this value at 360 but at this stage unless I drop this value, the effort needed to start a spin is beyond reasonable.
To put this into perspective, I have blisters forming on the insides of my thumb and forefingers on both hands, that’s the velocity that is required to start and keep a spin going, most of the time.

I’ve also downloaded other fonts from Greyscale fonts and used their config to make sure it’s not a config issue. Some configs make it easier to enter a spin but not necessarily easier to stay in a spin, based on the config notes it would make sense to me that for a spin to be triggered you have to hit the swing threshold, and with it being easy to enter a spin on some fonts/configs it would imply that the threshold is lower, so staying in a spin should also be easier - this is partly why I’m convinced it’s not as simple as;
Do you meeting the swing threshold and rotation for a spin > yes > then spin
Do you still meet the threshold for a spin > yes > then play another spin.wav
Or do I fundamentally just have that wrong and I’m not understanding this correctly?

Looking at the notes on ProffieOSSpinDegrees it says:
//Number of degrees the blade must travel while staying above the
swing threshold in order to trigger a spin sound.

Is that referring to the threshold at which an accent swing (swng.wav) is played?

Because I am absolutely well within that threshold whilst spinning and yet the spin.wav stops and reverts to a swingh/l.

I’m tempted to play with ProffieOSSpinDegrees and Transition1Degrees, Transition2Degrees, in an attempt to make it easier to enter and stay in a spin, but also to better separate the swingh/l

As I’m not sure what exactly it refers to when it mentions swing threshold in the ProffeOSSpinDegrees notes I’m assuming by reducing the swing threshold it’s going to trigger accent swings easier, which is something I don’t want to do.

Again, to return to the topic of this thread, there are some fonts that I want to create that aren’t just a variation of the same sound file.
I don’t necessarily want my spin sounds to be similar to swingl/h, a lot of fonts tend to be a hum and all other sound files are a variation of this sound or close to it.

The saber taking a little too long to move from swingh/l to spin is less of an issue in this scenario.
But if you have a different sound for spin, you only want that spin sound playing when you spin the saber, and you don’t want swingh/l to play whilst the saber is moving incredibly fast in spin choreography.

I appreciate you taking the time to help

No, Transition1Degrees is the number of degrees before the first transition occurs. (With a little random added I think.) Transition2Degrees is the length of the transition itself.

However, on github, there are two more variables:

These two variables (Low2HighSeprationDegrees and High2LowSeprationDegrees) allow you to specify the number of degrees between high-to-low and low-to-high transitions individually. Note that this is fairly experimental and may change before release. The intention here is to be able to make a Maul font by setting Low2High to 140 and HighToLow to 40. (Or some other combination that sums to 180)

This doesn’t make much sense, becaues swingh/l are not connected to spins. They don’t affect when spins are played and they don’t go away when spins are played.

There are two things that might be causing issues here though:

  1. spins uses the same threshold as accent swings, which is usually much higher than swingl/swingh.
  2. spins don’t start until you’ve stayed above the accent swing threshold for enough time AND no accent swing is playing. (Or at least it has played enough that it can be aborted and faded out.)


If you were above the accent swing threshold, then it wouldn’t just play swingh/l, it would play an accent swing.

This is why I’m thinking of using the font config swing threshold for spins. (In a Smoothswing font, this variable currently isn’t used, because it’s overridden by the AccentSwingThreshold from the smoothswing config file.)

If that works for you, great. If it’s simple to make it work, fine. But I’m not going to go out of my way to add support for it. If you need something unusual, you’re going to have to write some code for it yourself.

I disagree. Unless spin sounds are as responsive and dynamic as smoothswing sounds, there is no way I’m taking away the smoothswing effect just because a spin sound is playing.

Great, thanks for clarifying.

So does this mean with the current config that a spin can’t start until an accent swing has been played?

Yea I think that makes a lot of sense

I don’t think we’re quite on the same page, I recorded a video to hopefully show the issue;

You’re absolutely right, watching this back now I can see a spin doesn’t trigger unless an accent swing has been played, currently I will need to lower the accent swing threshold to trigger than spin more easily.

Sorry, it was recorded whilst working but I can repost if you need more info.
I just put a few sound files together on a font to demonstrate what’s happening.

In the video you’ll notice that in between every spin is a brief moment of smoothswing.
So is this video representative of what you would consider to be functioning normally?
I’ve picked a spin sound very different from everything else to more easily highlight it in the video.

I have increased the accent swing threshold to 600, according to how fast/hard I think you need to swing to trigger the accent, but if the current config relies on an accent swing being triggered prior to a spin then I might go back and lower this and test again.

Can I ask why you would want the smoothswing with the spin sound?
Perhaps I just need a little perspective here.

Is there a way to control the volume of smoothswing in combination with spin?
I wouldn’t ask you to change anything that’s currently in place, this works wonderfully for typical saber sounds. It’s when you get into some of the more diverse greyscale fonts that options around swingh/l and spin would really be handy.

It essentially means we’d be able expand the sounds we use for each swing type, not having to have a spin sound that is very close to hum, swingh or swingl for example.
And I’m not saying something entirely different, but as a spin sound becomes more unique from the rest of the font, the less smoothswing you’d want during spins, right?
If you disagree I’d love to hear your take on it.

I think this perhaps explains a little better;

I have a font that’s based on storms, the hum is a calming music, the accent swings are thunder clashes, swing/l are static/electric sounds and spin is a light rain.

I do want swingh/l to play with the spin but MaxSwingVolume=3 (I think) is perfect for swinging behavior, but is too loud during the spin cycle when you hear spin/Sswing/spin etc.
Arguably you can deal with this in audio leveling during the master, I’m just wondering if that’s the expectation or if you think being able to control smoothswing/spin volume would be a useful addition to everyone

Update: I changed the value of AccentSwingSpeedThreshold from 600 to 400 and it’s working so much better.
Now the swingh/l sounds are very subtle in between the spin and it accents it nicely, its not choppy like it’s on the edge of playing one or the other.
In this config I don’t see any need for volume adjustment of either, it just works.

If you end up using the font config swing threshold for spins this would be great as I’ll be able to up the swing accent threshold, at 400 it is a little “accent happy”, but feels just right for the spin to engage.

I think so. Unless you set the spin degrees to 0.

So, it sounds like you have set ProffieOSSmoothSwingDucking to a high value, like maybe 1.0 ? IMHO, ducking is generally bad if you can hear it, and a this is definitely noticeable.

No, setting ProffieOSSmoothSwingDucking to 1.0 is not normal.

The responsiveness of smoothswing is superior to any sound triggered by a single event. Generally speaking, I would prefer to improve upon smoothswing instead of replacing it with older concepts, like spin sounds.

Swingl/h doesn’t really have to be that close to the hum, you could put a melody in swingl/h and it would show up when you swing but not when you hold the saber still.

This is the best I could do on spins. It triggers a little earlier than I would like, which can obvs be changed, but leaving it at the standard settings produced the best compromise imo, but overall I’m happy enough with it to have moved on. I’ve got these on Kyberphonics “Thunder God” and similar setups on a couple other fonts. I found a single looping sound clip around 4-5 seconds long works best without bleeding over once the spin stops.
Spinning Mjolnir

Very nice!

I think Profezzorn’s addition of fade will really tighten up spin as well, I agree that short spins are the best way to go. For saber sounds spin adds a nice dynamic, for applications in sounds outside of saber fonts, Profezzorn’s fade changes will allow for much longer spin files. I can’t wait to test that thoroughly and see what we can do with it!
Unfortunately work is keeping me from the truly important things, fun with sabers!

1 Like

Good point, I currently have this set to 0.5 for testing, I’ll revert the swing threshold from 400 back to 600 so I can test the difference between the default 0.2 and the 0.5 I currently have set. Just so I can clearly see the impact of this setting.

This makes complete sense, with spin fade I think we have all the control we need anyway.
That alone allows for longer spin files which in turn creates more possibilities, albeit outside of the traditional saber fonts.

I do this currently! Although it’s a science to get it right, a few variables in each config to consider and then the creation of the swingh/l sounds themselves is a little challenging.
Without control of the duration of each sound you’d need to make the actual sound and duration of the swingh/l files very specific.

As you’ve pointed out, github files now include these options which will make the process infinitely easier. I’m still focusing mainly on understanding the config options and building fonts at the moment, but once i have something that works well the next step will be flashing the saber with the latest from github and then going back to this melody-based swingh/l concept with the finer controls we now have.

I have a storm font at the moment where swingh is a lightening sound and swingl is a howling wind, the two blend together really well and it’s surprising how well the algorithm is working without any additional tweaking needed to define how long each sound should be.

Next steps for me are to:
Revert ProffieOSSwingThreshold to 600 (Setting used in the video)
Revert ProffieOSSmoothSwingDucking to default 0.2
Test how ProffieOSSmoothSwingDucking affects the sound and compare to the video I posted
Set ProffieOSSwingThreshold back to 400 ish with ProffieOSSmoothSwingDucking set to 0.2
Test again.
Finally, play with ProffieOSSmoothSwingDucking to understand how ducking affects the sound.

If you think it can have quite a negative impact when set incorrectly then it sounds important to get this right if you want the font to work and sound as good as possible.