[Tiptoi] Pause nach Audio

Mr. Win Man mrwinman at protonmail.com
Mi Nov 19 19:56:32 CET 2025


Das klingt in der Tat exakt nach meinem Problem. Leider existiert die YAML-Datei auf pastebin nicht mehr und das Beispiel scheint nicht (mehr?) zu funktionieren:

Sämtliche P(...) nach J(...) werden ignoriert. Bei:

- $number ==  1 ? $z > 0 ?   $mode:=2 P(z000001a) J(sayZ) P(und)

würde er "und" bei mir also nicht mehr abspielen.


Ziel des ganzen ist, das Lied "99 Bottles of Beer" abzuspielen, also:

99 bottles of beer on the wall,
99 bottles of beer.
Take one down and pass it around,
98 bottles of beer on the wall.

(und so weiter bis)

No more bottles of beer on the wall.

Bei mir klingt es leider eher so:

Ninety... nine... bottles... of beer... on the wall...
Ninety... nine... bottles... of beer...
Take on down and pass it around...
Ninety... eight... bottles... of beer... on the wall...

Wobei "..." ziemlich genau einer Sekunde Pause entspricht.


Der Vollständigkeit halber hier mein Code.

---
product-id: 99
welcome: 5ms
gme-lang: ENGLISH
media-path: ogg/%s
init:
scripts:
  sing_song:
  - $bottles := 99  J(sing_one)
  sing_one:
  - $bottles >= 90? P(ninety)  J(calc_mod)
  - $bottles >= 80? P(eighty)  J(calc_mod)
[...]
  - $bottles > 0?   J(calc_mod)
  - $bottles == 0?  $line==2?  P(no_more) J(sing_bottles)
  calc_mod:
  - $bottles_mod := $bottles  $bottles_mod %= 10  J(sing_two)
  sing_two:
  - $bottles_mod == 9? P(nine) J(sing_bottles)
[...]
  - $bottles_mod == 0? J(sing_bottles)
  sing_bottles:
  - $bottles == 1? P(bottle) J(sing_line)
  - P(bottles) J(sing_line)
  sing_line:
  - $line == 0? P(of_beer) P(on_the_wall) $line+=1 J(sing_one)
  - $line == 1? P(of_beer) P(take) $bottles-=1 $line+=1 J(sing_one)
  - $line == 2? P(of_beer) P(on_the_wall) $line:=0 J(sing_one)
language: en


Und wer es ganz genau wissen/haben will, hier der vollständige Code inkl. Audio-Dateien:

https://gitlab.com/imblickfeld/99bottles/-/tree/37-tiptoi/tiptoi?ref_type=heads


Mehr Informationen über die Mailingliste tiptoi