Fix midi ordering.

This commit is contained in:
Pim Kunis 2020-10-11 12:34:11 +02:00
parent 25830345ef
commit a8141f741e

View file

@ -3,7 +3,7 @@ defmodule MIDITools.Schedule do
events
|> Enum.flat_map(&MIDITools.Event.convert/1)
|> Enum.reduce(%{}, fn {time, midi}, acc ->
Map.update(acc, time, midi, &<<midi::binary, &1::binary>>)
Map.update(acc, time, midi, &<<&1::binary, midi::binary>>)
end)
|> Enum.sort()
end