Proffie - spin function and ducking swingh/swingl

Hi everyone, I’ve recently been building my own fonts with great success, I noticed the swingh and swingl files are not great for spin sounds so I’ve added #define ENABLED_SPINS in my config, which is working great.
I’d now like to configure the behavior of the sound files as I’m getting swingh and swingl sounds interrupting my spin files, I’ve also noticed that you want the spin sound files quite short so they can be repeated, otherwise long files, if triggered twice, will start playing over each other and it gets very messy.
Is anyone able to advise how I can better control this?
Essentially I’m balancing hum at -6db, swingh and swingl at -2db, accent swings enabled and also at -2db, spin files -2db, in my config the spin degrees is at 360, so I want the saber to make the swingh and swingl sounds as normal but I want to favour the spin files and mute other effects/sounds whilst the spin file plays/loops.
I am also aware of Fet263’s spin function but I’d like to avoid using those config files if possible, unless there’s a really good reason to go through the effort.
I’ve already made tweaks to the smoothswing and config ini files but I’ve not had great success, any pointers or example files/settings would be greatly appreciated.
Thanks in advance!

Spins are disabled by default exactly because they don’t work great.
It’s also not entirely clear how they should work, or if we should even have them at all.

I’m happy to make modifications to how spins work if you have some ideas though. :slight_smile:

swingl and swingh should not be able to interrupt spin sounds though, so I don’t think that’s what’s actually happening.

Personally I find that if you tweak your smoothswing settings so that swingl/swingh distort slightly at high speeds, it tends to make fairly good spin sounds, but it depends on what you’re trying to do. For instance, it doesn’t work well if you’re trying to recreate the darth maul spin sound, which is constructed differently than the EP4-6 sounds.

Hey profezzorn,

Thanks very much for the response, in in the interest of keeping the initial post short I haven’t been particularly accurate in my descriptions so apologies.

I think rather than stating swingh/l aren’t good for spins I should have said I’d like them as separate sounds and functions.
For a brief example let’s say we have:

  1. A standard saber hum,
  2. Both swingh and swingl are slightly different saber sounds to the hum so that the static hum and any motion sounds can be easily distinguished.
  3. 5 different sounding swng files
  4. two short different sounding spin wav files

The intention is that the hum is always apparent and that the swingh and swingl are played over the top with good smoothswing, i have config.ini and smoothswing.ini so this currently works great.

The issue comes with the spin, so to be clear, spin files didn’t work and after review of the proffie documentation I can see that I needed to specify #define ENABLED_SPINS in the config.h file, and that I needed to add the following line to my config.ini

"# If #define ENABLE_SPINS is defined. Number of degrees the blade must travel while staying above the
# swing threshold in order to trigger a spin sound.  Default is 360 or
# one full rotation.

Now that I have done those two things the spin sound is triggering but I’m having overlap issues, it’s easier to give a clear example rather than explain the premise so;

I have a font configured the same as the example above, when I spin the saber 360 degrees the spin wav file doesn’t play, I have to spin the saber anywhere from 3 to about 12 full rotations before it plays spin.wav.
If it helps I do balance the audio levels in the font as per greyscale fonts recommendations so;
hum -6db
swingh/l, swng and spin are at -2db

Usually when the spin plays the accent swings are still triggered so I’m hearing a lot of files at once.
I wondered if it could be worth muting all other sounds when a spin files plays, this would suit my personal needs but also removes the need for quite as much configuration in the ini files to duck other sounds.
Is it possible to mute other sounds while spin.wav plays?
If not do you think you might be able to suggest a better approach for to me take to manage this?

Thanks so much for the response and the work you do for the community

Sorry I made a mistake, the accent swings aren’t what is playing whilst the spin sound is playing, it’s the swingh/l sounds.

So if I have a 2 second spin.wav and nothing else it’ll loop that pretty well but I can still hear smoothswings in the background, which personally I’d like to prevent.
On some fonts I’ve added a longer spin.wav of say 20 seconds which plays music, if I start spinning and the spin.wav starts to play, it also still plays smoothswing.

In this scenario is it possible to configure it so that if spin.wav is playing, another spin.wav can’t start?

Two cases where this is an issue, if I spin one way and then stop briefly and spin the other way it’ll start playing two 20 second spin.wav files over each other, the other issue is that if I start that 20 second spin.wav and then turn off the saber, it’ll continue to play that file until it’s finished, when ideally it’d stop the spin.wav either when we stop spinning the saber or when I gesture off/switch off the saber.

Hopefully I’ve explained that well enough, really appreciate your help.


I did further testing yesterday and changed the following values;

ProffieOSSmoothSwingDucking=0.2 updated to ProffieOSSmoothSwingDucking=0.5

ProffieOSSpinDegrees=360.0 to ProffieOSSpinDegrees=320.0

MaxSwingVolume=3.0 to MaxSwingVolume=2.0


This does seem to have reduced the issue of too many sounds playing at once, I still need to spin the saber quite a few times before the spin.wav file plays - I’m wondering if I might not be reaching the swing threshold and that’s why the spin starts late, I’ll need to look for a setting to address this.

Looking at ProffieOSSwingOverlap=1.0 I was hoping this would prevent spin files from playing over each other but sadly it doesn’t appear that spin sounds are classed as “swing sounds” (see below), which makes sense, I thought I’d test it though.

# introduced to tune spins - allows swing sounds to overlap each other
# to be tuned on a per-font basis
# fonts with lots of silence will need a much lower value
# in order to have good responsiveness
# values range from 0.0 (full overlap) to 1.0 (no overlap)

Maybe we should have two values:

ProffieOSSpinDegrees and ProffieOSSpinDegrees2.

The first one would be how many degrees of swing there has to be before a spin is triggered.

The second one would be how many degrees of spin there has to be before we start another one. (And maybe, when we start another one, we should fade out the previous one?)

For your use case, you could set the second one to something very high, and that would avoid playing another one.

Also, we should definitely stop playing the spin sound once swinging stops.

I’m totally on board with making changes to how spins sounds work, but your use case seems to be something different than what perhaps most people would want their spin sounds to do?

Yes I think that would work really well!
It may even solve the issue where the spin files aren’t quite a smooth transition, so if we have a 3 second spin.wav it’ll play it once, there’s a small gap, and then it will play the file again.
Fading in and out of spins could be a really cool way of looping a single file/sound or even blending multiple spin sounds!

Yes I think you’re right here too, I think my use case it a little different but I definitely think there are those who will want to use longer spin files as well as short ones, the intention being music or something on the longer files and looping effects on the short files.

Blending as you suggested seems to be a great idea for the short files, in terms of preventing overlap or ending a longer spin when you don’t want it to continue might be a little bit more tricky.
I think what you’ve suggested with spin degrees will work, but in terms of configuration it could be a little difficult.
Say if I have a 20 second sound clip of a song called spin.wav, I’d then need to calculate how many rotations I’d spin during that clip in order to configure the ini file correctly, but the issue is that my rate of rotation on the saber would have to be the same each time.

Is it possible to add a value for time?
Hypothetically if there was a setting called ProffieOSSpinTime with a value of 0-120, we would be able to set the time in seconds before another spin.wav could be played, this way we could easily look at the duration of the spin.wav file and update the ini file accordingly.

Is something like that perhaps possible?

Thanks again

I’ve just updated the config.ini so that ProffieOSSpinDegrees= is set to 190.0.
This is almost perfect, it still seems to take a lot of spins to get the first spin to play but once it does you get the following sequence;


So all I need to do now is adjust this behavior somehow, so that we get
Even if there was a small delay between the playing of the spin.wav file whilst spinning, I think it will be immersive enough for most spin sounds.
It seems that smoothswing plays for about a second between spins at the moment though.

I’ve looked through the settings and I can’t see anything currently that would allow me to adjust this, I could be missing it though.

Is it possible to potentially have something like the below settings but for the upper limit?

//Degrees per second needed to register as a smoothswing.
//Default is 20.0 (1 to 360)

Maybe something like
//Degrees per second when a smoothswing is no longer played.
//Default is 360 (1 to 360)

The idea being that when the saber spins anything up to 360 degrees it’s considered a smoothswing, unless it has X force/acceleration in which case it is an accent swing.
Once the saber rotates 360 degrees it stops playing smoothswing sounds.
Then with the ProffieOSSpinDegrees=" set to say, 320, it’ll start producing spin sounds instead of smoothsings.

Do you think that would work?

Sorry for so many posts, I’m currently testing whilst I have time.

So changing the ProffieOSSpinDegrees= to 180 has almost entirely stopped the smoothswing playing in between spins which is great.

With the way this is written/coded, is it possible to stop the spin playing mid way through the track?
Where we were talking earlier about how the spin sound still plays after you turn off the blade and won’t stop until you select a new font, it’s the same issue where if I’m spinning and it’s a slightly longer track you’d want the spin to stop playing when you stop spinning.

Is it possible to have the board detect something like: when rotations are below 180 degrees per second?

ProffieOSSpinDegrees tells the saber when a rotation should become a spin, but it would be awesome if we could tell it “this isn’t a spin any longer, stop playing the spin.wav file”

An idea that comes to mind could be; if rotation is less than 180 degrees per second stop playing spin.wav.
Is that possible?

Although changing ProffieOSSpinDegrees to 180 has helped massively, it seems to be that the smoothswing playing in between is more about the speed required to trigger a spin, this is also why it takes many spins to start the spin.wav.

So if we could reduce the intensity/acceleration required to start a spin sound it would fix both the late to start issue as well as the smoothswing interruption that occurs if you aren’t spinning the saber hard/fast enough

Ooo, spins.

I tried working on this years ago and haven’t really be active on ProffieOS since then but you’re on the right track. The way I see it once the saber enters ‘spin mode’ the smooth swing files should be playing at near zero and the only sound should be the quick ‘spinxx’ sounds as the blade makes a complete rotation (with the sound playing at the ‘top’ of the rotation.)

Not sure why it takes a while for it to ‘enter’ spin mode, that used to work ok for me but again it’s been years since I played with this stuff. So far as I can remember, the speed of the blade isn’t relevant, only if the degrees traversed meets or exceeds 360 or the value set by the spin degrees variable. Then the spin plays and the angle is ‘reset.’

I had grand plans to revisit this and to work on other sound related stuff but I haven’t had the time to sit down and look at Proffie code in a long time.

Hey SA22C,

Thanks for the great info!

Yea the required criteria for starting a spin seems a little unclear because the ProffieOSSpinDegrees setting at 180 would imply that a spin of the saber past 180 degrees would play spinxx.

I wonder if the ProffieOSSwingOverlap=1.0 is preventing spinxx from playing because the first 180 degrees of movement are playing swingh/swingl files for smoothswing.

Now that I’ve made some changes in other areas within the two main config (ini) files I’ll go back and revert this setting to 0.5 to allow some overlap, that way the spin might occur a little sooner.

Thanks for the thoughts!

This already exists.
With a smoothswing font it’s in the smoothsw.ini config file and it’s called AccentSwingSpeedThreshold. Note that it’s the same threshold that is used to trigger a swing/slash sound, which might not be ideal.

This one seems weird to me.
First of all, I think the unit of this would be degrees, not degrees per second.
Second, I’m not sure why you would want to stop the sound at a particular time in the spin. I could see wanting to fade out the old one if we are starting a new spin, but it doesn’t seem like we would need two separate variables for that. Would you ever want to stop the spin at one point and start a new one at a different point?

Well the spin did happen a little sooner so it looks like the only two remaining items are for the longer spins.
Thanks for the help so far guys!
Getting a spin to stop when you stop spinning
Getting a spin to stop when the blade is powered off


Ah thanks for the point about the SwingStrengthThreshold, that makes sense.
I didn’t think about it like a smoothswing becoming an accent swing and visa versa.
I’ll have a play with that.

In relation to your point referencing spin, smoothswing, spin etc;

So this applies to using a short duration wav file and what I found was that in testing I was spinning the saber in one hand constantly, when I went outside and started spinning high low or obi-ani, the spins were perfectly back-to-back with no gaps or smoothswings interrupting the sound.

When I was talking about degrees per second when a smoothswing is no longer played I really just thinking of ways that we could stop the spin from playing mid way through.
The only application for this is longer duration spin files, an example of why;

Frozen theme font
hum - sort of mystical 20 second loop
swingh/swingl - Icy wind type of swoosh
swng - sound of ice breaking
spin - Let it go track clip of about 20 seconds

For someone who mainly spins their saber, having a track play when you start spinning for longer periods of time is really nice.
I understand if you’re just flourishing once or twice this isn’t something you’d come up against but for myself or anyone like Carly King (Youtube) or the big spinners out there, we definitely spin our sabers for minutes at a time and it’s in cases like these where longer tracks are more desirable than a repeating spin sound for 2 minutes.

Hopefully that sort of explains why longer duration spin files could be popular and the ability to end those playing tracks would be a really useful feature.
Sorry it’s taken me so long to articulate that :joy:

Personally it’s not about long vs. short spins, but realism vs. environmental effects. It can also be stated as 1st person vs 3rd person perspective optimizations.

Personally, I want my sabers to feel impressive to the person who is wielding it. (me) Ideally I want there to be no extra buttons or gestures needed, you just use it and it sounds and feels exactly like a real lightsaber would. For me, the goal of spin sounds is to make smoothswing better, and the sounds should be “natural”, meaning that it should sound like that’s just how the saber sounds when you spin it.

However, a lot of people optimize their saber for how other people see it. That means that buttons and gestures are great, as long as the audience don’t see you doing it, and environmental sounds and background tracks adds to the ambiance of the performance. It also means that it may be ok if you have to synchronize your movements to the sounds of the saber rather than the other way around.

Both are reasonable point of views, I just always want the first one. :slight_smile:

My current thinking is that we should do a couple of things:

  1. Separate the “degrees to start spin” from “degrees before we start another spin”. This one change make it possible to have long spin sounds or short spin sounds and you can configure it either way.
  2. Fade out the spin sound when we (a) start a new one (b) stop spinning (c) turn the saber off.
  3. Select which spin sound to play based on swing speed. The idea is to pick a spin sound that is at least “degrees to start another spin” / swingspeed seconds long. So if you spin faster, a shorter sound would be picked. This might need a little thinking since ProffieOS generally doesn’t know how long the sounds are before playing them though.

Yea I completely understand that perspective!
I hadn’t really thought about it in first vs third person, very interesting though :slight_smile:

  1. "Separate the “degrees to start spin” from “degrees before we start another spin”
    Sorry I’m not sure I’m following what you mean here by “makes it possible to have long spin sounds or short spin sounds”. Would you mind expanding on that?

  2. Fade out the spin sound when we (a) start a new one (b) stop spinning (c) turn the saber off.
    Amazing, sounds perfect!

  3. Select which spin sound to play based on swing speed.
    This is very interesting, if we start a spin and for some reason we drop below the ProffieOSSwingSpeedThreshold then another spin file gets played, resulting in the 2 different and long duration spin files playing over each other, something point 2. will address nicely.
    When this happens though you might want the same track to play again so I can see the value in being able to select what track is played.

If the track selection is tied to the swing speed does that mean you’d have to spin at an intentional rate to produce a certain track?
When switching from obi-ani to figure or passing to another hand, the rotation speed will vary quite a lot over the course of a “constant spin”, meaning once a spin is detected and spin.wav is played, you are staying above the ProffieOSSwingSpeedThreshold, otherwise the spin would fade with the fix from point 2, or start playing a second spin.wav which is currently the case.

Are there any other ways we might be able to influence which spinxx.wav track is played if the swingspeed is an issue?

I also found why the spins “start late” and how most of the spin overlaps i’m running into tend to happen.

//How fast (degrees per second) we have to swing before a swing effect is
//triggered. Default 250.

During a spin if I fall below this threshold, the next spin I do starts a fresh spin.wav, something your fade out spin sound will address.

the “late start” I think could either be caused by accent swings (swng1.wav) triggering during that first 180 degrees of rotation (ProffieOSSpinDegrees=180).
Updating ProffieOSSwingOverlap from 1 back to 0.5 has allowed the spin to start a bit sooner.

When the ProffieOSSwingSpeedThreshold info refers to “How fast (degrees per second) we have to swing before a swing effect is triggered”, does swing effect mean swng/swing.wav specifically? Or does that include spin or others as well?

If it’s separate then great, if not and spin is treated as a swing effect;
would that mean ProffieOSSwingSpeedThreshold set at 250 would require a minimum of 250 degrees of movement/rotation within a second for a spin to start?

If so I’d like to lower that to 180, inline with ProffieOSSpinDegrees to trigger the spin.wav sooner, but I don’t want to make it easier to play accent swings (swng/swing.wav)

Right now we have ProffieOSSpinDegrees. It basically works like this:

When your swing speed is above the swing threshold, it starts counting degrees. Once you reach ProffieOSSpinDegrees (without falling below the swing speed threshold) a spin sound is initiated. At that time, the counter goes back to zero, but it keeps counting, and once you reach ProffieOSSpinDegrees again, another spin sound is initiated, ad finitum.

What I suggest is that the first count should have a separate variable from all the others. So, maybe we add a ProffieOSSpinInitiationDegrees, which might default to 270 or something like that.

Now, if you’re using really long spin sounds, you could set ProffieOSSpinDegrees to 10000000, and that would mean that it would essentially never initiate another spin sound. If on the other hand you wanted to try to recreate the Darth Maul wowowowowowowow sound, you could have your spin sound be a single “wow” and set your ProffieOSSpinDegrees to 180. (Or you could make it a really short sound and set it to 30 degrees for some funky effects!)

“Track” is usually something different in ProffieOS vernacular.

But if you change spin speed, shouldn’t the spins also sound different?
My thinking is that each spin sound should roughly cover one rotation (or whatever you set your ProffieOSSpinDegrees to), with some extra tail which expected to fade out and be replaced by another sound as you spin around for the next rotation.

I’m also thinking that maybe we should just use the normal swing threshold for spins rather than the accent slash threshold.

Also, it seems that spins only start when a swing starts (because they use the same threshold) which is why the swing overlap variable matters. I don’t think it should work like that, so I should probably fix that.

So, currently, I don’t think ProffieOSSwingSPeedThreshold is used at all in a smoothswing font. Only the accent swing threshold is used. I think I’m going to change that though.

This is really interesting, wouldn’t that imply that if I have a 20 second spin.wav and I spin the saber for 30 seconds, every 180 degrees it would be starting another instance of spin.wav?
If ProffieOSSpinDegrees was set to 180.0 of course.
Because currently that’s not happening, it’ll start the spin.wav and it won’t try to play another spin.wav over the top or restart it, it seems that as long as I stay above ProffieOSSwingSpeedThreshold then it’ll keep playing my initial spin.wav.

There must be more to this though as if that were the case then short spin.wav files would only play once and never repeat as long as you stay above ProffieOSSwingSpeedThreshold, unless it’s only starting a new spin.wav once the full clip/track/wav has played, this actually works perfectly for me if that’s the case as I don’t want it to ignore the short spin.wav files and I don’t want it to constantly restart or stack the longer ones with each new rotation.

Yes I completely see what you mean, for short spin.wav files, absolutely. From an immersion perspective I’d want the spin to sound higher if spinning faster for example, a bit like how the swng files seem to work if I recall correctly, where swng1.wav is used but as you swing harder/faster then swng2, 3, 4 etc are used. Easily done with low frequency spin sounds on spin1,2,3.wav and higher frequency spin sounds on spin3,4,6.wav - err, if it works that way :smiley:

I think it’s becoming apparent that I might be using spin.wav to start playing music tracks, much longer than the intended duration for spin.wav, as that’s what I want to happen when I start spinning/performing.
Perhaps I should be using something else so that the intricacies of spin can be revised without the complication of trying to accommodate longer spin.wav files.

The only other method I could think of would just be replacing force.wav with the song/track I want and starting that before spinning, then it’s just a case of being able to adjust the spin.wav/force.wav volumes.

Any thoughts on that perhaps?

Thanks for the work you do mate, It’s certainly very much appreciated!
I’m a cyber security consultant/infrastructure engineer and got into this hobby recently, messing about with the capabilities, options and features has been an absolute blast, I really can’t express enough gratitude for the work you’ve done and what you’ve produced.
The wide skillset that must be required to tackle as many areas as you have, both technical and the documentation and support you are providing in inspirational :slight_smile: