werckme / werckmeister

An open source Sheet Music MIDI Compiler
http://werckme.github.io/
GNU General Public License v3.0
32 stars 4 forks source link

mod in a phrase will be executed +1 with each iteration #393

Closed SambaGodschynski closed 11 months ago

SambaGodschynski commented 1 year ago

repo

use something like;

jgoodBend = /mod: bend _to=100/ (g r r)4;

expected

the mod will be executed once with every usage

actual

the mod will be executed with every usage once more

grafik

SambaGodschynski commented 11 months ago

this is not really a bug. if you use a phrase like

jgoodBend = /mod: bend _to=100/ (g r r)4;

in a track. it is like adding the same mod with every execution to the same track. a mod applies to every note since it was added

[
{
  >"jgoodBend "1 |
  >"jgoodBend "1 |
}
]

equals

[
{
  /mod: bend _to=100/ ...  -- one bend mod is affecting the track
  /mod: bend _to=100/ ...  -- two bend mods are affecting the track
}
]

consider using modeOnce

or excluding the mod command from the phrase.