Hello all, I have a few questions and requests:
external capable of running mp3s backward?
I am a c++ newbie and I have been trying for some time now to create a mp3proxy type based object based on code from d_soundfile(threaded readsf~), readanysf~,tabread4~, libMad(mp3 decode library) and mp3play~ but I have been unsuccessful.
What I want(and need) is an object that translates a complete Mp3 into Pure-data compatible samples stored in the object (so a 3MB mp3 would fill up around 32Mb of sample data in an array inside of the object). Now the advantage of this aproach is that the data could be accessed as tabread4~ accesses array data (fast-forward, rewing would all be accessed by sendind a signal of index values). The disadvange is the loading time (around 10 secs on a fast computer, that's why it needs to be threaded).
I imagine the inputs would be a signal (for the indexes) and a method for the "open" command.The outputs would be 2 signal outs (left and right sound data) and a bang indicating the file is processed.
So, I need help. I think I have collected the necessary code and libraries, it just needs to be put together.
Tom O F iamonthebeach@hotmail.com
hi thomas,
I read:
- Has anyone done a port of readanysf~ for win32? And did anyone make an
external capable of running mp3s backward?
1.5) I used alsaplayer for that (on linux, with jack), and I have the feeling that readanyfs~ will do it one day. august are you in vienna ? we could meet at the pure date and that would make up a nice afternoon project ;)
What I want(and need) is an object that translates a complete Mp3 into Pure-data compatible samples stored in the object (so a 3MB mp3 would fill up around 32Mb of sample data in an array inside of the object). Now the advantage of this aproach is that the data could be accessed as tabread4~ accesses array data (fast-forward, rewing would all be accessed by sendind a
the advantage would be none, if you want to 'access as tabread4~' then put it in a table, and keep in mind that pd's internal sample format is 32bit floats so a 1minute stereo file will be 60*srate*2*4 bytes.
signal of index values). The disadvange is the loading time (around 10 secs on a fast computer, that's why it needs to be threaded).
if you can wait for even longer (and you have enough ram to waste) you could record it into [a] table[s] using readanyfs~ or mp3play~ or whatever.
regards,
x
by the way ...
if "soundfiler" could import/decode a mp3-file to load it into a table - that would be a great feature ... !
ciao
oliver
04.07.2003 10:25:29, CK x@meta.lo-res.org wrote:
hi thomas,
I read:
- Has anyone done a port of readanysf~ for win32? And did anyone make an
external capable of running mp3s backward?
- dunno
1.5) I used alsaplayer for that (on linux, with jack), and I have the feeling that readanyfs~ will do it one day. august are you in vienna ? we could meet at the pure date and that would make up a nice afternoon project ;)
What I want(and need) is an object that translates a complete Mp3 into Pure-data compatible samples stored in the object (so a 3MB mp3 would fill up around 32Mb of sample data in an array inside of the object). Now the advantage of this aproach is that the data could be accessed as tabread4~ accesses array data (fast-forward, rewing would all be accessed by sendind a
the advantage would be none, if you want to 'access as tabread4~' then put it in a table, and keep in mind that pd's internal sample format is 32bit floats so a 1minute stereo file will be 60*srate*2*4 bytes.
signal of index values). The disadvange is the loading time (around 10 secs on a fast computer, that's why it needs to be threaded).
if you can wait for even longer (and you have enough ram to waste) you could record it into [a] table[s] using readanyfs~ or mp3play~ or whatever.
regards,
x
-- chris@lo-res.org Postmodernism is german romanticism with better http://pilot.fm/ special effects. (Jeff Keuss / via ctheory.com)
PD-list mailing list PD-list@iem.at http://iem.at/cgi-bin/mailman/listinfo/pd-list
//////////////////////////////////////////////////////// \\\\\\\ http://klingt.org/ground/lift \\\\\\ ///////// http://klingt.org/executive-ensemble ///////// \\\\\\\\\\\\\\\\\\\\\\\\\\\\
hi thomas,
I read:
- Has anyone done a port of readanysf~ for win32? And did anyone make an
external capable of running mp3s backward?
- dunno
I started a port using cygwin and ming and got so far that I could play wav and mp3 files garbled. didn't have the time to research it further, an now it looks like it will be a while before I can get into it. and, since I peronally don't use windose or have a windose machine to work with, it's last on my agenda. first, I'd like to get the threading and logic down for internet streams.
about playing backwards....hmm. should be possible, but would take a while.
1.5) I used alsaplayer for that (on linux, with jack), and I have the feeling that readanyfs~ will do it one day. august are you in vienna ?
yes, but only till 1.Aug.
we could meet at the pure date and that would make up a nice afternoon project ;)
I plan to come later in the evening. ....it's gonna be a heavy week and I'll probably be too wasted to get into coding in the evening. but, let's see.
best - august.
Hallo, august hat gesagt: // august wrote:
first, I'd like to get the threading and logic down for internet streams.
May I cautiosly ask, if "interpolated varispeed" and "nudging" is somewhere on that agenda? ;)
I took a short look into the source, because like CK I would like to use readanysf for a DJing patch. Currently it is very hard to try to get two streams synchronized because changing speed or jumping a bit forward results in clicks.
If it isn't on your agenda now, maybe someone else has a pointer to an algorithm with which to achive that goal. Then I'd take a deeper look myself.
Frank Barknecht _ ______footils.org__
re frank,
I read:
If it isn't on your agenda now, maybe someone else has a pointer to an algorithm with which to achive that goal. Then I'd take a deeper look myself.
I think alsaplayer's sources are a good place to start looking for buffered varispeed playback(and forth ;) and there are several algos for interpolation to choose from here: http://www.musicdsp.org/archive.php?classid=5#62
HTH
x
first, I'd like to get the threading and logic down for internet streams.
May I cautiosly ask, if "interpolated varispeed" and "nudging" is somewhere on that agenda? ;)
the speed should be interpolated. as for nudging, I guess thats second on the list. well, I'd like to redesign the buffering so that it is a bit friendlier ... and nudging shouldn't be a prob then.
I took a short look into the source, because like CK I would like to use readanysf for a DJing patch. Currently it is very hard to try to get two streams synchronized because changing speed or jumping a bit forward results in clicks.
you shouldn't be getting clicks when changing speed.
jumping a bit forward results in clicks, 'cause its refilling the buffer.
If it isn't on your agenda now, maybe someone else has a pointer to an algorithm with which to achive that goal. Then I'd take a deeper look myself.
the algo for the speed comes from libsamplerate, supposedly the best lib for that.
-august.
Hallo,
august hat gesagt: // august wrote:
the speed should be interpolated. as for nudging, I guess thats second on the list.
That was me, too, I guess. ;)
well, I'd like to redesign the buffering so that it is a bit friendlier ... and nudging shouldn't be a prob then.
This would be wonderful.
you shouldn't be getting clicks when changing speed.
Yes, you're right. I must have remembered it wrong. Now - home again - there were no clicks.
jumping a bit forward results in clicks, 'cause its refilling the buffer.
Maybe I'm just doing something wrong when trying to "nudge". At first I tried to keep the current position in a [float] object, and then add a seek value (pcm or time) to it. But this gave clicks and also the resolution of the outlet values isn't quite sufficient.
Then I thought about how DJs do a nudge: The accelerate the vinyl for a short time, then the Technics MK1200 kicks in again at its current speed.
I designed something like that in Pd with a temporary higher or lower speed and a delay object, that resets the speed after a certain time. But it turned out, that this is really hard to get right: Either I don't get enough of the nudging effect, or I get clicks or dropouts.
This might be hard to understand without a patch, so I attached the current "djPlay.pd" patch I'm working on. It's a graph-on-parent patch, the main action happens inside the "the-guts" subpatch. Oh,and the GUI isn't really finished, I'm still working on the audio guts mainly.
Maybe this already is useful oto others, too.
Frank Barknecht _ ______footils.org__
Tom wrote:
What I want(and need) is an object that translates a complete Mp3 into Pure-data compatible samples stored in the object (so a 3MB mp3 would
fill
up around 32Mb of sample data in an array inside of the object). Now the advantage of this aproach is that the data could be accessed as
tabread4~
accesses array data (fast-forward, rewing would all be accessed by
sendind a CK wrote:
the advantage would be none, if you want to 'access as tabread4~' then put it in a table, and keep in mind that pd's internal sample format is 32bit floats so a 1minute stereo file will be 60*srate*2*4 bytes.
and CK wrote:
if you can wait for even longer (and you have enough ram to waste) you
could
record it into [a] table[s] using readanyfs~ or mp3play~ or whatever.
That's why I do not want to put it in a pd table. The conversion has to be done as fast as possible with a thread (not normal play speed... why take 3 min when you can take 10 seconds). The audio samples must be in a smaller format than 32bit floats and therefore stored in the object. Had not thought about 32bit samples, thanks for the warning, that is a lot of wasted memory. But I still think decoding all of the mp3 in advance would permit easy seeking, reverse, nudging and even changing speed more smoothly because you would have a lot more precision on the samples being played.
Anyways, I think I am going to switch over to linux : more pd objects and more support(!)... also, some nice dj programs on linux, I think, cauze I have not tried them out yet... http://gdam.ffem.org/ http://www.terminatorx.cx/ ...see you on the other side.
Tom
----- Original Messages ----- From: "CK" x@meta.lo-res.org To: "Thomas Fredericks" iamonthebeach@hotmail.com Cc: pd-list@iem.at Sent: Friday, July 04, 2003 4:25 AM Subject: Re: [PD] mp3 proxy
hi thomas,
I read:
- Has anyone done a port of readanysf~ for win32? And did anyone make
an
external capable of running mp3s backward?
- dunno
1.5) I used alsaplayer for that (on linux, with jack), and I have the feeling that readanyfs~ will do it one day. august are you in vienna ? we could meet at the pure date and that would make up a nice afternoon project ;)
What I want(and need) is an object that translates a complete Mp3 into Pure-data compatible samples stored in the object (so a 3MB mp3 would
fill
up around 32Mb of sample data in an array inside of the object). Now the advantage of this aproach is that the data could be accessed as
tabread4~
accesses array data (fast-forward, rewing would all be accessed by
sendind a
the advantage would be none, if you want to 'access as tabread4~' then put it in a table, and keep in mind that pd's internal sample format is 32bit floats so a 1minute stereo file will be 60*srate*2*4 bytes.
signal of index values). The disadvange is the loading time (around 10
secs
on a fast computer, that's why it needs to be threaded).
if you can wait for even longer (and you have enough ram to waste) you
could
record it into [a] table[s] using readanyfs~ or mp3play~ or whatever.
regards,
x
-- chris@lo-res.org Postmodernism is german romanticism with better http://pilot.fm/ special effects. (Jeff Keuss / via ctheory.com)