Hi People,
On trying to deal with wave files in python, I came across this article:
http://209.85.165.104/search?q=cache:vMIuboZw0BwJ:scipy.mit.edu/tutorials/w…
the original pdf http://scipy.mit.edu/tutorials/wave.pdf is not available...
The signal scaling is just beyond my understandings, and I can´t find
any explanation on the web about it. What is the role of that in the
programm? Anyway, I will write here what it does to the audio signal
that I don´t understand. By catching code lines in functions it looks
like this:
''''
mono signal, a list, say a 200Hz sinusoid with 2 seconds):
signal=[math.sin(2*math.pi*200*(x/44100.0)) for x in range(88200)]
'''
tmp = list( signal )
min_tmp = min(tmp)
max_tmp = max(tmp)
scalar = (2**16 - 1.0) / (1.0 * (max_tmp - min_tmp)) * volume #for 16
bit, it could be 8 or 32
tmp = map( lambda x: int(scalar*(x-min_tmp)), tmp)
signal = tmp
if samp_width != 1:
signal = map( lambda x: x - 2**(samp_width*8 - 1), signal )
#and then they pack the code, conv_code is 'B' for 8 bit, 'h' for 16
bit, 'i' for 32 bit:
f.writeframes( struct.pack( conv_code, signal[i] ) )
Ok. This struct thing I don´t fully understand, but I already know it
has to do with C data strings.
But the previous part simply doesn´t make sense, and I can´t find any
reference to this things on the web.
I would really appreciate if anyone could explain me what is happening
and/or point me some writings about that.
One disturbuing thing about using this script is that sometimes it
outputs a wave file with start and end out of center (zero amplitude),
even when the singal list had fadings. It seems that it has to do with
signals that goes beyond the [-1,1] closed interval, but I don´t know
why.
thanks guys,
Claire
I normally wouldn't reply but this is way off. If there is prior art
then the patent can be thrown out. This is what PubPat is doing and
what was attempted with the Microsoft FAT patent (and succeeded in
Germany).
If Microsoft took out a patent on something that was implemented
previously in ALSA code but they did not steal the code from ALSA they
are not required to GPL anything. GPL is a license based on copyright.
As long as they don't copy the code they're not breaking any laws and,
unless someone can prove that they copied the code, they ar enot
required to reveal it.
Jan
On Fri, 2007-03-02 at 14:37 +0100, Nick Copeland wrote:
> If Microsoft patent any capabilities that are present in the ALSA codestream
> them ALSA itself is exempt from the patent. This is written into the patent
> laws, they cover the possibliity that somebody had a product that was later
> patented by some other, wiser party. If the company in potential infringment
> can prove prior implementation then they are exempt.
>
> The exact wording of the exemption would probably require legal
> interpretation, however if Microsoft have patents applied for that cover
> features already implemented by ALSA then not only are implementations of
> the ALSA driver exempt (prior implementation can be proven based on driver
> distribution dates to precede the patent application) but at the same time
> there is a seperate issue that if Microsoft did take out a patent of an ALSA
> capability then under the terms of the GPL they may legally be required to
> make their code publicly available as it arguably must have been based on
> the open sourced capabilities.
>
> Regards.
>
> >From: "Marc-Olivier Barre" <mobarre(a)gmail.com>
> >Reply-To: A list for linux audio users
> ><linux-audio-user(a)music.columbia.edu>
> >To: "Linux Audio Dev List" <linux-audio-dev(a)music.columbia.edu>,"A list for
> >linux audio users" <linux-audio-user(a)music.columbia.edu>
> >Subject: [linux-audio-user] Open letter to Steve Ballmer
> >Date: Fri, 2 Mar 2007 12:09:25 +0100
> >
> >Hi,
> >
> >Since Microsoft recent audio related patent "that looks a lot like
> >ALSA", I thought this could be interesting :
> >
> >http://www.showusthecode.com/
> >
> >In short it's an open letter to Steve Ballmer asking him to show the
> >code and patents that Linux supposedly copied from Microsoft (haha,
> >what a joke...)
> >
> >Happy reading,
> >__________________
> >Marc-Olivier Barre,
> >Markinoko.
>
> _________________________________________________________________
> Don't just search. Find. Check out the new MSN Search!
> http://search.msn.click-url.com/go/onm00200636ave/direct/01/
>
--
Jan 'Evil Twin' Depner
http://myweb.cableone.net/eviltwin69
"Life should NOT be a journey to the grave with the intention of
arriving safely in an attractive and well preserved body, but rather to
skid in sideways, chardonnay in one hand, chocolate in the other, body
thoroughly used up, totally worn out, and screaming 'WOO HOO, what a ride'"
Announcing a new release of the hexter DSSI plugin.
http://sourceforge.net/project/showfiles.php?
group_id=104230&package_id=134428
hexter is a software synthesizer that models the sound generation of
a Yamaha DX7 synthesizer. It can easily load most DX7 patch bank
files, accept patch editing commands via MIDI sys-ex messages, and
recreate the sound of the DX7 with greater accuracy than any other
open-source emulation (that the author is aware of...) hexter
operates as a plugin for the Disposable Soft Synth Interface (DSSI).
New features in version 0.6.0 include:
* Implemented the LFO, amplitude modulation and pitch modulation
(many thanks to Jamie Bullock)!
* Added TX7-style performance parameters, allowing configuration
from the GUI of pitch bend range, portamento time, and
sensitivity and assignment of the modulation wheel, foot
controller, pressure (both channel and key), and breath
controller.
* Added DX7 patchbank loading code from Martin Tarenskeen, allowing
hexter to load a number of additional patch file formats.
* Partially implemented portamento. For now, the curves and times
are wrong, but the plumbing is there.
More information about hexter and DSSI can be found at:
http://dssi.sourceforge.net/hexter.html
hexter is written by Sean Bolton, and copyright (c)2007 under
the GNU General Public License, version 2 or later.
Just can't resist.
---------- Forwarded message ----------
From: Dmitry Baikov <dsbaikov(a)gmail.com>
Date: Mar 2, 2007 3:59 AM
Subject: jackmidi_alsaseq-0.4
To: Jack Dev List <jackit-devel(a)lists.sourceforge.net>
After missing several deadlines, we are finally here.
This is the latest and greatest release of jackmidi alsaseq bridge.
It is getting ready for inclusion into jackd (I hope), and I'd like to
test is as hard as possible.
I hope you will help me here :)
Everything it needs is an svn version of jackd.
For timing it by default uses hrtimers (available on 2.6.19+), there 3
more variants for your pleasure: select, poll and alsa queues. To
enable them, uncomment corresponding define in the beginning of
alsa_seqmidi.c. Although, hrtimers (via clock_nanosleep) shows the
best results.
Alsa queues suffer from events reordering, unless used with
jack_time.patch. This is NOT a problem of alsa-seq, but is nearly
impossible to avoid.
To sum up, the default setting (clock_nanosleep) gives the best results so far.
Regards,
Dmitry.
On 3/2/07, Nick Copeland <nickycopeland(a)hotmail.com> wrote:
> If Microsoft patent any capabilities that are present in the ALSA codestream
> them ALSA itself is exempt from the patent. This is written into the patent
> laws, they cover the possibliity that somebody had a product that was later
> patented by some other, wiser party. If the company in potential infringment
> can prove prior implementation then they are exempt.
>
Prior art doesn't exempt the first implementor, it invalidates the
patent, at least in the US.
Lee
Hi,
Since Microsoft recent audio related patent "that looks a lot like
ALSA", I thought this could be interesting :
http://www.showusthecode.com/
In short it's an open letter to Steve Ballmer asking him to show the
code and patents that Linux supposedly copied from Microsoft (haha,
what a joke...)
Happy reading,
__________________
Marc-Olivier Barre,
Markinoko.
After the bug fixes release of Alsaplayer, the hard work has begun. A
discussion comes on our todo list in regards with new input plugins.
We have an experimental wavpack plugin that constantly check the frame size.
Does anyone ever hear about streams with variable byte-per-sample and frequency
parameters (for example, at start it was 16bit/2ch/44100 but in the middle it
will be 24bit/5ch/48000)? (for wavpack or other formats as well)
Ciao,
Dominique
On Thu, 2007-02-22 at 06:42 -0600, Jan Depner wrote:
> I can say that the QT package is much easier to use and has
> better documentation and support. Not that GTK is terrible, it's just
> not as polished or professional.
the enemy of the good is the better.
i, for one, used the past 3 days to write a python module named
"audiogui", which provides widgets to mimick the look and feel of
traditional audio hardware panels (i dare you to start an audio ui
design war with me). it will be the base for providing an engine which
renders panels from stylesheets, to be used with plugins of aldrin - but
of course that whole thing could be connected to an OSC library and
control any DSSI host.
the basic idea was to imitate the design seen from native instruments
plugins and propellerheads reason. of course i'm damn proud that the
results look so well ;)
here is a demo showing the three widgets DecoBox, Knob and LCD, with
different settings applied.
http://www.paniq.org/images/audiogui5.png
in case you want to play with it, the module is based on PyGTK+ and
Cairo, and can be checked out from the aldrin svn.
http://svn.zeitherrschaft.org/aldrin/trunk
you find the scripts in share/aldrin, they are named audiogui.py and
lcdfont.py. run audiogui.py for above demonstration.
--
Leonard Ritter
-- Freelance Art & Logic
-- http://www.leonard-ritter.com
Hi!
I nearly finished alsaseq driver for jackmidi, but have a problem.
Alsaseq reorders events in fast sequences, so note-on/note-off pairs got mixed.
The algorithm of sending is simple:
snd_seq_ev_schedule_real(&alsa_event, output_que, 1, ×tamp);
frame_time = jack_frame_time(self->jack);
frame_offset = event.time - frame_time;
offset = ((long long)frame_offset) * 1000000000 / rate;
timestamp.tv_sec = (long) (offset / 1000000000);
timestamp.tv_nsec = (long) (offset % 1000000000);
snd_seq_event_output(self->seq, &alsa_event);
Here are the traces of what is going on:
jackmidi_alsaseq reads events from external midi interface and send
them to another midi interface.
Log shows what is being sent to alsaseq and when. Output format is:
[event] at [event.time] ([frame_time] + [frame_offset]) (+[offset]ns)
c0ff@ace ~/src/jack/alsamidi $ ./jackmidi_alsaseq
port created: in (20:0) MIDI 1
port created: out (20:0) MIDI 1
port created: in (24:0) USB Trigger Finger MIDI 1
port created: out (24:0) USB Trigger Finger MIDI 1
port_event: ADD 130:0
port created: out (130:0) aseqdump
90 4e 7f at 86646526 (86622198 + 24328) (+506833333ns)
80 4e 40 at 86649830 (86622200 + 27630) (+575625000ns)
90 4e 7f at 86654006 (86622201 + 31805) (+662604166ns)
80 4e 40 at 86656795 (86638582 + 18213) (+379437500ns)
90 4e 7f at 86660562 (86638584 + 21978) (+457875000ns)
80 4e 40 at 86663502 (86638584 + 24918) (+519125000ns)
90 4e 7f at 86666819 (86638585 + 28234) (+588208333ns)
80 4e 40 at 86669453 (86638585 + 30868) (+643083333ns)
90 4e 7f at 86673078 (86654965 + 18113) (+377354166ns)
80 4e 40 at 86676430 (86654966 + 21464) (+447166666ns)
90 4e 6f at 86678638 (86654967 + 23671) (+493145833ns)
80 4e 40 at 86680654 (86654968 + 25686) (+535125000ns)
We can see that all events go strictly in order (their frame_time is
monotonically increasing). Frame offsets are so big, because it runs
under jackd -d dummy -p 16384.
At the same time, aseqdump is hooked to jackmidi_alsaseq output port:
c0ff@ace ~ $ aseqdump
Waiting for data at port 130:0. Press Ctrl+C to end.
Source_ Event_________________ Ch _Data__
0:1 Port subscribed 128:5 -> 130:0
0:1 Port subscribed 128:2 -> 130:0
128:2 Note on 0 78 127
128:2 Note off 0 78 64
128:2 Note off 0 78 64
128:2 Note on 0 78 127
128:2 Note on 0 78 127
128:2 Note on 0 78 127
128:2 Note off 0 78 64
128:2 Note on 0 78 127
128:2 Note off 0 78 64
128:2 Note off 0 78 64
128:2 Note on 0 78 111
128:2 Note off 0 78 64
We see, Note on/Note off events are mixed.
Your suggestions, please.
Regards,
Dmitry.
P.S. Not wanting to start a flame war, but it is exactly the case, why
it's better for jackmidi driver to use as lower-level interface as
possible - less problems, more control.
P.P.S. alsa-devels, if you reply, please CC me, i'm not subscribed.