Creating a MIDI sequence browser/selector for MIDI Player
- 
 Update: MIDIPlayer1.setFile(var fileName, bool clearExistingSequences, bool selectNewSequence)This does infact load the file from the MIDI folder. Thanks @ulrik I actually figured out how to define the file name. However, I am not sure of how it will work once the plugin has been compiled. @Christoph-Hart does setSequence in conjunction with getMidiFileList work on files that have been simply dragged into the midi player? I am not able to get this to work. I have several different midi players that will each contain a separate set of midi files. Although "setFile" works to load the file, It's only ideal if you have 1 MIDI player with 1 set of Midi files. I need a solution that will locate only the MIDI files that are contained within a specific MIDI player. It's not ideal for me to select the midi files from the project MIDI folder because I am trying to categorize and group them based on the MIDI player they are in. For example, midi player 1 has flute midi and midi player 2 has bass midi and so on. When the user clicks the combo box, I only want them to be able to select from a list of midi files that are exclusive to the slected MIDI player. Not every MIDI file in my project. I Hope that makes sense. Is there a solution or am I missing something simple? 
- 
 @Mwins if you Console.print the "list", you can see that it's empty, 
 so this line don't get anythingconst var list = MIDIPlayer1.getMidiFileList();
- 
 @Mwins said in Creating a MIDI sequence browser/selector for MIDI Player: Update: MIDIPlayer1.setFile(var fileName, bool clearExistingSequences, bool selectNewSequence)This does infact load the file from the MIDI folder. Thanks @ulrik I actually figured out how to define the file name. However, I am not sure of how it will work once the plugin has been compiled. It will work just fine in the compiled plugin 
- 
 @Mwins said in Creating a MIDI sequence browser/selector for MIDI Player: 
 Then, how would you obtain the filename for MIDIPlayer1.setFile(var fileName.....
 You have to store the midi files names in an array or something,this is how I've done it: const var DemoSongsArr = ["Bel viso", "Lorda mornar", "Sakkijarven polkka", "Vals i natta", "Miss Karting", "La China", "Invention 1", "Kass theme", "Libertango"]; //populating the cmb inline function onDemoSongsControl(component, value) { DemoSongs.set("items", DemoSongsArr.join("\n")); if(value < SongInfo.length) { // Set the midifile MIDIPlay.setFile("{PROJECT_FOLDER}"+DemoSongsArr[value]+".mid", true, true);
- 
 @ulrik said in Creating a MIDI sequence browser/selector for MIDI Player: @Mwins said in Creating a MIDI sequence browser/selector for MIDI Player: 
 Then, how would you obtain the filename for MIDIPlayer1.setFile(var fileName.....
 You have to store the midi files names in an array or something,this is how I've done it: const var DemoSongsArr = ["Bel viso", "Lorda mornar", "Sakkijarven polkka", "Vals i natta", "Miss Karting", "La China", "Invention 1", "Kass theme", "Libertango"]; //populating the cmb inline function onDemoSongsControl(component, value) { DemoSongs.set("items", DemoSongsArr.join("\n")); if(value < SongInfo.length) { // Set the midifile MIDIPlay.setFile("{PROJECT_FOLDER}"+DemoSongsArr[value]+".mid", true, true);I have also tried there and given it up for the time being. 
 Do you have a working snippet here?
- 
 @MikeB Here is a working example 
 midiplayer
- 
 Super - Many thanks for that 
- 
 I just tried the midi player for the first time. i just have a problem with the play and stop buttons. even if I assign them the play button does not work. it does another function. i am using scriptnode version about 1 month ago. 
- 
 @yall What kind of reference do you do to the MidiPlayer? 
 There is 2 kind
  
- 
 @ulrik I didn't pay attention to 2. but the one I use is simply called the midi player in the midi part of the containers. the one where there is the drag n drop, choice of sequence, play stop rec. 

