Adding a compile button to the interface?
- 
 @d-healey 
 if I dont click the button everything is ok.. but the button is the only way i can randomize the sequence.
- 
 @BWSounds What happens if you remove this line note.setTransposeAmount(Math.random() > 0.5 ? 0 : -12);
- 
 @d-healey 
 same thing, the sequence stays the same but the length of it is changed.
- 
 @BWSounds So the only thing that is causing the problem is this MIDIPlay.flushMessageList(list);I guess it must be a bug or an intended behaviour. I haven't used the MIDI player myself so I'm not familiar with this function. @Christoph-Hart Will know the answer.
- 
 @d-healey 
 Ahh, well thank you for your help!
- 
 @Christoph-Hart 
 any insight would be greatly appreciated.
- 
 @Christoph-Hart - any insight would be greatly appreciated. Bump Bump :) 
- 
 I'll try one more time  ...Bump ...Bump
 (I've tried everything, just cant be done yet I guess)
- 
 https://docs.hise.audio/hise-modules/midi-processors/list/midiplayer.html#using-the-midi-player The timestamp will use the current tempo and samplerate to be consistent with the rest of the MIDI processing in HISE. So if you have quarter notes at 44,1kHz and 120BPM, you will get these timestamps for the first bar: This is your problem right here. The timestamps in your listhave the old tempo baked in. In order to solve it, recreate the list at each randomization (however then the randomization will "stack up"):inline function onButtonranControl(component, value) { list = MIDIPlay.getEventList(); for(note in list) { if(note.isNoteOn()) note.setTransposeAmount(Math.random() > 0.5 ? 0 : -12); } MIDIPlay.flushMessageList(list); }; Content.getComponent("Buttonran").setControlCallback(onButtonranControl);
- 
 @Christoph-Hart 
 Ahh oK.. I took a quick look, but im getting this error
 Can't assign to this expression!I'll look deeper into this error and try to fix it. 
- 
 You probably have declared the list as const var. Usereginstead.
- 
 @Christoph-Hart 
 yep! thank you sir.

