Author Topic: .41 Request for unloop  (Read 13267 times)

Offline Sam_Zen

  • Extreme artist
  • *****
  • Posts: 3,689
    • http://www.xs4all.nl/~samzen/
.41 Request for unloop
« on: April 06, 2006, 04:08:07 »
While playing back a song, one has the option to make extra sounds via the keyboard with a chosen sample, within a certain octave range. Even with 'record' off.
But if the chosen instrument is a sample, set in a loop, e.g. strings, things get not appropriate.
Once started, it keeps on playing, even after the chosen sample-nr for the keyboard has changed.
The only way to stop the looping sample-sound appears to be to stop the song.
0.618033988

Offline rewbs

  • OpenMPT Developers
  • *****
  • Posts: 578
.41 Request for unloop
« Reply #1 on: April 11, 2006, 19:11:37 »
I can't reproduce this:
- I play a empty pattern.
- I disable recording.
- I press a key and my looped sample sounds.
- I release the key and my looped sample fades as defined by the instrument fade out property, or cuts instantly if I'm not using instruments.

Maybe the sample is fading out very slowly. Try increasing the instrument's fade value to 999.

Offline Sam_Zen

  • Extreme artist
  • *****
  • Posts: 3,689
    • http://www.xs4all.nl/~samzen/
.41 Request for unloop
« Reply #2 on: April 12, 2006, 00:07:08 »
In my reproduction the looped sample keeps on sounding also after releasing the key (this is within playing in the pattern tab). It's even so, that a second hit on another key adds another loop to the running sound.
This all with the fade value on a default 0. Never used this, but after testing it appears that this fadeout is implemented on the loop itself from the start, not as a thing after stopping the sound.

While testing I found a way to stop the sound by setting off/on the loop type in the sample tab.
0.618033988

Offline rewbs

  • OpenMPT Developers
  • *****
  • Posts: 578
.41 Request for unloop
« Reply #3 on: April 12, 2006, 00:13:25 »
Quote from: "Sam_Zen"
This all with the fade value on a default 0.

This behaviour is by design if the fadeout value is 0.  0 means no fade. Higher values mean faster fade. Try 999.
The fade kicks in after releasing the key, at least with IT. Maybe different with XM. Are you using IT or XM?

If that's not the problem, does this happen with all songs? If not can you make a song where it happens available?
Is there anything else you can think of that could explain why I can't reproduce the issue? Do you have envelope loops on your instrument? Releasing the key should send a note off instruction for that instrument. What happens when you release the key when the song is stopped? What happens when the instrument gets a note off from the pattern editor.

NB: if you remove focus from the pattern editor's note column between pressing the key and releasing it, the pattern editor will not receive the not off command so the note will keep playing.

Sorry for the ton of questions but please reply to as many as possible... Since I can't reproduce this, the more info you provide, the better.

Can anyone else reproduce this problem?

Offline Sam_Zen

  • Extreme artist
  • *****
  • Posts: 3,689
    • http://www.xs4all.nl/~samzen/
.41 Request for unloop
« Reply #4 on: April 12, 2006, 00:26:00 »
This is not song-dependent I think. Now I found the trick to stop this process, but before that, the looped sound even went on after I stopped playing back the song or pattern.
0.618033988

Offline LPChip

  • Administrator
  • *****
  • Posts: 5,063
    • http://lpchip.nl
  • Operating System: Windows 10 Pro x64
.41 Request for unloop
« Reply #5 on: April 12, 2006, 08:15:28 »
Quote from: "Sam_Zen"
This is not song-dependent I think. Now I found the trick to stop this process, but before that, the looped sound even went on after I stopped playing back the song or pattern.


Perhaps you have the problem called "sticky keys" where NNA forces a sound to be in a virtual channel where you can't stop it?

Cus I had an ocasion where NNA couldn't be killed with a ^^ anymore. It only happened once to me in .41 and couldn't reproduce it (not really tried tho)
"Heh, maybe I should've joined the compo only because it would've meant I wouldn't have had to worry about a damn EQ or compressor for a change. " - Atlantis
"yes.. I think in this case it was wishful thinking: MPT is makng my life hard so it must be wrong" - Rewbs

Offline rewbs

  • OpenMPT Developers
  • *****
  • Posts: 578
.41 Request for unloop
« Reply #6 on: April 12, 2006, 08:33:28 »
That's possible. Sam Zen, how intermittent or otherwise is your problem?
Does it happen with an empty song?

Offline Sam_Zen

  • Extreme artist
  • *****
  • Posts: 3,689
    • http://www.xs4all.nl/~samzen/
.41 Request for unloop
« Reply #7 on: April 13, 2006, 00:42:05 »
Indeed quite some questions, so my investigation will take some time to create the proper testconditions.

In the meantime I would like to point to a possible root of this problem :
If I choose an instrument with a looped sample while the focus is on the pattern editor, and I press the 'C'-key once,
the sound starts and keeps on doing so. If I then press the 'A'-key, the C-sound continues, while the A is added, running a second loop within the same sample, as can be seen watching the vertical lines in the sample-image.

Shouldn't it be more elegant if the C-loop stops, as soon as the A-key is pressed ?
0.618033988

Offline rewbs

  • OpenMPT Developers
  • *****
  • Posts: 578
.41 Request for unloop
« Reply #8 on: April 13, 2006, 08:29:29 »
Quote from: "Sam_Zen"
I press the 'C'-key once, the sound starts and keeps on doing so. [...]
If I then press the 'A'-key, the C-sound continues, while the A is added [...].
Shouldn't it be more elegant if the C-loop stops, as soon as the A-key is pressed ?


1. I assume you have released the C key before pressing A, else you're effectively asking us to disable support for playing chords!

2. The point of this bug is that normally, the C note would enter its release phase as soon as you let go of the key - i.e. it would fade depending on envelopes etc...

So to answer your question: no, C should not stop when you press A, but when you release C. :)

Quote from: "Sam_Zen"
Indeed quite some questions, so my investigation will take some time to create the proper testconditions.

Ok, sorry. Here's a recap, some of the questions should be quick to answer:

Are you seeing this consistently or intermittently?
Are you using IT or XM?
Does this happen with all songs? [yes]
If not can you make a song where it happens available? [n/a]
Does it happen with empty patterns?
Is there anything else you can think of that could explain why I can't reproduce the issue? Any unusual configuration options?
Do you have envelope loops on your instrument?
What happens when you press and release the key in the pattern editor when the song is stopped? How about in the instrument tab?
What happens when the instrument gets a note off from the pattern editor (i.e. what happens during normal playback when the instrument encounters a tracked note-off)?
If you remove focus from the pattern editor's note column between pressing the key and releasing it, the pattern editor will not receive the not off command so the note will keep playing. Could this be the problem?
Can anyone else reproduce this problem?

Offline Diamond

  • Workaholic artist
  • ***
  • Posts: 271
.41 Request for unloop
« Reply #9 on: April 13, 2006, 17:50:50 »
Quote from: "rewbs"
Can anyone else reproduce this problem?


I can't reproduce this.  It works as expected for me.

Offline Sam_Zen

  • Extreme artist
  • *****
  • Posts: 3,689
    • http://www.xs4all.nl/~samzen/
.41 Request for unloop
« Reply #10 on: April 14, 2006, 02:32:00 »
Wow, a lot of serious questions. In the meantime :

I use XM's. If I talk of key-use in this process I mean 'trigger' keys, not holding down, in the first place.
Part of the problems were mysteriously solved with version .42. A key release stops the looping now.

But still there are oddities. This is the file using as an example, where samples 1 and 2 are set in a loop.
Quite a lot of variables involved here along the sequence of actions while playing, so I need to work this out.
0.618033988

Offline Relabsoluness

  • OpenMPT Developers
  • *****
  • Posts: 709
.41 Request for unloop
« Reply #11 on: April 14, 2006, 13:32:31 »
My experiences testing the provided file with .42 was that when adding notes with instrument 1 without playing the file while doing that, the notes indeed did remain looping, but at first only two first notes remained and the following ended as expected(?), but at some point the behavior changed so that it seemed that all notes remained looping.

Offline rewbs

  • OpenMPT Developers
  • *****
  • Posts: 578
.41 Request for unloop
« Reply #12 on: April 14, 2006, 16:23:31 »
Ok here's what's happening:
. If I open the song, and start playing notes in the pattern editor before playing the song, notes are cut as soon as I let go of the key.
. Pressing play causes some state to change, after which, when releasing a key, the instrument usually stops according to its fade out value. Sam Zen, all instruments in this track have been set to fade out 0, meaning no fade, rather than the default 256. Try setting it to 999, and the instrument will stop when you let of go the key.

There is still a bug here: we should be respecting the fade out value consistently, not intermittently.

Offline Sam_Zen

  • Extreme artist
  • *****
  • Posts: 3,689
    • http://www.xs4all.nl/~samzen/
.41 Request for unloop
« Reply #13 on: April 15, 2006, 01:54:22 »
2 rewbs
What do you mean by "respecting the fade out value consistently, not intermittently" ?

If concerning fade-out value I notice a 'reverse' order. Zero is infinite while a big number means very short.

In the meantime, while testing this, I'm beginning to find advantages in this behaviour.
Because the changes of the fade out value has direct consequences on the realtime playback, it becomes an
extra, useful, control. By the way : value 999 still has a slight fade-out imo.
0.618033988

Offline fisk0

  • Inspired artist
  • **
  • Posts: 84
  • Gender: Male
    • http://medlem.spray.se/fisk0
  • Operating System: Windows 7
.41 Request for unloop
« Reply #14 on: April 15, 2006, 02:00:43 »
Quote from: "Sam_Zen"
2 rewbs
What do you mean by "respecting the fade out value consistently, not intermittently" ?

If concerning fade-out value I notice a 'reverse' order. Zero is infinite while a big number means very short.

In the meantime, while testing this, I'm beginning to find advantages in this behaviour.
Because the changes of the fade out value has direct consequences on the realtime playback, it becomes an
extra, useful, control. By the way : value 999 still has a slight fade-out imo.


I usually use 4000 as fadeout value to have and somewhat instant stop. Havent tested what's the upper limit, but I'd guess it's around 10000.