Octave Up/Down Buttons
-
Hi everyone

I’m developing a standalone live instrument in HISE for realtime performance — mainly for solo playing using a touchscreen (iPad-style) interface.
I need a very simple and reliable live transpose function that can shift all incoming MIDI notes ±12 semitones per click (like the “Transpose” buttons on Korg or Yamaha arranger keyboards), but without cutting off held notes or affecting sampler pitch parameters directly.
Basically:
• Two large buttons (▲ / ▼) for +12 / −12 semitone steps
• A central display showing the current octave offset (−2, −1, 0, +1, +2)
• Works in Standalone HISE (not compiled project, no Project Manager)
• Touchscreen friendly (for iPad performance)
• Ideally realtime MIDI-based transpose (not pitch engine change)I’ve tried several methods:
• Synth.setGlobalTranspose() → not available in my standalone build
• Sampler.setTranspose() and Sampler.Transpose → property not found
• Sampler.setAttribute(2, value) works for pitch but affects currently playing notes
• So I switched to a pure MIDI re-routing approach via onNoteOn() and onNoteOff()Here’s my current working script (it does MIDI remapping correctly, but maybe there’s a cleaner HISE-native way to do this?):
Content.makeFrontInterface(800, 400);
// Touch-friendly UI
const btnDown = Content.addButton("btnDown", 140, 150);
const btnUp = Content.addButton("btnUp", 540, 150);
const lblVal = Content.addLabel ("lblVal", 350, 150);btnDown.set("text", "▼");
btnUp.set("text", "▲");
btnDown.set("fontSize", 72);
btnUp.set("fontSize", 72);
lblVal.set("fontSize", 72);
lblVal.set("alignment", "centred");
lblVal.set("textColour", 0xFFE8C66A);reg octaveShift = 0;
const tShift = Engine.createTable("TransposeShiftPerNote", 128);
tShift.fill(0.0);inline function updateLabel()
{
lblVal.set("text", "" + (octaveShift / 12));
}btnUp.setControlCallback(function(c, v)
{
if (v) { octaveShift = Math.min(octaveShift + 12, 24); updateLabel(); }
});
btnDown.setControlCallback(function(c, v)
{
if (v) { octaveShift = Math.max(octaveShift - 12, -24); updateLabel(); }
});function onNoteOn()
{
local n = Message.getNoteNumber();
tShift.set(n, octaveShift);
Synth.playNote(n + octaveShift, Message.getVelocity());
}function onNoteOff()
{
local n = Message.getNoteNumber();
Synth.noteOff(n + tShift.get(n));
}updateLabel();
I wonder if there’s a built-in or cleaner way to achieve live transpose inside HISE, maybe something like a MIDI processor or node graph that can handle note remapping directly — especially in standalone mode?
Any advice, or confirmation that this “manual table” approach is the best practice, would be super appreciated

Something like this hiier

Thanks in advance!
Keysounds -
@keysounds Use Transposer, Its under Midi processors , Transposer
-
-
@ILIAM
They should be whole step 12 Semitones(Octave). -
@keysounds Use the below script , and connect it to the transposer, Then change the step size of the knob to 12.
Knob.set("stepSize", 12.0 ); -
@keysounds another way is to add the value*12 on setAtrribute.
So Knob.setAttribute(Transposer.Trasnpose,Value*12);
You can now Make a knob with -2 to 2 min max values , and it will change the transpose for octave use.
-
Thanks, I will try this.
-
@keysounds I'm on my phone and Can't help more, But the structure is there.
Good luck -
@ILIAM when I move with Slider is changing values on Transposer, but over ,,+“ and ,,-" it doesn’t. And with ,,+" and ,,-" buttons Value on Slider are changing but not on Transposer.
-
@keysounds Try this.
HiseSnippet 1340.3ocqW0uaaaCDmJIJqw8CrBrG.t9WxKwt1tYefl0s78fwZRLhcyFvvPAsDcLQnHEnnxl2PeQ1Sydj1av1QJIKoXk1Dup+vvj79c2u63c5NMPI8owwRExYiQyhnHmG4NblPO8foDl.0+PjySbOgDqoJb5V6OKhDGSCPNNq9ClMb1XMj84e998IbhvmVrEBcgj4SeMKjoK1cvt+HiyOlDPGwBKI81612WJNPxkI.eV0sCJh3eE4R5oDiXq3hbV+n.lVpFpIZZLHy9xfYCmJ+MQp7WvhYi4TyhtngfhR2FcvTFOXPtuFiPNqMnvyWM0y+L2SXAr46WDA9T6A3BDkiANqTkRqUgRcuMJcrjGXTvsPuUJQu0Ro2ScG5qXQ5hSLb6gt8EvkyDBD1KSqTYQq7Wq6dfDjPnaGRthdrBVLGg2K5zYKL7SycZz.B8wZ70DEdjhHhijwTUW7qv1zg1WR0UhNdOqjTOqJ9wZwaF.HyMLf8.YXjT.K7dl8TChJ.N7re5z2GDy4UAckX7Y9Zx0zaE1bIr7iI3LAEOIQ3qYRAVQik7qoyci8zZkWXT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