Hi everyone,
There are 2 MIDI System Common opcodes (0xF4 and 0xF5) and 2 MIDI
System Realtime opcodes (0xF9 and 0xFD) that the official MIDI
standard reserves for future use.
I'm currently collecting examples of non-standard uses of these
opcodes in hardware and software (on MIDI 1.0 DIN cables and in other
hardware and software contexts). Examples I've collected so far are:
-- 0xF9 as "MIDI Tick"
-- 0xF5 for both "MIDI endpoint" and "virtual cable" selection
I'm doing this as part of the process of finishing:
http://www.cs.berkeley.edu/~lazzaro/sa/pubs/txt/current-mwpp.txthttp://www.cs.berkeley.edu/~lazzaro/sa/pubs/txt/current-guide.txt
It uses the semantics of the commands as part of its resiliency
scheme, and so knowledge of non-standard uses of the reserved commands
is needed to help craft resiliency logic for the opcodes. Probably
best to send the info directly to lazzaro(a)cs.berkeley.edu, the topic
is too mundane for the list ... thanks in advance!
-------------------------------------------------------------------------
John Lazzaro -- Research Specialist -- CS Division -- EECS -- UC Berkeley
lazzaro [at] cs [dot] berkeley [dot] edu www.cs.berkeley.edu/~lazzaro
-------------------------------------------------------------------------
Hi all,
I would like to announce creox 0.2.0
- the realtime sound processor for KDE
http://www.uid0.sk/zyzstar/?creox
As Creox is a JACK application, the output sound can be routed to the
other JACK-aware applications, and the audio input can be taken as the
output from the other JACK client.
--
jozef kosoru
Hi LADs,
here is a problem that maybe very common with many rt audio apps, so
hopefully there is a "standard" solution for it?
assume jack process callback reads audio data from a buffer, while
another thread might alter the
contents of this buffer. In my particular scenario, i will actualy use
doublebuffering. So the only operation that needs to be "mutexed"
is the actual swapping of front and back buffers (well, pointers, of
course, not the contents)
Now my problem is: How can i make sure that swapping does not accure
during process (playback) callback?
I could use a mutex, but this might also block the playback thread. (if
swapping is in process when the jack callback is invoked)
On the other hand, swapping pointers shouldn't take that long, so maybe
this would not be a problem?
Or would it make sense to try and "foresee" such a situation and avoid
it by delaying the swapping?
Any clever suggestions on this?
Regards,
Lukas
http://www.fftw.org/
Just a headsup for all the people who link against it. Hopefully they've
normailised the build system now...
Looks pretty good, now includes SIMD optimisations.
- Steve
Eger kemoterapi yada radyoterapinin yan etkileri ile bogusan bir yakininiz varsa, �z�lmeyin ancak bitkisel kanser ilaci Carctol'u yakindan tanimak i�in zaman ayirarak asagidaki link'e tiklayin.
http://www.kanser-tedavisi.com
Listeden adinizin silinmesini istiyorsaniz a_cengiz2002(a)yahoo.com a bos e posta yollayin. Tesekk�rler
Hello, if you have got an acquaintance or a friend who is suffering from the side effects of chemotherapy, please visit the site below to see the truths about alternative herb cancer medicine Carctol.
http://www.kanser-tedavisi.com/English_homepage.html
If you wish to be removed from our list, please send us an email at this address bilgi(a)kanser-tedavisi.com so that we may remove your name. Thank you.
Hi all, the 0.7.6 version of Hydrogen Gnu/Linux drum machine is available at
http://hydrogen.sf.net
Features:
* Graphical user interface based on QT 3,
* Sample based audio engine,
* Oss Audio driver,
* Jack Audio driver,
* Export to disk audio driver,
* Alsa Midi input,
* Ability to import/export xml-based song file,
* 64 ticks per pattern,
* 16 voices with volume, mute, solo, pan capabilities,
* Import of samples in wave, au, aiff format.
* Humanize and swing functions
Changes:
* Bug fix in note velocity editor
* Improved pattern editor
* Humanize function
* Swing function
* New child frame interface
* Stereo peak visualization in mixer
* New song editor
Happy drumming! ;)
--
Alessandro <Comix> Cominu
http://hydrogen.sf.net
e-mail: comix(a)despammed.com
Icq: 116354077
Linux User # 203765
[...Codito Ergo Sum...]
>> We're effectively talking about a driver for the Motorola DSP
>> onboard (I can't remember what the no is.)
>No, that stuff is "secret". The microcode is available only as raw
>binaries, and the driver's job is to talk to the microcode; not the
>hardware directly. So, we're talking about Linux kernel space only;
>no DSP code.
When you say "available as binaries" I take it that it's still running on
board the card's ROM? (ie microcode implemented within the card, not the
host.)
[This is a conversation Francois and I have been having this morning.
There is a general problem with LADSPA wrapper plugins that create
plugins from other sources. Its not possible for them to pick unique IDs
as they dont know what has been assigned and what hasn't]
On Tue, Mar 18, 2003 at 10:14:44AM +0100, Francois Dechelle wrote:
> > That reminds me, there was another issue that Thomas raised, theres
> > currently no way to create a one-time unique LADSPA id, which I guess you
> > would need for this to work reliably.
>
> Yes, it is something that I need. The problem is that the jmaxladspa
> plugin is not a unique plugin: the number of plugins it defines is
> variable (it is the number of .jmax files that are in LADSPA_PATH
> directories).
>
> A temporary solution would be to allocate to the jMax plugin a range of
> unique IDs and that no more than this range patches can be loaded. What
> do you think about it?
Thats OK as a quick fix, but it doesn't solve the broader problem, if you
save state from a host using jMax LADSPA plugins then it wont necceserily
be the same set when you reload.
I think LADSPA needs self assigned ID's, if the UID space were bigger we
could just reseve the top bit for self assigned stuff and hash unique
strings to fill it, but as its only 32bits thats not enough space.
> Apart from this solution, I don't see how to do it.
Agreed, without a change to LADSPA I dont think its possible.
One solution could be to use a reserved ID range to flag that the ID isn't
globally unique, but the label string (not name) is, so hosts should save
state aginst the label not the ID. It has very dodgy semantics though.
A better solution would be to expand the ID space to 64bits, and reserve
the top bit's worth, which is plenty, but will break binary compatibility
of course.
> Another question: is there a plan to get plugin port values that are not
> floats? More precisely, I am thinking of transforming a patch that does
> granular synthesis into a plugin. But this patch needs a sound file
> name. How can I pass it to the LADSPA plugin?
You can't. I think this is thought to be outside the remit of LADSPA.
> BTW, do you think we should discuss this on jMax mailing list or on
> linux-audio-dev?
Yes, both probably, but I've forgotten what email address I subscribed to
the jMax list with. I guess I should resubscribe. I'l CC this to l-a-d in
the meantime.
- Steve
hi all,
so i've tried to make a new scheduling policy for linux. i've
called it SCHED_USERFIFO. the intent is basically to allow a process
ask for x amount of processor time out of every y jiffies. (the user
part is in the hope that the administrator can set rlimits on the
amount of percentage of time requested and allow non-priviledged users
to use this policy without being able to complete hang the box).
it works just like SCHED_FIFO as long as the process doesn't take
more than the amount of time it asked for. if it does try to take
more time, it is allowed to be preempted until the period is over.
i hacked this up quickly, and tested it with the program below. i
was able to get a process in a while (1) loop to take up >99.4% of
processor while still being able to kill it from the console (although
trying to do anything interactive was excruciatingly slow during this
time). when i allowed the process to take up 100% of the period, the
system hung (with respect to other processes) as expected. (tested in
vmware, btw).
this patch is against 2.4.20+lowlatency. it's intended mostly
for people to look at and give feedback. it probably won't work on
systems that use APIC's, it doesn't do any sanity checking, and it
doesn't handle jiffy rollover.
(mostly i'm just sending a mail because i'm pleased with myself
and want to share and get feedback; hopefully this sort of does what i
say it does too).
thanks,
rob
here is the test program, note the two new fields in sched_param:
param.period_reserved
param.period_length
these are specified in system ticks. below i give the program
49 out of every 50 ticks.
------------- testprogram.c ----------------
#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
//#include <sched.h>
// import these directly
#include <sys/time.h>
#include <sys/poll.h>
#define SCHED_OTHER 0
#define SCHED_FIFO 1
#define SCHED_RR 2
#define SCHED_USERFIFO 3
struct sched_param {
int sched_priority;
/* user fifo stuff */
unsigned long period_length;
unsigned long period_reserved;
};
/* return -1 on failure */
int
set_realtime(void)
{
int r;
struct sched_param param;
pid_t pid;
pid = getpid();
param.sched_priority = 50;
param.period_length = 50;
param.period_reserved = 49;
return sched_setscheduler(pid, SCHED_USERFIFO, ¶m);
}
void
waste_time(void)
{
struct timeval tv, tv_old, tv_tmp, tv_timeout;
struct pollfd ufds;
int res;
int i = 0;
ufds.fd = 2;
ufds.events = POLLPRI;
tv_timeout.tv_sec = 0;
tv_timeout.tv_usec = 600;
i = 0;
while (i<40000000L) {
printf("unf\n");
i++;
}
}
int
main(int argc, char ** argv)
{
int i = 0;
if (set_realtime() < 0) {
fprintf(stderr, "couldn't set scheduler to SCHED_USERFIFO\n");
return -1;
}
waste_time();
return 0;
}
---------------------------------------------
here is the kernel patch.
--- pristine/linux-2.4.20/kernel/sched.c 2003-03-17 23:24:02.000000000 -0500
+++ linux/kernel/sched.c 2003-03-17 22:11:13.000000000 -0500
@@ -188,7 +188,42 @@
* runqueue (taking priorities within processes
* into account).
*/
+
+ if (p->policy == SCHED_USERFIFO) {
+
+ /*
+ * check if we are in the right time period
+ *
+ * XXX if it burns though it's entire period and
+ * into the next ?
+ *
+ */
+ if (jiffies >= p->t_period_end) {
+ /* no, start over from now */
+ p->t_period_start = jiffies;
+ p->t_period_end = p->t_period_length + p->t_period_start;
+ p->t_period_remain = p->t_period_reserved;
+ }
+
+ /*
+ * is there any remaining time ?
+ *
+ */
+
+ if (p->t_period_remain > 0) {
+ weight = 1000 + p->rt_priority;
+ } else {
+ /* redundent, for clarity */
+ weight = -1;
+ }
+ goto out;
+ }
+
+ /* normal RT case */
+
weight = 1000 + p->rt_priority;
+
+
out:
return weight;
}
@@ -939,8 +974,8 @@
else {
retval = -EINVAL;
if (policy != SCHED_FIFO && policy != SCHED_RR &&
- policy != SCHED_OTHER)
- goto out_unlock;
+ policy != SCHED_OTHER && policy != SCHED_USERFIFO)
+ goto out_unlock;
}
/*
@@ -964,6 +999,15 @@
retval = 0;
p->policy = policy;
p->rt_priority = lp.sched_priority;
+
+ if (policy == SCHED_USERFIFO) {
+ /* FIXME: no checks, doesn't handle jiffy rollover */
+ p->t_period_length = lp.period_length;
+ p->t_period_reserved = lp.period_reserved;
+ p->t_period_start = jiffies;
+ p->t_period_end = p->t_period_length + p->t_period_start;
+ p->t_period_remain = p->t_period_reserved;
+ }
current->need_resched = 1;
--- pristine/linux-2.4.20/include/linux/sched.h 2003-03-17 23:24:02.000000000 -0500
+++ linux/include/linux/sched.h 2003-03-17 21:55:04.000000000 -0500
@@ -119,7 +119,7 @@
#define SCHED_OTHER 0
#define SCHED_FIFO 1
#define SCHED_RR 2
-
+#define SCHED_USERFIFO 3
/*
* This is an additional bit set when we want to
* yield the CPU for one re-schedule..
@@ -127,7 +127,10 @@
#define SCHED_YIELD 0x10
struct sched_param {
- int sched_priority;
+ int sched_priority;
+ /* user fifo stuff */
+ unsigned long period_length;
+ unsigned long period_reserved;
};
struct completion;
@@ -419,6 +422,15 @@
/* journalling filesystem info */
void *journal_info;
+
+
+ /* our extra stuff */
+
+ unsigned long t_period_end;
+ unsigned long t_period_start;
+ unsigned long t_period_remain;
+ unsigned long t_period_length;
+ unsigned long t_period_reserved;
};
/*
--- pristine/linux-2.4.20/kernel/timer.c 2002-11-28 18:53:15.000000000 -0500
+++ linux/kernel/timer.c 2003-03-17 22:42:52.000000000 -0500
@@ -610,6 +610,15 @@
p->need_resched = 1;
}
}
+ if (p->policy == SCHED_USERFIFO) {
+
+ if (p->t_period_remain == 0) {
+ p->need_resched = 1;
+ } else {
+ p->t_period_remain--;
+ }
+ }
+
if (p->nice > 0)
kstat.per_cpu_nice[cpu] += user_tick;
else
-------------------- end -------------------------------
----
Robert Melby
Georgia Institute of Technology, Atlanta Georgia, 30332
uucp: ...!{decvax,hplabs,ncar,purdue,rutgers}!gatech!prism!gt4255a
Internet: async(a)cc.gatech.edu