Registration Notice

Due to increased spam, forum registration must be manually approved by a moderator! Please see this post for instructions.

*

Offline Rad_Schuhart

  • 121
    • View Profile
  • Graz, Austria.
Looking for the best way for triggering the user sounds.
« on: October 19, 2019, 11:04:56 AM »
Hi Luke and to all those who want to play the user sounds either in the OP soundcard or in the Benedini mini, and have a fancy radio.

I am spending tons of time and it seems I cannot find a good way to trigger the sounds. Well, at least one that makes me be 100% happy.

PLAN A
My idea is to use a 12pos switch, (I know it has not been implemented yet, for now just 9 positions)

In my radio I have fitted a 6 positions switch, and all the other switches in the radio are 3 positions. So with some programming I did something like this

ELE switch UP, + 6pos0, 6pos1, 6pos2, 6pos3, 6pos4, 6pos5. it selects the sound.
Then when I flick the RUD switch DOWN, and it triggers the previously selected sound. This way I can select and play the first 6 sounds

If I have the ELE switch DOWN, + 6pos0, 6pos1, 6pos2, 6pos3, 6pos4, 6pos5 when ficking the RUD down, it triggers the other 6 sounds but it does work with the Benedini boards.

The problem of this? Every time I move the RUD switch to neutral position, the same undesired sound is triggered. In the case of using the king tiger setup I did, the sound 5 is the one who is triggered.

I attached a pic of the software reading my radio. I think if there was a way when having this in neutral position to detect it like "Off" instead of pos 3 or something similar, it would work.


PLAN B:
The one I used at the beginning, rotating the 6 position switch to the desired position and programing some delay, so I have time to rotate it. Problem is sometimes I dont really know which sound I have selected and it is not very precise.

So can you throw me some light?

Sin título.jpg
Looking for the best way for triggering the user sounds. Sin título.jpg
Views: 3097

*

Offline LukeZ

  • 1255
    • View Profile
  • France
Re: Looking for the best way for triggering the user sounds.
« Reply #1 on: October 19, 2019, 12:34:20 PM »
Hi Rad, to me this sounds more like a transmitter programming issue. But let me see if I understand correctly what you are doing.

In OP Config you have defined two 6-position channels. Presumably each of these positions will trigger a "User Sound X - Play Once" function (for user sounds from 1 through 12).

On your radio you have only a single 6-position switch, but when mixed with your RUD and ELE channels you can actually output 6 positions on two different radio channels (radio channels 14 and 15, assigned to Aux 10 and 11 in OP Config).

I imagine that RUD and ELE are defined as logical switches on the transmitter and don't themselves actually connect to any output channel to the receiver.

Your physical RUD switch is a 3-position switch but you only need it to perform as a 2-position switch (a 2-position momentary would probably be the ideal). What it sounds like to me is that if the unused middle position of the RUD switch is actually triggering a sound, that is an issue in your transmitter programming because your transmitter should actually be ignoring the RUD middle position and only be mixed with your 6-position switch when it gets to the down position.

I would think that the Read Radio function in OP Config should be useful for helping you troubleshoot this. Turning your 6-position switch on the radio should theoretically have no effect on the visual display of Aux 10 and 11 in OP Config. Only when you move the RUD switch down should one of those channels move to a new position (which Aux channel moves will depend on the position of your ELE channel). Does all that seem to work correctly? Are you able to access all 6 positions of both Aux 10 and 11 (confirming that your mix offset amounts are defined correctly)? What happens when you move the RUD channel to the unused middle position - does Aux 10/11 move to an undesired slot?

To answer your other question, whether it is related to your problem or not, OP Config only knows "positions." If you want some position to be "off" or do nothing, then the way to accomplish that is simply don't assign any function to that position. You could remove the function trigger for the sound 5 that you don't want. Of course now you lose that sound 5.

You could also set one of the Aux channels to 7 positions with one of the 7 being the unwanted position that gets triggered when RUD switch is in the middle, leaving you 6 others. But this will require you to modify the mix offsets in your transmitter and I don't really think it gets to the bottom of the problem.

I'd review your transmitter programming and use Read Radio to confirm that your mixes are working correctly.

NO SUPPORT THROUGH PM - Read why
Need a forum account? Read here
Open Panzer FAQs

*

Offline LukeZ

  • 1255
    • View Profile
  • France
Re: Looking for the best way for triggering the user sounds.
« Reply #2 on: October 19, 2019, 12:41:52 PM »
FYI, in case it is of any help, the offsets for multi-switches are hardcoded in the TCB firmware. They are done as you would expect, by dividing the range from 1000uS to 2000uS into however many positions we want.

For a 6-position switch the positions come to:
1000 uS  (Pos 1)
1200 uS  (Pos 2)
1400 uS  (Pos 3)
1600 uS  (Pos 4)
1800 uS  (Pos 5)
2000 uS  (Pos 6)

(Where the positions are reversed if you reverse the channel in OP Config)

Your radio doesn't have to hit those positions exactly. The firmware will read the current channel value and will assign it to whatever position it is closest to. So if for example your channel is at 1480 uS the TCB will read it as Pos 3.

If your channel is at exactly 1500 uS then that is not good, with jitter the TCB will be oscillating back and forth between position 3 and 4. So it is not important that you hit the targets exactly, but that you keep away from the edge cases. Anyway this should be easy to do in your transmitter programming. Most transmitters use percentage offsets so in this case you'd probably define your positions as 0%, 20%, 40%, 60%, 80% and 100% and make sure your endpoints are set to the default 100%.
NO SUPPORT THROUGH PM - Read why
Need a forum account? Read here
Open Panzer FAQs

*

Offline Rad_Schuhart

  • 121
    • View Profile
  • Graz, Austria.
Re: Looking for the best way for triggering the user sounds.
« Reply #3 on: October 19, 2019, 01:46:28 PM »
Hi, you got it right. Plan is to each of those positions triggers one "User Sound X - Play Once" function

ELE is a logical switch that makes me select between the 6 user sounds, and the 6 next. And rudder is just what triggers what I have previosly selected.


I would think that the Read Radio function in OP Config should be useful for helping you troubleshoot this. Turning your 6-position switch on the radio should theoretically have no effect on the visual display of Aux 10 and 11 in OP Config. Only when you move the RUD switch down should one of those channels move to a new position (which Aux channel moves will depend on the position of your ELE channel). Does all that seem to work correctly? Are you able to access all 6 positions of both Aux 10 and 11 (confirming that your mix offset amounts are defined correctly)? What happens when you move the RUD channel to the unused middle position - does Aux 10/11 move to an undesired slot?


You could also set one of the Aux channels to 7 positions with one of the 7 being the unwanted position that gets triggered when RUD switch is in the middle, leaving you 6 others. But this will require you to modify the mix offsets in your transmitter and I don't really think it gets to the bottom of the problem.


Yes, the OP software reading the radio is indeed very useful. It does work correctly, if I move the 6 pos switch, I see the bar moving and the "pos X" changing... The problem is it seems I cannot make any neutral position. I mean, when in neutral the TCB says it is in position 3 and that is the problem, I tried with the push buttons at the back of the radio and multiple mixes and no luck so far.

I attached 3 pics. 1st, real pos 3. 2nd. Neutral (and issue), and 3rd, position 4

I tried the 7 positions trick, but it also does not work because it is either position 3 or position 4.


I am sure it will be a stupid thing that I am overlooking...

If I tell you that today spent about 3 hours struggling with a very strange behaviour with the board, and then I realized it was just low battery... Lol
RealPOS3.JPG
Looking for the best way for triggering the user sounds. RealPOS3.JPG
Views: 1848
neutral.JPG
Looking for the best way for triggering the user sounds. neutral.JPG
Views: 1729
pos4.JPG
Looking for the best way for triggering the user sounds. pos4.JPG
Views: 1665

*

Offline Rad_Schuhart

  • 121
    • View Profile
  • Graz, Austria.
Re: Looking for the best way for triggering the user sounds.
« Reply #4 on: October 19, 2019, 02:08:32 PM »
I am also sure RUD is not triggering any sound per se. And I am sure of it, because I not only tripple checked it, but I also removed everything and started a new model, and new everything and the problem persisted.

The plan is, in case I did not explain myself well enough, I want to select the desired sound with the 6 pos switch, and then to give the order of playing it with any other switch of push button.

It does work, and I managed to do it with the 12 user sounds... The problem was when the trigger switch-push button goes to the off position. Doing that plays user sound 3 once, because it seems there is no like an "off position"

Plan might be to do as you said, select 7 positions, and in the SD card replace the sound 7 with a silence, and when having that trigger button send the signal to trigger that 7th sound... But that means missing one sound, and you all know I love sounds, lol.

Ill keep thinking about it, I am sure we will find a way.

How do you trigger the user sounds?

*

Offline LukeZ

  • 1255
    • View Profile
  • France
Re: Looking for the best way for triggering the user sounds.
« Reply #5 on: October 19, 2019, 03:02:46 PM »
There is a humorous comment that computer programmers will often make when their program isn't working correctly: "I wish my computer would do what I want it to do, not what I told it to do." I believe this is just such a case.

I thought I understood your setup but you lose me when you talk about a "neutral" position. When you define a 6-position switch, there is only just that - 6 positions. The screenshots you posted show this correctly. There is nothing between 3 and 4, there is no "3.5" I don't know how you can get your 6-position switch to even sit between positions, but if you try, the TCB will select either 3 or 4 (it looks like it is leaning towards 3).

If you need something between those two then you need to define a 7 position switch, however I don't know why that is necessary. When you flip the RUD switch down, it should play whatever is selected by your 6-position switch and the ELE combination. When you flip the RUD switch up, you want it to do nothing, but apparently it is triggering some position, which is an issue with your RUD mix.

If you need an extra position that does nothing, define a 7-position switch. You will still get 6 sounds (1-3 and 5-7), so you aren't going to be missing any sounds. And you don't need to create a silent WAV file for position 4 (which will be the middle position), just don't assign position 4 to any function in OP Config. Then when position 4 is triggered, it will do nothing because you didn't tell OP Config to have it do anything.

How do I personally trigger user sounds? Well first off I don't have time to even play with tanks, because I am too busy writing code for tanks. But if I do, I don't even use sound because I don't personally care for them. But if I do use sound, I don't need 12 sounds, so I can just assign them to a simple switch directly with no transmitter mixing.

However I am certain you can get it to work but you need to understand exactly what your radio mix is doing. If the TCB is playing a sound when you don't want it to, that is because your transmitter is telling it to play that sound. You need to figure out why your transmitter is doing "what you told it to do" instead of what "you want it to do."  :D



NO SUPPORT THROUGH PM - Read why
Need a forum account? Read here
Open Panzer FAQs

*

Offline Rad_Schuhart

  • 121
    • View Profile
  • Graz, Austria.
Re: Looking for the best way for triggering the user sounds.
« Reply #6 on: October 19, 2019, 03:36:32 PM »

If you need something between those two then you need to define a 7 position switch, however I don't know why that is necessary. When you flip the RUD switch down, it should play whatever is selected by your 6-position switch and the ELE combination. When you flip the RUD switch up, you want it to do nothing, but apparently it is triggering some position, which is an issue with your RUD mix.

If you need an extra position that does nothing, define a 7-position switch. You will still get 6 sounds (1-3 and 5-7), so you aren't going to be missing any sounds. And you don't need to create a silent WAV file for position 4 (which will be the middle position), just don't assign position 4 to any function in OP Config. Then when position 4 is triggered, it will do nothing because you didn't tell OP Config to have it do anything.


Well, I guess I need to make a video... I do understand what is the radio doing, and also I do understand the mixes quite well. RUD (or whatever switch or push button) triggers the previously selected sound, and it does work, but when I move it back, (or release the button, if it is a push button)  it triggers the user sound 3, because the OP asigns it automatically in position 3. I tested and indeed it seems not possible to program the radio to have a neutral position between 3 and 4...

So I will go deeper tomorrow with the 7 pos switch experiment. I have some ideas and it might do the trick. As you point, the clue is going to be to not to assign anything in the op config to position 4. Some hours of sleep will help me too. I will update!

*

Offline LukeZ

  • 1255
    • View Profile
  • France
Re: Looking for the best way for triggering the user sounds.
« Reply #7 on: October 19, 2019, 04:10:05 PM »
It sounds like your RUD switch doesn't only change the channel to the newly selected position of the 6-position switch, but when you move the RUD switch back, it changes it once again to something else (probably center, which the TCB interprets as position 3).

If possible, just have your RUD mix leave the output at whatever it is. For example, you move the 6-position switch to position 5, trigger it with the RUD switch, so now the channel output goes to position 5, and when you move the RUD switch up leave the output at position 5 until the next time you move it down.

Or, have the RUD mix change to the new position whether you move it up or down. When you go do, it selects the position, when you go up it selects the position. When you select a position you can just leave the RUD switch where it is until next time, then flip it the other way.

Or if a neutral position is required then you will need to create a 7 position switch in OP Config, since that reflects the reality you are transmitting - 6 selection positions plus 1 more position that you don't want to do anything with. In fact, if you really already are transmitting 7 positions then using a 6 position switch in OP Config would probably create even more problems such as the wrong sound being selected, or who knows. The positions are not going to match up so the behavior will be unpredictable.

The more I think about it the more it sounds to me like what you have is actually a 7 position switch.
NO SUPPORT THROUGH PM - Read why
Need a forum account? Read here
Open Panzer FAQs

*

Offline Rad_Schuhart

  • 121
    • View Profile
  • Graz, Austria.
Re: Looking for the best way for triggering the user sounds.
« Reply #8 on: October 20, 2019, 01:44:32 AM »
Sleeping some hours helped. :)

Yes, RUD back was moved the channel to center. Well, in fact is not exactly that, rudder back stopped moving the signal to the desired position, and left the channel centered. The OP software interpreted it as position 3 instead of a neutral position that I thought we could have.


But no problem! The 7 pos switch trick worked. I fixed it with your idea, to not asigning anything to position 4 in the open panzer software. So now I can freely and easily select those 12 user sounds at will! Now is easier to give platoon instructions to other tanks than ever!  ;D

I am using two channels, one for the first 6 user sounds, and another one for the following 6. Once you implement the posibility of having a 12 pos switch I will fit everything in one channel leaving the rest for the other functions.

I am very happy now. Beware evil allies! there is a King Tiger as a platoon commander here! Lol

*

Offline LukeZ

  • 1255
    • View Profile
  • France
Re: Looking for the best way for triggering the user sounds.
« Reply #9 on: October 20, 2019, 03:41:41 PM »
Very good, I'm glad we got it sorted. This was a case where you wanted the computer to recognize 7 positions, but told it to expect only 6. I have done a similar thing many times and pulled my hair out until I finally realized I needed to tell my computer the truth.
NO SUPPORT THROUGH PM - Read why
Need a forum account? Read here
Open Panzer FAQs

*

Offline Rad_Schuhart

  • 121
    • View Profile
  • Graz, Austria.
Re: Looking for the best way for triggering the user sounds.
« Reply #10 on: October 21, 2019, 05:31:32 AM »
Very good, I'm glad we got it sorted. This was a case where you wanted the computer to recognize 7 positions, but told it to expect only 6. I have done a similar thing many times and pulled my hair out until I finally realized I needed to tell my computer the truth.

Yes, no sending signal (neutal, 0) was still recognized like a signal. Even when completely normal this was something different, unexpected and new for me. It seems we can always learn something new... And it also seems once implemented I will need 13 positions instead of 12, Lol.

But what it counts is MY TANK ROCKS! User sounds, sound banks and so on, cant be happier!
As you are well aware, I like the TCB, but the soundcard is a diamond. Some light outputs more, smaller size and it will be unbeatable.

I think RC sellers are missing a big oportunity here. I threw your diagrams and links to a lot of people like for example the metal origin guys (the ones who did the Puma and the SDKFZ 222 and some more,) but no luck so far. I can't understand it.

Ill try to make a better video with all the sounds and features, but as you all know, driving and filming at the same time is not easy.

*

Offline LukeZ

  • 1255
    • View Profile
  • France
Re: Looking for the best way for triggering the user sounds.
« Reply #11 on: October 21, 2019, 09:39:24 AM »
Very good, I'm glad we got it sorted. This was a case where you wanted the computer to recognize 7 positions, but told it to expect only 6. I have done a similar thing many times and pulled my hair out until I finally realized I needed to tell my computer the truth.

Yes, no sending signal (neutal, 0) was still recognized like a signal. Even when completely normal this was something different, unexpected and new for me. It seems we can always learn something new... And it also seems once implemented I will need 13 positions instead of 12, Lol.
I don't want to be too pedantic but all this trouble will be wasted if we don't learn the correct lesson. There is no such thing as "no sending signal" unless you disconnect your receiver. There is also no such thing as sending "0" but even if there was, 0 is still a number and a value. What you call "neutral" we think of as stick center but neutral is only meaningful to humans, it is still a SIGNAL.

All RC signals are represented by a number from 1000 to 2000 (in the old PWM days this was the actual length of the pulse in microseconds, with digital receivers it is just a number but they still use the same range of 1000 to 2000).

No matter what number you send within that range, it is a number and it is a value. You originally told the TCB to expect 6 values but then you also sent it 1500 at the end and wondered why it was playing a sound. 1500 is a signal, it has a number, the TCB has to do something with it. Sending 1500 is not the same as "not sending anything," it is sending something.

Just consider the case where you have a 3-position switch. The three positions will be 1000, 1500 and 2000. Should the TCB think that 1500 doesn't count and just ignore it? No, then you would not have the behavior of a 3-position switch, you would be cheated a whole position! So 1500 is a real signal and just as important as every other number from 1000 to 2000.

I understand you wanted your switch to perform 6 actions, but nevertheless you were literally sending 7 positions to the TCB. So we needed to tell the TCB to expect 7 positions. I hope this is clear for anyone reading this in the future.

NO SUPPORT THROUGH PM - Read why
Need a forum account? Read here
Open Panzer FAQs

*

Offline Rad_Schuhart

  • 121
    • View Profile
  • Graz, Austria.
Re: Looking for the best way for triggering the user sounds.
« Reply #12 on: October 21, 2019, 09:53:16 AM »
Yes, you are 100% right.

The thing is, up to today, I have only looked at the +100, -100, +50 or whatever in the mixes screen. I have never, ever looked at those MS signals because I never needed them at all, and there were no other aftermarket boards mentioning them, so they were completely deleted from my mind.

But of course I was wrong and now lesson learned, and as you said, I hope it helps somebody else.