HomSpace Forum
Mutegroups and Same Note Retrigger - Printable Version

+- HomSpace Forum (https://homspace.nl/forum)
+-- Forum: SamplerBox (https://homspace.nl/forum/forum-1.html)
+--- Forum: Community (https://homspace.nl/forum/forum-2.html)
+--- Thread: Mutegroups and Same Note Retrigger (/thread-12.html)

Pages: 1 2


Mutegroups and Same Note Retrigger - Ken - 20-02-21

Greetings,

Before I go to work trying to solve an issue that doesn't exist, I was curious to see if anyone else had a configuration they are using that achieves this result:
I am trying to get a sample that is a part of a mute group to self-mute and re-trigger.

Code:
%%release=0
%%mode=once
%%retrigger=Y
*%midinote.wav,%mutegroup=1

Here the mute group works mostly as I intend. 

Each midi note will play its sample to the end unless another midi note is played (%%mode=once).
A given midi note will choke every note that is different (*%midinote.wav,%mutegroup=1)

If the same midi note is played consecutively, however, the same sample will stack and continue to keep playing.
I have experimented with permutations of different re-trigger modes along with different damp and release settings, but they don't quite get there.

I just wanted to see if someone had a creative definition file solution, before I try editing the samplerbox.py file.


RE: Mutegroups and Same Note Retrigger - hansehv - 20-02-21

Hi Ken,
...deleted this first part of my answer as I jumped to the wrong conclusion...

Suggestion for bypass: if you need %%retrigger=Y for the complete set, but with some individual samples part of a mutegroup: just add %retrigger=N explicitely on these individual lines.

Additional questions as I'm puzzled by the mode=once+triggernotes=yes in combination with a mutegroup:
  • is this definition part of a percussion/drum set containing a hihat?
  • why do you want self mute and retrigger - this contradicts as it says "mute and play" which I interpret as "I want no sound but I want it"
  • this in combination with mode=once, which says "keep playing after note-off"
To clarify:
  • A mutegroup means that a new note (or chord) stops the previous one and plays the new one (or chord). If you play the same note, it will mute itself withou starting a new one.
  • Retrigger means that when the same note is played again, the previous (same) one is allowed to finish (either via release or via playing to end via mode=once).
  • Mode=once means that the complete sample will be played and when you play it again before it's finished, the new one takes over by ending the previous and play the new one (with mode=onc2 it will stop at that second press).
Combination of this is what's going on here, which I think is exactly what your parameters say. As they are ambigious indeed, we have a puzzling issue here. The mode=once is honoured.
If you want suggestions for the definition.txt I need some more info on what musical effect you want to achieve.
Same goes for bug-fixing if that's at stake now; I can't tell now as I don't understand yet what you want.


RE: Mutegroups and Same Note Retrigger - hansehv - 21-02-21

..so perhaps onc2 is what you're looking for...


RE: Mutegroups and Same Note Retrigger - Ken - 21-02-21

Your original explanation of the mute group implementation made sense.  The way the combination functions is fine.

I think the effect I was looking for is most prevalent in hip hop and vocal sample-based electronic music.  Basically a note repeat for longer samples.  I tried to think of a good example of this effect and the beginning of Fatboy Slim - Gangster Trippin' was the first thing that came to mind for some reason. Big Grin  




(21-02-21, 01:27)hansehv Wrote: ..so perhaps onc2 is what you're looking for...

onc2 would mean hitting the note twice in order to trigger the sample a second time.  If you wanted to trigger the sample 2 or more times in a short interval, it would require lots of taps. Big Grin

I don't think it's a large issue considering there are a lot of different use cases for Samplerbox.  It's not going to cover every case perfectly.  One easy work around is to map the same sample to two adjacent midi notes and just alternate to achieve the "note repeat" effect.  %rnds is another possible way to achieve similar results.  I was just asking to see if someone found something I missed.


RE: Mutegroups and Same Note Retrigger - noek - 22-02-21

Hi Ken,
OK, maybe I can help or inspire you as we use various repeating samples in our group.

First of all, the retrigger feature you use is mainly for making natural instruments sound more "fat" by mimicking a resonance box (the body of a guitar, the woodwork of piano etc). Not fit for the hip hop way of using samples.

In mode=once/onc2 you can repeat, but it has disadvantages (fixed length, so you need to stop or restart in artificial/inconvenient ways ... as you noticed).
Because... a loop is loop, not a onetime sample.
So you have create samples with loop markers. The "more info" page spends quite some words on it so I won't do that now, please read that first.

Once you have good looping samples, you can create drones, background vocals, guitar riffs, drum grooves, whatever. For the drone, you also find an example in the demo set Hans supplies (but it's below as well).

Now it's time to play with loop/loo2, mutegroups, notefill and making exceptions via fixed notes.

Given your idea in your post, I thought of loo2 in combination with mutegroup.
You can have drones/tones and/or vocals ("Yeah, Yeah, ....") to repeat, change tone if needed and stopped by pushing same key a second time. Working snippet (so with more some more parameters not relevant here) of a drone and background vocal:
Code:
%%voice:2=PipeOrg-monoloop
%%voice:6=Talking test
Principal8-%midinote*.wav,%voice=2,%gain=4,%mutegroup=2,%transpose=-24,%mode=loo2,%velmode=sample,%release=60
talking%rnds.wav,%notename=C4,%voice=6,%gain=1.0,%mutegroup=7,%velmode=sample,%mode=loo2
Here the pitch of the samples will change as %fillnote=Y (default). For background vocals this can be an issue as also the tempo changes. In this example we want this tempo effect for the song where we use it (talking at different pace...)
And if you want a scratch like "stutter effect", for instance have the "talking" lyric to go like "ta-ta-ta-talking", you can define a fixed override:
Code:
talking%rnds.wav,%notename=C#4,%voice=6,%gain=1.0,%mutegroup=7,%velmode=sample,%mode=loo2,%fillnote=N
That way, when you press C,C#,C,C# consecutive, the same sample will be restarted ("retriggered", it's a confusing term in this discussion).
Of course this extra note is not necessary without mutegroups,

If you have programmable drum pads, I think you can have even a more convenient solution via %mode=loop.


RE: Mutegroups and Same Note Retrigger - Ken - 03-03-21

(22-02-21, 00:05)noek Wrote: Hi Ken,
OK, maybe I can help or inspire you as we use various repeating samples in our group.

First of all, the retrigger feature you use is mainly for making natural instruments sound more "fat" by mimicking a resonance box (the body of a guitar, the woodwork of piano etc). Not fit for the hip hop way of using samples.

Thanks for the detailed reply.  I don't think I used a good example, as I am looking at accomplishing something less comprehensive than what you outlined.
Here's my thought process based on the documentation, without it being tied to a type of music.

Code:
%mode
the way that the box handles note-off and loop markers:
- once "Playback": play sample from start to end ignoring standard note-off.

Pressing a key will send a note-on message and will start playback from the beginning of the sample.
Releasing that key will send a note-off message, but it will be ignored.

Code:
%retrigger
What happens when same note is played again:

R Noteoff, fadeout according release time value.
D Noteoff, fadeout according damp time value.
Y Yes, retrigger is allowed, keep the playing sound

If retrigger is "Y", pressing a key will send a note-on message and will start playback from the beginning of the sample.
Releasing that key will send a note-off message, but it will be ignored.
Pressing the same key while the sample is playing will send a note-on message and will start playback from the beginning of the sample.
Any previous playback will continue until the sample ends.

I understand now why setting retrigger to "Y" results in instances of the sample playing at once.
I introduced a mutegroup into the configuration in an attempt to stop the previous instance of the sample.
I thought perhaps the key/note would "see" itself as a part of the same group and stop itself.
It makes sense why this doesn't work the way I initially thought.  So let's forget setting retrigger to Y.

If retrigger is "R", pressing a key will send a note-on message and will start playback from the beginning of the sample.
Releasing that key will send a note-off message, but it will be ignored.
Pressing the same key will the sample is playing will send a note-on message and will start playback from the beginning of the sample.
If a previous instance of playback was playing, that previous instance will fade out according to the release time value.

When working with a release of %%release=1, %%retrigger=R, and %%once, I can achieve the desired behavior when I press the key/note twice.
I press a key and the sample plays.  If I press the same key again, a second instance of the sample will start.  And the first instance will fade out immediately (like a note-off message because of %%release=1).
This makes sense given the documentation, and I didn't have to use a mutegroup.  SUCCESS!

Unfortunately the behavior only works if the sample is triggered/played twice.  I can trigger the sample twice quickly.  Or I can trigger the sample once, wait for a few seconds, and then trigger it a second time.
As soon as I attempt to trigger the sample a third time, the samples begin to "stack" again.
If I have to guess, this is because the %release fade out is implemented?  I'll think about it some more.


RE: Mutegroups and Same Note Retrigger - noek - 03-03-21

Hi Ken,

Retrigger is for the handling of the release of an already "past" note, mimicking the body / resonance box of an acoustic instrument. You can also use it to have same sounds play together, but they won't influence=trigger each other. So this naming is confusing, I assume Hans meant that the sensor=key is triggered again - because it affects the way that the previous sound triggered again by that same sensor is dealt with - can it go till it's "natural end", or does it have a "note-off" like release, or is it damped.

Am I correct that you want to have a sound continuing until another sound starts and have it all stopped when the last sound is repeated?
%mode-loo2 and %mutegroups do exactly this.
loo2 will continue until second keypress and the mutegroup artificially performs that second keypress when another note is started in the same group.
The "talking" example works that way (forget all the other parameters there..)
Your samples do need loop markers of course. With %release you can control how sounds mix in each other when switch from one to another.


RE: Mutegroups and Same Note Retrigger - Ken - 04-03-21

(03-03-21, 21:59)noek Wrote: Hi Ken,

Am I correct that you want to have a sound continuing until another sound starts and have it all stopped when the last sound is repeated?
%mode-loo2 and %mutegroups do exactly this.

I am not attempting to incorporate any type of looped sample.

The desired behavior:

- when key is pressed, sample plays from beginning to end.
- if same key is pressed during sample playback, the sample stops playing.  Then the sample plays from beginning to end.


RE: Mutegroups and Same Note Retrigger - hansehv - 04-03-21

Hi Ken,
Now I understand.. so did a quick test: Sad 
What you want is how I intended it originally and also worked.
# don't stop, play sample at full length (unless restarted)
Looking at the code I think functionality got lost when adding support for backtracks.
Much words for: you found a bug, so thanks for reporting.
I'll take a look if it's possible to fix.
Hans


RE: Mutegroups and Same Note Retrigger - hansehv - 05-03-21

Hi Ken,
A bug indeed, too enthousiastic housekeeping  Big Grin
Replace line 53 in modules/audio.py:
            if e.sound.stopmode==3 or e.sound.stopmode==-1:    # keep track of backtrack/once status
            if e.sound.stopmode==3:    # keep track of backtrack status

Other options:
  • wait till next release: I'm preparing it and will include this fix.
  • use the fixed key trickery noek proposed, inspiring for other use too
Regards, Hans