FAQ Search Today's Posts Mark Forums Read

» Linux Archive
Home
New Posts
Search
FAQ


Go Back   Linux Archive > 64 Studio > 64 Studio User

 
 
LinkBack Thread Tools
 
Old 10-22-2008, 03:13 AM
Ralf Mardorf
 
Default MIDI monitor

Hi

I need a MIDI monitor showing a timer followed by a single received MIDI
byte.

I've got 2 Linux MIDI monitors, gmidimonitor 3.4 and kmidimon 0.5.1.

Both are showing a timer followed by a complete MIDI event, gmidimonitor
isn't good for MTC informations, kmidimon might be good enough for MTC
informations, but I might need the monitor to do a lot of tests, .e.g. I
guess it's impossible to see by this monitors, if the received channel
events are received in running mode or with the status byte for each
event, that's why I wish to have a MIDI monitor showing single bytes,
instead of an interpretation, resp. conversion into text of the received
bytes.

I'm not fine with C/C++ and x86_64 Assembler, especially I'm not fine
with writing C/C++ make files, I tried to do some C++ for Linux some
time ago.

Simple MIDI monitoring for some tests should be possible to do with a
monitor written in BASIC. I found out that the ATARI's GFA BASIC is
nearly the same as Linux's X11-BASIC, but there's still one problem.

TIMER commands seems to be equal for both BASICs. Both BASICs have the
INP command too, but while INP can read bytes from the ATARI's on-board
MIDI, it seems to be not so easy for Linux.

Is there a way to OPEN e.g. an USB MIDI device by something like OPEN
/dev/usb/midi or to connect to ALSA or JACK MIDI clients by X11-BASIC?

Is there a MIDI monitor showing a timer and each single byte, so that I
don't have to program some myself?

At the moment I wish to know what's different between MTC sent by Ardour
and sent by Rosegarden. I can sync a Yamaha RX21 drum computer as slave
with Rosegarden as master by MTC, but I can't sync the Atari's Cubase as
slave with Rosegarden as master by MTC. The strange thing is, that it's
possible to sync the Atari's Cubase as slave with Ardour as master by MTC.

To write bug reports or to find out what I might do wrong, I want to
take a look at the MIDI bytes.

Cheers,
Ralf

_______________________________________________
64studio-users mailing list
64studio-users@64studio.com
http://lists.64studio.com/mailman/listinfo/64studio-users
 
Old 10-22-2008, 10:25 AM
Daniel James
 
Default MIDI monitor

Hi Ralf,


I'm not fine with C/C++ and x86_64 Assembler, especially I'm not fine
with writing C/C++ make files, I tried to do some C++ for Linux some
time ago.

Simple MIDI monitoring for some tests should be possible to do with a
monitor written in BASIC. I found out that the ATARI's GFA BASIC is
nearly the same as Linux's X11-BASIC


That's quite obscure though. Have you considered learning Python instead?

Cheers!

Daniel
_______________________________________________
64studio-users mailing list
64studio-users@64studio.com
http://lists.64studio.com/mailman/listinfo/64studio-users
 
Old 10-22-2008, 01:02 PM
Ralf Mardorf
 
Default MIDI monitor

Daniel James wrote:
> Hi Ralf,
>
>> I'm not fine with C/C++ and x86_64 Assembler, especially I'm not fine
>> with writing C/C++ make files, I tried to do some C++ for Linux some
>> time ago.
>>
>> Simple MIDI monitoring for some tests should be possible to do with a
>> monitor written in BASIC. I found out that the ATARI's GFA BASIC is
>> nearly the same as Linux's X11-BASIC
>
> That's quite obscure though. Have you considered learning Python instead?
>
> Cheers!
>
> Daniel

Hi Daniel

I bet there are some MIDI monitors the way I need .

I don't wish to program or to get from someone else a complex program, I
just wish to have an application that is reading a timer and byte by
byte, so that I can scroll through the MIDI bytes.

START:
001 Is the MIDI client/port ready?
002 If so, get the TIME and the MIDI Byte and write both informations to
an array.
003 If there's pushed a key, jump to STOP
004 If not, go to START

STOP:
A routine that shows the TIMER and MIDI Bytes in a list, that can be
scrolled, maybe simply by saving it as a file.txt.

It should look like this:

minutes:seconds:milliseconds MIDI-Byte

00:00:004 f0
00:00:005 0a
00:00:006 0f
00:00:007 05

It isn't obscure to program in BASIC. The advantage would be to have the
same MIDI monitor for Linux and the Atari without spending much time in
programming. Because there's nothing to sort and it's a compiler BASIC.
If I have to learn anything, I should learn how to write make files for
C/C++ .

But anyway, Python seems to be near to BASIC and Assembler, so I think
it will be possible to program without learning, just using a quick
reference like http://rgruet.free.fr/PQR2.0.pdf, e.g. 'if' 'else' is
near to BASIC and 'cmp (x,y)' is near to Assembler, for those basic
Assembler commands the kind of CPU doesn't loom large.

Like C/C++ it seems not to use jumps, but calling functions, modules or
what ever such routs are named. Following
http://infohost.nmt.edu/tcc/help/pubs/lang/pytut/build-module.html there
is a list of MIDI functions here:

http://pypi.python.org/pypi?%3Aaction=search&term=midi&submit=search

So I've taken a look to portmidizero 0.1. For me this is obscure.

Again I used google and found http://wiki.python.org/moin/PythonInMusic,
but midi-0.2.1 also is confusing.

I can't find a simple function to get single bytes from an ALSA or JACK
MIDI client.

I'm looking for something that is as simple as GFA-BASIC. I wished to
know a command, searched the Index of a book and found INP(3), that is
the input for a single MIDI byte for the Atari.

Basic is fast enough to do a monitoring without filtering. I programmed
a BASIC extension for the C64 getting MIDI bytes in Assembler, something
like INP(3) is for the Atari's GFA-BASIC and than I programmed a sound
sampler in the C64's BASIC, a BASIC on a slow computer that isn't a
compiler BASIC and it worked, it only used a simple extension for MIDI
and another for the sound sampling.

So it makes me wonder what is obscure in programming a MIDI monitor in
BASIC? Doing it will take minutes, instead of hours.

I could write the monitor in C/C++, if I would know how to get the
source code compiled. I never get simple C/C++ examples compiled, resp.
the compiled code wasn't fine.

If e.g. any C/C++ program example for JACK or ALSA MIDI raw would run
after compiling, I would be able to modify it myself. I guess nearly
everyone would be able to do this.

Maybe there's a way to set gmidimonitor or kmidimon to show the bytes,
but I didn't know how to set them to do this.

It might be, that an application like Rosegarden isn't fine, because
it's so hard to do simple things with Linux. Using gmidimonitor or
kmidimon it seems to be impossible to see, if there will be bad MIDI bytes.

Sorry, I won't discuss that.

Has anybody a simple source code in C/C++ getting bytes from ALSA or
JACK MIDI in raw format, that is easy to compile?

And again, does anybody know a way to open ALSA or JACK MIDI
clients/ports for X11-BASIC's INP command?

For example in /dev/snd there seems to be some devices. I do not know
much about Linux. Isn't /dev something that can be used with the OPEN
command?

I had some examples written in C/C++ that were not fine with my old
hardware or the instructions how to compile them were wrong.

At the moment I still need a lot of time with heaving treatments at the
dentist and I wish to get my studio ready to make music. To write about
bugs, without any research will be ignored by coders. I guess it will be
better, if I could write the Rosegarden team what is wrong with their
MTC, by showing them the monitoring of Ardour, because Ardour seems to
be fine and showing them what Rosegarden is doing different.

Python is confusing me. I just want to do a bug report and don't wish to
learn another language. I can't understand why there isn't a BASIC that
is as simple and powerful as for other computers and I also can't
understand why there isn't a easy to use environment for C/C++. Maybe
there is such a BASIC and such a C/C++ environment, but it's not easy to
find them.

Cheers,
Ralf

_______________________________________________
64studio-users mailing list
64studio-users@64studio.com
http://lists.64studio.com/mailman/listinfo/64studio-users
 
Old 10-22-2008, 03:32 PM
Daniel James
 
Default MIDI monitor

Hi Ralf,


Has anybody a simple source code in C/C++ getting bytes from ALSA or
JACK MIDI in raw format, that is easy to compile?


Try asking on the linux-audio-dev list, I think you will get some
suggestions there.


> does anybody know a way to open ALSA or JACK MIDI

clients/ports for X11-BASIC's INP command?


I haven't heard of anyone doing audio or MIDI on GNU/Linux using BASIC,
that's why I suggested taking a look at Python.


Cheers!

Daniel
_______________________________________________
64studio-users mailing list
64studio-users@64studio.com
http://lists.64studio.com/mailman/listinfo/64studio-users
 
Old 10-22-2008, 05:10 PM
Ralf Mardorf
 
Default MIDI monitor

Daniel James wrote:
> Hi Ralf,
>
>> Has anybody a simple source code in C/C++ getting bytes from ALSA or
>> JACK MIDI in raw format, that is easy to compile?
>
> Try asking on the linux-audio-dev list, I think you will get some
> suggestions there.

Hi Daniel

good idea, even if I prefer to subscribe to users lists instead of
developers lists, I subscribed to the LAD list. I did it 2 times,
because I didn't get a reply. I'll wait some hours and if I won't get a
reply, I'll write the list owner.

Maybe someone from this list knows how to compile
http://www.alsa-project.org/alsa-doc/alsa-lib/_2test_2rawmidi_8c-example.html.

00167 if (handle_out) {
00168 unsigned char ch;
00169 ch=0x90; snd_rawmidi_write(handle_out,&ch,1);
00170 ch=60; snd_rawmidi_write(handle_out,&ch,1);
00171 ch=100; snd_rawmidi_write(handle_out,&ch,1);
00172 snd_rawmidi_drain(handle_out);
00173 sleep(1);
00174 ch=0x90; snd_rawmidi_write(handle_out,&ch,1);
00175 ch=60; snd_rawmidi_write(handle_out,&ch,1);
00176 ch=0; snd_rawmidi_write(handle_out,&ch,1);
00177 snd_rawmidi_drain(handle_out);
00178 }

This is a note on 0x9n for channel 1, middle C, velocity 100 and the
same note on with velocity 0 means note off, it's often used instead
of 0x8n. The complete example from line 1 to 241 seems to do what I was
looking for.

So I have to eliminate the line numbers and to compile and link it, but
I don't know how to do this. I didn't test it for this one, but I know
that I always had to struggle with the needed libs and the command to
include the libs or to build a make file instead.

The next step would be to include a timer, an array to store the MIDI
monitoring etc. and than there again willbe trouble with a make file or
the right options for the command.

Cheers,
Ralf

_______________________________________________
64studio-users mailing list
64studio-users@64studio.com
http://lists.64studio.com/mailman/listinfo/64studio-users
 

Thread Tools




All times are GMT. The time now is 11:12 PM.

VBulletin, Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org