Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Rockbox Ports are now being developed for various digital audio players!

+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Feature Ideas
| | |-+  playing multiple tracks at once - please please
« previous next »
  • Print
Pages: [1] 2

Author Topic: playing multiple tracks at once - please please  (Read 8660 times)

Offline timcd100

  • Member
  • *
  • Posts: 2
playing multiple tracks at once - please please
« on: August 15, 2011, 04:46:31 PM »
Is there any way multiple music files can be played simultaneously?

 I really want this on my sansa fuze because the thing I most want to use it for is noise cancellation, ie white noise. But I don't want to just listen to white noise, I want to listen to music on top of white noise to make the noise cancellation effect complete.

 If I can't do this on any mp3 player I'll have to come up with the money to buy 2 of them and listen to them both at the same time using both earbuds and over-the-ear headphones! That's why I'd be very grateful if this could be done.

It would also be useful for listening to an audiobook and music at the same time which lots of people want to do.

Thank you
Logged

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 8974
Re: playing multiple tracks at once - please please
« Reply #1 on: August 15, 2011, 04:51:42 PM »
Quote from: timcd100 on August 15, 2011, 04:46:31 PM
Is there any way multiple music files can be played simultaneously?

Not using the normal playback system.  Plugins have the ability to do this, but I don't think anyone has written something like this.
Logged

Offline timcd100

  • Member
  • *
  • Posts: 2
Re: playing multiple tracks at once - please please
« Reply #2 on: August 16, 2011, 09:53:17 AM »
I see, thanks for the feedback. Do you think someone will make a plug-in like this within a few months or should I just buy another cheap mp3 player if I want to have simultaneous playback and not wait for a possible plug-in? I'm not sure how often plug-ins come out, how easy it is.

Another problem with the Sansa Fuze is that the shuffle feature doesn't do a true random shuffle it always seems to gravitate to certain songs and not others.
Logged

Offline AlexP

  • Global Moderator
  • Member
  • *
  • Posts: 3688
  • ex-BigBambi
Re: playing multiple tracks at once - please please
« Reply #3 on: August 16, 2011, 11:06:29 AM »
It really is impossible to say, it depends when someone who wants it decides to write it.  It could be tomorrow, it be never.
Logged
H140, F60, S120, e260, c240, Clip, Fuze v2, Connect, MP170, Meizu M3, Nano 1G, Android

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 8974
Re: playing multiple tracks at once - please please
« Reply #4 on: August 16, 2011, 11:24:33 AM »
Quote from: timcd100 on August 16, 2011, 09:53:17 AM
Do you think someone will make a plug-in like this within a few months or should I just buy another cheap mp3 player if I want to have simultaneous playback and not wait for a possible plug-in?

For such an obscure plugin I think its unlikely that anyone but you would implement it. 
Logged

Offline cereal_killer

  • Member
  • *
  • Posts: 409
Re: playing multiple tracks at once - please please
« Reply #5 on: August 16, 2011, 01:32:22 PM »
I hope that I address the right topic with my post here, but I was wondering what the audiomixer committed in r30097 does and if playing back sounds from 2 different sources (e.g. playing back 2 sound files simultaneously) was now possible with this feature. I read through the FS task and the Log Message, but I think I don't have the technical knowledge to understand this things right.

Is there some more documentation for this feature or can somebody describe how this audiomixer works or how to actually use this feature and benefit from it?

Greetings

c_k
Logged

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 8974
Re: playing multiple tracks at once - please please
« Reply #6 on: August 16, 2011, 01:53:58 PM »
Quote from: cereal_killer on August 16, 2011, 01:32:22 PM
I hope that I address the right topic with my post here, but I was wondering what the audiomixer committed in r30097 does and if playing back sounds from 2 different sources (e.g. playing back 2 sound files simultaneously) was now possible with this feature.

It allows you to provide audio drivers with as many audio streams as you like and have them mixed.  Playback from 2 different sources was already possible before that (and indeed plugins like doom did so), but this makes it much neater to implement.  It also simplifies mixing in the voice interface with audio, and prevents weird issues such as the voice interface not working when audio was stopped.

Logged

Offline cereal_killer

  • Member
  • *
  • Posts: 409
Re: playing multiple tracks at once - please please
« Reply #7 on: August 16, 2011, 03:12:34 PM »
thank you for your kind answer saratoga,

Quote from: saratoga on August 16, 2011, 01:53:58 PM
It allows you to provide audio drivers with as many audio streams as you like and have them mixed. 

but does this mean, that launching a LUA plugin that is able to playback mp3s (see: http://forums.rockbox.org/index.php/topic,28524.0.html) while listening to regular audio playback (e.g. started from file browser) can achieve hearing 2 separate soundfiles at the same time?

thanks in advance

c_k
Logged

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 8974
Re: playing multiple tracks at once - please please
« Reply #8 on: August 16, 2011, 03:24:06 PM »
Quote from: cereal_killer on August 16, 2011, 03:12:34 PM
but does this mean, that launching a LUA plugin that is able to playback mp3s (see: http://forums.rockbox.org/index.php/topic,28524.0.html) while listening to regular audio playback (e.g. started from file browser) can achieve hearing 2 separate soundfiles at the same time?

That lua script would (assuming its finished) just start audio from the file browser programatically, not actually decode audio.   So running it would be the same as clicking on a file in the file browser.  If you ran the script, then clicked something in the file browser you would hear the first track, then that would stop as it began playing the second track.

I have no idea how lua works, but in theory you could probably write a lua plugin to play mutliple streams at the same time from audio you generated or read from disk or something.  I think you can do most things in lua. 
Logged

Offline gbl08ma

  • Member
  • *
  • Posts: 249
    • My blog
Re: playing multiple tracks at once - please please
« Reply #9 on: August 16, 2011, 04:25:04 PM »
LUA (or any C plugin) would need to decode the audio files into raw audio (PCI?), that would be added to the new Rockbox audio mixer - at least this is my understanding of how it works.

Since it's a nearly impossible task to decode MP3, OGG or anoher complex audio format in LUA (no codec has been ported, and porting would be a pain, even because LUA is slow under Rockbox, and there's the lack of the math library), I think the only reliable and extensible way to decode various audio files simultaneously using Rockbox codecs  would be to have a way to declare multiple instances of the playback engine - not something really possible on the limited systems Rockbox runs on.
Logged
http://gbl08ma.com | http://i.tny.im

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 8974
Re: playing multiple tracks at once - please please
« Reply #10 on: August 16, 2011, 04:51:46 PM »
Thinking about this more, if you just want to generate white noise mixed in with your music, you could probably set the preamp as low as it would go in the EQ, then use the replaygain precut to drop the level even lower.  Then if you cranked up the volume, you would blow up the quantization noise.  Assuming you had dithering on in the sound settings, this ought to add quite a lot of white noise.

The resulting audio would be pretty quiet though.  You might need an amp to hear it.
Logged

Offline nls

  • Developer
  • Member
  • *
  • Posts: 460
Re: playing multiple tracks at once - please please
« Reply #11 on: August 18, 2011, 05:22:10 AM »
Writing a plugin that just generates white noise on the fly and mixes it in with playback should be quite easy and would not need any decoding or complicated buffering system.
Logged

Offline Chronon

  • Rockbox Expert
  • Member
  • *
  • Posts: 4379
Re: playing multiple tracks at once - please please
« Reply #12 on: August 18, 2011, 11:02:50 AM »
My naive approach would basically average the audio samples on the fly with the output from a suitably scaled random number generator, but this seems to involve decoding.  What is a better way?
Logged
Sansa e280, Gigabeat F40, Gigabeat S60, Sansa Clip+, iPod Mini 2g

hurricane

  • Guest
Re: playing multiple tracks at once - please please
« Reply #13 on: August 19, 2011, 03:50:12 AM »
My computer will play multiple audio files at the same time. You could do this and then record it and load that into your ipod.
You can mix your own tracks on your computer.
I would like to be able to watch TV and hear the sound while at the same time listening to music on my Ipod.
Are you sure that playing two songs at the same time is what you want? Because to me they wouldn't cancel each other out; it would sound more like a very bad band that keeps hitting the wrong notes. I think it would be very distracting. I read while listening to my ipod all the time and the music helps me concentrate on what I'm reading rather than being distracting.
Logged

Offline nls

  • Developer
  • Member
  • *
  • Posts: 460
Re: playing multiple tracks at once - please please
« Reply #14 on: August 19, 2011, 04:14:21 AM »
Quote from: Chronon on August 18, 2011, 11:02:50 AM
My naive approach would basically average the audio samples on the fly with the output from a suitably scaled random number generator, but this seems to involve decoding.  What is a better way?

Well, yes the music still needs to be decoded but the playback engine can handle that, the plugin only needs to generate whitenoise (which as you say is just random numbers) and tell the mixer to mix it in with the playback audio.

Still this usecase seems fairly odd.
Logged

  • Print
Pages: [1] 2
« previous next »
+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Feature Ideas
| | |-+  playing multiple tracks at once - please please
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.117 seconds with 17 queries.