Multiple trloop.wav issiue

I want to use a trloop for special ability 1and 2 others for special ability 2

Problem 1 - when having a trloop folder with multiple trloop sounds i get a error in font directory

Problem 2 - when having trloop00 and trloop01 both in the main folder with this config, nothing plays

{ "Test3;common",  "Test3/tracks/Songs.wav",
StylePtr<Layers<
Layers<
  Red,
  TransitionEffectL<TrDoEffect<TrInstant,EFFECT_SOUND_LOOP,0>,EFFECT_USER1>,
  TransitionEffectL<TrDoEffect<TrInstant,EFFECT_SOUND_LOOP,1>,EFFECT_USER2>,
  InOutTrL<TrInstant,TrInstant>>
>>(),
},

Sounds like an issue with the sound files themselves, either set up should work fine. trloop is an effect sound just like all the others. I would use 'effects" command in Serial Monitor to decipher the issue.

Just note, Sound Loop is a toggled sound, so in your set up if you trigger one effect it will run until the next Sound Loop is triggered, it doesn’t matter which. So if one is playing you have to trigger one to stop the initial loop and then another to start the next sound, then same thing again.

All 3 sounds were separately tested named as trloop00 and
TransitionEffectL<TrDoEffect<TrInstant,EFFECT_SOUND_LOOP,0>,EFFECT_USER1>
Result - all 3 worked

Trloop00 and trloop01 in the main folder with
TransitionEffectL<TrDoEffect<TrInstant,EFFECT_SOUND_LOOP,0>,EFFECT_USER1>
TransitionEffectL<TrDoEffect<TrInstant,EFFECT_SOUND_LOOP,1>,EFFECT_USER2>
Result - works

A trloop00 folder with trloop00 and trloop01 and a single
TransitionEffectL<TrDoEffect<TrInstant,EFFECT_SOUND_LOOP,0>,EFFECT_USER1>
Result - error in font directory
Serial monitor

I2C init..
Motion chip ... 106 found.
EVENT: Stab millis=1311
Unmounting SD Card.
Amplifier off.
EVENT: Aux-Pressed#1 millis=4735
EVENT: Aux-Pressed millis=4735
EVENT: Aux-Released#1 millis=4815
EVENT: Aux-Released millis=4815
EVENT: Aux-ShortclicWelcome to ProffieOS v7.15
For available serial commands, see:
https://pod.hubbe.net/tools/serial-monitor-commands.html
Found trloop files: 0-0 using 2 digits SOME FILES ARE MISSING! 1 != 0 in 
Found out files: 1-4 using 2 digits in subdirs in Test2
Found in files: 1-5 using 2 digits in subdirs in Test2
Done listing effects.
Booster off.

It’s saying you have two files named “00”, obviously check that. Then I would say backup the files, reformat the SD and put the files back. If you changed a file from 00 to 01 it’s possible somethign corrupted on the SD.

most likely it, i was testing with 3 trloops and it has problems there too

Yea, changing filenames or moving things around on the SD itself can cause issues. I always make my edits on the computer and then do a fresh upload to the SD after reformatting. Takes away the chance of corrupted files or directories.

reflashed the sd

i have trloop01, trloop02, trloop03
TransitionEffectL<TrDoEffect<TrInstant,EFFECT_SOUND_LOOP,1>,EFFECT_USER1>
TransitionEffectL<TrDoEffect<TrInstant,EFFECT_SOUND_LOOP,2>,EFFECT_USER2>
TransitionEffectL<TrDoEffect<TrInstant,EFFECT_SOUND_LOOP,3>,EFFECT_USER5>

user 1 plays trloop02
user 2 plays trloop03
user5 is silent
it also says font directory not found

serial
Activating polyphonic font.
No sounds found: boot
I2C init..
Motion chip ... 106 found.
EVENT: Stab millis=1346
Unmounting SD Card.
Amplifier off.
Welcome to ProffieOS v7.15
For available serial commands, see:
https://pod.hubbe.net/tools/serial-monitor-commands.html
Booster off.
Found trloop files: 0-3 using 2 digits in Test3
Found out files: 1-1 using 2 digits in subdirs in Test3
Found in files: 1-1 using 2 digits in subdirs in Test3
Done listing effects.

Are you on 7.15? I recall a bug in earlier versions on some of the controls for Special Ability 5 ~ 8 that were resolved with 7.15.

https://fredrik.hubbe.net/lightsaber/proffieos.html

i am on 7.15 v2.2
renaming the trloops 00 01 and 02, aswell as messing with the special abilities doesnt help

This sounds like a new issue on the SD, try 'effects" again in Serial Monitor.

forgot to mention font directory not found persits, right now the trloops are 00 01 and 02

I2C init..
Motion chip ... 106 found.
EVENT: Stab millis=1294
Unmounting SD Card.
Amplifier off.
Booster off.
Welcome to ProffieOS v7.15
For available serial commands, see:
https://pod.hubbe.net/tools/serial-monitor-commands.html
Found trloop files: 0-2 using 2 digits in subdirs in Test3
Found out files: 1-1 using 2 digits in subdirs in Test3
Found in files: 1-1 using 2 digits in subdirs in Test3
Done listing effects.
Battery voltage: 0.31

I think it’s because you are missing hum which is required for fonts.

I would add a visual effect to each so you can see the effect trigger. It could be that the effect isn’t triggering.

That or you can view in Serial Monitor to see if there’s an error coming when trying to trigger.

adding hum did not resolve font directory not found
serial

I2C init..
Motion chip ... 106 found.
EVENT: Clash millis=1298
EVENT: ?47 millis=1360
EVENT MENU TURN RIGHT
Unmounting SD Card.
Amplifier off.
Welcome to ProffieOS v7.15
For available serial commands, see:
https://pod.hubbe.net/tools/serial-monitor-commands.html
Booster off.
Found trloop files: 0-2 using 2 digits in subdirs in Test3
Found out files: 1-1 using 2 digits in subdirs in Test3
Found in files: 1-1 using 2 digits in subdirs in Test3
Found hum files: 1-1 using 2 digits in Test3
Done listing effects.

atempting user5

EVENT: Power-Pressed#1 millis=19081
EVENT: Power-Pressed millis=19081
EVENT: Power-Held#1 millis=19382
EVENT: Power-Held millis=19382
EVENT: ?47 mods Power millis=19522
EVENT MENU TURN RIGHT
EVENT: ?47 millis=19809
EVENT MENU TURN RIGHT
Battery voltage: 0.31
EVENT: Power-Released#1 millis=20033
EVENT: Power-Released millis=20033
EVENT: ?48 millis=20223
EVENT MENU TURN LEFT
EVENT: ?48 millis=21036
EVENT MENU TURN LEFT

user 1 on

EVENT: Power-Pressed#1 ON millis=53219
EVENT: Power-Pressed ON millis=53219
EVENT: Power-Held#1 ON millis=53520
EVENT: Power-Held ON millis=53520
EVENT: ?47 mods Power ON millis=53559
EVENT MENU TURN RIGHT
NULL POINTER! @800D9F1
unit = 1 vol = 0.50, Playing Test3/trloop/trloop01.wav
channels: 1 rate: 44100 bits: 16
EVENT: Power-Released#1 ON millis=54068
EVENT: Power-Released ON millis=54068
EVENT: ?48 ON millis=54219
EVENT MENU TURN LEFT

user 1 off

EVENT: Power-Pressed#1 ON millis=83804
EVENT: Power-Pressed ON millis=83804
EVENT: Power-Held#1 ON millis=84105
EVENT: Power-Held ON millis=84105
EVENT: ?47 mods Power ON millis=84234
EVENT MENU TURN RIGHT
End Wav Player
EVENT: ?47 ON millis=84446
EVENT MENU TURN RIGHT
EVENT: Power-Released#1 ON millis=84723
EVENT: Power-Released ON millis=84724
EVENT: ?48 ON millis=84793
EVENT MENU TURN LEFT
EVENT: ?48 ON millis=84931
EVENT MENU TURN LEFT

user 2 on

EVENT: Power-Pressed#1 ON millis=8486
EVENT: Power-Pressed ON millis=8486
EVENT: Power-Held#1 ON millis=8787
EVENT: Power-Held ON millis=8787
EVENT: ?48 mods Power ON millis=8847
EVENT MENU TURN LEFT
NULL POINTER! @800D9F1
unit = 1 vol = 0.50, Playing Test3/trloop/trloop02.wav
channels: 1 rate: 44100 bits: 16
EVENT: Power-Released#1 ON millis=9801
EVENT: Power-Released ON millis=9802
Battery voltage: 0.33

user 2 on/off

EVENT: Power-Pressed#1 ON millis=67109
EVENT: Power-Pressed ON millis=67109
EVENT: ?48 mods Power ON millis=67351
EVENT MENU TURN LEFT
End Wav Player
EVENT: Power-Released#1 ON millis=67448
EVENT: Power-Released ON millis=67448
EVENT: ?48 ON millis=67514
EVENT MENU TURN LEFT
EVENT: ?47 ON millis=67823
EVENT MENU TURN RIGHT
EVENT: ?47 ON millis=68066
EVENT MENU TURN RIGHT
EVENT: Power-Pressed#1 ON millis=71114
EVENT: Power-Pressed ON millis=71114
EVENT: Power-Released#1 ON millis=71256
EVENT: Power-Released ON millis=71256
EVENT: Power-Shortclick#1 ON millis=71256
unit = 1 vol = 0.50, Playing Test3/in/in01.wav
channels: 1 rate: 44100 bits: 16
No sounds found: pstoff
Unmounting SD Card.
Amplifier off.
Booster off.

Doesn’t look like User5 is triggering, I’d try a different ability?

ill fiddle around with tests a bit later
thanks for the help so far

You’re welcome. Good luck.

having a common folder solved missing font directory (i think)

TEST 1
trloop01
TransitionEffectL<TrDoEffect<TrInstant,EFFECT_SOUND_LOOP,1>,EFFECT_USER1>
Result - works

TEST 2
alt000, alt001
TransitionEffectL<TrDoEffectAlwaysX<TrInstant,EFFECT_ALT_SOUND,ModF<Sum<AltF,Int<1>>,Int<10>>>,EFFECT_USER5>
Result - works as intended

TEST 3 and 4
trloop01 trloop02
(in test 4 i swaped the trloops - trloop01 became trloop02 and vice versa)
TransitionEffectL<TrDoEffect<TrInstant,EFFECT_SOUND_LOOP,1>,EFFECT_USER1>
TransitionEffectL<TrDoEffect<TrInstant,EFFECT_SOUND_LOOP,2>,EFFECT_USER2>
Result - both user 1 and user 2 play trloop02

TEST 5
trloop01
TransitionEffectL<TrDoEffect<TrInstant,EFFECT_SOUND_LOOP,1>,EFFECT_USER5>
Result - nothing happen

TEST 6 and 7
trloop01 trloop02 trloop03
(test 7 is same logic as test 4 - 01 became 03, 02 became 01 and 03 became 02)
TransitionEffectL<TrDoEffect<TrInstant,EFFECT_SOUND_LOOP,1>,EFFECT_USER1>,
TransitionEffectL<TrDoEffect<TrInstant,EFFECT_SOUND_LOOP,2>,EFFECT_USER2>,
TransitionEffectL<TrDoEffect<TrInstant,EFFECT_SOUND_LOOP,3>,EFFECT_USER5>
Result - user1 plays trloop2, user2 plays trloop03, user3 nothing happens

TEST 8
adding a trloop04 and no corresponding code in test7 had no effect

TEST 9
having a trloopNN folder with any number of trloop causes error in font directory

here is a serial from test7, i first try user5, no sound like always, then user1 and user2 follow

EVENT: Power-Pressed#1 millis=46766
EVENT: Power-Pressed millis=46766
EVENT: Power-Held#1 millis=47067
EVENT: Power-Held millis=47067
EVENT: ?47 mods Power millis=47176
EVENT MENU TURN RIGHT
EVENT: Power-Released#1 millis=47559
EVENT: Power-Released millis=47559
EVENT: Power-Pressed#1 millis=51168
EVENT: Power-Pressed millis=51168
EVENT: Power-Released#1 millis=51355
EVENT: Power-Released millis=51355
EVENT: Power-Shortclick#1 millis=51355
EVENT: Power-Shortclick millis=51355
Ignition.
unit = 0 vol = 0.00, Playing Test7/hum01.wav
channels: 1 rate: 44100 bits: 16
unit = 1 vol = 0.50, Playing Test7/out/out01.wav
channels: 1 rate: 44100 bits: 16
humstart: 100
Playing Test7/hum01.wav
channels: 1 rate: 44100 bits: 16
EVENT: Power-Pressed#1 ON millis=53265
EVENT: Power-Pressed ON millis=53265
Playing Test7/hum01.wav
channels: 1 rate: 44100 bits: 16
EVENT: Power-Held#1 ON millis=53566
EVENT: Power-Held ON millis=53566
EVENT: Power-Released#1 ON millis=53872
EVENT: Power-Released ON millis=53872
EVENT: Power-Longclick#1 ON millis=53872
EVENT: Power-Longclick ON millis=53873
No sounds found: force
Playing Test7/hum01.wav
channels: 1 rate: 44100 bits: 16
Playing Test7/hum01.wav
channels: 1 rate: 44100 bits: 16
EVENT: Power-Pressed#1 ON millis=55539
EVENT: Power-Pressed ON millis=55539
EVENT: Power-Held#1 ON millis=55840
EVENT: Power-Held ON millis=55840
EVENT: ?47 mods Power ON millis=56064
EVENT MENU TURN RIGHT
NULL POINTER! @800D5DD
unit = 1 vol = 0.50, Playing Test7/trloop02.wav
channels: 1 rate: 44100 bits: 16
EVENT: Power-Released#1 ON millis=56410
EVENT: Power-Released ON millis=56410
Playing Test7/hum01.wav
channels: 1 rate: 44100 bits: 16
EVENT: ?48 ON millis=56863
EVENT MENU TURN LEFT
Playing Test7/hum01.wav
channels: 1 rate: 44100 bits: 16
Playing Test7/hum01.wav
channels: 1 rate: 44100 bits: 16
Playing Test7/hum01.wav
channels: 1 rate: 44100 bits: 16
Battery voltage: 0.26
EVENT: Power-Pressed#1 ON millis=60006
EVENT: Power-Pressed ON millis=60006
EVENT: Power-Held#1 ON millis=60308
EVENT: Power-Held ON millis=60308
Playing Test7/hum01.wav
channels: 1 rate: 44100 bits: 16
EVENT: ?47 mods Power ON millis=60561
EVENT MENU TURN RIGHT
End Wav Player
EVENT: Power-Released#1 ON millis=60801
EVENT: Power-Released ON millis=60801
EVENT: ?48 ON millis=61219
EVENT MENU TURN LEFT
Playing Test7/hum01.wav
channels: 1 rate: 44100 bits: 16
EVENT: Power-Pressed#1 ON millis=62164
EVENT: Power-Pressed ON millis=62164
EVENT: ?48 mods Power ON millis=62429
EVENT MENU TURN LEFT
NULL POINTER! @800D5DD
unit = 1 vol = 0.50, Playing Test7/trloop03.wav
channels: 1 rate: 44100 bits: 16
Playing Test7/hum01.wav
channels: 1 rate: 44100 bits: 16
EVENT: ?48 ON millis=62796
EVENT MENU TURN LEFT
EVENT: Power-Released#1 ON millis=62997
EVENT: Power-Released ON millis=62997
Playing Test7/hum01.wav
channels: 1 rate: 44100 bits: 16
EVENT: ?47 ON millis=63633
EVENT MENU TURN RIGHT
Playing Test7/hum01.wav
channels: 1 rate: 44100 bits: 16
EVENT: Power-Pressed#1 ON millis=64683
EVENT: Power-Pressed ON millis=64683
EVENT: Power-Held#1 ON millis=64984
EVENT: Power-Held ON millis=64984
EVENT: ?48 mods Power ON millis=65110
EVENT MENU TURN LEFT
End Wav Player
EVENT: Power-Released#1 ON millis=65245
EVENT: Power-Released ON millis=65245
Playing Test7/hum01.wav
channels: 1 rate: 44100 bits: 16
EVENT: ?47 ON millis=65997
EVENT MENU TURN RIGHT
Playing Test7/hum01.wav
channels: 1 rate: 44100 bits: 16
EVENT: Power-Pressed#1 ON millis=67055
EVENT: Power-Pressed ON millis=67055
EVENT: Power-Released#1 ON millis=67240
EVENT: Power-Released ON millis=67240
EVENT: Power-Shortclick#1 ON millis=67240
unit = 1 vol = 0.50, Playing Test7/in/in01.wav
channels: 1 rate: 44100 bits: 16
No sounds found: pstoff
Unmounting SD Card.
Amplifier off.

Some of these experiments make sense, some do not.
In particular, I’m not sure why sometimes no sound plays.

In generaly, you want to use 0 with TrDoEffect to play the first sound.
That means that even if the sounds are named trloop07.wav, trloop08.wav, and trloop09.wav, you still need to use 0, 1 and 2 when calling TrDoEffect. (0 will play trloop07.wav, 1 will play trloop08.wav and 2 will play trloop09.wav) In general, the code is written so that if you use a number that is bigger than the number of available files, it should play the last file, so I’m not sure why some TrDoEffect calls don’t play anything for you, might be a bug and if so we should figure that out and fix it.

Now, if you want to make it simple and have the file numbers line up with the numbers you give TrDoEffect, then you should use trloop00.wav, trloop01.wav, etc.

This makes sense, because trloopNN/* isn’t a supported file path.
You can use trloop/NNN.wav, or trloop/trloopNN.wav, or even trloop/NN/trloopXX.wav, but trloopNN/... is not supported.

more info: ProffieOS Documentation: Sound Font Configuration
(If you actually want to use that last one, make sure to read this page: ProffieOS Documentation: Sub-sub sounds)

I will give up on having more than 1 trloop and will just use the track player instead, not sure why proffie behaves this way, hopefully someone else figures it out.

Thanks for all the help to both of you

I recommend adding some kind of visual effect to this transition so you can confirm it triggered. It seems like USER5 is the common thread so giving it a visual cue will confirm you’re doing the control to trigger.

Also type ‘version’ in Serial Monitor and let’s get a look at the output. This really feels like an older OS7 bug so let’s confirm you’re on the latest version.