[Gambas-user] Managing soundtracks, WAVs
Dimitris Anogiatis
dosida at ...626...
Thu Aug 20 13:08:45 CEST 2009
Hey Rolf,
It doesn't sound strange. I'm learning Gambas as I go along too :)
>From what I can gather from Gambasdoc (which is my usual reference point)
you can only get position control in the music object. The only thing you
can
get in the channel object is just a Play method. Unfortunately in the
current
state of the gb.sdl.sound library there's no way to change the playback
speed
at all.
I would assume the rationale behind such a simplistic object is most likely
that the Channels would only be used as means to implement special effects.
or sound notifications (which usually don't last more than a couple [and in
some
cases a few] seconds). And the Music Object is just a basic way of playing
an
MP3. The whole library needs a bit more work before you can do more complex
things such as on-the-fly speed changes and (hopefully) support for more
audio
formats.
In the Music Object there are 2 static properties, Pos & Volume. Now... if
your
project involves taking an MP3 song/music track and playing it concurrently
with
other tracks... what I would do given the current state of the objects in
the gb.sdl.sound
library... would be to create one music object for every track and keep
track of a
global timeline so I could play those songs whenever I set them in the
timeline
and it would prolly look something like this
|---------------------------------------------------------------------------------------------------------------|
<- Timeline
|---------------| <- First Track
|-------------------------| <- Second Track
|-------------------------| <- Third Track
I can see 2-3 major obstacles if you follow this approach.
1) Performance. Depending on how heavy the Music Object is, you would need
to trial an error
to see how far you can go creating objects like that.
2) Layout Representation. Are you going to look for a graphical way to
represent your timeline
and your tracks? Or are you using Listboxes / listviews / Gridviews?
3) Recording. As the gb.sdl.sound doesn't offer any recording capabilities
(yet) what's your
next option?
Personally for my internet radio project I'm using xmms2 as my playback
option but I would love
to use native gambas libraries for that; there's not much I can do but wait
till the gb.sdl.sound
library gets in par with what SDL can do :)
I don't have lots of info regarding the approach you take in your project or
what the goal is so
I hope all this brainstorming helps (and I hope I didn't confuse you more)
Regards
Dimitris
On Thu, Aug 20, 2009 at 2:39 AM, Rolf-Werner Eilert <
eilert-sprachen at ...221...> wrote:
> Hi Dimitris,
>
> It may sound strange, but I simply didn't know that the name sdl refers
> to a library with the same name... Browsing the source for gb.sdl and
> gb.sdl.sound, I found SDL and read the documentation they provide on
> their site.
>
> Do you know if it is possible to slightly change playback speed during
> playback (by only one or a few percent)? If not, for my project I would
> have to use this function that sets playback to a certain position
> (which would result in a slight sound-skip, stuttering). Anyway, it
> would have to be done during playback.
>
> Regards
>
> Rolf
>
>
> Dimitris Anogiatis schrieb:
> > Rolf,
> >
> > It should have been this case yes.
> >
> > If you use ubuntu or Debian perhaps try to re-create your application's
> > executable, re-produce
> > your deb packages and logically the dependency should be included in the
> > final product...
> > check out the resulting deb file with gdebi at first (it will tell you in
> > red if you're trying to
> > install a package with a missing dependency) or KPackage if you want a
> > complete list of the
> > files associated with the package you're trying to install.
> >
> > if that doesn't work an email to the package maintainers of either ubuntu
> or
> > debian will prolly get
> > you a bit further than this. Or perhaps Benoit could help you with this
> one
> > as well... but logically
> > it should work
> >
> > Hope it helps.
> >
> > Regards
> > Dimitris
> >
> > On Mon, Aug 17, 2009 at 9:44 AM, Rolf-Werner Eilert <
> > eilert-sprachen at ...221...> wrote:
> >
> >> Rob schrieb:
> >>> On Friday 14 August 2009 08:15 am, Joshua Higgins wrote:
> >>>> I'm sure there is an example project that handles playing wav files...
> >>> I'm pretty sure I or someone else posted a simple WAV player example to
> >> the
> >>> list shortly after the gb.sdl component was released (I know I wrote
> one
> >>> but someone might have beaten me to it.) No idea about recording
> >>> though....
> >>>
> >>> Rob
> >>>
> >>
> >> Looking this up, I found that on my laptop I do not have gb.sdl.sound
> >> either. So my first question would be, what do I have to provide to get
> >> it included? I mean, it's one of the components that have to be compiled
> >> and included, isn't it?
> >>
> >> Rolf
> >>
> >>
> >>
> >>
> ------------------------------------------------------------------------------
> >> Let Crystal Reports handle the reporting - Free Crystal Reports 2008
> 30-Day
> >> trial. Simplify your report design, integration and deployment - and
> focus
> >> on
> >> what you do best, core application coding. Discover what's new with
> >> Crystal Reports now. http://p.sf.net/sfu/bobj-july
> >> _______________________________________________
> >> Gambas-user mailing list
> >> Gambas-user at lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/gambas-user
> >>
> >
> ------------------------------------------------------------------------------
> > Let Crystal Reports handle the reporting - Free Crystal Reports 2008
> 30-Day
> > trial. Simplify your report design, integration and deployment - and
> focus on
> > what you do best, core application coding. Discover what's new with
> > Crystal Reports now. http://p.sf.net/sfu/bobj-july
> > _______________________________________________
> > Gambas-user mailing list
> > Gambas-user at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/gambas-user
> >
>
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus
> on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now. http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
More information about the User
mailing list