MidiPlayer Drag to DAW

  • 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

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

  • Progress!

    void MidiFileDragAndDropper::paint(Graphics& g)
    	if (hover)
    		g.drawRect(getLocalBounds(), 3);
    	String message;
    	if (currentSequenceId.isNull()) message << "Drop MIDI file here";
    	else message << "Drop new MIDI file or drag Content";
    	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:


    When dragging to ableton. /shrug

  • 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;
    		performExternalDragDropOfFiles(files, true);

  • 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);
    	pos = 0.25 * (Slider_Steps.getValue() - 1);
            addNote(noteSequence, 1, 60, 127, pos, 0.02);


    And here's some rulers just cause

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


    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

Log in to reply