Suppress Duplicate Same Note trigger

I might be a little greedy here, but I did have another idea to get the right triggers for my installation.
For that I wouldn’t need a translation like the one before but the following:
Every different note sent from the controller would reach its destination only once, so if a note is sent again it would not come through (every duplicate of a note is filtered out). This way a note could trigger a sample but not trigger it again or stop it when the controller sends the note again (since more pressure on the controller sends a higher note and less pressure a lower one, the pitch of the controller output goes up when the surface is touched and then back down when released, producing roughly the same notes on the way back.)

Hi, since this is a different question, I moved it to a new thread.

The attached will look at last note-on message and if sent again will suppress additional note-on messages until a different note is sent.
Note-Off messages are handled normally but I’m not sure if that is what you want. I did this so that you wouldn’t get stuck with hung notes.

What we do for note-on if compare it with the last note-on message (which is stored in global variable “ga”). If it is the same note as last pressed then the outgoing note-on action is not executed.
// incoming is pp, compare with last note
if pp==ga then exit rules, skip Outgoing Action
// now set it for next iteration
ga=pp

Only-One-Note-On.bmtp (1.3 KB)

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

Thank you, that is definitely useful if the output would be for instance c3 c3 e3.
However: the controller might output for instance:
c3 e3 c3 or
c3 e3 c4 d4 e3 c3.
In both cases the 2nd c3 would have to be filtered out to avoid retriggering the sample
and in the 2nd example both the second c3 and second e3 would have to be blocked.
The way I understand it that would not be the case in this script.

What is the message that you would want to unblock the re-triggering of a given note?

Hmm, i didn’t think about that.

To clarify the practical situation where i would be using this:
I use Ableton Live and for this example i would be triggering clips.
my touch sensitive controller is sending a range of notes with pitch that depends on the amount of current generated, going up and down ( let’s say c3 to c5) (the controller is connected to a glass wall with conductive material on it that is touched on both sides by people ) . A few of these notes trigger a sample ( lets say c3 e3 g3 c4 e4), the rest does nothing.
Each sample should be triggered only once, so if a note is generated again it should not reach the clip.
Then a second set of people approach the wall and engage the controller.
the controller will output within the same range of notes, but i will have chosen a different set of samples.

Between the first and second experience the blocked notes need to be be unblocked, like you say.

Could I use a different controller to send a midi note (to the BOME script) outside of the range that the controller sending the touch information is putting out to do that?

For instance something in the first octave will never be used

Hi, you can use any MIDI message as a signal to unblock the notes. It doesn’t matter if it is on a different port (controller) or just a different note or channel on the same control source as long as the unblocking signal is unique. How many notes are we talking about here as each note would need to be captured (then blocked) and then released upon the designated unblocking event.

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

So if I understand correctly it is not possible to have one midi message to unblock everything: a general unblocking message?

I think we would be talking about 5 or so notes spread out over the range that can be generated by the controller, each triggering a different sample that creates a new layer in a soundscape.

Yes, it is possible, you just have to define the MIDI message you want to release the hold on the notes.

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

This might be closer to what you want.
Here I capture a bit map of incoming notes (any octave). If a given note has sounded already, I suppress it until the lowest note (note 0) is played which allows the notes to be played again. Note off messages always get through.
Here are the commented rules:
// clear the bitmap on lowest note - reenable output
if pp==0 then ga=0
if pp==0 then Goto “Done”

//get note number into one octave bitmap
// convert all notes to single octave 0-12 this is a MOD operator
oo=pp%12
// Shift into a bitmap in local variable rr
rr=1<<oo
// rr now contains the bit
// AND it with ga to see if the bit has already sounded
qq=ga&rr
// if non-zero then it already sounded so do not output it
if qq!=0 then exit rules, skip Outgoing Action
// set it so next time it will not sound
// add it to the bit map
ga=ga|rr

Label “Done”

// suppress the re-enable note
if pp==0 then exit rules, skip Outgoing Action

And here is the example project file:
Only-One-Note-On-Per-Octave.bmtp (2.0 KB)

Since you didn’t specify which notes for clips, I just bitmapped all notes in the scale to any octave so for instance if you press C3 then C1 C2 C4 etc will also be suppressed until you hit the lowest note on the keyboard. Consequently all clips that you whant to trigger should have a different unique note no matter what octave you are using.

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

Hi Steve,

First, thank you, it’s amazing to me that you answer all my questions with so much attention.
The last .bmtp you wrote for me was a bit over my head; I was able to understand and edit the ones you sent me before, but the last one I could only load and connect to my Ableton project.
It didn’t filter out any notes as far as I can tell, so I probably missed something, but I can’t tell what it is:
I loaded the .bmtp as it’s written, set the input port to the touchme controller -like in the projects before that did work- and the output to the Bome virtual out, also like before, with that port as “midi from” for the appropriate tracks in Ableton.
The result is the same as when I directly connect the Touch me as " midi from": clips are triggered when the trigger note first passes (=what we want) and stopped when it passes again (=what we are trying to avoid)

I can now specify which notes for clips in the current state of the project: : E2, F#3 and G#4.
Would it be possible for to write something with those notes and a possibility for me to edit those notes is needed and perhaps add one or two on my own? If the rules are similar I suppose I could manage that…

And what if we block all note off messages?

The way it is written, everything should be blocked unless you added a MIDI thru path. Any C on your keyboard (any octave) will unblock the notes from passing through so as long as you don’t send a C, the duplicate notes will be blocked. Once you send a C, the first note only will pass through again until a C is hit again

I’m testing with my MPD218 and have my aliases set as shown below.

image

In Ableton Live, if it is using a Live Script, disable it. For launching clips set input as BMT ! (for my example) and make sure the original controller port is unchecked.

Set Ableton Live up for Remote input (for launching clips) and not track (which will sound notes).

To block note-off message disable translator 1 by unchecking it.

These are the rules that defines C as the unblocking note.

if pp==0 then ga=0
if pp==0 then Goto “Done”

For C#, change this to 1, for D, 2 for D$3 and so on up to B, 11)

IE for C#

if pp==1 then ga=0
if pp==1then Goto “Done”

Avoid using notes in your project using the same note on a different octave (unless you want to unblock them).

If you want something that works across the whole keyboard range, reach out to me via email for paid consulting service.

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

This is how I have my mapping in Ableton Live. Anything that shows master is a separate scene launch.

image

This is how i have my mappings:

note E2 is triggering the clip on track “1” and two others, F#3 triggers the clip on track “2” and G#4 the clip on track “3”, so i’m not triggering scenes, but I suppose that doesn’t matter.

My midi preferences:

I do have a Launchpad script running because i need it for other functions.

the in and outs in the Bome translator:

The Touch me doesn’t send out a C to unblock since the notes are generated by people touching a surface and not controlled by me, so i thought i would use my Arturia Keystep for now to send the unblocking C.

What am I doing wrong?

To clarify: I can choose a scale for the output of the “Touch me” controller, I chose C# pentatonic minor, also to avoid it sending a C that would unblock (and for musical reasons that dont matter here). Now i can send the C from a different device ( for now i chose the the keystep)

OK,
For this I created another translator. Notes played on the Touchme will only play once.
The third translator is for your KeyStep. Right now, any note played on it will unblock the suppressed notes. You can change that by commenting out the first line

// comment and put the note number below if you want a specific note
ga=0

and then specifying the target note C-B for qq

// target note c=0 c#=1 d=2 etc
qq=0

My Aliases are set up as follows. I’m not sending any notes to the application with my “My KeyStep”

image

Only-One-Note-On-Per-Octave-Keystep.bmtp (2.4 KB)

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

I think there might be a problem with the output from BMT to Ableton… I added a screenshot of the BMT log after pressing the keystep once and a short activation of the Touch me. there is no output in the log. I also added a picture of the setup and routings in Ableton. The remote midi indicator isn’t lighting up. (when I activate the remote in of the touch me in Abletons preferences it is. )
I have used the in and out settings that you specified.





One more thing i just noticed: If i check (activate) the translator for “note off” it does get through to Ableton: the midi remote in indicator flashes…

Hi,
Your Keystep is transmitting on MIDI Channel 8 so either change the incoming message of translator 2 (Unblock) to MIDI Channel 8 or set to Any channel.

What is probably happening is the notes are already being blocked by the time you looked at the log window and since your controller is not sending a proper unblock message, nothing is getting through.
If you look at the value of ga “Dump Var” and ga is not 0 then there are messages being blocked. With all notes blocked the value will be 4095

Translator 2 does not look to see whether to block or unblock, the note-off messages.

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz