Re: [LAU] sending random midi notes from a bash script

From: Philippe Hezaine <philippe.hezaine@email-addr-hidden>
Date: Sun Feb 07 2010 - 20:30:08 EET

Pedro Lopez-Cabanillas a écrit :

>>> As an example, here is a bash script that can be used with cron, to play
>>> hourly a tune and some strokes.

> Regards,
> Pedro

Hi Pedro,

Somehow fascinating!
Sorry for hijacking this thread but I'm wondering if you have any
pointers for the following case: (It's about randomization.)
I'm looking for randomize Note On from a midi file.
I have two way for sending this file, a standard file generated by
Lilypond or a text file by midicomp.
Here is an excert from midicomp file:

062:00:000 On ch=10 note=f#3 vol=105
063:-1:-576 Off ch=10 note=f#3 vol=64
063:-1:-384 On ch=10 note=f#3 vol=95
063:-1:-192 Off ch=10 note=f#3 vol=64
063:-1:000 On ch=10 note=f#3 vol=127
063:00:-576 Off ch=10 note=f#3 vol=64
068:00:000 On ch=10 note=f#3 vol=127
069:-1:-576 Off ch=10 note=f#3 vol=64
074:00:000 On ch=10 note=f#3 vol=127
074:00:192 Off ch=10 note=f#3 vol=64
074:00:384 On ch=10 note=f#3 vol=95
074:00:576 Off ch=10 note=f#3 vol=64
074:01:000 On ch=10 note=f#3 vol=105
074:01:192 Off ch=10 note=f#3 vol=64

I'm looking for randomizing the third column: 192 or -576...
between + or -3 units for instance. ( 000 is a special case)

I've googled some info about $RANDOM but I haven't been successful in
my rather random! investigations. :)
Have you any advice or pointers?
Midiclocking regards.

-- 
   Phil.
_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-user
Received on Mon Feb 8 00:15:01 2010

This archive was generated by hypermail 2.1.8 : Mon Feb 08 2010 - 00:15:01 EET