MidiPlayer ClearSequences?
-
@iamlamprey You can get the attribute list this way
for (i=0; i<8;i++) Console.print(MIDIPlayer1.getAttributeId(i));
But still,
MIDIPlayer1.ClearSequences
does not work... -
You might find this useful
const var MIDIPlayer1 = Synth.getMidiProcessor("MIDI Player1"); const x = MIDIPlayer1.getNumAttributes(); for (i = 0; i < x; i++) Console.print(MIDIPlayer1.getAttributeId(i));
@ustk beat me to it :p
-
I usually just go to the docs and find the list of parameters there (cause I often have to continually refer back to the docs every 5 seconds anyway )
Okay I think we're getting somewhere here.
The source file has
addAttributeID(ClearSequences);
inside the MIDIPlayer's undoManager, I wonder if that has something to do with it.Now I'm trying to access the Play button (index 1) and getting errors as well. It's like the undoManager somehow privatized the Parameters.
-
Okay more discoveries:
Connecting a non-momentary button to the "Play" Parameter, instead changes the Sequence number between 0-1.
https://i.gyazo.com/ffde183b01f39f14669b298a21d23478.mp4
@Christoph-Hart Master I summon thee :)
-
Running into the same issues. I'm unable to clear sequences, and Parameter Properties seem incorrect.
-
@Christoph-Hart Any chance you can take a quick look at the midi player? I don't think any of the Parameter Properties are working, which makes it a little difficult to use the player without Play/stop/set sequence/ clear sequence/ etc...
-
@dustbro Play, Stop, getTimeSignature and Drag to DAW works but there are some problems...see this post and if you have the time test the snippet in your system...this way we will be sure if it is a Midi Overlay bug or not
https://forum.hise.audio/topic/4656/midi-overlay-panels-in-compiled-plugin-crashing-dawsAbout Drag To DAW it works ok but there are 2 problems...
-
If you load a midi and drag n drop to any daw it works like a charm...but if you load another midi after that(or try to drag n drop the same midi for second time) it does not work...I noticed that if you close the interface from the edit button of the daw and load again the instrument you can drag n drop again any loaded midi file...and that story goes on...Or if you try it from Hise plugin in any daw the same thing happens...you can drag n drop any loaded midi file but in order to drag again a second midi file you have to close and open again the (interface preview, or Hit compile and it works...and so on)
-
The midi file that is created and dropped to daw is named as temp...
Is there a way to have the name of the actual midi file that was loaded?
-
-
@DimitrisSP said in MidiPlayer ClearSequences?:
Play, Stop, getTimeSignature and Drag to DAW works
I can't get them to work from the Property Editor (like above). Some values do nothing, and other values control the wrong parameter.
Do you know of a way to clear a sequence via script?
-
@dustbro They will not work from the Property editor...
Did you read the post that i mentioned above?
You will find a lot of answers there...and load my snippet and test it in your system...you will see that most of the functionality is there and working ok and finaly you will come to the most serious problem that i mention in that post above (the crashing senario) but strangely noone (of the users here not even @Christoph-Hart) was interested about...and in some point anyone who is using a midi overlay panel (for drag to daw or any other functionality) will face it.The part of the code that controls play and stop is that below...
//The callback to control playback of the loaded midi file inline function onPlayControl(component, value) { var position = Engine.getPlayHead().ppqPosition; var last = Engine.getPlayHead().ppqPositionOfLastBarStart; var currentposition = (position - last)/4; if (Play.getValue()) { Player.play(0); Player.setPlaybackPosition(currentposition); } else Player.stop(0); }; Content.getComponent("Play").setControlCallback(onPlayControl);
-
@DimitrisSP said in MidiPlayer ClearSequences?:
Did you read the post that i mentioned above?
I did. I'll check out that snip today for any crashes on my rig.
Thanks! -
Looks like you can use this to clear all sequences
MIDIPlayer.setFile("", 1, 1);
-
@dustbro Good catch! I'll test this now!
-
@ulrik I just want to confirm that @dustbro example works great for clearing all sequences!