English
Forum

Bits of readmidi in notes (values) transfiguring

 

Ludger
Resing
Hello
be already long on the Search to midi Programierung ,and be now on euern Thread  [...]  punched.
unfortunately is my active Programierzeit already long back ,what about me white not any more so plenty above (must me first again einarbeiten) have under Profan 6.6 something programiert.
be now but too to music come ,and wished me too what to that Keyboard learn write (NEN small Prog)
I Games keyboard ,and would like see How tidy I Games ,wants means directly The length the notes and time-outs anzeigenlassen.now have I with Thru something experimentiert and works already super.but how can I The Bits of readmidi in in notes (values )transfiguring.or Sebastian have you got something like already written.
I have already ne half-way night rumgegugelt
and plenty To many Progs installs , but be I everything not klargekommen
Greeting
Ludger
 
07/11/08  
 




Sebastian
Sprenger
Hello Ludger,

Ludger Resing
but how can I The Bits of readmidi in in notes (values )transfiguring.


if You data of your Keyboard reading want, do you need first of all times the Bits 4-7. The stand for MIDI-Message, The eingegangen is, z.B. NoteOff ($80), NoteOn ($90), ProgramChange ($C0) etc.

The next Bits are message-tributary. with one NoteOn/-Off stand The Bits 8-14 for note (60=mittleres C, 62=D, 64=E, 65=F, 67=G, 72=hohes C, 48=tiefes C).

I Have time one small demonstration written, Perhaps helps it to you moreover:  [...] 
(Profan 7 becomes needed, but if You eh already with Thru experimentiert have... )

Ludger Resing
or Sebastian have you got something like already written.


what Dou you mean with something like? One Program to that Keyboard exercise anyway already, Yes.
Accurate said to that Nachspielen of MIDI-Files:  [...] 
Greeting, Sebastian
 
Profan² 7.0e, XProfan 9, 11.2a, FreeProfan32
Windows Vista Home Premium 32-Bit, 2.8 Ghz, 4 GB RAM
Windows Me, 1.8 Ghz, 256 MB RAM
07/11/08  
 




Ludger
Resing
Hello Sebastian
first time best Thanks for speedy response
gives it somewhere ne list from the Bits and its Midi function?
i'm to ca 3 years started Keyboard To learn .Klappt too really right well, except ,that I always from the beat come.means would like I me one Program write, which direckt The notes (and its length to that Tackt) indicating .with the Mitzählen I get Namely not there .
Vieleicht another Tipp To your Piano Lernspiel :Vileicht canst You on the Button The pressed becomes ,too whom fingers the using go should Show let.
I had yet yet no task found,I well Programmers could, To I on this trouble pushed
and with Date nothing suitable found.
I have under Profan 6.6 then WinAfuGame programiert.(an Amateurfunk Simulation)
Kusiert too yet in the network ,there but no large interest arose have I The development which tuned
Greeting
Ludger
 
07/12/08  
 




Sebastian
Sprenger
Hello Ludger,
with Wikipedia there some lists, where everything important abgedeckt is:  [...] 
If you next to whom Notenwerten but only The length need, then do you need The lists really not - I have any Timing-things always on &GetTickCount measured. in the principle must You so only The Time Is it Unikode, The between one NoteOn and the pertinent NoteOff passing.

if You nevertheless others MIDI-Messages receive want, must You on whom beginning your Program absolutely
CompileMarkSeparation
whileloop 23,38

    byte mim#,&loop=$90  NOP

endwhil
write, because ReadMidiIn otherwise only NoteOn & -Off zurückgibt (I had then so program...).
Greeting, Sebastian
 
Profan² 7.0e, XProfan 9, 11.2a, FreeProfan32
Windows Vista Home Premium 32-Bit, 2.8 Ghz, 4 GB RAM
Windows Me, 1.8 Ghz, 256 MB RAM
07/12/08  
 




Ludger
Resing
Hello Sebastian
Have now already ne while with your demonstration rum experimentiert .  [...] 
white but not yet very How I inerhalb the squeezed Keyboardtaste inquire can,whether tappt im dunkeln already losgelassen watts.
CompileMarkSeparation
Vieleicht can the too in your Piano coach install
Greeting
Ludger
 
08/18/08  
 




Sebastian
Sprenger
Hello Ludger,
the ought to The while-Loop correctly complement (Nachtrag circa 21:32: changed and tested!):
CompileMarkSeparationGreeting, Sebastian
 
Profan² 7.0e, XProfan 9, 11.2a, FreeProfan32
Windows Vista Home Premium 32-Bit, 2.8 Ghz, 4 GB RAM
Windows Me, 1.8 Ghz, 256 MB RAM
08/19/08  
 




Ludger
Resing
Hello Sebastian

i don't know, whether Profan too slow for these task is, or I only whom incorrect lane go, but I get it so not yet there.
i'm convincing of it ,that You too yet others things To do have, but if You Time have look time on my View source
it functions of course Ansatzweise , but To lazy.i'm this Program very important , still have I in network yet nothing ähnliches found
CompileMarkSeparation
 $I Interface.inc
declare a$,a&,note%,vel%,note$[127],laenge&,wonote%
windowstyle 31
Window 1,1-1100,800
SetTrueColor 0

Proc Notenbezeichnung

    Array mit Notenbezeichnungen
    a$="C-C#D-D#E-F-F#G-G#A-A#H-"

    whileloop 0,127

        note$[&loop]=mid$(a$,(&loop mod 12)*2+1,2);str$(&loop12)

    endwhile

endproc

Proc Schlafe

    Parameters N&
    Declare Ende%
    SetTimer N&
    Clear Ende%

    WhileNot Ende%

        WaitInput
        Case %wmTimer:Ende% = 1

    EndWhile

    KillTimer

EndProc

Proc Notenlinien

    parameters zz%                  zz=zeile
    declare z%
    let z%=(zz%*120)-40                  abstand der zeilen - 40 ist zum ausrichten
    UsePen 0,1,@RGB(0,0,0)
    line 50,(10+z%)-1000,(10+z%)
    line 50,(20+z%)-1000,(20+z%)
    line 50,(30+z%)-1000,(30+z%)
    line 50,(40+z%)-1000,(40+z%)
    line 50,(50+z%)-1000,(50+z%)
    --------------------
    line 50,(10+z%)-50,(50+z%)     senkrechter Strich
    line 1000,(10+z%)-1000,(50+z%) Senkrechter hinterer Strich

endproc

proc posnote

    parameters eing$

    if left$(eing$,1)="C"

        wonote%=7

    elseif  left$(eing$,1)="D"

        wonote%=6

    elseif  left$(eing$,1)="E"

        wonote%=5

    elseif  left$(eing$,1)="F"

        wonote%=4

    elseif  left$(eing$,1)="G"

        wonote%=3

    elseif  left$(eing$,1)="A"

        wonote%=2

    elseif  left$(eing$,1)="H"

        wonote%=1

    endif

    let wonote%=wonote%-(((val(mid$(eing$,3,1)))-3)*7)+15 rem -3 ist die Oktave/*7 =sieben töne höher /+15 nur zum ausrichten
    endproc
    Proc balken
    Parameters Wert%, dauer&
    declare w%
    let w%=wert%*5
    UsePen 0,2,@RGB(31,0,0)
    UseBrush 1,@RGB(0,0,0)
    Ellipse (70+dauer&),(62+w%) - (83+dauer&),(70+w%)
    endproc
    notenlinien(1)
    notenlinien(2)
    openmidiin 0 mein USB Midieingang
    openmidiout 1 mein Midiausgang
    laenge&=0
    wonote%=0
    Notenbezeichnung
    whilenot (%umessage=16) or (%scankey=27)  Bis Alt-F4 oder ESC
    readmidiin  MIDI-Nachricht lesen
    a&=&(0)
    if a& >= 0  Gibt es eine?
    Ja, Ist es ein NoteOff oder NoteOn? (Man beachte, dass
    das 4. Bit in dieser If-Abfrage ausmaskiert ist und daher
    beide Nachrichten gleichzeitig abgefragt werden :))
    if (a& & $E0) = $80
    Ja, Notenwert und Lautstärke berechnen
    note% = (a& >> 8) & 127
    vel% = (a& >> 16) & 127
    Bei NoteOff gibts allerdings keine Lautstärke
    casenot a& & $10: vel% = 0
    Log
    LOCATE 18,5
    print "Die Taste",note$[note%],"(";note%;") wurde",
    if vel%
    posnote(note$[note%])
    playmidiout a& & $7F7F90
    print " gedrückt    "
    while readmidiin() & $7F0060
    inc laenge&
    balken(wonote%,laenge&)
    chlafe (1)
    endwhile
    else
    print "losgelassen."
    endif
    endif
    ass=s1>endif
    endwhile
    closemidiin
    closemidiout

Greeting
Lutz
 
08/20/08  
 




Frank
Abbing
here again any required Files of/ one zipper.
can the time someone with Keyboard testing?

3 kB
Hochgeladen:08/21/08
Downloadcounter64
Download
 
08/21/08  
 




Sebastian
Sprenger
I see only, that it hakt, if several Keys at the same time pressed are (or. a new Button pressed becomes, before The old losgelassen becomes), otherwise runs everything liquid.

Greeting, Sebastian
 
Profan² 7.0e, XProfan 9, 11.2a, FreeProfan32
Windows Vista Home Premium 32-Bit, 2.8 Ghz, 4 GB RAM
Windows Me, 1.8 Ghz, 256 MB RAM
08/21/08  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

3.438 Views

Untitledvor 0 min.
Sven Bader10/14/21
Jörg Sellmeyer09/11/14
Sebastian Sprenger03/19/13
Paul Glatz03/15/13

Themeninformationen



Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie