Coder Social home page Coder Social logo

qmidi's People

Contributors

3dproger avatar codeforevolution avatar iv41879 avatar lestahl avatar mickymuis avatar nilsding avatar paulmasri avatar pvaibhav avatar waddlesplash avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

qmidi's Issues

Proposal: Rearchitecting QMidi for MIDI 2.0 and Extendibility

The Problem

Hello! I'm currently working on the macOS backend and trying to fix issues reported by users. Notably however, I notice that the current design of the library is inflexible (C++ inheritance is not used as an example), and I believe the idea of QMidiOut and QMidiIn only being able to connect to one input or output leaves out certain use cases for the library, especially without a coordinating "roster-like" class.

Additionally, with the release of the MIDI 2.0, I believe the library needs to be adapted to interact with these new specifications.

The Possible Solution

I would like to try to redesign the library in a "Factory Method" way:

  • QMIDIRoster: A class that handles system wide midi notifications, device enumeration, and the creation/destruction of the client's midi inputs and outputs. In other words, as defined by the MIDI 2.0 Specification, this represents a MIDI Gateway.
    • Can register and unregister the client to receive midi notifications such as new devices, status changes, and more.
      • Received as Qt signals
    • Creates QMidiInput and QMidiOutput objects for the local application that represents inputs and outputs that can be viewed by other MIDI handling applications.
    • Represents other MIDI speaking applications, software, and hardware as a QMIDIDevice.
  • QMIDIDevice: Class that represents a single remote software/hardware-based MIDI device and its collection of QMIDIEndpoints.
  • QMIDIEndpoint: Abstract base class that a represents a source/destination for handling incoming/outgoing Universal MIDI Packets (UMPs).
    • QMIDIInput: Represents a single input/source for incoming midi events.
    • QMIDIOutput: Represents a single output/sink/producer for outgoing midi messages/events.
  • QMIDIPacket: Represents a single Universal MIDI Packet (UMP).
  • QMIDIPerformance: A list of QMIDIPackets and extra metadata that represents a complete MIDI piece.
    • QMIDIImporter: Abstract base class for importing in different MIDI file formats such as Standard MIDI Files (SMF).
    • QMIDIExporter: Abstract base class for exporting to different MIDI file formats, such as SMF.

So...What now?

This is only a proposal, so please, leaves comments and suggestions here. Furthermore, tell me I'm wrong and say a re-architecture is not necessary if you believe so. :)

Wrong track format check

If midi file has wrong track format than function QMidiFile::load stucks in indefinite loop where condition is always true...
while (number_of_tracks_read < number_of_tracks)

Please see attached example midi file

+Careless.zip

Fails to build on FreeBSD 13.0-RELEASE

Fails to build on FreeBSD 13.0-RELEASE:

FreeBSD% LANG=C cmake ..   
-- Configuring done
CMake Error: AUTOMOC for target QMidi: Could not find moc executable target Qt5::moc
CMake Generate step failed.  Build files cannot be regenerated correctly.

MacOS (11.4 and others) with multi Midi devices

Hello,

QMidi library does not return an error on connection but I encounter a problem during its use in case where there are several devices available in list returned by QMidiIn::devices().
In all cases, QMidi connects to first device in list according to selected device.

Bless
Yutang

I found a bug and tried to fix it.

`void QMidiFile::addEvent(qint32 tick, QMidiEvent* e)
{
e->setTick(tick);
fEvents.append(e);
//(e->track() == 0) && <- I removed this one in if

if ((e->type() == QMidiEvent::Meta) && (e->number() == QMidiEvent::Tempo)) {
	fTempoEvents.append(e);
}
sort();

}
`
I was using the FL to exported speed change midi and found that the speed did not change when I inport this midi. It took me four days to locate the cause and finally found it.

Unnecessary disposing

if (fMidiPtrs->outputPort != 0) {
MIDIPortDispose(fMidiPtrs->outputPort);
fMidiPtrs->outputPort = 0;
}
if (fMidiPtrs->client != 0) {
MIDIClientDispose(fMidiPtrs->client);
fMidiPtrs->client = 0;
}

Quoting documentation:

Don’t explicitly dispose of your client; the system automatically disposes all clients when an app terminates. However, if you call this method to dispose the last or only client owned by an app, the MIDI server may exit if there are no other clients remaining in the system. If this occurs, all subsequent calls by your app to MIDIClientCreate and MIDIClientCreateWithBlock fail.

MIDI messages on OSX

I found out that in OSX (Mojave) midi messages, send by QMidiOut::sendMsg(qint32 msg) are not always interpreted by the receiving device:
the short messages as ProgramChange (QMidiOut::setInstrument(int voice, int instr)) are then ignored when sending as qint32. Also with Midi Monitor these messages give an Invalid message after the intended message.

As solution I added QMidiOut::sendMsg16(qint16 msg) in QMidi_CoreMidi.cpp that has the same content as QMidiOut::sendMsg(qint32 msg) but sends only 2 bytes.

How play .mid files ?

Hi.
I tried to use an example, but nothing worked. I just get table. Please, help

clear()

When clearing events (fEvents) we should also clear tempo events list and track list just by calling clear() cause when loading new song we have non-valid tempo event pointers and tracks from previous song

implicit conversions

hi
there is implicit conversions from int64 to 32 at all chunk len points
line 660 QMidifile.cpp, please change similar lines to the following to avoid this warning
chunk_start = qint32(in.pos());

the warning does not appear with QT Creator but with Xcode. Please generate xcode project and compile with xcode to see it. Thank you

Virtual MIDI devices on Windows 10

Hi !

I just realized that virtual MIDI ports created by LoopBe1 or virtualMIDI are not visible with QMIDI. I'm trying to route the signal of my test application to my DAW and this is the problem I'm experiencing. I don't have this issue on the Mac (virtual ports created by CoreMIDI).

Thank you for your help !

Port QMidiOut to macOS (CoreMidi)

I do have access to macOS, but I've no particular interest to go down the rabbit hole that is CoreMidi. If anyone else is, I'll happily accept patches...

Upgrade QMidi to be compatible with Qt 6.2

I have done this and will submit a PR.

Following the Porting to Qt 6 guide, I first compiled with Qt 5.15 disabling deprecated functionality. This showed that qStableSort() has been deprecated in favour of std::stable_sort.

The only other change needed is the CMakeLists.txt which is specific to Qt 5.

Time - Tick conversion

issue-time-tick-conversion

Time conversion to tick and tick to time does not give equal values. Is this deviation ok?

sendSysEx() on Mac OSX

Hi, my program works well in Linux and Windows. It goes to crash on Mac OS X.
After a debug session I can't find the bug.
I can send not more than one or two midi massage (on Mac OS X).
My opinion is that MIDISendSysex() function is async.
Does anyone had the same problem?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.