aMSN Forums
May 24, 2013, 02:09:44 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: New forum for aMSN !!
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: [mh] Tcl and Google Summer Of Code 2008  (Read 3343 times)
kakaroto
Administrator
Super Power User
*****
Offline Offline

Posts: 9428


View Profile WWW
« on: July 05, 2008, 04:41:57 pm »

Copied from a PM discussion with mh.

Quote from: "mh"
Hi!

I read (http://wiki.tcl.tk/20832) about your Tcl GSoC 2008 Project. Personally I'm involved in a project, which tries to create a MP3 Jukebox system/framework (jukebox in a classical sense) based on AOLserver/Tcl (http://audiomat.sourceforge.net/), but thats still in planning stage. For our purpose I played a lot with the Snack Sound Toolkit, but there are some limitations which I wanted to remedy in the C code. E.g. we would need a possibility not to ouput the sound only to OSS/ALSA, but also to an Icecast/Shoutcast system. After some research I found out, that it can only be a hack, because the audio output architecture of Snack is quite inflexible (driver can only be chosen at compilation).

So I really appreciate your plans to create a new audio library for Tcl. Until now I found only that little information in the Tcl'ers Wiki, so I wanted to ask you:
- Do you plan "only" an audio output library (marriage of libao and libao2)?
- What are your plans for audio input? Will there be some kind of plugin architecture?
- Do you have any plans for audio processing functions similiar to Snack (because you compared your project somehow with snack, which is if course much more than an audio input/output library), eg playing/encoding mp3 files or crossfading? If not, will there be any kind of plugin/extensible architecture to achieve additional functionality?

Thanks in advance and best regards,
Michael Hofer


Quote from: "kakaroto"
Hi,
Thanks for your interest!
The new library would probably be very helpful, you could write a driver for it that gets loaded dynamically which adds support for icecast/shoutcast/whatever if it doesn't already exist. This system will be very flexible.
To answer your questions :
1 - no, the plan is to have both audio input AND output... but audio input is only "if time permits"
2 - for audio input, there is no design yet, so I'm not sure yet how it will be done, but it should be fairly simple.. in the same way you would do ao_play(dev, buffer, len), you could do, ao_record(dev, &buffer, &len);
3 - No plans for anything more advanced than 'open+play+close', if you want, you can still do it in your own code, and if you implement it in the C code, then patches are of course welcomed  
For example, the current planning has a slot for having the Tcl extension have a PlayWave function that would play an actual .wav file, it would be done with something like this :
Code:

int PlayWav ( ) {
  dev = ao_open(...);
  PlayWav2 (dev);
}
int PlayWav2 (AoDevice *dev2) {
  buffer_size = ao_get_buffer(dev);
  buffer_len = read(wav_fd, buffer, buffer_size);
  ao_play(dev, buffer, buffer_len);
  delay = ao_get_delay(dev);
  Tcl_eval ( "after $delay / 2 [list  PlayWav $dev]" );
}


I think you get the idea... for doing something like cross fading, it would be as simple as doing the same thing, but when you know the file is at the end, you apply a filter on it...
The purpose of the library is to provide a way to output sound as raw PCM data, if you need to do effects on it, then use a 'filter' library in the middle before sending your data to libao. This helps keep it modular and focused on doing one thing.

I hope this answers your questions! If you have any other question, don't hesitate to ask.
And by the way, do you allow me to copy/paste this discussion on the public forums and continue it in public ?


Quote from: "mh"

Thanks for your answer! Yes, perhaps I will write liblame bindings for Tcl built upon your library. That would make sense. Or perhaps its possible to port the Snack library to your new Tcl-libao. Lets see  

PS: Of course you can move that discussion to public. I would have posted my messages in the public forums, but I didn't know where it fits, because its a bit off-topic.

Thanks ... i'm looking forward for any
Tcl audio developments ...
Best regards,
Michael.
Logged

KaKaRoTo
billiob
Administrator
Super Power User
*****
Offline Offline

Posts: 1352


View Profile
« Reply #1 on: July 05, 2008, 09:25:11 pm »

Sounds great!
Logged
a.mucha
Newbie

Offline Offline

Posts: 1


View Profile
« Reply #2 on: October 21, 2008, 05:38:33 pm »

Hi,
are there any news about this new soundsystem for tcl/tk?

Greetings from germany

Albrecht Mucha
Logged
kakaroto
Administrator
Super Power User
*****
Offline Offline

Posts: 9428


View Profile WWW
« Reply #3 on: October 21, 2008, 05:50:08 pm »

hello a.mucha and welcome to the forums.
Yes, the code was 'completed' but only added support for alsa and oss as there was no time to implement pulse, esd, arts, openAL, macosx, directshow support, etc...
The code has been added to amsn's SVN, but it is not being used right now... we just need to have someone port amsn to use that new library...
Logged

KaKaRoTo
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!