Hi,
I am running a .mp3 file using 'xine' without any issues on my Fedora
Core 8 machine.
I am reading /dev/dsp and storing it in some file.
i.e. cat /dev/dsp > musicfile
Now I am stopping 'xine' and then writing 'musicfile' to /dev/dsp.
i.e. cat musicfile > /dev/dsp
In this case I can hear the music but with a lot of noise in it.
Is there any way I can remove/reduce this noise from 'musicfile'?
I also tried following program (it records the voice and plays it
immediately) that I got from net to understand how to write to /dev/dsp
but it does not seem to record my voice and hence plays nothing and
there is noise only.
-------------------------------------------------------
#include <unistd.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/ioctl.h>
#include <stdlib.h>
#include <stdio.h>
#include <linux/soundcard.h>
#define LENGTH 3 /* how many seconds of speech to store */
#define RATE 8000 /* the sampling rate */
#define SIZE 8 /* sample size: 8 or 16 bits */
#define CHANNELS 1 /* 1 = mono 2 = stereo */
/* this buffer holds the digitized audio */
unsigned char buf[LENGTH*RATE*SIZE*CHANNELS/8];
int main()
{
int fd; /* sound device file descriptor */
int arg; /* argument for ioctl calls */
int status; /* return status of system calls */
/* open sound device */
fd = open("/dev/dsp", O_RDWR);
if (fd < 0) {
perror("open of /dev/dsp failed");
exit(1);
}
/* set sampling parameters */
arg = SIZE; /* sample size */
status = ioctl(fd, SOUND_PCM_WRITE_BITS, &arg);
if (status == -1)
perror("SOUND_PCM_WRITE_BITS ioctl failed");
if (arg != SIZE)
perror("unable to set sample size");
arg = CHANNELS; /* mono or stereo */
status = ioctl(fd, SOUND_PCM_WRITE_CHANNELS, &arg);
if (status == -1)
perror("SOUND_PCM_WRITE_CHANNELS ioctl failed");
if (arg != CHANNELS)
perror("unable to set number of channels");
arg = RATE; /* sampling rate */
status = ioctl(fd, SOUND_PCM_WRITE_RATE, &arg);
if (status == -1)
perror("SOUND_PCM_WRITE_WRITE ioctl failed");
while (1) { /* loop until Control-C */
printf("Say something:\n");
status = read(fd, buf, sizeof(buf)); /* record some sound */
if (status != sizeof(buf))
perror("read wrong number of bytes");
printf("You said:\n");
status = write(fd, buf, sizeof(buf)); /* play it back */
if (status != sizeof(buf))
perror("wrote wrong number of bytes");
/* wait for playback to complete before recording again */
status = ioctl(fd, SOUND_PCM_SYNC, 0);
if (status == -1)
perror("SOUND_PCM_SYNC ioctl failed");
}
}
---------------------------------------------------------------------------------------
Regards,
Girish
DISCLAIMER
==========
This e-mail may contain privileged and confidential information which is the property of Persistent Systems Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Ltd. does not accept any liability for virus infected mails.
This should settle any doubts people have about there being a GPL violation,
along with understanding how the GPL is properly applied. Here is part of
the header from a file in the previous version of Impro-Visor. No notice to
any change was given with the current preview version and jMusic code is still
used in it. Therefore, it be logically deduced that the GPL still applies:
/**
* This Java Class is part of the Impro-Visor API
*
* Copyright (C) 2005-2008 by Robert Keller and Harvey Mudd College
*
* It has been edited from the jMusic API version 1.5, March 2004.
* Copyright (C) 2000 Andrew Sorensen & Andrew Brown
*
* Impro-Visor is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
...
Raymond
Hi,
I don't see the Faust code (the .dsp file) that has been used to
produce Guitarix (http://sourceforge.net/apps/trac/guitarix/browser/
trunk/src. It the Faust source code available somewhere?
Thanks
Stephane
>>> Thanks man. I'll forward this to Bob Keller too.
>>> I think he mentioned in a message that he is willing to give developers
>>> svn access to the recent code.
>>>
> >
> > Really. Last year I found Improvisor and wanted to contribute to it,
> > so I got in contact with Bob. I made some changes to integrate the
> > application better into the desktop (on Mac OS X also) and did some
> > initial cleanup.
> > The reaction I received was less than welcoming. In fact, the message I
> > got was that they were not interested in really allowing outside
> > developers to contribute. Thus my changes were never used, or considered
> > as far as I can tell. What I got was a bunch of excuses about the
> > situation with the application until finally this Bob guy came straight
> > out and harshly refused to cooperate on development. I even had to ask
> > numbers of time before I could finally get the source code and this
> > resulted in it finally being posted on the group.
> > Basically the group that works on it is his student research group at the
> > educational institution he is employed at. So it appears that they just
> > want to keep all the glory and credit for the application to themselves by
> > disallowing outside contributions. This is really not manner that we
> > usually associate with FOSS. The fact that you have to subscribe to a user
> > group even to get the binary is one big clue. To my mind the only reason
> > it is under GPL is because they use other libraries that are, not because
> > they see some benefit to doing so.
> > The only way to go with this application, at the moment, is to fork it. I
> > was considering doing this a while ago, but have other projects keeping me
> > busy. If you can convince them to open it up, great. I wouldn't hold my
> > breath though. If enough other developers are interested then I could give
> > some time to a fork.
> This is what he replied me
> "If there are developers who are serious, I could provide svn access to
> our repository. Right now there are 3 people who are active. We are
> about to release version 4, which is almost a year out from version 3.39
> that is in the user group. "
> So I think we have to go the working together way first.
> I've forwarded the message of Lasconic to him, let's wait for his reply
> on that.
No, I think you are wrong here to even consider trying to cooperate. I waited
after your initial reply to respond because obviously you weren't fully
considering my points, so I decided to see what happens. Now a preview of the
next version of impro-visor has been released and it is as I expected. No
source code, again. Blatant GPL violation again. That was unexpected, not!
Where's that SourceForge project also? That's right, it does not exist.
I sent a message about the missing source code, again. I wonder what excuses
he will give, again (or has he decided to not even respond to my legitimate
inquiries now). Last time it was that he was on the road or busy or <enter
lame excuse here>. He had the time to package up binaries for Linux,
Mac, and Windows, but could not zip up the source and post it at the same
time?! Go check that with him and let's see how the responses match what I am
saying.
Now I am seriously considering forking this application myself, to make
sure that everyone can get the current source code, they do not have
to join some group just to get the binary, and that real contributions can
actually get in. Yeah, I'm a serious developer, but that guy never offered to
give me any access and the new version still has bugs that I already fixed
which he would not accept.
I will give it a little longer, but if these people don't get their act
together and start doing things in accord with the GPL, then they should
either change their license and remove all GPL stuff or not be surprised when
a forked version appears (Improvisor+ sounds good: Improvisor, plus the source
code and the ability for others to contribute, and not needing to be in some
group just to get it, and ...).
There has been plenty of time for them to do the right thing. Time has run
out already. Let's not be naive. Some people put out applications as GPL
just so they can say they did, but really they just want to ride on the FOSS
bandwagon to look good. Then when you try to get involved, contribute, or
ask for the source code, all of a sudden they clamp down on things and show
you that they want to control everything, as if it is a commercial proprietary
program. Sorry this does not fly with me. I have had this experience with
another project that thinks they are FOSS and that they can do no wrong. The
end result was that I did actually end up having to fork the program because
of their inability to conduct themselves properly.
Perhaps some other people should get in contact with this project and voice
their concerns and views about how FOSS and GPL based projects do things.
If they start to do things right, then I won't have to fork it. But either
way, the source code and binaries WILL be freely available and without need
for membership in some group. Drive that point home if you will.
Regards,
Raymond Martin
Announcing the new public beta release of phasex! All phasex users
are encouraged to upgrade. Since the days of 0.11.1, all known bugs
and many annoying quirks have been worked out, making
PHASEX-0.12.0-beta3 is the most stable, best sounding, and most
studio friendly release yet:
* Fixed all currently known crash issues and build issues. Code has
been updated for newer versions of gcc, gtk, and glibc. Realtime
threading issues have been fine-tined, using realtime locks where
appropriate. The build system has been fixed up for newer
distributions and includes default optimizations for the entire x86
family (run './configure --enable-arch=foo', where foo is an
architecture supported by your version of gcc).
* Sound quality has been greatly refined by reshaping envelope
curves (eliminating pops and clicks), adding hermite interpolation
to the chorus (removing fuzziness from chorus), adding fine tuning
to oscillator frequencies and FM amounts, adding sampled oscillators
(currently with Juno-106 and vocal samples), fixing portamento
and key triggering logic, and more.
* The JACK code has been reworked to allow multiple instances with
persistent instance numbers and resilience to JACK crashes and
restarts.
* The GUI has been refined slightly, with a new color scheme, patch
folders in the file dialog shortcuts list, and a couple slight
optimizations to the knob code.
* There's more. See http://sysex.net/phasex/beta for details if
you're that curious.
Since 0.12.0-beta2, fixes have been implented for GTK >= 2.16
(fixing Fedora 11 builds), the max polyphony has been turned into a
runtime configurable setting, and the build system and default
architecture specific optimizations have been fixed up some more.
Source tarball and arch specific Fedora 11 RPMS are now available
for download:
http://sysex.net/phasex/beta/phasex-0.12.0beta3.tar.gzhttp://sysex.net/phasex/beta/phasex-0.12.0-0beta3.fc11.src.rpmhttp://sysex.net/phasex/beta/phasex-0.12.0-0beta3.fc11.i386.rpmhttp://sysex.net/phasex/beta/phasex-0.12.0-0beta3.fc11.i586.rpmhttp://sysex.net/phasex/beta/phasex-0.12.0-0beta3.fc11.i686.rpmhttp://sysex.net/phasex/beta/phasex-0.12.0-0beta3.fc11.athlon.rpmhttp://sysex.net/phasex/beta/phasex-0.12.0-0beta3.fc11.amd64.rpmhttp://sysex.net/phasex/beta/phasex-0.12.0-0beta3.fc11.x86_64.rpmhttp://sysex.net/phasex/beta/phasex-0.12.0-0beta3.fc11.ia32e.rpm
Build reports and bug reports, and package build files for all
distributions are highly welcome. This is the final beta for
0.12.0. Any build and crash issues reported in the next two weeks
will be fixed for the 0.12.0 stable release. Please direct any
feedback to weston(a)sysex.net.
The latest version of phasex can always be found at:
http://sysex.net/phasex
For those of you who use git:
git clone http://sysex.net/git/phasex.git
Thank you all for your support, feedback, and contributions over the
years, helping to make PHASEX what it is today.
Happy music making!
--ww
Well, I could not find one so I wrote this simple perl jackd wrapper
script[*], I really needed something that would enable jack and
pulseaudio to coexist while the jack + pulseaudio situation stabilizes.
Not a finished product but seems to work around here (tested lightly on
Fedora 10).
If you want to try it out (don't blame me if everything stops working!)
you should rename your current jackd executable to "/usr/bin/jackd.bin"
and put the script in its place ("/usr/bin/jackd" by default, don't
forget to make it executable). You need to have pulseaudio, pacmd and
pactl available in /usr/bin/.
If pulseaudio is running the script will suspend it, start the real
jack, wait for it to be ready and finally load the pulseaudio module
module-jack-sink (but it does not make it the default). You could then
manually transfer pulseaudio streams to it. If pulseaudio is not running
the script just execs the real jackd (set $verbose to 0 in the script if
you don't want the extra messages).
The script also traps <ctrl>c and the kill signal, unloads the
module-jack-sink module, passes the signal to the real jack and when it
is dead unsuspends pulseaudio. I don't know if trapping more signals
would be necessary.
WARNING: if you transfer a pulseaudio stream to the jack sink module and
then stop jack without unloading it, pulseaudio becomes very very
unhappy and dies, oh well. You can get it going again with "pulseaudio
--start" (at least in Fedora 10).
I guess more code could be added to automagically transfer pulse audio
streams back and forth to the jack sink module when jack starts and
stops, and also make it the default. It seems it would take a lot of
parsing of command outputs to do that.
Anyway, as I said before, just a __temporary__ hack...
Enjoy!
-- Fernando
[*] why perl? tried bash and could not get the signal stuff to work and
don't know no python :-) Perl hackers: I could not make exception
catching work around the open3 call to catch potential errors, help with
that would be welcome!
Hi all,
Just happened to use top with all threads displayed (H).
Anyone able to explain why console-kit-daemon is running
more than 60 threads ?
System is Fedora 10.
--
FA
Io lo dico sempre: l'Italia è troppo stretta e lunga.
Hello all!
I've known this package "songanalysis" for quite some time. But now I
wondered, if it might be possible to build a LADSPA plugin from this, or if it
would be possible to include it in ecasound as an option. It can do tempo
analysis, but more importantly it can do frequency dependent volume analysis,
which might be very helpful for text-based mastering. It uses a special scale
Mel? or was it Cepstra? to set the static bandwidth. Not as good as graphic
JaMIN output, but certainly of more help than ears only for a first stab. :-)
The package is here:
http://nixbit.com/cat/multimedia/audio/songanalysis/
You'll find a small description and a download link there.
I know there's one limitation to the code as-is: It only works with 44100Hz,
as I remember.
I'd be greatful for any ideas, oppinios on this.
Kindest regards
Julien
--------
Music was my first love and it will be my last (John Miles)
======== FIND MY WEB-PROJECT AT: ========
http://ltsb.sourceforge.net
the Linux TextBased Studio guide
======= AND MY PERSONAL PAGES AT: =======
http://www.juliencoder.de
Is anyone out there using the ocaml bjack library?
I am going to be working on a program that interprets an svg file as a
synthesis graph, with just the basic puredata objects to start with.
I will be using inkscape as the editor for the synthesis graph
(polygons are processing units, diagram connectors are signal paths).
It seems like, with the higher level processing I will be doing on the
input .svg xml file, ocaml would be an interesting language to use for
this.
Has anyone out there used the bjack library for ocaml, and if so would
you happen to have some example code I could look at, like maybe a
program that just passes its input to its output? Google is not
helping me much, mostly getting stuff related to the debian/ubuntu
packages, and not the use of the library.