#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2004
    Posts
    2
    Rep Power
    0

    plotting with TChart


    Hello all.

    I'm getting MIDI timestamp information which I want to plot in real-time using TChart. I'm putting the values ( in milliseconds ) into a listbox at the moment to see what they are. Could anyone give me a clue how to get these values to plot on the Chart?

    Thanks all

    David.
  2. #2
  3. Banned ;)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Nov 2001
    Location
    Woodland Hills, Los Angeles County, California, USA
    Posts
    9,607
    Rep Power
    4247
    See the section on Adding Data to a Series here:
    http://www.adug.org.au/reference/NotesOnTeeChart.htm
    Up the Irons
    What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
    "Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
    Down with Sharon Osbourne

    "I wouldn't hire a butcher to fix my car. I also wouldn't hire a marketing firm to build my website." - Nilpo
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2004
    Posts
    2
    Rep Power
    0
    Originally Posted by Scorpions4ever
    See the section on Adding Data to a Series here:
    http://www.adug.org.au/reference/NotesOnTeeChart.htm


    Thanks man, I'll check it out. Maybe it'll engender a "Wind of Change". For the rest:

    Ok, so maybe I didn't inspire you to come to my rescue, but can you resist the temptation of code?

    I'm plotting chart values from MIDI input values. The bottom axis is timestamp values and the left axis should be different for each MIDI note number. I've got the chart doing kind of the right thing for one Y value. Here's my procedure:

    procedure TForm1.FormCreate(Sender: TObject);
    begin
    MidiInput1.Open;
    MidiInput1.Start;
    MidiOutput1.Open;
    end;

    procedure TForm1.MidiInput1MidiInput(Sender: TObject);
    var
    thisEvent: TMyMidiEvent;
    begin
    with ( Sender As TMidiInput ) do
    begin
    thisEvent := MidiInput1.GetMidiEvent;
    ListBox1.Items.Add(IntToStr( thisEvent.Time ));
    ListBox2.Items.Add(IntToStr( thisEvent.Data1 ));
    MidiOutput1.PutMidiEvent(thisEvent);
    thisEvent.Free;
    end;

    with Series1 do
    begin
    AddX ( thisEvent.Time , IntToStr( thisEvent.Time ), clRed );
    end;



    Any advance on this would be great as I'm stuck at this point.

    Thanks in hope.

    Dave.

IMN logo majestic logo threadwatch logo seochat tools logo