Skip to content

Playback и текущий Tick #167

Answered by melanchall
laika65 asked this question in Q&A
Discussion options

You must be logged in to vote

Вот простейший код (вы его под себя адаптируйте):

using System.Linq;
using Melanchall.DryWetMidi.Core;
using Melanchall.DryWetMidi.Interaction;
using Melanchall.DryWetMidi.Multimedia;

namespace DwmExample
{
    class Program
    {
        static void Main(string[] args)
        {
            var midiFile = MidiFile.Read("My MIDI file.mid");
            var playback = midiFile.GetPlayback(/*ваше устройство*/);
           
            var duration = playback.GetDuration<MidiTimeSpan>().TimeSpan;
            // тут выставляете Maximum прогрессбара

            PlaybackCurrentTimeWatcher.Instance.AddPlayback(playback, TimeSpanType.Midi);
            PlaybackCurrentTimeWatcher.Instance.Curren…

Replies: 2 comments 28 replies

Comment options

You must be logged in to vote
4 replies
@laika65
Comment options

@CIRCE-EYES
Comment options

@CIRCE-EYES
Comment options

@CIRCE-EYES
Comment options

Answer selected by laika65
Comment options

You must be logged in to vote
24 replies
@CIRCE-EYES
Comment options

@melanchall
Comment options

@CIRCE-EYES
Comment options

@CIRCE-EYES
Comment options

@laika65
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Just question about the library
3 participants