HISE Logo Forum
    • Categories
    • Register
    • Login

    MidiPlayer Drag to DAW

    Scheduled Pinned Locked Moved General Questions
    6 Posts 1 Posters 322 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ?
      A Former User
      last edited by

      Good morning :)

      I'm working on an Arp->midi player sort of thing to try and get arp notes out of the plugin and into a MIDI track in a daw, and I've almost got a working prototype, but the final exporting part isn't working

      Using a floating tile set to index 0 on the Midiplayer gives me some sort of dragging thing, but I think it's to load, not to export

      Ableton was giving me an error while it was using a temp midi file but now I've exported the plugin with a file embedded, and it still doesn't make a clip

      Tried searching the forum and basically every thread is a dead end so figured I'd bump it

      1 Reply Last reply Reply Quote 0
      • ?
        A Former User
        last edited by

        Ok so it seems like the floating tile on index 0 is just for importing, is there one for exporting?

        1 Reply Last reply Reply Quote 0
        • ?
          A Former User
          last edited by A Former User

          Progress!

          void MidiFileDragAndDropper::paint(Graphics& g)
          {
          	g.fillAll(findColour(HiseColourScheme::ComponentBackgroundColour));
          
          	if (hover)
          	{
          		g.setColour(findColour(HiseColourScheme::ComponentOutlineColourId));
          		g.drawRect(getLocalBounds(), 3);
          	}
          
          	g.setFont(getFont());
          	String message;
          
          	if (currentSequenceId.isNull()) message << "Drop MIDI file here";
          	else message << "Drop new MIDI file or drag Content";
          
          	g.setColour(findColour(HiseColourScheme::ComponentTextColourId));
          	g.drawText(message, getLocalBounds().toFloat(), Justification::centred);
          }
          

          Dragging files or loading them manually doesn't change the tooltip to "Drop new MIDI file or drag content", is it possible that the if statement isn't working in the source code?

          Edit: If I don't save anything to a midifile and just use the temp file inside the player, I get:

          42cc8855-8e93-464d-bff0-f3f290f4eb8c-image.png

          When dragging to ableton. /shrug

          1 Reply Last reply Reply Quote 0
          • ?
            A Former User
            last edited by

            Update: If I comment out this from the MidiDropper.cpp file in the source (line 89), it works (but you have to hold the cursor there for a while). It's like Ableton 11 isn't able to load the file before it gets deleted from temp.

            @Christoph-Hart is there any potential issue from not deleting these files instantly? I assume storage wouldn't be too big of an issue on modern computers since MIDI files are so tiny.

            void MidiFileDragAndDropper::dragOperationEnded(const DragAndDropTarget::SourceDetails&)
            {
            	if (draggedTempFile.existsAsFile())
            	{
            		StringArray files;
            		files.add(draggedTempFile.getFullPathName());
            		performExternalDragDropOfFiles(files, true);
            		//draggedTempFile.deleteFile();
            	}
            }
            
            1 Reply Last reply Reply Quote 0
            • ?
              A Former User
              last edited by A Former User

              Found another weird thing with the MidiPlayer:

              The range doesn't seem to go from 0-1, as a 0.25 adjustment doesn't fit evenly inside it. (MIDI player is the top floating tile, you can see the note jumping around)

              inline function onSlider_StepsControl(component, value)
              {
              	Arpeggiator1.setAttribute(Arpeggiator1.NumStepSlider, value);
              	//testing
              	pos = 0.25 * (Slider_Steps.getValue() - 1);
                      noteSequence.clear();
                      addNote(noteSequence, 1, 60, 127, pos, 0.02);
              	updateNoteSequence();
                      MIDIPlayer.flushMessageList(noteSequence);
              };
              

              27c51c02-a69e-4442-aca1-45ad4de3c27f-image.png

              And here's some rulers just cause

              ? 1 Reply Last reply Reply Quote 0
              • ?
                A Former User @A Former User
                last edited by A Former User

                Ok seems like the range for the midiplayer is 0-0.95, unless I'm doing something incredibly stupid:

                3e403bd3-ac08-4d61-8329-3822d338adbd-image.png

                Taking a squiz into the paintroutine for it

                Edit: I think I should add I believe this just affects the display of it, not the actual MIDI data as that works on the grid in a DAW just fine

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post

                28

                Online

                1.7k

                Users

                11.9k

                Topics

                103.4k

                Posts